/* Mor · Kök/Ek. Purple = field, key and roots. Tea (tavşan kanı) only on suffixes. Radius 0 except the round speak key.
   Margins 20 left / 28 right. Fonts: Host Grotesk (target language), Brygada 1918 (learner language). */
:root{
  --bg:#F4EFF5; --s1:#EAE1EC; --line:#D6C8D9; --fg:#2B1230; --mut:#6A5370;
  --pu:#5B2A6E; --keyfg:#FFFFFF; --sx:#9A4A1C; --dim:#857089; --err:#2B1230;
  --tr:"Host Grotesk",system-ui,sans-serif;
  --ui:"Brygada 1918",Georgia,serif;
  --ease:cubic-bezier(.23,1,.32,1);
  --click:linear(0, 0.008 1.2%, 0.029 2.5%, 0.06 3.8%, 0.11 5.2%, 0.158 6.5%, 0.221 8%, 0.47 13.5%, 0.577 16%, 0.683 18.8%, 0.775 21.5%, 0.844 24%, 0.905 26.8%, 0.952 29.5%, 0.989 32.5%, 1.011 35%, 1.026 37.8%, 1.035 40.8%, 1.038 44%, 1.035 49%, 1.012 63.2%, 1.003 72.2%, 0.999 84%, 1);
  --gl:20px; --gr:28px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#1C0F1E;--s1:#28182B;--line:#432F47;--fg:#F2E9F1;--mut:#B7A2BA;--pu:#D3A9E2;--keyfg:#1C0F1E;--sx:#F2A24A;--dim:#8A7590;--err:#F2E9F1;color-scheme:dark}}
:root[data-theme="dark"]{--bg:#1C0F1E;--s1:#28182B;--line:#432F47;--fg:#F2E9F1;--mut:#B7A2BA;--pu:#D3A9E2;--keyfg:#1C0F1E;--sx:#F2A24A;--dim:#8A7590;--err:#F2E9F1;color-scheme:dark}

/* ---------- craft: the scales (audit/10-design-review/craft-audit.md §7). Use these on new and reworked screens. ---------- */
:root{
  /* Type, daily app: one size (+ line-height) per role. Each step absorbs its 1-px neighbours (11–13, 14–15, 16–17…). */
  --t-cap:13px;     --t-cap-lh:1.3;      /* glosses, badges, counters, review intervals, .who, days: the floor */
  --t-small:15px;   --t-small-lh:1.4;    /* hint, small, label, link, chips, top bar, nav, captions */
  --t-body:17px;    --t-body-lh:1.5;     /* body, verdict, ghost rows, key label, events */
  --t-lead:19px;    --t-lead-lh:1.4;     /* lead, a phrase in a list, answers, role-play lines */
  --t-input:20px;                        /* every single-line form field (name, date, passcode, notebook edits) */
  --t-title:22px;   --t-title-lh:1.2;    /* .sect, .prompt, "say it today" (one size on both screens) */
  --t-field:24px;   --t-field-lh:1.3;    /* answer field, .phrase.small, .say.q, .tl-skel, .stack .w */
  --t-cue:clamp(26px,7.6vw,30px);      --t-cue-lh:1.25;     /* .said, .chip, .prompt.cue, .tl-out, .reveal-big */
  --t-h2:30px;      --t-h2-lh:1.12;
  --t-phrase:clamp(28px,8.6vw,36px);   --t-phrase-lh:1.18;
  --t-display:clamp(46px,14vw,58px);   --t-display-lh:1.02; /* .big */
  /* Type, the table: must-read text is at least 22, meta 18. */
  --d-meta:18px;    --d-meta-lh:1.35;    /* step label, half name, links, floor bar, the line under everything */
  --d-read:22px;    --d-read-lh:1.35;    /* .d-sub, .d-lab, .d-rule, .d-chip, .d-go-l, glosses, help */
  --d-row:26px;     --d-row-lh:1.2;      /* choices, rows, small phrases, venue */
  --d-phrase:clamp(28px,8.2vw,34px);   --d-phrase-lh:1.18;  /* .d-t and its variants, one weight (650) */
  --d-main:clamp(36px,10.4vw,44px);    --d-main-lh:1.12;
  --d-word:clamp(44px,13vw,56px);      --d-word-lh:1.05;    /* rest word, end title, .d-t.big */
  --d-show:clamp(56px,17vw,84px);      --d-show-lh:1.02;
  /* Weights: Host Grotesk 380 (endings) / 500 (UI text set in the target language) / 650 (phrases, roots); Brygada 400 / 600. */
  --w-end:380; --w-tr:500; --w-phrase:650; --w-bold:600;
  /* Spacing: inside a component 4 / 8 / 12; between blocks 16 / 24; before a section 32; screen top to a display word 48. */
  /* (no --s1 here: that name is the surface colour token; a 2px step would overwrite it in light mode with "Kolory płyną" off) */
  --s2:4px; --s3:8px; --s4:12px; --s5:16px; --s6:24px; --s7:32px; --s8:48px;
  /* Control sizes: the smallest touch target, the bar key, the round key. Disabled controls: one opacity. */
  --hit:44px; --key-h:60px; --key-round:72px; --off:.45;
  /* Motion: the same curves as curves.js, so CSS (view transitions, transitions) speaks the JS's grammar.
     Springs only on transform and clip-path; opacity and colour on --ease; every exit on --exit. */
  --snappy:linear(0, 0.004 1%, 0.02 2.2%, 0.044 3.5%, 0.082 5%, 0.158 7.5%, 0.363 13.5%, 0.46 16.5%, 0.555 19.8%, 0.637 23%, 0.707 26.2%, 0.77 29.8%, 0.82 33.2%, 0.863 37%, 0.902 41.5%, 0.931 46.2%, 0.955 51.7%, 0.973 58%, 0.984 65%, 0.992 73.2%, 1);
  --gentle:linear(0, 0.005 1.2%, 0.023 2.8%, 0.052 4.2%, 0.088 5.8%, 0.175 8.8%, 0.396 15.5%, 0.497 18.8%, 0.588 22%, 0.668 25.2%, 0.736 28.5%, 0.793 31.8%, 0.844 35.2%, 0.886 39%, 0.923 43.2%, 0.95 47.8%, 0.972 53%, 0.986 58.8%, 0.995 65.2%, 1 73.2%, 1);
  --exit:cubic-bezier(.4,0,1,1);
}
@supports not (transition-timing-function:linear(0, 1)){:root{--snappy:cubic-bezier(.2,.9,.25,1);--gentle:cubic-bezier(.25,.85,.3,1)}}
/* ---------- end of the scales ---------- */

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:400 var(--t-body)/var(--t-body-lh) var(--ui);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
:lang(tr){font-variant-ligatures:no-common-ligatures}
button,input,textarea,select{font:inherit;color:inherit}
a{color:inherit}
:focus-visible{outline:2px solid var(--pu);outline-offset:3px}
/* A container focused by script (a sheet opening) is not a control: no ring around it. */
[tabindex="-1"]:focus{outline:none}
[hidden]{display:none!important}

#app{min-height:100%;max-width:560px;margin:0 auto;position:relative}
.screen{min-height:100svh;display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top,0px) + 14px) max(var(--gr),env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 24px) max(var(--gl),env(safe-area-inset-left,0px))}
.screen.with-nav{padding-bottom:calc(env(safe-area-inset-bottom,0px) + 84px)}
.top{display:flex;justify-content:space-between;align-items:center;min-height:28px;font-size:var(--t-small);color:var(--mut);gap:var(--s4)}
.top .r{font-family:var(--tr);font-weight:500;font-size:var(--t-cap)}
.close{all:unset;cursor:pointer;width:var(--hit);height:var(--hit);display:grid;place-items:center;margin:-8px 0 -8px -12px;font-size:22px;color:var(--mut)}
.spacer{flex:1;min-height:var(--s4)}
.mut{color:var(--mut)}
.small{font-size:var(--t-small)}

/* type */
.t{font-family:var(--tr);font-weight:650;letter-spacing:-.015em}
.big{font-family:var(--tr);font-weight:650;font-size:var(--t-display);line-height:var(--t-display-lh);letter-spacing:-.03em;margin:44px 0 0;display:flex;flex-wrap:wrap}
.h2{font-family:var(--tr);font-weight:650;font-size:var(--t-h2);line-height:var(--t-h2-lh);letter-spacing:-.02em;margin:0}
.lead{font-size:var(--t-lead);line-height:var(--t-lead-lh);margin:20px 0 0;max-width:30ch}
.label{font-size:var(--t-small);color:var(--mut);margin:18px 0 0}
.prompt{font-size:var(--t-title);line-height:1.3;margin:var(--s3) 0 0;font-weight:400}
.hint{font-size:var(--t-small);color:var(--mut);margin:var(--s3) 0 0;max-width:34ch}
.sx{color:var(--sx)}

