/* ==========================================================================
   MyDIIMS - KPP Learning — design system
   Mobile-first. One file, no framework.
   ========================================================================== */

:root {
  --navy-900: #0b2353;
  --navy-800: #0f2d6b;
  --blue-700: #1347b8;
  --blue-600: #1f5fe0;
  --blue-500: #2f74f5;
  --blue-100: #e6efff;
  --blue-50:  #f2f7ff;
  --sky-100:  #dcecff;
  --yellow-400: #ffc928;
  --yellow-300: #ffd95c;
  --orange-500: #ff8a1f;
  --orange-400: #ffa53d;
  --green-600: #11a36a;
  --green-500: #1fbf7e;
  --green-100: #dcf7ea;
  --purple-600: #6a3fe0;
  --purple-500: #8a5cf5;
  --red-600: #e03131;
  --red-100: #ffe3e3;
  --ink-900: #14213d;
  --ink-700: #35415a;
  --ink-500: #67728a;
  --ink-300: #aab3c5;
  --line:    #e4e9f2;
  --bg:      #f4f7fc;
  --card:    #ffffff;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 45, 107, .06), 0 2px 8px rgba(15, 45, 107, .06);
  --shadow:    0 6px 24px rgba(15, 45, 107, .10);
  --shadow-lg: 0 14px 40px rgba(15, 45, 107, .16);
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Nunito", "Segoe UI", system-ui, sans-serif;
  --topbar-h: 72px;
  --tabbar-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink-900);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow-400); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-500); }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hide-mobile { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 6px 16px rgba(31, 95, 224, .35); }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-orange { background: linear-gradient(180deg, var(--orange-400), var(--orange-500)); color: #fff; box-shadow: 0 8px 20px rgba(255, 138, 31, .38); }
.btn-orange:hover { color: #fff; filter: brightness(1.05); }
.btn-green { background: var(--green-600); color: #fff; }
.btn-green:hover { color: #fff; filter: brightness(1.06); }
.btn-red { background: var(--red-600); color: #fff; }
.btn-red:hover { color: #fff; filter: brightness(1.06); }
.btn-outline { background: #fff; color: var(--navy-900); border-color: var(--navy-900); }
.btn-outline:hover { background: var(--blue-50); color: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-light { background: var(--blue-50); color: var(--blue-700); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--navy-900); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--blue-50); }
.icon-btn .ic { width: 24px; height: 24px; }
.badge-dot {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--red-600); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #fff;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .container { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-900); text-decoration: none; flex: none; }
.brand-logo { width: auto; height: 40px; display: block; }
.brand-text { line-height: 1; display: flex; flex-direction: column; }
.brand-name { font-weight: 900; font-size: 1.45rem; letter-spacing: .2px; color: #0b3366; }
.brand-sub { font-size: .6rem; font-weight: 800; letter-spacing: 1.6px; color: var(--navy-900); text-transform: uppercase; margin-top: 2px; }
.mainnav { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lang-switch {
  display: inline-flex; background: var(--blue-50); border-radius: 999px; padding: 3px; border: 1px solid var(--line);
}
.lang-switch a {
  padding: 6px 11px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: var(--ink-500); line-height: 1;
}
.lang-switch a.on { background: var(--blue-600); color: #fff; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; display: grid; place-items: center; border: 3px solid var(--blue-100);
}
.avatar .ic { width: 22px; height: 22px; }

/* ---------- Bottom tab bar (mobile app style) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 45, 107, .08);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-500); font-size: .7rem; font-weight: 800; text-decoration: none; position: relative;
}
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.on { color: var(--blue-600); }
.tabbar a.on::before {
  content: ""; position: absolute; top: 0; width: 36px; height: 4px; border-radius: 0 0 4px 4px; background: var(--blue-600);
}
.tabbar .tab-cta .tab-ico {
  width: 50px; height: 50px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-500)); color: #fff;
  box-shadow: 0 8px 18px rgba(255, 138, 31, .45); border: 4px solid #fff;
}

/* ---------- Drawer (mobile "Menu") ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(11, 35, 83, .45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease;
  max-height: 85vh; overflow: auto;
}
.drawer::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drawer-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--radius);
  background: var(--blue-50); color: var(--navy-900); font-weight: 800; font-size: .82rem; text-align: center;
}
.drawer-grid a .ic { width: 28px; height: 28px; color: var(--blue-600); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--navy-900);
  background: linear-gradient(180deg, #bfe0ff 0%, #e4f1ff 45%, #f4f9ff 100%);
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .container { position: relative; padding-top: 28px; padding-bottom: 210px; }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--yellow-400); color: var(--navy-900);
  font-weight: 900; font-size: .72rem; letter-spacing: .4px; padding: 7px 14px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255, 201, 40, .4);
}
.hero h1 {
  font-size: clamp(2rem, 8vw, 3.6rem); font-weight: 900; font-style: italic; letter-spacing: -.5px;
  margin: 14px 0 12px; line-height: 1.04; text-shadow: 0 2px 0 rgba(255, 255, 255, .6);
}
.hero h1 em { color: var(--blue-600); font-style: italic; }
.hero-sub { font-size: 1.05rem; font-weight: 600; color: var(--ink-700); max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero-script {
  position: absolute; right: 18px; top: 18px; font-family: "Segoe Script", "Brush Script MT", cursive;
  color: var(--navy-800); font-size: 1.3rem; transform: rotate(-8deg); text-align: right; line-height: 1.1; display: none;
}
.hero-script span { display: block; }
.hero-script::after { content: ""; display: block; height: 4px; margin-top: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--orange-500)); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.1rem; color: var(--navy-900); margin: 0 0 12px; }
.card-title .ic { color: var(--blue-600); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 900; margin: 26px 0 14px; color: var(--navy-900); }
.section-title .ic { color: var(--blue-600); width: 26px; height: 26px; }

/* overlap the hero like the mockup */
.dash { position: relative; margin-top: -170px; z-index: 2; display: grid; gap: 14px; }
.progress-card { display: grid; gap: 14px; }
.progress-big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.progress-pct { font-size: 3.2rem; font-weight: 900; color: var(--navy-900); line-height: 1; }
.progress-pct small { font-size: 1.6rem; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-weight: 800; font-size: .9rem; background: var(--green-100); color: var(--green-600);
}
.chip .ic { width: 22px; height: 22px; background: var(--green-600); color: #fff; border-radius: 50%; padding: 3px; }
.chip-blue { background: var(--blue-100); color: var(--blue-700); }
.chip-yellow { background: #fff4cc; color: #8a5a00; }
.chip-red { background: var(--red-100); color: var(--red-600); }
.chip-grey { background: #eef1f6; color: var(--ink-700); }
.bar { height: 10px; background: #e9eef7; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue-600), var(--blue-500)); transition: width .8s ease; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { display: flex; align-items: center; gap: 10px; padding: 4px; }
.stat-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat-ico .ic { width: 24px; height: 24px; }
.stat b { display: block; font-size: 1.35rem; font-weight: 900; line-height: 1.1; color: var(--navy-900); }
.stat span { font-size: .8rem; color: var(--ink-500); font-weight: 700; }
.ico-blue { background: var(--blue-100); color: var(--blue-600); }
.ico-yellow { background: #fff4cc; color: #e09b00; }
.ico-red { background: var(--red-100); color: var(--red-600); }
.ico-green { background: var(--green-100); color: var(--green-600); }
.ico-purple { background: #efe8ff; color: var(--purple-600); }

.tip-card {
  position: relative; overflow: hidden; display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, #e8f2ff, #d6e8ff); box-shadow: var(--shadow-sm);
}
.tip-card .bulb { width: 48px; height: 48px; flex: none; color: #f2b100; filter: drop-shadow(0 3px 6px rgba(242, 177, 0, .4)); }
.tip-card h3 { color: var(--blue-700); font-size: 1.15rem; margin-bottom: 4px; }
.tip-card p { margin: 0; font-weight: 600; color: var(--ink-700); position: relative; z-index: 1; }
.tip-road { position: absolute; right: -10px; bottom: -14px; width: 150px; opacity: .55; }

/* ---------- Tool cards (gradient) ---------- */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tool {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 170px; padding: 16px; border-radius: var(--radius-lg); color: #fff; text-decoration: none;
  box-shadow: var(--shadow); isolation: isolate; transition: transform .15s ease, box-shadow .15s ease;
}
.tool:hover { color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool::after {
  content: ""; position: absolute; inset: auto -30% -55% -30%; height: 80%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .18), transparent 60%);
}
.tool-art { position: absolute; top: 10px; left: 10px; width: 92px; height: 92px; z-index: -1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.tool-ghost { position: absolute; top: 8px; right: 8px; width: 54px; height: 54px; opacity: .18; z-index: -1; }
.tool h3 { color: #fff; font-size: 1.15rem; font-weight: 900; margin: 0 0 2px; text-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.tool p { margin: 0; font-size: .82rem; font-weight: 600; opacity: .95; padding-right: 40px; line-height: 1.3; }
.tool .go {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; color: var(--navy-900); box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}
.tool .go .ic { width: 20px; height: 20px; }
.tool-blue   { background: linear-gradient(135deg, #2f74f5 0%, #1347b8 100%); }
.tool-purple { background: linear-gradient(135deg, #8a5cf5 0%, #5a33cc 100%); }
.tool-green  { background: linear-gradient(135deg, #22c98a 0%, #0f9a63 100%); }
.tool-orange { background: linear-gradient(135deg, #ffb13d 0%, #ff7a14 100%); }
.tool-navy   { background: linear-gradient(135deg, #2b4c8f 0%, #0b2353 100%); }
.tool-teal   { background: linear-gradient(135deg, #1fb6c9 0%, #0d7f99 100%); }

/* ---------- Footer band ---------- */
.footband {
  position: relative; margin-top: 40px; color: #fff; overflow: hidden;
  background: linear-gradient(90deg, #0b2353, #113a86);
}
.footband::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 40px; background: var(--bg);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.footband .container { position: relative; padding-top: 52px; padding-bottom: 22px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.skyline { position: absolute; left: 0; bottom: 0; width: 360px; opacity: .55; }
.foot-slogan { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.foot-slogan b { font-weight: 900; letter-spacing: .5px; }
.foot-slogan i { font-family: "Segoe Script", "Brush Script MT", cursive; font-style: normal; }
.foot-slogan .script { color: var(--yellow-400); font-size: 1.4rem; }
.foot-checks { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.foot-checks span { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.foot-checks .ic { width: 28px; height: 28px; border: 2px solid var(--yellow-400); color: var(--yellow-400); border-radius: 50%; padding: 4px; }
.foot-meta { font-size: .8rem; opacity: .7; }
.foot-meta a { color: #fff; text-decoration: underline; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: linear-gradient(135deg, var(--navy-900), var(--blue-700)); color: #fff; position: relative; overflow: hidden;
}
.page-head .container { padding-top: 22px; padding-bottom: 46px; position: relative; }
.page-head h1 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 900; margin-bottom: 4px; }
.page-head p { color: rgba(255, 255, 255, .85); margin: 0; font-weight: 600; }
.page-head .crumb { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .85); font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.page-head .crumb:hover { color: #fff; }
.page-head::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
}
.page-head.ph-purple { background: linear-gradient(135deg, #4b2bb0, #8a5cf5); }
.page-head.ph-green { background: linear-gradient(135deg, #0c7a4f, #22c98a); }
.page-head.ph-orange { background: linear-gradient(135deg, #e0650a, #ffb13d); }
.page-body { margin-top: -26px; position: relative; z-index: 2; }

/* ---------- Lists / accordions (E-Book) ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--line);
  border-radius: 999px; padding: 0 16px; min-height: 50px; box-shadow: var(--shadow-sm);
}
.search:focus-within { border-color: var(--blue-500); }
.search input { border: 0; outline: 0; flex: 1; background: transparent; font-size: 1rem; min-width: 0; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line); color: var(--ink-700); font-weight: 800; cursor: pointer; font-size: .92rem;
}
.tabs .on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.source-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-weight: 600; font-size: .92rem;
}
.source-note .ic { width: 22px; height: 22px; margin-top: 1px; }
.source-official { background: var(--blue-100); color: var(--navy-800); }
.source-supplement { background: #fff4cc; color: #6b4700; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.tag-official { background: var(--blue-600); color: #fff; }
.tag-supplement { background: var(--yellow-400); color: var(--navy-900); }

.part-title { margin: 22px 0 10px; font-size: .8rem; font-weight: 900; letter-spacing: 1.5px; color: var(--ink-500); text-transform: uppercase; }
.acc { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; background: none; border: 0; cursor: pointer;
  text-align: left; font-weight: 800; font-size: 1.02rem; color: var(--navy-900); min-height: 64px;
}
.acc-num {
  width: 38px; height: 38px; border-radius: 12px; background: var(--blue-100); color: var(--blue-700);
  display: grid; place-items: center; font-weight: 900; flex: none;
}
.acc.read .acc-num { background: var(--green-600); color: #fff; }
.acc-head .chev { margin-left: auto; transition: transform .2s; color: var(--ink-500); }
.acc.open .acc-head .chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 16px 18px; border-top: 1px solid var(--line); }
.acc.open .acc-body { display: block; }
.sub { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.sub:last-child { border-bottom: 0; }
.sub h4 { font-size: 1rem; color: var(--blue-700); margin-bottom: 6px; }
.sub .txt { color: var(--ink-700); font-size: 1rem; }
.sub img { margin: 12px auto 0; border-radius: 12px; border: 1px solid var(--line); max-height: 420px; width: auto; cursor: zoom-in; }
mark { background: #fff1a8; padding: 0 2px; border-radius: 3px; }

/* ---------- Slides ---------- */
.slide-stage {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.slide-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.slide-top .chip { font-size: .8rem; }
.slide-content { padding: 18px; min-height: 52vh; }
.slide-content h2 { font-size: clamp(1.3rem, 4.5vw, 2rem); text-align: center; font-weight: 900; }
.slide-content .lead { text-align: center; font-size: 1.1rem; color: var(--ink-700); font-weight: 600; }
.slide-hero { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px; display: grid; place-items: center; text-align: center; color: #fff; }
.slide-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 35, 83, .25), rgba(11, 35, 83, .75)); }
.slide-hero > div { position: relative; z-index: 1; padding: 24px; }
.slide-hero h2, .slide-hero p { color: #fff; }
.slide-img { margin: 0 auto; max-height: 68vh; width: auto; border-radius: var(--radius); }
.video { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.item-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.item-card { background: var(--blue-50); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.item-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; }
.item-card .body { padding: 12px 14px; }
.item-card h4 { color: var(--navy-900); font-size: 1.02rem; margin-bottom: 4px; }
.item-card p { margin: 0; color: var(--ink-700); font-size: .95rem; }
.carousel { position: relative; }
.carousel .cs { display: none; }
.carousel .cs.on { display: grid; gap: 16px; animation: fade .3s ease; }
.carousel .cs img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius); background: var(--blue-50); }
.carousel-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 5px; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: width .2s; }
.carousel-dots button.on { width: 26px; background: var(--orange-500); }
.slide-nav { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fbfcff; }
.slide-nav .btn { flex: 1; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chapter-list { display: grid; gap: 10px; }
.chapter-card {
  display: flex; align-items: center; gap: 14px; background: #fff; padding: 14px 16px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line); color: var(--navy-900); font-weight: 800;
}
.chapter-card:hover { border-color: var(--blue-500); color: var(--navy-900); }
.chapter-card small { display: block; color: var(--ink-500); font-weight: 600; }
.chapter-card .go { margin-left: auto; color: var(--blue-600); }

/* ---------- Quiz ---------- */
.quiz-pick { display: grid; gap: 14px; }
.quiz-type {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: #fff; padding: 18px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow); color: var(--navy-900); border: 2px solid transparent;
}
.quiz-type:hover { border-color: var(--blue-500); color: var(--navy-900); }
.quiz-type .qt-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; }
.quiz-type .qt-ico .ic { width: 30px; height: 30px; }
.quiz-type h3 { margin: 0 0 2px; font-size: 1.15rem; }
.quiz-type p { margin: 0; color: var(--ink-500); font-size: .92rem; font-weight: 600; }
.quiz-type .meta { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }

.exam { max-width: 860px; margin: 0 auto; }
.exam-bar {
  position: sticky; top: var(--topbar-h); z-index: 20; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 14px;
}
.exam-bar .row { justify-content: space-between; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.15rem; color: var(--navy-900); font-variant-numeric: tabular-nums; padding: 4px 12px; border-radius: 999px; background: var(--blue-50); }
.timer.warn { background: var(--red-100); color: var(--red-600); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.q-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; }
.q-num { font-weight: 900; color: var(--blue-600); font-size: .85rem; letter-spacing: .5px; text-transform: uppercase; }
.q-text { font-size: clamp(1.1rem, 3.6vw, 1.35rem); font-weight: 800; color: var(--navy-900); margin: 6px 0 12px; }
.q-img { margin: 0 auto 14px; max-height: 300px; width: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; min-height: 60px; text-align: left;
  border: 2px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; font-size: 1.02rem; font-weight: 700;
  color: var(--ink-900); transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--blue-500); background: var(--blue-50); }
.option .key { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700); font-weight: 900; }
.option.selected { border-color: var(--blue-600); background: var(--blue-50); }
.option.selected .key { background: var(--blue-600); color: #fff; }
.option.correct { border-color: var(--green-600); background: var(--green-100); }
.option.correct .key { background: var(--green-600); color: #fff; }
.option.wrong { border-color: var(--red-600); background: var(--red-100); }
.option.wrong .key { background: var(--red-600); color: #fff; }
.feedback { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); font-weight: 700; display: none; }
.feedback.ok { display: block; background: var(--green-100); color: #0b6b45; }
.feedback.no { display: block; background: var(--red-100); color: #a01f1f; }
.exam-actions { display: flex; gap: 10px; margin-top: 14px; }
.exam-actions .btn { flex: 1; }
.qmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.qmap button {
  height: 42px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; color: var(--ink-700);
}
.qmap button.seen { border-color: var(--red-600); color: var(--red-600); }
.qmap button.ans { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.qmap button.cur { outline: 3px solid var(--yellow-400); outline-offset: 1px; }
.unanswered { color: var(--red-600); font-weight: 700; font-size: .92rem; }
.no-select { -webkit-user-select: none; user-select: none; }

.result-hero { text-align: center; padding: 26px 18px; }
.ring { --p: 0; width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center;
  background: conic-gradient(var(--ring, var(--blue-600)) calc(var(--p) * 1%), #e9eef7 0); }
.ring > div { width: 126px; height: 126px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.ring b { font-size: 2.1rem; font-weight: 900; color: var(--navy-900); line-height: 1; }
.ring small { display: block; color: var(--ink-500); font-weight: 700; }
.verdict { display: inline-flex; align-items: center; gap: 8px; font-size: 1.4rem; font-weight: 900; padding: 8px 20px; border-radius: 999px; }
.verdict.pass { background: var(--green-100); color: var(--green-600); }
.verdict.fail { background: var(--red-100); color: var(--red-600); }
.review { display: grid; gap: 10px; }
.review-item { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 14px; border-left: 6px solid var(--green-600); }
.review-item.bad { border-left-color: var(--red-600); }
.review-item img { max-height: 140px; width: auto; border-radius: 8px; margin: 8px 0; border: 1px solid var(--line); }
.review-item .ans { display: grid; gap: 4px; margin-top: 8px; font-size: .95rem; }
.review-item .ans .ic { color: var(--green-600); }
.review-item.bad .ans .yours .ic { color: var(--red-600); }

/* ---------- Colour plates ---------- */
.plate-wrap { display: grid; place-items: center; margin: 6px auto 14px; }
.plate { width: min(320px, 80vw); height: min(320px, 80vw); border-radius: 50%; box-shadow: var(--shadow); background: #f3eee4; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; margin: 0 auto; }
.numpad button { min-height: 56px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 1.3rem; font-weight: 900; cursor: pointer; }
.numpad button:hover { border-color: var(--blue-500); }
.answer-display { text-align: center; font-size: 2rem; font-weight: 900; min-height: 48px; letter-spacing: 4px; color: var(--navy-900); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 800; font-size: .92rem; color: var(--ink-700); }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 1rem;
}
textarea.input { min-height: 120px; resize: vertical; }
.input:focus { border-color: var(--blue-500); outline: none; box-shadow: 0 0 0 4px rgba(47, 116, 245, .15); }
.field .err { color: var(--red-600); font-size: .85rem; font-weight: 700; }
.field.has-err .input { border-color: var(--red-600); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue-600); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 2px solid var(--line); border-radius: 12px; font-weight: 800; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-700); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-weight: 700; margin-bottom: 14px; }
.alert .ic { width: 22px; height: 22px; flex: none; }
.alert-success { background: var(--green-100); color: #0b6b45; }
.alert-error { background: var(--red-100); color: #a01f1f; }
.alert-info { background: var(--blue-100); color: var(--navy-800); }

/* ---------- FAQ ---------- */
details.faq { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 10px; border: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 16px; font-weight: 800; color: var(--navy-900); list-style: none; display: flex; gap: 10px; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .ic { color: var(--blue-600); }
details.faq p { padding: 0 16px 16px; margin: 0; color: var(--ink-700); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
table.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f6f8fc; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-500); font-weight: 900; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafcff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.pager .pages { display: flex; gap: 6px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(11, 35, 83, .92); display: none; place-items: center; padding: 16px; }
.lightbox.on { display: grid; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.lightbox .icon-btn { position: absolute; top: 12px; right: 12px; color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px); transform: translateX(-50%) translateY(20px);
  background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; z-index: 300;
  opacity: 0; transition: .25s; pointer-events: none; box-shadow: var(--shadow-lg); max-width: 92vw; text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%); }

.empty { text-align: center; padding: 30px 16px; color: var(--ink-500); }
.empty .ic { width: 52px; height: 52px; color: var(--ink-300); margin: 0 auto 10px; display: block; }

/* ==========================================================================
   Tablet / desktop
   ========================================================================== */
@media (min-width: 640px) {
  .hide-mobile { display: initial !important; }
  .tools { gap: 16px; }
  .tool { min-height: 200px; padding: 20px; }
  .tool-art { width: 110px; height: 110px; }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-script { display: block; font-size: 1.6rem; }
  .quiz-pick { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .container { padding: 0 24px; }
  .mainnav { display: flex; gap: 4px; margin-left: 18px; }
  .mainnav a {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; color: var(--navy-900);
    font-weight: 700; font-size: .95rem; white-space: nowrap;
  }
  .mainnav a:hover { background: var(--blue-50); }
  .mainnav a.on { background: var(--blue-600); color: #fff; box-shadow: 0 6px 16px rgba(31, 95, 224, .35); }
  .mainnav a .ic { width: 20px; height: 20px; }
  .topbar-actions { gap: 10px; }
  .topbar-actions .sep { width: 1px; height: 32px; background: var(--line); margin: 0 4px; }
  .brand-logo { height: 46px; }
  .brand-name { font-size: 1.7rem; }
  .brand-sub { font-size: .64rem; }
  .hero { min-height: 470px; }
  .hero .container { padding-top: 40px; padding-bottom: 150px; }
  .hero-script { top: 40px; right: 40px; font-size: 2.2rem; }
  .dash { margin-top: -120px; grid-template-columns: 1.9fr 1fr; align-items: stretch; }
  .progress-card { grid-template-columns: 1fr auto; align-items: center; padding: 22px 26px; }
  .progress-card .stats { grid-template-columns: repeat(3, auto); gap: 0; }
  .progress-card .stat { padding: 0 22px; border-left: 1px solid var(--line); }
  .tools { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .tool { min-height: 210px; }
  .tool-art { width: 130px; height: 130px; top: 14px; left: 14px; }
  .tool h3 { font-size: 1.45rem; }
  .tool p { font-size: .92rem; }
  .footband .container { grid-template-columns: 1fr auto; justify-items: start; text-align: left; padding-top: 60px; }
  .foot-slogan { justify-content: flex-start; margin-left: 380px; }
  .foot-checks { justify-content: flex-end; }
  .foot-meta { grid-column: 1 / -1; justify-self: center; }
  .skyline { width: 420px; }
  .item-grid { grid-template-columns: repeat(3, 1fr); }
  .slide-content { padding: 28px 36px; }
  .quiz-pick { grid-template-columns: repeat(3, 1fr); }
  .exam-layout { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; max-width: 1100px; margin: 0 auto; }
  .exam-layout .exam { max-width: none; margin: 0; }
  .exam-side { position: sticky; top: calc(var(--topbar-h) + 14px); }
  .drawer-only { display: none !important; }
}
@media (max-width: 1199px) {
  .desktop-only { display: none !important; }
}

@media print {
  .topbar, .tabbar, .footband, .no-print, .drawer, .drawer-backdrop { display: none !important; }
  body { background: #fff; padding: 0; }
  .card, .review-item, .table-wrap { box-shadow: none; }
  .page-head { background: none; color: #000; }
  .page-head h1, .page-head p { color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Tablet landscape: two-column dashboard, still app-style navigation */
@media (min-width: 900px) and (max-width: 1199px) {
  .dash { grid-template-columns: 1.6fr 1fr; margin-top: -150px; }
  .tools { grid-template-columns: repeat(4, 1fr); }
  .tool h3 { font-size: 1.15rem; }
}
html, body { overflow-x: hidden; }

/* Tool card text never overlaps its illustration */
.tool { padding-top: 112px; }
@media (min-width: 640px) { .tool { padding-top: 132px; } }
@media (min-width: 1200px) {
  .tool { padding-top: 20px; padding-left: 44%; }
  .tool p { padding-right: 44px; }
}
.txt table, .slide-content table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .92rem; display: block; overflow-x: auto; }
.txt td, .txt th, .slide-content td, .slide-content th { border: 1px solid var(--line); padding: 6px 10px; }

/* ---------- Ads / sponsored ---------- */
.ad-card { position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.ad-label { position: absolute; top: 10px; left: 10px; z-index: 1; background: rgba(11, 35, 83, .78); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.ad-media { display: block; background: #eaf4ff; }
.ad-media img { width: 100%; height: auto; max-height: 520px; object-fit: contain; margin: 0 auto; }
.ad-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.ad-body p { margin: 0; color: var(--ink-700); font-weight: 600; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ad-actions .btn { flex: 1 1 200px; }
@media (min-width: 1200px) {
  .ad-body { grid-template-columns: 1fr auto; align-items: center; padding: 16px 22px; }
  .ad-actions .btn { flex: none; }
}

/* ---------- Slides (index + player) ---------- */
.resume-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 14px; color: var(--navy-900); text-decoration: none; }
.resume-card small { display: block; color: var(--ink-500); font-weight: 600; }
.resume-card .go { color: var(--blue-600); }
.acc-title { display: flex; flex-direction: column; gap: 2px; text-align: left; font-weight: 800; color: var(--navy-900); }
.acc-title small { color: var(--purple-600, #6b3fe0); font-weight: 800; letter-spacing: .5px; font-size: .75rem; }
.slide-ch-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.slide-ch-meta .chip { font-size: .72rem; padding: 3px 9px; }
.slide-ch-meta .chip .ic { width: 16px; height: 16px; padding: 2px; }
.slide-toc { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 4px; counter-reset: toc; }
.slide-toc a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--ink-900, #1b2538); text-decoration: none; font-weight: 600; }
.slide-toc a:hover { background: var(--blue-50); }
.slide-toc a .ic { color: var(--ink-300); flex: none; }
.slide-toc a.seen .ic { color: var(--green-600); }
.btn-block { width: 100%; }
.slide-page { padding-top: 14px; padding-bottom: 20px; }
.slide-page:fullscreen { background: var(--bg, #f4f7fc); overflow: auto; padding: 16px; max-width: none; }
.slide-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.slide-bar-title { text-align: center; line-height: 1.2; }
.slide-bar-title small { display: block; color: var(--ink-500); font-weight: 700; font-size: .78rem; }
.slide-bar-title span { font-weight: 800; color: var(--navy-900); }
.slide-progress { margin-bottom: 12px; height: 6px; }
.slide-progress span { width: 0; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: .9rem; }
.slide-content h2 { margin-bottom: 14px; }
.slide-text { max-width: 760px; margin: 14px auto 0; font-size: 1.05rem; line-height: 1.7; color: var(--ink-700); }
.slide-hero { min-height: 260px; }
.slide-hero h2 { margin: 0; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.item-grid.one { grid-template-columns: 1fr !important; max-width: 640px; margin-left: auto; margin-right: auto; }
.item-card .txt { font-size: .95rem; color: var(--ink-700); }
.carousel .item-card { background: #fff; }
.carousel .item-card img { aspect-ratio: auto; max-height: 56vh; }
.carousel-ctl { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.carousel-ctl .carousel-dots { margin: 0; max-width: 70%; }
.carousel-count { text-align: center; margin: 6px 0 0; font-weight: 700; }
.video-note { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: .82rem; margin: 8px 0 0; }
.video-note .ic { width: 16px; height: 16px; }
.slide-audio { display: block; width: 100%; max-width: 520px; margin: 16px auto 0; }
.swipe-hint { text-align: center; font-size: .85rem; margin-top: 10px; }
.icon-btn { display: inline-grid; place-items: center; }
@media (max-width: 479px) { .hide-xs { display: none; } }

/* ---------- Colour practice / progress / help / errors ---------- */
.colour-card { padding: 16px; }
.cp-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cp-answer { text-align: center; font-size: 2rem; font-weight: 900; color: var(--navy-900); min-height: 52px; margin-bottom: 10px; letter-spacing: 4px; }
.cp-answer.empty { font-size: 1rem; color: var(--ink-300); font-weight: 700; letter-spacing: 0; padding-top: 14px; }
.numpad button.ok { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.numpad button .ic { width: 26px; height: 26px; }
.cp-review { text-align: left; max-width: 380px; margin: 14px auto 0; padding-left: 22px; display: grid; gap: 4px; }
.cp-review li.ok { color: var(--green-600); }
.cp-review li.bad { color: var(--red-600); }
.tick-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tick-list li { position: relative; padding-left: 28px; color: var(--ink-700); font-weight: 600; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.pg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pg-stat { padding: 16px; display: grid; gap: 4px; }
.pg-stat b { font-size: 1.7rem; font-weight: 900; color: var(--navy-900); line-height: 1.1; }
.pg-stat span { color: var(--ink-500); font-weight: 700; font-size: .85rem; }
.pg-top { display: grid; gap: 16px; align-items: center; padding: 18px; margin-bottom: 14px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }
.hist small { color: var(--ink-500); font-weight: 600; }
.hist .verdict { font-size: .8rem; padding: 4px 12px; }
.err-page { text-align: center; padding: 40px 16px 30px; }
.err-code { font-size: clamp(4rem, 18vw, 7rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--blue-600), var(--orange-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-detail { text-align: left; white-space: pre-wrap; font-size: .75rem; background: #0b1730; color: #d6e2ff; padding: 12px; border-radius: 12px; overflow: auto; max-height: 50vh; margin-top: 18px; }
@media (min-width: 900px) { .pg-grid { grid-template-columns: repeat(4, 1fr); } .pg-top { grid-template-columns: auto 1fr; } }

/* ---------- Auth + admin ---------- */
.auth-body { min-height: 100vh; background: linear-gradient(160deg, #eaf2ff, #f8fbff 55%, #fff3e4); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 32px 16px; }
.auth-logo { display: block; margin: 0 auto 18px; max-width: 300px; }
.auth-logo img { width: 100%; height: auto; }
.auth-card { padding: 24px; }
.auth-title { display: flex; gap: 10px; align-items: center; font-size: 1.4rem; margin: 0 0 4px; color: var(--navy-900); }
.auth-foot { text-align: center; margin-top: 16px; font-weight: 700; }
.form { display: grid; gap: 14px; margin-top: 16px; }
.field { display: grid; gap: 6px; font-weight: 700; color: var(--navy-900); }
.field input, .field select, .field textarea { min-height: 48px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 500; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47, 116, 245, .15); }
.admin-body { background: var(--bg); }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-top-r { display: flex; gap: 8px; align-items: center; }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.admin-hello { margin: 0; }
.admin-head h1 { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 1.5rem; color: var(--navy-900); }
.admin-cols { display: grid; gap: 16px; }
.admin-card { padding: 18px; overflow-x: auto; }
.admin-card h2 { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; margin: 0 0 12px; color: var(--navy-900); }
.ico-green { background: var(--green-100); color: var(--green-600); }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.mini-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.mini-bars span { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.mini-bars small { font-size: .65rem; color: var(--ink-500); margin-top: 4px; }
.mini-bars b { position: absolute; top: 0; font-size: .7rem; color: var(--ink-700); }
.hard-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.hard-list li span { display: block; color: var(--ink-700); }
.hard-list li b { color: var(--red-600); font-size: .85rem; }
.lang-switch { display: inline-flex; background: var(--blue-50); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .8rem; color: var(--ink-700); text-decoration: none; }
.lang-switch a.on { background: var(--blue-600); color: #fff; }
@media (min-width: 1000px) { .admin-cols { grid-template-columns: 1fr 1fr; } }
[hidden] { display: none !important; }
.carousel-dots.many { display: none; }
.carousel .item-card .body:only-child { padding: 22px 16px; text-align: center; }

/* ---------- Admin CRUD ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-head h1 .chip { font-size: .8rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; align-items: center; }
.admin-filter input, .admin-filter select { min-height: 40px; border: 2px solid var(--line); border-radius: 10px; padding: 6px 12px; font: inherit; background: #fff; }
.admin-filter input { flex: 1 1 220px; }
.admin-table td, .admin-table th { padding: 10px 12px; font-size: .92rem; }
.admin-table td.act, .admin-table th.act { text-align: right; white-space: nowrap; }
.admin-table td.act form { display: inline; }
.btn-xs { min-height: 32px; padding: 0 10px; font-size: .8rem; border-radius: 8px; gap: 4px; }
.btn-xs .ic { width: 16px; height: 16px; }
.btn.danger { color: var(--red-600); }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.thumb.lg { width: 120px; height: 90px; object-fit: contain; }
.chip-green { background: var(--green-100); color: var(--green-600); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; font-weight: 700; }
.admin-form { padding: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px 18px; }
.admin-form .field { display: grid; gap: 6px; font-weight: 700; color: var(--navy-900); align-content: start; }
.admin-form .field input[type=text], .admin-form .field input[type=number], .admin-form .field input[type=date], .admin-form .field input[type=password],
.admin-form .field input[type=url], .admin-form .field input[type=email], .admin-form .field select, .admin-form .field textarea {
  min-height: 44px; border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 500; background: #fff; width: 100%;
}
.admin-form .field textarea { resize: vertical; line-height: 1.5; }
.admin-form .field textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.admin-form .field :focus { outline: none; border-color: var(--blue-500); }
.admin-form .help { color: var(--ink-500); font-weight: 500; }
.admin-form .req { color: var(--red-600); }
.admin-form .check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 700; cursor: pointer; }
.admin-form .check input { width: 20px; height: 20px; }
.file-field { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.file-field > div { display: grid; gap: 6px; flex: 1 1 240px; }
.form-sec { grid-column: 1 / -1; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1rem; color: var(--blue-700); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
@media (min-width: 800px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .admin-form .field.wide { grid-column: 1 / -1; }
}
@media (max-width: 799px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  .admin-table td { border: 0; padding: 4px 12px; display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
  .admin-table td::before { content: attr(data-label); color: var(--ink-500); font-weight: 700; font-size: .8rem; }
  .admin-table td.act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .admin-table td.act::before { display: none; }
  .admin-table td.act .btn span { display: none; }
}

/* Admin menu on phones: Menu button opens a grid of all sections */
.admin-menu-btn { display: none; }
@media (max-width: 899px) {
  .admin-menu-btn { display: inline-flex; }
  .admin-top { flex-wrap: nowrap; }
  .admin-top .brand-sub { display: none; }
  .admin-top-r { gap: 6px; }
  .admin-top-r .lang-switch a { padding: 4px 8px; }
}
@media (max-width: 899px) {
  .admin-top .top-only { display: none; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 22px 20px; max-width: 860px; margin: 0 auto; }
.legal h2 { font-size: 1.12rem; color: var(--navy-900); margin: 22px 0 8px; display: flex; gap: 8px; }
.legal h2:first-child { margin-top: 0; }
.legal h2 span { color: var(--blue-600); }
.legal p { color: var(--ink-700); line-height: 1.75; margin: 0 0 10px; }
.legal-foot { margin-top: 20px !important; font-weight: 700; }
.legal-key { max-width: 860px; margin: 0 auto 14px; }
.sim-note { margin: 0 0 14px; }
.agree-note { font-size: .82rem; text-align: center; margin: 12px 0 0; }
.agree-note a { font-weight: 700; }
.foot-disclaimer { grid-column: 1 / -1; font-size: .78rem; opacity: .8; margin: 4px 0 0; max-width: 760px; }
.result-disclaimer { font-size: .82rem; text-align: center; margin: 18px auto 0; max-width: 640px; }
.legal-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0 0; }

/* ---------- Slides: presentation mode ---------- */
.slide-ch-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.slide-page.loading .slide-stage { opacity: .55; transition: opacity .15s; }
.slide-stage:focus { outline: none; }
.pr-progress, .pr-arrow, .pr-bar, .pr-hint, .pr-black, .pr-jump { display: none; }

html.present, html.present body { overflow: hidden; background: #0b1220; }
html.present body { padding: 0 !important; }
html.present .topbar, html.present .tabbar, html.present .footband, html.present .drawer,
html.present .drawer-backdrop, html.present main > :not(.slide-page),
html.present .slide-bar, html.present .slide-progress, html.present .swipe-hint, html.present .slide-nav { display: none !important; }
html.present .slide-page { position: fixed; inset: 0; z-index: 60; max-width: none; margin: 0; padding: 0; background: #0b1220; }
html.present .slide-stage {
  position: absolute; inset: 0; border-radius: 0; box-shadow: none; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; display: flex; flex-direction: column;
}
html.present .slide-content {
  flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center;
  min-height: 0; width: 100%; max-width: 1280px; margin: 0 auto; padding: 48px 7vw 104px;
}
html.present .slide-content h2 { font-size: clamp(1.6rem, 3.4vw, 3rem); margin-bottom: 18px; }
html.present .slide-text { font-size: clamp(1.05rem, 1.7vw, 1.5rem); max-width: 1040px; }
html.present .slide-img { max-height: calc(100vh - 230px); max-width: 100%; object-fit: contain; }
html.present .slide-hero { min-height: calc(100vh - 220px); }
html.present .video { width: 100%; max-width: calc((100vh - 240px) * 16 / 9); margin: 0 auto; padding-top: 0; aspect-ratio: 16 / 9; }
html.present .video-note { display: none; }
html.present .carousel .cs img, html.present .carousel .item-card img { max-height: calc(100vh - 280px); }
html.present .item-grid:not(.one) .item-card img { max-height: 30vh; }
html.present .slide-content img[data-zoom] { cursor: inherit; }

html.present .pr-progress { display: block; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 64; background: rgba(11, 35, 83, .12); }
html.present .pr-progress span { display: block; height: 100%; background: var(--orange-500); transition: width .3s; }

html.present .pr-arrow {
  display: grid; place-items: center; position: fixed; top: 50%; z-index: 63; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(11, 35, 83, .55); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: opacity .25s, background .2s;
}
html.present .pr-arrow:hover { background: var(--navy-900); }
html.present .pr-arrow:disabled { opacity: 0 !important; pointer-events: none; }
html.present .pr-arrow .ic { width: 30px; height: 30px; }
.pr-left { left: 14px; } .pr-right { right: 14px; }

html.present .pr-bar {
  display: flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: 14px; z-index: 64;
  transform: translateX(-50%); width: min(960px, calc(100% - 20px));
  padding: 8px 10px; border-radius: 18px; color: #fff;
  background: rgba(11, 23, 48, .88); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: opacity .25s, transform .25s;
}
.pr-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-width: 42px; height: 42px; padding: 0 10px;
  justify-content: center; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: inherit;
  font: inherit; font-weight: 700; cursor: pointer;
}
.pr-btn:hover { background: rgba(255, 255, 255, .22); }
.pr-btn.pr-next { background: var(--orange-500); }
.pr-btn.pr-next:hover { background: #ff9c42; }
.pr-title { flex: 1; min-width: 0; line-height: 1.2; }
.pr-title small { display: block; font-size: .72rem; color: #9fb3d9; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-title span { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-pager { display: flex; align-items: center; gap: 6px; }
.pr-count { min-width: 76px; text-align: center; font-variant-numeric: tabular-nums; color: #cfdaf0; }
.pr-count b { color: #fff; font-size: 1.1rem; }
html.pr-fs .pr-full { background: rgba(255, 138, 31, .35); }

html.present.pr-idle .pr-bar { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
html.present.pr-idle .pr-arrow { opacity: 0; pointer-events: none; }
html.present.pr-idle, html.present.pr-idle * { cursor: none !important; }

html.present .pr-hint {
  display: block; position: fixed; left: 50%; bottom: 80px; z-index: 64; transform: translateX(-50%);
  margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(11, 23, 48, .82); color: #fff;
  font-size: .85rem; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s;
}
html.present.pr-hint-on .pr-hint { opacity: 1; }
.pr-hint-tap { display: none; }

html.present.pr-blackout .pr-black { display: block; position: fixed; inset: 0; z-index: 70; background: #000; cursor: none; }

html.present .pr-jump:not([hidden]) { display: grid; place-items: center; position: fixed; inset: 0; z-index: 68; background: rgba(5, 12, 28, .6); padding: 16px; }
.pr-jump-box { width: min(560px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.pr-jump-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); color: var(--navy-900); }
.pr-jump-head .pr-btn { background: var(--blue-50); color: var(--navy-900); }
.pr-jump-list { overflow-y: auto; padding: 8px 10px 14px; }
.pr-jump-list section { padding: 4px 0; border-bottom: 1px solid var(--line); }
.pr-jump-list section:last-child { border-bottom: 0; }
.pr-jump-ch { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; font-weight: 800; color: var(--navy-900); text-decoration: none; }
.pr-jump-ch .acc-num { width: 30px; height: 30px; font-size: .85rem; }
.pr-jump-list .cur .pr-jump-ch { background: var(--blue-50); }
.pr-jump-list ol { list-style: none; margin: 0 0 4px; padding: 0 0 0 48px; }
.pr-jump-list li a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink-700); text-decoration: none; font-weight: 600; font-size: .92rem; }
.pr-jump-list a:hover { background: var(--blue-50); }
.pr-jump-list li a.on { background: var(--orange-500); color: #fff; }

@media (max-width: 767px), (pointer: coarse) {
  html.present .slide-content { padding: 36px 16px 96px; }
  html.present .pr-arrow { display: none; }
  html.present .pr-bar { bottom: max(8px, env(safe-area-inset-bottom)); gap: 6px; padding: 6px; }
  html.present .pr-title { display: none; }
  html.present .pr-pager { flex: 1; justify-content: center; }
  .pr-count { min-width: 64px; }
  .pr-hint-keys { display: none; }
  .pr-hint-tap { display: inline; }
  html.present .pr-hint { bottom: 72px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); }
}
@media (orientation: landscape) and (max-height: 500px) {
  html.present .slide-content { padding: 20px 64px 72px; }
  html.present .slide-img, html.present .carousel .cs img { max-height: calc(100vh - 110px); }
  html.present .video { max-width: calc((100vh - 100px) * 16 / 9); }
}

/* ---------- Driving simulator: landing page + admin ---------- */
.sim-promo, .sim-full { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 16px 0; text-decoration: none; color: inherit; }
.sim-promo { background: linear-gradient(120deg, #0b2353, #1f5fe0); color: #fff; }
.sim-promo small { display: inline-block; background: #ff8a1f; color: #fff; font-weight: 900; font-size: .7rem; padding: 2px 8px; border-radius: 99px; margin-bottom: 4px; }
.sim-promo b, .sim-full b { display: block; font-size: 1.08rem; }
.sim-promo em, .sim-full em { display: block; font-style: normal; font-size: .9rem; opacity: .85; }
.sim-promo > span:nth-child(2), .sim-full > span:nth-child(2) { flex: 1; }
.sim-promo-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex: none; }
.sim-full .sim-promo-ico { background: var(--blue-50); color: var(--blue-700); }
.sim-promo-ico .ic { width: 30px; height: 30px; }
.sim-stations { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 22px; }
@media (min-width: 700px) { .sim-stations { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .sim-stations { grid-template-columns: 1fr 1fr 1fr; } }
.sim-st { display: flex; gap: 14px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; }
.sim-st:hover { box-shadow: 0 10px 26px rgba(11, 35, 83, .14); }
.sim-diag { width: 96px; height: 48px; flex: none; background: #eef3fb; border-radius: 10px; }
.sim-diag .d-road { fill: none; stroke: #50555e; stroke-width: 5; stroke-linejoin: round; }
.sim-diag .d-line { fill: none; stroke: #e0b400; stroke-width: 2.5; stroke-linejoin: round; }
.sim-diag .d-path { fill: none; stroke: #1f5fe0; stroke-width: 2; stroke-dasharray: 4 3; }
.sim-diag .d-stop { stroke: #ff5a36; stroke-width: 3; }
.sim-diag .d-car { fill: #1f5fe0; }
.sim-st-body { flex: 1; min-width: 0; }
.sim-st-body small { color: var(--ink-500); font-weight: 800; font-size: .72rem; text-transform: uppercase; }
.sim-st-body b { display: block; color: var(--navy-900); }
.sim-st-body em { display: block; font-style: normal; color: var(--ink-700); font-size: .88rem; line-height: 1.4; }
.sim-best { display: inline-block; margin-top: 6px; font-size: .76rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.sim-best.pass { background: var(--green-100); color: var(--green-600); }
.sim-best.fail { background: #fff1d6; color: #8a5a00; }
.sim-keys kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 3px; background: #fff; font: 700 .8rem ui-monospace, Consolas, monospace; text-align: center; }
.sim-keys .table td:first-child { font-weight: 700; }
.sim-admin .sim-input { display: flex; align-items: center; gap: 8px; }
.sim-admin .sim-input input { flex: 1; }
.sim-admin .sim-input b { color: var(--ink-500); min-width: 36px; }
.sim-changed { color: var(--orange-500); }
.card.sim-promo, .card.sim-promo b, .card.sim-promo em, .card.sim-promo .go { color: #fff; }
.card.sim-promo .go { background: rgba(255, 255, 255, .18); }
.sim-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.sim-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--ink-700); text-decoration: none; }
.sim-tabs a .ic { width: 18px; height: 18px; }
.sim-tabs a.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.sim-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sim-stat { padding: 12px 14px; text-decoration: none; color: inherit; display: grid; gap: 2px; }
.sim-stat small { font-weight: 800; color: var(--ink-500); font-size: .75rem; text-transform: uppercase; }
.sim-stat b { font-size: 1.5rem; color: var(--navy-900); }
.sim-stat span { font-size: .82rem; color: var(--ink-700); }
.sim-stat .bar { display: block; height: 6px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.sim-stat .bar span { display: block; height: 100%; background: var(--green-600); }
.sim-top-faults { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sim-top-faults li { display: grid; grid-template-columns: minmax(160px, 1.2fr) 2fr 40px; gap: 10px; align-items: center; font-size: .9rem; }
.sim-top-faults i { height: 10px; border-radius: 5px; background: var(--orange-500); }
.sim-top-faults b { text-align: right; }
.sim-fault-cell { font-size: .82rem; line-height: 1.35; }
.sim-fault-cell .bad { color: var(--red-600); }
.sim-fault-cell .warn { color: #8a5a00; }

/* simulator: licence type toggle + road test card */
.sim-tx { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 700; color: var(--muted, #5b6677); }
.sim-tx button { display: inline-flex; align-items: center; gap: 8px; border: 2px solid #d5dce8; background: #fff; border-radius: 999px; padding: 7px 14px 7px 7px; font: inherit; font-weight: 700; color: #26324a; cursor: pointer; }
.sim-tx button b { display: grid; place-items: center; min-width: 30px; height: 26px; border-radius: 999px; background: #e9eef6; font-size: .8rem; padding: 0 6px; }
.sim-tx button[aria-checked="true"] { border-color: #ff8a1f; background: #fff4ea; }
.sim-tx button[aria-checked="true"] b { background: #ff8a1f; color: #fff; }
.sim-road { margin-bottom: 18px; border: 2px solid #ffd7b0; }

/* learner account */
.acct-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.acct-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 10px; text-align: center; text-decoration: none; color: inherit; }
.acct-stat b { font-size: 1.6rem; color: #0b4f8f; }
.acct-stat span { font-size: .82rem; color: #5b6677; }
.acct-go { background: #ff8a1f; color: #fff; gap: 4px; }
.acct-go span { color: #fff; font-weight: 800; }
.acct-go .ic { width: 28px; height: 28px; }
.acct-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.acct-st { padding: 12px 14px; }
.acct-st > b { display: block; margin-bottom: 6px; }
.acct-st-row { display: flex; align-items: center; gap: 8px; font-size: .86rem; margin-top: 4px; flex-wrap: wrap; }
.acct-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 20px; }
.acct-bottom .card { padding: 16px; }
.top-member { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; text-decoration: none; color: inherit; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.sim-login-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border: 2px solid #ffd7b0; }
@media (max-width: 720px) {
  .acct-top { grid-template-columns: repeat(2, 1fr); }
  .acct-bottom { grid-template-columns: 1fr; }
  .acct-table thead { display: none; }
  .acct-table tr { display: block; padding: 10px 12px; border-bottom: 1px solid #e6eaf0; }
  .acct-table td { display: flex; gap: 10px; padding: 3px 0; border: 0; }
  .acct-table td::before { content: attr(data-label); min-width: 84px; color: #6b7686; font-size: .8rem; }
}
.acct-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.acct-jump a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #eef3fb; color: #0b4f8f; font-weight: 700; font-size: .86rem; text-decoration: none; }

/* ---------- simulator: infographic station cards ---------- */
.sim-ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 14px 0 22px; }
.sim-ig-one { grid-template-columns: minmax(260px, 420px); }
.sim-ig { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.sim-ig-head { display: flex; align-items: center; gap: 8px; background: #0b4fb3; color: #fff; padding: 9px 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: .92rem; }
.sim-ig-head b { background: #fff; color: #0b4fb3; border-radius: 8px; min-width: 28px; padding: 1px 6px; text-align: center; }
.sim-ig-pic { display: block; background: #dfe9d6; }
.sim-ig-pic svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.sim-ig-desc { margin: 10px 14px 4px; color: var(--ink-600, #4b5565); font-size: .86rem; }
.sim-ig-tips { list-style: none; counter-reset: t; margin: 6px 14px 8px; padding: 0; display: grid; gap: 7px; flex: 1; }
.sim-ig-tips li { counter-increment: t; display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; line-height: 1.35; }
.sim-ig-tips li::before { content: counter(t); flex: none; width: 22px; height: 22px; border-radius: 50%; background: #0b4fb3; color: #fff; font-weight: 800; font-size: .78rem; display: grid; place-items: center; }
.sim-ig-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 10px 14px 14px; flex-wrap: wrap; }
.sim-ig-foot .btn { margin-left: auto; }
/* drawing */
.p-sky { fill: #e6f0fb; } .p-grass { fill: #7cbf5a; } .p-asph { fill: #5d6169; } .p-conc { fill: #c4c0b6; }
.p-road-l { fill: none; stroke: #5d6169; stroke-width: 7; stroke-linejoin: round; }
.p-kb { fill: none; stroke: #fff; stroke-width: 3.2; } .p-kd { fill: none; stroke: #111; stroke-width: 3.2; stroke-dasharray: 4 4; }
.p-rail { stroke: #9aa3ad; stroke-width: 2; stroke-dasharray: 1 3; fill: none; }
.p-zone { stroke: #f2c200; stroke-width: 9; stroke-linecap: butt; opacity: .85; }
.p-bay { fill: none; stroke: #f2c200; stroke-width: 2; }
.p-arrow { fill: none; stroke: #e3262f; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.p-rev { stroke-dasharray: 5 4; }
.p-red { stroke: #c0262b; stroke-width: 4; } .p-red-f { fill: #c0262b; } .p-pole { stroke: #333; stroke-width: 2; }
.p-car { fill: #1f5fe0; stroke: #0b2a6b; stroke-width: .8; } .p-win { fill: #bfe0ff; }
.p-num { font: 800 11px system-ui, sans-serif; fill: #fff; paint-order: stroke; stroke: #e3262f; stroke-width: 3px; }
.p-dash { stroke: #fff; stroke-width: 1.2; stroke-dasharray: 5 5; fill: none; }
.p-zebra { stroke: #fff; stroke-width: 6; stroke-dasharray: 2 2; }
.p-light { fill: #222; } .p-isle { stroke: #fff; stroke-width: 1; }
/* Tips Penting bar */
.sim-tips { margin: 4px 0 22px; padding: 14px 16px; border-top: 4px solid #0b4fb3; }
.sim-tips h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.05rem; color: #0b4fb3; text-transform: uppercase; }
.sim-tips ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sim-tips li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: .84rem; font-weight: 600; }
.sim-tips li span { width: 44px; height: 44px; border-radius: 50%; background: #e8f0fd; color: #0b4fb3; display: grid; place-items: center; }
.sim-tips-cheer { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff7d6; color: #6b4e00; font-weight: 700; }
.sim-tips-cheer .ic { width: 30px; height: 30px; flex: none; color: #d39b00; }
.sim-tips-cheer small { display: block; font-weight: 600; opacity: .8; margin-top: 2px; }
.sim-ig-badge { margin-left: auto; font-style: normal; font-size: .7rem; background: #ff8a1f; color: #fff; border-radius: 999px; padding: 2px 8px; letter-spacing: 0; }
.p-bike { fill: #c8202b; stroke: #5a0d12; stroke-width: .6; } .p-bar { stroke: #111; stroke-width: 1.4; stroke-linecap: round; } .p-helm { fill: #1d1f24; }
.p-tyre { fill: none; stroke: #1b1b1b; stroke-width: 4; } .p-frame { fill: none; stroke: #6b7280; stroke-width: 3; stroke-linejoin: round; }
.p-bump rect { fill: #f2c200; stroke: #1b1b1b; stroke-width: 1.6; stroke-dasharray: 3 3; }
.sim-veh { margin-bottom: 8px; }
.sim-tx [data-for] { display: inline-flex; align-items: center; gap: 6px; }
.sim-tx [data-for][hidden] { display: none; }

/* Sign in / sign up modal */
.auth-modal { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 16px; }
.auth-modal[hidden] { display: none; }
.auth-modal-bg { position: absolute; inset: 0; background: rgba(11, 35, 83, .55); backdrop-filter: blur(3px); animation: amFade .18s ease; }
.auth-modal-box { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px 20px 18px; border-radius: 20px; box-shadow: 0 24px 60px rgba(11, 35, 83, .35); animation: amUp .22s ease; }
.auth-modal-x { position: absolute; top: 8px; right: 8px; }
.auth-modal-logo { display: block; width: 190px; max-width: 70%; height: auto; margin: 2px auto 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #eef3fb; border-radius: 14px; margin-bottom: 10px; }
.auth-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; padding: 10px 8px; border-radius: 10px; font: inherit; font-weight: 700; color: #4b5b75; cursor: pointer; }
.auth-tabs button svg { width: 18px; height: 18px; }
.auth-tabs button.on { background: #fff; color: #0b4fb3; box-shadow: 0 2px 8px rgba(11, 35, 83, .12); }
.auth-modal-note { font-size: .9rem; margin: 4px 0 12px; }
.auth-modal-links { text-align: center; margin: 14px 0 0; line-height: 1.9; }
.auth-agree { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; font-size: .9rem; }
.auth-agree input { margin-top: 3px; }
body.auth-open { overflow: hidden; }
@keyframes amFade { from { opacity: 0; } }
@keyframes amUp { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@media (max-width: 560px) {
  .auth-modal { place-items: end center; padding: 0; }
  .auth-modal-box { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: amSheet .25s ease; }
}
@keyframes amSheet { from { transform: translateY(100%); } }

/* Collapsible "Kawalan" (controls) card */
.sim-fold { margin-top: 22px; padding: 0; overflow: hidden; }
.sim-fold > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 800; color: #0b2a6b; }
.sim-fold > summary::-webkit-details-marker { display: none; }
.sim-fold > summary > svg:first-child { width: 22px; height: 22px; color: #0b4fb3; flex: none; }
.sim-fold > summary span { flex: 1; display: flex; flex-direction: column; font-size: 1.05rem; }
.sim-fold > summary small { font-weight: 500; color: #6b7a90; font-size: .82rem; }
.sim-fold > summary > svg:last-child { width: 20px; height: 20px; transition: transform .2s; flex: none; }
.sim-fold[open] > summary > svg:last-child { transform: rotate(180deg); }
.sim-fold[open] > summary { border-bottom: 1px solid #e6ecf5; }
.sim-fold > :not(summary) { margin-left: 16px; margin-right: 16px; }
.sim-fold > p:last-child { margin-bottom: 14px !important; }
.sim-fold .table { width: calc(100% - 32px); margin-top: 10px; }

.sim-lic-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; background: #eef4ff; border: 1px solid #cfe0ff; font-size: .92rem; }
.sim-lic-note svg { width: 22px; height: 22px; color: #0b4fb3; flex: none; margin-top: 1px; }

/* Simulator cards for guests: tips locked behind sign-in */
.sim-ig-lock { position: relative; display: block; margin: 4px 14px 10px; padding: 10px 12px; border-radius: 12px; background: #f3f6fb; text-decoration: none; overflow: hidden; }
.sim-ig-lock-lines { display: grid; gap: 7px; filter: blur(2.5px); opacity: .55; }
.sim-ig-lock-lines i { display: block; height: 9px; border-radius: 5px; background: #9fb0c8; }
.sim-ig-lock-lines i:nth-child(2) { width: 82%; } .sim-ig-lock-lines i:nth-child(3) { width: 64%; }
.sim-ig-lock-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; text-align: center; font-size: .84rem; font-weight: 700; color: #0b2a6b; }
.sim-ig-lock-text svg { width: 16px; height: 16px; color: #ff8a1f; flex: none; }
.sim-ig-lock:hover .sim-ig-lock-text { color: #0b4fb3; }
.sim-join { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 16px 18px; margin-bottom: 14px; background: linear-gradient(120deg, #0b4fb3, #1f6fe0); color: #fff; border: 0; }
.sim-join-text { flex: 1; min-width: 240px; }
.sim-join-text b { display: block; font-size: 1.12rem; margin-bottom: 6px; }
.sim-join ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .92rem; }
.sim-join li { display: flex; gap: 8px; align-items: center; }
.sim-join li svg { width: 16px; height: 16px; color: #8ff0b6; flex: none; }
.sim-join-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin sidebar: grouped menu (left panel on computers, drop-down panel from "Menu" on phones) */
.admin-nav { background: #fff; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav a, .admin-nav summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-700); text-decoration: none; font-weight: 700; font-size: .92rem; cursor: pointer; }
.admin-nav .ic { width: 19px; height: 19px; flex: none; }
.admin-nav a:hover, .admin-nav summary:hover { background: var(--blue-50); }
.admin-nav summary { list-style: none; }
.admin-nav summary::-webkit-details-marker { display: none; }
.admin-nav summary span { flex: 1; }
.admin-nav summary .ic:last-child { width: 16px; height: 16px; opacity: .6; transition: transform .2s; }
.admin-nav details[open] > summary .ic:last-child { transform: rotate(180deg); }
.admin-nav summary.has-on { color: var(--navy-900); }
.admin-nav-sub { display: grid; gap: 2px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 2px solid var(--line); }
.admin-nav-sub a { font-weight: 600; font-size: .88rem; padding: 8px 10px; }
.admin-nav-sub .ic { width: 16px; height: 16px; opacity: .75; }
.admin-nav a.on { background: var(--navy-900); color: #fff; }
.admin-nav a.on .ic { opacity: 1; }
.admin-nav-foot { display: none; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.admin-nav-foot a.logout { color: var(--red-600); }
@media (min-width: 900px) {
  .admin-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  .admin-top { grid-column: 1 / -1; }
  .admin-nav { position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow-y: auto; border-right: 1px solid var(--line); }
  .admin-main { width: 100%; }
}
@media (max-width: 899px) {
  .admin-nav { display: none; position: sticky; top: 61px; z-index: 19; max-height: calc(100vh - 61px); overflow-y: auto; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(11, 35, 83, .12); }
  body.admin-menu-open .admin-nav { display: flex; }
  .admin-nav a, .admin-nav summary { min-height: 46px; }
  .admin-nav-foot.menu-only { display: grid; }
}
.help-sec { margin-top: 22px; }
.page-body > .help-sec:first-child { margin-top: 0; padding-top: 40px; }

/* ---------- Support side panel (collapsed tab on the right, vertically centred) ---------- */
.sp-tab {
  position: fixed; right: 0; top: 50%; z-index: 70; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 9px; border: 0; border-radius: 14px 0 0 14px; cursor: pointer;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); color: #fff;
  box-shadow: -4px 6px 18px rgba(15, 45, 107, .28); font: 700 .82rem/1 inherit; letter-spacing: .04em;
  transition: padding .2s, background .2s;
}
.sp-tab .ic { width: 20px; height: 20px; }
.sp-tab span { writing-mode: vertical-rl; transform: rotate(180deg); }
.sp-tab:hover, .sp-tab:focus-visible { padding-right: 13px; }
.sp-widget.open .sp-tab { opacity: 0; pointer-events: none; }
.sp-panel {
  position: fixed; right: 12px; top: 50%; z-index: 80; width: min(380px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(11, 35, 83, .3);
  transform: translate(calc(100% + 24px), -50%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sp-panel[hidden] { display: flex; visibility: hidden; }
.sp-widget.open .sp-panel { transform: translate(0, -50%); visibility: visible; }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--blue-50), #fff); border-radius: 20px 20px 0 0; }
.sp-head h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; color: var(--navy-800); }
.sp-x { border: 0; background: var(--blue-50); border-radius: 10px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--ink-700); }
.sp-body { padding: 14px 16px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sp-intro { margin: 0 0 10px; font-size: .9rem; }
.sp-form .field { margin-bottom: 10px; }
.sp-form textarea { resize: vertical; min-height: 92px; }
.sp-note { font-size: .78rem; margin: 10px 0 0; display: flex; gap: 6px; align-items: center; }
.sp-note .ic { width: 14px; height: 14px; }
.sp-hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sp-done { text-align: center; padding: 18px 6px; }
.sp-done > .ic { width: 54px; height: 54px; color: var(--green-600); }
.sp-done p { margin: 10px 0 14px; }
.sp-form [data-sp-error]:not([hidden]) { margin-bottom: 10px; }
@media (max-width: 899px) {
  .sp-tab { padding: 11px 7px; font-size: .74rem; top: 46%; }
  .sp-panel { right: 8px; left: 8px; width: auto; top: auto; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
    max-height: calc(100vh - var(--tabbar-h) - 90px); transform: translateY(calc(100% + 120px)); }
  .sp-widget.open .sp-panel { transform: translateY(0); }
}
/* admin: support inbox */
.nav-badge { font-style: normal; background: var(--red-600); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; margin-left: auto; line-height: 1; }
.admin-nav-group summary .nav-badge { margin-left: auto; margin-right: 6px; }
.admin-nav-group summary .nav-badge + .ic { margin-left: 0; }
.admin-bell { position: relative; }
.admin-bell .nav-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; font-size: .65rem; }
.sup-alert { text-decoration: none; color: inherit; }
.sup-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sup-tabs a { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink-700); font-size: .88rem; }
.sup-tabs a b { margin-left: 4px; color: var(--ink-500); }
.sup-tabs a.on { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.sup-tabs a.on b { color: #fff; }
.sup-unread td { background: #fff8e6; }
.sup-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; margin-bottom: 12px; }
.sup-meta span { display: inline-flex; align-items: center; gap: 6px; }
.sup-meta .ic { width: 16px; height: 16px; color: var(--ink-500); }
.sup-msg { background: var(--blue-50); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.sup-reply { padding: 14px 16px; margin-left: 22px; border-left: 4px solid var(--green-500); }
.sup-reply .sup-msg { background: var(--green-100); }
.sup-reply-h { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.sup-reply-h b { display: inline-flex; gap: 6px; align-items: center; }
/* home tools: simulator 2nd, slides as a wide card at the bottom */
.tool-sim { background: linear-gradient(135deg, #1f5fe0 0%, #0b2353 100%); }
.tool-new { position: absolute; top: 12px; right: 12px; background: #ff8a1f; color: #fff; font-weight: 900; font-size: .68rem; padding: 3px 9px; border-radius: 99px; letter-spacing: .04em; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.tool-wide { grid-column: 1 / -1; min-height: 120px; padding-left: 128px; justify-content: center; }
.tool-wide .tool-art { top: 50%; transform: translateY(-50%); width: 100px; height: 100px; }
@media (min-width: 900px) { .tool-wide { min-height: 140px; padding-left: 170px; } .tool-wide .tool-art { width: 130px; height: 130px; } }

/* =====================================================================
   Install button + "Download the app" sheet
   ===================================================================== */
.btn-install { background: linear-gradient(135deg, #0b2353, #1f5fe0); color: #fff; border-radius: 16px; padding: 12px 20px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(31, 95, 224, .3); }
.btn-install:hover { color: #fff; filter: brightness(1.08); }
html.pwa-installed [data-install] { display: none !important; }
.inst { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.inst[hidden] { display: none; }
.inst-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 48, .55); backdrop-filter: blur(3px); animation: instFade .25s ease both; }
.inst-sheet { position: relative; width: min(460px, 100%); max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); animation: instUp .35s cubic-bezier(.2, .9, .25, 1.05) both; }
@media (min-width: 700px) { .inst { align-items: center; } .inst-sheet { border-radius: 26px; padding-bottom: 22px; } .inst-grab { display: none !important; } }
.inst-grab { display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
.inst-x { position: absolute; right: 12px; top: 12px; border: 0; width: 36px; height: 36px; border-radius: 12px; background: var(--blue-50); display: grid; place-items: center; cursor: pointer; }
.inst-app { display: flex; gap: 14px; align-items: center; margin: 6px 0 14px; }
.inst-icon img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 16px rgba(11, 35, 83, .25); display: block; }
.inst-app h2 { margin: 0; font-size: 1.25rem; color: var(--navy-900); }
.inst-app p { margin: 2px 0 0; color: var(--ink-500); font-size: .85rem; }
.inst-perks { list-style: none; margin: 0 0 14px; padding: 12px 14px; background: var(--blue-50); border-radius: 16px; display: grid; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-700); }
.inst-perks li { display: flex; gap: 10px; align-items: center; }
.inst-perks .ic { width: 20px; height: 20px; color: var(--blue-600); flex: none; }
.inst h3 { font-size: 1rem; margin: 4px 0 10px; color: var(--navy-900); }
.inst-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.inst-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; font-size: .92rem; line-height: 1.45;
  animation: instUp .4s ease both; }
.inst-steps li:nth-child(2) { animation-delay: .08s; } .inst-steps li:nth-child(3) { animation-delay: .16s; }
.inst-steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-600); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: .85rem; }
.inst-steps small { color: var(--ink-500); }
.inst-k { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--blue-50); color: var(--blue-600); vertical-align: middle; margin: 0 2px; }
.inst-k .ic { width: 18px; height: 18px; }
.inst-warn { display: flex; gap: 8px; align-items: center; background: #fff8e6; border-radius: 12px; padding: 10px 12px; font-size: .88rem; margin: 0 0 10px; }
.inst-warn .ic { color: var(--orange-500); flex: none; }
.inst-point { display: none; }
.inst.ios-phone .inst-point { display: grid; place-items: center; position: fixed; left: 50%; bottom: 4px; transform: translateX(-50%) rotate(90deg); color: #fff; z-index: 3; animation: instBob 1s ease-in-out infinite; }
.inst.ios-phone .inst-point .ic { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.inst.ios-phone .inst-sheet { margin-bottom: 44px; border-radius: 26px; }
.inst-done { text-align: center; padding: 10px 0 14px; } .inst-done .ic { width: 48px; height: 48px; color: var(--green-600); }
@keyframes instFade { from { opacity: 0; } }
@keyframes instUp { from { opacity: 0; transform: translateY(28px); } }
@keyframes instBob { 50% { transform: translateX(-50%) rotate(90deg) translateX(8px); } }
/* auto install card (Android / Windows) */
.inst-pop { position: fixed; z-index: 1150; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 440px; display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px; background: #fff; border-radius: 20px; box-shadow: 0 18px 44px rgba(11, 35, 83, .28), 0 0 0 1px rgba(11, 35, 83, .06);
  transform: translateY(140%); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), opacity .3s; }
.inst-pop.in { transform: none; opacity: 1; }
.inst-pop > img { width: 48px; height: 48px; border-radius: 13px; flex: none; box-shadow: 0 4px 12px rgba(11, 35, 83, .22); }
.inst-pop-tx { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.inst-pop-tx b { color: var(--navy-900); font-size: .95rem; }
.inst-pop-tx span { color: var(--ink-500); font-size: .78rem; }
.inst-pop .btn { flex: none; padding: 10px 14px; border-radius: 12px; }
.inst-pop .btn .ic { width: 18px; height: 18px; }
.inst-pop-x { flex: none; border: 0; background: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--ink-500); margin-left: -4px; }
.inst-pop-x:hover { background: var(--blue-50); }
.inst-pop-x .ic { width: 16px; height: 16px; }
@media (min-width: 700px) { .inst-pop { left: auto; right: 24px; margin: 0; } }
@media (min-width: 1200px) { .inst-pop { bottom: 24px; } }
html.pwa .inst-pop { bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom)); }
@media (max-width: 380px) { .inst-pop-tx span { display: none; } }
html.pwa-installed .inst-pop { display: none !important; }

/* =====================================================================
   Splash screen (installed app start)
   ===================================================================== */
#pwa-splash { display: none; }
html.splash #pwa-splash { display: flex; }
html.splash body { overflow: hidden; }
#pwa-splash { position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; overflow: hidden; color: #fff;
  background: radial-gradient(120% 80% at 50% 35%, #1f5fe0 0%, #0f2d6b 45%, #06132f 100%); }
#pwa-splash.out { animation: splOut .6s cubic-bezier(.6, 0, .4, 1) forwards; }
.spl-aurora i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); opacity: .45; mix-blend-mode: screen; }
.spl-aurora i:nth-child(1) { background: #2f74f5; left: -30vmax; top: -30vmax; animation: splBlob 7s ease-in-out infinite alternate; }
.spl-aurora i:nth-child(2) { background: #8a5cf5; right: -35vmax; top: 10vh; animation: splBlob 9s ease-in-out infinite alternate-reverse; opacity: .3; }
.spl-aurora i:nth-child(3) { background: #ffc928; left: 10vw; bottom: -55vmax; animation: splBlob 8s ease-in-out infinite alternate; opacity: .18; }
.spl-stars { position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent),
    radial-gradient(1px 1px at 10% 80%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 45%, #fff, transparent);
  animation: splTwinkle 2.4s ease-in-out infinite alternate; }
.spl-center { position: relative; text-align: center; margin-top: -12vh; }
.spl-logo { position: relative; width: 132px; height: 132px; margin: 0 auto 22px; }
.spl-badge { position: absolute; inset: 0; border-radius: 36px; background: #fff; display: grid; place-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 0 6px rgba(255, 255, 255, .12); animation: splPop .9s cubic-bezier(.2, 1.6, .4, 1) both; }
.spl-badge img { width: 76%; height: auto; animation: splTilt 2.6s ease-in-out .9s infinite; }
.spl-ring { position: absolute; inset: -6px; border-radius: 42px; border: 2px solid rgba(255, 201, 40, .8); animation: splRing 1.8s ease-out .5s infinite; opacity: 0; }
.spl-ring.r2 { animation-delay: 1.1s; border-color: rgba(143, 208, 255, .8); }
.spl-title { margin: 0; font-size: 2.6rem; font-weight: 900; letter-spacing: -.5px; line-height: 1; font-style: italic; }
.spl-title span { display: inline-block; animation: splRise .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.spl-title span:first-child { animation-delay: .35s; color: #ffc928; }
.spl-title span:last-child { animation-delay: .48s; }
.spl-sub { margin: 8px 0 0; font-weight: 800; letter-spacing: 6px; font-size: .8rem; opacity: 0; animation: splFadeUp .6s ease .7s forwards; }
.spl-tag { margin: 18px 0 0; display: flex; gap: 10px; justify-content: center; font-weight: 700; font-size: .95rem; }
.spl-tag span, .spl-tag b { opacity: 0; animation: splFadeUp .5s ease forwards; }
.spl-tag b { color: #ffc928; }
.spl-tag > :nth-child(1) { animation-delay: .9s; } .spl-tag > :nth-child(2) { animation-delay: 1s; } .spl-tag > :nth-child(3) { animation-delay: 1.1s; }
.spl-tag > :nth-child(4) { animation-delay: 1.2s; } .spl-tag > :nth-child(5) { animation-delay: 1.3s; }
.spl-bar { width: 160px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .18); margin: 26px auto 0; overflow: hidden; opacity: 0; animation: splFadeUp .4s ease .9s forwards; }
.spl-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, #ffc928, #ff8a1f, #ffc928); background-size: 200% 100%; animation: splLoad 2.2s cubic-bezier(.4, 0, .2, 1) .8s both, splShine 1s linear infinite; }
.spl-road { position: absolute; left: 0; right: 0; bottom: 0; height: 22vh; min-height: 120px;
  background: linear-gradient(180deg, #1b2540, #0d1428); border-top: 3px solid rgba(255, 255, 255, .15); }
.spl-road::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, #e03131 0 24px, #fff 24px 48px); opacity: .85; }
.spl-lane { position: absolute; left: 0; right: 0; top: 55%; height: 5px; background: repeating-linear-gradient(90deg, #ffc928 0 40px, transparent 40px 80px);
  background-size: 80px 5px; animation: splLane .35s linear infinite; }
.spl-car { position: absolute; width: 120px; bottom: calc(45% - 6px); left: -140px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5));
  animation: splDrive 2s cubic-bezier(.3, .1, .3, 1) .2s forwards; }
.spl-car g { animation: splBounce .25s ease-in-out infinite alternate; }
.spl-speed { position: absolute; bottom: calc(45% + 10px); left: 0; width: 100%; height: 30px; }
.spl-speed i { position: absolute; height: 2px; width: 60px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7)); border-radius: 2px; left: -80px; animation: splZip .9s linear infinite; }
.spl-speed i:nth-child(1) { top: 0; } .spl-speed i:nth-child(2) { top: 12px; animation-delay: .3s; width: 90px; } .spl-speed i:nth-child(3) { top: 24px; animation-delay: .6s; }
@keyframes splBlob { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes splTwinkle { to { opacity: .2; } }
@keyframes splPop { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes splTilt { 50% { transform: rotate(-5deg) scale(1.05); } }
@keyframes splRing { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes splRise { from { transform: translateY(30px) scale(.8); opacity: 0; } }
@keyframes splFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splLoad { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splShine { to { background-position: -200% 0; } }
@keyframes splLane { to { background-position: -80px 0; } }
@keyframes splDrive { 0% { left: -140px; } 60% { left: calc(50% - 60px); } 75% { left: calc(50% - 56px); } 100% { left: calc(50% - 60px); } }
@keyframes splBounce { to { transform: translateY(-1.5px); } }
@keyframes splZip { from { left: -90px; } to { left: 110%; } }
@keyframes splOut { to { opacity: 0; transform: scale(1.08); filter: blur(4px); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { #pwa-splash *, #pwa-splash *::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }

/* =====================================================================
   App mode (installed PWA): native-app look — clean, compact, touch friendly
   ===================================================================== */
.pwa-greet { display: none; }
html.pwa { -webkit-tap-highlight-color: transparent; }
html.pwa { overscroll-behavior-y: none; }   /* on <html> (the real scroller): on <body> it blocked mouse-wheel scrolling */
html.pwa body { background: #eef3fb; }
html.pwa .topbar { height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  background: linear-gradient(135deg, #0b2353 0%, #1347b8 100%); border: 0; box-shadow: 0 6px 20px rgba(11, 35, 83, .25); }
html.pwa .topbar .brand-name { color: #fff; font-size: 1.3rem; }
html.pwa .topbar .brand-sub { color: #9fc1ff; }
html.pwa .topbar .brand-logo { background: #fff; border-radius: 12px; padding: 4px; height: 38px; }
html.pwa .topbar .icon-btn, html.pwa .topbar .top-member { color: #fff; }
html.pwa .topbar .lang-switch { background: rgba(255, 255, 255, .14); border-color: transparent; }
html.pwa .topbar .lang-switch a { color: #cfe0ff; }
html.pwa .topbar .lang-switch a.on { background: #fff; color: var(--navy-900); }
html.pwa .footband { display: none; }
html.pwa main { animation: pwaIn .35s ease both; min-height: 60vh; padding-bottom: 18px; }
html.pwa main.leaving { opacity: .35; transform: translateY(4px); transition: opacity .2s, transform .2s; }
html.pwa .hero { background: linear-gradient(180deg, #1347b8 0%, #2f74f5 55%, #eef3fb 100%); color: #fff; border-radius: 0 0 28px 28px; }
html.pwa .hero .hero-art, html.pwa .hero .hero-script, html.pwa .hero .pill-badge, html.pwa .hero h1, html.pwa .hero .hero-sub { display: none; }
html.pwa .hero .container { padding-top: 18px; padding-bottom: 26px; }
html.pwa .pwa-greet { display: grid; gap: 2px; margin-bottom: 14px; }
html.pwa .pwa-greet small { font-weight: 700; opacity: .85; font-size: .9rem; }
html.pwa .pwa-greet b { font-size: 1.7rem; font-weight: 900; letter-spacing: -.3px; line-height: 1.15; }
html.pwa .pwa-greet span { opacity: .85; font-size: .92rem; }
html.pwa .hero-cta { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
html.pwa .hero-cta .btn { justify-content: center; border-radius: 16px; padding: 12px 10px; font-size: .92rem; }
html.pwa .hero-cta .btn-outline { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .5); }
html.pwa .card { border-radius: 22px; border: 0; box-shadow: 0 6px 18px rgba(15, 45, 107, .07); }
html.pwa .tool { border-radius: 24px; }
html.pwa a, html.pwa button { touch-action: manipulation; }
html.pwa .tool:active, html.pwa .card:active, html.pwa .btn:active, html.pwa .tabbar a:active { transform: scale(.97); transition: transform .08s; }
html.pwa .section-title { font-size: 1.05rem; }
html.pwa .page-head { border-radius: 0 0 24px 24px; }
@media (max-width: 899px) {
  html.pwa .tabbar { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: var(--tabbar-h); padding: 0; border-radius: 24px;
    background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 10px 30px rgba(11, 35, 83, .18); }
  html.pwa body { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
  html.pwa .sp-tab { top: 40%; }
}
.pwa-load { position: fixed; left: 0; top: 0; height: 3px; z-index: 300; width: 0; background: linear-gradient(90deg, #ffc928, #ff8a1f); box-shadow: 0 0 8px #ffc928; transition: width 1.2s cubic-bezier(.1, .7, .2, 1); }
.pwa-load.go { width: 85%; }
@keyframes pwaIn { from { opacity: 0; transform: translateY(10px); } }
.tools .tool.tool-wide { min-height: 112px; }
@media (min-width: 900px) { .tools .tool.tool-wide { min-height: 140px; } }
html.pwa .hero .container { padding-bottom: 56px; }
html.pwa .dash { margin-top: -34px; }
@media (min-width: 900px) { html.pwa .dash { margin-top: -34px; } }

/* ---------- Admin: e-mail templates ---------- */
.et-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 16px; }
.et-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .9rem; color: var(--ink-700); }
.et-tabs a:hover { border-color: var(--blue-500); color: var(--blue-700); }
.et-tabs a.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.et-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange-500); }
.et-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .et-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } .et-side { position: sticky; top: 84px; } }
.et-side { display: grid; gap: 18px; }
.et-desc { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; font-size: .9rem; }
.et-desc .ic { width: 18px; height: 18px; color: var(--orange-500); }
.et-edit .field { margin-bottom: 16px; }
.et-edit textarea[data-et-body] { min-height: 300px; border-radius: 0 0 12px 12px !important; }
.et-edit code { background: var(--blue-50); padding: 1px 5px; border-radius: 5px; font-size: .82rem; }
.et-tools { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: var(--blue-50); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; margin-bottom: -6px; }
.et-tools button { min-width: 34px; height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--navy-900); font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; }
.et-tools button:hover { background: #fff; box-shadow: 0 1px 4px rgba(11, 35, 83, .12); }
.et-tools button .ic { width: 16px; height: 16px; }
.et-tools .et-btnbtn { background: var(--blue-600); color: #fff; font-size: .8rem; margin-left: 4px; }
.et-tools .et-btnbtn:hover { background: var(--blue-700); }
.et-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.et-vars button { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px; border: 1px dashed #b9c7e4; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.et-vars button:hover { border-style: solid; border-color: var(--blue-500); background: var(--blue-50); }
.et-vars code { background: none !important; padding: 0 !important; color: var(--blue-700); font-weight: 700; }
.et-vars span { font-size: .72rem; color: var(--ink-500); font-weight: 600; }
.et-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.et-prev { padding: 0; overflow: hidden; }
.et-prev-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.et-prev-head b { display: inline-flex; gap: 8px; align-items: center; color: var(--navy-900); }
.et-prev-head b .ic { width: 18px; height: 18px; color: var(--blue-600); }
.et-dev { display: inline-flex; background: var(--blue-50); border-radius: 10px; padding: 3px; }
.et-dev button { border: 0; background: transparent; width: 34px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--ink-500); }
.et-dev button.on { background: #fff; color: var(--blue-700); box-shadow: 0 1px 4px rgba(11, 35, 83, .15); }
.et-dev .ic { width: 17px; height: 17px; }
.et-inbox { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.et-inbox img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.et-inbox div { display: grid; min-width: 0; font-size: .85rem; line-height: 1.35; }
.et-inbox b { color: var(--navy-900); }
.et-inbox span { color: var(--ink-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.et-frame { background: #dfe5ef; padding: 0; transition: padding .25s; }
.et-frame iframe { display: block; width: 100%; height: 620px; border: 0; background: #eef2f8; margin: 0 auto; transition: width .25s, border-radius .25s; }
.et-frame.mob { padding: 18px 0; }
.et-frame.mob iframe { width: 375px; max-width: 100%; border-radius: 26px; box-shadow: 0 0 0 8px #14213d, 0 16px 30px rgba(11, 35, 83, .3); }
.et-note { margin: 0; padding: 10px 16px; font-size: .8rem; }

/* "Back to the main page" on sign-in / sign-up / password pages */
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(11, 35, 83, .06); font-weight: 700; font-size: .9rem; color: var(--navy-900); }
.auth-back:hover { border-color: var(--blue-500); color: var(--blue-700); }
.auth-back .ic, .auth-home .ic { width: 18px; height: 18px; transition: transform .2s; }
.auth-back:hover .ic, .auth-home:hover .ic { transform: translateX(-3px); }
.auth-home { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 16px -4px 0; padding-top: 14px; border-top: 1px solid var(--line);
  font-weight: 700; font-size: .9rem; color: var(--ink-500); }
.auth-home:hover { color: var(--blue-700); }

/* Admin sign-in pop-up */
.adm-badge { display: flex; width: max-content; margin: 0 auto 8px; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--navy-900); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.adm-badge .ic { width: 15px; height: 15px; color: var(--orange-400); }
.adm-title { text-align: center; font-size: 1.35rem; margin: 0 0 16px; }
.adm-sub { text-align: center; margin: 0 0 14px; font-size: .9rem; }
[data-admin-auth] .auth-modal-box { border-top: 4px solid var(--navy-900); }

/* Presentation mode: the app-mode page animation (transform) would make the fixed full-screen stage
   size itself to <main> instead of the screen → black area at the bottom. Switch it off while presenting. */
html.present main, html.present main.leaving { animation: none !important; transform: none !important; opacity: 1 !important; }
html.present .sp-widget, html.present .inst-pop, html.present .pwa-load { display: none !important; }
html.present .slide-page { height: 100vh; height: 100dvh; }

/* ---------- Admin: website visitors ---------- */
.chip-green { background: var(--green-100); color: var(--green-600); }
.vz { margin: 6px 0 24px; }
.vz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 12px; }
.vz-head h2, .vz-sec { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 1.15rem; color: var(--navy-900); }
.vz-sec { margin: 8px 0 12px; }
.vz-stats { margin-bottom: 16px; }
.vz-stats .pg-stat { position: relative; }
.vz-stats .pg-stat b { display: flex; align-items: baseline; gap: 8px; }
.vz-stats .pg-stat b > span { font: inherit; color: inherit; }
.vz-stats .pg-stat small { color: var(--ink-500); font-size: .78rem; font-weight: 600; }
.vz-cmp { font-style: normal; font-size: .72rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.vz-cmp.up { background: var(--green-100); color: var(--green-600); }
.vz-cmp.down { background: #ffe8e8; color: #c62828; }
.vz-live { background: linear-gradient(135deg, #f1fdf7, #fff 60%); }
.vz-pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--green-500); position: relative; display: inline-block; flex: none; }
.vz-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green-500); animation: vzPulse 1.6s ease-out infinite; }
.vz-pulse.sm { width: 10px; height: 10px; }
@keyframes vzPulse { to { transform: scale(2.6); opacity: 0; } }
.vz-cols { margin-bottom: 16px; }
@media (min-width: 1000px) { .vz-cols { grid-template-columns: 1.5fr 1fr; } }
.vz-bars { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 6px; }
.vz-bars > * { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; text-decoration: none; }
.vz-bars span { width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); border-radius: 5px 5px 2px 2px; transition: filter .15s; }
.vz-bars .we span { background: linear-gradient(180deg, #7aa6f7, #4f7fd8); }
.vz-bars .now span { background: linear-gradient(180deg, var(--orange-400), var(--orange-500)); }
.vz-bars > *:hover span { filter: brightness(1.15); }
.vz-bars b { font-size: .65rem; color: var(--ink-700); margin-bottom: 3px; line-height: 1; }
.vz-bars small { font-size: .62rem; color: var(--ink-500); margin-top: 4px; height: 14px; white-space: nowrap; }
.vz-bars.months { gap: 8px; }
.vz-bars.months span { max-width: 40px; }
.vz-bars.months small { font-size: .7rem; font-weight: 700; }
.vz-online { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 330px; overflow-y: auto; }
.vz-online li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.vz-online li:hover { background: var(--blue-50); }
.vz-online .vz-empty { color: var(--ink-500); justify-content: center; padding: 24px 6px; }
.vz-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); flex: none; box-shadow: 0 0 0 3px var(--green-100); }
.vz-dot.idle { background: #f0b429; box-shadow: 0 0 0 3px #fff4cc; }
.vz-dev { width: 30px; height: 30px; border-radius: 9px; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; flex: none; }
.vz-dev .ic { width: 16px; height: 16px; }
.vz-who { flex: 1; min-width: 0; display: grid; font-size: .88rem; }
.vz-who b { color: var(--navy-900); }
.vz-who .chip { font-size: .66rem; padding: 1px 7px; vertical-align: 1px; }
.vz-who small { color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .76rem; }
.vz-ago { font-size: .75rem; color: var(--ink-500); font-weight: 700; white-space: nowrap; }
.vz-split { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; margin: 0 0 10px; font-size: .88rem; font-weight: 700; color: var(--ink-700); }
.vz-split > div { height: 10px; border-radius: 9px; background: #eef1f6; overflow: hidden; }
.vz-split i { display: block; height: 100%; border-radius: 9px; background: var(--blue-600); }
.vz-split i.k-desktop { background: var(--navy-900); } .vz-split i.k-tablet { background: #7aa6f7; }
.vz-split i.k-app { background: var(--orange-500); } .vz-split i.k-members { background: var(--green-500); }
.vz-split b { text-align: right; color: var(--navy-900); } .vz-split small { color: var(--ink-500); font-weight: 600; }
.vz-month { display: flex; gap: 6px; align-items: center; }
.vz-month input { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 700; color: var(--navy-900); background: #fff; }
.vz-side { display: grid; gap: 16px; align-content: start; }
.vz-table td, .vz-table th { white-space: nowrap; }
.vz-table .vz-today td { background: #fff7ec; }
.vz-table .vz-we td:first-child b { color: var(--blue-600); }
.vz-cell-bar { width: 35%; } .vz-cell-bar i { display: block; height: 8px; min-width: 2px; border-radius: 9px; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); }
.vz-table tfoot th { border-top: 2px solid var(--line); color: var(--navy-900); }
.vz-note { font-size: .8rem; margin: 10px 0 0; }
.vz-pages { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: p; }
.vz-pages li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .88rem; }
.vz-pages code { background: var(--blue-50); padding: 3px 8px; border-radius: 7px; color: var(--blue-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .vz-hide-s { display: none; } .vz-split { grid-template-columns: 100px 1fr 70px; } }

/* ---------- Background music switch (e-book + slides): icon only, opens fully on hover ---------- */
.mz { position: fixed; z-index: 55; left: 14px; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); display: flex; align-items: center;
  background: #fff; border-radius: 999px; padding: 5px; box-shadow: 0 10px 28px rgba(11, 35, 83, .18), 0 0 0 1px rgba(11, 35, 83, .06); }
@media (min-width: 1200px) { .mz { bottom: 22px; left: 22px; } }
html.pwa .mz { bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
.mz-fab { display: flex; align-items: center; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; text-align: left; color: var(--navy-900); }
.mz-ic, .mz-eq { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.mz-ic { background: var(--blue-50); color: var(--blue-600); transition: background .2s, color .2s; }
.mz-fab:hover .mz-ic { background: var(--blue-600); color: #fff; }
.mz-ic .ic { width: 20px; height: 20px; }
.mz-eq { display: none; background: linear-gradient(135deg, var(--blue-500), var(--navy-900)); grid-auto-flow: column; gap: 3px; align-items: end; justify-content: center; padding: 11px 0; }
.mz-eq i { display: block; width: 3px; height: 100%; border-radius: 3px; background: #fff; transform-origin: bottom; animation: mzEq 1.1s ease-in-out infinite; }
.mz-eq i:nth-child(2) { animation-delay: -.35s; } .mz-eq i:nth-child(3) { animation-delay: -.7s; } .mz-eq i:nth-child(4) { animation-delay: -.2s; animation-duration: 1.4s; }
@keyframes mzEq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.mz.on .mz-ic { display: none; } .mz.on .mz-eq { display: grid; }
/* hidden parts slide open */
.mz-txt, .mz-vol { max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s ease, opacity .2s ease, padding .3s ease; }
.mz-txt { display: grid; line-height: 1.2; }
.mz-txt b { font-size: .86rem; }
.mz-txt small { font-size: .72rem; color: var(--ink-500); font-weight: 600; }
.mz-vol { display: flex; align-items: center; gap: 6px; color: var(--blue-600); }
.mz-vol .ic { width: 16px; height: 16px; flex: none; }
.mz-vol input { width: 84px; accent-color: var(--blue-600); }
.mz:hover .mz-txt, .mz:has(:focus-visible) .mz-txt, .mz.peek .mz-txt { max-width: 260px; opacity: 1; padding: 0 12px 0 10px; }
.mz-pick { display: flex; align-items: center; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .3s ease, opacity .2s ease, padding .3s ease; }
.mz-pick select { max-width: 170px; min-height: 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--blue-50); color: var(--navy-900); font: inherit; font-size: .8rem; font-weight: 700; padding: 0 6px; }
.mz:hover .mz-pick, .mz:has(:focus-visible) .mz-pick, .mz:has(select:focus) .mz-pick, .mz.peek .mz-pick { max-width: 200px; opacity: 1; padding: 0 8px; border-left: 1px solid var(--line); }
.mz:has(select:focus) .mz-txt { max-width: 260px; opacity: 1; padding: 0 12px 0 10px; }
.mz.on:has(select:focus) .mz-vol,
.mz.on:hover .mz-vol, .mz.on:has(:focus-visible) .mz-vol, .mz.on.peek .mz-vol { max-width: 140px; opacity: 1; padding: 0 12px 0 8px; border-left: 1px solid var(--line); }
@media (max-width: 600px) { .mz-txt small { display: none; } .mz-vol input { width: 70px; } }
@media (prefers-reduced-motion: reduce) { .mz-eq i { animation: none; transform: scaleY(.6); } .mz-txt, .mz-vol { transition: none; } }
/* in presentation mode the switch lives in the bottom bar */
html.present .mz { display: none !important; }
.pr-mz.on { background: var(--blue-600) !important; color: #fff !important; }
.pr-mz.on .ic { animation: mzPulse 1.6s ease-in-out infinite; }
@keyframes mzPulse { 50% { transform: scale(1.15); } }
@media print { .mz { display: none !important; } }

/* ---------- Admin: background music library ---------- */
.btn-danger-soft { background: #ffecec; color: #c62828; }
.btn-danger-soft:hover { background: #ffdcdc; color: #a31515; }
.mu-switches { display: grid; gap: 12px; padding: 4px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
@media (min-width: 900px) { .mu-switches { grid-template-columns: 1fr 1fr; } }
.mu-switches .check span { display: grid; gap: 2px; }
.mu-switches small { font-weight: 600; font-size: .8rem; }
.mu-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; font-size: 1rem; }
.mu-h small { font-weight: 600; font-size: .82rem; }
.mu-list { display: grid; gap: 8px; }
.mu-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; flex-wrap: wrap; }
.mu-row.is-default { border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.mu-row.is-off { opacity: .6; }
.mu-radio { position: relative; width: 22px; height: 22px; flex: none; cursor: pointer; }
.mu-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mu-radio span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #b9c7e4; background: #fff; transition: .15s; }
.mu-radio input:checked + span { border: 7px solid var(--green-500); }
.mu-radio input:disabled + span { background: #eef1f6; }
.mu-radio input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 116, 245, .3); }
.mu-art { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--blue-500), var(--navy-900)); }
.mu-art.up { background: linear-gradient(135deg, var(--orange-400), #e05d00); }
.mu-art .ic { width: 20px; height: 20px; }
.mu-info { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.mu-info b { color: var(--navy-900); }
.mu-info small { font-size: .78rem; }
.mu-info audio { width: 100%; max-width: 380px; height: 34px; margin-top: 6px; }
.mu-on { font-size: .88rem; }
.mu-empty { margin: 6px 0; }
.mu-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed #b9c7e4; border-radius: 16px; background: var(--blue-50); text-align: center; cursor: pointer; transition: .15s; }
.mu-drop:hover, .mu-drop.over { border-color: var(--blue-500); background: #e9f1ff; }
.mu-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mu-drop-ic { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--blue-600); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(11, 35, 83, .1); }
.mu-drop-ic .ic { width: 24px; height: 24px; }
.mu-drop b { color: var(--navy-900); }
.mu-drop small { font-weight: 600; }
.mu-picked { display: grid; gap: 2px; font-size: .82rem; font-weight: 700; color: var(--ink-700); }
.mu-picked .big { color: #c62828; }
.mu-tip { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; margin: 12px 0 14px; }
.mu-tip .ic { color: var(--orange-500); flex: none; width: 18px; height: 18px; }
.mu-dlg { border: 0; border-radius: 20px; padding: 22px; width: min(440px, calc(100% - 32px)); box-shadow: 0 24px 60px rgba(11, 35, 83, .35); }
.mu-dlg::backdrop { background: rgba(11, 35, 83, .5); backdrop-filter: blur(2px); }
.mu-dlg-act { display: flex; gap: 8px; flex-wrap: wrap; }
.mu-dlg-act .btn-danger-soft { margin-left: auto; }
