/* FrAIser's app (queue item 284; laid out as two tabs, Ask and News, in item 290): his shop's night band, full screen.
   His colours and fonts from the theme (base.css: --night, --night-ink, --lamplight, --verdigris; Sofia Sans Condensed
   and Newsreader). */
@font-face { font-family: 'Sofia Sans Condensed'; font-weight: 600; font-display: swap; src: url(f/sofia-600.woff2) format('woff2'); }
@font-face { font-family: 'Sofia Sans Condensed'; font-weight: 450; font-display: swap; src: url(f/sofia-450.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 400; font-display: swap; src: url(f/newsreader-400.woff2) format('woff2'); }
@font-face { font-family: 'Sofia fallback'; src: local('Arial Narrow'), local('ArialNarrow'), local('Arial'); size-adjust: 88%; ascent-override: 98%; descent-override: 26%; }
@font-face { font-family: 'Newsreader fallback'; src: local('Georgia'); size-adjust: 96%; ascent-override: 92%; descent-override: 24%; }
:root {
  --display: 'Sofia Sans Condensed', 'Sofia fallback', 'Arial Narrow', sans-serif;
  --text: 'Newsreader', 'Newsreader fallback', Georgia, serif;
  --night: #141210; --night-2: #1d1a17; --card: #24201c;
  --ink: #ece6dc; --ink-2: #d2c9bb; --ink-3: #a99f90;
  --lamp: #ffb766; --cream: #ecdcb6; --verdigris: #2c6a60;
  --line: rgb(236 230 220 / .16);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--ink); }
body { font: 400 18px/1.5 var(--text); -webkit-text-size-adjust: 100%; font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: .005em; }
a { color: var(--cream); text-underline-offset: .18em; }
button, input { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex: none; }

/* the frame: header, the tab's view, the field (Ask only), the tab bar */
.app { display: grid; grid-template-rows: auto 1fr auto auto; height: 100dvh; max-width: 760px; margin: 0 auto; }
.app[data-tab="news"] { grid-template-rows: auto 1fr auto; }