/* the suffix-aware phrase */
.phrase{position:relative;font-family:var(--tr);font-weight:650;font-size:clamp(28px,8.6vw,36px);line-height:1.18;letter-spacing:-.015em;margin:32px 0 0;display:flex;flex-wrap:wrap;align-items:flex-start;column-gap:.28em;row-gap:10px}
.phrase .w{display:inline-flex;align-items:flex-start;white-space:nowrap}
.phrase .m{display:inline-block;position:relative}
.phrase .m b{font-weight:inherit}
.phrase.split .m.sfx b{color:var(--sx);font-weight:380}
.phrase .m i{position:absolute;left:0;top:calc(100% + 5px);font:400 13px/1.15 var(--ui);color:var(--mut);opacity:0;font-style:normal;white-space:nowrap;pointer-events:none}
.phrase .m[data-row="1"] i{top:calc(100% + 21px)}
.phrase .m[data-row="2"] i{top:calc(100% + 37px)}
.phrase.split{row-gap:calc(16px + var(--gloss-rows,1) * 16px);padding-bottom:calc(8px + var(--gloss-rows,1) * 16px)}
.phrase.split .m i{opacity:1}
.phrase .dot{color:var(--dim);display:inline-block;width:0;overflow:hidden;opacity:0;text-align:center;font-weight:400}
/* Split: the seam inside a word is narrower than the gap between words, so words stay words. */
.phrase.split{column-gap:.85em}
.phrase.split .dot{width:.3em;opacity:1}
.phrase .p{display:inline-block}
.phrase.small{font-size:24px;margin-top:18px}
.badge{display:inline-block;align-self:flex-start;font:500 var(--t-cap)/1 var(--tr);letter-spacing:.01em;color:var(--mut);border:1px solid var(--line);padding:5px 7px;margin-top:14px}
.badge.uncertain{color:var(--fg);border-color:var(--mut)}

/* buttons */
.key{all:unset;box-sizing:border-box;cursor:pointer;height:var(--key-h);width:100%;background:var(--pu);color:var(--keyfg);display:grid;place-items:center;font:600 var(--t-body)/1 var(--tr);position:relative;overflow:hidden;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.key{transition:transform 80ms var(--ease),filter 80ms var(--ease)}
.key:not([disabled]):active{transform:translateY(1px) scale(.99);filter:brightness(.92)}
@media (hover:hover){.key:not([disabled]):hover{filter:brightness(1.06)}}
.key[disabled]{opacity:var(--off);cursor:default}
.key > span{grid-area:1/1}
.key.round{width:var(--key-round);height:var(--key-round);border-radius:36px;align-self:center}
.key .mic{display:block;width:13px;height:22px;border-radius:7px;background:var(--keyfg)}
.key.hold{box-shadow:0 0 0 3px var(--bg),0 0 0 5px var(--pu)}
.ghost{all:unset;box-sizing:border-box;cursor:pointer;min-height:var(--s8);padding:10px 0;font-size:var(--t-body);color:var(--fg);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:var(--s4)}
.ghost:hover{border-color:var(--pu)}
.link{all:unset;cursor:pointer;color:var(--mut);font-size:var(--t-small);padding:var(--s4) 0;min-height:24px;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px}
.row{display:flex;gap:var(--s4);align-items:center}
.row.split{justify-content:space-between}
.dock{display:flex;flex-direction:column;gap:var(--s4);margin-top:20px}
.dock.sticky{position:sticky;bottom:0;background:var(--bg);padding:var(--s3) 0 calc(env(safe-area-inset-bottom,0px) + 6px);margin-bottom:calc(-1 * (env(safe-area-inset-bottom,0px) + var(--s6)))}
.dock .cap{text-align:center;font-size:var(--t-small);color:var(--mut);min-height:20px}

/* rating */
.rate{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:22px}
.rate button{all:unset;cursor:pointer;text-align:center;padding:12px 0;font-size:15px;color:var(--mut);border-bottom:2px solid transparent;min-height:24px}
.rate button.pick{color:var(--fg);border-color:var(--pu)}
.rate button small{display:block;font:400 11px/1.2 var(--tr);color:var(--mut);margin-top:2px}

/* voice bars */
.bars{display:flex;align-items:center;justify-content:center;gap:4px;height:44px}
.bars i{width:3px;height:40px;border-radius:2px;background:var(--pu);transform:scaleY(.08);transform-origin:center;opacity:.3;transition:opacity .2s var(--ease)}
.key.hold ~ .bars i,.dock:has(.key.hold) .bars i{opacity:1}

/* inputs */
.field{width:100%;background:transparent;border:0;border-bottom:1.5px solid var(--mut);padding:var(--s4) 0;font:600 var(--t-field)/var(--t-field-lh) var(--tr);color:var(--fg);border-radius:0;outline:none}
/* Focus: the line thickens (3 px) as well as changing colour, so it shows even where the two colours are close. */
.field:focus{border-color:var(--pu);box-shadow:0 1.5px 0 var(--pu)}
::placeholder{color:var(--mut);opacity:.85}
select{appearance:none;-webkit-appearance:none;border:0;border-bottom:1.5px solid var(--mut);border-radius:0;background:transparent;background-image:linear-gradient(45deg,transparent 50%,var(--mut) 50%),linear-gradient(135deg,var(--mut) 50%,transparent 50%);background-repeat:no-repeat;background-position:right 9px center,right 4px center;background-size:5px 5px,5px 5px;padding:10px 18px 10px 0;min-height:var(--hit)}
textarea.field{font:400 var(--t-lead)/1.45 var(--ui);resize:none;min-height:84px}
.letters{display:flex;gap:var(--s2);margin-top:10px}
.letters button{all:unset;cursor:pointer;flex:1;text-align:center;font:600 var(--t-lead)/1 var(--tr);padding:13px 0;min-height:18px;background:var(--s1)}
.letters button:active{background:var(--line)}
.seg{display:flex;gap:18px;border-bottom:1px solid var(--line);margin-top:14px}
.seg button{all:unset;cursor:pointer;padding:10px 0;font-size:var(--t-small);color:var(--mut);border-bottom:2px solid transparent;margin-bottom:-1px}
.seg button.on{color:var(--fg);border-color:var(--pu)}

/* feedback */
.verdict{font-size:16px;margin-top:16px;max-width:34ch}
.verdict b{font-family:var(--tr);font-weight:600}
.verdict.ok{color:var(--pu)} .verdict.almost{color:var(--fg)} .verdict.bad{color:var(--fg)}
.verdict.bad b{text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:var(--mut);text-underline-offset:5px}
.heard{font-size:15px;color:var(--mut);margin-top:10px}
.heard b{font-family:var(--tr);font-weight:500;color:var(--fg)}

/* lists */
.list{display:flex;flex-direction:column;margin-top:14px}
.list .it{display:grid;grid-template-columns:1fr auto;gap:10px;padding:var(--s4) 0;border-top:1px solid var(--line);align-items:baseline}
.list .it:last-child{border-bottom:1px solid var(--line)}
.list .it .tt{font-family:var(--tr);font-weight:600;font-size:var(--t-lead)}
.list .it .bb{font-size:var(--t-small);color:var(--mut)}
.list .it .d{font:500 var(--t-cap)/1 var(--tr);color:var(--mut);white-space:nowrap}
.sect{font-family:var(--tr);font-weight:650;font-size:var(--t-title);line-height:var(--t-title-lh);margin:34px 0 0;letter-spacing:-.01em}

/* role-play script */
.script{display:flex;flex-direction:column;gap:14px;margin-top:18px}
.ln{font-family:var(--tr);font-weight:500;font-size:20px;line-height:1.32;margin:0}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.chips button{all:unset;cursor:pointer;font:500 var(--t-small)/1.2 var(--tr);padding:10px var(--s4);min-height:24px;background:var(--s1)}
.chips button:active{background:var(--line)}
.ln .who{display:block;font:400 13px/1.3 var(--ui);color:var(--mut);margin-bottom:3px}
.ln.me{padding-left:26px}
.ln.old{color:var(--mut)}
.ln .tr-base{display:block;font:400 14px/1.35 var(--ui);color:var(--mut);margin-top:4px}
.kw{position:relative;display:inline-block;color:var(--mut);transition:color 80ms linear}
.kw.lit{color:var(--fg)}
.kw u{position:absolute;left:0;right:0;bottom:-3px;height:2px;background:var(--pu);transform-origin:left;transform:scaleX(0);text-decoration:none}
.fn{display:inline-block;width:6px;height:6px;border-radius:0;background:var(--pu);margin-left:6px;vertical-align:4px}
.nudge{font:400 14px/1.4 var(--ui);color:var(--pu);padding-left:26px}
.thinking{font-size:20px;letter-spacing:.2em;color:var(--mut)}

/* debrief gap */
.said{font-family:var(--tr);font-weight:650;font-size:clamp(26px,7.6vw,31px);line-height:1.25;letter-spacing:-.01em;margin-top:26px;position:relative}
.said .gap{display:inline-block;min-width:1.4em;border-bottom:2px solid var(--pu);color:var(--sx);font-weight:380;text-align:center}
.said .gap.filled{border-color:transparent;min-width:0;text-align:left}
.chip{position:absolute;left:0;top:0;font-family:var(--tr);font-weight:380;font-size:clamp(26px,7.6vw,31px);line-height:1.25;color:var(--sx);pointer-events:none;white-space:pre;opacity:0}
.ek{color:var(--sx);font-weight:380}

/* path */
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--s2);margin-top:var(--s4)}
.days span{height:36px;display:grid;place-items:center;font:500 var(--t-cap)/1 var(--tr);color:var(--mut);border-bottom:2px solid var(--line)}
.days span.done{color:var(--fg);border-color:var(--pu)}
.days span.now{color:var(--fg);border-color:var(--pu);border-bottom-width:4px;font-weight:650}
.rhythm{display:flex;gap:6px;margin-top:10px}
.rhythm i{width:10px;height:10px;background:var(--line)}
.rhythm i.on{background:var(--pu)}

