:root {

  --bg: #FAF7F0;
  --bg-alt: #F2EDE1;
  --surface: #FFFFFF;
  --sunken: #F2EDE1;
  --outline: #EAE3D2;
  --outline-strong: #DBCEB2;
  --text: #23261A;
  --text-2: #6A6552;
  --text-3: #9C947E;
  --text-on-brand: #FFFFFF;
  --text-on-grad: #F0F6DE;
  --text-on-grad-strong: #FFFFFF;
  --brand: #4A5A33;
  --brand-pressed: #3A4826;
  --brand-container: #E7EDD7;
  --on-brand-container: #33421F;
  --accent: #A97C25;
  --accent-container: #F7EACB;
  --on-accent-container: #6C4A0C;
  --success: #2E7A4E;
  --success-container: #DAF0E2;
  --error: #B4472F;
  --header: #4C5D31;
  --need-border: #DAC28F;
  --need-top: #FAF3E2;
  --glass: rgba(255, 255, 255, .15);
  --glass-soft: rgba(255, 255, 255, .13);
  --glass-line: rgba(255, 255, 255, .22);

  --shadow-row: 0 1px 1px rgba(45, 50, 25, .035);
  --shadow-card: 0 1px 2px rgba(45, 50, 25, .045), 0 10px 24px -18px rgba(45, 50, 25, .20);
  --shadow-nav: 0 2px 4px rgba(45, 50, 25, .05), 0 18px 40px -24px rgba(45, 50, 25, .30);
  --shadow-lift: 0 2px 4px rgba(45, 50, 25, .05), 0 20px 44px -26px rgba(45, 50, 25, .34);
  --scrim: rgba(15, 17, 8, .5);

  --r: 5px;
  --fs: 1;
  --ease: cubic-bezier(.05, .7, .1, 1);
  --ease-out: cubic-bezier(.22, .72, .16, 1);
  --spring: cubic-bezier(.22, 1.16, .36, 1);

  --grid-max: 1180px;
  --content-max: 720px;

  --q-gap-s:  clamp(.56rem, 1.5vw, .75rem);
  --q-gap-m:  clamp(.75rem, 2.2vw, 1rem);
  --q-gap-l:  clamp(1rem, 3vw, 1.38rem);
  --q-gap-xl: clamp(1.25rem, 4vw, 1.75rem);
  --q-pad-card: clamp(.94rem, 3.2vw, 1.15rem);

  --q-fs-question: clamp(1.06rem, 4.6vw, 1.25rem);
  --q-fs-option:   clamp(.97rem, 3.6vw, 1rem);
  --q-fs-verd-t:   clamp(1rem, 3.9vw, 1.06rem);
  --q-fs-verd-s:   clamp(.78rem, 3vw, .82rem);
  --q-fs-verd-why: clamp(.9rem, 3.4vw, .94rem);
  --q-fs-verd-lbl: clamp(.7rem, 2.7vw, .73rem);
  --q-fs-key:      clamp(.75rem, 2.8vw, .8rem);

  --lh-body: 1.9;
  --lh-head: 1.72;
  --rail-w: 252px;
  --shell-max: 1320px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #15170E;
  --bg-alt: #1B1F11;
  --surface: #212614;
  --sunken: #1B1F11;
  --outline: #333823;
  --outline-strong: #464C31;
  --text: #EFEBD9;
  --text-2: #ADA68C;
  --text-3: #7D765D;
  --text-on-brand: #12160B;
  --text-on-grad: #F0F6DE;
  --text-on-grad-strong: #F0F6DE;
  --brand: #B3CC82;
  --brand-pressed: #C9DCA2;
  --brand-container: #2B3419;
  --on-brand-container: #CFE2A6;
  --accent: #E6BC6A;
  --accent-container: #3B2F13;
  --on-accent-container: #F5DCA6;
  --success: #6FD39A;
  --success-container: #12331F;
  --error: #E8836A;
  --header: #33421F;
  --need-border: #6C6552;
  --need-top: #2B2713;
  --glass: rgba(255, 255, 255, .15);
  --glass-soft: rgba(255, 255, 255, .13);
  --glass-line: rgba(255, 255, 255, .22);
  --shadow-row: 0 1px 1px rgba(0, 0, 0, .22);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .26), 0 12px 26px -20px rgba(0, 0, 0, .55);
  --shadow-nav: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 40px -24px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .3), 0 22px 46px -26px rgba(0, 0, 0, .62);
  --scrim: rgba(10, 12, 5, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  transition: background .3s;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

.more-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
@media (min-width: 760px) { .more-wrap { grid-column: 1 / -1; } }
.load-more {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding-inline: 22px;
  background: var(--surface); color: var(--brand-pressed);
  border: 1px solid var(--outline-strong); border-radius: var(--r);
  font-size: calc(14px * var(--fs)); font-weight: 700;
  box-shadow: var(--shadow-row);
  transition: transform .13s var(--ease), background .2s, border-color .2s;
}
.load-more:active { transform: scale(.97); }
.load-more:hover { border-color: var(--brand); background: var(--brand-container); }
.load-more svg { width: 18px; height: 18px; }
.load-more .rem {
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: var(--text-3);
  background: var(--sunken); border-radius: 999px; padding: 2px 10px;
}

.app-header {
  background: var(--header);
  color: var(--text-on-grad-strong);
  padding: 22px 16px 12px;
  min-height: 99px;
  display: flex; align-items: center; gap: 11px;
}
.icb {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r);
  color: var(--text-on-grad-strong);
  transition: transform .13s var(--ease), background .2s;
}
.icb:active { transform: scale(.96); }
.icb svg { width: 20px; height: 20px; }
.app-header .h-col { min-width: 0; flex: 1; }
.h-title { font-size: calc(20px * var(--fs)); font-weight: 700; line-height: 1.3; color: var(--text-on-grad-strong); }
.h-sub { font-size: calc(12.5px * var(--fs)); color: var(--text-on-grad); margin-top: 2px; }

.home-hero { background: var(--header); padding: 22px 16px 20px; color: var(--text-on-grad-strong); }
.home-hero .row1 { display: flex; align-items: center; gap: 11px; }
.greet-small { font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--text-on-grad); }
.greet-big { font-size: calc(20px * var(--fs)); font-weight: 700; line-height: 1.35; color: var(--text-on-grad-strong); }
.hero-search {
  margin-top: 16px; height: 48px; width: 100%;
  display: flex; align-items: center; gap: 9px;
  background: var(--glass); border: 1px solid var(--glass-line);
  border-radius: var(--r); padding-inline: 14px;
  color: var(--text-on-grad); font-size: calc(14.5px * var(--fs));
}
.hero-search svg { width: 19px; height: 19px; flex: none; }
.hero-stats { display: flex; gap: 8px; margin-top: 14px; }
.hero-stat {
  flex: 1; text-align: center; padding: 10px 8px;
  background: var(--glass-soft); border: 1px solid var(--glass-line);
  border-radius: var(--r);
}
.hero-stat .v { font-size: calc(18px * var(--fs)); font-weight: 700; color: var(--text-on-grad-strong); }
.hero-stat .l { font-size: calc(10.5px * var(--fs)); color: var(--text-on-grad); margin-top: 2px; }

.stage { padding: 18px 16px 118px; flex: 1; }
.view { display: none; }
.view.active { display: block; }

.sect {
  display: flex; align-items: center; gap: 9px;
  font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--text);
  margin: 22px 0 10px;
}
.sect::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px; flex: none;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-pressed) 100%);
}
.sect .act {
  margin-inline-start: auto; font-size: calc(13px * var(--fs));
  font-weight: 600; color: var(--brand); min-height: 40px;
  display: inline-flex; align-items: center;
}

.bmain {
  width: 100%; display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r); box-shadow: var(--shadow-card);
  padding: 15px; margin-top: 16px;
  transition: transform .13s var(--ease);
}
.bmain:active { transform: scale(.98); }
.bplay {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  background: var(--brand); border-radius: var(--r); color: var(--text-on-brand);
}
.bplay svg { width: 22px; height: 22px; }
.bmain .col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bmain .t { display: block; font-size: calc(15.5px * var(--fs)); font-weight: 700; }
.bmain .s { font-size: calc(12.5px * var(--fs)); color: var(--text-2); margin-top: 2px; }
.chev { width: 19px; height: 19px; flex: none; color: var(--text-3); }
html[dir="rtl"] .chev { transform: scaleX(-1); }