.top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--line); background: var(--night); }
.top__badge { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.top h1 { font-size: 24px; flex: 1; min-width: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: 600 16px/1 var(--display); letter-spacing: .02em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pill .ic { width: 15px; height: 15px; color: var(--lamp); }
.pill:hover { border-color: var(--ink-3); }

/* ---------- Ask ---------- */
.talk { overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; scroll-padding-bottom: 16px; }
.hello { text-align: center; padding: 12px 8px 4px; }
.hello__badge { width: min(180px, 44vw); height: auto; border-radius: 50%; box-shadow: 0 0 60px rgb(255 183 102 / .18); }
.hello h2 { font-size: 30px; margin-top: 14px; }
.hello h2 span { display: block; color: var(--lamp); }
.hello p { margin: 8px auto 0; max-width: 26em; color: var(--ink-2); }
.talk--busy .hello__badge { width: 96px; }

.you { align-self: flex-end; max-width: 85%; background: var(--verdigris); color: #f4f0e8; padding: 10px 14px; border-radius: 18px 18px 4px 18px; margin: 0; }
.him { align-self: flex-start; max-width: 92%; display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.him__badge { width: 32px; height: 32px; border-radius: 50%; }
.him__words { min-width: 0; background: var(--night-2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 4px 18px 18px 18px; }
.him__words p { margin: 0 0 10px; }
.him__words p:last-child { margin-bottom: 0; }
.him--writing .him__words::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--lamp); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .him--writing .him__words::after { animation: none; } }

/* each piece in an answer: its photo, its title, its price */
.rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px; min-height: 70px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font: 600 16px/1.15 var(--display); letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.row:hover { border-color: var(--ink-3); }
.row__pic { width: 58px; height: 58px; border-radius: 10px; background: var(--night-2); overflow: hidden; }
.row__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row--bare { grid-template-columns: 1fr auto; padding-left: 14px; }
.row b { color: var(--lamp); font-weight: 600; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips .pill { white-space: normal; text-align: left; }
.film { display: block; width: fit-content; margin: 10px 0 0; color: var(--ink); }
.plan { margin: 12px 0 0; }
.plan a { display: block; }
.plan img { display: block; width: 100%; height: auto; border-radius: 8px; }
.plan figcaption { margin-top: 6px; font-size: 14px; color: var(--ink-2); opacity: .8; }
.wait { color: var(--ink-3); font-style: italic; margin: 0 0 0 42px; }

.news { border-color: rgb(255 183 102 / .45); }
.news__tag { font: 600 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--lamp); margin: 0 0 8px; }
.news__h { font-size: 26px; margin-bottom: 6px; }
.news img { display: block; width: 100%; height: auto; border-radius: 10px; margin: 6px 0 10px; }
.news .act { margin-top: 4px; }

/* the field: the send arrow inside it */
.ask { padding: 8px 16px 8px; background: var(--night); }
.ask__field { display: flex; align-items: center; gap: 6px; min-height: 54px; padding: 4px 5px 4px 18px; border: 1px solid var(--ink-3); border-radius: 999px; background: var(--night-2); }
.ask__field:focus-within { border-color: var(--lamp); }
.ask input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; font-size: 18px; outline: none; }
.ask input::placeholder { color: var(--ink-3); }
.ask button { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--lamp); color: #1b1916; cursor: pointer; }
.ask button .ic { width: 22px; height: 22px; }
.ask button[disabled] { opacity: .6; cursor: default; }
/* queue item 294: ask out loud, a quiet microphone before the send arrow (shown where the browser can listen) */
.ask .ask__mic { background: none; color: var(--ink-2); }
.ask .ask__mic[hidden] { display: none; }
/* with the microphone in, the hint keeps whole on a 360 phone (it needs 246 px at 18 px); typing stays 18 px */
.ask__field:has(.ask__mic:not([hidden])) input::placeholder { font-size: min(18px, 4vw); }
.ask input { text-overflow: ellipsis; }
.ask .ask__mic.is-on { background: var(--verdigris); color: #fff; }
@media (prefers-reduced-motion: no-preference) { .ask .ask__mic.is-on { animation: listen 1.2s ease-in-out infinite; } }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 rgb(44 106 96 / .6); } 50% { box-shadow: 0 0 0 7px rgb(44 106 96 / 0); } }
.ask button:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.ask__heard { margin: 6px 6px 0; font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.ask__line { margin: 6px 6px 0; font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.ask__check { margin-bottom: 8px; }

/* ---------- the tab bar, above the home indicator ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--night-2); }
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 52px; padding: 4px 0; border: 0; background: none; font: 600 13px/1 var(--display); letter-spacing: .05em; color: var(--ink-3); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tab .ic { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--lamp); }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"]:hover { color: var(--lamp); }
.tab__dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 2px var(--night-2); }

/* ---------- News ---------- */
.newsview { overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.newsview > h2 { font-size: 34px; }
.newsview__intro { margin: -4px 0 0; color: var(--ink-2); }
.checklist { display: grid; gap: 14px; }
.step { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 16px; }
.step__h { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; }
.step__h h3 { font-size: 21px; }
.step__h small { display: block; font: 450 15px/1.25 var(--display); color: var(--ink-2); margin-top: 3px; letter-spacing: .02em; }
.step__h small:empty { display: none; }
.step__state { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 19px/1 var(--display); }
.step__state .ic { width: 20px; height: 20px; }
.step--next .step__state { background: var(--lamp); color: #1b1916; }
.step--wait .step__state { border: 1.5px dashed var(--ink-3); color: var(--ink-3); }
.step--done .step__state { background: var(--verdigris); color: #f4f0e8; }
.step--wait { opacity: .62; }
.tag { font: 600 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.step--next .tag { color: var(--lamp); background: rgb(255 183 102 / .12); }
.step--wait .tag { color: var(--ink-3); border: 1px solid var(--line); }
.step--done .tag { color: #9fd3c7; background: rgb(44 106 96 / .35); }
.step__body { margin-top: 14px; display: grid; gap: 10px; }
.step__body:empty { display: none; }
.step__body p { margin: 0; }
.small { font-size: 15px; color: var(--ink-2); line-height: 1.45; margin: 0; }
.newsview > .small { font-size: 14.5px; color: var(--ink-3); line-height: 1.4; }

.act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--lamp); color: #1b1916; font: 600 20px/1 var(--display); letter-spacing: .02em; text-decoration: none; cursor: pointer; }
.act:hover { background: #ffc583; }
.act[disabled] { opacity: .6; cursor: default; }
.act--wide { width: 100%; }
.act--line { min-height: 46px; background: none; color: var(--ink); border: 1px solid var(--ink-3); font-size: 17px; }
.act--line:hover { background: none; border-color: var(--ink); }
.act--line .ic { width: 18px; height: 18px; transition: transform .2s; }
.act--line[aria-expanded="true"] .ic { transform: rotate(180deg); }
.quiet { background: none; border: 0; padding: 10px 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 15px; }
/* signed up for his news: one quiet line, and turning it off asks first */
.news-on { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-on p { margin: 0; color: var(--ink-2); }
.news-on__off { flex: none; min-height: 44px; padding: 0 2px; background: none; border: 0; color: var(--ink-3); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.news-stop { display: grid; gap: 10px; }
.news-stop p { margin: 0; }
.news-stop .quiet { display: block; margin: 0 auto; }
.news-on-only { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 12px 16px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--ink-2); font: 600 16px/26px var(--display); text-align: center; }
.steps li p { margin: 1px 0 0; font-size: 16.5px; line-height: 1.4; color: var(--ink-2); }
.steps svg { display: block; width: 100%; max-width: 330px; height: auto; border-radius: 12px; margin-top: 8px; }
.steps:not(.steps--pics) svg { display: none; }
.noscript { padding: 24px; }