/* sheet (decoder) */
.scrim{position:fixed;inset:0;background:rgba(20,6,24,.38);z-index:20}
:root[data-theme="dark"] .scrim{background:rgba(0,0,0,.55)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .scrim{background:rgba(0,0,0,.55)}}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:21;background:var(--bg);border-top:1px solid var(--line);max-width:560px;margin:0 auto;padding:18px var(--gr) calc(env(safe-area-inset-bottom,0px) + 22px) var(--gl);max-height:82svh;overflow:auto}

/* nav */
.nav{position:fixed;left:0;right:0;bottom:0;z-index:10;max-width:560px;margin:0 auto;display:flex;justify-content:space-around;background:var(--bg);border-top:1px solid var(--line);padding:var(--s3) 0 calc(env(safe-area-inset-bottom,0px) + var(--s3))}
.nav a{text-decoration:none;font:500 var(--t-small)/1 var(--tr);color:var(--mut);padding:15px 10px;min-width:var(--hit);text-align:center}
.nav a{position:relative}
.nav a.on{color:var(--fg)}
.nav a.on::before{content:"";position:absolute;left:50%;top:2px;width:22px;height:2px;margin-left:-11px;background:var(--pu)}
.toast{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 90px);transform:translateX(-50%);background:var(--fg);color:var(--bg);padding:var(--s4) var(--s5);font-size:var(--t-small);z-index:30;max-width:calc(100% - 40px)}
.err{color:var(--fg);font-size:var(--t-small);margin-top:var(--s4);font-weight:600}

@media (prefers-reduced-motion: reduce){*{scroll-behavior:auto!important}}