.bento2 { display: flex; gap: 10px; margin-top: 10px; }
.bcell {
  flex: 1; background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r); box-shadow: var(--shadow-card); padding: 14px;
  transition: transform .13s var(--ease);
}
.bcell:active { transform: scale(.97); }
.bic {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--brand-container); border-radius: var(--r);
  color: var(--brand); margin-bottom: 10px;
}
.bic svg { width: 20px; height: 20px; }
.bcell .t { display: block; font-size: calc(14.5px * var(--fs)); font-weight: 700; }
.bcell .s { font-size: calc(11.5px * var(--fs)); line-height: 17px; color: var(--text-2); margin-top: 2px; }

.srow {
  width: 100%; position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 72px; background: var(--surface);
  border: 1px solid var(--outline); border-radius: var(--r);
  box-shadow: var(--shadow-row);
  padding: 12px; margin-bottom: 10px;
  overflow: hidden;
  transition: transform .13s var(--ease);
}
.srow:active { transform: scale(.98); }
.srow::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0;
  width: 4px; background: var(--text-3); opacity: .55;
}
.srow.neutral::before { background: var(--brand); opacity: .8; }
.sic {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: var(--brand-container); border-radius: var(--r); color: var(--brand);
}
.sic svg { width: 23px; height: 23px; }
.sic .glyph { font-size: 17px; font-weight: 700; color: var(--brand); }
.srow .col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srow .t {
  display: block;
  font-size: calc(15px * var(--fs)); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.srow .s { display: block; font-size: calc(11.5px * var(--fs)); color: var(--text-2); margin-top: 2px; }

.frow {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 76px; background: var(--surface);
  border: 1px solid var(--outline); border-radius: var(--r);
  box-shadow: var(--shadow-row);
  padding: 12px 13px; margin-bottom: 8px;
  transition: transform .13s var(--ease);
}
.frow:active { transform: scale(.98); }
.fdoc {
  width: 44px; height: 52px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--brand-container); border-radius: var(--r); color: var(--brand);
}
.fdoc svg { width: 21px; height: 21px; }
.fdoc .pages { font-size: 9.5px; font-weight: 700; color: var(--text-2); direction: ltr; }
.frow .col { flex: 1; min-width: 0; }
.frow .t {
  font-size: calc(14.5px * var(--fs)); font-weight: 600; line-height: 21px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.frow .meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; margin-top: 4px;
  font-size: calc(11.5px * var(--fs)); color: var(--text-2);
  line-height: var(--lh-body);
}
.frow .meta > span { white-space: nowrap; }
.frow .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); flex: none; }
.frow .meta .size { font-weight: 700; color: var(--accent); direction: ltr; unicode-bidi: isolate; }
.frow .meta .ans { font-weight: 700; color: var(--success); }
.fact {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: var(--r); color: var(--text-3);
  transition: transform .13s var(--ease), color .2s;
}
.fact:active { transform: scale(.9); }
.fact.on { color: var(--accent); }
.fact svg { width: 19px; height: 19px; }
.fgo {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  background: var(--sunken); border-radius: var(--r); color: var(--text-2);
}
.fgo svg { width: 19px; height: 19px; }
html[dir="rtl"] .fgo svg { transform: scaleX(-1); }

.frow-wrap { position: relative; }
.frow-wrap .star-pad { width: 40px; flex: none; }
.frow-wrap .fact {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-end: 65px;
}
.frow-wrap .fact:active { transform: translateY(-50%) scale(.88); }

.grp-title {
  display: flex; align-items: center; gap: 7px;
  font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--text);
  margin: 18px 0 10px;
}
.grp-title::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px; flex: none;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-pressed) 100%);
}

.pillbar-wrap {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); padding: 16px 16px 0;
}
.pillbar {
  height: 56px; background: var(--surface);
  border: 1px solid var(--outline); border-radius: var(--r);
  padding: 4px; display: flex; overflow-x: auto; scrollbar-width: none;
}
.pillbar::-webkit-scrollbar { display: none; }
.pill {
  flex: 1 0 auto; min-width: max-content;
  padding-inline: 18px; border-radius: var(--r);
  font-size: calc(14px * var(--fs)); font-weight: 600; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .43s var(--ease), background .43s var(--ease);
  white-space: nowrap;
}
.pill.on { background: var(--brand); color: var(--text-on-brand); font-weight: 700; }

.cta-tonal {
  width: 100%; height: 56px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--brand-container); border-radius: var(--r);
  color: var(--on-brand-container); font-size: calc(14.5px * var(--fs)); font-weight: 700;
  transition: transform .13s var(--ease);
}
.cta-tonal:active { transform: scale(.98); }
.cta-tonal svg { width: 19px; height: 19px; }

.group-title { margin-top: 22px; }

.empty-box { text-align: center; padding: 34px 22px; }
.empty-box .eic {
  width: 76px; height: 76px; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: var(--brand-container); border-radius: var(--r); color: var(--brand);
}
.empty-box .eic.sunk { background: var(--sunken); color: var(--text-3); }
.empty-box .eic svg { width: 34px; height: 34px; }
.empty-box .et { font-size: calc(17px * var(--fs)); font-weight: 700; }
.empty-box .eb {
  font-size: calc(13.5px * var(--fs)); line-height: 24px; color: var(--text-2);
  max-width: 290px; margin: 8px auto 0;
}

.sfield {
  min-height: 52px; display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--outline-strong);
  border-radius: var(--r); padding-inline: 14px; margin-top: 16px;
}
.sfield svg { width: 19px; height: 19px; color: var(--text-3); flex: none; }
.sfield input {
  flex: 1; border: 0; background: none; color: var(--text);
  font: inherit; font-size: calc(15px * var(--fs)); min-width: 0;
}
.sfield input::placeholder { color: var(--text-3); }
.sfield input:focus { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-s {
  min-height: 44px; padding-inline: 14px; display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--outline-strong);
  border-radius: var(--r); font-size: calc(14px * var(--fs)); font-weight: 600; color: var(--text-2);
  transition: transform .13s var(--ease);
}
.chip-s:active { transform: scale(.95); }
.hl { color: var(--brand); font-weight: 700; }

.set-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r); box-shadow: var(--shadow-row);
  overflow: hidden;
}
.set-row {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 12px 13px;
}
.set-row + .set-row { border-top: 1px solid var(--outline); }
.set-ic {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: var(--brand-container); border-radius: var(--r); color: var(--brand);
}
.set-ic svg { width: 19px; height: 19px; }
.set-row .col { flex: 1; min-width: 0; }
.set-row .t { font-size: calc(14.5px * var(--fs)); font-weight: 600; }
.set-row .s { font-size: calc(11.5px * var(--fs)); line-height: 17px; color: var(--text-2); margin-top: 2px; }

.sw { width: 48px; height: 28px; flex: none; position: relative; border-radius: 20px; background: var(--outline-strong); transition: background .2s; }
.sw::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .18s cubic-bezier(.34, 1.22, .5, 1);
}
.sw.on { background: var(--brand); }
.sw.on::after { transform: translateX(-20px); }

.seg { height: 44px; display: inline-flex; background: var(--sunken); border: 1px solid var(--outline); border-radius: var(--r); padding: 3px; flex: none; }
.seg button {

  display: inline-flex; align-items: center; justify-content: center;
  text-align: center;
  padding-inline: 11px; border-radius: var(--r);
  font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2);
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.seg button.on { background: var(--surface); color: var(--brand-pressed); font-weight: 700; box-shadow: var(--shadow-row); }

.set-row.wraps { flex-wrap: wrap; }
.set-row.wraps .seg { flex: 1 1 100%; margin-inline-start: 50px; margin-top: 2px; display: flex; }
.set-row.wraps .seg button { flex: 1; }

.bottom-nav {
  position: fixed; bottom: 12px; inset-inline: 0; z-index: 60;
  margin-inline: auto;
  width: min(calc(100% - 24px), 616px);
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow-nav);
  display: flex;
}
.tab {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-2);
  transition: color .43s var(--ease);
}
.tab svg { width: 22px; height: 22px; transition: transform .32s cubic-bezier(.34, 1.22, .5, 1); }
.tab .l { font-size: calc(11px * var(--fs)); font-weight: 600; }
.tab.on { color: var(--brand); }
.tab.on svg { transform: scale(1.06) translateY(-1px); }
.tab .ind {
  position: absolute; top: 0; inset-inline: 26%;
  height: 4px; border-radius: 0 0 5px 5px;
  background: var(--brand);
  transform: scaleX(0); opacity: 0;
  transition: transform .43s var(--ease), opacity .43s var(--ease);
}
.tab.on .ind { transform: scaleX(1); opacity: 1; }

