/* =====================================================================================================================
   Jin Seon Learn: the app's design system on the web (mobile lib/core/theme/tokens.dart, core/widgets/*).
   Colours, type scale, radii and components follow the app; layouts adapt from phones (bottom navigation) to desktops
   (top navigation).
   ===================================================================================================================== */

:root {
  /* core colours */
  --red: #FF0000; --red-deep: #C60034; --red-50: #FFF0F0; --red-100: #FFDCDC;
  --blue: #0000FF; --blue-deep: #0000B3; --blue-50: #EEEEFF;
  --success: #1E8E3E; --success-50: #E8F4EC; --warning-fg: #9A5B00; --warning-50: #FFF4E5;
  --text: #1A1A1A; --text-2: #4D4D4D; --text-3: #808080; --icon-muted: #A6A6A6;
  --border: #D1D1D1; --field-border: #DDE1E6; --border-subtle: #EBEBEB; --divider: #E6E6E6;
  --surface: #F5F5F5; --skeleton: #EDEDED; --white: #FFFFFF; --scrim: rgba(26, 26, 26, .55);
  /* home palette */
  --page: #F6F7FC; --ink: #14162B; --muted: #6B7090; --line: #E6E8F2; --brand-blue: #0000E6;
  --shadow-rgb: 40, 44, 90;
  /* buttons */
  --exam: #E00018; --exam-pressed: #B8000F; --exam-disabled: #F3B3BA;
  --primary: #3A12C8; --primary-pressed: #2C0E9E; --primary-disabled: #BDB3EA;
  --destructive: #B3261E; --tonal: #ECE8FF; --tonal-pressed: #DCD5FF;
  /* cards */
  --card-shadow: 0 4px 14px rgba(var(--shadow-rgb), .06);
  --selected-bg: #F7F5FF; --danger-bg: #FFF6F7; --danger-border: #FFD5DA;
  /* type */
  --font-display: "Manrope", "Noto Sans Myanmar", "Noto Sans KR", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Myanmar", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mm: "Noto Sans Myanmar", "Inter", system-ui, sans-serif;
  --font-kr: "Noto Sans KR", "Inter", "Noto Sans Myanmar", system-ui, sans-serif;
  /* layout */
  --gutter: 16px; --header-h: 60px; --bottom-nav-h: 64px; --content-max: 1200px;
  --r-field: 12px; --r-card: 20px; --r-hero: 24px; --r-inline: 14px; --r-dialog: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: 160ms;
}

@media (min-width: 600px) { :root { --gutter: 32px; } }

