/* Layout: one narrow column, a fixed tab bar at the bottom, one task per screen */
@font-face{font-family:"Frank Ruhl Libre";font-weight:500;font-display:swap;src:url(fonts/frank-ruhl-libre-hebrew-500-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:"Frank Ruhl Libre";font-weight:700;font-display:swap;src:url(fonts/frank-ruhl-libre-hebrew-700-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:"Frank Ruhl Libre";font-weight:900;font-display:swap;src:url(fonts/frank-ruhl-libre-hebrew-900-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:"Frank Ruhl Libre";font-weight:700;font-display:swap;src:url(fonts/frank-ruhl-libre-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:"Assistant";font-weight:400;font-display:swap;src:url(fonts/assistant-hebrew-400-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:"Assistant";font-weight:600;font-display:swap;src:url(fonts/assistant-hebrew-600-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:"Assistant";font-weight:700;font-display:swap;src:url(fonts/assistant-hebrew-700-normal.woff2) format("woff2");unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}
@font-face{font-family:"Assistant";font-weight:400;font-display:swap;src:url(fonts/assistant-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:"Assistant";font-weight:600;font-display:swap;src:url(fonts/assistant-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:"Assistant";font-weight:700;font-display:swap;src:url(fonts/assistant-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F}

:root{
  --bg:#F2E9D8; --surface:#FBF6EC; --ink:#2A1B10; --muted:#5E4936; --line:#D8C6A6; --soft:#EADFC9;
  --brand:#5B2A17; --brand-ink:#FBF3E2; --gold:#A6782A; --good:#3F7A3A; --bad:#A63A2E;
  --good-soft:#E0EAD3; --bad-soft:#F3DCD4; --gold-soft:#EBDDBF; --brand-soft:#E3CDBE; --key:#FBF6EC;
  --rule:#B79B6C; --hero:#3A2114; --hero-ink:#F6EBD3; --hero-card:#4A2C1B; --hero-line:#6D4A2E; --hero-sub:#DCC9A6;
  --cta:#E0B566; --cta-ink:#2A1B10; --link:#E0B566;
  --f-word:"Frank Ruhl Libre","Noto Serif Hebrew","David",serif;
  --f-ui:"Assistant","Noto Sans Hebrew","Segoe UI",Arial,sans-serif;
  --fs:18px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#15100B; --surface:#1F1811; --ink:#EEE2CB; --muted:#CDBA9C; --line:#3A2D20; --soft:#2A2117;
  --brand:#CFA963; --brand-ink:#1A120B; --gold:#DE8F55; --good:#93C47D; --bad:#E58B7B;
  --good-soft:#2B3A22; --bad-soft:#47261F; --gold-soft:#3A2E1C; --brand-soft:#4A3A24; --key:#2E241A;
  --rule:#6B5536; --hero:#211912; --hero-ink:#EFE3CC; --hero-card:#2A2017; --hero-line:#3E3022; --hero-sub:#C9B798;
  --cta:#D9B266; --cta-ink:#2A1B10; --link:#E6D3AE; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#15100B; --surface:#1F1811; --ink:#EEE2CB; --muted:#CDBA9C; --line:#3A2D20; --soft:#2A2117;
  --brand:#CFA963; --brand-ink:#1A120B; --gold:#DE8F55; --good:#93C47D; --bad:#E58B7B;
  --good-soft:#2B3A22; --bad-soft:#47261F; --gold-soft:#3A2E1C; --brand-soft:#4A3A24; --key:#2E241A;
  --rule:#6B5536; --hero:#211912; --hero-ink:#EFE3CC; --hero-card:#2A2017; --hero-line:#3E3022; --hero-sub:#C9B798;
  --cta:#D9B266; --cta-ink:#2A1B10; --link:#E6D3AE; color-scheme:dark}
:root[data-size="l"]{--fs:20px}
:root[data-size="xl"]{--fs:22px}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;margin:0;overflow:hidden}
html{font-size:var(--fs)}
body{background:var(--bg);color:var(--ink);font-family:var(--f-ui);line-height:1.5;overscroll-behavior-y:none;overflow-x:hidden;-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

#app{height:100%;height:100dvh;display:flex;flex-direction:column;max-width:600px;margin:0 auto;
  padding-top:env(safe-area-inset-top,0px)}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 6px}
.top h1{font-family:var(--f-word);font-weight:900;font-size:1.45rem;margin:0;line-height:1.2}
.top h1 small{display:block;font-family:var(--f-ui);font-weight:600;font-size:.72rem;color:var(--muted);letter-spacing:.04em}
.topbtns{display:flex;gap:8px;align-items:center}
#btn-theme{font-size:1.1rem;padding:0 10px}
.iconbtn{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-width:44px;min-height:44px;font-size:.85rem;font-weight:700;color:var(--muted);padding:0 12px}
#rail-wrap{flex:1;min-height:0;overflow:hidden;position:relative}
#rail{display:flex;width:500%;height:100%;will-change:transform;transform:translate3d(-80%,0,0)}
/* a screen ends where the tab bar starts, so nothing scrolls behind the bar (24.11.2026); the board screens (.tight) keep the full height and fit themselves */
.panel{width:20%;height:calc(100% - var(--tabs-h,calc(76px + env(safe-area-inset-bottom,0px))));box-sizing:border-box;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:8px 16px 20px;display:flex;flex-direction:column;gap:14px;min-width:0}
.panel>*{flex-shrink:0}

.tabs{position:fixed;inset-inline:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom,0px);z-index:5}
.tabs div{max-width:600px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr)}
.tabs button{border:0;background:none;padding:10px 4px 9px;color:var(--muted);font-weight:600;font-size:.86rem;display:flex;flex-direction:column;align-items:center;gap:3px;min-height:58px}
.tabs button i{display:block;width:26px;height:4px;border-radius:2px;background:transparent}
.tabs button[aria-selected="true"]{color:var(--brand);font-weight:700}
.tabs button[aria-selected="true"] i{background:var(--brand)}
.tabs svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

h2{font-family:var(--f-word);font-weight:700;font-size:1.25rem;margin:0}
p{margin:0}
.muted{color:var(--muted)}
.small{font-size:.86rem}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.between{justify-content:space-between}
.stack{display:flex;flex-direction:column;gap:10px}

a.btn{display:flex;align-items:center;justify-content:center;text-decoration:none;text-align:center}
.btn{border:0;border-radius:12px;padding:13px 18px;font-weight:700;font-size:1rem;background:var(--brand);color:var(--brand-ink);min-height:48px}
.btn.ghost{background:var(--soft);color:var(--ink)}
.btn.line{background:transparent;border:1px solid var(--line);color:var(--ink)}
.btn.good{background:var(--good);color:#fff}
.btn.bad{background:var(--bad);color:#fff}
.btn.wide{width:100%}
.btn[disabled]{opacity:.45}
.link{border:0;background:none;color:var(--brand);font-weight:700;padding:8px 4px;min-height:44px}

.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 10px}
.stat b{display:block;font-family:var(--f-word);font-weight:900;font-size:1.9rem;line-height:1;font-variant-numeric:tabular-nums}
.stat span{font-size:.8rem;color:var(--muted)}
.bar{height:8px;border-radius:4px;background:var(--soft);display:flex;overflow:hidden}
.bar i{display:block;height:100%}
.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:.8rem;color:var(--muted)}
.legend span::before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;margin-inline-end:5px;background:var(--c)}

.seg{display:flex;background:var(--soft);border-radius:10px;padding:3px;gap:3px}
.seg button{flex:1;border:0;background:transparent;border-radius:8px;padding:9px 6px;font-weight:600;color:var(--muted);min-height:42px}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.field{display:flex;flex-direction:column;gap:5px}
.field>label,.label{font-size:.86rem;font-weight:700;color:var(--muted)}
select,input[type=search],input[type=text],input[type=time],textarea{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:11px 12px;min-height:46px}
/* the clear button of the search box in the app's own colours, not the browser's blue */
input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;width:18px;height:18px;margin-inline-start:6px;cursor:pointer;background-color:var(--muted);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1a11 11 0 1 1 0 22a11 11 0 0 1 0-22zM8.7 7.3L7.3 8.7L10.6 12l-3.3 3.3l1.4 1.4l3.3-3.3l3.3 3.3l1.4-1.4L13.4 12l3.3-3.3l-1.4-1.4L12 10.6z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1a11 11 0 1 1 0 22a11 11 0 0 1 0-22zM8.7 7.3L7.3 8.7L10.6 12l-3.3 3.3l1.4 1.4l3.3-3.3l3.3 3.3l1.4-1.4L13.4 12l3.3-3.3l-1.4-1.4L12 10.6z'/%3E%3C/svg%3E") center/contain no-repeat}
input[type=search]::-webkit-search-cancel-button:hover{background-color:var(--brand)}
textarea{min-height:84px;resize:vertical}

.progress{height:5px;border-radius:3px;background:var(--soft);overflow:hidden}
.progress i{display:block;height:100%;background:var(--brand);transition:width .2s}
.card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:26px 18px 20px;display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;min-height:300px}
.tag{font-size:.8rem;font-weight:700;color:var(--muted)}
.word{font-family:var(--f-word);font-weight:700;font-size:2.5rem;line-height:1.2;overflow-wrap:anywhere;text-wrap:balance}
.word.md{font-size:1.9rem}
.word.sm{font-size:1.35rem;font-weight:500}
.answer{font-size:1.2rem;font-weight:600;border-top:1px dashed var(--line);padding-top:14px;width:100%;overflow-wrap:anywhere}
.src{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
.opts{display:grid;gap:8px;width:100%}
.opt{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:12px 10px;font-size:1.02rem;min-height:52px;overflow-wrap:anywhere;text-align:center}
.opt.aram{font-family:var(--f-word);font-weight:700;font-size:1.3rem}
.opt.right{border-color:var(--good);background:var(--good-soft)}
.opt.wrong{border-color:var(--bad);background:var(--bad-soft)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}

.menu{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.menu button{border:0;border-bottom:1px solid var(--line);background:none;text-align:start;padding:16px 2px;display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:center;min-height:64px}
.menu button b{font-family:var(--f-word);font-size:1.2rem;font-weight:700}
.menu button span{grid-column:1;color:var(--muted);font-size:.9rem}
.menu button em{grid-row:1/3;grid-column:2;font-style:normal;color:var(--gold);font-weight:700;font-size:.86rem;white-space:nowrap}

.chips{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:2px}
.chips::-webkit-scrollbar{display:none}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:20px;padding:7px 14px;font-weight:600;font-size:.9rem;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;color:var(--muted);min-height:40px}
.chip[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.list{display:flex;flex-direction:column}
.dafhead{font-size:.8rem;font-weight:700;color:var(--gold);padding:14px 0 4px;border-bottom:1px solid var(--line)}
.item{display:grid;grid-template-columns:1fr auto auto;gap:0 10px;padding:11px 0;border-bottom:1px solid var(--line);min-width:0}
.item .w{font-family:var(--f-word);font-weight:700;font-size:1.25rem;overflow-wrap:anywhere}
.item .m{grid-column:1;color:var(--muted);font-size:.95rem;overflow-wrap:anywhere}
.item .n{grid-row:1/3;grid-column:2;align-self:center;text-align:end;font-size:.78rem;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.item .n b{display:block;color:var(--ink);font-size:.95rem}
.item.open{background:var(--surface);margin-inline:-16px;padding-inline:16px}
.detail{grid-column:1/-1;display:flex;flex-direction:column;gap:10px;padding-top:10px}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-inline-start:6px;vertical-align:middle}
.edited{color:var(--gold);font-weight:700;font-size:.78rem}
.item .w .rare{display:inline-block;vertical-align:middle;margin-inline-start:6px;padding:1px 7px;border:1px solid var(--line);border-radius:999px;background:var(--soft);color:var(--muted);font-family:var(--f-ui);font-weight:600;font-size:.68rem;line-height:1.5}

.match{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tile{border:1px solid var(--line);background:var(--surface);border-radius:12px;min-height:60px;padding:8px;display:flex;align-items:center;justify-content:center;text-align:center;overflow-wrap:anywhere;font-size:.95rem}
.tile.aram{font-family:var(--f-word);font-weight:700;font-size:1.25rem}
.tile.sel{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand) inset}
.tile.done{opacity:.25;border-style:dashed}
.tile.miss{border-color:var(--bad);background:var(--bad-soft)}
.hud{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.hud div{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:8px 4px}
.hud b{display:block;font-family:var(--f-word);font-size:1.5rem;font-weight:900;line-height:1.1;font-variant-numeric:tabular-nums}
.hud span{font-size:.75rem;color:var(--muted)}
.blank{display:inline-block;min-width:3.2em;border-bottom:3px solid var(--gold);margin:0 .15em;color:var(--gold)}
.result{text-align:center;display:flex;flex-direction:column;gap:12px;align-items:center;padding:18px 0}
.result .big{font-family:var(--f-word);font-weight:900;font-size:3.4rem;line-height:1;font-variant-numeric:tabular-nums}
.review{width:100%;text-align:start;border-top:1px solid var(--line)}
.review div{padding:9px 0;border-bottom:1px solid var(--line)}
.review b{font-family:var(--f-word);font-size:1.1rem}

.sheet{position:fixed;inset:0;background:rgba(8,12,22,.55);z-index:20;display:flex;align-items:flex-end;justify-content:center}
.sheet>div{background:var(--bg);width:100%;max-width:600px;max-height:92%;overflow:auto;border-radius:20px 20px 0 0;padding:20px 16px calc(48px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:14px}
/* the settings title and its close button stay on top while the sheet scrolls */
.sheet .shead{position:sticky;top:-20px;z-index:2;background:var(--bg);margin:-20px -16px 0;padding:20px 16px 10px}
.sheet.full{align-items:stretch}
.sheet.full>div{max-height:none;border-radius:0;padding-top:calc(28px + env(safe-area-inset-top,0px));justify-content:center}
.steps{display:flex;gap:6px;justify-content:center}
.steps i{width:22px;height:4px;border-radius:2px;background:var(--line)}
.steps i.on{background:var(--brand)}
.hero{font-family:var(--f-word);font-weight:900;font-size:2.1rem;line-height:1.15;text-wrap:balance}
.note{background:var(--soft);border-radius:10px;padding:10px 12px;font-size:.9rem;color:var(--muted)}
.toast{position:fixed;inset-inline:16px;bottom:calc(var(--tabs-h,calc(76px + env(safe-area-inset-bottom,0px))) + 8px);max-width:568px;margin:0 auto;background:var(--ink);color:var(--bg);padding:11px 14px;border-radius:12px;text-align:center;font-weight:700;z-index:30}
@media (max-width:360px){.word{font-size:2.1rem}.stat b{font-size:1.6rem}}
.opt.long{text-align:start;font-size:.98rem;line-height:1.4;padding:11px 14px}
.cfull{margin:0;font-size:1rem;line-height:1.65;overflow-wrap:anywhere;text-align:start;width:100%}
textarea.tall{min-height:150px}
.otherhead{display:flex;justify-content:space-between;align-items:baseline;margin-top:22px;padding:8px 0 6px;border-bottom:2px solid var(--brand);color:var(--brand);font-size:.95rem}
.otherhead span{color:var(--muted);font-size:.82rem;font-variant-numeric:tabular-nums}
.otherfoot{padding-top:10px}
#dlist:empty+#dother .otherhead,#dlist:empty+#dmore:empty+#dother .otherhead{margin-top:4px}
.pkpick{display:flex;flex-wrap:wrap;gap:6px}
.pkpick .chip{white-space:normal;text-align:start}
.chip:disabled{opacity:.4}
.small.strong{font-weight:700;color:var(--ink)}
.star{grid-row:1/3;grid-column:3;align-self:center;border:0;background:none;font-size:1.4rem;line-height:1;color:var(--muted);min-width:40px;min-height:44px;margin-inline-end:-10px}
.star.on{color:var(--gold)}
.explain{width:100%;text-align:start;background:var(--soft);border:1px solid var(--line);border-inline-start:4px solid var(--brand);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.scopebar{display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:center;text-align:start;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 14px;min-height:58px;width:100%}
.scopebar span{font-size:.8rem;color:var(--muted);font-weight:700}
.scopebar b{grid-column:1;font-weight:600;overflow-wrap:anywhere}
.scopebar em{grid-row:1/3;grid-column:2;font-style:normal;color:var(--brand);font-weight:700;font-size:.9rem}
.meter{display:grid;grid-template-columns:1fr auto;gap:6px 10px;align-items:center;text-align:start;background:none;border:0;padding:2px 0;font-size:.9rem;color:var(--muted);width:100%;min-height:40px}
.meter b{color:var(--ink)}
.meter em{font-style:normal;color:var(--brand);font-weight:700;font-size:.86rem}
.pbar{grid-column:1/-1;display:block;height:6px;border-radius:3px;background:var(--soft);overflow:hidden}
.pbar i{display:block;height:100%;background:var(--good)}
.prow{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:baseline;padding:7px 0;font-size:.95rem}
.prow b{font-variant-numeric:tabular-nums;font-size:.9rem}
h3{font-family:var(--f-word);font-weight:700;font-size:1.05rem;margin:14px 0 0}
.tile.long{font-size:.82rem;line-height:1.3;padding:7px 6px}
.link.start{align-self:flex-start;text-align:start}
.seg.grid2{display:grid;grid-template-columns:1fr 1fr}
.qtext{font-size:1.14rem;font-weight:600;line-height:1.5;text-align:start;width:100%;margin:0;overflow-wrap:anywhere}
.quote{font-family:var(--f-word);font-size:1.08rem;line-height:1.65;margin:0;overflow-wrap:anywhere}
/* arrow crossword, in plain colours: a light board in light mode, a soft dark one in dark mode */
:root{--xanchor:#B8862E;--xframe:#BFA47A;--xgap:#D8C6A6;--xv:#C9B48E;--xl:#FFFDF7;--xlb:#D8C6A6;--xlt:#2A1B10;--xon:#EED9AC;--xcur:#FFE08A;--xcurb:#B7791F;--xbad:#F6D0C8;--xbadt:#A63A2E;--xhint:#6D28D9;--xhb:#EDE4FB;--xk:#E8D3A8;--xkt:#3E2512;--xka:#3E2512;--xksep:#CDB48A;--xok:#3F7A3A;--xsol:#E6F0DC;--xarw:#7A3E1D}
:root[data-theme="dark"]{--xanchor:#E3B45E;--xframe:#110C08;--xgap:#110C08;--xv:#110C08;--xl:#241B13;--xlb:#4A3A28;--xlt:#F3E8D2;--xon:#5E4626;--xcur:#8A6A1F;--xcurb:#F0C766;--xbad:#6B2A26;--xbadt:#FFC9BF;--xhint:#EBDDFF;--xhb:#55407F;--xk:#5A4128;--xkt:#F6EAD2;--xka:#FFFFFF;--xksep:#6B5536;--xok:#93C47D;--xsol:#2E4026;--xarw:#E8C887}
.panel.tight{height:100%;padding-top:6px;padding-bottom:calc(64px + env(safe-area-inset-bottom,0px));overflow:hidden}
body.xwmode .top{display:none}
.xw>.row .link{min-height:34px;padding:4px 6px}
.xw{display:flex;flex-direction:column;gap:6px;align-items:center;height:100%}
.xw>.row{width:100%}
/* the board stands centred in the height left above the bottom block */
.xw .xgrid{margin:auto 0}
.xgrid{display:grid;gap:2px;background:transparent;border:0;border-radius:6px;overflow:hidden;flex-shrink:0}
.xgrid>*{border:0;margin:0;padding:0;min-width:0;min-height:0;position:relative;font:inherit;overflow:hidden;border-radius:1px}
.cell-letter{background:var(--xl);color:var(--xlt);box-shadow:inset 0 0 0 1px var(--xlb);font-family:var(--f-word);font-weight:700;font-size:min(5.2vw,1.35rem);display:flex;align-items:center;justify-content:center}
.cell-letter.sol{background:var(--xsol)}
.cell-letter.on{background:var(--xon)}
/* in the active word, the letters already solved keep their green, and a letter given by a hint keeps its own colour */
.cell-letter.on.sol{background:var(--xsol)}
.cell-letter.hint,.cell-letter.on.hint{background:var(--xhb);color:var(--xhint)}
.cell-letter.cur{background:var(--xcur);box-shadow:inset 0 0 0 2px var(--xcurb)}
.cell-letter.bad{background:var(--xbad);color:var(--xbadt)}
.cell-letter.hint{color:var(--xhint)}
.cell-void{background:var(--xv);pointer-events:none}
/* empty cells that reach the edge are not drawn at all: the board keeps a stepped outline */
.cell-out{background:transparent;pointer-events:none}
.cell-letter.lock{font-weight:900}
.cell-clue{background:var(--xk);color:var(--xkt);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);text-align:center;justify-items:stretch;align-items:stretch}
.cell-clue.two{grid-template-rows:minmax(0,1fr) minmax(0,1fr)}
/* the definition of the current word: the gold frame goes around its own half, not the whole cell */
.xq.sel::before{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 2px var(--xcurb);pointer-events:none;z-index:1}
.xq{min-height:0;min-width:0;width:100%;overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center;padding:1px 2px}
.cell-clue.two .xq+.xq{border-top:1px solid var(--xksep)}
.xq em{display:block;max-width:100%;font-style:normal;font-family:var(--f-ui);font-size:9px;line-height:1.08;overflow:visible;overflow-wrap:normal;word-break:normal}
.xq em.clip{overflow:hidden;max-height:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow-wrap:anywhere}
.xq.sel em{font-weight:700}
.xq.done{padding-right:9px}
.xq.done::after{content:"\2713";position:absolute;top:1px;right:1px;color:var(--xok);font-size:9px;font-weight:900;line-height:1}
.xa{position:absolute;width:13px;height:13px;display:block;color:var(--xarw);pointer-events:none;z-index:2}
/* the arrows sit outside the definition, in the first letter of the word, on the edge that touches the definition */
.xa-l{right:0;top:calc(50% - 6.5px)}
.xa-ld{right:0;top:calc(50% - 2px)}
.xa-d{top:0;left:calc(50% - 6.5px)}
.xa-dl{top:0;left:calc(50% - 10px)}
.xa.done{opacity:.4}
.xa svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block}
.xbar{width:100%;flex-shrink:0;background:var(--surface);border:1px solid var(--line);border-inline-start:4px solid var(--brand);border-radius:10px;padding:4px 8px;box-sizing:border-box;height:calc(2.6rem + 10px);display:flex;align-items:center;gap:8px}
.xbar .xdef{flex:1;min-width:0;margin:0;font-size:.98rem;line-height:1.3;max-height:2.6em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.xbar .xdef span{font-size:.82em;color:var(--muted);white-space:nowrap}
.xbar .xlive{flex:none;display:flex;gap:2px;direction:rtl;font-family:var(--f-word);font-weight:700}
.xbar .xlive i{font-style:normal;display:inline-flex;align-items:flex-end;justify-content:center;width:1.15rem;height:1.6rem;border-bottom:2px solid var(--line);font-size:1.05rem;line-height:1;color:var(--ink);cursor:pointer}
.xbar .xlive i.gap{width:.45rem;border:0;cursor:default}
.xbar .xlive i.cur{border-bottom-color:var(--gold);background:var(--soft);border-radius:4px 4px 0 0}
.xbar .xlive i.bad{color:var(--bad);border-bottom-color:var(--bad)}
.xbar .xlive i.hint{color:var(--xhint);background:var(--xhb);border-radius:4px 4px 0 0}
.xtools{width:100%;display:flex;gap:4px}
.xtools button:disabled{opacity:.4;cursor:default}
.xtools button.pin{flex:0 0 44px;font-size:1.05rem;padding:0}
.xtools button.pin.on{background:var(--brand);border-color:var(--brand);color:var(--brand-ink);box-shadow:0 0 0 2px var(--gold) inset}
.xtools button{flex:1;min-height:34px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:.84rem;font-weight:600;padding:0 6px}
/* the block under the board: bar, tools and keyboard, 4 pixels off each screen edge, 4 pixels apart, resting on the tab bar */
.xlow{margin:0 -16px;width:calc(100% + 32px);padding:0 4px;display:flex;flex-direction:column;gap:4px;box-sizing:border-box}
.xkb{width:100%;display:flex;flex-direction:column;gap:4px;user-select:none;-webkit-user-select:none}
.xkb>div{display:flex;gap:4px;justify-content:center;width:100%}
.xkb>div.r2{width:92%;margin:0 auto}
.xkb button{flex:1 1 0;min-width:0;height:var(--kh,44px);border:0;border-radius:7px;background:var(--key);box-shadow:0 1px 0 var(--line);color:var(--ink);font-family:var(--f-word);font-size:20px;font-weight:700;padding:0}
.xkb button.del{flex:1.5 1 0;font-family:var(--f-ui);font-size:20px;background:var(--soft)}
.xkb button.del svg{display:block;margin:auto;width:24px;height:24px}
.xkb button:active{background:var(--brand-soft)}
/* the daily challenges at the top of the learn tab: crossword and Wordle side by side */
.hub{border-radius:14px;padding:10px;background:var(--brand);color:var(--brand-ink);display:flex;flex-direction:column;gap:8px}
.hubh{margin:0 4px;font-weight:700;font-size:.9rem;opacity:.9}
.hubg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.hcard{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:start;border:0;border-radius:11px;background:var(--surface);color:var(--ink);padding:10px 12px;min-height:104px}
.hcard b{font-family:var(--f-word);font-size:1.02rem;line-height:1.2}
.hcard .ht{font-size:.78rem;color:var(--muted);line-height:1.25}
.hcard .hs{margin-top:auto;font-weight:700;font-size:.9rem;color:var(--brand)}
.hcard .hs.ok{color:var(--good)}
.hcard .hf{font-size:.84rem;font-variant-numeric:tabular-nums}
/* Wordle of the tractate */
.wd{display:flex;flex-direction:column;gap:8px;align-items:center;height:100%}
.wd>.row{width:100%}
.wtitle{font-family:var(--f-word);font-size:1.1rem}
.wclue{margin:0;align-self:stretch;text-align:center;color:var(--gold)}
.wgrid{display:flex;flex-direction:column;gap:6px;margin:auto 0}
.wrow{display:flex;gap:6px}
.wt{width:var(--wt,52px);height:var(--wt,52px);display:flex;align-items:center;justify-content:center;border:2px solid var(--line);border-radius:6px;background:var(--surface);font-family:var(--f-word);font-weight:900;font-size:calc(var(--wt,52px) * .55);color:var(--ink)}
.wt.full{border-color:var(--muted)}
.wt.s-g{background:#3E9B5F;border-color:#3E9B5F;color:#FFFFFF}
.wt.s-y{background:#D4A84F;border-color:#D4A84F;color:#FFFFFF}
.wt.s-x{background:#7A8394;border-color:#7A8394;color:#FFFFFF}
.wrow.shake{animation:wshake .35s}
@keyframes wshake{25%{transform:translateX(6px)}50%{transform:translateX(-6px)}75%{transform:translateX(4px)}}
@media (prefers-reduced-motion: reduce){.wrow.shake{animation:none}}
.xkb button.k-g{background:#3E9B5F;color:#FFFFFF}
.xkb button.k-y{background:#D4A84F;color:#FFFFFF}
.xkb button.k-x{background:#7A8394;color:#FFFFFF;opacity:.75}
.xkb>div.r2.wide{width:100%}
.xkb button.enter{font-size:.95rem;font-weight:700}
.wend{width:100%;border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:12px 14px;display:flex;flex-direction:column;gap:4px;text-align:center}
.wend p{margin:0}
.wres{font-weight:700}
.wword{font-family:var(--f-word);font-size:1.8rem;letter-spacing:.06em}
.xwlist .anc b{color:var(--gold)}
/* the daily crossword card at the top of the learn tab */
.dcard{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:start;border:1px solid var(--line);border-inline-start:4px solid var(--gold);border-radius:12px;background:var(--surface);color:var(--ink);padding:10px 14px}
.dcard .dl,.dcard .dr{display:flex;flex-direction:column;gap:1px}
.dcard .dl b{font-family:var(--f-word);font-size:1.1rem}
.dcard .dl span,.dcard .dr span{font-size:.82rem;color:var(--muted)}
.dcard .dr{align-items:center;min-width:64px}
.dcard .dr b{font-size:1.05rem;font-variant-numeric:tabular-nums}
.stats.four{grid-template-columns:repeat(4,1fr)}
/* the invitation to add the web version to the home screen */
.install{margin-top:8px;border:1px dashed var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:4px;background:var(--surface)}
.install p{margin:0}
.install .link{min-height:32px;padding:2px 4px;font-size:.86rem}
/* the daily crossword button, the clock and the word list of the summary */
.xdaily{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:start;border:0;border-radius:14px;padding:14px 16px;background:var(--brand);color:var(--brand-ink);min-height:64px}
.xdaily b{font-family:var(--f-word);font-size:1.25rem;font-weight:900}
.xdaily span{font-size:.88rem;opacity:.9}
.xtime{font-variant-numeric:tabular-nums;color:var(--ink);font-weight:700;margin-inline-end:6px}
.xwlist{max-height:38vh;overflow-y:auto;width:100%}
.xwlist div{padding:6px 2px}
.xwlist span{color:var(--muted)}
/* the crossword setup: chapters in an even two-column list that scrolls inside its box, sized so the start button stays on screen */
.pkgrid{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:198px;overflow-y:auto;overscroll-behavior:contain;margin-top:8px;padding:2px;border:1px solid var(--line);border-radius:10px}
.pkgrid button{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:40px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:.86rem;text-align:start;min-width:0}
.pkgrid button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pkgrid button b{font-weight:600;color:var(--muted);font-size:.8rem;font-variant-numeric:tabular-nums}
.pkgrid button[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.pkgrid button[aria-pressed="true"] b{color:var(--brand-ink)}
.pkgrid button[disabled]{opacity:.4}
.xwgo{display:flex;flex-direction:column;gap:6px}
.xwgo p{margin:0}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}
/* the line over the board stays one line: the theme gives way, the buttons keep their place */
.xw > .row{width:100%;flex-wrap:nowrap;gap:8px}
.xw > .row > span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xw > .row > span:last-child{flex:none;white-space:nowrap}
/* the result of the selected word, beside its letters in the live bar */
.xbar .xmark{flex:none;font-size:1.25rem;line-height:1;font-weight:700}
.xbar .xmark.ok{color:var(--good)}
.xbar .xmark.no{color:var(--bad)}
/* the dictionary: the search with one small button beside it; filters and order open underneath */
.dsearch{display:flex;gap:8px;align-items:stretch}
.dsearch input{flex:1;min-width:0}
.morebtn{flex:none;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:10px;padding:0 12px;font-weight:600;font-size:.86rem;white-space:nowrap;min-height:44px}
.morebtn[aria-expanded="true"]{border-color:var(--brand);color:var(--brand)}
.dopts{display:flex;flex-direction:column;gap:10px}
/* the quiz: level and number of questions side by side */
.qrow{display:flex;gap:10px}
.qrow .field:first-child{flex:3}
.qrow .field:last-child{flex:2}
.pkpick .morebtn{min-height:36px;border-radius:999px;padding:0 12px}
/* 1.5.0: holding range, lifelines, archive, beta */
.hold { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.hold .holdl { flex: 1; text-align: start; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--ink); font: inherit; font-weight: 600; }
.hold .btn { flex: none; padding: 8px 14px; }
.hf em { font-style: normal; opacity: .8; margin-inline-start: 4px; }
.hubx { display: flex; gap: 18px; justify-content: flex-start; margin-top: 2px; padding: 0 4px; }
.hlink { background: none; border: 0; padding: 4px 2px; color: var(--brand-ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.alist { display: flex; flex-direction: column; gap: 8px; }
.arow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); padding: 6px 0; }
.arow .btn { padding: 6px 10px; font-size: .85rem; }
h1 .beta { font-size: .55rem; font-weight: 700; letter-spacing: .04em; background: var(--bad); color: var(--surface); border-radius: 6px; padding: 2px 6px; margin-inline-start: 8px; vertical-align: middle; }
.lab { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
/* 1.5.0: a definition cell whose words are solved is greyed, with a small ✓ in its corner */
.cell-clue.solved{background:var(--soft);color:var(--muted)}
.cell-clue .xq.done em{opacity:.55}
/* the pin: an open lock in a quiet colour while off, a closed lock, bold and filled, while on */
.xtools{gap:8px}
.xtools button.pin{flex:0 0 48px;display:flex;align-items:center;justify-content:center;color:var(--muted)}
.xtools button.pin svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.xtools button.pin.on{color:var(--brand-ink)}
.xtools button.pin.on svg{stroke-width:2.6}
.xtools button.pin.on svg rect{fill:currentColor;fill-opacity:.25}
/* 1.5.1: the bar that offers a new version, above the tab bar */
.upd{position:fixed;left:12px;right:12px;bottom:calc(var(--tabs-h,calc(64px + env(safe-area-inset-bottom,0px))) + 8px);z-index:60;border:0;border-radius:12px;padding:12px 14px;background:var(--brand);color:var(--brand-ink);font:inherit;font-weight:700;box-shadow:0 4px 16px rgba(0,0,0,.18);cursor:pointer}
.hold .holdl small{display:block;font-weight:400;font-size:.78rem;color:var(--brand)}
.review.prep>div{padding:6px 0}
/* the learning card follows the thumb: right for "זוכר", left for "לחזרה", up for "כבר מכיר" */
.card.drag{transition:none}
.card.fly{transition:transform .18s ease-out,opacity .18s ease-out}
.card .swhint{position:absolute;top:10px;inset-inline:10px;text-align:center;font-weight:700;border-radius:8px;padding:4px 8px;opacity:0;pointer-events:none}
.card .swhint.yes{background:var(--good-soft);color:var(--good)}
.card .swhint.no{background:var(--bad-soft);color:var(--bad)}
.card .swhint.known{background:var(--brand-soft);color:var(--brand)}
.knownrow{display:flex;justify-content:center;margin-top:4px}
#lcard{position:relative;touch-action:none}
.swtip{text-align:center;margin:6px 0 0}
@media (hover:hover){.swtip{display:none}}
/* the first opening: the words of the level chosen, as tags that wrap; a tag left out is struck through */
.chips.known{flex-wrap:wrap;overflow:visible;max-height:38vh;overflow-y:auto}
.chips.known .chip[aria-pressed="false"]{text-decoration:line-through;opacity:.55}
.bk-note{background:var(--soft);border-inline-start:3px solid var(--gold);border-radius:10px;padding:10px 12px;margin:0 0 14px;font-size:.9rem}
.bk-note p{margin:0 0 8px}
.bk-note .row{display:flex;gap:8px}
.bk-note .btn{flex:1;padding:8px 10px}
.xw .xname{color:var(--ink);font-weight:700}
.xbar .xsolved b{color:var(--xok)}
.xbar #xw-sum{flex:none;padding:8px 16px;min-height:0}
/* 🛠️ the beta only: every edition in the archive, the bar of editions above a board or a word, and the solution shown faint */
.three{display:grid;grid-template-columns:1fr auto auto;gap:8px;width:100%}
.atag{display:inline-block;font-size:.7rem;padding:1px 6px;border-radius:8px;border:1px solid var(--line);vertical-align:middle}
.atag.fut{color:var(--gold);border-color:var(--gold)}
.atag.now{color:var(--good);border-color:var(--good)}
.arow.fut{opacity:.85}
.labnav{display:flex;align-items:center;gap:6px;padding:2px 6px;margin:0 0 2px;border:1px dashed var(--gold);border-radius:10px;font-size:.8rem;white-space:nowrap;min-height:34px}
.labnav .lnc{flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis}
.labnav .lnb{min-width:30px;height:28px;padding:0 6px;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;font-size:1.1rem;line-height:1}
.labnav .lnb.go{font-size:.9rem}
.labnav .lnb:disabled{opacity:.35}
.labnav input{width:3.6em;height:28px;padding:0 4px;font-size:.8rem;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;-moz-appearance:textfield}
.labnav input::-webkit-outer-spin-button,.labnav input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.labnav .link{font-size:.8rem;padding:0 2px}
.cell-letter.peek{color:var(--muted);opacity:.75}
/* the quiz setup: one card per choice, the same even controls in each */
.qsetup{display:flex;flex-direction:column;gap:12px}
.qsetup h2{margin:0}
.qcard{display:flex;flex-direction:column;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px}
.qcard .seg{background:var(--soft)}
.qcard .seg button[aria-pressed="true"]{background:var(--brand);color:var(--brand-ink);box-shadow:none}
.qcard .seg.grid2 button:last-child:nth-child(odd){grid-column:1/-1}
.qcard .qsub{display:flex;flex-direction:column;gap:6px;padding-top:2px}
.qcard .qsub .pkpick .chip{font-size:.85rem;min-height:36px}
.qcard .qsub .two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.qcard .qcount{margin:0;font-size:.86rem;font-weight:700;color:var(--ink)}
.qsetup .qbest{margin:0;text-align:center}
.qsetup p.small{margin:0}
/* the crossword: the ? button and "איך פותרים את התשחץ?" */
.xhelp{width:30px;height:30px;border-radius:50%;border:1.5px solid var(--brand);background:transparent;color:var(--brand);font-weight:800;font-size:1rem;line-height:1;margin-inline-end:10px;vertical-align:middle}
.xhelpbox{display:flex;flex-direction:column;gap:12px;overflow-wrap:anywhere}
.xhelpbox h2{margin:0}
.xhl{margin:0;padding:0 18px 0 0;display:flex;flex-direction:column;gap:10px;line-height:1.55}
.xhl li{padding-inline-start:2px}
.xh-a{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.2em;margin:0 2px;color:var(--brand);font-style:normal}
.xh-a svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.xh-k{display:inline-block;padding:0 6px;border-radius:6px;background:var(--soft);font-weight:700;white-space:nowrap}
/* the page picker: two wheels side by side, swiped up and down; the item in the band in the middle is the one chosen */
.dpick{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:8px;min-width:0}
.dpcol{display:flex;flex-direction:column;gap:4px;min-width:0}
.dplab{font-size:.75rem;color:var(--muted);text-align:center}
.dpwin{position:relative;border-radius:12px;background:var(--soft);overflow:hidden}
/* the band in the middle stays still; the items turn through it */
.dpwin::before{content:'';position:absolute;left:4px;right:4px;top:36px;height:36px;border-radius:10px;background:var(--brand);pointer-events:none}
/* before a chapter is chosen nothing is selected: the band is only an outline, so the row under it reads in the normal ink */
.dpick.none .dpwin::before{background:transparent;box-shadow:inset 0 0 0 2px var(--brand)}
.dpstrip{position:relative;height:108px;overflow-y:auto;overflow-x:hidden;scroll-snap-type:y mandatory;overscroll-behavior-x:contain;overscroll-behavior-y:auto;
  display:flex;flex-direction:column;padding:36px 4px;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 22%,#000 78%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 22%,#000 78%,transparent)}
.dpstrip::-webkit-scrollbar{display:none}
.dpi{flex:0 0 36px;height:36px;width:100%;scroll-snap-align:center;padding:0 8px;border:0;border-radius:10px;background:transparent;color:var(--ink);
  font:inherit;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dpi.pk{font-size:.9rem;text-align:right}
.dpi.skip{font-size:.85rem;color:var(--muted)}
.dpi[aria-pressed="true"]{color:var(--brand-ink);font-weight:700}
.dprange{display:flex;flex-direction:column;gap:4px;min-width:0}
.dprange .label{margin-top:4px}
.dphint{display:flex;align-items:center;justify-content:center;height:36px;flex:0 0 36px}
.dpstrip{cursor:grab}
.dpstrip.dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.dpstrip.dragging .dpi{pointer-events:none}
.dpstep{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.dpstep b{font-size:.95rem}
.dpback{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:.9rem;text-align:right}
.dpback .dpchg{color:var(--brand);font-weight:700;white-space:nowrap}
.dprange .dpone{margin:0}
.dprange .btn{margin-top:2px}
/* the range of pages: one line on the page, the wheels in a window from the bottom */
.dpsum{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:.95rem;line-height:1.5;text-align:right}
.dpsum .dpchg{color:var(--brand);font-weight:700;white-space:nowrap}
.dpmodal{position:fixed;inset:0;z-index:60;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,0);transition:background .2s}
.dpmodal.on{background:rgba(0,0,0,.45)}
.dpm-panel{width:100%;max-width:560px;background:var(--bg);border-radius:18px 18px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .2s ease-out;box-shadow:0 -6px 24px rgba(0,0,0,.25)}
.dpmodal.on .dpm-panel{transform:none}
.dpm-body{display:flex;flex-direction:column;gap:10px}
.dpm-act{display:grid;grid-template-columns:1fr 2fr;gap:8px;margin-top:4px}
.dpm-panel .dpstrip{height:180px;padding:72px 4px}
.dpm-panel .dpwin::before{top:72px}
/* 1.6: the "Gemara page" look: parchment and ink, the classic Hebrew print face for the title, a double rule under it,
   bold readable text everywhere else */
body{font-weight:600}
body{background-image:radial-gradient(ellipse at 50% -10%,rgba(166,120,42,.10),transparent 60%);background-attachment:fixed}
:root[data-theme="dark"] body{background-image:none}
h2,h3{font-family:var(--f-ui);font-weight:700}
.top{padding:14px 16px 10px;margin:0 16px;padding-inline:0;border-bottom:3px double var(--rule)}
.top h1{font-size:1.85rem;letter-spacing:.01em}
.top h1 small{font-size:.5em;font-weight:600;letter-spacing:0;margin-top:4px}
.iconbtn{border-radius:50%;width:44px;min-width:44px;padding:0;display:inline-grid;place-items:center;color:var(--muted)}
.iconbtn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#btn-theme{padding:0}
.panel{padding-top:14px}
/* the challenges of the day: a dark card with a light frame, one inner card per game */
.hub{background:var(--hero);color:var(--hero-ink);border-radius:16px;padding:14px;gap:10px;position:relative;box-shadow:0 10px 24px -14px rgba(40,20,8,.6)}
:root:not([data-theme="dark"]) .hub::before{content:"";position:absolute;inset:6px;border:1px solid var(--hero-line);border-radius:11px;pointer-events:none}
.hubh{font-size:1.05rem;opacity:1;margin:2px 6px 0;position:relative}
.hubg{gap:10px;position:relative}
.hcard{background:var(--hero-card);color:var(--hero-ink);border:1px solid var(--hero-line);border-radius:12px;padding:12px;gap:4px;min-height:0}
.hcard b{font-family:var(--f-ui);font-size:1.02rem;font-weight:700}
.hcard .ht{color:var(--hero-sub);font-size:.84rem;font-weight:600;margin-bottom:8px}
.hcard .hs{margin-top:auto;background:var(--cta);color:var(--cta-ink);border-radius:999px;padding:3px 14px;font-size:.88rem}
.hcard .hs.ok{background:none;color:#9CC587;padding:3px 0}
.hcard .hf{color:var(--hero-sub);font-size:.84rem}
.hico{display:grid;gap:2px;height:26px;align-content:center;margin-bottom:2px}
.hico i{display:block;border-radius:2px;background:#6D4A2E}
.hico.xw{grid-template-columns:repeat(3,8px)}
.hico.xw i{width:8px;height:8px}
.hico.wd{grid-auto-flow:column;grid-auto-columns:13px}
.hico.wd i{width:13px;height:13px;border-radius:3px}
.hico i.g{background:#7FA35E}.hico i.y{background:#D6A84C}
.hlink{color:var(--link);text-decoration:none;font-weight:700}
.hubx{position:relative;padding:0 6px}
/* today's study: a ring of what is known, the three numbers beside it, the start button under them */
.today{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px}
.today .btn{grid-column:1/-1}
.ring{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--brand) calc(var(--p,0)*360deg),var(--gold-soft) 0)}
.ring>span{width:78px;height:78px;border-radius:50%;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.05;text-align:center}
.ring b{font-size:1.65rem;font-weight:700;font-variant-numeric:tabular-nums}
.ring small{font-size:.74rem;color:var(--muted);margin-top:2px}
.tlist{display:flex;flex-direction:column;min-width:0}
.tlist h3{margin:0 0 4px;font-size:1.15rem}
.tlist div{display:flex;justify-content:space-between;gap:8px;padding:3px 0;border-bottom:1px dotted var(--line);font-size:.95rem}
.tlist div:last-child{border:0}
.tlist div b{font-variant-numeric:tabular-nums}
.btn{box-shadow:0 6px 14px -9px rgba(60,25,10,.7)}
.btn.line,.btn.ghost{box-shadow:none}
.scopebar,.dpsum,.stat,.qcard,.wend,.install,.hud div{border-radius:14px}
/* the games: cards instead of a bare list */
.menu{border-top:0;gap:10px}
.menu button{border:1px solid var(--line);border-radius:14px;background:var(--surface);padding:14px 16px}
.menu button b{font-family:var(--f-ui);font-size:1.08rem}
/* the tab bar: a gold mark over the open tab */
.tabs{border-top:1px solid var(--rule)}
.tabs button{font-size:.82rem;font-weight:700;position:relative}
.tabs button i{position:absolute;top:-1px;width:36px;height:3px;border-radius:0 0 3px 3px}
.tabs button[aria-selected="true"] i{background:var(--gold)}
:root[data-theme="dark"] .tabs button[aria-selected="true"] i{background:var(--brand)}
.wt.s-x{background:#8A7B6A;border-color:#8A7B6A}
.xkb button.k-x{background:#8A7B6A}
.sheet{background:rgba(30,18,8,.55)}