.drawer-scrim {
  position: fixed; inset: 0; z-index: 80; background: var(--scrim);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 81;
  width: min(300px, 84vw);
  background: var(--surface);
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
html[dir="rtl"] .drawer { }
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer-head {
  min-height: 224px;
  background: linear-gradient(315deg, #3B4B26 0%, #4C5D31 62%, #5A7040 100%);
  color: var(--text-on-grad-strong);
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px 18px 18px;
}
html[data-theme="dark"] .drawer-head { background: linear-gradient(315deg, #232D14 0%, #33421F 62%, #3E5027 100%); }

.drawer-head .dtitle {
  font-size: calc(16px * var(--fs)); font-weight: 700;
  line-height: var(--lh-head); color: var(--text-on-grad-strong); margin: 0;
}
.drawer-head .dsub {
  font-size: calc(12px * var(--fs)); font-weight: 400;
  line-height: var(--lh-body); color: var(--text-on-grad); margin: 2px 0 0;
}
.drawer-head .dlogo img { width: 30px; height: 30px; display: block; }
.drawer-head .dlogo {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r);
  margin-bottom: 11px;
}
.drawer-head .dlogo img { width: 30px; height: 30px; }
.drawer-head .dt { font-size: 16px; font-weight: 700; color: #FFFFFF; }
.drawer-head .ds { font-size: 12px; color: var(--text-on-grad); margin-top: 2px; }
.drawer-list { padding: 10px; flex: 1; }
.drow {
  width: 100%; min-height: 50px; display: flex; align-items: center; gap: 12px;
  padding-inline: 12px; border-radius: var(--r);
  font-size: calc(14.5px * var(--fs)); font-weight: 600; color: var(--text-2);
}
.drow svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
.drow.on { background: var(--brand-container); color: var(--on-brand-container); }
.drawer-sep { height: 1px; background: var(--outline); margin: 9px 12px; }
.drawer-foot {
  border-top: 1px solid var(--outline);
  padding: 14px 18px; font-size: 11.5px; color: var(--text-2);
}

.btn-solid {
  width: 100%; min-height: 54px; margin-top: 16px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--brand); color: var(--text-on-brand);
  border-radius: var(--r); font-size: calc(16px * var(--fs)); font-weight: 700;
  transition: transform .13s var(--ease), background .2s;
}
.btn-solid:active { transform: scale(.98); background: var(--brand-pressed); }
.btn-solid svg { width: 19px; height: 19px; }
.btn-ghost2 {
  width: 100%; min-height: 54px; margin-top: 9px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--outline-strong); color: var(--text);
  border-radius: var(--r); font-size: calc(16px * var(--fs)); font-weight: 700;
  transition: transform .13s var(--ease);
}
.btn-ghost2:active { transform: scale(.98); }

.snack {
  position: fixed; z-index: 95;
  bottom: 88px; inset-inline: 0; margin-inline: auto;
  width: max-content; max-width: min(92vw, 500px);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--outline-strong);
  border-inline-start: 4px solid var(--brand);
  border-radius: var(--r); box-shadow: var(--shadow-nav);
  padding: 12px 16px; font-size: calc(13.5px * var(--fs)); font-weight: 600;
  opacity: 0; transform: translateY(14px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}
.snack.show { opacity: 1; transform: none; }
.snack.amber { border-inline-start-color: var(--accent); }
.snack.ok { border-inline-start-color: var(--success); }

.about-hero {
  margin-top: 16px; padding: 26px 20px 22px;
  background: linear-gradient(315deg, #3B4B26 0%, #4C5D31 62%, #5A7040 100%);
  border-radius: 10px;
  color: #FFFFFF; text-align: center;
  position: relative; overflow: hidden;
}
html[data-theme="dark"] .about-hero { background: linear-gradient(315deg, #232D14 0%, #33421F 62%, #3E5027 100%); }
.about-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero-shelves.svg") center bottom / cover no-repeat;
  opacity: .16;
}
.about-hero > * { position: relative; }
.about-hero img { width: 110px; margin: 0 auto 12px; }
.about-hero .aw { font-size: calc(14.5px * var(--fs)); font-weight: 600; color: #E6C77F; margin-top: 3px; }
.about-hero .av { font-size: calc(11.5px * var(--fs)); color: var(--text-on-grad); margin-top: 10px; }
.about-stats { display: flex; gap: 8px; margin-top: 16px; }
.about-stat {
  flex: 1; background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r); box-shadow: var(--shadow-row);
  text-align: center; padding: 13px 6px;
}
.about-stat .v { font-size: calc(19px * var(--fs)); font-weight: 700; direction: ltr; }
.about-stat .l { font-size: calc(11px * var(--fs)); color: var(--text-2); margin-top: 2px; }
.about-card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r); box-shadow: var(--shadow-row);
  padding: 16px;
}
.about-card .body { font-size: calc(14px * var(--fs)); line-height: 26px; color: var(--text-2); }

.about-sign {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  margin-top: 12px; color: var(--brand);
  font-family: var(--f-body, 'IBM Plex Sans Arabic', system-ui, sans-serif);
  font-size: calc(14px * var(--fs)); font-weight: 400; letter-spacing: 0;
}
.about-sign svg { width: 15px; height: 15px; }
.social-row {
  width: 100%; min-height: 58px; display: flex; align-items: center; gap: 11px;
  padding-inline: 12px;
}
.social-row + .social-row { border-top: 1px solid var(--outline); }
.social-row .tile {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: var(--brand-container); border-radius: 11px; color: var(--brand);
}
.social-row .tile svg { width: 20px; height: 20px; }
.social-row .l { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2); }
.about-foot {
  text-align: center; font-size: calc(14px * var(--fs)); line-height: 26px;
  color: var(--text-2); opacity: .75; margin-top: 22px;
}

html.js .mv { opacity: 0; transform: translateY(28px); }
html.js .mv.in {
  opacity: 1; transform: none;
  transition: opacity .48s var(--ease), transform .48s var(--ease);
  transition-delay: calc(min(var(--i, 0), 7) * 65ms);
}
html.js .mv.now { transition: none; transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.js .mv { opacity: 1; transform: none; }
  html.js .mv.in { transition: none; transition-delay: 0s; }
}

@media (max-width: 380px) {
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { flex: 1 1 40%; }
}

[data-u~="abs"]{position:absolute}
[data-u~="centerpage"]{min-height:100dvh;display:grid;place-items:center}
[data-u~="centerrow"]{justify-content:center;margin-top:1rem}
[data-u~="gold"]{color:var(--gold-2)}
[data-u~="panel"]{background:var(--bg);color:var(--text)}
[data-u~="chipflat"]{background:var(--sunken);border-color:var(--outline);color:var(--text-2)}
[data-u~="ink"]{color:var(--text)}
[data-u~="ink2"]{color:var(--text-2)}
[data-u~="mt2"]{margin-top:2px}
[data-u~="mt6"]{margin-top:6px}
[data-u~="pt16"]{padding-top:18px}
[data-u~="wfull"]{width:100%}
[data-u~="flex"]{display:flex}
[data-u~="noscript"]{padding:24px;text-align:center;font-family:Tahoma,sans-serif}

.file-grid > :nth-child(1), .subj-grid > :nth-child(1) { --i: 0; }
.file-grid > :nth-child(2), .subj-grid > :nth-child(2) { --i: 1; }
.file-grid > :nth-child(3), .subj-grid > :nth-child(3) { --i: 2; }
.file-grid > :nth-child(4), .subj-grid > :nth-child(4) { --i: 3; }
.file-grid > :nth-child(5), .subj-grid > :nth-child(5) { --i: 4; }
.file-grid > :nth-child(6), .subj-grid > :nth-child(6) { --i: 5; }
.file-grid > :nth-child(7), .subj-grid > :nth-child(7) { --i: 6; }
.file-grid > :nth-child(8), .subj-grid > :nth-child(8) { --i: 7; }
.file-grid > :nth-child(n+9), .subj-grid > :nth-child(n+9) { --i: 7; }
#guidesList > :nth-child(1) { --i: 4; }
#guidesList > :nth-child(2) { --i: 5; }
#guidesList > :nth-child(3) { --i: 6; }

.stage-msg { padding: 40px 0; text-align: center; color: var(--text-2); font-size: calc(13.5px * var(--fs)); }
.empty-box.pad-top { padding-top: 60px; }
.btn-solid.narrow { max-width: 280px; margin-inline: auto; }

.sect::after {
  content: ""; flex: 1; height: 1px; margin-inline-start: 4px;
  background: repeating-linear-gradient(to left, var(--outline-strong) 0 6px, transparent 6px 13px);
  opacity: .7;
}
.sect .act { margin-inline-start: 12px; }

.srow::before { width: 5px; opacity: 1; transition: width .18s var(--ease); }
.srow.tr-common::before { background: var(--brand); }
.srow.tr-scientific::before { background: var(--brand-pressed); }
.srow.tr-literary::before { background: var(--accent); }
.srow::after {
  content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 5px;
  background:
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) 0 0 / 100% 2px no-repeat,
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) 0 100% / 100% 2px no-repeat;
  pointer-events: none;
}
@media (hover:hover) {
  .srow:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
  .srow:hover::before { width: 8px; }
  .frow:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
  .bcell:hover, .bmain:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
  .load-more:hover { transform: translateY(-1px); }
}

