:root {
  --navy: #0B286C;
  --navy-deep: #061A4A;
  --orange: #FF9201;
  --orange-ink: #C26A00;
  --orange-soft: #FFF1DC;
  --orange-wash: #FFF7EA;
  --gold-text: #FFB547;
  --blue-soft: #E8EEFB;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #475569;
  --muted: #64748B;
  --line: #E2E8F0;
  --track: #E6EBF5;
  --bg: #F4F6FA;
  --paper: #FFFFFF;
  --pass: #15803D;
  --pass-bg: #E7F4EA;
  --fail: #B42318;
  --fail-bg: #FDECEA;
  --on-navy: #C9D4EE;
  --r: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --display: "Archivo", "Inter", system-ui, sans-serif;
  /* Extra bottom space reserved for a floating host badge. 0 on Cloudflare. */
  --badge: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); }

.boot { min-height: 100vh; display: grid; place-items: center; background: var(--navy-deep); }
.boot img { width: 170px; }

.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.shell.tabs { padding-bottom: calc(86px + var(--badge) + var(--safe-bot)); }
.pad { padding: 0 16px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 16px 10px; }
.sec-h h2 { margin: 0; font-weight: 800; font-size: 17px; color: var(--navy); }
.sec-h a:not(.btn), .sec-h button:not(.btn) { font-size: 13px; font-weight: 600; text-decoration: none; background: none; border: 0; color: var(--navy); cursor: pointer; padding: 0; }
.kick { font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--gold-text); }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- Buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--orange); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--paper); color: var(--navy); border: 1.5px solid #D5DDEC; font-family: inherit; font-weight: 700; font-size: 16px; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.danger { background: var(--paper); color: var(--fail); border: 1.5px solid #F3C3BE; font-family: inherit; font-weight: 700; font-size: 15px; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.28); font-family: inherit; font-weight: 700; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { flex: 0 0 auto; }
.row { display: flex; gap: 10px; }
.row > .btn { flex: 1; }
label.f { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; color: var(--ink-2); }
.in { width: 100%; height: 52px; border: 1.5px solid #CBD5E1; border-radius: 12px; padding: 0 14px; font-size: 16px; background: #fff; }
textarea.in { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; }
.in:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,146,1,.22); }
.err { color: var(--fail); font-size: 14px; margin-top: 10px; min-height: 1.2em; }
.card { background: var(--paper); border-radius: var(--r); border: 1px solid var(--line); padding: 16px; }
.lift { box-shadow: 0 10px 30px rgba(11,40,108,.12); border: 0; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 20px; white-space: nowrap; background: var(--blue-soft); color: var(--navy); }
.pill.orange { background: var(--orange-soft); color: #8A4B00; }
.pill.pass { background: var(--pass-bg); color: var(--pass); }
.pill.fail { background: var(--fail-bg); color: var(--fail); }
.pill.dark { background: var(--navy); color: #fff; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; padding: 0 28px calc(30px + var(--badge) + var(--safe-bot)); color: #fff; background-color: var(--navy-deep);
  background-image: linear-gradient(180deg, rgba(6,26,74,.55) 0%, rgba(6,26,74,.88) 38%, #061A4A 62%), url(/img/roof.jpg);
  background-size: 100% 100%, auto 540px; background-repeat: no-repeat; background-position: center top; }
.login .brand { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: calc(40px + var(--safe-top)); min-height: 300px; }
.login .brand img { width: 230px; }
.login .tag { margin-top: 18px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.login .tag i { width: 26px; height: 2px; background: var(--orange); }
.login form { width: 100%; max-width: 420px; margin: 0 auto; }
.login label.f { color: var(--on-navy); font-weight: 600; }
.login .in { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; height: 54px; font-size: 17px; }
.login .in:focus { border-color: var(--orange); }
.login .err { color: #FFB4A8; }
.login .foot { margin-top: 26px; text-align: center; font-size: 12px; line-height: 1.6; color: #A9B8DD; }
.login .badge { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,.18); color: #fff; font-weight: 600; }

/* ---------- Home ---------- */
.hero { min-height: 250px; padding: calc(18px + var(--safe-top)) 20px 0; display: flex; flex-direction: column; color: #fff;
  background-image: linear-gradient(180deg, rgba(6,26,74,.35) 0%, rgba(6,26,74,.92) 100%), url(/img/roof.jpg); background-size: cover; background-position: center 30%; }
.hero .bar { display: flex; align-items: center; justify-content: space-between; }
.hero .bar img { height: 40px; width: auto; }
.avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--orange); color: var(--navy); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 15px; border: 0; cursor: pointer; }
.hero .hi { margin-top: auto; padding-bottom: 58px; }
.hero h1 { margin: 4px 0 0; font-weight: 800; font-size: 34px; line-height: 1.05; }
.hero .kick { color: #FFC266; }
.statcard { margin: -44px 16px 0; background: var(--paper); border-radius: 18px; box-shadow: 0 10px 30px rgba(11,40,108,.14); padding: 16px; display: flex; align-items: center; gap: 16px; position: relative; }
.statcard .t1 { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--navy); }
.statcard .t2 { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.statcard .pills { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.today { margin: 16px 16px 0; background: var(--navy); border-radius: 18px; padding: 18px; color: #fff; position: relative; overflow: hidden; }
.today .deco { position: absolute; right: -14px; top: -6px; opacity: .14; }
.today h3 { font-weight: 800; font-size: 22px; line-height: 1.15; margin: 6px 0 0; }
.today .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--on-navy); }
.today .meta span { display: inline-flex; align-items: center; gap: 5px; }
.today .btn { margin-top: 16px; }
.path { margin: 0 16px; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.path a { aspect-ratio: 1; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; text-decoration: none; background: var(--track); color: var(--muted); }
.path a.done { background: var(--orange); }
.path a.cur { background: #fff; border: 2.5px solid var(--navy); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: 13px; }
.tools { margin: 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.2; min-height: 62px; }
.tool .ic { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; }
.tool .ic.o { background: var(--orange-soft); }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding-bottom: calc(var(--badge) + var(--safe-bot)); }
.tabbar .in2 { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); height: 64px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a.on { color: var(--navy); font-weight: 700; }

/* ---------- Page header (navy) ---------- */
.phead { background: var(--navy); color: #fff; padding: calc(16px + var(--safe-top)) 20px 22px; position: relative; overflow: hidden; }
.phead .deco { position: absolute; right: -40px; bottom: -30px; opacity: .1; }
.phead h1 { margin: 6px 0 0; font-weight: 800; font-size: 28px; line-height: 1.1; position: relative; }
.phead .sub { color: var(--on-navy); font-size: 14px; margin-top: 6px; position: relative; }
.phead .top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; text-decoration: none; }
.iconbtn.light { background: #F1F4F9; }
.phead .kick { margin-top: 16px; position: relative; }
.bar8 { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.bar8 > i { display: block; height: 100%; background: var(--orange); border-radius: 4px; }

/* ---------- Day ---------- */
.seg { margin: 14px 16px 0; background: var(--track); border-radius: 12px; padding: 4px; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 4px; }
.seg button { height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(11,40,108,.15); font-weight: 700; color: var(--navy); }
.tl { margin: 16px 16px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 12px; bottom: 12px; width: 2px; background: #D5DDEC; }
.tli { display: flex; gap: 14px; position: relative; }
.tli .dot { flex: 0 0 32px; height: 32px; border-radius: 16px; background: #fff; border: 2px solid #C5D0E6; display: flex; align-items: center; justify-content: center; }
.tli .dot.done { background: var(--orange); border-color: var(--orange); }
.tli .body { flex: 1; min-width: 0; background: var(--paper); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(11,40,108,.06); }
.tli .time { font-size: 12px; font-weight: 700; color: var(--orange-ink); }
.tli .ttl { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--navy); margin-top: 1px; }
.tli ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tli li + li { margin-top: 2px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.checks li:first-child { border-top: 0; padding-top: 2px; }
.checks .bx { flex: 0 0 24px; height: 24px; border-radius: 7px; border: 2px solid #C5D0E6; display: flex; align-items: center; justify-content: center; }
.checks .bx.on { background: var(--orange); border-color: var(--orange); }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(14px + var(--badge) + var(--safe-bot)); }
.dock .in2 { max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.dock .t1 { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--navy); }
.shell.docked { padding-bottom: calc(96px + var(--badge) + var(--safe-bot)); }

/* ---------- Quiz ---------- */
.qtop { padding: calc(16px + var(--safe-top)) 16px 0; display: flex; align-items: center; gap: 12px; }
.qsegs { flex: 1; display: grid; gap: 3px; }
.qsegs span { height: 6px; border-radius: 3px; background: var(--track); }
.qsegs span.done { background: var(--orange); }
.qsegs span.cur { background: var(--navy); }
.qcount { font-weight: 700; font-size: 13px; color: var(--ink-3); }
.qbody { padding: 18px 16px 0; }
.qimg { margin-top: 12px; border-radius: 18px; overflow: hidden; background: var(--track); }
.qimg img { width: 100%; max-height: 42vh; object-fit: cover; }
.qtext { margin: 16px 0 0; font-weight: 800; font-size: 23px; line-height: 1.22; color: var(--navy); }
.choices { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 9px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid #D5DDEC; background: #fff; text-align: left; font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; width: 100%; }
.choice .L { flex: 0 0 30px; height: 30px; border-radius: 9px; background: #F1F4F9; color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.choice.sel { border: 2.5px solid var(--orange); background: var(--orange-wash); color: var(--navy); font-weight: 700; padding: 9px 13px; }
.choice.sel .L { background: var(--navy); color: #fff; }
.qnav { padding: 18px 16px calc(28px + var(--badge) + var(--safe-bot)); display: flex; gap: 10px; }
.qnav .ghost { flex: 0 0 auto; }
.qnav .grow { flex: 1; }

/* ---------- Result ---------- */
.result { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.result.pass { background: var(--navy-deep); color: #fff; }
.result.fail { background: var(--bg); }
.result .confetti { position: absolute; left: 50%; top: 0; transform: translateX(-50%); pointer-events: none; }
.result .top { padding: calc(50px + var(--safe-top)) 24px 0; text-align: center; position: relative; }
.result h1 { margin: 6px 0 0; font-weight: 900; font-size: 34px; line-height: 1.05; }
.result .big { margin-top: 8px; font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1; }
.result .big small { font-size: 30px; color: #8FA3D1; }
.result.fail .big { color: var(--navy); }
.result.fail .big small { color: var(--muted); }
.stats3 { margin: 22px 16px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats3 > div { background: rgba(255,255,255,.08); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stats3 b { display: block; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--orange); }
.stats3 span { font-size: 12px; color: var(--on-navy); }
.result.fail .stats3 > div { background: #fff; border: 1px solid var(--line); }
.result.fail .stats3 b { color: var(--navy); }
.result.fail .stats3 span { color: var(--muted); }
.miss { background: #fff; color: var(--ink); border-radius: 16px; padding: 14px; }
.miss + .miss { margin-top: 10px; }
.miss .mq { font-weight: 700; font-size: 15px; color: var(--navy); }
.miss img { border-radius: 10px; margin-top: 8px; max-height: 150px; width: 100%; object-fit: cover; }
.miss .no, .miss .yes { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; margin-top: 6px; }
.miss .no { color: var(--fail); }
.miss .yes { color: var(--pass); font-weight: 700; margin-top: 2px; }
.miss .why { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.result.fail .miss { border: 1px solid var(--line); }
.note-line { margin: 14px 16px 0; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--on-navy); }
.result.fail .note-line { color: var(--ink-3); }
.result .actions { margin-top: auto; padding: 22px 16px calc(28px + var(--badge) + var(--safe-bot)); display: flex; flex-direction: column; gap: 10px; }

/* ---------- Flashcards ---------- */
.fgrid { margin: 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fc { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; }
.fc img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--track); }
.fc .cap { padding: 9px 10px; font-size: 14px; font-weight: 700; min-height: 46px; display: flex; align-items: center; color: var(--navy); }
.fc .cap.hide { color: var(--muted); font-weight: 500; }
.fc.on { border: 2px solid var(--orange); }

/* ---------- Reference / tables ---------- */
.reflist { margin: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.refitem { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; color: var(--ink); }
.refitem .ic { flex: 0 0 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; }
.refitem .ic.o { background: var(--orange-soft); }
.refitem b { display: block; font-size: 16px; color: var(--navy); }
.refitem span { font-size: 13px; color: var(--muted); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th, table.t td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.t td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); }
.calcout { background: var(--navy); color: #fff; border-radius: 18px; padding: 18px; }
.calcout .big { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--orange); margin-top: 4px; }
.calcout .rows { margin-top: 14px; display: grid; gap: 8px; }
.calcout .rows div { display: flex; justify-content: space-between; font-size: 14px; color: var(--on-navy); border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.calcout .rows b { color: #fff; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { flex: 0 0 52px; height: 52px; border-radius: 12px; border: 1.5px solid #D5DDEC; background: #fff; font-size: 24px; font-weight: 700; color: var(--navy); cursor: pointer; }
.stepper .in { text-align: center; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--navy); }
.pitch .beat { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.pitch .beat:first-child { border-top: 0; padding-top: 0; }
.pitch .beat b { background: var(--navy); color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 4px; border-radius: 6px; height: fit-content; }
.pitch u { text-decoration-color: var(--orange); text-decoration-thickness: 2px; font-weight: 700; }
.resp { border-radius: 16px; padding: 14px; background: var(--paper); border: 1px solid var(--line); font-size: 15px; }
.resp + .resp { margin-top: 10px; }
.resp h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--pass); }
.resp.no h3 { color: var(--orange-ink); }
.warnbox { margin-top: 14px; background: var(--orange-soft); color: #6B3B00; border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.formlist a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--navy); }
.formlist a:first-child { border-top: 0; padding-top: 2px; }
.formlist a span { font-size: 13px; color: var(--orange-ink); }

/* ---------- Training list ---------- */
.daylist { margin: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.dayrow { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; color: var(--ink); }
.dayrow .num { flex: 0 0 42px; height: 42px; border-radius: 12px; background: var(--track); color: var(--muted); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 16px; }
.dayrow.done .num { background: var(--orange); }
.dayrow.cur { border: 2px solid var(--navy); padding: 13px; }
.dayrow.cur .num { background: var(--navy); color: #fff; }
.dayrow.locked { opacity: .55; }
.dayrow .t { flex: 1; min-width: 0; }
.dayrow .t b { display: block; font-size: 15px; line-height: 1.25; color: var(--navy); }
.dayrow .t span { font-size: 13px; color: var(--muted); }

/* ---------- Admin ---------- */
.ahead { background: var(--navy); color: #fff; padding: calc(16px + var(--safe-top)) 20px 64px; }
.ahead .top { display: flex; align-items: center; justify-content: space-between; }
.ahead .top img { height: 36px; width: auto; }
.ahead h1 { margin: 18px 0 0; font-weight: 800; font-size: 28px; line-height: 1.1; }
.ahead .sub { font-size: 14px; color: var(--on-navy); margin-top: 4px; }
.kpis { margin: -46px 16px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; position: relative; }
.kpi { background: var(--paper); border-radius: 16px; padding: 14px; box-shadow: 0 8px 22px rgba(11,40,108,.10); }
.kpi b { display: block; font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--navy); line-height: 1; }
.kpi span { font-size: 13px; color: var(--ink-3); }
.alert { margin: 14px 16px 0; background: var(--fail-bg); border: 1px solid #F3C3BE; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; color: #7A1A12; font-size: 14px; text-decoration: none; }
.alert .ic { flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--fail); display: flex; align-items: center; justify-content: center; }
.replist { margin: 0 16px; background: var(--paper); border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.repr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); border-top: 1px solid #EEF2F7; }
.repr:first-child { border-top: 0; }
.repr .t { flex: 1; min-width: 0; }
.repr .t b { display: block; font-size: 15px; }
.repr .t span { font-size: 12px; color: var(--muted); }
.signrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.signrow:first-child { border-top: 0; padding-top: 2px; }
.signrow .dl { font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.signrow .dl small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
details.att { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
details.att + details.att { margin-top: 8px; }
details.att summary { padding: 12px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; list-style: none; }
details.att summary::-webkit-details-marker { display: none; }
details.att .in3 { padding: 0 14px 14px; font-size: 14px; }
details.att .mq { margin-top: 10px; }
.openans { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 10px; white-space: pre-wrap; }
.created { background: var(--ink); color: #fff; border-radius: 16px; padding: 14px; }
.created .msg { margin-top: 10px; background: rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; color: #E2E8F0; }

#toast { position: fixed; left: 50%; bottom: calc(96px + var(--badge) + var(--safe-bot)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; max-width: calc(100% - 32px); z-index: 50; box-shadow: 0 12px 30px rgba(15,23,42,.3); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.spacer { height: 24px; }

@media (min-width: 560px) {
  .fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
