@charset "UTF-8";

:root {
  --bg: #f4f3ed;
  --surface: #fffdf8;
  --surface-soft: #f8f7f1;
  --ink: #19332f;
  --ink-soft: #40544f;
  --muted: #75827e;
  --line: #e5e2d8;
  --line-strong: #d6d2c6;
  --green: #1c5148;
  --green-dark: #123b35;
  --green-soft: #dfeae3;
  --orange: #e7924c;
  --orange-soft: #fae6d5;
  --red: #bc554b;
  --red-soft: #f8e5e1;
  --sky: #dcebea;
  --lilac: #e9e4ef;
  --shadow-sm: 0 4px 16px rgba(35, 52, 45, 0.05);
  --shadow-md: 0 16px 44px rgba(32, 54, 47, 0.1);
  --shadow-lg: 0 28px 80px rgba(21, 48, 41, 0.17);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --sidebar-width: 238px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 3%, rgba(226, 234, 217, 0.6), transparent 26rem),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  outline: none;
  background: var(--surface);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(28, 81, 72, 0.5);
  box-shadow: 0 0 0 4px rgba(28, 81, 72, 0.08);
}

textarea {
  resize: vertical;
}

::selection {
  background: #c6dfce;
  color: var(--green-dark);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  padding: 30px 20px 22px;
  border-right: 1px solid rgba(210, 206, 194, 0.8);
  background: rgba(249, 248, 242, 0.88);
  backdrop-filter: blur(18px);
  flex-direction: column;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: var(--green-dark);
}

.brand-mark {
  position: relative;
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-mark span {
  position: absolute;
  display: block;
  width: 7px;
  height: 18px;
  border-radius: 4px;
  background: #f9ebc7;
  transform: rotate(30deg);
}

.brand-mark span:nth-child(1) {
  left: 9px;
  bottom: 7px;
  height: 12px;
  opacity: 0.7;
}

.brand-mark span:nth-child(2) {
  left: 16px;
  bottom: 8px;
  height: 22px;
}

.brand-mark span:nth-child(3) {
  left: 24px;
  bottom: 9px;
  height: 9px;
  background: #efb865;
}

.brand-name {
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.side-nav {
  display: flex;
  margin-top: 48px;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border-radius: 13px;
  align-items: center;
  gap: 13px;
  color: #6f7e79;
  background: transparent;
  font-size: 14px;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--green-dark);
  background: rgba(28, 81, 72, 0.055);
}

.nav-item:active {
  transform: scale(0.98);
}

.nav-item.active {
  color: var(--green-dark);
  background: #e8ede6;
  font-weight: 650;
}

.nav-item.active::before {
  position: absolute;
  left: -20px;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--green);
  content: "";
}

.nav-count {
  min-width: 23px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 20px;
  color: var(--green);
  background: #d9e6dc;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.nav-count.warm {
  color: #9c5d2c;
  background: #f5e3ce;
}

.sidebar-note {
  display: flex;
  margin-top: auto;
  padding: 15px 13px;
  border: 1px solid rgba(215, 213, 203, 0.8);
  border-radius: 14px;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 253, 248, 0.58);
}

.local-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #57a06f;
  box-shadow: 0 0 0 4px rgba(87, 160, 111, 0.12);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 650;
}

.sidebar-note span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.sidebar-footer {
  display: flex;
  margin-top: 12px;
  padding: 8px 4px 0;
  border-top: 1px solid rgba(214, 210, 198, 0.75);
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.65;
}

.sidebar-footer a {
  color: var(--green);
  word-break: break-all;
}

.sidebar-footer a:hover {
  text-decoration: underline;
}

.mobile-header {
  display: none;
}

.main {
  display: flex;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  flex-direction: column;
}

.page-wrap {
  width: min(100%, 1340px);
  margin: 0 auto;
  padding: 42px clamp(26px, 4vw, 62px) 80px;
  flex: 1;
}