.frow { position: relative; overflow: hidden; }
.frow::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px;
  background: var(--outline-strong);
}
.k-book .frow::before { background: var(--brand); }
.k-note .frow::before, .k-worksheet .frow::before { background: var(--brand-pressed); opacity: .75; }
.k-qbank .frow::before { background: var(--accent); }
.k-exam .frow::before { background: var(--accent); }
.k-answer .frow::before { background: var(--success); }
.k-exam .fdoc { background: var(--accent-container); color: var(--on-accent-container); }
.k-answer .fdoc { background: var(--success-container); color: var(--success); }

.more-wrap { align-items: center; gap: 14px; padding: 10px 0 4px; }
.more-wrap .thread {
  flex: 1; height: 1px;
  background: repeating-linear-gradient(to left, var(--outline-strong) 0 6px, transparent 6px 13px);
}
.load-more {
  background: var(--accent-container); color: var(--on-accent-container);
  border: 1px solid var(--need-border);
  border-radius: 999px; min-height: 44px; padding-inline: 18px;
  box-shadow: none;
}
.load-more:hover { background: var(--accent-container); border-color: var(--accent); }
.load-more svg { width: 16px; height: 16px; }
.load-more .rem {
  background: var(--surface); color: var(--accent);
  border: 1px solid var(--need-border);
  font-weight: 700;
}

:root{
  --r-s:10px; --r-m:14px; --r-l:18px;
}

.bmain,.bcell,.srow,.frow,.set-card,.about-card,.about-stat,.empty-box .eic,
.sfield,.pillbar,.hero-search,.hero-stat{border-radius:var(--r-m)}
.bplay,.bic,.sic,.fdoc,.set-ic,.fgo,.fact,.icb,.social-row .tile,
.drawer-head .dlogo,.seg,.seg button{border-radius:var(--r-s)}
.pill,.chip-s,.cta-tonal,.btn-solid,.btn-ghost2,.load-more{border-radius:999px}
.bottom-nav{border-radius:var(--r-l)}
.tab .ind{border-radius:0 0 6px 6px}
.srow::before,.srow::after{border-start-start-radius:var(--r-m);border-end-start-radius:var(--r-m)}
.frow::before{border-start-start-radius:var(--r-m);border-end-start-radius:var(--r-m)}

.btn-solid{box-shadow:0 8px 20px -10px rgba(74,90,51,.45)}
.cta-tonal{border:1px solid var(--outline);box-shadow:var(--shadow-row)}

.hero-search{transition:background .25s,border-color .25s,transform .13s var(--ease)}
.hero-search:hover{background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.4)}

.pillbar{background:none;border:0;padding:0;gap:8px;height:auto;min-height:48px}
.pill{flex:0 0 auto;min-height:44px;background:var(--surface);border:1px solid var(--outline-strong)}
.pill.on{border-color:transparent}
.pillbar-wrap{padding-bottom:10px;box-shadow:0 8px 10px -10px rgba(64,48,22,.12)}

.h-title{letter-spacing:-.01em}

.read-note{background:var(--accent-container);color:var(--on-accent-container);font-size:calc(12.5px * var(--fs));text-align:center;padding:8px 14px}
.read-note b{font-weight:700}
.read-stage{background:var(--sunken);min-height:60vh;padding:14px 10px 130px}
.read-page{position:relative;max-width:900px;margin:0 auto 14px;background:var(--surface);border:1px solid var(--outline);border-radius:var(--r-s);box-shadow:var(--shadow-card);overflow:hidden;user-select:none;-webkit-user-select:none}
.read-page canvas{display:block;opacity:0;transition:opacity .4s var(--ease)}
.read-page.ok canvas{opacity:1}
.read-page .pnum{position:absolute;bottom:8px;inset-inline-start:10px;z-index:2;background:rgba(24,30,12,.62);color:#F0F6DE;border-radius:999px;padding:2px 10px;font-size:10.5px;font-weight:700;pointer-events:none}
.read-end{max-width:520px;margin:26px auto 0;text-align:center;color:var(--text-2);font-size:calc(14px * var(--fs))}
.read-end .btn-solid{margin-top:12px}
#view-read .app-header .h-title{font-size:calc(15.5px * var(--fs));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media print{ .read-stage,.read-page,.read-page canvas{display:none !important} }

.ad-slot { text-align: center; margin: 20px 0 8px; }
.ad-slot.flush { padding-top: 0; padding-bottom: 24px; margin: 0; }
.ad-aside { max-width: 480px; margin: 6px auto 42px; padding: 0 20px; text-align: center; }
.ad-aside.wide { max-width: 760px; margin: 24px auto 8px; padding: 0; }
.ad-note { font-size: 10px; font-weight: 700; opacity: .45; margin-bottom: 6px; }
ins.adsbygoogle { display: block; }

.gate-card{max-width:520px;margin:8px auto;background:var(--surface);border:1px solid var(--outline);
  border-radius:22px;padding:30px 24px 26px;text-align:center}
.gate-ic{width:64px;height:64px;margin:0 auto 16px;border-radius:20px;display:grid;place-items:center;
  background:var(--accent-container);color:var(--on-accent-container)}
.gate-ic svg{width:30px;height:30px}
.gate-t{font-size:calc(19px * var(--fs));font-weight:700;line-height:1.7;margin:0 0 8px}
.gate-b{font-size:calc(14.5px * var(--fs));line-height:1.9;color:var(--text-2);margin:0 0 18px}
.gate-card .btn-ghost2{margin-top:6px}

#view-read.gating .stage{min-height:calc(100vh - 180px);min-height:calc(100dvh - 180px);
  padding-bottom:16px;display:flex;align-items:center;justify-content:center}
#view-read.gating .gate-card{margin:0 auto}

.qwrap { max-width: var(--content-max); margin-inline: auto; }

.qhub-row { position: relative; }
.qhub-row .sic svg { width: 22px; height: 22px; }

.hrow {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 8px; text-align: start;
  box-shadow: var(--shadow-row);
}
.hrow .hpct {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-s);
  display: grid; place-items: center; font-weight: 700; direction: ltr;
  font-size: calc(13px * var(--fs));
  background: var(--brand-container); color: var(--on-brand-container);
}
.hrow.low .hpct { background: var(--accent-container); color: var(--on-accent-container); }
.hrow .col { flex: 1; min-width: 0; }
.hrow .t { display: block; font-size: calc(14px * var(--fs)); font-weight: 600; }
.hrow .s { font-size: calc(11.5px * var(--fs)); color: var(--text-2); margin-top: 2px; }
.hrow .tag {
  flex: none; font-size: calc(10.5px * var(--fs)); font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-container); color: var(--on-accent-container);
}

.qtop { display: flex; align-items: center; gap: 11px; margin-bottom: var(--q-gap-l); }
.qtop .qx {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-s);
  display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--outline); color: var(--text-2);
  transition: background .22s var(--ease-out), color .22s var(--ease-out);
}
.qtop .qx:hover { background: var(--sunken); color: var(--text); }
.qtop .qx svg { width: 20px; height: 20px; }

.qtop .col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.qprog { align-self: center; font-size: calc(12px * var(--fs)); color: var(--text-2); margin-bottom: 5px; }
.qbar { display: block; width: 100%; height: 6px; border-radius: 99px; background: var(--outline); overflow: hidden; }
.qbar > i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(to left, var(--brand), var(--accent));
  transition: width .48s var(--ease-out);
}
.qpill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--sunken); border: 1px solid var(--outline);
  font-size: calc(12.5px * var(--fs)); font-weight: 700; color: var(--text-2);
}
.qpill svg { width: 15px; height: 15px; }
.qpill .t { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.qpill.warn { background: var(--accent-container); border-color: var(--accent); color: var(--on-accent-container); }

.qlbl {
  display: flex; align-items: center; gap: 8px;
  font-size: calc(12.5px * var(--fs)); font-weight: 700; color: var(--text-2);
  margin: 0 0 8px;
}
.qlbl::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); flex: none; }

