/* Pips — interface styles.
   Quiet, cool chrome; colour lives only on the cards.

   Shared tokens and the base controls live here; every component of
   src/kit/ has its own file in css/kit/, every screen built from them its
   own file beside this one. */
@import url(kit/icon-button.css);
@import url(kit/chips.css);
@import url(kit/search-field.css);
@import url(kit/top-sheet.css);
@import url(kit/strip.css);
@import url(kit/action-bar.css);
@import url(kit/bottom-sheet.css);
@import url(collection.css);
@import url(editor.css);

@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/literata-cyrillic-opsz-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/literata-latin-opsz-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap;
  src: url(../fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap;
  src: url(../fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap;
  src: url(../fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root {
  --void: #1a1b21; --raise: #1f2129; --raise2: #272a33; --line: #2b2e38; --line2: #23262e;
  --text: #e9ebf1; --text2: #a3a8b5; --text3: #737888;
  --paper: #f6f3eb; --paper2: #e8e3d6; --back: #efeadf; --ink: #1c1d22; --dim: #8e8578;
  --cobalt: #3b5fa8; --cobalt-hi: #6d8fd6; --ember: #c4392f; --warn-bg: #3a2327; --warn: #e8a7a1;
  --serif: "Literata", Georgia, serif; --sans: "IBM Plex Sans", system-ui, sans-serif;
  --tabs: 66px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--text); }
body { font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

#app { position: fixed; inset: 0; overflow: clip; } /* never scrolled, not even to show a focused control */
.dev { --safe-t: calc(env(safe-area-inset-top, 0px) + 16px); }
.dev-banner { position: fixed; top: env(safe-area-inset-top, 0px); left: 50%; transform: translateX(-50%); z-index: 2000;
  background: #5a3a12; color: #ffd9a0; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  padding: 2px 10px; border-radius: 0 0 8px 8px; pointer-events: none; }

/* ---------------------------------------------------------------- views -- */
/* A screen's frame never scrolls — its own .scroll does. `clip`, not
   `hidden`: a hidden box can still be scrolled by the browser, to bring a
   focused control into view, and the whole screen then shifts. */
.view { position: absolute; inset: 0 0 calc(var(--tabs) + var(--safe-b)); display: flex; flex-direction: column; overflow: clip; }
.bar { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; min-height: 60px;
  padding: calc(10px + var(--safe-t)) 10px 8px 20px; }
.bar .title { flex: 1; min-width: 0; }
.bar h1 { margin: 0; font: 600 23px/1.15 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .sub { display: block; font-size: 12px; color: var(--text3); }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 16px 24px; overscroll-behavior: contain;
  scrollbar-width: none; touch-action: pan-y; }
.scroll::-webkit-scrollbar { display: none; }
.empty { text-align: center; color: var(--text3); padding: 56px 24px; font-size: 14px; line-height: 1.55; }
.empty b { display: block; color: var(--text2); font: 600 17px var(--serif); margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--text3); line-height: 1.5; margin: 12px 2px 0; }

/* The tab bar: --tabs is the room kept for it at the bottom. The scanner,
   the main action, sits raised in the middle. */
.tabs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; justify-content: space-around; align-items: flex-end;
  padding: 6px max(8px, calc((100% - 520px) / 2)) calc(6px + var(--safe-b)); background: linear-gradient(#1a1b2100, var(--void) 38%);
  transition: transform .4s cubic-bezier(.2, .9, .25, 1), opacity .3s; }
.tabs.away { transform: translateY(110%); opacity: 0; pointer-events: none; }
.tabs button { flex: 1; max-width: 88px; border: 0; background: none; color: #7a7f8e; display: flex; flex-direction: column; align-items: center;
  gap: 3px; font-size: 10.5px; font-weight: 500; padding: 6px 0 2px; }
.tabs button .i { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--text); }
.tabs .main i { width: 54px; height: 54px; margin-top: -18px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt);
  color: #f3f1ea; box-shadow: 0 10px 24px -10px #000, 0 0 0 5px var(--void); font-style: normal; }
.tabs .main .i { width: 26px; height: 26px; }

/* -------------------------------------------------------------- controls -- */
.icon-btn { border: 0; background: none; color: var(--text2); width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; position: relative; }
.icon-btn:hover { background: var(--raise); }
.badge { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: var(--raise2); color: var(--text2); font-size: 10px; line-height: 16px; font-weight: 600;
  box-shadow: 0 0 0 2px var(--void); }
.btn { border: 0; border-radius: 13px; min-height: 48px; padding: 12px 16px; background: var(--raise2); color: #dde0e8;
  font-weight: 500; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.key { background: var(--cobalt); color: #f2efe7; }
.btn.warn { background: var(--warn-bg); color: var(--warn); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.row-btns { display: flex; gap: 8px; }
.row-btns .btn { flex: 1; }
.pill { border: 0; border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 500; background: var(--raise2); color: var(--text); flex: none; }
.text-btn { border: 0; background: none; color: var(--cobalt-hi); font-weight: 500; padding: 10px; border-radius: 10px; }
.field { display: flex; align-items: center; gap: 10px; background: var(--raise); border-radius: 12px; min-height: 48px;
  padding: 0 12px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; }
.field label { font-size: 12px; color: var(--text3); min-width: 64px; }
.field input, .field select { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; font-size: 15px; color: var(--text); }
.field select { appearance: none; }
/* The whole field shows focus, along its own edge, not the input inside it. */
.field :is(input, select):focus-visible { outline: none; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--cobalt-hi); }
.field .prefix { font-size: 15px; color: var(--text3); margin-right: -10px; user-select: none; }
.field select option { background: var(--raise); }
/* A select that is the prefix of the field's input (a network before a name). */
.field select.net { flex: none; color: var(--text2); padding-right: 10px; border-right: 1px solid var(--line); }
/* «Saved», beside a group's heading, for a moment after each save. */
.saved-mark { margin-left: 8px; color: var(--cobalt-hi); opacity: 0; }
.saved-mark.on { animation: saved-mark 1.8s ease-out; }
@keyframes saved-mark { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
/* Without motion the mark simply stays, until the group is drawn again. */
@media (prefers-reduced-motion: reduce) { .saved-mark.on { opacity: 1; } }
.group { margin-top: 24px; }
.group h2 { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--text3); letter-spacing: .02em; }
.error { color: var(--warn); font-size: 13px; margin: 8px 2px 0; min-height: 1em; }

.toast { position: fixed; left: max(14px, calc((100% - 460px) / 2)); right: max(14px, calc((100% - 460px) / 2)); top: calc(64px + var(--safe-t)); z-index: 1500;
  display: flex; align-items: center; gap: 10px; background: #2e313b; border-radius: 13px; padding: 6px 6px 6px 16px;
  min-height: 48px; font-size: 14px; box-shadow: 0 14px 30px -12px #000; transition: opacity .2s, transform .2s; }
.toast[hidden] { display: flex !important; opacity: 0; transform: translateY(-12px); pointer-events: none; }
.toast span { flex: 1; }

/* ----------------------------------------------------------------- cards -- */
/* A card is a frame: art, then a caption. Sizes follow the frame's own width. */
.frame { container-type: inline-size; position: relative; --shade: var(--paper); --shade-ink: var(--ink); --shade-dim: var(--dim); }
.flip { position: relative; }
.face { backface-visibility: hidden; background: var(--shade); border-radius: 3px;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .35); }
.front { padding: 3.6cqw 3.6cqw 0; }
.art { aspect-ratio: 1; background: color-mix(in srgb, var(--shade) 88%, #000); overflow: hidden; }
.art canvas { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
/* An animated card, held still: a small "play" in its corner. */
.art { position: relative; }
.anim-mark { position: absolute; right: 5%; bottom: 5%; width: 9%; aspect-ratio: 1; min-width: 7px; border-radius: 50%;
  background: color-mix(in srgb, var(--shade) 85%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--shade-ink) 25%, transparent); }
.art.playing .anim-mark { opacity: 0; }
.anim-mark::after { content: ''; position: absolute; inset: 28% 24% 28% 36%; background: var(--shade-ink); opacity: .75;
  clip-path: polygon(0 0, 100% 50%, 0 100%); }
.cap { height: calc(19cqw + 10px); min-height: 34px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.cap b { font: 600 max(11px, 6.2cqw)/1.3 var(--serif); color: var(--shade-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap i { font-style: normal; font-size: max(10px, 4.6cqw); line-height: 1.35; color: var(--shade-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame.bare .cap { display: none; }
.frame.bare .front { padding-bottom: 3.6cqw; }

/* --------------------------------------------------------------- overlay -- */
.overlay { position: fixed; inset: 0; z-index: 500; background: var(--void); display: flex; flex-direction: column;
  animation: rise .25s cubic-bezier(.3, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.overlay .bar { padding-left: 8px; }
.seg { display: flex; background: var(--raise); border-radius: 11px; padding: 3px; box-shadow: inset 0 0 0 1px var(--line); width: 220px; margin: 0 auto; }
.seg button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px; font-size: 13px; font-weight: 500; color: var(--text3); }
.seg button[aria-pressed="true"] { background: var(--raise2); color: var(--text); }

.qr-box { width: fit-content; margin-inline: auto; background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 18px 36px -24px #000; }
.qr-box canvas { display: block; image-rendering: pixelated; }
.qr-note { font-size: 12.5px; color: var(--text2); text-align: center; }

/* -------------------------------------------------------------- receive --- */
.scanner { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 6px auto 0; border-radius: 22px; overflow: hidden;
  background: #121318; box-shadow: inset 0 0 0 1px var(--line); }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .corners { position: absolute; inset: 18%; border-radius: 14px; box-shadow: 0 0 0 2px rgba(109, 143, 214, .9); }
/* Off, the frame is the button that turns the camera on; on, the words stay
   under the picture, out of the way of the code. */
.scanner-start { position: absolute; inset: 0; border: 0; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; color: var(--cobalt-hi); font-size: 15px;
  padding: 0 calc(18% + 14px); } /* the words stay inside the corners */
.scanner-start small { color: var(--text3); font-size: 12.5px; line-height: 1.4; text-align: center; }
.scanner.live .scanner-start { display: none; }
.scanner-start svg { width: 36px; height: 36px; }
.scanner-start:active { background: #ffffff08; }
.scanner-start:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: -4px; border-radius: 22px; }
.scanner p { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; pointer-events: none;
  padding: 0 24px 4.5%; color: var(--text2); font-size: 13px; text-shadow: 0 1px 3px #000; }
.progress { height: 4px; border-radius: 4px; background: var(--raise2); overflow: hidden; margin: 12px auto 0; width: min(100%, 360px); }
.progress i { display: block; height: 100%; background: var(--cobalt-hi); width: 0; transition: width .2s; }

/* ------------------------------------------------------------------- me --- */
.idcard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.idcard canvas { width: 52px; height: 52px; border-radius: 10px; image-rendering: pixelated; }
.idcard b { display: block; font: 600 18px var(--serif); }
.idcard small { color: var(--text3); font-size: 12px; letter-spacing: .02em; }
.word-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: w; }
.word-grid > span { background: var(--raise); border-radius: 9px; padding: 8px 8px 8px 28px; position: relative; font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--line); user-select: text; -webkit-user-select: text; }
.word-grid > span::before { counter-increment: w; content: counter(w); position: absolute; left: 8px; color: var(--text3); font-size: 11px; top: 10px; }
/* The same grid, to type into: a numbered cell per word. */
.words-entry { list-style: none; margin: 0; padding: 0; }
/* The number sits on the word's baseline, as on the grid it was copied from. */
.words-entry li { min-width: 0; display: flex; align-items: baseline; gap: 6px; padding-left: 8px; border-radius: 9px;
  background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.words-entry li:focus-within { box-shadow: inset 0 0 0 2px var(--cobalt-hi); }
.words-entry li.bad { box-shadow: inset 0 0 0 2px var(--warn); }
.words-entry span { min-width: 14px; color: var(--text3); font-size: 11px; user-select: none; }
.words-entry input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 6px 8px 0; font: 14px var(--sans); color: var(--text); }
.words-entry input:focus-visible { outline: none; }

/* ------------------------------------------------------------ onboarding -- */
.onb { position: fixed; inset: 0; z-index: 500; background: var(--void); overflow-y: auto; padding: calc(40px + var(--safe-t)) 22px calc(28px + var(--safe-b)); display: flex; flex-direction: column; }
/* A long page scrolls; its parts never squeeze into each other. */
.onb > * { flex-shrink: 0; }
.onb h1 { font: 600 32px/1.1 var(--serif); margin: 0 0 12px; letter-spacing: -.015em; }
.onb p { color: var(--text2); margin: 0 0 14px; }
.onb .grow { flex: 1; }
.onb h2 { margin: 22px 0 8px; font-size: 12px; font-weight: 500; color: var(--text3); letter-spacing: .02em; }
.onb .seg { width: 100%; margin: 0 0 10px; }
.onb .hint { margin: 8px 2px 10px; }
.onb .seg + div > .hint { margin-top: 0; }
.onb .idcard canvas { width: 40px; height: 40px; border-radius: 8px; }
.onb .idcard b { font-size: 16px; overflow-wrap: anywhere; }
.onb .onb-status { min-height: 1.5em; margin: 10px 2px 14px; font-size: 13.5px; color: var(--text2); }
.onb .onb-status:has(.idcard) { margin: 12px 0 14px; color: var(--text); }
.onb .onb-status.wrong { color: var(--warn); }
.onb .onb-arrival { margin: 4px 0 0; padding: 12px 14px; border-radius: 13px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 14px; }
.onb .logo { width: 72px; height: 72px; image-rendering: pixelated; margin-bottom: 22px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text2); margin: 16px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--cobalt); margin: 1px 0 0; }

/* --------------------------------------------------------------- dialog -- */
.dialog { position: fixed; inset: 0; z-index: 1800; background: rgba(10, 11, 14, .66); display: flex; align-items: flex-end;
  padding: 14px 14px calc(14px + var(--safe-b)); animation: rise .2s ease; }
.dialog-box { width: 100%; max-width: 480px; margin: 0 auto; background: #24262e; border-radius: 18px; padding: 18px 16px 16px;
  box-shadow: 0 0 0 1px #30333c; }
.dialog-box p { margin: 2px 4px 16px; font-size: 15px; line-height: 1.5; color: var(--text); }
a.btn { text-decoration: none; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation: none !important; } }

/* A picture from a file (editor/picture.js): what the conversion did. */
/* A card that came without a name (another app, an old card). */
.cap b.untitled, h3.untitled { font-style: italic; font-weight: 500; opacity: .7; }
.import-original { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.import-original.dim { opacity: .45; }
.import-chip { position: absolute; top: -10px; right: -10px; background: var(--raise2); color: var(--text2); font-size: 11px;
  padding: 3px 8px; border-radius: 99px; box-shadow: 0 1px 4px #0006; pointer-events: none; }
/* Fixed room for the report or the reason, so the controls below never move. */
.import-status { min-height: calc(3 * 1.45em); font-size: 13px; line-height: 1.45; color: var(--text2); text-align: center; margin: 14px 4px 0; }
.import-status.bad { color: var(--warn); font-weight: 500; }
.import-extras:empty { display: none; }
.import-extras .check { margin: 10px 0; }
.field.attention { box-shadow: inset 0 0 0 2px var(--cobalt); }
.shades { display: flex; flex-wrap: wrap; gap: 8px; }
.shade { width: 34px; height: 34px; border-radius: 9px; border: 0; box-shadow: inset 0 0 0 1px #0003; }
.shade[aria-checked="true"] { box-shadow: 0 0 0 2px var(--void), 0 0 0 4px var(--cobalt); }

.hint.warn-text { color: var(--warn); }
/* A hint that leads into the controls under it, right below its heading. */
.hint.lead { margin: 0 2px 10px; }
/* dom.js shake(): "not like that". */
.shake { animation: shake .32s; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
/* Folded away at the end of Profile: a quiet line until opened. */
.dev-gate summary { cursor: pointer; list-style: none; font-size: 12px; font-weight: 500; color: var(--text3); letter-spacing: .02em; padding: 4px 0; }
.dev-gate summary::-webkit-details-marker { display: none; }
.dev-gate summary::after { content: ' ›'; }
.dev-gate[open] summary { margin-bottom: 8px; }
.dev-gate[open] summary::after { content: ''; }
.progress-wrap small { display: block; text-align: center; font-size: 12px; color: var(--text3); margin-top: 6px; }
.edition-panel { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.edition-panel .hint { margin: 0; }
.issued { display: flex; flex-direction: column; gap: 2px; }
.issued-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.issued-row b { min-width: 44px; font-weight: 600; }
.issued-row span { flex: 1; color: var(--text2); overflow: hidden; text-overflow: ellipsis; }
.issued-row small { color: var(--text3); }
.sheet-body { padding: 8px 16px calc(24px + var(--safe-b)); }
.sheet-foot { display: flex; flex-direction: column; gap: 10px; padding: 10px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); }
.sheet-foot:empty { display: none; }
.sheet-body:has(+ .sheet-foot:not(:empty)) { padding-bottom: 16px; }

/* The error journal: one entry a block, newest first. */
.journal-row { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.journal-row header { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--text3); }
.journal-row header b { font-weight: 600; color: var(--text2); }
.journal-row.is-error header b { color: var(--warn); }
.journal-row header time { margin-left: auto; white-space: nowrap; }
.journal-row p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.journal-row details, .journal-report { margin-top: 6px; font-size: 12.5px; color: var(--text3); }
.journal-report { margin: 0 0 6px; }
:is(.journal-row, .journal-report) summary { cursor: pointer; padding: 4px 0; }
:is(.journal-row, .journal-report) pre { margin: 4px 0 0; font: 11.5px/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2); user-select: text; -webkit-user-select: text; }
.secret:not(:empty) { margin-top: 12px; }
.secret .qr-box { margin-top: 4px; }
.paper-text { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--text3); }
.paper-text summary { cursor: pointer; display: inline-block; padding: 6px 10px; }
.paper-text code { display: block; margin-top: 6px; font: 12px/1.5 ui-monospace, monospace; color: var(--text2); overflow-wrap: anywhere; text-align: center; user-select: all; }
.field .field-btn { width: 40px; height: 40px; margin-right: -8px; color: var(--cobalt-hi); }

/* ------------------------------------------------------------ wide screens -- */
/* Forms and lists keep a phone's comfortable width, centred; buttons stay
   the size of what they say instead of crossing the screen. */
.view:not(.collection-view) > .scroll, .overlay > .scroll, .overlay > .sheet-foot, .onb {
  padding-left: max(16px, calc((100% - 560px) / 2)); padding-right: max(16px, calc((100% - 560px) / 2)); }
.view:not(.collection-view, .ed-view) > .bar, .overlay > .bar {
  padding-left: max(20px, calc((100% - 560px) / 2 + 4px)); padding-right: max(10px, calc((100% - 560px) / 2 - 6px)); }

/* The app cannot go on with the data as it is (store.js): over everything. */
.halt { position: fixed; inset: 0; z-index: 450; /* under the journal, if opened from here */ background: var(--void); display: flex; align-items: center; justify-content: center; padding: 24px; }
.halt > div { max-width: 360px; }
.halt h1 { margin: 0 0 10px; font: 600 24px/1.2 var(--serif); }
.halt p { color: var(--text2); line-height: 1.5; margin: 0 0 20px; }

/* ---------------------------------------------------------------- give --- */
/* ui/give.js: the chosen card on its paper, with its code; the row of
   one's cards below, the chosen one lifted. */
.give-scroll { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.give-paper { --shade: var(--paper); --shade-ink: var(--ink); --shade-dim: var(--dim);
  width: min(100%, 380px); background: var(--shade); color: var(--shade-ink); border-radius: 6px; padding: 16px 14px 14px;
  box-shadow: 0 30px 50px -26px #000; }
.paper-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.give-deck-box { flex: none; }
.give-deck-head { display: flex; justify-content: space-between; padding: 6px 20px 0; font-size: 12px; font-weight: 500; color: var(--text3); }
.give-deck { display: flex; gap: 14px; align-items: flex-end; overflow-x: auto; scrollbar-width: none; padding: 16px 20px 26px; } /* clear of the raised scan button */
.give-deck::-webkit-scrollbar { display: none; }
.give-mini { flex: none; width: 76px; height: 76px; padding: 6px; border: 0; border-radius: 3px; background: var(--shade, var(--paper));
  opacity: .82; box-shadow: 0 8px 12px -9px #000; transition: transform .25s cubic-bezier(.2, .9, .25, 1), box-shadow .25s, opacity .25s; }
.give-mini canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.give-mini[aria-pressed="true"] { opacity: 1; transform: translateY(-10px); box-shadow: 0 16px 20px -12px #000, 0 0 0 2px var(--cobalt-hi); }
.give-mini.add { background: none; opacity: 1; box-shadow: inset 0 0 0 1px var(--line); color: var(--text2); display: grid; place-items: center; }