/* Płynie: the river behind Today, and as the head of Path. Colours themselves drift via flow.js (time of day, season). */
.screen.layered{position:relative;isolation:isolate}
.screen.layered > *:not(.river-bg){position:relative;z-index:1}
.river-bg{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.river-head{display:block;width:100%;height:120px;margin-top:14px}
html.drift,html.drift body,html.drift .nav,html.drift .sheet,html.drift .dock.sticky{transition:background-color 60s linear}

/* Visible keyboard focus: the all:unset buttons lose the UA outline, so give it back. */
:is(.key,.link,.ghost,.close,.rate button,.letters button,.seg button,.chips button,.nav a,.nav button):focus-visible{outline:2px solid var(--pu);outline-offset:3px}
#app .key:focus-visible{outline-color:var(--fg)}
/* Settings checkboxes in the Mor palette, finger-sized. */
input[type=checkbox]{appearance:none;-webkit-appearance:none;width:22px;height:22px;margin:0;flex:none;border:1.5px solid var(--mut);border-radius:0;background:transparent;display:inline-grid;place-content:center;cursor:pointer}
input[type=checkbox]::before{content:"";width:12px;height:12px;background:var(--pu);transform:scale(0);transition:transform 120ms var(--ease)}
input[type=checkbox]:checked{border-color:var(--pu)}
input[type=checkbox]:checked::before{transform:scale(1)}

/* Razem / Birlikte */
.river-head.duo{height:64px;margin-top:4px}
.duo-rhythm{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:14px;row-gap:2px;margin-top:6px}
.duo-rhythm .rhythm{margin-top:4px}
.cheer-in{margin-top:18px;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
/* Razem */
.tog-what{margin:14px 0 0;padding-left:18px;list-style:square;font-size:15px;line-height:1.45;color:var(--mut)}
.tog-what li{margin:0 0 8px}
.say{all:unset;cursor:pointer;font:600 20px/1.3 var(--tr);color:var(--fg)}
.say.q{font-size:24px;margin-top:10px;display:block}
.say:focus-visible{outline:2px solid var(--pu);outline-offset:3px}
.field.answer{font-size:var(--t-input);resize:none;min-height:64px;margin-top:14px}
.field.small{font-size:var(--t-body);padding:var(--s3) 0}
.check{display:flex;gap:10px;align-items:flex-start;margin-top:14px;font-size:var(--t-small);color:var(--mut);cursor:pointer}
.check input{width:20px;height:20px;margin:1px 0 0;accent-color:var(--pu);flex:none}
.ans{margin-top:18px}
.ans-t{font:600 19px/1.4 var(--tr);margin:4px 0 0;white-space:pre-wrap}
.whisper,.whisper-in{margin-top:10px;padding:10px 12px;background:var(--s1)}
.whisper .ans-t{font-size:17px}
.it.ex{grid-template-columns:1fr}
.ex-act{display:flex;flex-wrap:wrap;gap:4px 20px;align-items:center}
.rec{display:flex;gap:16px;align-items:center}
.rec .meter{width:72px;height:6px;background:var(--line);overflow:hidden}
.rec .meter i{display:block;height:100%;background:var(--pu);transform-origin:left;transform:scaleX(.06)}
.link.strong{color:var(--fg);font-weight:600}
.link.rec-on{color:var(--fg);font-weight:600}
.small.ok{color:var(--pu)}
.jar-form{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.jar-form .link{align-self:flex-start}
.hist{padding:14px 0;border-top:1px solid var(--line)}
.hist .ans-t{font-size:17px}
.inbox{margin-top:22px;border:0}
.ev{display:block;margin:0 0 8px;padding:0;border:0;font-size:16px;line-height:1.4}
.ev .say{font-size:17px}
.ev .link{padding:0}
.chips.ask button{background:transparent;box-shadow:inset 0 0 0 1px var(--line);color:var(--mut)}

/* Tamam.: the session closes with the background dimming slightly for a moment */
@keyframes mor-dim{0%,100%{filter:none}40%{filter:brightness(var(--dim-to,.97))}}
:root[data-theme="dark"]{--dim-to:.9}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--dim-to:.9}}
html.closing #app{animation:mor-dim 1.2s var(--ease)}
@media (prefers-reduced-motion: reduce){html.closing #app{animation:none}}
/* screen-reader-only text (a phrase is read as one sentence) */
.sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* toggle chips: the choice is a state, not an outline added by hand */
.chips button.on{box-shadow:inset 0 0 0 2px var(--pu)}
/* finger-sized letter keys: every letter visible (two rows when needed), never below 44 px */
.fold summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:baseline;min-height:44px}
.fold summary::-webkit-details-marker{display:none}
.fold summary::after{content:"+";font:400 20px/1 var(--tr);color:var(--mut)}
.fold[open] summary::after{content:"–"}

.dock .dock{margin-top:0}
.letters{display:grid;grid-template-columns:repeat(var(--cols,7),minmax(0,1fr));gap:4px}
.letters button{min-width:44px}
.letters .shift{flex:0 0 44px;color:var(--mut)}
.letters .shift.on{color:var(--fg);box-shadow:inset 0 -2px 0 var(--pu)}
/* fonts follow the language of the field: the target language in Host Grotesk, everything else in Brygada */
.field{font-family:var(--ui);font-weight:400}

.prompt.cue{font-size:clamp(26px,7.4vw,30px);line-height:1.25;font-weight:500;margin-top:14px}
.partner-line{display:block;margin-top:6px;color:var(--fg);text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px;white-space:pre-line}
.pairs .it{border-top:0}
.pairs .it .ghost{border-bottom:1px solid var(--line)}
.pairs .it{column-gap:24px}
.whisper u.ins{text-decoration:underline;text-decoration-color:var(--pu);text-decoration-thickness:1.5px;text-underline-offset:.28em;text-decoration-skip-ink:auto}
.heard .model{font-family:var(--tr);font-weight:600;color:var(--fg)}
.heard u.miss{text-decoration:underline;text-decoration-color:var(--pu);text-decoration-thickness:1.5px;text-underline-offset:.28em;text-decoration-skip-ink:auto}
/* Font = language. Every element takes the font of its own language (the nearest `lang`, via :lang()):
   the language being learned in Host Grotesk, everything else (the interface, translations, glosses) in Brygada.
   !important because this rule is the identity: no component class may override it. */
:root[data-target="tr"] body :lang(tr),:root[data-target="pl"] body :lang(pl){font-family:var(--tr)!important}
:root[data-target="tr"] body :lang(pl),:root[data-target="pl"] body :lang(tr){font-family:var(--ui)!important}
::placeholder{font-family:var(--ui)!important;font-weight:400}
.phrase .m.buf b{color:var(--dim);font-weight:380}
.phrase .m.buf i{display:none}
/* a gloss pushed below another starts with a hairline tick: its left edge is its anchor */
.phrase .m[data-row="1"] i,.phrase .m[data-row="2"] i{border-left:1px solid var(--dim);padding-left:3px}
.ghost:focus-visible{outline-offset:-2px}
.bars i{border-radius:0}
.key .mic{border-radius:0;width:10px;height:15px;position:relative;margin-bottom:7px}
/* A stand under the capsule (stem + base): reads as a microphone, not as a stop square. */
.key .mic::before{content:"";position:absolute;left:4px;top:15px;width:2px;height:5px;background:var(--keyfg)}
.key .mic::after{content:"";position:absolute;left:-3px;top:19px;width:16px;height:2px;background:var(--keyfg)}
.key{transition:transform 680ms var(--click),filter 120ms var(--ease)}
.key:not([disabled]):active{transition-duration:80ms}
.partner-line .cheer-t{color:var(--fg)}
:root[data-target="tr"] .answer:lang(tr)::placeholder,:root[data-target="pl"] .answer:lang(pl)::placeholder{font-family:var(--tr)!important}

/* ---------- wt/front: phones, motion fallbacks, craft (audit 01, research 24/27) ---------- */
/* The big word fits one line (sized by its length, --chars, set by the view): its full stop never sits alone. */
.big[style*="--chars"]{font-size:clamp(34px,min(14vw,calc((min(100vw,560px) - 48px) / (var(--chars) * .6))),58px);flex-wrap:nowrap;align-items:last baseline}
/* Today's river lives in the free space between the words and the key: it never runs through text. */
.river-slot{position:relative;min-height:56px}
.river-slot-c{position:absolute;left:0;top:50%;width:100%;height:min(100%,150px);transform:translateY(-50%);pointer-events:none;display:block}
/* First frame (index.html) before anything loads: the mark on the background, as on the iPhone start image. */
.boot{align-items:center;justify-content:center}
.boot svg{width:160px;height:160px;position:fixed;left:50%;top:50%;margin:-80px 0 0 -80px}
.boot .stem{fill:var(--pu)} .boot .seam{fill:var(--sx)}
/* Bottom sheet: a grab strip (drag down to close) */
.grab{height:22px;margin:-12px 0 4px;display:grid;place-items:center;touch-action:none;cursor:grab}
.grab::before{content:"";width:36px;height:3px;background:var(--line)}
/* The vowel-harmony wire under a word (Turkish pattern screens, with the full Ek tık only) */
.list .it{position:relative}
.harm{position:absolute;height:2px;background:var(--pu);transform-origin:left;transform:scaleX(0);pointer-events:none}
/* Hold-to-talk: the browser never takes the touch over for panning (a held key is never cancelled by a scroll) */
.key.round{touch-action:none}
/* Checking an answer: the dock says so, and keeps its place */
.cap.checking{text-align:center;font-size:var(--t-small);color:var(--mut);min-height:var(--key-h);display:grid;place-items:center;margin:0}
/* Path: days can be tapped */
.days button{all:unset;cursor:pointer;height:36px;display:grid;place-items:center;font:500 var(--t-cap)/1 var(--tr);color:var(--mut);border-bottom:2px solid var(--line)}
.days button.done{color:var(--fg);border-color:var(--pu)}
.days button.now{color:var(--fg);border-color:var(--pu);border-bottom-width:4px;font-weight:650}
.days button.pick{background:var(--s1);color:var(--fg)}
.days button:focus-visible{outline:2px solid var(--pu);outline-offset:-2px}
.install-hint{margin:10px 0 0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.install-hint .link{font-size:var(--t-small)}
.partner-line .first{color:var(--fg);font-weight:600}
/* Keyboard open (pwa.js): the nav steps aside and a screen fits what is visible, so the dock sits above the keys. */
html.kb .nav{display:none}
html.kb .screen{min-height:var(--vvh,100svh);padding-bottom:12px}
html.kb .toast{bottom:12px}
/* Browsers without CSS linear() (Safari before 17.2): the click spring becomes a near cubic-bezier. */
@supports not (transition-timing-function:linear(0, 1)){:root{--click:cubic-bezier(.3,1.35,.5,1)}}
/* View transitions (where supported): a phrase travels between screens, the rest cross-fades quickly. */
::view-transition-old(root),::view-transition-new(root){animation-duration:200ms;animation-timing-function:var(--ease)}
::view-transition-group(mor-phrase),::view-transition-group(mor-say){animation-duration:460ms;animation-timing-function:var(--snappy)}
::view-transition-new(mor-sheet){animation:mor-sheet-in 460ms var(--snappy) both}
@keyframes mor-sheet-in{from{transform:translateY(100%)}}
@media (prefers-reduced-motion: reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}
/* Tłumacz / Çevirmen (web/js/translator.js): a taller sheet, the answer large, one line under it. */
.sheet.tl{max-height:92svh;display:flex;flex-direction:column}
.tl-head{display:flex;justify-content:space-between;align-items:center;min-height:44px}
.tl-head .close{margin:-8px -14px -8px 0}
.tl-dir{align-self:flex-start;display:inline-flex;align-items:baseline;gap:0;margin-top:6px;color:var(--fg);text-decoration:none}
.tl-dir .arr{color:var(--mut);white-space:pre}
.tl-dir .swap{color:var(--mut);margin-left:12px;font-size:17px}
.sheet.tl .chips{align-items:center;margin-top:4px}
.sheet.tl .chips .tl-lab{margin-right:4px}
.sheet.tl textarea.field{min-height:64px;margin-top:10px}
.tl-out{font-weight:650;font-size:clamp(26px,7.6vw,32px);line-height:1.22;letter-spacing:-.015em;margin:14px 0 0;overflow-wrap:anywhere}
.tl-ans{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);display:flex;flex-direction:column}
.tl-ans .badge{margin-top:0}
.tl-line{max-width:none}
.tl-acts{flex-wrap:wrap;column-gap:22px;row-gap:0;margin-top:6px}
.tl-alts{margin-top:10px}
.tl-q{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.tl-q .prompt{margin:0}
.tl-opts{display:flex;flex-direction:column;margin-top:10px}
.tl-opts .ghost .t{font-size:20px}
.tl-try{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.tl-try .label:first-child{margin-top:0}
.tl-skel{font-weight:600;font-size:24px;line-height:1.35;margin:6px 0 0;letter-spacing:.01em}
.tl-asks{border-bottom:1px solid var(--line);margin-bottom:6px}.link[disabled]{text-decoration:none;cursor:default}
/* While a sheet is open, a message shows at the top instead of covering the sheet's key. */
body:has(> .sheet) .toast{bottom:auto;top:calc(env(safe-area-inset-top,0px) + 16px)}
.big:has(.ipa){align-items:baseline}
/* Stół / Masa: the weekly date (views/date.js). Dark whatever the theme (tokens set on .date from computeTokens(dark)).
   Glance, put the phone down, talk: main line 36–44 px, nothing that must be read under 22 px, the lower half is the key. */
html.dating,html.dating body{background:#0d070e}
/* From the tap that opens the table, the light screen it came from is gone: no white frame before the dark table. */
html.dating #app > :not(.date),html.dating #nav{visibility:hidden}
.date{position:fixed;inset:0;z-index:5;background:var(--rest);color:var(--fg);overflow:hidden;color-scheme:dark;font-family:var(--ui)}
.date .d-wait{position:absolute;inset:0;background:var(--rest)}
.d-screen{position:absolute;inset:0;max-width:560px;margin:0 auto;display:flex;flex-direction:column;background:var(--bg);padding:calc(env(safe-area-inset-top,0px) + 10px) max(var(--gr),env(safe-area-inset-right,0px)) 0 max(var(--gl),env(safe-area-inset-left,0px));transition:background-color .6s var(--ease)}
.d-screen.rest{background:var(--rest)}
.d-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;font-size:16px;color:var(--mut);position:relative;z-index:3}
.d-kind{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-half{font-size:15px;color:var(--dim)}
.d-more{all:unset;cursor:pointer;width:44px;height:44px;margin-right:-12px;display:flex;gap:4px;align-items:center;justify-content:center}
.d-more i{width:4px;height:4px;background:var(--mut)}
.d-card{display:flex;flex-direction:column;margin-top:22px}
/* Anything you can touch in the card sits above the lower-half key; plain text lies under it (the key is transparent). */
.d-card :is(button,textarea,input,a,.d-venue,.d-chips,.d-recc){position:relative;z-index:3}
.d-main{font:400 clamp(36px,10.4vw,44px)/1.12 var(--ui);letter-spacing:-.012em;margin:0;max-width:13em;text-wrap:balance}
/* longer card text: still the main line, a step smaller (the first sentence only; the rest goes under it at 22 px) */
.d-main.m{font-size:clamp(30px,8.6vw,34px);line-height:1.16;max-width:16em}
.d-main.l{font-size:clamp(26px,7.6vw,30px);line-height:1.2;max-width:17em}
.d-sub{font-size:22px;line-height:1.36;color:var(--mut);margin:16px 0 0;max-width:22em}
.d-lab{font-size:16px;color:var(--mut);margin:0 0 6px;letter-spacing:.01em}
.d-main + .d-lab,.d-card > .d-lab:not(:first-child){margin-top:22px}
.d-phr{margin-top:22px}
.d-t{font-weight:600;font-size:clamp(28px,8.2vw,34px);line-height:1.18;letter-spacing:-.012em;margin:0}
.d-t.s{font-size:24px;line-height:1.25;margin-top:4px}
.d-t.big{font-size:clamp(40px,12vw,52px);line-height:1.05}
.d-g{font-size:22px;line-height:1.3;color:var(--mut);margin:6px 0 0}
.d-phr.small .d-t,.d-phr.pearl .d-t{font-size:26px}
.d-phr.pair .d-t{font-size:clamp(32px,9vw,40px);font-weight:650}
.d-phr.opener .d-t{font-size:clamp(34px,9.6vw,42px);font-weight:500}
.d-pair{margin-top:20px}
.d-help{font-size:22px;line-height:1.3;margin:0}
.d-rule{font-size:19px;line-height:1.35;margin:0 0 18px;padding:10px 12px;background:var(--s1)}
.d-rule .d-lab{display:inline;margin:0}
.d-title{font-size:26px;line-height:1.2;margin:22px 0 0}
.d-link{all:unset;cursor:pointer;color:var(--mut);font-size:18px;padding:12px 0;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:5px;align-self:flex-start}
.d-link.strong,.d-link.on{color:var(--fg);font-weight:600}

/* the key: the whole lower half, one quiet label at its foot, a hairline where it starts */
.d-go{all:unset;box-sizing:border-box;cursor:pointer;position:absolute;left:0;right:0;bottom:0;height:50%;z-index:2;display:flex;flex-direction:column;justify-content:flex-end;padding:0 max(var(--gr),env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 26px) max(var(--gl),env(safe-area-inset-left,0px));touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:background-color .2s var(--ease)}
.d-go::before{content:"";position:absolute;left:max(var(--gl),env(safe-area-inset-left,0px));right:max(var(--gr),env(safe-area-inset-right,0px));top:0;height:1px;background:var(--line);opacity:.55}
.d-go:not([disabled]):active{background:color-mix(in oklab,var(--s1) 70%,transparent)}
.d-go-l{font:500 22px/1.2 var(--ui);color:var(--fg)}
.d-go-sub{font-size:17px;color:var(--mut);margin-bottom:6px}
.d-go .d-arrow{color:var(--pu)}
.d-go.wait{cursor:default}
.d-go.wait .d-go-l{color:var(--mut)}
.d-go:focus-visible{outline:2px solid var(--pu);outline-offset:-6px}
.d-go.armed{background:color-mix(in oklab,var(--s1) 55%,transparent)}
.d-go.armed .d-go-l{color:var(--pu)}
/* A card taller than the screen scrolls above a key that is a bar at the foot (the end card, briefs on short phones). */
.d-screen.tall > .d-card{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 118px);margin-right:calc(-1 * max(var(--gr),env(safe-area-inset-right,0px)));padding-right:max(var(--gr),env(safe-area-inset-right,0px))}
.d-screen.tall > .d-go{height:calc(env(safe-area-inset-bottom,0px) + 104px);background:linear-gradient(to top,var(--bg) 0,var(--bg) 72%,transparent)}
.d-screen.tall.rest > .d-go{background:linear-gradient(to top,var(--rest) 0,var(--rest) 72%,transparent)}
.d-screen.tall > .d-go::before{display:none}
.d-morewrap{position:relative;z-index:3}
.d-more-box{margin-top:4px}
.d-more-box .d-sub:first-child{margin-top:4px}
.d-heard{margin-top:26px}
.d-heard .d-phr{margin-top:4px}
.d-phr.heard .d-t{font-size:26px}
.deep > .d-go::before{display:none}
.deep > .d-go{background:linear-gradient(to top,var(--bg) 0,var(--bg) calc(env(safe-area-inset-bottom,0px) + 74px),transparent calc(env(safe-area-inset-bottom,0px) + 128px))}
.rest.deep > .d-go{background:linear-gradient(to top,var(--rest) 0,var(--rest) calc(env(safe-area-inset-bottom,0px) + 74px),transparent calc(env(safe-area-inset-bottom,0px) + 128px))}

/* rest: near-black, one word, a thin line that slowly completes; "Dalej?" only at its end */
.d-restzone{all:unset;cursor:pointer;display:block;padding:12vh 0 0}
.d-word{font:400 clamp(44px,13vw,56px)/1.05 var(--ui);color:var(--fg);opacity:.86;margin:0;letter-spacing:-.015em}
.d-word.enjoy{opacity:1;margin-top:12vh}
.d-peekl{display:block;font-size:16px;color:var(--dim);margin-top:10px}
.d-time{height:1px;background:color-mix(in oklab,var(--line) 70%,transparent);margin-top:26px;overflow:hidden}
.d-fill{display:block;height:100%;background:var(--mut);transform-origin:left;transform:scaleX(0)}
.d-nextq{font-size:22px;color:var(--mut);margin:14px 0 0}
.d-peek{position:fixed;inset:0;z-index:4;background:var(--bg);padding:calc(env(safe-area-inset-top,0px) + 54px) var(--gr) 0 var(--gl)}
.d-screen.dim .d-card{opacity:.92}
.d-floorbar{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:18px;color:var(--mut);margin-top:26px;position:relative;z-index:3}
.d-floor{all:unset;cursor:pointer;font-size:18px;color:var(--fg);padding:12px 14px;box-shadow:inset 0 0 0 1px var(--line)}
.d-floor:active{background:var(--s1)}

/* choices are big rows that fill the lower half */
.d-choices{position:absolute;left:0;right:0;bottom:0;height:50%;z-index:2;display:grid;grid-auto-rows:1fr;padding-bottom:env(safe-area-inset-bottom,0px);border-top:1px solid color-mix(in oklab,var(--line) 55%,transparent)}
.d-choice{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;padding:0 max(var(--gr),env(safe-area-inset-right,0px)) 0 max(var(--gl),env(safe-area-inset-left,0px));font:400 26px/1.2 var(--ui);border-bottom:1px solid color-mix(in oklab,var(--line) 55%,transparent);position:relative}
.d-choice[lang]{font-weight:600}
.d-choice:active{background:var(--s1)}
.d-choice.on{color:var(--pu)}
.d-choice.on::before{content:"";position:absolute;left:0;top:18%;bottom:18%;width:3px;background:var(--pu)}
.d-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.d-chip{all:unset;cursor:pointer;font-size:20px;line-height:1.25;padding:13px 16px;background:var(--s1)}
.d-chip:active{background:var(--line)}
.d-chip[disabled]{opacity:.4}
.d-chip.strong,.d-chip.on{color:var(--fg);font-weight:600;box-shadow:inset 0 0 0 1.5px var(--pu)}
.d-recc .d-chip{font-size:19px;padding:12px 14px}
.d-line .d-chip{display:inline-block;font-size:18px;padding:10px 14px;margin:8px 0 0;color:var(--fg);position:relative;z-index:3}

/* check-in */
.d-who{margin-top:8px}
.d-who + .d-link{margin-top:4px;padding:10px 0}
.d-who p{font-size:clamp(30px,8.6vw,36px);line-height:1.2;margin:6px 0 0;display:flex;align-items:baseline;gap:12px}
.d-who p.mut{color:var(--mut)}
.d-whos{font-size:20px;color:var(--mut)}
.d-dot{width:12px;height:12px;flex:none;box-shadow:inset 0 0 0 1.5px var(--mut);align-self:center}
.d-dot.on{background:var(--pu);box-shadow:none}
.d-venue{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:26px;position:relative;z-index:3}
.d-vchip{all:unset;cursor:pointer;box-sizing:border-box;min-height:96px;padding:14px;background:var(--s1);display:flex;flex-direction:column;justify-content:space-between;gap:8px}
.d-vchip.on{box-shadow:inset 0 0 0 2px var(--pu)}
.d-v{font-size:26px;line-height:1.1}
.d-vh{font-size:15px;line-height:1.3;color:var(--mut)}
.d-card > .d-link{margin-top:8px;position:relative;z-index:3}

/* keeping a pearl, recording it */
.d-kept{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px;min-height:0}
.d-pearl{font-weight:600;font-size:19px;padding:7px 10px;box-shadow:inset 0 0 0 1px var(--line)}
button.d-pearl{all:unset;cursor:pointer;font-weight:600;font-size:19px;padding:10px 12px;box-shadow:inset 0 0 0 1px var(--line)}
.d-pearl .d-x{color:var(--mut);font-weight:400}
.d-keepb{all:unset;cursor:pointer;align-self:flex-start;margin-top:18px;font-size:20px;padding:14px 18px;color:var(--fg);box-shadow:inset 0 0 0 1px var(--line);position:relative;z-index:3}
.d-keepb:active{background:var(--s1)}
.d-rec{padding:14px 0;border-top:1px solid color-mix(in oklab,var(--line) 60%,transparent)}
.d-card > .d-sub + .d-rec{margin-top:16px}
.d-sheet{overflow-y:auto;overscroll-behavior:contain}
/* In a sheet the key is a bar at the foot that stays put while a long sheet scrolls (667-px phones). */
.d-sheet > .d-go{position:sticky;bottom:0;left:auto;right:auto;flex:none;height:auto;min-height:104px;margin:auto calc(-1 * var(--gr)) 0 calc(-1 * var(--gl));background:linear-gradient(to top,var(--rest) 0,var(--rest) 72%,transparent)}
.d-sheet > .d-go::before{display:none}
.d-sheet .d-chips,.d-sheet .d-kept{position:relative;z-index:3}
.d-recc{display:flex;gap:18px;align-items:center;flex-wrap:wrap;position:relative;z-index:3}
.d-ok{color:var(--pu);font-size:18px}
.d-meter{width:64px;height:4px;background:var(--line)}
.d-meter i{display:block;height:100%;width:40%;background:var(--pu)}

/* half-time: the card pushed across the seam */
.d-hand{padding:22px 0 26px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.d-hand-l{font:650 clamp(28px,8vw,34px)/1.1 var(--tr);margin:14px 0 0;color:var(--pu)}

/* the reveal and the show-card */
/* never broken inside a word: the size is fitted to the longest word (views/date.js fitWords) */
.d-show{font-weight:650;font-size:clamp(56px,17vw,84px);line-height:1.02;letter-spacing:-.025em;margin:4vh 0 0;overflow-wrap:normal;word-break:normal;hyphens:manual}
.d-t.big{overflow-wrap:normal;word-break:normal;hyphens:manual}
.d-showtheirs{font-size:26px;line-height:1.3;margin:26px 0 0}
.d-showtheirs span[lang]{font-weight:600}
.d-bloom{position:absolute;inset:0;z-index:6;pointer-events:none;background:color-mix(in oklab,var(--pu) 13%,transparent)}
.d-field{width:100%;box-sizing:border-box;background:transparent;border:0;border-bottom:1.5px solid var(--mut);color:var(--fg);font:500 24px/1.35 var(--ui);padding:10px 0;resize:none;border-radius:0;outline:none;margin-top:8px}
.d-field:focus{border-color:var(--pu);box-shadow:0 1.5px 0 var(--pu)}
.d-endh{font:400 clamp(40px,12vw,50px)/1.05 var(--ui);margin:4px 0 0;letter-spacing:-.015em}
.d-words{margin-top:26px;display:flex;flex-direction:column;gap:8px}
.d-line{position:absolute;left:max(var(--gl),env(safe-area-inset-left,0px));right:max(var(--gr),env(safe-area-inset-right,0px));bottom:calc(env(safe-area-inset-bottom,0px) + 74px);z-index:3;margin:0;font-size:17px;line-height:1.35;color:var(--mut)}
.d-line .d-link{font-size:17px;padding:4px 0}
.d-link.life{margin-top:14px}

/* sheets: keep and more */
.d-sheet{position:absolute;inset:0;z-index:8;background:var(--rest);display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top,0px) + 24px) var(--gr) 0 var(--gl);max-width:560px;margin:0 auto}
.d-sheet.menu{padding-top:calc(env(safe-area-inset-top,0px) + 54px)}
.d-row{all:unset;cursor:pointer;font-size:26px;line-height:1.2;padding:18px 0;border-bottom:1px solid color-mix(in oklab,var(--line) 60%,transparent)}
.d-row:active{color:var(--pu)}
.d-row.end{color:var(--mut)}
.d-row.armed{color:var(--fg);font-weight:600}
.d-sheet.seal{background:var(--bg);overflow-y:auto}
.d-sheet.seal .d-main{font-size:clamp(28px,8vw,34px)}
.d-sheet-keys{display:flex;align-items:center;gap:22px;margin-top:22px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 24px)}
.d-sheet-keys .d-chip{font-size:22px;padding:16px 22px}

/* one phone: Masa. The far half is turned 180° and reads in the other language (font = language follows the reader). */
.d-screen.masa{padding:0;background:var(--rest)}
/* Each half is a column: its card scrolls when it is longer than the half; the key sits under it, never over it. */
.masa .half{position:absolute;left:0;right:0;height:50%;padding:6px var(--gr) 0 var(--gl);background:var(--bg);overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}
.masa .half > .d-card{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:16px}
/* The card's closing links ("more", "how do I say…?") in a row of their own under the scrolling card, above the key. */
.masa .half > .d-foot{flex:none;display:flex;flex-wrap:wrap;align-items:baseline;column-gap:24px;position:relative;z-index:3;border-top:1px solid color-mix(in oklab,var(--line) 45%,transparent)}
.masa .d-foot .d-link{font-size:17px;padding:11px 0;margin:0}
.masa .half > .d-go{position:relative;flex:none;height:auto;min-height:max(64px,24%);left:auto;right:auto;margin:0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl))}
.masa .half > .d-choices{position:relative;flex:none;left:auto;right:auto;margin:0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl))}
.masa .half.rest{background:var(--rest)}
.masa .half.far{top:0;transform:rotate(180deg)}
.masa .half.near{bottom:0}
.masa .seam{position:absolute;left:0;right:0;top:50%;height:1px;background:var(--line);z-index:4}
.masa .d-card{margin-top:6px}
.masa .d-main{font-size:clamp(26px,7.4vw,30px)}
.masa .d-sub{font-size:18px;margin-top:8px}
.masa .d-t{font-size:clamp(22px,6.4vw,26px)}
.masa .d-word{font-size:clamp(32px,9vw,40px)}
.masa .d-restzone{padding-top:3vh}
.masa .d-go{height:38%;padding-bottom:16px}
.masa .d-go-l{font-size:20px}
.masa .d-choices{height:56%}
.masa .d-choice{font-size:21px}
.masa .d-show{font-size:clamp(40px,12vw,56px);margin-top:1vh}
.masa .d-pair,.masa .d-phr{margin-top:10px}
/* font = language follows the reader: a Masa half or a sheet written by the far reader (data-rt = what they learn) */
.date [data-rt="tr"] :lang(tr),.date [data-rt="pl"] :lang(pl){font-family:var(--tr)!important}
.date [data-rt="tr"] :lang(pl),.date [data-rt="pl"] :lang(tr){font-family:var(--ui)!important}