.qcard {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-m); padding: 18px 17px; margin: 0 0 16px;
  box-shadow: var(--shadow-row);
}
.qtext { font-size: var(--q-fs-question); font-weight: 600; line-height: 1.75; margin: 0; }

.qhint {
  font-size: calc(13.5px * var(--fs)); color: var(--text-2);
  line-height: var(--lh-body); margin: 6px 0 0; padding-inline: 4px;
}

.qopts { display: grid; gap: 9px; margin-bottom: var(--q-gap-l); }
.qopt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
  min-height: 62px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--outline); border-radius: var(--r-s);
  padding: 12px 13px; font: inherit;
  font-size: var(--q-fs-option); font-weight: 600;
  line-height: var(--lh-body); cursor: pointer;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out),
              transform .16s var(--spring), box-shadow .22s var(--ease-out);
}
@media (hover: hover) { .qopt:not(:disabled):hover { border-color: var(--outline-strong); transform: translateY(-2px); box-shadow: var(--shadow-card); } }
.qopt:not(:disabled):active { transform: scale(.99); }
.qopt .k {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--sunken); color: var(--text-2);
  font-size: calc(13px * var(--fs)); font-weight: 700;
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.qopt .k svg { width: 16px; height: 16px; }
.qopt .x { flex: 1; min-width: 0; }

.qopt .rd {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 2px solid var(--outline-strong); background: transparent;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}

.qopt .mk { width: 24px; height: 24px; flex: none; display: grid; place-items: center; }
.qopt .mk svg { width: 20px; height: 20px; }
.qopt.sel { border-color: var(--brand); background: var(--brand-container); color: var(--on-brand-container); }
.qopt.sel .k { background: var(--brand); color: var(--text-on-brand); }
.qopt.sel .rd { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px var(--brand-container); }
.qopt:disabled { cursor: default; }
.qopt.ok { border-color: var(--success); background: var(--success-container); color: var(--text); font-weight: 600; }
.qopt.ok .k { background: var(--success); color: #fff; }
.qopt.ok .rd { border-color: var(--success); background: var(--success); }
.qopt.ok .mk { color: var(--success); }

.qopt.bad { border-color: var(--accent); background: var(--accent-container); color: var(--on-accent-container); }
.qopt.bad .k { background: var(--accent); color: var(--text-on-brand); }
.qopt.bad .rd { border-color: var(--accent); background: var(--accent); }
.qopt.bad .mk { color: var(--accent); }
.qopt.dim { opacity: .5; }

.qopt.ok.pulse { animation: okPulse .5s var(--spring) 1; }
@keyframes okPulse { 0% { transform: scale(1); } 40% { transform: scale(1.022); } 100% { transform: scale(1); } }
.qopt.bad.shake { animation: badShake .34s ease-in-out 1; }
@keyframes badShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(5px); } 75% { transform: translateX(-5px); } }

.qtf { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: var(--q-gap-l); }
.qtf .qopt {
  flex-direction: column; justify-content: center; align-items: center;
  min-height: 104px; gap: 8px; text-align: center;
  font-size: calc(17px * var(--fs)); font-weight: 700;
}
.qtf .qopt .x { flex: 0 1 auto; }
.qtf .tfic { width: 30px; height: 30px; display: grid; place-items: center; color: var(--success); }
.qtf .tfic svg { width: 30px; height: 30px; }
.qtf .qopt:last-child .tfic { color: var(--accent); }
.qtf .qopt.ok .tfic, .qtf .qopt.bad .tfic { color: inherit; }

.qsheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  background: var(--surface);
  border-top: 1px solid var(--outline);
  border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: 0 -6px 24px -12px rgba(45, 50, 25, .3), 0 -1px 2px rgba(45, 50, 25, .05);
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  max-height: 72vh; overflow-y: auto; overscroll-behavior: contain;
}
.qsheet[hidden] { display: none !important; }
html[data-theme="dark"] .qsheet { box-shadow: 0 -8px 28px -12px rgba(0, 0, 0, .7); }
.qsheet .grab {
  display: block; width: 40px; height: 4px; border-radius: 999px;
  background: var(--outline-strong); margin: 0 auto 14px;
}

.qsheet.good, .qsheet.bad { background: var(--surface); }
.qsheet.good .qverd-ic { background: var(--success); }
.qsheet.bad  .qverd-ic { background: var(--accent); }
.qsheet.good .qverd-t  { color: var(--success); }
.qsheet.bad  .qverd-t  { color: var(--accent); }

.qsheet > *:not(.grab) { max-width: 760px; margin-inline: auto; }
@media (min-width: 1100px) {
  .qsheet { left: 0; right: var(--rail-w); padding-inline: 34px; }
}

.qacts { display: flex; gap: 9px; align-items: stretch; margin-top: var(--q-gap-m); }
.qacts .btn-solid { flex: 1; margin-top: 0; }
.qmark {
  width: 54px; height: 54px; flex: none; border-radius: var(--r-s);
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--outline); color: var(--text-2);
  transition: color .22s var(--ease-out), border-color .22s var(--ease-out), transform .16s var(--spring);
}

.qmark.on { color: var(--accent); border-color: var(--accent); }
.qmark svg { width: 21px; height: 21px; }

body.playing .bottom-nav { display: none; }
body.playing #view-quiz > .app-header { display: none; }

@media (min-width: 1100px) {
  body.playing .rail { display: none; }
  body.playing .app { margin-right: 0; border-right: 0; }
}
body.playing #view-quiz > .stage { padding-top: var(--q-gap-m); padding-bottom: 0; }

#qFoot {
  position: sticky; bottom: 0; z-index: 4;
  margin-inline: calc(var(--q-gap-m) * -1);
  padding: 10px var(--q-gap-m) calc(var(--q-gap-m) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
}
#qFoot .btn-solid { margin-top: 0; }
#qFoot[hidden] { display: none; }

.qres { text-align: center; }

.rchip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding-inline: 12px; border-radius: var(--r-s);
  background: var(--accent-container); color: var(--on-accent-container);
  font-size: calc(12.5px * var(--fs)); font-weight: 600; line-height: var(--lh-body);
}
.rchip svg { width: 15px; height: 15px; flex: none; }

.qres-acts { display: block; margin-top: var(--q-gap-xl); }
.qres-acts .btn-solid { width: 100%; margin-top: 0; }
.linkrow { display: flex; gap: 9px; margin-top: 10px; }
.linkbtn {
  flex: 1; min-height: 48px; border-radius: var(--r-s);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--outline); color: var(--text);
  font: inherit; font-size: calc(14.5px * var(--fs)); font-weight: 600;
  line-height: var(--lh-body); cursor: pointer;
  transition: transform .13s var(--ease), border-color .2s var(--ease-out);
}
.linkbtn:hover { border-color: var(--outline-strong); }
.linkbtn:active { transform: scale(.98); }

.qring.ok .val { stroke: var(--success); }
.qring { position: relative; width: 132px; height: 132px; margin: 6px auto 14px; }
.qring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qring .trk { fill: none; stroke: var(--outline); stroke-width: 10; }
.qring .val {
  fill: none; stroke: var(--brand); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 1.05s var(--ease-out);
}
.qring.low .val { stroke: var(--accent); }
.qring .pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: calc(30px * var(--fs)); font-weight: 700; color: var(--text);
  direction: ltr; unicode-bidi: isolate;
}
.qres-t { font-size: calc(24px * var(--fs)); font-weight: 700; line-height: 1.6; }
.qres-s { font-size: calc(13.5px * var(--fs)); color: var(--text-2); line-height: 1.9; margin-top: 5px; }
.qstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 4px; }
.qstat {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-m); padding: 13px 8px;
}
.qstat .v { font-size: calc(19px * var(--fs)); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.qstat .l { font-size: calc(11px * var(--fs)); color: var(--text-2); margin-top: 2px; }
.qres-note { font-size: calc(11.5px * var(--fs)); color: var(--text-3); line-height: 1.9; margin-top: 12px; }
.qrev { text-align: start; margin-top: 20px; }
.qrev .chips { margin-top: 8px; }

.qnote {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--accent-container); color: var(--on-accent-container);
  border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 14px;
  font-size: calc(12.5px * var(--fs)); line-height: 1.85;
}
.qnote svg { width: 17px; height: 17px; flex: none; margin-top: 3px; }
.qnote b { font-weight: 700; }

