/* Газета The Nobot в браузере — цвета и шрифты те же, что в приложении (ui/theme/Theme.kt).
   Скругление одно — рукописный кружок у чаевых. */

@font-face { font-family: Newsreader; src: url(/fonts/newsreader.ttf) format('truetype'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: Newsreader; src: url(/fonts/newsreader_italic.ttf) format('truetype'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier_prime.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier_prime_bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier_prime_italic.ttf) format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
	--paper: #F1EDE3; --paper-light: #FBF9F4; --paper-pressed: #E7E1D3;
	--ink: #1B1A17; --muted: #3E3C37; --muted2: #4A4740; --label: #5A574F; --dotted: #8C887E;
	--rule-light: #C9C3B5; --blue: #2731C9; --rust: #9E2410;
	--serif: Newsreader, Georgia, 'Times New Roman', serif;
	--mono: 'Courier Prime', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-optical-sizing: auto; font-size: 16px; line-height: 1.42; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Колонка газеты: на телефоне во всю ширину, на большом экране — полоса посередине. */
.screen { max-width: 620px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page { flex: 1; padding: 12px 18px 28px; }
@media (min-width: 700px) {
	.screen { border-left: 1px solid var(--rule-light); border-right: 1px solid var(--rule-light); }
	.page { padding: 18px 28px 32px; }
}

.mono { font-family: var(--mono); }
.kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); } .muted2 { color: var(--muted2); } .label { color: var(--label); } .blue { color: var(--blue); } .rust { color: var(--rust); }
.it { font-style: italic; }
.row { display: flex; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.rule-b { border-bottom: 1px solid var(--ink); }
.rule-b-light { border-bottom: 1px solid var(--rule-light); }
.double { border-bottom: 3px double var(--ink); }
.boxed { border: 1.5px solid var(--ink); background: var(--paper-light); }
.center { text-align: center; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.masthead { font-family: var(--serif); font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 0; }

.dateline { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 6px 0; border-bottom: 1px solid var(--ink); }

/* Ссылки-курсив («← Today’s edition», «Never mind») — высота под палец. */
.ilink { font-style: italic; min-height: 44px; display: inline-flex; align-items: center; }
.ilink:hover { text-decoration: underline; }

/* Кнопка-плашка внизу экрана: прилипает к низу окна. */
.pressbar { position: sticky; bottom: 0; z-index: 5; width: 100%; height: 64px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--paper); font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.pressbar.short { height: 58px; font-size: 16px; }
.pressbar.blue { background: var(--blue); color: #fff; }
.pressbar.centered { justify-content: center; }
.pressbar:disabled { background: var(--muted2); }
.pressbar.dotted:disabled { background: var(--dotted); }
.pressbar:not(:disabled):hover { filter: brightness(1.25); }

.tabs { display: flex; border-bottom: 1px solid var(--ink); }
.tab { height: 44px; padding-right: 14px; font-size: 16px; font-style: italic; line-height: 1.2; }
.tab span { padding-bottom: 4px; }
.tab.on { font-style: normal; font-weight: 700; }
.tab.on span { border-bottom: 2px solid var(--ink); }

.feedline { width: 100%; min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--rule-light); font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.feedline .arrow { font-size: 13px; letter-spacing: 0; }

.clickable { cursor: pointer; }

.top { padding: 16px 0 14px; border-bottom: 1px solid var(--ink); }
.top .quote { font-size: 29px; font-weight: 700; line-height: 1.08; letter-spacing: -.01em; margin-top: 8px; }
.byline { font-style: italic; color: var(--muted); padding: 8px 0; }
.byline.link { cursor: pointer; }
.byline.link:hover { text-decoration: underline; }

.twocol { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ink); }
.twocol > div { padding: 14px 12px 14px 0; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.twocol > div + div { padding: 14px 0 14px 12px; border-left: 1px solid var(--ink); }
.dropcap { font-size: 15px; line-height: 1.42; }
.dropcap.cap::first-letter { float: left; font-size: 44px; line-height: .8; font-weight: 800; padding: 4px 5px 0 0; }

.classified { margin: 16px 0; padding: 12px 14px; cursor: pointer; }
.letter { padding: 12px 0 8px; border-bottom: 1px solid var(--rule-light); cursor: pointer; }

/* Чаевые: подчёркнутая ссылка; после — синяя, обведённая от руки и чуть повёрнутая. */
.tip { min-height: 44px; padding: 0 10px; font-family: var(--mono); font-weight: 700; font-size: 13px; text-decoration: underline; white-space: nowrap; position: relative; flex: none; }
.tip.off { color: var(--muted2); }
.tip.done { color: var(--blue); text-decoration: none; transform: rotate(-3deg); }
.tip.done::before { content: ''; position: absolute; inset: 6px 0; border: 2px solid var(--blue); border-radius: 50%; }
.tip.done::after { content: ''; position: absolute; inset: 7px 3px 5px 2px; border: 1.2px solid rgba(39, 49, 201, .35); border-radius: 50%; }
.tipcount { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--muted2); padding: 12px 0 12px 10px; white-space: nowrap; flex: none; }

.textlink { text-decoration: underline; cursor: pointer; }

.note { padding: 36px 0; text-align: center; }
.note h2 { font-size: 22px; font-weight: 700; line-height: 1.15; margin: 0; }
.note p { font-size: 15px; font-style: italic; color: var(--muted); margin: 8px 0 0; }

.endmark { padding: 28px 0 12px; text-align: center; }

/* Поля ввода: без рамок, линейка снизу. */
.field { width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 6px 2px; outline: none; resize: none; }
.field::placeholder { color: var(--muted2); font-style: italic; }
.lined { font-size: 18px; line-height: 28px; min-height: 140px; padding: 0 2px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, var(--rule-light) 27px, var(--rule-light) 28px); background-attachment: local; }

.choice { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 4px; border-bottom: 1px solid var(--rule-light); background: var(--paper); }
.choice.on { background: var(--paper-pressed); }
.choice:disabled { opacity: .7; }
.radio { width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 50%; flex: none; display: grid; place-items: center; }
.choice.on .radio::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

.action { min-height: 44px; padding: 0 6px; font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .08em; }
.action:disabled { color: var(--muted2); }

/* Сообщение внизу — газетная врезка над плашкой. */
.notice { position: fixed; left: 50%; transform: translateX(-50%); bottom: 78px; width: calc(min(620px, 100%) - 36px); z-index: 20; padding: 12px 14px; font-family: var(--mono); font-size: 13px; text-align: left; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }

.overlay { position: fixed; inset: 0; background: rgba(27, 26, 23, .35); display: grid; place-items: center; z-index: 30; padding: 28px; }
.dialog { width: 100%; max-width: 420px; padding: 14px 16px; }

/* Пропуск. */
.pass { display: flex; position: relative; margin-top: 20px; }
.pass .photo { width: 92px; border-right: 1px solid var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 0; background: repeating-linear-gradient(135deg, rgba(27, 26, 23, .07) 0 1px, transparent 1px 6px); }
.pass .face { width: 58px; height: 70px; border: 1px solid var(--ink); background: var(--paper); display: grid; place-items: center; font-size: 34px; font-weight: 700; line-height: 1; }
.pass .field-row { padding: 7px 12px; }
.pass .field-row + .field-row { border-top: 1px dotted var(--dotted); }
.pass .v { font-family: var(--mono); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamp { position: absolute; right: 8px; bottom: 14px; width: 150px; height: 70px; border: 4px solid var(--blue); border-radius: 4px; color: var(--blue); font-family: var(--mono); text-align: center; transform: rotate(-14deg); mix-blend-mode: multiply; animation: stamp .4s cubic-bezier(.2, .9, .3, 1.2) both; display: flex; flex-direction: column; justify-content: center; }
.stamp b { font-size: 27px; letter-spacing: 2px; line-height: 1; }
.stamp small { font-size: 10px; margin-top: 4px; }
@keyframes stamp { 0% { transform: rotate(-14deg) scale(1.8); opacity: 0; } 70% { transform: rotate(-14deg) scale(.95); opacity: 1; } 100% { transform: rotate(-14deg) scale(1); } }

.wallets { margin-top: 16px; padding: 4px 14px; }
.wallets button { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule-light); font-size: 16px; }
.wallets button:last-child { border-bottom: 0; }
.wallets img { width: 26px; height: 26px; }

/* Кроссворд. */
.grid { display: inline-grid; gap: 1px; background: var(--ink); border: 2px solid var(--ink); padding: 0; position: relative; }
.cell { position: relative; background: var(--paper-light); }
.cell.black { background: var(--ink); }
.cell i { position: absolute; left: 3px; top: 1px; font-family: var(--mono); font-size: 10px; font-style: normal; pointer-events: none; }
.cell input { width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font-weight: 700; padding: 18% 0 0; text-transform: uppercase; caret-color: var(--blue); outline: none; border-radius: 0; }
.cell input:focus { background: #E3E6FA; }
.solved { position: absolute; left: 50%; top: 50%; width: 230px; height: 96px; margin: -48px 0 0 -115px; border: 4px solid var(--blue); background: rgba(251, 249, 244, .55); color: var(--blue); font-family: var(--mono); text-align: center; display: flex; flex-direction: column; justify-content: center; mix-blend-mode: multiply; transform: rotate(-8deg); animation: solved .4s cubic-bezier(.2, .9, .3, 1.2) both; }
.solved b { font-size: 34px; letter-spacing: .09em; line-height: 1; }
.solved small { font-size: 13px; margin-top: 6px; }
@keyframes solved { from { transform: rotate(-8deg) scale(1.8); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.clues { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.clues p { margin: 6px 0 0; font-size: 14px; line-height: 1.35; }

/* Стол редактора. */
.pick { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--rule-light); }
.pick.full { opacity: .45; }
.pickmark { width: 30px; height: 30px; flex: none; margin-top: 2px; border: 1px solid var(--dotted); border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--blue); }
.pickmark.on { border: 2px solid var(--blue); transform: rotate(-6deg); }
.edstamp { width: 84px; height: 84px; flex: none; transform: rotate(8deg); mix-blend-mode: multiply; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ink); margin-top: 16px; }
.stats > div { padding: 10px; }
.stats > div:first-child { padding-left: 0; }
.stats > div + div { border-left: 1px solid var(--ink); }

.seal { width: 22px; height: 22px; flex: none; }