.view {
  display: none;
  animation: view-in 280ms ease both;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  display: flex;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar h2 {
  margin: 3px 0 0;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: clamp(22px, 2.3vw, 29px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.date-line {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.04em;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  padding: 0 19px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fffdf7;
  background: var(--green);
  box-shadow: 0 7px 18px rgba(28, 81, 72, 0.16);
}

.btn-primary:hover {
  background: #17463e;
  box-shadow: 0 9px 24px rgba(28, 81, 72, 0.22);
}

.btn-secondary {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(25, 51, 47, 0.03);
}

.btn-secondary:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.btn-light {
  min-height: 48px;
  padding: 0 22px;
  color: var(--green-dark);
  background: #f8edcf;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.12);
}

.btn-light:hover {
  background: #fff4d8;
}

.btn-ghost-light {
  min-height: 48px;
  padding: 0 4px 0 10px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
}

.btn-ghost-light:hover {
  color: #fff;
}

.btn-wide {
  min-width: 132px;
}

.icon-btn {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  transition: background 150ms ease, transform 150ms ease;
}

.icon-btn:hover {
  background: rgba(28, 81, 72, 0.07);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn.soft {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.hero {
  position: relative;
  display: grid;
  min-height: 378px;
  overflow: hidden;
  padding: clamp(34px, 5vw, 58px);
  border-radius: 30px;
  grid-template-columns: 1.05fr 0.95fr;
  color: #f9f7ed;
  background:
    radial-gradient(circle at 83% 20%, rgba(222, 209, 151, 0.12), transparent 18rem),
    linear-gradient(132deg, #1e4e46 0%, #163f39 54%, #113630 100%);
  box-shadow: 0 22px 50px rgba(23, 63, 58, 0.16);
}

.hero::before,
.hero::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero::before {
  right: -130px;
  bottom: -230px;
  width: 580px;
  height: 580px;
}

.hero::after {
  right: 30px;
  bottom: -178px;
  width: 450px;
  height: 450px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(247, 241, 219, 0.68);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #efbb6e;
  box-shadow: 0 0 0 5px rgba(239, 187, 110, 0.1);
}

.hero h1 {
  margin: 18px 0 17px;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: clamp(38px, 4.6vw, 57px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.hero h1 span {
  position: relative;
  color: #f2c47e;
}

.hero h1 span::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(242, 196, 126, 0.78), transparent);
  content: "";
}

.hero-copy > p {
  max-width: 500px;
  margin-bottom: 28px;
  color: rgba(248, 246, 237, 0.68);
  font-size: 14px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hero-art {
  position: relative;
  z-index: 1;
  min-height: 265px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 52%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit::before {
  position: absolute;
  top: 11%;
  left: 14%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #edbb71;
  box-shadow: 0 0 0 5px rgba(237, 187, 113, 0.09);
  content: "";
}

.orbit-one {
  width: 260px;
  height: 260px;
}

.orbit-two {
  width: 360px;
  height: 360px;
  border-style: dashed;
  opacity: 0.55;
}

.goal-ring {
  --progress: 0deg;
  position: absolute;
  top: 50%;
  left: 52%;
  display: flex;
  width: 162px;
  height: 162px;
  padding: 8px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: conic-gradient(#f0c176 var(--progress), rgba(255, 255, 255, 0.1) 0);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%);
}

.goal-ring::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.goal-ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #19473f;
}

.goal-ring-inner span {
  font-family: "STSong", "Songti SC", serif;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
}

.goal-ring-inner small {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.floating-card {
  position: absolute;
  display: flex;
  min-width: 132px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.card-one {
  top: 23px;
  left: 1%;
  animation: float 5s ease-in-out infinite;
}

.card-two {
  right: -1%;
  bottom: 18px;
  animation: float 5s 1.6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.float-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: #f1c781;
  background: rgba(241, 199, 129, 0.12);
}

.float-icon.mint {
  color: #b9ddc8;
  background: rgba(185, 221, 200, 0.1);
}

.floating-card strong,
.floating-card small {
  display: block;
}

.floating-card strong {
  font-size: 14px;
}

.floating-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
}

.hero-spark {
  position: absolute;
  color: #e9ba70;
  font-size: 17px;
  animation: twinkle 3s ease-in-out infinite;
}

.spark-one {
  right: 9%;
  top: 7%;
}

.spark-two {
  left: 7%;
  bottom: 9%;
  font-size: 10px;
  animation-delay: 1.2s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.stats-grid {
  display: grid;
  margin: 20px 0 20px;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  display: flex;
  min-height: 95px;
  padding: 20px;
  border: 1px solid rgba(225, 221, 211, 0.9);
  border-radius: var(--radius-md);
  align-items: center;
  gap: 14px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
}

.stat-icon.sage { color: #547c65; background: #e6eee5; }
.stat-icon.sky { color: #4d7773; background: var(--sky); }
.stat-icon.peach { color: #a76a3a; background: var(--orange-soft); }
.stat-icon.lilac { color: #70628a; background: var(--lilac); }

.stat-card div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.stat-card strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
}

.stat-card small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 20px;
}

.panel {
  border: 1px solid rgba(225, 221, 211, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.chart-panel,
.recent-panel {
  min-height: 272px;
  padding: 25px 27px 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h3,
.preview-head h3 {
  margin: 5px 0 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.soft-badge {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 20px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
}

.soft-badge .icon {
  width: 14px;
  height: 14px;
}

.text-btn {
  display: inline-flex;
  padding: 4px 0;
  align-items: center;
  gap: 5px;
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.text-btn:hover {
  color: var(--green-dark);
}

.text-btn .icon {
  width: 14px;
  height: 14px;
}

.bar-chart {
  display: flex;
  height: 165px;
  margin-top: 19px;
  padding-top: 10px;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(8px, 2.2vw, 25px);
}

.chart-day {
  display: flex;
  height: 100%;
  min-width: 28px;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.chart-bar-wrap {
  position: relative;
  display: flex;
  width: min(100%, 33px);
  height: 118px;
  border-radius: 8px 8px 3px 3px;
  align-items: flex-end;
  background: #f1f0ea;
}

.chart-bar {
  position: relative;
  width: 100%;
  min-height: 3px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(to top, #2b6258, #4b897b);
  transition: height 500ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.chart-day.today .chart-bar {
  background: linear-gradient(to top, #dc8d4c, #f0b76f);
}

.chart-bar[data-value]::before {
  position: absolute;
  top: -21px;
  left: 50%;
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--green-dark);
  background: #edf1e9;
  content: attr(data-value);
  font-size: 8px;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 150ms ease;
}

.chart-bar:hover::before {
  opacity: 1;
}

.chart-day span {
  color: var(--muted);
  font-size: 9px;
}

.chart-day.today span {
  color: var(--green);
  font-weight: 700;
}

.recent-list {
  display: flex;
  margin-top: 18px;
  flex-direction: column;
  gap: 10px;
}

.recent-item {
  display: flex;
  width: 100%;
  padding: 10px;
  border-radius: 13px;
  align-items: center;
  gap: 11px;
  background: transparent;
  text-align: left;
  transition: background 150ms ease;
}

.recent-item:hover {
  background: var(--surface-soft);
}

.bank-mini-cover {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e4ede5;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
}

.recent-copy {
  min-width: 0;
  flex: 1;
}

.recent-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mini-play {
  display: inline-flex;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: var(--surface);
}

.mini-play .icon {
  width: 12px;
  height: 12px;
  margin-left: 1px;
}

.page-heading {
  display: flex;
  margin-bottom: 30px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-heading h2 {
  margin: 6px 0 8px;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(31px, 3.5vw, 43px);
  letter-spacing: -0.035em;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.bank-toolbar {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.search-box {
  display: flex;
  width: min(100%, 380px);
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.8);
}

.search-box:focus-within {
  border-color: rgba(28, 81, 72, 0.42);
  box-shadow: 0 0 0 4px rgba(28, 81, 72, 0.06);
}

.search-box input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  box-shadow: none;
}

.search-box .icon {
  width: 16px;
  height: 16px;
}

.result-count {
  color: var(--muted);
  font-size: 10px;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.bank-card {
  position: relative;
  overflow: hidden;
  min-height: 248px;
  padding: 23px;
  border: 1px solid rgba(225, 221, 211, 0.95);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bank-card:hover {
  border-color: #d8d4c8;
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.bank-card::before {
  position: absolute;
  top: -55px;
  right: -45px;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: var(--card-tint, #e8eee6);
  content: "";
  opacity: 0.85;
}

.bank-card::after {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(28, 81, 72, 0.07);
  border-radius: 50%;
  content: "";
}

.bank-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.bank-cover {
  display: inline-flex;
  width: 46px;
  height: 54px;
  border-radius: 8px 12px 12px 8px;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--green));
  background: var(--card-tint, #e8eee6);
  box-shadow: inset 3px 0 rgba(255, 255, 255, 0.4);
  font-family: "STSong", "Songti SC", serif;
  font-size: 20px;
  font-weight: 700;
}

.card-menu-wrap {
  position: relative;
}

.card-menu {
  position: absolute;
  z-index: 5;
  top: 36px;
  right: 0;
  display: none;
  width: max-content;
  min-width: 125px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.card-menu.open {
  display: block;
}

.card-menu button {
  display: flex;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  text-align: left;
}

.card-menu button:hover {
  background: var(--surface-soft);
}

.card-menu button.danger {
  color: var(--red);
}

.card-menu .icon {
  width: 14px;
  height: 14px;
}

.bank-card h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 47px;
  margin: 17px 0 7px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-family: "STSong", "Songti SC", serif;
  font-size: 20px;
  line-height: 1.25;
}

.bank-card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.bank-card-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #bdc4c0;
}

.bank-tags {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 5px;
}

.bank-tags span {
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--card-accent, var(--green));
  background: var(--card-tint, #e8eee6);
  font-size: 8px;
  font-weight: 600;
}

.bank-progress {
  margin: 19px 0 17px;
}

.bank-progress-copy {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.bank-progress-copy strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.mini-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: #eeece5;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--card-accent, var(--green));
}

.bank-card-actions {
  display: flex;
  gap: 9px;
}

.bank-card-actions .btn {
  min-height: 37px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 10px;
}

.bank-card-actions .btn-primary {
  flex: 1;
}

.bank-card-actions .icon {
  width: 14px;
  height: 14px;
}

.empty-state {
  display: flex;
  min-height: 390px;
  padding: 30px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-illustration {
  display: inline-flex;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border-radius: 23px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e8eee6;
  transform: rotate(-5deg);
}

.empty-illustration .icon {
  width: 30px;
  height: 30px;
}

.empty-state h3 {
  margin-bottom: 7px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 23px;
}

.empty-state p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
}

.empty-recent {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-recent p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.import-heading {
  align-items: flex-start;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 0;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.back-link:hover {
  color: var(--green);
}

.back-link .icon {
  width: 15px;
  height: 15px;
}

.import-step {
  display: flex;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.68);
  font-size: 9px;
  white-space: nowrap;
}

.import-step span {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #e8ece5;
  font-size: 9px;
  font-weight: 700;
}

.import-step span:first-child {
  color: white;
  background: var(--green);
}

.import-step em {
  width: 13px;
  height: 1px;
  background: var(--line-strong);
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
  gap: 20px;
}

.import-panel {
  overflow: hidden;
}

.source-tabs {
  display: flex;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  gap: 25px;
}

.source-tab {
  position: relative;
  display: flex;
  min-height: 58px;
  padding: 0 2px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.source-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  content: "";
}

.source-tab.active {
  color: var(--green);
}

.source-tab.active::after {
  background: var(--green);
}

.source-tab .icon {
  width: 16px;
  height: 16px;
}

.source-pane {
  display: none;
  min-height: 375px;
  padding: 27px;
}

.source-pane.active {
  display: block;
}

.dropzone {
  display: flex;
  min-height: 245px;
  padding: 28px;
  border: 1.5px dashed #cfd4cb;
  border-radius: 18px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 0%, rgba(227, 236, 224, 0.5), transparent 12rem),
    #faf9f4;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: #7ca097;
  background: #f5f8f2;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.drop-icon {
  display: inline-flex;
  width: 53px;
  height: 53px;
  margin-bottom: 17px;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e2ebe2;
  box-shadow: 0 8px 22px rgba(28, 81, 72, 0.08);
}

.drop-icon .icon {
  width: 23px;
  height: 23px;
}

.dropzone strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
}

.dropzone p {
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 10px;
}

.file-types {
  display: flex;
  gap: 6px;
}

.file-types b {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-size: 8px;
  font-weight: 650;
}

.selected-files {
  display: flex;
  margin-top: 12px;
  flex-direction: column;
  gap: 8px;
}

.selected-file {
  display: flex;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: center;
  gap: 9px;
  background: var(--surface-soft);
  font-size: 10px;
}

.selected-file .icon {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.selected-file span {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file small {
  color: var(--muted);
}

.selected-file button {
  display: inline-flex;
  padding: 3px;
  color: var(--muted);
  background: transparent;
}

.field-label,
.field > span {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.large-textarea {
  width: 100%;
  min-height: 245px;
  padding: 18px;
  border-radius: 15px;
  background: #fbfaf5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.8;
}

.textarea-footer {
  display: flex;
  margin-top: 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.quick-grid {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
}

.field {
  display: block;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
}

.field textarea {
  min-height: 86px;
}

.quick-options {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.image-import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.image-import-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #faf9f4;
}

.image-import-head {
  display: flex;
  min-height: 34px;
  margin-bottom: 10px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.image-import-head strong,
.image-import-head span {
  display: block;
}

.image-import-head strong {
  font-size: 11px;
}

.image-import-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.image-remove {
  display: inline-flex;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface);
}

.image-remove:hover {
  color: var(--red);
  background: var(--red-soft);
}

.image-remove .icon {
  width: 13px;
  height: 13px;
}

.image-upload-box {
  display: flex;
  width: 100%;
  min-height: 190px;
  padding: 10px;
  overflow: hidden;
  border: 1.5px dashed #cfd4cb;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 0, rgba(227, 236, 224, 0.5), transparent 9rem),
    #fffdf8;
  transition: border-color 150ms ease, background 150ms ease;
}

.image-upload-box:hover {
  border-color: #7ca097;
  background: #f5f8f2;
}

.image-upload-box img {
  display: block;
  width: 100%;
  max-height: 250px;
  border-radius: 8px;
  object-fit: contain;
}

.image-upload-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
}

.drop-icon.compact {
  width: 42px;
  height: 42px;
  margin-bottom: 11px;
  border-radius: 12px;
}

.drop-icon.compact .icon {
  width: 19px;
  height: 19px;
}

.image-upload-placeholder strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.image-upload-placeholder small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.image-file-meta {
  display: block;
  min-height: 14px;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-copy-grid {
  grid-template-columns: 1fr 1.35fr;
}

.image-mode-note {
  display: flex;
  margin: 14px 0;
  padding: 12px 13px;
  border: 1px solid #dce6dd;
  border-radius: 10px;
  align-items: flex-start;
  gap: 9px;
  color: #547164;
  background: #f1f6f0;
  font-size: 9px;
  line-height: 1.65;
}

.image-mode-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.option-field {
  position: relative;
}

.option-field span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  display: flex;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e7eee7;
  font-size: 9px;
  transform: translateY(-50%);
}

.option-field input {
  padding-left: 43px;
}

.import-action-row {
  display: flex;
  margin-top: 17px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-action-row > span {
  color: var(--muted);
  font-size: 9px;
}

.import-aside {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.format-card,
.help-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.75);
}

.format-card {
  background:
    radial-gradient(circle at 100% 0, rgba(231, 203, 158, 0.22), transparent 9rem),
    var(--surface);
}

.format-card-icon {
  display: inline-flex;
  width: 37px;
  height: 37px;
  margin-bottom: 14px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: #9b6d39;
  background: #f5e7d0;
}

.format-card-icon .icon {
  width: 18px;
  height: 18px;
}

.format-card h3,
.help-card h3 {
  margin: 0 0 8px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 17px;
}

.format-card p,
.help-card p,
.help-card li {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.format-card p {
  margin-bottom: 14px;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
}

.help-card ul {
  margin: 8px 0 11px;
  padding-left: 16px;
}

.help-card li {
  margin-bottom: 4px;
}

.help-card li b {
  color: var(--ink-soft);
  font-weight: 650;
}

.help-card code {
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--green);
  background: #e9eee8;
  font-size: 8px;
}

.help-card .help-tip {
  margin: 0;
}

.preview-panel {
  margin-top: 20px;
  padding: 27px;
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.preview-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.import-name-row {
  display: grid;
  margin: 20px 0;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 13px;
}

.preview-list {
  display: flex;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
  flex-direction: column;
  gap: 9px;
}

.preview-question {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf5;
}

.preview-question-head {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  gap: 8px;
}

.preview-number {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e7eee7;
  font-size: 8px;
  font-weight: 700;
}

.preview-question h4 {
  margin: 0;
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.preview-question .type-badge {
  min-height: 20px;
  padding: 0 7px;
  font-size: 8px;
}

.preview-options {
  display: flex;
  margin: 7px 0 0 30px;
  flex-wrap: wrap;
  gap: 5px 16px;
  color: var(--muted);
  font-size: 9px;
}

.preview-image-grid {
  display: grid;
  margin: 9px 0 0 30px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 9px;
}

.preview-image-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.preview-image-item span {
  display: block;
  padding: 6px 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 8px;
}

.preview-image-item img {
  display: block;
  width: 100%;
  height: 125px;
  object-fit: contain;
}

.preview-image-note {
  margin: 8px 0 0 30px;
  color: var(--muted);
  font-size: 9px;
}

.preview-answer {
  margin: 8px 0 0 30px;
  color: #256a58;
  font-size: 9px;
}

.preview-answer b {
  margin-right: 4px;
}

.preview-footer {
  display: flex;
  margin-top: 20px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.parse-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #47745d;
  font-size: 9px;
}

.parse-note .icon {
  width: 15px;
  height: 15px;
}

.compact-select {
  height: 42px;
  padding: 0 34px 0 13px;
  border-radius: 11px;
  color: var(--ink-soft);
  background-color: rgba(255, 253, 248, 0.8);
  font-size: 10px;
}

.wrong-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wrong-item {
  display: grid;
  padding: 19px 21px;
  border: 1px solid var(--line);
  border-radius: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  background: rgba(255, 253, 248, 0.84);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.wrong-item:hover {
  border-color: #d3d1c5;
  box-shadow: var(--shadow-sm);
}

.wrong-index {
  display: inline-flex;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  color: #a4574c;
  background: var(--red-soft);
  font-size: 9px;
  font-weight: 700;
}

.wrong-copy h4 {
  margin: 2px 0 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.wrong-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  color: var(--muted);
  font-size: 9px;
}

.wrong-meta b {
  color: #377060;
  font-weight: 650;
}

.wrong-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wrong-actions .icon-btn {
  width: 34px;
  height: 34px;
}

.wrong-actions .icon {
  width: 15px;
  height: 15px;
}

.sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  align-items: start;
  gap: 20px;
}

.sync-main-panel {
  padding: clamp(23px, 3.5vw, 34px);
}

.sync-code-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.sync-code-head h3 {
  margin: 6px 0 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
}

.sync-status {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9px;
  white-space: nowrap;
}

.sync-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b2b7b1;
}

.sync-status.ready {
  color: #3e745c;
  background: #edf5ed;
}

.sync-status.ready i {
  background: #5b9b70;
  box-shadow: 0 0 0 4px rgba(91, 155, 112, 0.1);
}

.sync-status.error {
  color: var(--red);
  background: var(--red-soft);
}

.sync-status.error i {
  background: var(--red);
}

.sync-code-row {
  display: flex;
  margin-top: 24px;
  gap: 9px;
}

.sync-code-input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border-radius: 11px;
  background: #fbfaf5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sync-security-note {
  display: flex;
  margin: 12px 0 25px;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.sync-security-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #568a68;
}

.sync-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.sync-action-card {
  display: flex;
  min-height: 85px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  align-items: center;
  gap: 11px;
  background: var(--surface-soft);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.sync-action-card:hover {
  border-color: #c9d5cc;
  background: #f6f8f2;
  transform: translateY(-1px);
}

.sync-action-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.sync-action-card strong,
.sync-action-card small {
  display: block;
}

.sync-action-card strong {
  font-size: 11px;
}

.sync-action-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.sync-action-card .arrow {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.sync-meta-grid {
  display: grid;
  margin-top: 20px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sync-meta-grid span,
.sync-meta-grid strong {
  display: block;
}

.sync-meta-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
}

.sync-meta-grid strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-message {
  min-height: 17px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.sync-message.error {
  color: var(--red);
}

.sync-message.success {
  color: #3f7a5c;
}

.sync-help-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(222, 235, 219, 0.75), transparent 12rem),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.sync-help-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e4ede5;
}

.sync-help-icon .icon {
  width: 19px;
  height: 19px;
}

.sync-help-card h3 {
  margin: 0 0 14px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
}

.sync-help-card ul {
  margin: 0 0 18px;
  padding-left: 15px;
}

.sync-help-card li {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.sync-help-card > p {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

.wrong-item.expanded {
  border-color: #c8d5ce;
  box-shadow: var(--shadow-sm);
}

.wrong-review-panel {
  grid-column: 2 / -1;
  margin-top: 2px;
  padding: 17px 18px;
  border: 1px solid #dce4da;
  border-radius: 13px;
  background: #f8faf5;
  animation: feedback-in 220ms ease both;
}

.wrong-review-label {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--green);
  background: #e4ede5;
  font-size: 8px;
  font-weight: 700;
}

.wrong-review-answer {
  margin-bottom: 7px;
  color: #326e58;
  font-size: 10px;
  line-height: 1.7;
}

.wrong-review-explanation {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.85;
  white-space: pre-line;
}

.wrong-review-images {
  display: grid;
  margin-top: 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.wrong-review-images img {
  display: block;
  width: 100%;
  max-height: 260px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}

.self-assessment {
  display: flex;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid #e1e6dd;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.self-assessment > span {
  color: var(--muted);
  font-size: 9px;
}

.self-assessment-actions {
  display: flex;
  gap: 8px;
}

.self-assessment-actions button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 650;
}

.assess-correct {
  color: #fff;
  background: #4d8064;
}

.assess-wrong {
  border: 1px solid #e2c8c2;
  color: #a3544a;
  background: #fdf4f2;
}

.practice-topbar {
  display: flex;
  margin-bottom: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.practice-topbar .back-link {
  margin: 0;
}

.practice-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
}

.mini-mark {
  display: inline-block;
  width: 12px;
  height: 15px;
  border-radius: 3px;
  background: var(--green);
  box-shadow: inset 3px 0 #f0bd72;
}

.timer {
  display: flex;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.timer .icon {
  width: 14px;
  height: 14px;
}

.practice-progress-row {
  display: flex;
  margin: 0 auto 20px;
  max-width: 810px;
  align-items: center;
  gap: 17px;
}

.practice-progress-copy {
  display: flex;
  min-width: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.practice-progress-copy strong {
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 20px;
  background: #e3e4dc;
  flex: 1;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2a665a, #6b9d7d);
  transition: width 300ms ease;
}

.practice-stage {
  max-width: 810px;
  margin: 0 auto;
}

.question-card {
  padding: clamp(26px, 4.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(34, 53, 46, 0.09);
}

.question-meta {
  display: flex;
  margin-bottom: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.type-badge {
  display: inline-flex;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  align-items: center;
  color: var(--green);
  background: #e6eee6;
  font-size: 9px;
  font-weight: 700;
}

.question-hint {
  color: #9ba49f;
  font-size: 9px;
}

.question-stem {
  margin-bottom: 28px;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.question-image-wrap {
  margin: -6px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(45deg, #f4f3ee 25%, transparent 25%),
    linear-gradient(-45deg, #f4f3ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4f3ee 75%),
    linear-gradient(-45deg, transparent 75%, #f4f3ee 75%),
    #fbfaf6;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.question-image-wrap img {
  display: block;
  width: 100%;
  max-height: 66vh;
  object-fit: contain;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-option {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 12px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  align-items: center;
  gap: 13px;
  background: #fbfaf6;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.answer-option:hover:not(.disabled) {
  border-color: #b9c8c1;
  background: #f8faf5;
  transform: translateX(2px);
}

.answer-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option-key {
  display: inline-flex;
  width: 29px;
  height: 29px;
  border: 1px solid #d9dcd4;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  background: var(--surface);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.option-text {
  font-size: 12px;
  line-height: 1.55;
}

.answer-option.selected {
  border-color: #7ba294;
  background: #edf4ed;
}

.answer-option.selected .option-key {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.answer-option.correct {
  border-color: #73a482;
  background: #edf6ee;
}

.answer-option.correct .option-key {
  border-color: #4d8960;
  color: #fff;
  background: #4d8960;
}

.answer-option.wrong {
  border-color: #d69a90;
  background: #fbf0ee;
}

.answer-option.wrong .option-key {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.answer-option.disabled {
  cursor: default;
}

.fill-answer-wrap {
  margin-top: 2px;
}

.fill-answer-wrap input {
  width: 100%;
  min-height: 56px;
  padding: 0 17px;
  border-radius: 13px;
  background: #fbfaf6;
  font-size: 13px;
}

.fill-answer-wrap input:disabled {
  color: var(--ink);
}

.fill-answer-wrap input.wrong {
  border-color: #d69a90;
  color: #9d4f46;
  background: #fbf0ee;
}

.feedback {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #cfe0d3;
  border-radius: 14px;
  background: #f1f7f1;
  animation: feedback-in 260ms ease both;
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback.is-wrong {
  border-color: #ead0cb;
  background: #fbf2f0;
}

.feedback-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.feedback-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #4c8c61;
}

.feedback.is-wrong .feedback-icon {
  background: var(--red);
}

.feedback-icon .icon {
  width: 14px;
  height: 14px;
}

.feedback-answer {
  margin: 12px 0 0 34px;
  color: #346f50;
  font-size: 10px;
  line-height: 1.65;
}

.feedback.is-wrong .feedback-answer {
  color: #9d4f46;
}

.feedback-explanation {
  margin: 7px 0 0 34px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.feedback-explanation:empty {
  display: none;
}

.feedback-image-wrap {
  margin: 13px 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(76, 140, 97, 0.2);
  border-radius: 11px;
  background: #fff;
}

.feedback-image-wrap img {
  display: block;
  width: 100%;
  max-height: 56vh;
  object-fit: contain;
}

.feedback.is-image {
  border-color: #d9e2d9;
  background: #f5f8f3;
}

.feedback.is-image .feedback-icon {
  color: var(--green);
  background: #dce9dd;
}

.question-actions {
  display: flex;
  margin-top: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.keyboard-tip {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9ca5a0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.keyboard-tip::before {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  content: "Enter";
}

.keyboard-tip span {
  font-family: var(--font);
}

.result-stage {
  max-width: 760px;
  margin: 30px auto 0;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 235, 221, 0.6), transparent 18rem),
    var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.result-burst span {
  position: absolute;
  color: #e3a55c;
  font-size: 12px;
}

.result-burst span:nth-child(1) { top: 14%; left: 16%; }
.result-burst span:nth-child(2) { top: 26%; right: 14%; font-size: 19px; }
.result-burst span:nth-child(3) { right: 22%; bottom: 26%; font-size: 9px; }

.result-ring {
  display: flex;
  width: 136px;
  height: 136px;
  margin: 0 auto 24px;
  padding: 8px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: conic-gradient(#4d836d var(--result-progress, 0deg), #e5e9e1 0);
}

.result-ring > div {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--surface);
}

.result-ring strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 31px;
}

.result-ring span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.result-card h2 {
  margin: 10px 0 8px;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(26px, 3.4vw, 35px);
}

.result-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.result-stats {
  display: grid;
  margin: 28px auto;
  max-width: 570px;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.result-stats div {
  padding: 15px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.result-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
}

.result-stats strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
}

.result-stats small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 8px;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.modal {
  width: min(calc(100vw - 32px), 690px);
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(218, 214, 203, 0.9);
  border-radius: 24px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(17, 35, 31, 0.46);
  backdrop-filter: blur(4px);
}

.modal[open] {
  animation: modal-in 180ms ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  padding: 25px 27px 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-head h2 {
  margin: 5px 0 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.setup-content {
  padding: 0 27px 24px;
}

.setup-content fieldset {
  margin: 0 0 21px;
  padding: 0;
  border: 0;
}

.setup-content legend,
.count-row label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.mode-card {
  position: relative;
  display: flex;
  min-height: 117px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  align-items: flex-start;
  flex-direction: column;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.mode-card input {
  position: absolute;
  opacity: 0;
}

.mode-card.selected {
  border-color: #83a89a;
  background: #eef4ee;
  box-shadow: inset 0 0 0 1px rgba(28, 81, 72, 0.05);
}

.mode-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  background: #e3ece4;
}

.mode-icon .icon {
  width: 15px;
  height: 15px;
}

.mode-card strong {
  margin-bottom: 4px;
  font-size: 11px;
}

.mode-card small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.count-row {
  display: flex;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.count-row label {
  margin-bottom: 4px;
  color: var(--ink);
}

.count-row p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.number-input {
  display: flex;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 9px;
  align-items: center;
  overflow: hidden;
}

.number-input button {
  width: 33px;
  height: 100%;
  color: var(--green);
  background: var(--surface-soft);
  font-size: 16px;
}

.number-input input {
  width: 46px;
  height: 100%;
  padding: 0;
  border: 0;
  border-width: 0 1px;
  border-radius: 0;
  background: white;
  font-size: 11px;
  text-align: center;
  box-shadow: none;
  -moz-appearance: textfield;
}

.number-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.switch-row {
  display: flex;
  padding: 15px 0 1px;
  border-top: 1px solid var(--line);
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.switch-row > span {
  flex: 1;
}

.switch-row strong,
.switch-row small {
  display: block;
}

.switch-row strong {
  font-size: 10px;
}

.switch-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch-row i {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 20px;
  background: #d7d9d3;
  transition: background 150ms ease;
}

.switch-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
  content: "";
  transition: transform 150ms ease;
}

.switch-row input:checked + i {
  background: var(--green);
}

.switch-row input:checked + i::after {
  transform: translateX(16px);
}

.modal-footer {
  display: flex;
  padding: 18px 27px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 9px;
  background: var(--surface-soft);
}

.preview-bank-modal {
  width: min(calc(100vw - 32px), 820px);
}

.modal-search {
  display: flex;
  padding: 0 27px 18px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.modal-search .search-box {
  flex: 1;
}

.modal-search .btn {
  min-height: 42px;
}

.question-browser {
  display: flex;
  max-height: 56vh;
  overflow: auto;
  padding: 16px 27px 25px;
  flex-direction: column;
  gap: 9px;
}

.browser-question {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf6;
}

.browser-question-top {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  gap: 8px;
}

.browser-question h4 {
  margin: 0;
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.browser-question p {
  margin: 6px 0 0 31px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.browser-answer {
  color: #39705e !important;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 78px;
  display: flex;
  min-width: 220px;
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  align-items: center;
  gap: 10px;
  color: white;
  background: #173f3a;
  box-shadow: var(--shadow-lg);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #163b35;
  background: #d9e9d9;
}

.toast-icon .icon {
  width: 13px;
  height: 13px;
}

body.menu-open::after {
  position: fixed;
  z-index: 25;
  inset: 0;
  background: rgba(22, 40, 35, 0.34);
  content: "";
}

@media (max-width: 1180px) {
  .bank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    width: 238px;
    box-shadow: var(--shadow-lg);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    height: 64px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(220, 217, 207, 0.8);
    align-items: center;
    justify-content: space-between;
    background: rgba(244, 243, 237, 0.9);
    backdrop-filter: blur(14px);
  }

  .brand.compact {
    gap: 8px;
  }

  .brand.compact .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .brand.compact .brand-name {
    font-size: 21px;
  }

  .main {
    margin-left: 0;
  }

  .page-wrap {
    padding-top: 28px;
  }

  .topbar {
    margin-top: 2px;
  }
}

@media (max-width: 800px) {
  .hero {
    min-height: 570px;
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 230px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .import-layout {
    grid-template-columns: 1fr;
  }

  .import-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sync-layout {
    grid-template-columns: 1fr;
  }

  .import-step {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-wrap {
    padding: 22px 15px 60px;
  }

  .topbar h2 {
    font-size: 23px;
  }

  .topbar-import {
    width: 42px;
    min-height: 42px;
    padding: 0;
    font-size: 0;
  }

  .hero {
    min-height: 550px;
    padding: 30px 25px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-copy > p {
    font-size: 12px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    min-height: 44px;
    padding: 0 15px;
    font-size: 11px;
  }

  .hero-art {
    min-height: 225px;
  }

  .orbit-one {
    width: 225px;
    height: 225px;
  }

  .orbit-two {
    width: 310px;
    height: 310px;
  }

  .goal-ring {
    width: 140px;
    height: 140px;
  }

  .goal-ring-inner span {
    font-size: 39px;
  }

  .floating-card {
    min-width: 115px;
    padding: 10px;
  }

  .card-one {
    top: 2px;
  }

  .card-two {
    right: 0;
    bottom: 0;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    min-height: 83px;
    padding: 14px;
    gap: 10px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .chart-panel,
  .recent-panel {
    padding: 20px 18px;
  }

  .page-heading {
    margin-bottom: 23px;
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h2 {
    font-size: 32px;
  }

  .bank-grid {
    grid-template-columns: 1fr;
  }

  .bank-card {
    min-height: 230px;
  }

  .bank-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .result-count {
    align-self: flex-end;
  }

  .import-heading .back-link {
    margin-bottom: 17px;
  }

  .source-tabs {
    padding: 0 15px;
    gap: 17px;
  }

  .source-tab {
    font-size: 10px;
  }

  .source-pane {
    min-height: 360px;
    padding: 17px;
  }

  .dropzone {
    min-height: 245px;
  }

  .import-aside {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .quick-options {
    grid-template-columns: 1fr;
  }

  .image-import-grid {
    grid-template-columns: 1fr;
  }

  .image-upload-box {
    min-height: 165px;
  }

  .import-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-action-row .btn {
    width: 100%;
  }

  .preview-panel {
    padding: 20px 17px;
  }

  .import-name-row {
    grid-template-columns: 1fr;
  }

  .preview-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .wrong-item {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 16px;
  }

  .wrong-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .wrong-review-panel {
    grid-column: 1 / -1;
    padding: 15px;
  }

  .self-assessment {
    align-items: stretch;
    flex-direction: column;
  }

  .self-assessment-actions {
    flex-direction: column;
  }

  .preview-image-grid {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .practice-topbar {
    margin-bottom: 22px;
  }

  .practice-brand {
    display: none;
  }

  .practice-progress-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .practice-progress-copy {
    width: 100%;
  }

  .progress-track {
    width: 100%;
  }

  .question-card {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .question-stem {
    margin-bottom: 22px;
    font-size: 22px;
  }

  .question-hint {
    display: none;
  }

  .answer-option {
    padding: 12px 13px;
  }

  .question-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .question-actions .btn {
    width: 100%;
  }

  .feedback-image-wrap {
    margin-left: 0;
  }

  .result-card {
    padding: 30px 18px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-actions .btn {
    width: 100%;
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .modal-head,
  .setup-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .modal-footer {
    padding: 15px 18px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 85px;
    padding-left: 54px;
  }

  .mode-icon {
    position: absolute;
    top: 14px;
    left: 13px;
  }

  .modal-search {
    padding-right: 18px;
    padding-left: 18px;
    flex-direction: column;
  }

  .question-browser {
    padding-right: 18px;
    padding-left: 18px;
  }

  .toast {
    right: 15px;
    bottom: 72px;
    left: 15px;
  }

  .sync-code-row {
    flex-wrap: wrap;
  }

  .sync-code-input {
    flex-basis: 100%;
  }

  .sync-actions-grid,
  .sync-meta-grid {
    grid-template-columns: 1fr;
  }

}

/* UA profiles are applied explicitly so phones and tablets remain distinct,
   even when their CSS viewport width falls outside the usual breakpoints. */
body.device-tablet {
  --sidebar-width: 96px;
}

body.device-tablet .sidebar {
  width: 96px;
  padding: 24px 10px 18px;
  box-shadow: none;
  transform: none;
}

body.device-tablet .brand {
  margin: 0 auto;
}

body.device-tablet .brand-name {
  display: none;
}

body.device-tablet .side-nav {
  margin-top: 34px;
  gap: 7px;
}

body.device-tablet .nav-item {
  position: relative;
  min-height: 62px;
  padding: 8px 4px;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  font-size: 9px;
  text-align: center;
}

body.device-tablet .nav-item.active::before {
  left: -10px;
}

body.device-tablet .nav-item .icon {
  width: 20px;
  height: 20px;
}

body.device-tablet .nav-count {
  position: absolute;
  top: 4px;
  right: 5px;
  min-width: 17px;
  padding: 1px 4px;
  font-size: 8px;
}

body.device-tablet .sidebar-note {
  padding: 11px 5px;
  justify-content: center;
}

body.device-tablet .sidebar-note > div:last-child {
  display: none;
}

body.device-tablet .local-dot {
  margin-top: 0;
}

body.device-tablet .sidebar-footer {
  padding: 0 2px;
  align-items: center;
  font-size: 7px;
  text-align: center;
}

body.device-tablet .main {
  margin-left: 96px;
}

body.device-tablet .mobile-header {
  display: none;
}

body.device-tablet .page-wrap {
  padding: 32px 26px 64px;
}

body.device-tablet .hero {
  min-height: 570px;
  grid-template-columns: 1fr;
}

body.device-tablet .hero h1 {
  font-size: 44px;
}

body.device-tablet .hero-art {
  min-height: 240px;
}

body.device-tablet .stats-grid,
body.device-tablet .bank-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-tablet .dashboard-grid,
body.device-tablet .import-layout,
body.device-tablet .sync-layout {
  grid-template-columns: 1fr;
}

body.device-tablet .import-aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

body.device-tablet .page-heading h2 {
  font-size: 35px;
}

@media (min-width: 900px) {
  body.device-tablet .hero {
    min-height: 380px;
    grid-template-columns: 1.05fr 0.95fr;
  }

  body.device-tablet .hero h1 {
    font-size: 46px;
  }

  body.device-tablet .hero-art {
    min-height: 260px;
  }
}

body.device-mobile {
  --sidebar-width: 0px;
}

body.device-mobile .sidebar {
  width: 238px;
  transform: translateX(-102%);
}

body.device-mobile .sidebar.mobile-open {
  transform: translateX(0);
}

body.device-mobile .mobile-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(220, 217, 207, 0.8);
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 243, 237, 0.9);
  backdrop-filter: blur(14px);
}

body.device-mobile .brand.compact {
  gap: 8px;
}

body.device-mobile .brand.compact .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

body.device-mobile .brand.compact .brand-name {
  display: inline;
  font-size: 21px;
}

body.device-mobile .main {
  margin-left: 0;
}

body.device-mobile .page-wrap {
  padding: 22px 15px 60px;
}

body.device-mobile .hero {
  min-height: 550px;
  padding: 30px 25px;
  grid-template-columns: 1fr;
}

body.device-mobile .hero h1 {
  font-size: 38px;
}

body.device-mobile .hero-art {
  min-height: 225px;
}

body.device-mobile .stats-grid,
body.device-mobile .bank-grid,
body.device-mobile .dashboard-grid,
body.device-mobile .import-layout,
body.device-mobile .sync-layout,
body.device-mobile .import-aside {
  grid-template-columns: 1fr;
}

/* Readability scale: keep body copy at 13-14px and utility text at no less
   than 11px, while preserving the denser tablet navigation rail. */
body {
  font-size: 14px;
  line-height: 1.55;
}

.btn {
  font-size: 13px;
}

.sidebar-note strong {
  font-size: 13px;
}

.sidebar-note span,
.date-line,
.soft-badge,
.text-btn,
.result-count,
.parse-note,
.page-heading p,
.panel-head .text-btn {
  font-size: 11px;
}

.sidebar-footer {
  font-size: 11px;
  line-height: 1.7;
}

body.device-tablet .sidebar-footer {
  font-size: 7px;
}

.eyebrow,
.section-kicker {
  font-size: 12px;
}

.hero-copy > p {
  font-size: 15px;
  line-height: 1.9;
}

.goal-ring-inner small,
.floating-card small,
.stat-card div > span,
.stat-card small {
  font-size: 10px;
}

.floating-card strong,
.recent-copy strong {
  font-size: 14px;
}

.recent-copy span,
.chart-day span {
  font-size: 11px;
}

.bank-card-meta {
  flex-wrap: wrap;
  row-gap: 6px;
  font-size: 11px;
  line-height: 1.55;
}

.bank-tags span {
  padding: 5px 8px;
  font-size: 10px;
}

.bank-progress-copy {
  font-size: 11px;
}

.bank-card-actions .btn {
  min-height: 40px;
  font-size: 11px;
}

.empty-state p,
.back-link,
.source-tab,
.selected-file,
.field input,
.field textarea,
.field select {
  font-size: 12px;
}

.dropzone p,
.large-textarea {
  font-size: 13px;
}

.file-types b,
.option-field span {
  font-size: 10px;
}

.field-label,
.field > span,
.textarea-footer,
.import-action-row > span {
  font-size: 11px;
}

.format-card p,
.help-card p,
.help-card li,
.preview-head p,
.preview-options,
.preview-answer,
.preview-image-note,
.import-step {
  font-size: 11px;
  line-height: 1.7;
}

.preview-question h4,
.browser-question h4 {
  font-size: 13px;
}

.preview-number,
.preview-question .type-badge {
  font-size: 10px;
}

.image-import-head strong {
  font-size: 13px;
}

.image-import-head span,
.image-upload-placeholder small,
.image-file-meta,
.image-mode-note {
  font-size: 11px;
  line-height: 1.6;
}

.image-upload-placeholder strong {
  font-size: 12px;
}

.wrong-index {
  font-size: 10px;
}

.wrong-copy h4 {
  font-size: 14px;
  line-height: 1.7;
}

.wrong-meta,
.wrong-review-label,
.self-assessment > span {
  font-size: 11px;
  line-height: 1.6;
}

.wrong-review-answer,
.wrong-review-explanation,
.browser-question p {
  font-size: 12px;
  line-height: 1.8;
}

.self-assessment-actions button {
  min-height: 40px;
  font-size: 11px;
}

.timer,
.practice-progress-copy,
.practice-progress-copy strong {
  font-size: 11px;
}

.type-badge,
.question-hint {
  font-size: 10px;
}

.option-key {
  font-size: 11px;
}

.option-text,
.fill-answer-wrap input {
  font-size: 14px;
}

.feedback-title {
  font-size: 13px;
}

.feedback-answer,
.feedback-explanation {
  font-size: 12px;
  line-height: 1.8;
}

.keyboard-tip {
  font-size: 10px;
}

.result-ring span,
.result-stats span {
  font-size: 11px;
}

.result-card > p {
  font-size: 13px;
  line-height: 1.75;
}

.result-stats small {
  font-size: 10px;
}

.modal-head p,
.setup-content legend,
.count-row label,
.count-row p,
.switch-row small {
  font-size: 11px;
}

.mode-card strong,
.switch-row strong {
  font-size: 12px;
}

.mode-card small {
  font-size: 10px;
  line-height: 1.6;
}

.toast {
  font-size: 13px;
}

.sync-status,
.sync-security-note,
.sync-message,
.sync-help-card li {
  font-size: 11px;
  line-height: 1.7;
}

.sync-action-card strong {
  font-size: 13px;
}

.sync-action-card small,
.sync-meta-grid span {
  font-size: 10px;
  line-height: 1.55;
}

.sync-meta-grid strong {
  font-size: 12px;
}

.sync-help-card > p {
  font-size: 10px;
  line-height: 1.7;
}

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