#readPages{display:grid;gap:12px;padding:8px 0 4px}
.rpage{position:relative;background:#fff;border-radius:12px;overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.10)}
.rpage canvas{display:block;width:100%;height:auto}
.rpage .pnum{position:absolute;inset-inline-end:8px;bottom:8px;background:rgba(0,0,0,.55);
  color:#fff;border-radius:99px;padding:2px 10px;font-size:calc(11px * var(--fs))}

body.reading .bottom-nav,
body.reading #view-read .app-header { display: none; }
body.reading #view-read .stage { padding: 0; min-height: 0; }
body.reading #readPages { padding: 76px 10px 132px; }

.rbar[hidden], .read-ad[hidden] { display: none !important; }

.rbar {
  position: fixed; inset-inline: 12px; z-index: 70;
  height: 60px; display: flex; align-items: center; gap: 8px;
  padding: 0 8px; background: var(--surface);
  border: 1px solid var(--outline); border-radius: var(--r-s);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
}
.rbar-top { top: 12px; }
.rbar-bottom { bottom: 12px; padding-inline: 14px; }
.rbtn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: none; border: 0; border-radius: 12px; color: var(--text); cursor: pointer;
}
.rbtn:hover { background: var(--bg); }
.rbtn svg { width: 22px; height: 22px; }
.rttl {
  flex: 1; min-width: 0; font-weight: 600; line-height: 1.7;
  font-size: calc(14.5px * var(--fs));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rpg {
  flex: none; background: var(--bg); border-radius: 99px; padding: 4px 12px;
  font-size: calc(12.5px * var(--fs)); color: var(--text-2);
}
.rhint {
  flex: 1; min-width: 0; text-align: center; color: var(--text-2);
  font-size: calc(12px * var(--fs)); line-height: 1.7;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 420px) { .rhint { display: none; } }

.read-ad {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 65;
  background: var(--bg); border-top: 1px solid var(--outline);
  padding: 4px 12px 6px; text-align: center; min-height: 62px;
}
.read-ad .ad-note { margin-bottom: 2px; }
body.reading .rbar-bottom { bottom: 80px; }

.rload { padding: 88px 10px 0; }
.rskel {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: 12px; aspect-ratio: 1 / 1.35; position: relative; overflow: hidden;
}
.rskel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.045), transparent);
  animation: rshine 1.4s ease-in-out infinite;
}
@keyframes rshine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .rskel::after { animation: none; } }
.rload-txt {
  text-align: center; color: var(--text-2); margin: 0 0 8px;
  font-size: calc(13.5px * var(--fs)); line-height: 1.85;
}
.rload-bar { height: 6px; margin-bottom: 14px; border-radius: 99px; background: var(--outline); overflow: hidden; }
.rload-bar > i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: var(--accent); transition: width .25s linear;
}

.freetag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-container); color: var(--on-accent-container);
  border-radius: 99px; padding: 1px 8px; font-size: calc(11px * var(--fs));
  font-weight: 700; line-height: 1.9;

  white-space: nowrap; flex: none;
}

.gate-card {
  position: relative; overflow: hidden;
  max-width: 560px; margin: 8px auto;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-l); padding: 30px 26px 26px; text-align: center;
  box-shadow: var(--shadow-card);
}

.gate-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(to left, transparent, var(--accent), transparent);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .7s var(--ease-out);
}
.gate-card.in::before{ transform: scaleX(1); }
.gate-ic {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-container); color: var(--on-accent-container);
}
.gate-ic svg { width: 28px; height: 28px; }

.gate-t {
  font-size: calc(19px * var(--fs)); font-weight: 700;
  line-height: var(--lh-head); margin: 0 0 6px;
}
.gate-b {
  font-size: calc(14px * var(--fs)); line-height: var(--lh-body);
  color: var(--text-2); margin: 0 0 20px;
}
.gate-card .btn-solid { margin-top: 0; }

.gate-back {
  display: block; width: 100%; margin-top: 12px; min-height: 40px;
  font-size: calc(13.5px * var(--fs)); font-weight: 600;
  color: var(--text-2); line-height: var(--lh-body);
  transition: color .2s var(--ease-out);
}
.gate-back:hover { color: var(--brand); }

#view-read.gating .stage {
  min-height: calc(100dvh - 180px);
  padding-bottom: 16px; display: flex; align-items: center; justify-content: center;
}
#view-read.gating .gate-card { margin: 0 auto; }

.btn-solid { position: relative; overflow: hidden; }
.btn-solid::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to left, transparent, rgba(255, 255, 255, .18), transparent);
  transform: translateX(-120%); transition: transform .75s var(--ease-out);
}
@media (hover: hover) {
  .btn-solid:hover::after { transform: translateX(120%); }
  .btn-solid:hover { transform: translateY(-2px); }
  .btn-ghost2:hover { border-color: var(--brand); color: var(--brand); }
}
.btn-solid { transition: background .25s var(--ease-out), transform .18s var(--spring), box-shadow .25s var(--ease-out); }
.btn-ghost2 { transition: border-color .25s var(--ease-out), color .25s var(--ease-out), transform .18s var(--spring); }

.empty-box .et { font-size: calc(19px * var(--fs)); line-height: 1.65; }
.empty-box .eb { line-height: 1.9; }

.sect { }

.promo {
  position: relative; overflow: hidden;
  background: var(--header); color: var(--text-on-grad-strong);
  border-radius: var(--r-l); padding: 26px 22px; text-align: center;
  margin: 22px auto 6px; max-width: var(--content-max);
}
.promo::before {
  content: ''; position: absolute; inset-inline-end: -18%; top: -46%;
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 172, 70, .26), transparent 66%);
}
.promo > * { position: relative; }
.promo .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; color: #E6C77F; margin-bottom: 8px;
}
.promo .eyebrow::before { content: ''; width: 20px; height: 1.5px; background: #D9AC46; flex: none; }
.promo h3 { font-size: calc(21px * var(--fs)); font-weight: 700; line-height: 1.65; }
.promo p { font-size: calc(13.5px * var(--fs)); line-height: 1.92; color: var(--text-on-grad); margin-top: 7px; }
.promo .btn-solid {
  background: var(--accent); color: #1B1706; margin-top: 16px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .5);
}
.promo .btn-solid:hover { background: #BE8C2B; }

.bmain, .bcell, .set-card, .about-card, .about-stat, .qcard, .fld-pick, .go-card, .gate-card { box-shadow: var(--shadow-row); }
.btn-solid { box-shadow: 0 6px 16px -12px rgba(74, 90, 51, .5); }
@media (hover: hover) {
  .bmain:hover, .bcell:hover, .srow:hover, .frow:hover, .gate-card:hover { box-shadow: var(--shadow-card); }
}
.pillbar-wrap { box-shadow: none; }

.pillbar-wrap { border-bottom: 1px solid var(--outline); margin-bottom: 4px; }

.rpage { box-shadow: var(--shadow-card); }

.rpage.pending { aspect-ratio: 1 / 1.414; background: var(--surface); }
.rpage.pending::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .045), transparent);
  animation: rshine 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .rpage.pending::after { animation: none; } }

.rzoom { display: inline-flex; align-items: center; gap: 2px; }
.rzoom .rbtn { width: 34px; height: 34px; }
.rzoom .rbtn svg { width: 18px; height: 18px; }
.rzoom .lvl {
  min-width: 44px; text-align: center; font-size: calc(11.5px * var(--fs));
  font-weight: 700; color: var(--text-2); direction: ltr; unicode-bidi: isolate;
}

#readPages { overflow-x: auto; }
.rpage { width: calc(100% * var(--z, 1)); max-width: none; margin-inline: auto; }
.rpage canvas { width: 100%; height: auto; }

.qpill { display: inline-flex; }
.qpill .t { display: inline-block; }

.qres-close { max-width: var(--content-max); margin: 26px auto 0; text-align: center; }
.qres-close p { font-size: calc(13.5px * var(--fs)); line-height: 1.95; color: var(--text-2); margin-bottom: 14px; }
.qres-close .btn-ghost2 { max-width: 280px; margin-inline: auto; }

:root {
  --cols: 1;
  --gutter: clamp(16px, 4vw, 22px);
  --sec-y: clamp(1.15rem, 3vw, 1.6rem);
  --text-max: 720px;
}

.app {
  max-width: 640px; margin-inline: auto; min-height: 100dvh;
  position: relative; background: var(--bg);
  display: flex; flex-direction: column;
}

.stage, .app-header, .home-hero, .pillbar-wrap { padding-inline: var(--gutter); }
.stage { padding-block: var(--sec-y) 118px; flex: 1; }
.stage > .sect:first-child, .stage > .grp-title:first-child { margin-top: 0; }

