/* ============================================================
   牛马账本 · 视觉系统
   牛马黄 + 沥青黑 + 奶油纸感；大圆角、细描边、轻微手账贴纸感
   ============================================================ */

:root {
  --ink: #211a12;
  --ink-2: #4e4536;
  --muted: #8b7f6b;
  --muted-2: #a99a80;
  --paper: #fff8e7;
  --paper-2: #fff2cf;
  --paper-3: #f6ecd5;
  --white: #fffdf7;
  --yellow: #ffc53d;
  --yellow-2: #ffd666;
  --yellow-3: #ffe9a8;
  --yellow-4: #fff4d0;
  --amber: #f5a623;
  --amber-deep: #b7791f;
  --orange: #ff7a45;
  --red: #ff4d4f;
  --green: #40c057;
  --green-deep: #2f9e44;
  --blue: #3e7bfa;
  --line: rgba(52, 40, 20, .12);
  --line-strong: rgba(52, 40, 20, .2);
  --shadow-sm: 0 4px 14px rgba(120, 92, 28, .08);
  --shadow: 0 18px 44px rgba(120, 92, 28, .13);
  --shadow-lg: 0 34px 90px rgba(60, 42, 10, .22);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
  --header-h: 66px;
  --max: 1220px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(255, 213, 102, .42), transparent 62%),
    radial-gradient(900px 500px at 92% 8%, rgba(255, 232, 166, .38), transparent 60%),
    linear-gradient(180deg, #fdf3d9 0%, #fbf0d4 48%, #fdf6e4 100%);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(130, 98, 32, .13) 1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: .22;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

[hidden] { display: none !important; }

::selection { background: var(--yellow-2); color: var(--ink); }

:where(button, a, input, summary, select):focus-visible {
  outline: 3px solid rgba(255, 197, 61, .68);
  outline-offset: 2px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
input { font-family: inherit; color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

.ico { display: inline-block; flex: none; vertical-align: middle; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 999;
  background: var(--ink); color: var(--yellow);
  padding: 10px 14px; border-radius: 10px; font-weight: 800;
}
.skip-link:focus { top: 12px; }

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background:
    radial-gradient(560px 120px at 18% 0%, rgba(255, 197, 61, .13), transparent 70%),
    #17130f;
  border-bottom: 1px solid rgba(255, 197, 61, .16);
  box-shadow: 0 8px 30px rgba(28, 20, 8, .2);
}
.topbar-inner {
  width: 100%;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
}
.brand-mark {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #ffd666, #ffc53d);
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .55);
  transform: rotate(-3deg);
}
.brand-mark svg { width: 31px; height: 31px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  color: #fff9e8;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1.1;
}
.brand-slogan {
  display: flex; align-items: center; gap: 5px;
  margin-top: 3px;
  color: #b8a884;
  font-size: 10px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-slogan i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 197, 61, .9);
}
.topnav { display: flex; align-items: stretch; height: 100%; }
.topnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  color: #c9bda4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: color .2s;
}
.topnav-link .nav-ico { color: #8f826b; transition: color .2s; }
.topnav-link:hover { color: #fff8e3; }
.topnav-link:hover .nav-ico { color: var(--yellow-2); }
.topnav-link.is-active { color: var(--yellow); }
.topnav-link.is-active .nav-ico { color: var(--yellow); }
.topnav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 12px;
  width: 18px; height: 3px;
  border-radius: 99px;
  background: var(--yellow);
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255, 197, 61, .55);
}
.icon-btn.menu-btn { display: none; }
.mobile-menu {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 12px;
  width: 180px;
  padding: 8px;
  background: #201a12;
  border: 1px solid rgba(255, 197, 61, .22);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  z-index: 120;
  animation: popIn .18s ease-out;
}
.mobile-menu a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 11px;
  border-radius: 9px;
  color: #e7dcc4;
  font-size: 12.5px;
  font-weight: 700;
}
.mobile-menu a:hover, .mobile-menu a.is-active { background: rgba(255, 197, 61, .14); color: var(--yellow); }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: rgba(52, 40, 20, .06); }
.menu-btn { color: #e7dcc4; }
.menu-btn:hover { background: rgba(255, 255, 255, .08); }

/* ---------------- Layout ---------------- */
.app-shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.main {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 24px 40px;
  flex: 1;
}
.page { animation: pageIn .32s ease; }
.calc-layout {
  display: grid;
  grid-template-columns: minmax(350px, .82fr) minmax(0, 1.36fr);
  gap: 24px;
  align-items: start;
}

/* ---------------- Form panel ---------------- */
.form-panel {
  position: relative;
  background: linear-gradient(180deg, #fffdf6 0%, #fff9ea 68%, #fff4d8 100%);
  border: 1px solid rgba(200, 160, 60, .32);
  border-radius: var(--radius-xl);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.form-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(200, 160, 60, .17);
  border-radius: 22px;
  pointer-events: none;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 18px;
}
.mode-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  text-align: left;
  background: rgba(255, 255, 255, .82);
  border: 1.5px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  transition: transform .18s, box-shadow .2s, border-color .2s, background .2s;
}
.mode-card:hover { border-color: rgba(200, 150, 40, .42); transform: translateY(-1px); }
.mode-card.is-active {
  background: linear-gradient(135deg, #ffd666, #ffc53d);
  border-color: #f0b429;
  box-shadow: 0 8px 18px rgba(225, 160, 25, .25), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.mode-emoji {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(120, 90, 20, .06);
}
.mode-card.is-active .mode-emoji { background: rgba(255, 255, 255, .55); }
.mode-copy { display: flex; flex-direction: column; min-width: 0; }
.mode-copy strong { font-size: 13px; font-weight: 900; letter-spacing: .01em; }
.mode-copy small {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-card.is-active .mode-copy small { color: #6b4a00; }
.mode-dot {
  position: absolute;
  top: 9px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(52, 40, 20, .14);
}
.mode-card.is-active .mode-dot {
  background: #2b1e0c;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .32);
}

.form-body { position: relative; z-index: 1; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(52, 40, 20, .1);
}
.panel-title {
  position: relative;
  padding-left: 11px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}
.panel-title::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 4px; height: 13px;
  border-radius: 3px;
  background: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 197, 61, .16);
}
.panel-note { color: var(--muted); font-size: 9.5px; }

.field { margin-bottom: 14px; }
.field-label, .field-label-row .field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.field-label-row .field-label { margin-bottom: 0; }
.field-aside { color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-error {
  display: none;
  margin: 5px 0 0;
  color: #d43c3c;
  font-size: 10px;
  font-weight: 700;
}
.field-error:not(:empty) { display: block; }
.field.has-error .input-shell { border-color: #e25555; box-shadow: 0 0 0 3px rgba(226, 85, 85, .12); }

.input-shell {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-shell:hover { border-color: rgba(200, 150, 40, .38); }
.input-shell:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 197, 61, .2);
  background: #fffefa;
}
.input-shell input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.input-shell input::placeholder { color: #c2b59c; font-weight: 500; }
.input-shell input[type="number"] { font-family: var(--font-num); -moz-appearance: textfield; }
.input-shell input[type="number"]::-webkit-outer-spin-button,
.input-shell input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-prefix { color: var(--muted); font-size: 13px; font-weight: 700; flex: none; }
.suffix { color: var(--muted); font-size: 11px; font-weight: 700; flex: none; }
.amount-input { height: 54px; padding: 0 14px; background: #fffefb; }
.amount-input .input-prefix { font-size: 18px; color: var(--muted-2); }
.amount-input input { font-size: 27px; font-weight: 900; letter-spacing: .005em; }
.amount-row { display: flex; gap: 8px; align-items: stretch; }
.amount-row .amount-input { flex: 1; }
.quick-chips { display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.quick-chips .chip { height: 24px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 9px;
  border: 1px solid rgba(200, 150, 40, .26);
  border-radius: 8px;
  background: #fff4d6;
  color: #8a6410;
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
}
.chip:hover { background: var(--yellow-2); border-color: var(--amber); }
.chip:active { transform: scale(.96); }

.date-shell { position: relative; padding-right: 8px; }
.date-shell input[type="date"] { font-family: var(--font-num); font-size: 12.5px; letter-spacing: .01em; }
.date-shell input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0; top: 0;
  width: 44px; height: 100%;
  opacity: 0;
  cursor: pointer;
}
.date-ico {
  color: var(--muted-2);
  display: inline-flex;
  flex: none;
  pointer-events: none;
}
.date-ico .ico { width: 16px; height: 16px; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: #f4e9cf;
  border-radius: 12px;
  border: 1px solid rgba(200, 160, 60, .14);
}
.seg {
  height: 37px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s, box-shadow .18s, color .18s, transform .12s;
}
.seg:hover { background: rgba(255, 255, 255, .66); }
.seg.is-active {
  background: linear-gradient(180deg, #ffd666, #ffc53d);
  color: #2b1e0c;
  box-shadow: 0 3px 9px rgba(200, 140, 20, .22), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.seg:active { transform: scale(.985); }

.alt-week {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: -2px 0 14px;
  padding: 8px 11px;
  background: #fff6dd;
  border: 1px dashed rgba(200, 160, 60, .42);
  border-radius: 11px;
}
.alt-week.is-hidden { display: none; }
.alt-week-label { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
}
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot {
  width: 15px; height: 15px;
  border: 2px solid #cdbb95;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fff;
  transition: border-color .15s;
}
.radio-dot::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  transform: scale(0);
  transition: transform .15s;
}
.radio-pill:has(input:checked) .radio-dot { border-color: var(--amber); }
.radio-pill:has(input:checked) .radio-dot::after { transform: scale(1); }
.alt-week-note { margin-left: auto; color: var(--muted); font-size: 9px; }

.advanced {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed rgba(52, 40, 20, .11);
}
.advanced-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}
.advanced-icon { display: inline-flex; color: var(--amber-deep); }
.advanced-title { font-size: 12px; font-weight: 900; }
.advanced-hint { font-size: 9.5px; color: var(--muted); }
.advanced-chev { margin-left: auto; display: inline-flex; color: var(--muted); transition: transform .25s; }
.advanced.is-collapsed .advanced-chev { transform: rotate(-90deg); }
.advanced-body {
  overflow: hidden;
  max-height: 520px;
  opacity: 1;
  transition: max-height .34s cubic-bezier(.2, .8, .3, 1), opacity .25s;
}
.advanced.is-collapsed .advanced-body { max-height: 0; opacity: 0; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.switch-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.switch-ico {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #fff1c8;
  color: #b7791f;
}
.switch-ico .ico { width: 16px; height: 16px; }
.switch-copy { display: flex; flex-direction: column; min-width: 0; }
.switch-copy strong { font-size: 11.5px; font-weight: 800; }
.switch-copy small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.switch { position: relative; flex: none; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track {
  width: 42px; height: 25px;
  display: block;
  padding: 3px;
  border-radius: 999px;
  background: #e6dbc2;
  transition: background .2s;
}
.switch-thumb {
  display: block;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(52, 40, 20, .22);
  transition: transform .2s;
}
.switch input:checked + .switch-track { background: linear-gradient(180deg, #ffd666, #ffc53d); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(17px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(255, 197, 61, .58); outline-offset: 2px; }

.conditional {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  max-height: 0;
  padding: 0 0 0 39px;
  opacity: 0;
  overflow: hidden;
  transition: max-height .28s ease, opacity .2s, padding .28s;
}
.conditional.is-open { max-height: 120px; opacity: 1; padding: 2px 0 10px 39px; }
.inline-field { display: flex; align-items: center; gap: 7px; }
.inline-field > label { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.input-shell.small { height: 34px; padding: 0 9px; border-radius: 9px; }
.input-shell.small input { font-size: 12px; }
.input-shell.small .input-prefix { font-size: 11px; }
.input-shell.small .suffix { font-size: 9.5px; }
.inline-field .input-shell { width: 92px; }
.inline-hint { color: var(--muted); font-size: 9px; }
.conditional .field-error { flex-basis: 100%; margin: 0; }
.conditional.has-error .input-shell { border-color: #e25555; box-shadow: 0 0 0 3px rgba(226, 85, 85, .12); }
.conditional#socialFields.is-open { max-height: 280px; }

.range-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 12px;
  padding: 9px 11px;
  background: #fff6dd;
  border: 1px solid rgba(200, 160, 60, .18);
  border-radius: 11px;
  color: #806a42;
  font-size: 10.5px;
  line-height: 1.5;
}
.range-summary.is-error { background: #fff1f0; border-color: #ffc9c7; color: #b53b3a; }
.range-dot {
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 197, 61, .2);
  animation: softPulse 2s ease-in-out infinite;
}
.range-summary.is-error .range-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 77, 79, .14); animation: none; }

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0 0 12px;
  padding: 9px 11px;
  background: #fff1f0;
  border: 1px solid #ffc9c7;
  border-radius: 10px;
  color: #b53b3a;
  font-size: 10px;
  line-height: 1.5;
}
.form-alert .ico { width: 14px; height: 14px; margin-top: 1px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 45px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .14s, box-shadow .2s, filter .2s, background .2s;
}
.btn .ico { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(180deg, #ffd666 0%, #ffc53d 100%);
  border-color: #f0b429;
  color: #241a0b;
  box-shadow: 0 8px 18px rgba(205, 145, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .62);
}
.btn-primary:hover { filter: brightness(1.03); box-shadow: 0 11px 24px rgba(205, 145, 20, .36), inset 0 1px 0 rgba(255, 255, 255, .62); }
.btn-ghost {
  background: rgba(255, 255, 255, .86);
  border-color: rgba(52, 40, 20, .18);
  color: #3b2c16;
}
.btn-ghost:hover { background: #fff; border-color: rgba(52, 40, 20, .28); }
.btn-dark { background: #1f1a0f; color: var(--yellow-2); }
.btn-calc {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  font-size: 15.5px;
  border-radius: 14px;
  letter-spacing: .04em;
}
.btn-calc .ico { width: 19px; height: 19px; }
.btn-calc::after {
  content: "→";
  font-family: var(--font-num);
  font-size: 16px;
  margin-left: 3px;
  opacity: .65;
  transition: transform .2s;
}
.btn-calc:hover::after { transform: translateX(3px); }

.form-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
}
.form-footnote > span { display: inline-flex; align-items: center; gap: 4px; }
.form-footnote .ico { width: 11px; height: 11px; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--amber-deep);
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn.danger { color: #c4554d; }
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--yellow-3);
  color: #8a6410;
  font-family: var(--font-num);
  font-size: 8.5px;
  text-decoration: none;
}
.history-panel {
  margin-top: 10px;
  padding: 11px;
  background: #fff9e9;
  border: 1px dashed rgba(200, 160, 60, .3);
  border-radius: 12px;
  animation: fadeIn .22s ease;
}
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.history-head strong { font-size: 10px; font-weight: 900; }
.history-list { display: flex; flex-direction: column; gap: 5px; max-height: 230px; overflow-y: auto; }
.history-empty { padding: 6px 2px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid rgba(200, 160, 60, .16);
  border-radius: 8px;
  background: #fffdf7;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.history-item:hover { border-color: var(--yellow); background: #fff8e2; }
.history-item-main { display: flex; flex-direction: column; min-width: 0; }
.history-item-main strong { font-family: var(--font-num); font-size: 12px; font-weight: 900; }
.history-item-main small { color: var(--muted); font-size: 8px; }
.history-item-side { color: var(--muted); font-size: 8px; text-align: right; white-space: nowrap; }
.history-item-side b { display: block; color: var(--amber-deep); font-size: 9.5px; }

/* Range slider */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: 7px 0 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow) 0 var(--fill, 30%), #efe3c7 var(--fill, 30%) 100%);
  outline: none;
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--yellow);
  box-shadow: 0 3px 8px rgba(180, 120, 10, .25);
  cursor: grab;
}
.range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--yellow);
  box-shadow: 0 3px 8px rgba(180, 120, 10, .25);
}
.range-value {
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 900;
  color: var(--amber-deep);
  background: #fff3d2;
  padding: 1px 8px;
  border-radius: 7px;
}
.range-scale { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 8.5px; }

.grade-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grade-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s;
}
.grade-chip b { font-family: var(--font-num); font-size: 16px; font-weight: 900; line-height: 1.1; }
.grade-chip span { color: var(--muted); font-family: var(--font-num); font-size: 9px; font-weight: 700; }
.grade-chip:hover { border-color: rgba(200, 150, 40, .45); }
.grade-chip.is-active {
  background: linear-gradient(180deg, #fff4cf, #ffe9a8);
  border-color: #f0b429;
  box-shadow: 0 4px 10px rgba(200, 140, 20, .14);
}
.grade-chip.is-active b { color: #8a5a00; }
.grade-chip.is-active span { color: #a67c1a; }
.custom-coef { display: flex; align-items: center; gap: 9px; margin-top: 8px; animation: fadeIn .2s; }
.custom-coef label { font-size: 10px; color: var(--muted); font-weight: 700; }
.custom-coef .input-shell { width: 100px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; width: 100%; }
.mini-grid .inline-field { flex-direction: column; align-items: stretch; gap: 3px; }
.mini-grid .inline-field .input-shell { width: 100%; }
.tax-disclaimer { margin-top: 9px; color: var(--muted); font-size: 8.5px; line-height: 1.55; text-align: center; }

/* ---------------- Result panel ---------------- */
.result-panel {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  overflow: hidden;
  padding: 15px 15px 13px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(560px 260px at 8% -10%, rgba(255, 255, 255, .55), transparent 62%),
    linear-gradient(158deg, #ffdc67 0%, #ffc53d 52%, #ffbd26 100%);
  box-shadow: 0 26px 64px rgba(200, 140, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .55);
  isolation: isolate;
}
.result-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(120, 76, 0, .14) 1px, transparent 1.4px);
  background-size: 22px 22px;
  opacity: .3;
  mask-image: linear-gradient(180deg, #000, transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%);
  pointer-events: none;
}
.result-panel::after {
  content: "";
  position: absolute;
  top: -140px; right: -100px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .42) 0%, transparent 66%);
  pointer-events: none;
  z-index: -1;
}
.result-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(31, 26, 15, .8);
  color: #ffe9a8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}
.live-pill i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #7ee787;
  box-shadow: 0 0 6px rgba(126, 231, 135, .8);
  animation: softPulse 1.8s ease-in-out infinite;
}
.result-close { display: none; color: #2b1e0c; }

.score-hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .86fr);
  min-height: 208px;
  padding: 4px 4px 0 8px;
}
.score-left { position: relative; z-index: 3; min-width: 0; }
.score-eyebrow {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5d4517;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.score-eyebrow .ico { width: 13px; height: 13px; }
.gauge-wrap { position: relative; width: 100%; max-width: 226px; height: 110px; margin-top: 3px; }
.gauge { width: 100%; height: 100%; overflow: visible; }
.gauge-track { fill: none; stroke: rgba(52, 40, 20, .15); stroke-width: 13; stroke-linecap: round; }
.gauge-inner { fill: none; stroke: rgba(255, 255, 255, .24); stroke-width: 4; stroke-linecap: round; }
.gauge-progress {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 13;
  stroke-linecap: round;
  filter: drop-shadow(0 3px 3px rgba(120, 60, 0, .18));
  transition: stroke-dasharray .9s cubic-bezier(.2, .8, .25, 1);
}
.gauge-tick { stroke: rgba(52, 40, 20, .34); stroke-width: 2.5; stroke-linecap: round; }
.gauge-readout {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.gauge-readout strong {
  font-family: var(--font-num);
  font-size: 45px;
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.045em;
  color: #231a0c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}
.gauge-readout span { color: #6b5428; font-family: var(--font-num); font-size: 10px; font-weight: 700; }
.band-line { display: flex; align-items: center; gap: 7px; margin-top: -1px; }
.band-name { font-size: 19px; font-weight: 900; letter-spacing: -.02em; color: #2a1e0d; }
.band-emoji { font-size: 13px; letter-spacing: -2px; opacity: .9; }
.band-desc { margin-top: 1px; color: #6b5428; font-size: 9.5px; }

.mascot-stage { position: relative; min-height: 208px; }
.sunburst {
  position: absolute;
  top: -42px; right: -56px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .4) 0deg 7deg, transparent 7deg 17deg);
  mask-image: radial-gradient(circle, #000 0 36%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 0 36%, transparent 70%);
  opacity: .55;
  animation: slowSpin 46s linear infinite;
  pointer-events: none;
}
.speech-bubble {
  position: absolute;
  top: 2px; right: 28px;
  z-index: 5;
  padding: 6px 10px;
  background: #fffdf3;
  border: 2px solid rgba(52, 40, 20, .2);
  border-radius: 13px 13px 13px 3px;
  color: #3b2c16;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  transform: rotate(-5deg);
  box-shadow: 0 5px 0 rgba(160, 105, 10, .12);
  white-space: nowrap;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  left: 10px; bottom: -8px;
  width: 12px; height: 12px;
  background: #fffdf3;
  border-left: 2px solid rgba(52, 40, 20, .2);
  border-bottom: 2px solid rgba(52, 40, 20, .2);
  transform: skewY(-30deg) rotate(-8deg);
  border-radius: 0 0 0 4px;
}
.mascot {
  position: absolute;
  right: 2px;
  bottom: -25px;
  width: 228px;
  max-width: 118%;
  z-index: 4;
  filter: drop-shadow(0 16px 20px rgba(120, 70, 0, .2));
  animation: horseBob 4.6s ease-in-out infinite;
}
.horse-svg { width: 100%; height: auto; display: block; }
.doodle {
  position: absolute;
  z-index: 3;
  color: #fff6cf;
  font-family: var(--font-num);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(150, 100, 10, .15);
  animation: twinkle 3.2s ease-in-out infinite;
}
.doodle-a { top: 28px; right: 8px; font-size: 18px; }
.doodle-b {
  top: 92px; right: 4px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  color: #b7791f;
  font-size: 12px;
  animation-delay: .8s;
}
.doodle-c { top: 78px; left: 46%; font-size: 11px; animation-delay: 1.5s; }

.title-banner {
  position: relative;
  z-index: 6;
  width: calc(100% - 6px);
  margin: -17px auto 9px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  border: 2px solid #eab02a;
  border-radius: 15px;
  background: linear-gradient(180deg, #fffdf6 0%, #fff3d2 100%);
  box-shadow: 0 10px 20px rgba(150, 100, 10, .16), inset 0 0 0 3px rgba(255, 255, 255, .62);
  cursor: pointer;
  text-align: left;
  transition: transform .2s, box-shadow .2s;
}
.title-banner:hover { transform: translateY(-2px); box-shadow: 0 15px 26px rgba(150, 100, 10, .22), inset 0 0 0 3px rgba(255, 255, 255, .62); }
.title-banner:active { transform: translateY(0); }
.title-medal {
  width: 38px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, #ffe28a, #f5a623);
  border: 2px solid #fffdf6;
  color: #7a4d00;
  box-shadow: 0 4px 9px rgba(160, 100, 10, .24);
}
.title-medal .ico { width: 21px; height: 21px; }
.title-copy { display: flex; flex-direction: column; min-width: 0; }
.title-kicker { color: #a67c1a; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.title-name {
  color: #2b1e0c;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.18;
}
.title-line {
  color: #806a42;
  font-size: 9.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-spark {
  position: absolute;
  top: 7px; right: 10px;
  color: #eab02a;
  font-size: 11px;
  animation: twinkle 2.6s ease-in-out infinite;
}
.ribbon {
  position: absolute;
  top: 50%;
  width: 18px; height: 18px;
  background: #f5a623;
  transform: translateY(-50%) rotate(45deg);
  z-index: -1;
  border-radius: 3px;
  opacity: .85;
}
.ribbon-l { left: -9px; }
.ribbon-r { right: -9px; }

.result-card {
  position: relative;
  z-index: 4;
  padding: 14px;
  border-radius: 21px;
  background: #fffdf7;
  box-shadow: inset 0 0 0 1px rgba(52, 40, 20, .06), 0 14px 28px rgba(120, 80, 10, .1);
}

.total-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 1px dashed rgba(52, 40, 20, .12);
}
.total-copy { min-width: 0; }
.muted-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
}
.tag-soft {
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff1c8;
  color: #8a6410;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
}
.total-amount {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 3px 0 1px;
  color: #231a0c;
  font-family: var(--font-num);
  font-size: clamp(30px, 3.1vw, 43px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.06;
}
.total-amount .currency { font-size: .48em; font-weight: 800; color: #6b5428; letter-spacing: 0; }
.total-caption { color: var(--muted); font-size: 9px; }
.total-delta {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 12px;
  margin-top: 3px;
  color: #b7791f;
  font-size: 8.5px;
  font-weight: 700;
}
.delta-arrow { font-family: var(--font-num); font-size: 10px; }

.donut-block { display: flex; align-items: center; gap: 10px; }
.donut-wrap { position: relative; width: 104px; height: 104px; flex: none; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: #f2e8d1; stroke-width: 15; }
.donut-seg {
  fill: none;
  stroke-width: 15;
  stroke-linecap: butt;
  transition: stroke-dasharray .85s cubic-bezier(.2, .8, .25, 1);
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.25;
  letter-spacing: .06em;
}
.donut-center strong { color: var(--ink-2); font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.legend { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.legend-item {
  display: grid;
  grid-template-columns: 6px minmax(42px, 1fr) auto;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
}
.legend-dot { width: 6px; height: 6px; border-radius: 2px; background: var(--yellow); }
.legend-item b { color: var(--ink-2); font-family: var(--font-num); font-size: 9px; font-weight: 800; text-align: right; }
.legend-item .pct { color: var(--muted-2); font-family: var(--font-num); font-size: 8px; min-width: 26px; text-align: right; }

.breakdown-list { padding: 3px 0 1px; }
.breakdown-row { border-bottom: 1px dashed rgba(52, 40, 20, .09); }
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.breakdown-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #eef3ff;
  color: var(--blue);
}
.breakdown-icon.is-orange { background: #fff0e6; color: var(--orange); }
.breakdown-icon.is-green { background: #e9f9ee; color: var(--green-deep); }
.breakdown-icon.is-red { background: #ffefef; color: #d94a4a; }
.breakdown-icon.is-gray { background: #f2eee5; color: #8b7f6b; }
.breakdown-icon .ico { width: 16px; height: 16px; }
.breakdown-copy { display: flex; flex-direction: column; min-width: 0; }
.breakdown-copy strong { font-size: 11.5px; font-weight: 800; }
.breakdown-copy small { color: var(--muted); font-size: 8.5px; }
.breakdown-amount { font-family: var(--font-num); font-size: 12.5px; font-weight: 900; letter-spacing: -.01em; }
.breakdown-amount.is-negative { color: #cf4b45; }
.breakdown-chev { display: inline-flex; color: var(--muted-2); transition: transform .2s; }
.breakdown-chev .ico { width: 14px; height: 14px; }
.breakdown-row.is-open .breakdown-chev { transform: rotate(180deg); }
.breakdown-formula {
  display: none;
  margin: 0 0 8px 41px;
  padding: 7px 9px;
  border-left: 3px solid var(--yellow);
  border-radius: 0 8px 8px 0;
  background: #fff8e7;
  color: #77613b;
  font-size: 9px;
  line-height: 1.55;
}
.breakdown-row.is-open .breakdown-formula { display: block; animation: fadeIn .18s; }

.attendance-strip { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 0 3px; }
.att-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f7efdc;
  color: #6b5a40;
  font-size: 8.5px;
  font-weight: 700;
}
.att-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.att-chip.is-blue i { background: var(--blue); }
.att-chip.is-orange i { background: var(--orange); }
.att-chip.is-green i { background: var(--green); }
.att-chip.is-gray i { background: #b9ac93; }

.derived-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.derived-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(200, 160, 60, .2);
  border-radius: 11px;
  background: linear-gradient(180deg, #fff9e9, #fff3d4);
}
.derived-icon {
  width: 28px; height: 28px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #e9f9ee;
  color: var(--green-deep);
}
.derived-icon.is-blue { background: #eaf1ff; color: var(--blue); }
.derived-icon .ico { width: 15px; height: 15px; }
.derived-copy { display: flex; flex-direction: column; min-width: 0; }
.derived-copy span { color: var(--muted); font-size: 8px; font-weight: 700; }
.derived-copy strong { color: #2b1e0c; font-family: var(--font-num); font-size: 15px; font-weight: 900; line-height: 1.2; letter-spacing: -.02em; }
.derived-copy small { color: var(--muted-2); font-size: 7.5px; }

/* Fulltime result */
.range-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 9px; }
.grade-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 9px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fffaf0;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s, background .16s, transform .12s;
}
.grade-card:hover { border-color: rgba(200, 150, 40, .45); }
.grade-card.is-active {
  border-color: #f0b429;
  background: linear-gradient(180deg, #fff5d1, #ffe9a8);
  box-shadow: 0 5px 12px rgba(200, 140, 20, .14);
}
.grade-card .g-letter {
  position: absolute;
  top: 6px; right: 8px;
  color: #c9b88f;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 900;
}
.grade-card.is-active .g-letter { color: #b7791f; }
.grade-card .g-label { color: var(--muted); font-size: 8px; font-weight: 700; }
.grade-card .g-amount { color: var(--ink); font-family: var(--font-num); font-size: 14px; font-weight: 900; letter-spacing: -.02em; }
.grade-card .g-note { color: var(--muted-2); font-size: 7.5px; }
.ac-gap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #fff4d6;
  color: #7a5c1c;
  font-size: 9px;
  line-height: 1.45;
}
.ac-gap b { font-family: var(--font-num); font-size: 10px; color: #b7791f; }

.warnings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #ffd8a8;
  border-radius: 9px;
  background: #fff4e0;
  color: #8a5a00;
  font-size: 8.5px;
  line-height: 1.5;
}
.warnings .warn-item { display: flex; gap: 5px; }
.warnings .ico { width: 12px; height: 12px; margin-top: 1px; flex: none; }

.fun-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 9px 12px;
  border-radius: 13px;
  background: linear-gradient(120deg, #241d12, #17130f);
  color: #efe2c4;
  font-size: 9.5px;
  box-shadow: 0 9px 18px rgba(60, 42, 10, .18), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
}
.fun-strip.is-empty { display: none; }
.fun-item { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.fun-item .ico { width: 14px; height: 14px; color: var(--yellow); flex: none; }
.fun-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fun-item b, .fun-item strong { color: var(--yellow-2); font-family: var(--font-num); font-weight: 900; }
.fun-sep { width: 1px; height: 15px; background: rgba(255, 255, 255, .16); flex: none; }

.result-actions { display: grid; grid-template-columns: 1.32fr 1fr; gap: 7px; margin-top: 9px; }
.result-actions .btn { height: 44px; font-size: 11px; }
.result-actions .btn .ico { width: 15px; height: 15px; }
.result-actions .btn-ghost { background: rgba(255, 255, 255, .8); }
.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 7px;
  color: #6b5428;
  font-size: 8px;
}
.privacy-note .ico { width: 10px; height: 10px; }

/* ---------------- Page hero (rank / help) ---------------- */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 18px;
  padding: 4px 6px;
}
.page-hero-copy { min-width: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a67c1a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow .ico { width: 13px; height: 13px; }
.page-hero h1 {
  display: block;
  width: fit-content;
  margin: 6px 0 5px;
  color: var(--ink);
  font-size: clamp(30px, 3.7vw, 44px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.08;
  background: linear-gradient(transparent 66%, rgba(255, 197, 61, .62) 66%, rgba(255, 197, 61, .62) 88%, transparent 88%);
}
.page-hero p { color: #77694f; font-size: 11.5px; line-height: 1.6; }
.hero-stat {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 22px;
  border: 2px solid #eab02a;
  border-radius: 19px;
  background: linear-gradient(150deg, #ffe084, #ffc53d);
  box-shadow: 0 14px 26px rgba(200, 140, 20, .24), inset 0 1px 0 rgba(255, 255, 255, .55);
  transform: rotate(2deg);
}
.hero-stat-num { font-family: var(--font-num); font-size: 38px; font-weight: 900; line-height: 1; color: #2b1e0c; }
.hero-stat-label { margin-top: 2px; color: #6b5428; font-size: 8px; font-weight: 800; }
.hero-stat-spark { position: absolute; top: 4px; right: 8px; color: #fff6cf; font-size: 11px; }
.help-hero-art { display: flex; align-items: center; gap: 7px; font-size: 26px; transform: rotate(-3deg); }
.help-art-logo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(150deg, #ffd666, #ffc53d);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 5px 12px rgba(200, 140, 20, .2);
  transform: rotate(-5deg);
}
.help-art-logo svg { width: 26px; height: 26px; }
.help-hero-art span:nth-child(2) { color: var(--amber); font-size: 15px; }
.help-hero-art span:nth-child(3) { font-size: 20px; transform: rotate(8deg); color: var(--ink-2); }
.help-hero-art span:nth-child(3) .ico { width: 20px; height: 20px; }

/* ---------------- Rank page ---------------- */
.rank-shell {
  padding: 16px;
  border: 1px solid rgba(200, 160, 60, .24);
  border-radius: 25px;
  background: #fffdf7;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.rank-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  border-radius: 14px;
  background: #f4e9d1;
}
.rank-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background .18s, box-shadow .18s;
}
.rank-tab::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 3px;
  border-radius: 99px;
  background: var(--yellow);
  transform: translateX(-50%);
  transition: width .22s;
}
.rank-tab:hover { background: rgba(255, 255, 255, .55); }
.rank-tab.is-active { background: #fffdf7; box-shadow: 0 4px 10px rgba(120, 90, 20, .1); }
.rank-tab.is-active::after { width: 20px; }
.rank-tab-name { color: var(--ink-2); font-size: 12.5px; font-weight: 900; }
.rank-tab.is-active .rank-tab-name { color: var(--ink); }
.rank-tab-sub { color: var(--muted); font-size: 8.5px; }
.rank-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 0 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #fff8e7;
  color: var(--muted);
  font-size: 9px;
}
.rank-note-ico { display: inline-flex; color: var(--amber-deep); }
.rank-note-ico .ico { width: 12px; height: 12px; }
.rank-note-sub { margin-left: auto; color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.rank-list { display: flex; flex-direction: column; gap: 7px; min-height: 360px; }
.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 39px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(200, 160, 60, .18);
  border-radius: 14px;
  background: #fff9ec;
  transition: transform .16s, border-color .16s, background .16s;
}
.rank-row:hover { transform: translateX(2px); border-color: rgba(200, 150, 40, .4); }
.rank-row.is-top1 {
  background: linear-gradient(90deg, #fff3c4, #fffbef 68%);
  border-color: #efc45d;
}
.rank-row.is-top2 { background: linear-gradient(90deg, #f4f5f8, #fffbef 68%); border-color: #d9d6cd; }
.rank-row.is-top3 { background: linear-gradient(90deg, #f8e7d7, #fffbef 68%); border-color: #e3b58c; }
.rank-row.is-me {
  border: 2px solid var(--yellow);
  background: linear-gradient(90deg, #fff2c4, #fffdf7 70%);
  box-shadow: 0 6px 16px rgba(200, 150, 20, .13);
}
.rank-badge {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #f3ead7;
  color: #a08a63;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 900;
}
.rank-badge.is-gold { background: linear-gradient(150deg, #ffe28a, #f0a91f); color: #6b4200; box-shadow: 0 4px 10px rgba(220, 160, 20, .28); }
.rank-badge.is-silver { background: linear-gradient(150deg, #f1f3f6, #b9c0c9); color: #5d6672; }
.rank-badge.is-bronze { background: linear-gradient(150deg, #f6d7bd, #c98a55); color: #6b3d1b; }
.rank-badge .ico { width: 19px; height: 19px; }
.rank-crown {
  position: absolute;
  top: -9px; left: 15px;
  color: #e2a11b;
  transform: rotate(-12deg);
  filter: drop-shadow(0 2px 2px rgba(150, 100, 10, .2));
}
.rank-crown .ico { width: 18px; height: 18px; }
.rank-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8), 0 3px 8px rgba(100, 70, 20, .12); }
.horse-avatar { width: 100%; height: 100%; display: block; }
.rank-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-name-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.rank-name { font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-title {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff1c8;
  color: #a06a00;
  font-size: 8px;
  font-weight: 800;
}
.rank-me-tag { flex: none; padding: 1px 5px; border-radius: 999px; background: #2b1e0c; color: var(--yellow-2); font-size: 7.5px; font-weight: 900; }
.rank-sub { color: var(--muted); font-size: 8px; }
.rank-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 80px; }
.rank-stat-value { font-family: var(--font-num); font-size: 17px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.rank-stat-unit { margin-left: 2px; color: var(--muted); font-family: var(--font); font-size: 8px; font-weight: 700; }
.rank-percent { color: #a67c1a; font-size: 8px; white-space: nowrap; }
.rank-percent-bar { width: 84px; height: 4px; border-radius: 99px; background: #efe3c8; overflow: hidden; }
.rank-percent-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd666, #f5a623); transition: width .6s cubic-bezier(.2, .8, .25, 1); }
.rank-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
  padding: 13px 15px;
  border-radius: 15px;
  background: linear-gradient(120deg, #241d12, #17130f);
  color: #f3e8cf;
}
.rank-cta > div { display: flex; flex-direction: column; gap: 2px; }
.rank-cta strong { font-size: 12px; font-weight: 900; color: #fff8e3; }
.rank-cta span { color: #a99a80; font-size: 8.5px; }
.rank-cta .btn { height: 37px; padding: 0 13px; font-size: 10px; border-radius: 10px; flex: none; }

/* ---------------- Help page ---------------- */
.help-tabs { display: none; }
.help-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 17px; align-items: start; }
.help-card {
  padding: 19px;
  border: 1px solid rgba(200, 160, 60, .24);
  border-radius: 23px;
  background: #fffdf7;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.card-head { display: flex; align-items: center; gap: 11px; padding-bottom: 13px; border-bottom: 1px dashed rgba(52, 40, 20, .11); }
.card-icon {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(150deg, #fff3d0, #ffe9a8);
  color: #a67c1a;
  border: 1px solid rgba(200, 160, 60, .2);
}
.card-icon .ico { width: 21px; height: 21px; }
.card-head h2 { font-size: 17px; font-weight: 900; letter-spacing: -.02em; }
.card-head p { color: var(--muted); font-size: 9px; margin-top: 1px; }
.rule-block {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(52, 40, 20, .1);
}
.rule-num { color: #eab02a; font-family: var(--font-num); font-size: 20px; font-weight: 900; line-height: 1.1; }
.rule-block h3 { margin-bottom: 6px; font-size: 12.5px; font-weight: 900; }
.rule-list { display: flex; flex-direction: column; gap: 4px; }
.rule-list li { color: var(--ink-2); font-size: 10px; line-height: 1.62; }
.rule-list li b {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #fff3d6;
  color: #8a6410;
  font-size: 9px;
  font-weight: 800;
}
.rule-block p { color: var(--ink-2); font-size: 10px; line-height: 1.65; }
.rule-block p b { color: #a06a00; }
.formula-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.formula-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(200, 160, 60, .25);
  border-radius: 8px;
  background: #fff8e7;
  color: #6b5a40;
  font-size: 9.5px;
}
.formula-pill b { color: #a06a00; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.orange { background: var(--orange); }
.dot.green { background: var(--green); }
.dot.blue { background: var(--blue); }
.dot.yellow { background: var(--yellow); }

.faq { padding-top: 13px; }
.faq-title { margin-bottom: 3px; font-size: 12.5px; font-weight: 900; }
.faq-item { border-bottom: 1px dashed rgba(52, 40, 20, .1); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
.faq-plus {
  color: var(--amber-deep);
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 800;
  transition: transform .2s;
}
.faq-item[open] .faq-plus { transform: rotate(45deg); }
.faq-item p { padding: 0 0 10px; color: var(--muted); font-size: 9.5px; line-height: 1.7; }

.level-list { display: flex; flex-direction: column; gap: 7px; padding: 12px 0 4px; }
.level-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(200, 160, 60, .17);
  border-radius: 13px;
  background: #fff9ec;
}
.level-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none; }
.level-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.level-copy strong { font-size: 12px; font-weight: 900; }
.level-copy span { color: var(--muted); font-size: 8.5px; }
.level-range {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff1c8;
  color: #a06a00;
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.level-row.is-ultimate { background: linear-gradient(100deg, #fff3c4, #fff9ec 72%); border-color: #efc45d; }
.title-rule-note {
  display: flex;
  gap: 7px;
  margin: 10px 0 12px;
  padding: 9px 11px;
  border-left: 3px solid var(--yellow);
  border-radius: 0 9px 9px 0;
  background: #fff6dd;
  color: #6b5428;
  font-size: 9px;
  line-height: 1.6;
}
.title-rule-note .ico { width: 13px; height: 13px; margin-top: 1px; flex: none; }
.main-title-table h3 { margin-bottom: 6px; font-size: 11.5px; font-weight: 900; }
.title-table { overflow: hidden; border: 1px solid rgba(52, 40, 20, .1); border-radius: 11px; }
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px dashed rgba(52, 40, 20, .08);
  font-size: 9px;
  color: var(--muted);
}
.title-row:last-child { border-bottom: 0; }
.title-row:nth-child(odd) { background: #fffaf0; }
.title-row b { color: var(--ink-2); font-size: 9.5px; font-weight: 800; text-align: right; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid rgba(52, 40, 20, .08);
  background: rgba(255, 249, 234, .55);
  margin-top: 10px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 9px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 900; font-size: 10px; }
.footer-mark { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; background: var(--yellow); }
.footer-mark svg { width: 17px; height: 17px; }
.footer-right { color: var(--muted-2); }

/* ---------------- Bottom nav ---------------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 253, 247, .94);
  border-top: 1px solid rgba(52, 40, 20, .12);
  box-shadow: 0 -8px 24px rgba(100, 70, 20, .08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.bottom-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 6px;
  color: #8b7f6b;
  font-size: 9px;
  font-weight: 800;
}
.bottom-ico {
  width: 38px; height: 24px;
  display: grid; place-items: center;
  border-radius: 999px;
  transition: background .18s, color .18s;
}
.bottom-ico .ico { width: 19px; height: 19px; }
.bottom-link.is-active { color: var(--ink); }
.bottom-link.is-active .bottom-ico { background: var(--yellow); color: #2b1e0c; }

/* ---------------- Modals ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 17, 7, .52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .22s ease;
}
.modal-panel {
  position: relative;
  z-index: 2;
  width: min(1010px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border-radius: 26px;
  background: #fffdf7;
  box-shadow: 0 40px 100px rgba(30, 20, 5, .36);
  animation: modalIn .38s cubic-bezier(.2, .9, .25, 1.08);
  scrollbar-width: thin;
  scrollbar-color: #e5d6b4 transparent;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid rgba(52, 40, 20, .12);
  border-radius: 50%;
  background: rgba(255, 253, 247, .9);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .16s, transform .16s;
}
.modal-close:hover { background: #fff; transform: rotate(90deg); }
.poster-sheet {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 26px;
  padding: 22px;
}
.poster-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: 19px;
  background:
    radial-gradient(360px 220px at 50% 10%, rgba(255, 197, 61, .3), transparent 70%),
    #f7eed8;
  border: 1px solid rgba(200, 160, 60, .16);
}
.poster-frame {
  position: relative;
  width: min(322px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: #ffc53d;
  box-shadow: 0 20px 40px rgba(70, 45, 10, .22), 0 0 0 5px rgba(255, 255, 255, .55);
}
.poster-frame > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 197, 61, .9);
  color: #2b1e0c;
  font-size: 10px;
  font-weight: 800;
}
.poster-loading[hidden] { display: none; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(43, 30, 12, .2);
  border-top-color: #2b1e0c;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.poster-preview-note {
  display: flex; align-items: center; gap: 4px;
  color: #8b7f6b; font-size: 8.5px; text-align: center;
}
.poster-preview-note .ico { width: 11px; height: 11px; }
.poster-controls { padding: 8px 4px 4px; }
.poster-controls h2 { margin: 5px 0 4px; font-size: 29px; font-weight: 900; letter-spacing: -.03em; }
.poster-controls > .muted { color: var(--muted); font-size: 10px; }
.control-block { margin-top: 18px; }
.control-label { margin-bottom: 8px; font-size: 10.5px; font-weight: 900; }
.template-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.template-card {
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, background .18s, transform .16s;
}
.template-card:hover { transform: translateY(-2px); }
.template-card.is-active { border-color: var(--yellow); background: #fff7de; }
.template-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 3 / 4.1;
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
}
.template-yellow {
  background:
    repeating-conic-gradient(from 0deg at 78% 16%, rgba(255, 255, 255, .32) 0deg 8deg, transparent 8deg 19deg),
    linear-gradient(160deg, #ffd95c, #ffc53d 62%, #ffb726);
  color: #3b2c16;
}
.template-dark {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 197, 61, .3) 0 2%, transparent 22%),
    radial-gradient(circle at 80% 64%, rgba(255, 197, 61, .24) 0 1.5%, transparent 18%),
    radial-gradient(circle at 55% 38%, rgba(255, 255, 255, .35) 0 1%, transparent 12%),
    #11141d;
  color: #ffe9a8;
}
.template-thumb .t-score { font-family: var(--font-num); font-size: 30px; font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.template-thumb .t-band { font-size: 6px; font-weight: 800; opacity: .75; }
.template-thumb .t-title {
  margin-top: 2px;
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 900;
}
.template-thumb .t-amount { font-family: var(--font-num); font-size: 9px; font-weight: 900; }
.template-thumb .t-qr {
  position: absolute;
  right: 8px; bottom: 8px;
  width: 22px; height: 22px;
  border-radius: 2px;
  background:
    repeating-conic-gradient(#1f1a0f 0 25%, #fff 0 50%) 0 0 / 6px 6px;
  border: 2px solid #fff;
}
.template-dark .t-qr { background: repeating-conic-gradient(#ffe9a8 0 25%, #11141d 0 50%) 0 0 / 6px 6px; border-color: #11141d; }
.template-name { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; padding: 0 2px; font-size: 10px; font-weight: 900; }
.template-name i { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 600; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(52, 40, 20, .1);
  cursor: pointer;
}
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  position: relative;
  width: 19px; height: 19px;
  flex: none;
  margin-top: 1px;
  border: 2px solid #cdbb95;
  border-radius: 6px;
  background: #fff;
  transition: background .16s, border-color .16s;
}
.check-box::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 9px;
  border-right: 2px solid #2b1e0c;
  border-bottom: 2px solid #2b1e0c;
  transform: rotate(42deg) scale(0);
  transition: transform .16s;
}
.check-row input:checked + .check-box { background: var(--yellow); border-color: #f0b429; }
.check-row input:checked + .check-box::after { transform: rotate(42deg) scale(1); }
.check-row input:focus-visible + .check-box { outline: 3px solid rgba(255, 197, 61, .55); outline-offset: 2px; }
.check-copy { display: flex; flex-direction: column; gap: 1px; }
.check-copy strong { font-size: 10.5px; font-weight: 800; }
.check-copy small { color: var(--muted); font-size: 8.5px; line-height: 1.45; }
.poster-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.poster-actions .btn { height: 44px; font-size: 11px; }
.poster-privacy { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 9px; color: var(--muted); font-size: 8px; }
.poster-privacy .ico { width: 10px; height: 10px; }

/* ---------------- Award modal ---------------- */
.award-modal .modal-backdrop { background: rgba(8, 9, 14, .72); }
.award-card {
  position: relative;
  z-index: 2;
  width: min(404px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px 22px 16px;
  border: 1px solid rgba(255, 197, 61, .38);
  border-radius: 26px;
  background:
    radial-gradient(380px 260px at 50% 8%, rgba(255, 197, 61, .17), transparent 66%),
    radial-gradient(260px 260px at 12% 60%, rgba(126, 87, 255, .12), transparent 70%),
    linear-gradient(180deg, #12151f 0%, #0c0e15 100%);
  color: #f6ecd4;
  box-shadow: 0 0 0 6px rgba(255, 197, 61, .07), 0 45px 110px rgba(0, 0, 0, .55);
  animation: awardIn .45s cubic-bezier(.2, .9, .25, 1.08);
  scrollbar-width: thin;
}
.award-stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 26px; }
.award-stars i {
  position: absolute;
  color: rgba(255, 228, 150, .7);
  font-style: normal;
  animation: twinkle 3s ease-in-out infinite;
}
.award-stars i:nth-child(1) { top: 9%; left: 12%; font-size: 12px; }
.award-stars i:nth-child(2) { top: 17%; right: 14%; font-size: 15px; animation-delay: .7s; }
.award-stars i:nth-child(3) { top: 34%; left: 6%; font-size: 8px; animation-delay: 1.2s; }
.award-stars i:nth-child(4) { top: 8%; left: 46%; font-size: 18px; opacity: .45; }
.award-stars i:nth-child(5) { top: 48%; right: 7%; font-size: 9px; animation-delay: .4s; }
.award-stars i:nth-child(6) { top: 64%; left: 10%; font-size: 7px; animation-delay: 1.6s; }
.award-stars i:nth-child(7) { top: 72%; right: 16%; font-size: 13px; animation-delay: 2s; }
.award-stars i:nth-child(8) { top: 88%; left: 44%; font-size: 8px; animation-delay: .9s; }
.award-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 4;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: #e7dcc4;
  cursor: pointer;
}
.award-close:hover { background: rgba(255, 255, 255, .12); }
.award-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 4px;
  color: #ffd666;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
}
.award-logo {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(150deg, #ffd666, #ffc53d);
}
.award-logo svg { width: 18px; height: 18px; }
.award-mascot {
  width: 205px;
  height: 205px;
  margin: 0 auto -4px;
  position: relative;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .4));
}
.award-mascot::before {
  content: "";
  position: absolute;
  left: 50%; top: 55%;
  width: 280px; height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 197, 61, .23), transparent 66%);
  z-index: -1;
}
.award-mascot .horse-svg { width: 100%; height: 100%; }
.award-title {
  margin-top: 2px;
  text-align: center;
  color: #ffd666;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-shadow: 0 2px 0 rgba(122, 77, 0, .55), 0 0 26px rgba(255, 197, 61, .2);
}
.award-line { margin-top: 4px; text-align: center; color: #bdb198; font-size: 9.5px; line-height: 1.55; }
.award-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
}
.award-score-num { font-family: var(--font-num); font-size: 30px; font-weight: 900; color: #ffe9a8; line-height: 1; }
.award-score-label { color: #8f836c; font-size: 8px; letter-spacing: .06em; }
.award-band {
  padding: 2px 8px;
  border: 1px solid rgba(255, 197, 61, .35);
  border-radius: 999px;
  background: rgba(255, 197, 61, .12);
  color: #ffd666;
  font-size: 8.5px;
  font-weight: 800;
}
.award-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
}
.award-total span { color: #a99d86; font-size: 8.5px; }
.award-total strong { color: #ffd666; font-family: var(--font-num); font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.award-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; }
.award-legend .legend-item { display: inline-flex; gap: 4px; color: #a99d86; font-size: 8px; }
.award-legend .legend-item b { color: #e7dcc4; font-family: var(--font-num); font-size: 8.5px; }
.award-legend .legend-dot { width: 5px; height: 5px; }
.award-actions { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 13px; }
.award-actions .btn { height: 43px; font-size: 11.5px; }
.btn-award-ghost {
  background: transparent;
  border-color: rgba(255, 197, 61, .42);
  color: #ffd666;
}
.btn-award-ghost:hover { background: rgba(255, 197, 61, .1); }
.award-footnote { margin-top: 9px; text-align: center; color: #756b5a; font-size: 7.5px; }

/* ---------------- Landing card ---------------- */
body.modal-open { overflow: hidden; }
.landing-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(200, 160, 60, .32);
  border-radius: 18px;
  background:
    radial-gradient(280px 100px at 0% 0%, rgba(255, 213, 102, .5), transparent 70%),
    #fffdf7;
  box-shadow: var(--shadow-sm);
  animation: pageIn .3s ease both;
}
.landing-avatar {
  width: 48px; height: 48px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #ffe9a8;
  font-size: 24px;
}
.landing-avatar .horse-avatar { width: 100%; height: 100%; }
.landing-avatar.is-empty { background: #fff1c8; }
.landing-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.landing-copy > span { color: #a67c1a; font-size: 8.5px; font-weight: 900; letter-spacing: .08em; }
.landing-copy > strong { margin-top: 1px; font-size: 15px; font-weight: 900; letter-spacing: -.01em; }
.landing-copy > small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.landing-btn { height: 38px; padding: 0 14px; font-size: 10px; border-radius: 10px; flex: none; }
.landing-close {
  position: absolute;
  top: 7px; right: 7px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.landing-close:hover { background: rgba(52, 40, 20, .06); color: var(--ink-2); }

/* ---------------- Toast & confetti ---------------- */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  width: 100%; height: 100%;
}
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}
.toast {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(31, 26, 15, .94);
  color: #ffe9a8;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(20, 14, 5, .3);
  animation: toastIn .26s cubic-bezier(.2, .9, .25, 1.1);
}
.toast.is-leaving { animation: toastOut .22s ease forwards; }
.toast .ico { width: 14px; height: 14px; color: var(--yellow); }

/* ---------------- Animations ---------------- */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes awardIn { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes softPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes slowSpin { to { transform: rotate(360deg); } }
@keyframes horseBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5px) rotate(-.8deg); } }
@keyframes twinkle { 0%, 100% { opacity: .45; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1120px) {
  .calc-layout { grid-template-columns: minmax(330px, .86fr) minmax(0, 1.25fr); gap: 18px; }
  .main { padding-left: 18px; padding-right: 18px; }
  .mascot { width: 202px; right: 2px; }
  .score-hero { grid-template-columns: minmax(0, 1fr) minmax(160px, .8fr); }
  .title-line { font-size: 9px; }
}

@media (max-width: 1023px) {
  .calc-layout { grid-template-columns: 1fr; gap: 18px; }
  .form-panel { max-width: 720px; width: 100%; margin: 0 auto; }
  .result-panel { position: static; max-width: 760px; width: 100%; margin: 0 auto; }
  .page-hero { max-width: 760px; margin-left: auto; margin-right: auto; }
  .rank-shell, .help-grid { max-width: 760px; margin-left: auto; margin-right: auto; }
  .help-grid { grid-template-columns: 1fr; }
  .poster-sheet { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; gap: 16px; }
  .poster-preview-col { padding: 14px; }
  .poster-frame { width: min(280px, 72%); }
  .poster-controls h2 { font-size: 25px; }
  .poster-controls { padding: 0 2px 2px; }
}

@media (max-width: 767px) {
  :root { --header-h: 58px; }
  body { padding-bottom: 66px; }
  .topbar-inner { padding: 0 14px; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .brand-name { font-size: 17px; }
  .brand-slogan { display: none; }
  .topnav { display: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .main { padding: 14px 12px 24px; }
  .bottom-nav { display: flex; }
  body.result-open .bottom-nav { display: none; }
  body.result-open .site-footer { display: none; }
  .site-footer { display: none; }

  .form-panel { border-radius: 22px; padding: 13px 13px 14px; }
  .form-panel::before { inset: 5px; border-radius: 18px; }
  .mode-switch { gap: 7px; margin-bottom: 14px; }
  .mode-card { padding: 9px 8px; border-radius: 13px; gap: 7px; }
  .mode-emoji { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
  .mode-copy strong { font-size: 11.5px; }
  .mode-copy small { font-size: 8px; }
  .panel-head { margin-bottom: 10px; }
  .field { margin-bottom: 13px; }
  .field-row { gap: 8px; }
  .amount-input { height: 52px; }
  .amount-input input { font-size: 25px; }
  .quick-chips { gap: 4px; }
  .quick-chips .chip { height: 23px; min-width: 40px; font-size: 9.5px; }
  .date-shell input[type="date"] { font-size: 11.5px; }
  .field-aside { display: none; }
  .alt-week { gap: 7px; padding: 8px 9px; }
  .alt-week-note { width: 100%; margin-left: 0; }
  .btn-calc { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 10px 24px rgba(205, 145, 20, .38), inset 0 1px 0 rgba(255, 255, 255, .62); }
  .form-footnote { font-size: 8.5px; }

  .page-hero { margin: 2px 0 13px; padding: 2px 2px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero p { font-size: 10.5px; }
  .hero-stat { display: none; }
  .help-hero-art { display: none; }

  /* 结果页全屏浮层 */
  .result-panel {
    position: fixed;
    inset: 0;
    z-index: 160;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0 12px calc(26px + env(safe-area-inset-bottom));
    border-radius: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: none;
    background:
      radial-gradient(520px 280px at 8% -4%, rgba(255, 255, 255, .52), transparent 62%),
      linear-gradient(158deg, #ffdc67 0%, #ffc53d 52%, #ffbd26 100%);
    animation: slideUp .42s cubic-bezier(.2, .9, .25, 1);
  }
  .result-panel.is-open { display: block; }
  body.result-open { overflow: hidden; }
  .result-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 -12px;
    padding: 10px 12px 8px;
    background: linear-gradient(180deg, rgba(255, 213, 92, .98) 0%, rgba(255, 213, 92, .88) 70%, transparent 100%);
    backdrop-filter: blur(4px);
  }
  .result-close {
    display: inline-grid;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255, 253, 247, .86);
    border: 1px solid rgba(52, 40, 20, .12);
    box-shadow: 0 3px 8px rgba(120, 80, 10, .12);
  }
  .score-hero { margin-top: 2px; min-height: 188px; padding: 0 2px; grid-template-columns: minmax(0, 1fr) minmax(130px, .78fr); }
  .gauge-wrap { max-width: 184px; height: 96px; }
  .gauge-readout strong { font-size: 38px; }
  .band-name { font-size: 17px; }
  .band-desc { font-size: 8.5px; }
  .mascot-stage { min-height: 188px; }
  .mascot { width: 176px; right: 0; bottom: -18px; }
  .speech-bubble { top: 2px; right: 12px; font-size: 8.5px; padding: 5px 8px; }
  .doodle-a { top: 24px; right: 2px; font-size: 14px; }
  .doodle-b { top: 80px; right: 0; width: 17px; height: 17px; font-size: 10px; }
  .title-banner { margin-top: -12px; padding: 8px 10px; gap: 9px; border-radius: 13px; }
  .title-medal { width: 34px; height: 34px; }
  .title-medal .ico { width: 19px; height: 19px; }
  .title-name { font-size: 17px; }
  .title-line { font-size: 8.5px; }
  .title-kicker { font-size: 7px; }
  .result-card { padding: 12px; border-radius: 18px; }
  .total-amount { font-size: 32px; }
  .total-caption { font-size: 8.5px; }
  .donut-wrap { width: 92px; height: 92px; }
  .legend { gap: 3px; }
  .legend-item { font-size: 8px; grid-template-columns: 5px minmax(38px, 1fr) auto; gap: 4px; }
  .legend-item b { font-size: 8.5px; }
  .legend-item .pct { font-size: 7.5px; min-width: 22px; }
  .breakdown-head { padding: 6px 0; grid-template-columns: 30px minmax(0, 1fr) auto 13px; gap: 8px; }
  .breakdown-icon { width: 30px; height: 30px; }
  .breakdown-copy strong { font-size: 11px; }
  .breakdown-formula { margin-left: 38px; font-size: 8.5px; }
  .derived-copy strong { font-size: 14px; }
  .fun-strip { padding: 8px 10px; font-size: 8.5px; gap: 8px; }
  .fun-item .ico { width: 12px; height: 12px; }
  .result-actions .btn { height: 42px; font-size: 10px; padding: 0 8px; }
  .result-actions .btn .ico { width: 14px; height: 14px; }
  .privacy-note { font-size: 7.5px; }

  .rank-shell { padding: 12px; border-radius: 21px; }
  .rank-tabs { padding: 4px; gap: 3px; }
  .rank-tab { padding: 8px 4px 9px; }
  .rank-tab-name { font-size: 11.5px; }
  .rank-tab-sub { font-size: 8px; }
  .rank-note { font-size: 8.5px; flex-wrap: wrap; }
  .rank-note-sub { margin-left: 17px; width: 100%; }
  .rank-list { gap: 6px; min-height: 330px; }
  .rank-row { grid-template-columns: 32px 38px minmax(0, 1fr) auto; gap: 8px; padding: 8px 9px; border-radius: 12px; }
  .rank-badge { width: 32px; height: 32px; font-size: 12px; }
  .rank-badge .ico { width: 17px; height: 17px; }
  .rank-crown { left: 9px; }
  .rank-avatar { width: 38px; height: 38px; }
  .rank-name { font-size: 11px; }
  .rank-title { font-size: 7px; padding: 1px 4px; }
  .rank-sub { font-size: 7.5px; }
  .rank-stat { min-width: 64px; }
  .rank-stat-value { font-size: 15px; }
  .rank-percent { font-size: 7.5px; }
  .rank-percent-bar { width: 64px; height: 3px; }
  .rank-cta { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .rank-cta .btn { width: 100%; }

  .help-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin: 0 0 12px;
    border-radius: 12px;
    background: #f4e9d1;
  }
  .help-tab {
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
  }
  .help-tab.is-active { background: #fffdf7; box-shadow: 0 4px 10px rgba(120, 90, 20, .1); color: var(--ink); }
  .help-grid[data-help-active="rules"] #helpTitles { display: none; }
  .help-grid[data-help-active="titles"] #helpRules { display: none; }
  .help-card { padding: 14px; border-radius: 20px; }
  .card-head h2 { font-size: 16px; }
  .rule-block { padding: 12px 0; grid-template-columns: 24px minmax(0, 1fr); gap: 7px; }
  .rule-num { font-size: 17px; }
  .rule-list li { font-size: 9.5px; }
  .rule-block p { font-size: 9.5px; }
  .level-copy strong { font-size: 11.5px; }
  .main-title-table .title-row { font-size: 8.5px; }
  .main-title-table .title-row b { font-size: 9px; }

  .modal { padding: 0; align-items: end; }
  .modal-panel { width: 100%; max-height: 93vh; border-radius: 24px 24px 0 0; padding: 16px; animation: slideUp .38s cubic-bezier(.2, .9, .25, 1); }
  .poster-sheet { max-width: none; gap: 14px; padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); }
  .poster-preview-col { padding: 12px; border-radius: 16px; gap: 7px; }
  .poster-frame { width: min(250px, 66vw); }
  .poster-controls h2 { font-size: 23px; }
  .poster-controls .eyebrow { font-size: 8px; }
  .template-list { grid-template-columns: repeat(2, minmax(0, 132px)); justify-content: center; gap: 12px; }
  .template-thumb { aspect-ratio: 3 / 4; }
  .template-thumb .t-score { font-size: 22px; }
  .template-thumb .t-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 5px; font-size: 7px; }
  .template-thumb .t-amount { font-size: 8px; }
  .template-thumb .t-qr { width: 16px; height: 16px; right: 6px; bottom: 6px; background-size: 5px 5px; }
  .template-name { justify-content: center; font-size: 9px; }
  .poster-actions { position: static; padding-top: 0; background: none; }
  .award-modal { align-items: center; padding: 12px; }
  .award-card { width: calc(100% - 4px); padding: 17px 17px 14px; margin-bottom: 0; border-radius: 24px; }
  .award-mascot { width: 174px; height: 174px; }
  .award-title { font-size: 26px; }
  .award-total strong { font-size: 18px; }
  .award-actions .btn { height: 41px; }
  .toast-wrap { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .mode-card { gap: 6px; padding: 8px 7px; }
  .mode-emoji { width: 27px; height: 27px; font-size: 14px; }
  .mode-copy strong { font-size: 10.8px; }
  .mode-copy small { font-size: 7.5px; }
  .date-shell input[type="date"] { font-size: 10.8px; }
  .field-row { gap: 7px; }
  .input-shell { height: 44px; padding: 0 10px; }
  .amount-input { height: 50px; }
  .amount-input input { font-size: 23px; }
  .amount-input .input-prefix { font-size: 16px; }
  .quick-chips .chip { min-width: 36px; padding: 0 6px; font-size: 9px; }
  .seg { height: 35px; font-size: 12px; }
  .title-line { max-width: 210px; }
  .total-block { grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
  .donut-block { gap: 6px; }
  .donut-wrap { width: 82px; height: 82px; }
  .legend { gap: 2px; }
  .legend-item { font-size: 7.5px; grid-template-columns: 5px minmax(34px, 1fr) auto; gap: 3px; }
  .legend-item b { font-size: 8px; }
  .legend-item .pct { font-size: 7px; min-width: 20px; }
  .total-amount { font-size: 29px; }
  .breakdown-copy small { display: none; }
  .derived-grid { gap: 6px; }
  .derived-card { padding: 7px 7px; gap: 6px; }
  .derived-icon { width: 25px; height: 25px; }
  .derived-copy strong { font-size: 13px; }
  .derived-copy span { font-size: 7.5px; }
  .derived-copy small { display: none; }
  .fun-strip { flex-direction: column; align-items: stretch; gap: 5px; }
  .fun-sep { width: 100%; height: 1px; }
  .fun-item { font-size: 8.5px; }
  .result-actions { grid-template-columns: 1fr; }
  .result-actions .btn { height: 40px; font-size: 10.5px; }
  .result-panel { padding-left: 10px; padding-right: 10px; }
  .rank-row { grid-template-columns: 28px 34px minmax(0, 1fr) auto; gap: 6px; padding: 7px 8px; }
  .rank-badge { width: 28px; height: 28px; font-size: 11px; }
  .rank-avatar { width: 34px; height: 34px; }
  .rank-stat { min-width: 56px; }
  .rank-stat-value { font-size: 14px; }
  .rank-percent-bar { width: 56px; }
  .rank-name { font-size: 10.5px; }
  .rank-title { display: none; }
  .rank-tab-name { font-size: 10.5px; }
  .rank-tab-sub { font-size: 7.5px; }
  .poster-frame { width: min(210px, 60vw); }
  .check-copy small { font-size: 8px; }
  .poster-actions { grid-template-columns: 1fr; }
  .poster-actions .btn { height: 41px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