/* Razem: the table as the heart of the tab */
.tbl{margin-top:30px;padding:22px 0 4px;border-top:1px solid var(--line)}
.tbl .sect{margin-top:0}
.tbl-pick{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.tbl-c{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:6px;padding:16px 14px 14px;background:var(--s1);min-height:118px}
.tbl-c:active{background:var(--line)}
.tbl-c.on{box-shadow:inset 0 0 0 2px var(--pu)}
.tbl-c b{font:650 19px/1.2 var(--tr);letter-spacing:-.01em}
.tbl-c b:lang(pl),.tbl-c b:lang(tr){font-family:var(--ui)!important;font-weight:600}
.tbl-c span{font-size:14px;line-height:1.35;color:var(--mut)}
.tbl-c.main{background:var(--pu);color:var(--keyfg)}
.tbl-c.main span{color:var(--keyfg);opacity:.85}
.tbl-icons{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:14px;color:var(--mut);margin-top:8px}
.tbl-icons i{font-style:normal;display:inline-flex;align-items:center;gap:6px}
.tbl-icons i::before{content:"";width:6px;height:6px;background:var(--mut)}
.tbl-sealed{margin-top:16px;padding:16px;box-shadow:inset 0 0 0 1px var(--line)}
.tbl-sealed p{margin:0}
.stack{position:relative;margin-top:16px;padding-bottom:10px}
.stack-card{position:relative;z-index:1;padding:18px 16px;background:var(--s1)}
.stack::before,.stack::after{content:"";position:absolute;left:8px;right:8px;bottom:4px;height:12px;background:var(--line);opacity:.55}
.stack::after{left:16px;right:16px;bottom:0;opacity:.3}
.stack.one::before,.stack.one::after{display:none}
.stack-card .d{font-size:14px;color:var(--mut);margin:0}
.stack-card .w{font:650 26px/1.15 var(--tr);margin:10px 0 0}
.stack-card .s{font-size:16px;line-height:1.4;margin:12px 0 0}
.reveal-big{font:600 clamp(24px,7vw,28px)/1.3 var(--tr);margin:6px 0 0;white-space:pre-wrap}
.react{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.react button{all:unset;cursor:pointer;font:500 15px/1.2 var(--tr);padding:10px 12px;background:var(--s1)}
.react button[disabled]{opacity:.55}
.today-in{margin-top:22px;padding:14px 0 6px;border-top:1px solid var(--line)}
.ex-chip{all:unset;cursor:pointer;font-size:15px;padding:9px 12px;box-shadow:inset 0 0 0 1px var(--line);color:var(--fg)}
.ex-chip.done{box-shadow:none;background:var(--s1);color:var(--mut)}
.ex-chip:active{background:var(--line)}
.chips.ask button.asked{background:var(--s1);color:var(--mut);box-shadow:none}
.jar-count{font-size:13px;color:var(--mut);align-self:flex-end}
.d-sheet .d-go{height:auto;min-height:112px;background:linear-gradient(to top,var(--rest) 70%,transparent)}
.d-sheet .d-go::before{display:none}
.d-sheet :is(.d-chips,.d-kept,.d-row){position:relative;z-index:3}
/* the pick of three: quiet rows under the two equal choices, never a second wall of tiles */
.tbl-pick.rows{grid-template-columns:1fr;gap:0;margin-top:10px}
.tbl-pick.rows .tbl-c{background:transparent;min-height:0;padding:14px 0;border-top:1px solid var(--line)}
.tbl-pick.rows .tbl-c:last-child{border-bottom:1px solid var(--line)}
.tbl-pick.rows .tbl-c:active{background:var(--s1)}
.tbl-pick.rows .tbl-c.on{box-shadow:inset 3px 0 0 var(--pu);padding-left:12px}
.tbl-pick.rows .tbl-icons{margin-top:2px}
/* A sheet opened from the table (the translator lifeline) stays dark like the table: no white screen at dinner. */
html.dating .sheet{--bg:#1C0F1E;--s1:#28182B;--line:#432F47;--fg:#F2E9F1;--mut:#B7A2BA;--pu:#D3A9E2;--keyfg:#1C0F1E;--sx:#F2A24A;--dim:#8A7590;color:var(--fg);color-scheme:dark}
html.dating .scrim{background:rgba(0,0,0,.6)}
.tl-gloss{margin:6px 0 0;max-width:none}
.tl-why{margin-top:6px}
/* Natural everyday speech. The spoken form sits small and quiet under the written one, in the learned language's
   typeface (its lang), muted ink only: copper stays on endings. Its tiny label is interface text. */
.spoken{margin:4px 0 0;font-size:16px;line-height:1.35;color:var(--mut)}
.spoken .lbl{font-size:12px;letter-spacing:.02em;margin-right:.35em}
.spoken [lang]{font-weight:500}
.nat-by{letter-spacing:.01em}
.nat-course{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.nat-course .link{padding:8px 0}
.sheet textarea.field.nat-text{min-height:0;font-size:20px;margin-top:6px;overflow:hidden}
.nat-orig{margin:12px 0 0;font-size:22px;font-weight:600;line-height:1.3}
.nat-mine [lang]{color:var(--fg)}
.nat-rec{margin-top:12px;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.read-as{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-top:4px}
.read-as .chips{margin-top:0}
.read-as .chips button{font-size:14px;padding:8px 10px;background:transparent;box-shadow:inset 0 0 0 1px var(--line);color:var(--mut)}
.read-as .chips button.on{background:var(--s1);box-shadow:inset 0 0 0 1px var(--pu);color:var(--fg)}
.say-their{all:unset;cursor:pointer;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px}
.say-their:focus-visible{outline:2px solid var(--pu);outline-offset:3px}
.d-say{display:block;padding:8px 0;font-size:20px;text-align:left}

/* ==================== hero round ====================
   The learning screens (views/session.js): new phrase, recall, review, pattern, Tamam. Only these screens.
   On the craft scales (--t-*, --s1–--s8, --w-*); the hero sizes themselves (72 / 60 px, fitted per phrase as --hero,
   46 / 34 px on Tamam) are set by the view, so a word never breaks. */

/* The phrase as the hero: set first and large, glosses at the small step (15) so they read under 72 px type. */
.phrase.hero{font-size:var(--hero,56px);line-height:1.08;letter-spacing:-.022em;margin-top:var(--s6);row-gap:var(--s4);column-gap:.26em}
.phrase.hero .m i{font-size:var(--t-small);line-height:1.2;letter-spacing:0;top:calc(100% + 6px)}
.phrase.hero .m[data-row="1"] i{top:calc(100% + 25px)}
.phrase.hero .m[data-row="2"] i{top:calc(100% + 44px)}
.phrase.hero.split{column-gap:.42em;row-gap:calc(14px + var(--gloss-rows,1) * 19px);padding-bottom:calc(var(--s3) + var(--gloss-rows,1) * 19px)}
.phrase.hero.split .dot{width:.28em}
/* What it means, under it: one smaller line in the learner's language; how it sounds after that, quieter. */
.prompt.hero-cue{font-size:var(--t-lead);line-height:var(--t-lead-lh);margin-top:var(--s3)}
.hero-say{margin:2px 0 0}
/* A large cue (recall, review): its bracketed hint on a line of its own, small, never wrapped into the big line. */
.prompt.cue > .small{display:block;margin-top:var(--s2);line-height:1.35}
/* air above the new phrase: up to 64 px on a tall screen, nothing on a short one (667: the key stays in view) */
.hero-air{flex:none;height:clamp(0px,calc(100svh - 748px),64px)}
.hero-links{gap:var(--s6);margin-top:var(--s2)}
/* A near miss: only the letters you missed, underlined on the phrase itself (ink purple, never copper), below the
   descenders and unbroken, so it clears the ogonki and still shows under a ğ. */
.phrase u.miss{text-decoration:underline;text-decoration-color:var(--pu);text-decoration-thickness:max(2px,.045em);text-underline-offset:.24em;text-decoration-skip-ink:none}

/* Pattern: the examples on one seam. Roots right-aligned to it, the taught ending left-aligned after it: the copper
   column is the rule. The translation hangs under the roots (.under-l) or under the endings (.under-r). */
.seam{position:relative;display:grid;grid-template-columns:fit-content(var(--seam-l,62%)) minmax(0,1fr);margin-top:var(--s3);font-family:var(--tr);font-weight:var(--w-phrase);font-size:var(--seam-fs,28px);line-height:1.12;letter-spacing:-.015em}
.seam .sm-l,.seam .sm-r{margin-top:var(--s5);align-self:end;align-self:last baseline}
.seam .sm-l{grid-column:1;text-align:right}
.seam .sm-r{grid-column:2;text-align:left}
.seam .sw{white-space:nowrap}
.seam .sm-b{font:400 var(--t-small)/1.35 var(--ui);letter-spacing:0;color:var(--mut);margin-top:var(--s2);contain:inline-size}
.seam.under-l .sm-b{grid-column:1;text-align:right}
.seam.under-r .sm-b{grid-column:2;text-align:left}
/* A zero ending: an empty slot on the seam (a hairline where the ending would be) and the word for it. */
.seam .zero{display:inline-block;width:.5em;height:.6em;border-bottom:max(2px,.07em) solid var(--dim);transform-origin:left}
.seam .zero.ek{border-color:var(--sx)}
.seam .zero-g{font:400 var(--t-cap)/1 var(--ui);letter-spacing:0;color:var(--mut);white-space:nowrap}
.seam-rule{margin-top:var(--s6)}

/* Tamam: today's phrases set large, their endings landing; then the main line; the rest small below. */
.tm-list{display:flex;flex-direction:column;align-items:flex-start;gap:var(--s2);margin-top:var(--s7)}
.tm-p{all:unset;cursor:pointer;display:block;max-width:100%;padding:3px 0}
.tm-t{display:block;font-family:var(--tr);font-weight:var(--w-phrase);line-height:1.1;letter-spacing:-.018em;color:var(--fg)}
.tm-w{white-space:nowrap}
.tm-e{display:inline-block}
.tm-say{margin-top:var(--s7);padding-top:var(--s5);border-top:1px solid var(--line)}
.tm-say-l{font-size:var(--t-title);line-height:var(--t-title-lh);margin:0}
.tm-say-b{all:unset;cursor:pointer;display:flex;align-items:baseline;justify-content:space-between;gap:var(--s4);width:100%;min-height:var(--hit);margin-top:var(--s2)}
.tm-say-b .tm-t{line-height:1.05}
.tm-play{font-size:var(--t-small);color:var(--mut)}
.tm-say-m{margin-top:var(--s2)}
.tm-small{margin-top:var(--s7)}
.tm-small > div{margin-top:var(--s4)!important}
.tm-small .label{font-size:var(--t-cap)}
.tm .chips button{font-size:var(--t-small);padding:var(--s3) 10px}
.tm-tomorrow{margin-top:var(--s5)}
:is(.tm-p,.tm-say-b):focus-visible{outline:2px solid var(--pu);outline-offset:3px}
@media (max-height:720px){.tm-list{margin-top:var(--s5)}.tm-say{margin-top:var(--s6);padding-top:var(--s4)}.tm-small{margin-top:var(--s5)}}
/* ==================== end of hero round ==================== */

/* ==================== craft fixes before launch (audit/10-design-review/craft-audit.md §8, branch wt/craft) ====================
   One block, each rule tagged with its audit item (#n). Rules here override earlier ones by position: keep the block last. */

/* #1 Masa: each half's key clears its own edge of the phone. The near half's foot is the home indicator; the far half is
   turned 180°, so its foot is the status bar. (.masa .d-go's flat 16 px used to override the safe area of .d-go.) */
.masa .half.near > .d-go{padding-bottom:calc(env(safe-area-inset-bottom,0px) + var(--s5))}
.masa .half.far > .d-go{padding-bottom:calc(env(safe-area-inset-top,0px) + var(--s5))}
.masa .half.near > .d-choices{padding-bottom:env(safe-area-inset-bottom,0px)}
.masa .half.far > .d-choices{padding-bottom:env(safe-area-inset-top,0px)}

/* #2 A message at the table speaks the table's dark ink (never a near-white box on the near-black table). 14.1:1. */
html.dating .toast{background:#28182B;color:#F2E9F1;box-shadow:inset 0 0 0 1px #432F47}

/* #3 Touch targets: nothing you tap is under 44 px. Chips (38), reactions (38), exercise chips (40.5), read-as (32.8),
   path days (36), the chip on the table's bottom line (42.5), the install line's "×" (8×33). */
.chips button,.react button,.ex-chip{box-sizing:border-box;min-height:var(--hit);display:inline-flex;align-items:center}
.d-line .d-chip{box-sizing:border-box;min-height:var(--hit)}
.days button{height:var(--hit)}
.install-hint .link[aria-label]{min-width:var(--hit);min-height:var(--hit);display:inline-grid;place-items:center;padding:0}

/* #5 Glyphs neither font has (⋯ U+22EF, → U+2192): drawn, so they never fall back to Georgia or system-ui.
   Settings in the nav: the same three 4-px squares as the table's menu. The arrow: one square-cut stroke, as a mask in
   currentColor. `.g-arr` is the arrow for any new place (put it on an empty, aria-hidden span). */
:root{--g-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M0 6h16M11 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E")}
.nav a[data-nav="ustawienia"]{font-size:0;display:flex;align-items:center;justify-content:center}
.nav a[data-nav="ustawienia"]::after{content:"";width:4px;height:4px;margin:0 8px;background:currentColor;box-shadow:-8px 0 0 currentColor,8px 0 0 currentColor}
.d-arrow,.tl-dir .arr,.g-arr{display:inline-block;width:18px;height:12px;font-size:0;vertical-align:middle;background:currentColor;-webkit-mask:var(--g-arrow) center/contain no-repeat;mask:var(--g-arrow) center/contain no-repeat}
.d-arrow,.g-arr{margin-left:var(--s3)}
.tl-dir .arr{margin:0 var(--s3);align-self:center}

/* #9 Contrast: the placeholder at full mut (light 4.31 → 6.0:1); the table's half name in mut, at the table's meta size
   (dim on the table's bg falls to 4.31:1). */
::placeholder{color:var(--mut);opacity:1}
.d-half{font-size:var(--d-meta);color:var(--mut)}

/* #10 Focus: every all:unset control gets its ring back (all:unset removed it, at equal or higher specificity).
   Full-width rows draw it inside, so the screen edge never cuts it. */
:is(.react button,.ex-chip,.tbl-c,.d-chip,.d-choice,.d-row,.d-floor,.d-keepb,button.d-pearl,.d-restzone,.d-more,.d-link,.d-vchip):focus-visible{outline:2px solid var(--pu);outline-offset:3px}
:is(.d-choice,.d-row,.d-restzone,.tbl-pick.rows .tbl-c):focus-visible{outline-offset:-2px}

/* #11 Caption floor 13 px: the review interval (was 11) and the spoken-form label (12). (.badge and the list date: in place.) */
.rate button small{font-size:var(--t-cap);line-height:1.2}
.spoken .lbl{font-size:var(--t-cap)}

/* #12 One bold (600, inside both axes); class rules keep their own weights. No faux italic or bold, ever. */
html{font-synthesis:none}
b,strong{font-weight:var(--w-bold)}

/* #15 Disabled looks disabled, one way (was .4, .45, .55, or nothing). */
.link[disabled],.ex-chip[disabled]:not(.done),.react button[disabled],.d-chip[disabled],.chips button[disabled]:not(.asked){opacity:var(--off);cursor:default}
/* ==================== end of craft fixes ==================== */

/* ---------- copy round (wt/copy): Razem, Prova, the date mode's cards, Today and Path. Owned by the copy round;
   global type, spacing, focus and touch targets live above (craft block). Keep this block last. ---------- */
/* Light-mode copper: a cleaner tea (no grey-blue in it), still 5:1 on the background at every hour and season.
   flow.js holds the same base; this is the value when "Kolory płyną" is off. */
:root{--sx:#A24800;--ring:2px}
/* One "selected" style everywhere (chips, tiles, options; Razem, onboarding, the date mode, the sheet):
   an option is a tint, the chosen one keeps its tint and gets a 2 px ring in the key colour. Filled = do it;
   underline = a view switch (tabs). */
.read-as .chips button{background:var(--s1);box-shadow:none}
.read-as .chips button.on{background:var(--s1);box-shadow:inset 0 0 0 var(--ring) var(--pu);color:var(--fg)}
.d-chip.strong,.d-chip.on{box-shadow:inset 0 0 0 var(--ring) var(--pu)}
.d-choice.on{color:var(--fg);box-shadow:inset 0 0 0 var(--ring) var(--pu)}
.d-choice.on::before{display:none}
.tbl-pick.rows .tbl-c.on{box-shadow:inset 0 0 0 var(--ring) var(--pu);padding-left:var(--s4);padding-right:var(--s4)}
.days button.pick{background:var(--s1);box-shadow:inset 0 0 0 var(--ring) var(--pu)}
/* Onboarding's "who is learning" is a choice, not a tab: two options as tints, the chosen one ringed. */
.seg[role="group"]{gap:var(--s3);border-bottom:0}
.seg[role="group"] button{flex:1 1 auto;white-space:nowrap;min-height:var(--hit);box-sizing:border-box;padding:var(--s4);margin-bottom:0;border-bottom:0;background:var(--s1);color:var(--mut)}
.seg[role="group"] button.on{color:var(--fg);box-shadow:inset 0 0 0 var(--ring) var(--pu)}
/* Razem before sharing: two short lines, the key, "more" for the rest. */
.tog-optin .lead + .hint{margin-top:var(--s3)}
.tog-optin .dock + .link{margin-top:var(--s3)}
.tog-details{margin-top:var(--s2)}
/* Prova: who said what at a glance. The partner speaks from the left; your own lines hang on the right, under a
   thin rule in the key colour. Both in the learned language's typeface (font = language). */
.script .ln:not(.me){max-width:88%}
.script .ln.me{align-self:flex-end;max-width:84%;padding:0 var(--s4) 0 0;text-align:right;border-right:2px solid var(--pu)}
.script .ln.me .who{text-align:right}
.script .ln.me > span[lang]{text-wrap:balance}