.subj-grid, .file-grid {
  display: grid; gap: 10px 12px;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
.subj-grid .srow, .file-grid .frow, .file-grid .frow-wrap { margin-bottom: 0; }
.file-grid .frow-wrap .frow { margin-bottom: 0; }
.more-wrap { grid-column: 1 / -1; }

@media (min-width: 760px) {
  :root { --cols: 2; }
  body { background: var(--bg-alt); }
  .app { max-width: 900px; box-shadow: 0 0 0 1px var(--outline); }
  .bottom-nav { width: min(calc(100% - 32px), 560px); }
}

@media (min-width: 1000px) { .app { max-width: 1040px; } }

.rail { display: none; }
@media (min-width: 1100px) {
  :root { --cols: 3; --gutter: clamp(24px, 2.6vw, 40px); }
  body { background: var(--bg); }

  .app {
    max-width: none; box-shadow: none;
    margin-right: var(--rail-w);
    border-right: 1px solid var(--outline);
  }
  .app > .view { width: 100%; }

  .stage, .app-header, .home-hero, .pillbar-wrap {
    padding-inline: max(var(--gutter), calc((100% - var(--grid-max)) / 2));
  }
  .app-header { min-height: 84px; padding-block: 20px 18px; }
  .h-title { font-size: calc(25px * var(--fs)); }
  .h-sub { font-size: calc(13.5px * var(--fs)); }

  .bottom-nav, [data-open-drawer] { display: none; }
  .stage { padding-block: var(--sec-y) 64px; }

  .rail {
    display: flex; flex-direction: column;
    position: fixed; inset-block: 0; right: 0; left: auto;
    width: var(--rail-w); z-index: 60;
    background: var(--bg); border-left: 1px solid var(--outline);
    padding: 20px 14px 16px; overflow-y: auto;
  }
  .rail-brand { display: block; padding: 2px 10px 20px; }
  .rail-brand img { height: 66px; width: auto; }
  .rail-nav { display: flex; flex-direction: column; gap: 2px; }
  .rlink {
    display: flex; align-items: center; gap: 12px; position: relative;
    min-height: 46px; padding: 0 13px; border-radius: var(--r-m);
    color: var(--text-2); font-size: calc(14px * var(--fs)); font-weight: 600;
    line-height: var(--lh-body);
    transition: background .24s var(--ease-out), color .24s var(--ease-out);
  }
  .rlink svg { width: 20px; height: 20px; flex: none; }
  .rlink:hover { background: var(--sunken); color: var(--text); }
  .rlink.on { background: var(--brand-container); color: var(--on-brand-container); }
  .rlink.on::before {
    content: ""; position: absolute; inset-inline-start: 0; inset-block: 12px;
    width: 3px; border-radius: 3px; background: var(--brand);
  }
  .rail-sep { height: 1px; background: var(--outline); margin: 11px 13px; }
  .rail-foot { margin-top: auto; padding: 14px 8px 0; }
  .rail-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; border-radius: 999px;
    background: var(--brand); color: var(--text-on-brand);
    font-size: calc(13.5px * var(--fs)); font-weight: 700;
    transition: background .24s var(--ease-out), transform .2s var(--ease-out);
  }
  .rail-cta svg { width: 17px; height: 17px; }
  .rail-cta:hover { background: var(--brand-pressed); transform: translateY(-2px); }
  .rail-note { margin-top: 10px; font-size: calc(11px * var(--fs)); line-height: 1.8; color: var(--text-3); text-align: center; }
}

@media (min-width: 1500px) { :root { --cols: 4; } }

.dk-side { margin-top: var(--sec-y); display: grid; gap: 14px; align-content: start; }
@media (min-width: 1100px) {
  .dk {
    display: grid; grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px; align-items: start;
  }
  .dk-side { margin-top: 0; position: sticky; top: 22px; }
  .home-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .home-acts .bento2 { display: contents; }
  .home-acts .bmain, .home-acts .bcell {
    margin: 0; min-height: 168px; padding: 22px 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  }
  .home-acts .bmain .chev { display: none; }
  .home-acts .bmain .col { width: 100%; }
  .home-acts .bplay, .home-acts .bic { width: 48px; height: 48px; }
  .home-acts .bmain .t, .home-acts .bcell .t { font-size: calc(16px * var(--fs)); }

  .home-hero .hero-search, .home-hero .hero-stats { max-width: 760px; }
}

@media (min-width: 1100px) {
  #view-subject.active {
    display: grid; grid-template-columns: 236px minmax(0, 1fr);
    grid-template-areas: "hd hd" "side main" "side ad";
    align-content: start; column-gap: 30px; width: 100%;
    padding-inline: max(var(--gutter), calc((100% - var(--grid-max)) / 2));
  }
  #view-subject.active > .app-header {
    grid-area: hd; padding-inline: 0;
    margin-inline: calc(max(var(--gutter), calc((100% - var(--grid-max)) / 2)) * -1);
    padding-inline: max(var(--gutter), calc((100% - var(--grid-max)) / 2));
  }
  #view-subject.active > .pillbar-wrap {
    grid-area: side; padding: var(--sec-y) 0 0;
    border: 0; box-shadow: none; position: sticky; top: 22px; background: none;
  }
  #view-subject.active > .stage { grid-area: main; padding-inline: 0; }
  #view-subject.active > .stage.flush { grid-area: ad; }
  #view-subject .pillbar { flex-direction: column; align-items: stretch; gap: 4px; height: auto; overflow: visible; }
  #view-subject .pill {
    justify-content: flex-start; width: 100%; border-radius: var(--r-m);
    border-color: transparent; background: none;
  }
  #view-subject .pill:hover { background: var(--sunken); }
  #view-subject .pill.on { background: var(--brand-container); color: var(--on-brand-container); }
  #view-subject .cta-tonal { width: 100%; }

  #view-subject { --cols: 2; }
}

#view-about .stage > *, #view-settings .stage > * {
  max-width: var(--text-max); margin-inline: auto;
}
#view-search .sfield, #view-search #searchIdle, #view-search #searchNone {
  max-width: var(--text-max); margin-inline: auto;
}

@media (min-width: 1100px) {
  #view-about > .app-header, #view-settings > .app-header {
    padding-inline: max(var(--gutter), calc((100% - var(--text-max)) / 2));
  }
}
@media (min-width: 1100px) {
  .qwrap { max-width: var(--text-max); }
  #view-read .stage { padding-inline: 0; }
  .rbar { left: 28px; right: calc(var(--rail-w) + 28px); max-width: 1000px; margin-inline: auto; }
  .read-ad { left: 0; right: var(--rail-w); }
}

.setup { max-width: var(--text-max); margin-inline: auto; }

.snote {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--need-top); border: 1px solid var(--need-border);
  border-radius: var(--r-m); padding: 12px 14px; margin-bottom: var(--q-gap-m);
}
.snote svg { width: 19px; height: 19px; flex: none; color: var(--accent); margin-top: 3px; }
.snote p { font-size: calc(12.5px * var(--fs)); line-height: var(--lh-body); color: var(--on-accent-container); }

.step {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-m); box-shadow: var(--shadow-row);
  margin-bottom: var(--q-gap-m); overflow: hidden;
}
.step.open { border-color: var(--outline-strong); box-shadow: var(--shadow-card); }
.step.locked { opacity: .5; pointer-events: none; }

.step-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 13px 14px; text-align: start;
}
.step-num {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sunken); color: var(--text-2);
  font-size: calc(13px * var(--fs)); font-weight: 700;
  transition: background .28s var(--ease-out), color .28s var(--ease-out);
}
.step.open .step-num { background: var(--brand); color: var(--text-on-brand); }
.step.done .step-num { background: var(--brand-container); color: var(--on-brand-container); }
.step-num svg { width: 17px; height: 17px; }
.step-head .col { flex: 1; min-width: 0; }
.step-t { display: block; font-size: calc(15px * var(--fs)); font-weight: 700; line-height: var(--lh-head); }
.step-v {
  font-size: calc(12.5px * var(--fs)); color: var(--text-2);
  line-height: var(--lh-body); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step.done .step-v { color: var(--brand); font-weight: 600; }
.step-chev {
  width: 20px; height: 20px; flex: none; color: var(--text-3);
  transition: transform .34s var(--ease);
}
.step.open .step-chev { transform: rotate(180deg); }

.step.done .step-num svg { animation: stepPop .42s var(--spring) 1 both; }
@keyframes stepPop { 0% { transform: scale(.5); } 62% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .step.done .step-num svg { animation: none; } }

.step-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .38s var(--ease);
}
.step.open .step-body { grid-template-rows: 1fr; }
.step-body > .in { overflow: hidden; min-height: 0; }
.step-body > .in > .pad { padding: 0 14px 15px; border-top: 1px solid var(--outline); padding-top: 14px; }