/* --------------------------------------------------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 400 16px/1.4 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
/* The page heading takes focus after a navigation (for screen readers); it needs no ring. */
h1:focus, h1:focus-visible { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { flex: none; }
[hidden] { display: none !important; }

.mm { font-family: var(--font-mm); line-height: 1.65; }
.kr { font-family: var(--font-kr); }
.muted { color: var(--muted); }
.t-display { font: 700 28px/1.2 var(--font-display); letter-spacing: -.5px; }
.t-h1 { font: 700 22px/1.25 var(--font-display); letter-spacing: -.4px; }
.t-title { font: 700 20px/1.25 var(--font-display); letter-spacing: -.3px; }
.t-h2 { font: 600 18px/1.3 var(--font-display); letter-spacing: -.3px; }
.t-card { font: 600 16px/1.3 var(--font-display); letter-spacing: -.2px; }
.t-label { font: 600 15px/1.3 var(--font-body); }
.t-body-sm { font-size: 14px; }
.t-caption { font-size: 13px; color: var(--text-2); }
.t-small { font-size: 12px; color: var(--text-3); }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

/* ----------------------------------------------------------------------------------------------------- page skeleton */
.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.app-main { flex: 1; width: 100%; }
/* Room for the bottom tabs (and their border), so the last card never sits under them. */
.app.has-bottom-nav .app-main { padding-bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px)); }
.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 720px; }
.container.mid { max-width: 900px; }
.section { padding-top: 20px; padding-bottom: 32px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.grid-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1140px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; overflow: hidden; }
.brand-name { font: 800 16px var(--font-display); color: var(--ink); letter-spacing: -.3px; }
.brand-tag { font: 500 10.5px var(--font-body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Phones: the tabs at the bottom carry Login, so the header keeps only the brand and one button. */
@media (max-width: 599px) { .hide-phone { display: none !important; } }
.top-nav { display: none; align-items: center; gap: 4px; margin-left: 18px; }
.top-nav > a, .top-nav .menu > summary {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 12px;
  font: 600 14.5px var(--font-body); color: var(--text-2); cursor: pointer; list-style: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.top-nav .menu > summary::-webkit-details-marker { display: none; }
.top-nav > a:hover, .top-nav .menu > summary:hover { background: var(--page); color: var(--ink); }
.top-nav > a.active, .top-nav .menu.active > summary { color: var(--red); background: var(--red-50); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: none; border: 0; color: var(--ink);
}
.icon-btn:hover { background: var(--page); }
.dot {
  position: absolute; top: 10px; right: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  border: 1.5px solid var(--white);
}
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font: 700 13px var(--font-body);
  background: #EEEEFF; color: #0000FF; flex: none;
}
.avatar.student { background: #FFF0F0; color: #FF0000; }

/* menus (desktop dropdowns, no script: <details>) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 230px; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 16px 40px rgba(var(--shadow-rgb), .14); padding: 8px; z-index: 50;
}
.top-nav .menu-panel { left: 0; right: auto; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  font: 600 14px var(--font-body); color: var(--ink); text-align: left;
}
.menu-item:hover, .menu-item.active { background: var(--page); }
.menu-item .menu-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.menu-item small { display: block; font: 400 12px var(--font-mm); color: var(--muted); margin-top: 1px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-user { padding: 10px 12px 12px; display: flex; gap: 10px; align-items: center; }
.menu-user strong { display: block; font: 700 14px var(--font-body); }
.menu-user span { font-size: 12px; color: var(--muted); }

@media (min-width: 900px) {
  .top-nav { display: flex; }
  .bottom-nav { display: none !important; }
  .app.has-bottom-nav .app-main { padding-bottom: 0; }
}

/* ------------------------------------------------------------------------------------------------------ bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--white); border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav ul { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0; padding: 0; list-style: none; height: var(--bottom-nav-h); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; margin: 0 4px;
  color: var(--text-3); font: 500 11px var(--font-body); letter-spacing: -.1px; border-radius: 12px;
}
.bottom-nav a .icon { stroke-width: 1.9; }
.bottom-nav a.active { color: var(--red); font-weight: 600; }
.bottom-nav a.active .icon { stroke-width: 2.2; }
.bottom-nav a:active { background: var(--page); }

/* ------------------------------------------------------------------------------------------------------ page header */
.page-head { background: var(--white); border-bottom: 1px solid var(--border-subtle); }
.page-head .container { min-height: var(--header-h); display: flex; align-items: center; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.page-head .back { margin-left: -10px; }
.page-head-text { min-width: 0; flex: 1; }
.page-head-text h1 { font: 700 20px/1.25 var(--font-display); letter-spacing: -.3px; }
.page-head-text .sub { font: 400 12.5px/1.5 var(--font-mm); color: var(--text-3); }
.page-head.big h1 { font-size: 22px; letter-spacing: -.4px; }
.page-head-end { display: flex; align-items: center; gap: 8px; }
.user-badge { display: flex; align-items: center; gap: 10px; }
.user-badge .who { text-align: right; line-height: 1.2; }
.user-badge .who small { display: block; font-size: 12px; color: var(--muted); }
.user-badge .who strong { display: block; font: 600 14px var(--font-body); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------------------------------------------------- buttons */
.btn {
  --bg: var(--primary); --fg: #fff; --bd: transparent; --bg-press: var(--primary-pressed);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 14px;
  border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg); font: 700 15px var(--font-body); letter-spacing: .1px;
  white-space: nowrap; text-decoration: none; user-select: none; position: relative;
  transition: transform 120ms var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur);
}
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.97); background: var(--bg-press); }
.btn-primary, .btn-exam { box-shadow: 0 4px 12px color-mix(in srgb, var(--bg) 25%, transparent); }
.btn-exam { --bg: var(--exam); --bg-press: var(--exam-pressed); }
.btn-secondary { --bg: transparent; --fg: var(--primary); --bd: var(--primary); --bg-press: var(--tonal); box-shadow: none; }
.btn-exam-secondary { --bg: transparent; --fg: var(--exam); --bd: var(--exam); --bg-press: var(--red-50); }
.btn-tonal { --bg: var(--tonal); --fg: var(--primary); --bg-press: var(--tonal-pressed); }
.btn-text { --bg: transparent; --fg: var(--primary); --bg-press: var(--tonal); padding: 0 10px; height: 36px; }
.btn-destructive { --bg: transparent; --fg: var(--destructive); --bd: var(--destructive); --bg-press: #FFE3E6; }
.btn-destructive-text { --bg: transparent; --fg: var(--destructive); --bg-press: #FFE3E6; padding: 0 10px; height: 36px; }
.btn-white { --bg: #fff; --fg: var(--brand-blue); --bg-press: #f2f2ff; }
.btn-lg { height: 52px; padding: 0 24px; border-radius: 16px; }
.btn-sm { height: 36px; padding: 0 16px; border-radius: 12px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }
.btn .mm, .btn.mm { font-family: var(--font-mm); font-weight: 700; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; box-shadow: none; }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { --bg: var(--primary-disabled); }
.btn-exam:disabled, .btn-exam[aria-disabled="true"] { --bg: var(--exam-disabled); }
.btn-secondary:disabled, .btn-secondary[aria-disabled="true"], .btn-text:disabled, .btn-tonal:disabled, .btn-exam-secondary:disabled,
.btn-destructive:disabled { opacity: .4; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fg);
  border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-pair { display: flex; gap: 10px; }
.btn-pair > * { flex: 1; min-width: 0; }
.link { color: var(--primary); font-weight: 600; font-size: 14px; background: none; border: 0; padding: 4px 2px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.link-danger { color: var(--destructive); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------------------------------------------------ cards */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--card-shadow); padding: 16px;
}
a.card, .card.interactive { display: block; transition: transform 120ms var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur); }
a.card:hover, .card.interactive:hover { box-shadow: 0 10px 26px rgba(var(--shadow-rgb), .1); border-color: #D9DCEC; }
a.card:active, .card.interactive:active { transform: scale(.985); }
.card.selected { border: 1.5px solid var(--primary); background: var(--selected-bg); }
.card.inline { background: var(--page); border: 0; box-shadow: none; border-radius: var(--r-inline); padding: 12px; }
.card.danger { background: var(--danger-bg); border-color: var(--danger-border); }
.card.flat { box-shadow: none; }
.card.compact { padding: 12px 14px; }

/* ----------------------------------------------------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 4px 10px; border-radius: 999px; max-width: 100%;
  font: 700 10.5px/1.2 var(--font-body); letter-spacing: .1px; white-space: nowrap; vertical-align: middle;
}
.badge .icon { margin-left: -2px; }
.badge-text { overflow: hidden; text-overflow: ellipsis; }
.badge.mm { font-family: var(--font-mm); font-size: 11px; line-height: 1.3; }
.badge-level { background: #EBE8FF; color: var(--primary); max-width: 132px; }
.badge-success { background: #DCF5E6; color: #12793F; }
.badge-neutral { background: #ECEEF5; color: var(--muted); }
.badge-highlight { background: #FFF1CF; color: #8A5A00; }
.badge-warning { background: #FFE9D6; color: #A8500A; }
.badge-danger { background: #FFE3E6; color: var(--destructive); }
.badge-gold { background: #FFF3D1; color: #9A6A00; }

/* ------------------------------------------------------------------------------------------------------------ chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; background: #E6E6E6; color: var(--text);
  font: 600 14px var(--font-body); white-space: nowrap; flex: none; transition: background var(--dur);
}
.chip:hover { background: #DCDCDC; }
.chip.active { background: var(--primary); color: #fff; }

/* ------------------------------------------------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs a { padding: 2px 12px 10px; margin-bottom: -1px; color: var(--text-3); font: 500 16px var(--font-body); border-bottom: 2.5px solid transparent; }
.tabs a.active { color: var(--red); font-weight: 600; border-bottom-color: var(--red); }

/* ----------------------------------------------------------------------------------------------------------- fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field-label { font: 600 15px/1.3 var(--font-body); }
.input {
  height: 56px; width: 100%; padding: 0 16px; border-radius: var(--r-field); border: 1px solid var(--field-border); background: var(--white);
  font-size: 16px; color: var(--text); caret-color: var(--blue); outline: none; transition: border-color var(--dur), box-shadow var(--dur);
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 .5px var(--blue); }
.input[readonly], .input:disabled { background: var(--surface); color: var(--text-3); border-color: var(--border-subtle); }
.field.invalid .input { border-color: var(--red); }
.field.invalid .input:focus { box-shadow: 0 0 0 .5px var(--red); }
.field-help { font: 400 12px/1.5 var(--font-mm); color: var(--text-3); }
.field-error { font: 400 12px/1.5 var(--font-mm); color: var(--red); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .reveal { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--text-3); border-radius: 10px; }
.input-wrap .reveal[aria-pressed="true"] { color: var(--blue); }
.code-input { text-align: center; font: 700 26px var(--font-display); letter-spacing: 10px; }
::selection { background: #EEEEFF; }

/* ----------------------------------------------------------------------------------------------------------- alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 8px; font: 400 13px/1.6 var(--font-mm); }
.alert .alert-glyph { font: 800 15px var(--font-display); line-height: 1.3; flex: none; }
.alert-danger { background: var(--red-50); color: var(--red-deep); }
.alert-success { background: var(--success-50); color: var(--success); }
.alert-warning { background: var(--warning-50); color: var(--warning-fg); }
.alert-info { background: var(--blue-50); color: var(--blue); }
.alert-neutral { background: var(--surface); color: var(--text-2); }
.note-box { background: #F1EFFF; color: #3A2FA0; border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; font: 400 13px/1.6 var(--font-mm); }

/* ---------------------------------------------------------------------------------------------------------- dialogs */
dialog.dialog {
  border: 0; padding: 20px; border-radius: var(--r-dialog); width: min(420px, calc(100vw - 40px)); max-height: calc(100dvh - 48px);
  background: var(--white); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); overflow: auto;
}
dialog.dialog::backdrop { background: var(--scrim); }
dialog.dialog[open] { animation: dialog-in 200ms var(--ease); }
.dialog h2 { font: 700 20px/1.25 var(--font-display); letter-spacing: -.3px; margin-bottom: 14px; }
.dialog .dialog-body { font: 400 14px/1.75 var(--font-mm); color: var(--text-2); white-space: pre-line; }
.dialog .dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
.dialog .dialog-actions > * { flex: 1; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-layer { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: grid; place-items: center; padding: 20px; animation: fade-in 160ms; }
.modal-layer > .dialog-card { background: var(--white); border-radius: var(--r-dialog); padding: 20px; width: min(420px, 100%); max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: dialog-in 200ms var(--ease); }
.dialog-card h2 { font: 700 20px/1.25 var(--font-display); letter-spacing: -.3px; margin-bottom: 14px; }
.dialog-card .dialog-body { font: 400 14px/1.75 var(--font-mm); color: var(--text-2); white-space: pre-line; }
.dialog-card .dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
.dialog-card .dialog-actions > * { flex: 1; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ----------------------------------------------------------------------------------------------------- toast (flash) */
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: grid; justify-items: center; pointer-events: none; padding: 0 16px; }
.app:not(.has-bottom-nav) .toast-host, .exam-root .toast-host { bottom: 24px; }
@media (min-width: 900px) { .toast-host { bottom: 28px; } }
.toast {
  pointer-events: auto; background: #1A1A1A; color: #fff; border-radius: 8px; padding: 12px 16px; max-width: 560px; width: max-content;
  font: 400 14px/1.6 var(--font-mm); box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toast-in 220ms var(--ease);
}
.toast.leaving { animation: toast-out 220ms var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* --------------------------------------------------------------------------------------------- empty / error / load */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 32px; gap: 10px; }
.state .state-ic { width: 88px; height: 88px; border-radius: 50%; background: var(--white); display: grid; place-items: center; color: var(--icon-muted); margin-bottom: 6px; box-shadow: var(--card-shadow); }
.state.error .state-ic { background: var(--red-50); color: var(--red); font: 700 40px var(--font-display); box-shadow: none; }
.state h2 { font: 600 18px/1.3 var(--font-display); }
.state p { font: 400 14px/1.65 var(--font-mm); color: var(--text-2); max-width: 420px; }
.state .btn { margin-top: 8px; }
.skeleton { background: var(--skeleton); border-radius: 8px; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: .45; } }
.skel-card { display: flex; flex-direction: column; gap: 12px; }
.loading-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; pointer-events: none; overflow: hidden; }
.loading-bar::after { content: ""; position: absolute; inset: 0; background: var(--primary); transform-origin: left; animation: loading 1.1s var(--ease) infinite; }
@keyframes loading { 0% { transform: translateX(-100%) scaleX(.3); } 60% { transform: translateX(40%) scaleX(.6); } 100% { transform: translateX(100%) scaleX(.3); } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.dots { display: inline-flex; gap: 8px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; animation: bounce 1.2s infinite ease-in-out; }
.dots span:nth-child(1) { background: var(--red); }
.dots span:nth-child(2) { background: var(--blue); animation-delay: .15s; }
.dots span:nth-child(3) { background: var(--text); animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-8px); opacity: 1; } }

/* ------------------------------------------------------------------------------------------------------------ home */
.home-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .home-grid { grid-template-columns: 5fr 6fr; gap: 28px; align-items: start; } }
.greeting h1 { font: 700 20px/1.55 var(--font-mm); color: var(--ink); }
@media (min-width: 900px) { .greeting h1 { font-size: 26px; } }
.greeting p { font: 400 14px/1.6 var(--font-mm); color: var(--muted); }
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-hero); color: #fff; padding: 18px 16px 16px 20px; min-height: 172px;
  background:
    radial-gradient(125% 125% at 55% 45%, #9A1FD8 0%, transparent 70%),
    radial-gradient(125% 125% at 100% 100%, #1B1BFF 0%, transparent 62%),
    radial-gradient(125% 125% at 0% 0%, #FF1F3D 0%, transparent 60%),
    linear-gradient(135deg, #FF0A2A, #2A10E8);
  box-shadow: 0 8px 18px rgba(42, 16, 232, .22);
  display: flex; flex-direction: column; animation: hero-in 420ms cubic-bezier(.215, .61, .355, 1);
}
@keyframes hero-in { from { opacity: 0; transform: translateY(6%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero, .card, dialog.dialog[open] { animation: none !important; } }
.hero-mark { position: absolute; top: -14px; right: 10px; font: 800 96px/1 var(--font-kr); color: rgba(255, 255, 255, .13); pointer-events: none; }
.hero-pill { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); font: 600 12px/1.6 var(--font-mm); }
.hero h2 { margin-top: 10px; font: 800 22px/1.25 var(--font-display); letter-spacing: -.3px; }
.hero p { margin-top: 4px; font: 400 14px/1.6 var(--font-mm); color: rgba(255,255,255,.92); }
.hero .btn { align-self: flex-end; margin-top: 14px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 700 15px var(--font-mm); }
@media (min-width: 900px) { .hero { min-height: 220px; padding: 26px 24px 22px 28px; } .hero h2 { font-size: 26px; } }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { height: 128px; padding: 14px 12px 12px 14px; display: flex !important; flex-direction: column; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.tile-ic .icon { stroke-width: 1.8; }
.tile-title { margin-top: auto; font: 700 15px/1.3 var(--font-display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-cap { margin-top: 2px; font: 400 12.5px/1.55 var(--font-mm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tint-violet { background: #F1ECFF; color: #6D4AFF; } .tint-red { background: #FFECEF; color: #F0203E; } .tint-teal { background: #E2F6F3; color: #0F9483; }
.tint-amber { background: #FFF2DE; color: #D9860B; } .tint-blue { background: #E9EEFF; color: #2B4DFF; } .tint-green { background: #E8F4EC; color: #1E8E3E; }

/* ------------------------------------------------------------------------------------------------- test / exam cards */
.test-card { display: flex; flex-direction: column; }
.test-card .name-row { display: flex; align-items: flex-start; gap: 8px; }
.test-card .name { flex: 3; font: 700 17px/1.4 var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.test-card .name-row .badge { margin-left: auto; margin-top: 3px; }
.stats { display: flex; align-items: center; gap: 14px; margin-top: 12px; color: var(--muted); font: 600 13.5px var(--font-body); flex-wrap: wrap; }
.stats > span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.stats > span .icon { color: var(--muted); }
.stats .badge { margin-left: auto; }
.last-attempt { margin-top: 12px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.last-attempt strong { color: var(--ink); }
.progress { height: 6px; border-radius: 999px; background: #E9EBF4; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: #1FA35A; border-radius: inherit; }
.progress.blue > span { background: var(--primary); }
.card-actions { margin-top: 16px; display: flex; gap: 10px; }
.card-actions > * { flex: 1; min-width: 0; }

/* packages */
.package-card .head { display: flex; gap: 10px; align-items: flex-start; }
.package-card .name { flex: 1; font: 800 18px/1.45 var(--font-display); letter-spacing: -.3px; color: var(--ink); overflow-wrap: anywhere; }
.benefits { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.benefits span { display: inline-flex; align-items: center; gap: 4px; }
.benefits .icon { color: var(--success); }
.price-box { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 14px; }
.price-box .label { flex: 1; font: 600 13px var(--font-body); color: var(--text-2); }
.price-box .label.free { font: 600 12px/1.6 var(--font-mm); color: var(--success); }
.price { font: 800 24px var(--font-display); color: var(--ink); white-space: nowrap; }
.price small { font: 700 13px var(--font-body); color: var(--text-2); margin-left: 3px; }
.rejected-note { font: 400 12px/1.6 var(--font-mm); color: var(--red-deep); margin-bottom: 8px; }

/* ------------------------------------------------------------------------------------------------------- purchase */
.purchase { max-width: 560px; margin: 0 auto; }
.summary-card { display: flex; gap: 14px; align-items: flex-start; }
.ic-box { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.amount { font: 800 26px var(--font-display); color: var(--primary); }
.step-head { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: #ECE8FF; color: var(--primary); display: grid; place-items: center; font: 800 13px var(--font-display); }
.step-num.done { background: #DCF5E6; color: #12793F; }
.step-head h2 { font: 700 16px var(--font-display); }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.method { position: relative; display: grid !important; place-items: center; min-height: 66px; padding: 10px; text-align: center; cursor: pointer; }
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method .method-name { font: 700 14px/1.3 var(--font-body); overflow-wrap: anywhere; }
.method .check { position: absolute; top: 8px; right: 8px; color: var(--primary); display: none; }
.method:has(input:checked) { border: 1.5px solid var(--primary); background: var(--selected-bg); }
.method:has(input:checked) .method-name { color: var(--primary); }
.method:has(input:checked) .check { display: block; }
.method:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.method-detail { margin-top: 12px; }
.method-detail .qr { width: min(280px, 100%); aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin: 0 auto; cursor: zoom-in; }
.kv { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.kv > span:first-child { color: var(--text-2); min-width: 110px; }
.kv > strong { flex: 1; overflow-wrap: anywhere; }
.receipt-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 118px; cursor: pointer; text-align: center;
  border-style: dashed !important; border-width: 1.5px !important;
}
.receipt-drop .plus { width: 48px; height: 48px; border-radius: 50%; background: #ECE8FF; color: var(--primary); display: grid; place-items: center; }
.receipt-drop.has-file { border-style: solid !important; }
.receipt-preview { display: flex; gap: 12px; align-items: center; }
.receipt-preview img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--surface); }
.pending-view { max-width: 520px; margin: 0 auto; text-align: center; padding: 40px 0; }
.pending-ic { width: 88px; height: 88px; border-radius: 50%; background: var(--warning-50); color: var(--warning-fg); display: grid; place-items: center; margin: 0 auto 18px; }

/* ------------------------------------------------------------------------------------------------------- classroom */
.assign-card .top { display: flex; align-items: center; gap: 8px; }
.assign-card .top .t-card { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.assign-card.expired { opacity: .5; }
.phone-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font: 600 13px var(--font-body); padding: 4px 0; }

/* -------------------------------------------------------------------------------------------------------- history */
.day-head { font: 700 13px/1.5 var(--font-mm); color: var(--muted); padding: 18px 4px 8px; }
.day-head:first-child { padding-top: 4px; }
.hist-card .top { display: flex; gap: 14px; align-items: flex-start; }
.ring {
  --p: 0; --c: #067647; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #ECEEF5 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
.ring-wrap { position: relative; width: 64px; height: 64px; flex: none; }
.ring-wrap .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font: 800 15px var(--font-display); }
.band-low { --c: #D92D20; color: #D92D20; } .band-mid { --c: #B54708; color: #B54708; } .band-high { --c: #067647; color: #067647; }
.hist-card .name { font: 700 17px/1.4 var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.hist-card .when { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hist-card .meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font: 500 12.5px var(--font-body); color: var(--muted); flex-wrap: wrap; }
.hist-card .foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.hist-card .foot strong { color: var(--ink); font-weight: 800; }
.hist-card .foot .btn { margin-left: auto; }

/* ------------------------------------------------------------------------------------------------- notifications */
.notif { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.notif.unread { border: 1.5px solid var(--primary); background: var(--selected-bg); }
.notif .n-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.notif.unread .n-ic { background: #fff !important; }
.notif .n-body { flex: 1; min-width: 0; }
.notif .n-title { font: 400 14.5px/1.55 var(--font-mm); color: #4A4E6A; }
.notif.unread .n-title { font-weight: 700; color: var(--text); }
.notif .n-text { font: 400 13px/1.65 var(--font-mm); color: #7A7F99; margin-top: 2px; white-space: pre-line; }
.notif.unread .n-text { font-weight: 500; color: var(--text-2); }
.notif .n-time { font: 400 11px/1.6 var(--font-mm); color: var(--text-3); margin-top: 4px; }
.notif.unread .n-time { color: var(--primary); font-weight: 600; }
.notif .n-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-top: 6px; flex: none; }
.notif-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.notif-actions form { display: inline; }

/* -------------------------------------------------------------------------------------------------------- profile */
.profile-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } }
.id-hero { position: relative; overflow: hidden; border-radius: var(--r-hero); color: #fff; padding: 18px;
  background: radial-gradient(125% 125% at 55% 45%, #9A1FD8 0%, transparent 70%), radial-gradient(125% 125% at 100% 100%, #1B1BFF 0%, transparent 62%),
    radial-gradient(125% 125% at 0% 0%, #FF1F3D 0%, transparent 60%), linear-gradient(135deg, #FF0A2A, #2A10E8);
  box-shadow: 0 8px 18px rgba(42, 16, 232, .22); }
.id-hero .hero-mark { font-size: 88px; color: rgba(255,255,255,.12); }
.id-avatar { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #E00018; display: grid; place-items: center; font: 800 22px var(--font-display); box-shadow: 0 0 0 3px rgba(255,255,255,.35); flex: none; }
.id-name { font: 800 19px/1.3 var(--font-display); }
.frost { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.frost > * { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 16px; padding: 10px 12px; backdrop-filter: blur(8px); min-width: 0; }
.frost small { display: block; font: 500 11px var(--font-body); color: rgba(255,255,255,.85); }
.frost strong { display: block; font: 700 15px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frost button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.info-rows { padding: 0; overflow: hidden; }
.info-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; }
.info-row .ic-box { width: 36px; height: 36px; }
.info-row small { display: block; font-size: 11px; color: var(--muted); }
.info-row strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.action-rows { padding: 0; overflow: hidden; }
.action-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font: 600 15px var(--font-body); color: var(--text); }
.action-row:first-child { border-top: 0; }
.action-row:hover { background: var(--page); }
.action-row .ic-box { width: 36px; height: 36px; }
.action-row .chev { margin-left: auto; color: var(--icon-muted); }
.danger-row { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--r-card); }
.danger-row .ic-box { background: #FFE3E6; color: var(--destructive); }
.danger-row .label { color: var(--destructive); }
.danger-row small { display: block; font: 400 12px/1.5 var(--font-mm); color: var(--destructive); opacity: .8; }
.danger-row .chev { color: #E59AA3; }
.phone-row, a.card.phone-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; margin-top: 8px; }
.phone-row strong { flex: 1; font-size: 14px; }
.version { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ----------------------------------------------------------------------------------------------- skill tests */
.skill-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 840px) { .skill-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.skill-card { padding: 0; overflow: hidden; display: flex !important; flex-direction: column; }
.skill-card .thumb { aspect-ratio: 16 / 10; background: var(--surface); display: grid; place-items: center; color: var(--icon-muted); overflow: hidden; }
.skill-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.skill-card .body { padding: 12px 12px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.skill-card .t-card { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill-card .desc { font: 400 12px/1.6 var(--font-mm); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skill-card .count { margin-top: auto; font: 500 12px var(--font-body); color: var(--blue); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lessons { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.lesson { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.lesson:hover { background: var(--white); }
.lesson.current { background: var(--red-50); color: var(--red); font-weight: 600; }
.lesson .dur { margin-left: auto; font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------------------------------------------------- textbooks */
.book { display: flex; gap: 14px; align-items: flex-start; padding: 14px; }
.pdf-box { width: 44px; height: 52px; border-radius: 8px; background: var(--red-50); color: var(--red); display: grid; place-items: center; font: 800 12px var(--font-display); flex: none; }
.book .desc { font: 400 12.5px/1.6 var(--font-mm); color: var(--text-2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------------------------------------------------------ auth */
.auth-wrap { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; padding: 28px 16px 48px; }
.auth-card { width: 100%; max-width: 520px; padding: 24px; border-radius: 24px; }
@media (max-width: 599px) { .auth-wrap { place-items: start center; padding-top: 16px; } .auth-card { padding: 20px; } }
@media (min-width: 900px) {
  .auth-split { display: grid; grid-template-columns: 1fr 1fr; max-width: 1040px; width: 100%; gap: 0; border-radius: 28px; overflow: hidden; background: var(--white); box-shadow: 0 20px 60px rgba(var(--shadow-rgb), .12); }
  .auth-split .auth-card { box-shadow: none; border: 0; border-radius: 0; padding: 40px; max-width: none; }
  .auth-aside { display: flex !important; }
}
.auth-aside { display: none; position: relative; overflow: hidden; color: #fff; padding: 40px; flex-direction: column; justify-content: flex-end; gap: 10px;
  background: radial-gradient(125% 125% at 55% 45%, #9A1FD8 0%, transparent 70%), radial-gradient(125% 125% at 100% 100%, #1B1BFF 0%, transparent 62%),
    radial-gradient(125% 125% at 0% 0%, #FF1F3D 0%, transparent 60%), linear-gradient(135deg, #FF0A2A, #2A10E8); }
.auth-aside .hero-mark { font-size: 220px; top: -20px; right: 10px; }
.auth-aside h2 { font: 800 30px/1.2 var(--font-display); letter-spacing: -.5px; }
.auth-aside p { font: 400 15px/1.7 var(--font-mm); color: rgba(255,255,255,.92); }
.auth-card h1 { font: 700 22px/1.25 var(--font-display); letter-spacing: -.4px; margin-bottom: 16px; }
.switch-line { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 16px; }
.steps-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-bar span { flex: 1; height: 4px; border-radius: 999px; background: #E6E6E6; }
.steps-bar span.on { background: var(--red); }
.otp { letter-spacing: 14px; text-align: center; font: 700 22px var(--font-display); }

/* ------------------------------------------------------------------------------------------------- result & review */
.result-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .result-grid { grid-template-columns: 11fr 10fr; gap: 28px; } }
.points-circle { width: 132px; height: 132px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-content: center; text-align: center; flex: none; box-shadow: 0 6px 18px rgba(58, 18, 200, .28); padding: 14px; }
.points-circle strong { font: 700 40px/1.05 var(--font-display); }
.points-circle span { font: 600 15px var(--font-body); color: rgba(255,255,255,.85); }
.figures { flex: 1; min-width: 0; padding: 4px 12px; }
.figure { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.figure .label { flex: 1; font: 400 12.5px/1.5 var(--font-mm); color: var(--text-2); }
.figure .value { font: 600 14px var(--font-display); }
.section-score { text-align: center; padding: 14px 8px; }
.section-score .v { font: 700 22px var(--font-display); margin-top: 2px; }
.review-item .head { display: flex; align-items: center; gap: 8px; }
.answer-line { font-size: 14px; margin-top: 8px; }
.answer-line.ok { color: var(--success); } .answer-line.bad { color: var(--red-deep); }
.rt p { margin: 0; }
.rt ol, .rt ul { margin: 0; padding-left: 1.6em; }
.rt u { text-decoration: underline; text-underline-offset: .2em; }

/* ------------------------------------------------------------------------------------------------------- photo zoom */
.zoomable { position: relative; cursor: zoom-in; }
.zoomable .zoom-hint { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; pointer-events: none; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.94); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; touch-action: pinch-zoom; }
.lightbox .close { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; }
.lightbox .hint { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font: 400 12px/1.6 var(--font-mm); }

/* -------------------------------------------------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--white); padding: 24px 0; margin-top: 24px; font-size: 13px; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.site-footer a:hover { color: var(--ink); }
.app.has-bottom-nav .site-footer { display: none; }
@media (min-width: 900px) { .app.has-bottom-nav .site-footer { display: block; } }

/* --------------------------------------------------------------------------------------------- colour blind intro */
.cbt-intro { display: grid; gap: 20px; align-items: center; max-width: 980px; margin: 0 auto; }
@media (min-width: 760px) { .cbt-intro { grid-template-columns: 9fr 11fr; gap: 32px; } }
.cbt-plate { display: grid; place-items: center; }
.cbt-plate img { width: min(100%, 320px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 30px rgba(var(--shadow-rgb), .12); }
.cbt-side { display: flex; flex-direction: column; gap: 12px; max-width: 480px; width: 100%; margin: 0 auto; }
.cbt-text { font-size: 14px; line-height: 1.7; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad .key { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center;
  font: 700 20px var(--font-display); color: var(--ink); user-select: none; }
.numpad.is-preview { opacity: .55; pointer-events: none; }
.numpad.is-preview .key { min-height: 36px; font-size: 16px; }

/* ---------------------------------------------------------------------------------------------------- pictures */
.photo { display: block; max-width: 100%; border-radius: 12px; }
.photo img { display: block; max-width: 100%; max-height: inherit; border-radius: 12px; object-fit: contain; }
img.photo { object-fit: contain; }
.text-red { color: var(--red); }
.review-item .rt { margin-top: 8px; }
.review-instruction { font: 400 14px/1.5 var(--font-kr); color: var(--text-2); }
.review-question { font: 400 15px/1.6 var(--font-kr); color: var(--ink); }
.answer-lines { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; }
.answer-lines strong { font-weight: 600; }