.trackbar {
  display: flex; gap: 3px; padding: 3px; margin-bottom: 13px;
  background: var(--sunken); border: 1px solid var(--outline); border-radius: var(--r-s);
}
.trackbar button {
  flex: 1; min-height: 40px; border-radius: var(--r-s);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2);
  line-height: var(--lh-body); white-space: nowrap;
  transition: background .22s var(--ease-out), color .22s var(--ease-out);
}
.trackbar button.on { background: var(--surface); color: var(--brand-pressed); font-weight: 700; box-shadow: var(--shadow-row); }

.sgrp {
  display: flex; align-items: center; gap: 7px;
  font-size: calc(12.5px * var(--fs)); font-weight: 700; color: var(--text-2);
  line-height: var(--lh-body); margin: 15px 0 8px;
}
.sgrp:first-child { margin-top: 0; }
.sgrp::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--accent); flex: none; }

.stiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .stiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.stile {
  display: flex; align-items: center; gap: 10px; text-align: start;
  min-height: 58px; padding: 9px 11px;
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-m);
  font-size: calc(12.5px * var(--fs)); font-weight: 600; line-height: var(--lh-body);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), transform .13s var(--ease);
}
.stile .pic {
  width: 34px; height: 34px; flex: none; border-radius: var(--r-s);
  display: grid; place-items: center;
  background: var(--brand-container); color: var(--brand);
}
.stile .pic svg { width: 19px; height: 19px; }
.stile .t { min-width: 0; }
.stile:hover { border-color: var(--outline-strong); background: var(--sunken); }
.stile:active { transform: scale(.97); }
.stile.on { border-color: var(--brand); background: var(--brand-container); color: var(--on-brand-container); }
.stile.on .pic { background: var(--brand); color: var(--text-on-brand); }

.stile.soon { border-style: dashed; border-color: var(--need-border); background: var(--need-top); color: var(--text-3); }
.stile.soon .pic { background: var(--accent-container); color: var(--on-accent-container); }

.chaps { display: grid; gap: 7px; }
.chap {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: start;
  min-height: 56px; padding: 11px 12px;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-m); box-shadow: var(--shadow-row);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), transform .13s var(--ease);
}
.chap:hover { border-color: var(--outline-strong); }
.chap:active { transform: scale(.99); }
.chap.on { border-color: var(--brand); background: var(--brand-container); }

.chap .rd {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 2px solid var(--outline-strong); position: relative;
  transition: border-color .2s var(--ease-out);
}
.chap.on .rd { border-color: var(--brand); }
.chap.on .rd::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--brand);
}
.chap .col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chap .t {
  font-size: calc(14.5px * var(--fs)); font-weight: 600; line-height: var(--lh-head);
}
.chap.on .t { color: var(--on-brand-container); }
.chap .s {
  font-size: calc(11.5px * var(--fs)); color: var(--text-2);
  line-height: var(--lh-body); margin-top: 1px;
}
.chap .n {
  flex: none; font-size: calc(12px * var(--fs)); font-weight: 700;
  color: var(--text-3); background: var(--sunken);
  min-width: 30px; padding: 3px 9px; border-radius: 999px; text-align: center;
}
.chap.on .n { background: var(--brand); color: var(--text-on-brand); }

.chap.soon {
  border-style: dashed; border-color: var(--need-border);
  background: var(--need-top); cursor: default; box-shadow: none;
}
.chap.soon .rd { border-color: var(--need-border); }
.chap.soon .t { color: var(--text-2); }
.chap.soon .s { color: var(--on-accent-container); font-weight: 600; }
.chap.soon .n { background: var(--accent-container); color: var(--on-accent-container); }

.chiprow { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-q {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--outline-strong);
  font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text);
  line-height: var(--lh-body);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), color .2s var(--ease-out);
}
.chip-q i {
  font-style: normal; font-size: calc(11px * var(--fs)); font-weight: 700;
  color: var(--text-3); background: var(--sunken);
  min-width: 21px; padding: 1px 6px; border-radius: 999px; text-align: center;
}
.chip-q:hover { border-color: var(--brand); }
.chip-q.on { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
.chip-q.on i { background: rgba(255, 255, 255, .2); color: inherit; }
.chip-q.off { border-style: dashed; border-color: var(--outline); color: var(--text-3); cursor: default; }
.fld-note { margin-top: 10px; font-size: calc(11.5px * var(--fs)); line-height: var(--lh-body); color: var(--text-3); }

.dur { padding-top: 2px; }
.dur-v { display: flex; align-items: baseline; gap: 8px; }
.dur-v b { font-size: calc(32px * var(--fs)); font-weight: 700; color: var(--brand); line-height: 1.25; }
.dur-v span { font-size: calc(13px * var(--fs)); color: var(--text-2); line-height: var(--lh-body); }
.dur-hint { font-size: calc(12px * var(--fs)); color: var(--text-2); line-height: var(--lh-body); margin-top: 2px; }
.dur-range { width: 100%; margin: 10px 0 4px; accent-color: var(--brand); height: 26px; cursor: pointer; direction: ltr; }
.dur-ticks {
  display: flex; justify-content: space-between;
  font-size: calc(10.5px * var(--fs)); color: var(--text-3);
  direction: ltr; unicode-bidi: isolate;
}

.setup-bar {
  position: sticky; z-index: 30;
  bottom: 0; margin-inline: calc(var(--gutter) * -1);
  padding: 11px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--outline);
}
.setup-bar .in { max-width: var(--text-max); margin-inline: auto; }
.sumbar {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px 8px; margin-bottom: 9px;
  font-size: calc(12px * var(--fs)); color: var(--text-2); line-height: var(--lh-body);
}
.sumbar b { font-weight: 700; color: var(--text); }
.sumbar .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); flex: none; }
.setup-bar .btn-solid { margin-top: 0; }
.setup-bar .btn-solid:disabled {
  background: var(--sunken); color: var(--text-3);
  box-shadow: none; cursor: default;
}

@media (max-width: 1099px) { .setup-bar { bottom: calc(86px + env(safe-area-inset-bottom)); } }

@media (min-width: 1100px) {
  .setup-bar { padding-bottom: 16px; }
}

.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i {
  position: absolute; top: 50%; left: 50%; width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px; border-radius: 2px; opacity: 0;
  background: var(--c, var(--accent));
  animation: burstOut .78s cubic-bezier(.16, .84, .34, 1) both;
}
@keyframes burstOut {
  0%   { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0deg); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.75) rotate(var(--r)); }
}
.qverd-ic { position: relative; overflow: visible; }
.qverd-ic svg { position: relative; z-index: 1; }
.qsheet.good .qverd-ic { animation: markPop .5s var(--spring) 1 both; }
@keyframes markPop { 0% { transform: scale(.55); } 62% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .burst { display: none; }
  .qsheet.good .qverd-ic { animation: none; }
  .qsheet { transition: none !important; }
}

.qsheet .qverd-h { display: flex; align-items: center; gap: 11px; }
.qsheet .qverd-ic {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
}
.qsheet .qverd-ic svg { width: 22px; height: 22px; }
.qsheet .qverd-t { font-size: var(--q-fs-verd-t); font-weight: 700; line-height: var(--lh-head); }
.qsheet .qverd-s {
  font-size: var(--q-fs-verd-s); color: var(--text-2);
  line-height: var(--lh-body); margin-top: 2px; opacity: 1;
}

.qsheet .qverd-why {
  margin-top: var(--q-gap-s); padding: 12px 13px;
  background: var(--sunken); border: 0; border-radius: var(--r-s);
}
.qsheet .qverd-why .l {
  display: block;
  font-size: var(--q-fs-verd-lbl); font-weight: 700;
  color: var(--text-2); line-height: var(--lh-body);
  margin-bottom: 4px; opacity: 1;
}
.qsheet .qverd-why .l::before { display: none; }
.qsheet .qverd-why p {
  font-size: var(--q-fs-verd-why); line-height: var(--lh-body); color: var(--text-2);
}
.qsheet .qverd-yr {
  margin-top: 6px; font-size: var(--q-fs-verd-s);
  color: var(--text-2); line-height: var(--lh-body); opacity: 1;
}

.qlbl, .qprog, .go-line, .chip-s, .qstat .v, .stile .t { line-height: var(--lh-body); }
.qres-t { line-height: var(--lh-head); }

.ad-slot, .ad-aside, .read-ad { display: none; }
html.ads-on .ad-slot, html.ads-on .ad-aside { display: block; }
html.ads-on .read-ad { display: block; }
html.ads-on .read-ad[hidden] { display: none; }

.stage.flush { display: none; }
html.ads-on .stage.flush { display: block; }

ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

@media (hover:hover){
.qmark:hover{transform: translateY(-2px);}
.gate-card:hover::before{transform: scaleX(1);}
}
