:root {
  --bg: #f4f6f2;
  --bg-soft: #eef3ef;
  --ink: #17202c;
  --muted: #617083;
  --line: #d7ded5;
  --border: #d7ded5;
  --panel: #ffffff;
  --panel-soft: #fbfdfb;
  --accent: #1d7f5b;
  --accent-dark: #126146;
  --accent-soft: #e7f5ee;
  --accent-tint: rgba(29, 127, 91, 0.12);
  --topbar: #26343f;
  --topbar-text: #f8fafc;
  --warn: #a95c00;
  --error: #b42318;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 44, 0.04);
  --shadow: 0 12px 32px rgba(23, 32, 44, 0.08);
  --shadow-strong: 0 22px 60px rgba(23, 32, 44, 0.14);
  --focus-ring: 0 0 0 3px rgba(29, 127, 91, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(29, 127, 91, 0.08), transparent 340px),
    linear-gradient(180deg, #f8faf7 0%, var(--bg) 48%, #eef2ed 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.login-screen {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 14% 14%, rgba(29, 127, 91, 0.14), transparent 310px),
    radial-gradient(circle at 88% 12%, rgba(177, 121, 32, 0.12), transparent 260px),
    linear-gradient(140deg, #f9fbf8 0%, #eef6f0 48%, #fff8eb 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 430px);
  align-items: stretch;
  width: min(960px, 100%);
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(29, 127, 91, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-strong);
}

.login-hero-panel {
  display: grid;
  align-content: space-between;
  gap: 30px;
  min-width: 0;
  padding: 34px;
  color: #f8fafc;
  background:
    linear-gradient(145deg, rgba(22, 102, 76, 0.96) 0%, rgba(27, 66, 81, 0.98) 64%, rgba(94, 80, 39, 0.94) 100%);
}

.login-card {
  display: grid;
  align-content: center;
  gap: 22px;
  min-width: 0;
  padding: 40px;
  background: rgba(255, 255, 255, 0.96);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.login-brand strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 19px;
  line-height: 1.2;
}

.login-hero-panel .section-kicker {
  color: #bcebd8;
}

.login-hero-copy {
  display: grid;
  gap: 14px;
  max-width: 460px;
}

.login-hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-hero-copy p {
  margin: 0;
  color: rgba(248, 250, 252, 0.82);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
}

.login-hero-quote {
  display: grid;
  gap: 10px;
  margin: 0;
  max-width: 460px;
  padding: 0;
  border: 0;
  background: transparent;
}

.login-hero-quote p {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0;
}

.login-hero-quote cite {
  color: rgba(248, 250, 252, 0.78);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.login-form input[type="tel"],
.login-form input[type="password"],
.login-form input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  outline: none;
}

.login-form input[type="tel"]:focus,
.login-form input[type="password"]:focus,
.login-form input[type="text"]:focus {
  border-color: rgba(29, 127, 91, 0.52);
  box-shadow: var(--focus-ring);
}

.login-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
}

.login-password-field input {
  min-width: 0;
}

.login-password-toggle {
  display: grid;
  place-items: center;
  justify-self: start;
  width: 32px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.login-password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.login-password-eye-off {
  display: none;
}

.login-password-toggle[aria-pressed="true"] .login-password-eye {
  display: none;
}

.login-password-toggle[aria-pressed="true"] .login-password-eye-off {
  display: block;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  background: rgba(29, 127, 91, 0.1);
  outline: none;
}

.login-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  padding: 13px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 28px rgba(29, 127, 91, 0.22);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.login-submit-button:hover,
.login-submit-button:focus-visible {
  background: linear-gradient(135deg, #24906a, #0f523c);
  box-shadow: var(--focus-ring), 0 16px 30px rgba(29, 127, 91, 0.24);
}

.login-error {
  margin: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #8a1f17;
  background: #fff0ee;
  font-size: 13px;
  font-weight: 800;
}

.login-version {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  width: min(960px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-footer a {
  color: inherit;
  text-decoration: none;
}

.login-footer a:hover,
.login-footer a:focus-visible {
  color: var(--accent-dark);
}

.shell-sidebar-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #22313d 0%, var(--topbar) 58%, #304452 100%);
  color: var(--topbar-text);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 28px rgba(23, 32, 44, 0.16);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--topbar-text);
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  padding: 0;
  cursor: pointer;
  user-select: none;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.daily-quote {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.daily-quote span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  width: min(1480px, calc(100vw - 48px));
  margin: 24px auto 64px;
  transition: grid-template-columns 0.2s ease;
}

.shell-sidebar-toggle:checked ~ .app-layout {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  overflow: hidden;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.side-nav a {
  display: block;
  padding: 11px 18px;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.side-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.side-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 12px 26px rgba(29, 127, 91, 0.2);
}

.nav-count {
  float: right;
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 7px;
  text-align: center;
  color: var(--accent-dark);
  background: #e4f6ee;
  font-size: 12px;
  font-weight: 900;
}

.side-nav a.active .nav-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-growth-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--line);
}

.sidebar-growth-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(226, 178, 73, 0.45);
  border-radius: 16px;
  padding: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1b2a22 0%, #114232 58%, #9d7a24 150%);
  box-shadow: 0 14px 28px rgba(16, 72, 53, 0.16);
  cursor: pointer;
}

.sidebar-growth-head img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.22));
}

.sidebar-growth-head small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.sidebar-growth-head strong {
  display: block;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.sidebar-growth-head em {
  color: #ffe7a3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.sidebar-growth-metrics {
  display: grid;
  gap: 7px;
}

.sidebar-growth-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  font-size: 12px;
}

.sidebar-growth-metric span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-growth-metric strong {
  color: var(--accent-dark);
  font-size: 11px;
}

.sidebar-growth-metric i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #e4ebe5;
}

.sidebar-growth-metric b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d8a738, #1d7f5b);
}

.challenge-sidebar {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.challenge-sidebar-title {
  padding: 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.challenge-sidebar p {
  padding: 0 10px;
  font-size: 13px;
}

.sidebar-session {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--line);
}

.sidebar-session span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-session button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--accent-dark);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.sidebar-session button:hover {
  border-color: rgba(29, 127, 91, 0.35);
  color: #fff;
  background: var(--accent);
}

.sidebar-session .sidebar-admin-button {
  background: var(--accent-soft);
}

.side-nav .challenge-progress-link {
  display: grid;
  gap: 6px;
  padding: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.challenge-progress-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-progress-link span {
  color: var(--muted);
  font-weight: 800;
}

.sidebar-progress,
.challenge-large-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e5eae4;
}

.sidebar-progress i,
.challenge-large-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.version-matrix {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 10px 2px;
  color: var(--muted);
}

.version-matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.version-matrix-head strong,
.version-stamp strong {
  color: var(--accent-dark);
}

.admin-page {
  display: grid;
  gap: 18px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f2faf6 100%);
}

.admin-hero h1,
.admin-create-panel h2 {
  margin: 0;
}

.admin-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-current-user {
  display: grid;
  gap: 4px;
  min-width: 180px;
  border: 1px solid rgba(29, 127, 91, 0.18);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}

.admin-current-user span,
.admin-current-user em,
.admin-create-panel p,
.admin-user-head span,
.admin-user-grid span,
.admin-user-actions span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.admin-current-user strong {
  font-size: 18px;
}

.admin-create-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 180px)) minmax(120px, 140px) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
}

.admin-create-panel input,
.admin-create-panel select,
.admin-user-card input[type="text"],
.admin-user-card input[type="password"],
.admin-user-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.admin-user-list {
  display: grid;
  gap: 14px;
}

.admin-user-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.admin-user-head,
.admin-user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-identity {
  display: grid;
  gap: 6px;
  width: min(620px, 100%);
}

.admin-user-head-fields {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}

.admin-header-password {
  display: grid;
  gap: 6px;
}

.admin-active-switch,
.admin-permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.admin-active-switch input,
.admin-permission-chip input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.admin-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.admin-user-grid label {
  display: grid;
  gap: 6px;
}

.admin-user-grid select {
  font-size: 13px;
  line-height: 1.2;
}

.admin-user-grid .admin-model-select {
  font-size: 12px;
  font-weight: 800;
}

.admin-password-field {
  position: relative;
}

.admin-password-field input {
  padding-right: 46px;
}

.admin-password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  cursor: pointer;
}

.admin-password-toggle:hover,
.admin-password-toggle:focus-visible {
  background: var(--accent-soft);
  outline: none;
  box-shadow: var(--focus-ring);
}

.admin-permission-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-permission-chip {
  border: 1px solid rgba(29, 127, 91, 0.16);
  border-radius: 999px;
  padding: 8px 11px;
  background: #f7fbf8;
  color: var(--accent-dark);
  font-size: 13px;
}

.admin-user-actions {
  padding-top: 4px;
}

.admin-notice {
  margin: 0;
}

.version-release,
.version-machine {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.version-matrix-list {
  display: grid;
  gap: 5px;
}

.version-matrix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f7faf7;
  font-size: 12px;
}

.version-matrix-row span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-matrix-row strong {
  color: var(--accent-dark);
  font-weight: 900;
}

.version-matrix-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.shell {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  margin: 0;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding: 18px 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.app-footer a {
  color: inherit;
  text-decoration: none;
}

.app-footer a:hover,
.app-footer a:focus-visible {
  color: var(--accent-dark);
}

.app-footer-version {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
}

.version-stamp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.version-stamp small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-page {
  display: grid;
  gap: 16px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: center;
  gap: 18px;
  padding: 26px;
  overflow: hidden;
  border-color: rgba(29, 127, 91, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 251, 247, 0.96) 58%, rgba(255, 248, 232, 0.95) 100%);
  box-shadow: var(--shadow);
}

.home-hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.home-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.home-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.home-hero-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.home-today-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 148px;
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--accent-dark);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(29, 127, 91, 0.1);
}

.home-today-card.is-correct {
  background: #e9f8ef;
}

.home-today-card.is-wrong {
  background: #fff1f0;
  color: #b42318;
  box-shadow: inset 0 0 0 1px rgba(203, 49, 49, 0.14);
}

.home-today-card.is-total {
  background: #fff8e8;
  color: #7a4c00;
  box-shadow: inset 0 0 0 1px rgba(177, 121, 32, 0.14);
}

.home-today-card span,
.home-today-card small {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-today-card strong {
  margin: 8px 0;
  font-size: 40px;
  line-height: 1.05;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.home-stat-card {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: start;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.home-stat-card:hover,
.home-stat-card:focus-visible {
  border-color: rgba(29, 127, 91, 0.32);
  color: #fff;
  background: linear-gradient(135deg, #1b7f5b, #0e4939);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.home-stat-card:hover span,
.home-stat-card:hover strong,
.home-stat-card:hover small,
.home-stat-card:focus-visible span,
.home-stat-card:focus-visible strong,
.home-stat-card:focus-visible small {
  color: #fff;
}

.home-stat-card span,
.home-stat-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-stat-card strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
}

.home-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: start;
}

.home-calendar {
  margin-bottom: 0;
}

.home-side-stack {
  display: grid;
  gap: 16px;
}

.home-upload-panel,
.home-wrong-panel {
  padding: 18px;
}

.home-wrong-strip {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.home-upload-panel h2,
.home-wrong-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.home-wrong-strip h2 {
  margin: 0;
}

.home-wrong-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.home-wrong-chips button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid rgba(203, 49, 49, 0.16);
  border-radius: 999px;
  padding: 8px 11px;
  color: #9f2f24;
  background: #fff8f7;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.home-wrong-chips button:hover,
.home-wrong-chips button:focus-visible {
  border-color: rgba(203, 49, 49, 0.24);
  color: #fff;
  background: #b42318;
  transform: translateY(-1px);
}

.home-wrong-chips strong {
  overflow: hidden;
  max-width: 130px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-wrong-chips span {
  flex: 0 0 auto;
  color: inherit;
  font-size: 12px;
}

.home-upload-form {
  display: grid;
  gap: 10px;
}

.home-upload-form input,
.home-upload-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff;
}

.home-upload-form button {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(29, 127, 91, 0.16);
}

.lists-tools-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(251, 253, 251, 0.92) 100%);
}

.lists-tool-card,
.tool-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  box-shadow: var(--shadow-sm);
}

.lists-import-heading,
.tool-card > div:first-child {
  display: grid;
  gap: 4px;
}

.lists-import-heading .section-kicker,
.lists-import-heading h2,
.lists-import-heading p,
.tool-card .section-kicker,
.tool-card h2,
.tool-card p {
  margin: 0;
}

.lists-import-heading p:not(.section-kicker),
.tool-card p:not(.section-kicker):not(.notice) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.lists-import-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
}

.batch-image-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
}

.lists-import-form > input[type="text"] {
  flex: 1 1 160px;
  min-width: 0;
}

.lists-import-form > input[type="file"],
.batch-image-form > input[type="file"] {
  flex: 1 1 180px;
  min-width: 0;
  height: 38px;
  line-height: 38px;
  padding: 6px 10px;
  align-self: center;
}

.lists-import-form > input[type="file"]::file-selector-button,
.batch-image-form > input[type="file"]::file-selector-button {
  height: 26px;
  margin: 0 8px 0 0;
  line-height: 1;
  vertical-align: middle;
}

.excel-file-picker,
.batch-image-file-picker {
  display: grid;
  place-items: center;
  flex: 1 1 180px;
  min-width: 0;
  min-height: 38px;
  padding: 5px 12px;
  border: 1px dashed rgba(23, 129, 91, 0.45);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfffc 0%, #f1faf5 100%);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.excel-file-picker:hover,
.excel-file-picker:focus-within,
.batch-image-file-picker:hover,
.batch-image-file-picker:focus-within {
  border-color: var(--accent);
  background: #eef8f3;
  box-shadow: var(--focus-ring);
}

.excel-file-picker input,
.batch-image-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.excel-file-picker span,
.batch-image-file-picker span {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.excel-file-picker small,
.batch-image-file-picker small {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lists-import-form > .list-picker-trigger,
.batch-image-form > .list-picker-trigger {
  flex: 1 1 160px;
  min-width: 0;
}

.lists-import-form button,
.batch-image-form button {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 0 18px;
}

.native-list-picker {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.home-upload-form .list-picker-trigger {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-upload-form .list-picker-trigger::after {
  content: "选择";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.list-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 31, 43, 0.52);
}

.list-picker-backdrop[hidden] {
  display: none;
}

.list-picker-modal {
  display: grid;
  gap: 14px;
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-strong);
}

.list-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.list-picker-head h2 {
  margin: 0 0 6px;
}

.list-picker-head p {
  margin: 0;
  color: var(--muted);
}

.list-picker-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
}

.list-picker-options {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: 420px;
  overflow: auto;
}

.list-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  font-weight: 800;
}

.list-picker-option:hover {
  border-color: var(--accent);
  background: #f0f8f4;
}

.list-picker-option input {
  width: 18px;
  height: 18px;
}

.list-picker-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
}

.list-picker-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.list-picker-actions span {
  margin-right: auto;
  color: var(--muted);
  font-weight: 800;
}

.list-picker-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.image-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 31, 43, 0.52);
}

.image-preview-backdrop[hidden] {
  display: none;
}

.image-preview-modal {
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(21, 31, 43, 0.28);
}

.image-preview-head,
.image-preview-toolbar,
.image-preview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-preview-head {
  justify-content: space-between;
}

.image-preview-head h2 {
  margin: 0 0 6px;
}

.image-preview-head p {
  margin: 0;
  color: var(--muted);
}

.image-preview-toolbar {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.image-preview-toolbar strong {
  margin-right: auto;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  min-height: 0;
  max-height: 480px;
  overflow: auto;
  padding-right: 4px;
}

.image-preview-card {
  position: relative;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
}

.image-preview-card input {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  z-index: 1;
}

.image-preview-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #edf2ee;
}

.image-preview-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31, 132, 91, 0.14);
}

.image-preview-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.image-preview-actions span {
  margin-right: auto;
  color: var(--muted);
  font-weight: 800;
}

.image-preview-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.batch-image-result {
  margin: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: #e4f6ee;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.batch-image-inline {
  display: grid;
  gap: 5px;
  min-width: 190px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.batch-image-inline input {
  max-width: 220px;
}

.preview-batch-image {
  grid-template-columns: auto auto;
  align-items: end;
  min-width: 220px;
}

.preview-batch-image > span {
  grid-column: 1 / -1;
}

.preview-batch-image input[type="file"] {
  display: none;
}

.preview-batch-image strong {
  overflow: hidden;
  max-width: 130px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-wrong-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.home-wrong-panel .section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
}

.home-wrong-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
}

.home-wrong-list a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff1f0;
  color: var(--error);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.home-wrong-list a:hover {
  background: #ffe3df;
}

.home-wrong-list strong {
  overflow: hidden;
  max-width: 120px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-wrong-list span {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  line-height: 1;
}

.home-wrong-list em {
  color: #b42318;
  font-style: normal;
  font-weight: 900;
}

.home-wrong-more {
  display: inline-block;
  margin: -4px 0 14px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}

.home-section-head h2 {
  margin: 0;
  font-size: 24px;
}

.home-news-grid,
.home-quote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-news-card,
.home-quote-card {
  display: block;
  min-height: 170px;
  color: inherit;
  text-decoration: none;
}

.home-news-card {
  overflow: hidden;
  padding: 0;
}

.home-news-body,
.home-quote-card {
  padding: 16px;
}

.home-news-image {
  overflow: hidden;
  background: #eef4f0;
  aspect-ratio: 16 / 10;
}

.home-news-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.18s ease;
}

.home-news-card:hover .home-news-image img {
  transform: scale(1.035);
}

.home-news-card h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.3;
}

.home-news-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.home-quote-card p {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.55;
}

.home-quote-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-list-grid {
  margin-bottom: 20px;
}

.list-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
}

.list-page-heading h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.list-page-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.newspaper-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
}

.newspaper-hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  letter-spacing: 0;
}

.newspaper-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.newspaper-kicker {
  margin-bottom: 6px !important;
  color: var(--accent) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.newspaper-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.newspaper-section {
  padding: 18px;
}

.newspaper-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
}

.newspaper-section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  letter-spacing: 0;
}

.newspaper-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.newspaper-list {
  display: grid;
  gap: 12px;
}

.newspaper-card {
  display: block;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.newspaper-card.has-image {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
}

.newspaper-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.newspaper-card:hover,
.newspaper-card:focus-visible {
  border-radius: 10px;
  background: #1f3b48;
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 59, 72, 0.16);
}

.newspaper-card:hover h3,
.newspaper-card:focus-visible h3 {
  color: #fff;
  text-decoration: underline;
}

.newspaper-card:hover p,
.newspaper-card:hover small,
.newspaper-card:focus-visible p,
.newspaper-card:focus-visible small {
  color: rgba(255, 255, 255, 0.84);
}

.newspaper-card:hover .newspaper-card-meta span,
.newspaper-card:focus-visible .newspaper-card-meta span {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.newspaper-card.lead {
  padding-bottom: 12px;
}

.newspaper-card.lead.has-image {
  display: block;
}

.newspaper-card-image {
  overflow: hidden;
  border-radius: 8px;
  background: #eef4f0;
  aspect-ratio: 4 / 3;
}

.newspaper-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}

.newspaper-card.lead .newspaper-card-image {
  margin-bottom: 12px;
  aspect-ratio: 16 / 9;
}

.newspaper-card.lead h3 {
  font-size: 25px;
  line-height: 1.22;
}

.newspaper-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 6px;
}

.newspaper-card-meta span {
  border-radius: 999px;
  padding: 2px 7px;
  background: #eef4f0;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
}

.newspaper-card h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.32;
  transition: color 0.15s ease;
}

.newspaper-card p {
  margin: 0 0 7px;
  color: #46505c;
  line-height: 1.55;
}

.newspaper-card small {
  color: var(--muted);
  font-weight: 800;
}

.newspaper-error {
  color: var(--error);
  line-height: 1.55;
}

.newspaper-article {
  padding: 28px;
}

.newspaper-article-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
}

.newspaper-article-head h1 {
  max-width: 780px;
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.newspaper-article-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.newspaper-article-summary {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f3f7f4;
  color: #31465a;
  font-size: 16px;
  line-height: 1.65;
}

.newspaper-article-image {
  margin: 22px 0 0;
}

.newspaper-article-image img {
  display: block;
  width: 100%;
  max-height: 460px;
  border-radius: 8px;
  object-fit: cover;
  color: transparent;
}

.newspaper-article-body {
  max-width: 820px;
  margin-top: 22px;
}

.newspaper-article-body p {
  margin: 0 0 18px;
  color: #1c2633;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.78;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.upload-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

input[type="file"] {
  max-width: 280px;
}

input[type="text"] {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

button {
  border: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  background: var(--accent-dark);
  box-shadow: 0 8px 18px rgba(29, 127, 91, 0.14);
}

button:disabled,
button[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: none;
  transform: none;
}

.danger-button {
  background: var(--error);
}

.danger-button:hover {
  background: #8f1d14;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  font-weight: 800;
  text-decoration: none;
}

.primary-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 12px 24px rgba(29, 127, 91, 0.18);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary-link:hover {
  background: var(--accent-dark);
}

.ghost-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: rgba(29, 127, 91, 0.28);
  background: var(--accent-soft);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.word-resource-filter-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin: -8px 0 18px;
}

.word-resource-filter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.word-resource-filter-top > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 180px;
}

.word-resource-filter-panel strong {
  color: var(--text);
  font-weight: 900;
}

.word-resource-filter-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.word-resource-filter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.word-resource-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.word-resource-filter-button:hover,
.word-resource-filter-button.active {
  border-color: rgba(29, 127, 91, 0.35);
  color: var(--accent-dark);
  background: #e9f8f1;
}

.word-resource-filter-button strong {
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--accent-dark);
  background: rgba(29, 127, 91, 0.12);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.word-resource-filter-empty {
  margin-top: 0;
}

.list-ai-image-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 300px) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(29, 127, 91, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f7fcf9 0%, #eef8f3 100%);
}

.list-ai-image-summary {
  display: grid;
  gap: 3px;
}

.list-ai-image-summary strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.list-ai-image-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.list-ai-image-quota {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: #0f6b4d;
  background: rgba(29, 127, 91, 0.11);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.list-ai-image-progress strong {
  color: var(--accent-dark);
}

.list-ai-image-toolbar.is-syncing .sync-progress span {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.24) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.24) 75%,
    transparent 75%,
    transparent
  );
  background-size: 22px 22px;
  animation: sync-stripes 0.8s linear infinite;
}

.list-ai-image-toolbar.is-complete .sync-progress span {
  width: 100%;
}

.list-ai-image-toolbar.has-error {
  border-color: #ffd8d3;
  background: #fff8f7;
}

.list-ai-image-toolbar.has-error .sync-progress span {
  background: var(--warn);
}

.list-ai-image-button {
  min-height: 40px;
  padding-inline: 16px;
  white-space: nowrap;
}

.list-ai-image-button:disabled {
  color: rgba(255, 255, 255, 0.72);
  background: #8ab7a4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.list-ai-image-notice {
  margin: -2px 0 0;
}

.list-paid-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 28, 36, 0.48);
  backdrop-filter: blur(4px);
}

.list-paid-confirm-modal {
  width: min(520px, 100%);
  border: 1px solid rgba(218, 113, 75, 0.24);
  border-radius: 18px;
  padding: 24px;
  background: #fffdfa;
  box-shadow: 0 24px 60px rgba(21, 31, 43, 0.28);
}

.list-paid-confirm-modal h2 {
  margin: 4px 0 10px;
  color: var(--text);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.08;
}

.list-paid-confirm-modal p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.list-paid-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.word-card {
  position: relative;
  display: block;
  min-height: 270px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.word-card:hover {
  border-color: rgba(29, 127, 91, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.list-card:hover .plain-card-button {
  background: var(--accent);
  color: #fff;
}

.list-card:hover .challenge-summary-badge {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.list-card:hover .word-card-title > strong,
.list-card:hover .wrong-list-summary,
.list-card:hover .status {
  color: #fff;
}

.list-card:hover .status.done,
.list-card:hover .status.failed {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.list-card:hover .word-audio-badge {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.word-index-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  min-width: 34px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(28, 36, 48, 0.82);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.list-card {
  min-height: 0;
}

.list-sequence-badge,
.list-card-manage-button {
  position: absolute;
  z-index: 3;
}

.list-sequence-badge {
  top: 10px;
  left: 10px;
  min-width: 42px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(15, 28, 36, 0.82);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 8px 18px rgba(15, 28, 36, 0.18);
}

.list-card-manage-button {
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid rgba(15, 127, 89, 0.22);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 28, 36, 0.12);
}

.list-card-manage-button:hover,
.list-card-manage-button:focus-visible,
.list-card:hover .list-card-manage-button {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(15, 127, 89, 0.92);
}

.list-card .word-card-body {
  display: block;
  min-height: 58px;
}

.list-card .word-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.list-card .word-card-title > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-card .challenge-round-inline {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.list-card .challenge-round-crown {
  display: block;
  width: 1.12em !important;
  height: 1.12em !important;
  max-width: 20px;
  max-height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(120, 53, 15, 0.24));
}

.challenge-summary-badge {
  margin-left: auto;
  justify-self: end;
  overflow: hidden;
  max-width: 150px;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.challenge-card-actions {
  display: grid;
  justify-content: end;
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
}

.challenge-start-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.challenge-start-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.challenge-start-form input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.challenge-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.challenge-button:hover {
  background: var(--accent-dark);
}

.challenge-button:disabled,
.challenge-button[disabled],
.challenge-button:disabled:hover,
.challenge-button[disabled]:hover {
  color: #607083;
  background: #dfe8e3;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.calendar-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
}

.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-heading h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: 0;
}

.home-growth-console {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(226, 178, 73, 0.36);
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(255, 226, 142, 0.2), transparent 42%),
    linear-gradient(135deg, #17241f 0%, #164735 58%, #8a6a21 170%);
  box-shadow: 0 20px 45px rgba(13, 44, 36, 0.16);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.home-growth-console:hover,
.home-growth-console:focus-visible {
  box-shadow: 0 24px 54px rgba(13, 44, 36, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.home-growth-main {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.home-growth-main img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.28));
}

.home-growth-main .section-kicker {
  color: #a2f2cc;
}

.home-growth-main h3 {
  margin: 2px 0 4px;
  color: #fff;
  font-size: 24px;
  line-height: 1.16;
}

.home-growth-main p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.home-growth-main > strong {
  border-radius: 999px;
  padding: 9px 13px;
  color: #ffe7a3;
  background: rgba(255, 255, 255, 0.14);
  font-size: 20px;
  font-weight: 900;
}

.home-growth-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.growth-badge-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.growth-badge-medal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: radial-gradient(circle at 38% 28%, #fff7cf, #d9a02e 58%, #8d6318);
}

.growth-badge-medal img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.growth-badge-card strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.growth-badge-card span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.growth-badge-card i {
  display: block;
  overflow: hidden;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.growth-badge-card b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe18b, #6ee7b7);
}

.home-growth-missions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-growth-missions span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
}

.growth-detail-page {
  display: grid;
  gap: 22px;
}

.growth-detail-hero {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(226, 178, 73, 0.34);
  border-radius: 18px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(255, 226, 142, 0.2), transparent 42%),
    linear-gradient(135deg, #17241f 0%, #164735 58%, #8a6a21 170%);
  box-shadow: var(--shadow);
}

.growth-detail-hero img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
}

.growth-detail-hero h1 {
  margin: 2px 0 6px;
  color: #fff;
  font-size: 34px;
  line-height: 1.12;
}

.growth-detail-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.growth-detail-hero .section-kicker {
  color: #a2f2cc;
}

.growth-detail-hero > strong {
  border-radius: 999px;
  padding: 10px 15px;
  color: #ffe7a3;
  background: rgba(255, 255, 255, 0.14);
  font-size: 24px;
  font-weight: 900;
}

.growth-level-panel {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
}

.growth-level-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: end;
}

.growth-level-head span,
.growth-level-head em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.growth-level-head span {
  align-self: center;
}

.growth-level-head strong {
  grid-row: span 2;
  color: var(--accent-dark);
  font-size: 36px;
  line-height: 1;
}

.growth-level-head em {
  grid-column: 1;
}

.growth-level-progress,
.growth-detail-card-body i,
.growth-mission-grid i {
  display: block;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e4ebe5;
}

.growth-level-progress b,
.growth-detail-card-body b,
.growth-mission-grid b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d8a738, #1d7f5b);
}

.growth-score-rules,
.growth-mission-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.growth-score-rules span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
}

.growth-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.growth-detail-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.growth-detail-medal {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: radial-gradient(circle at 38% 28%, #fff7cf, #d9a02e 58%, #8d6318);
}

.growth-detail-medal img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.growth-detail-card-body {
  display: grid;
  gap: 7px;
}

.growth-detail-card-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.growth-detail-card-body strong {
  color: var(--ink);
  font-size: 18px;
}

.growth-detail-card-body p {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 900;
}

.growth-mission-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.growth-mission-grid span {
  display: grid;
  gap: 9px;
  min-width: 180px;
  flex: 1 1 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fbfcfa;
}

.growth-mission-grid strong {
  color: var(--ink);
}

.growth-mission-grid em {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 900;
}

.cat-world-page {
  display: grid;
  gap: 18px;
}

.cat-world-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(34, 117, 98, 0.22);
  border-radius: var(--radius);
  padding: 24px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 214, 132, 0.34), transparent 26%),
    linear-gradient(135deg, #173c36 0%, #24505e 56%, #816b32 145%);
  box-shadow: var(--shadow);
}

.cat-world-copy h1 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.cat-world-copy p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  line-height: 1.75;
}

.cat-world-copy .section-kicker {
  color: #a7f3d0;
}

.cat-world-wallet {
  display: grid;
  align-content: center;
  justify-items: end;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.cat-world-wallet span,
.cat-world-wallet small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.cat-world-wallet strong {
  color: #fff;
  font-size: 42px;
  line-height: 1;
}

.cat-world-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 16px;
  align-items: start;
}

.cat-world-room-panel,
.cat-world-ledger,
.cat-world-market,
.cat-world-cats {
  border-radius: var(--radius);
}

.cat-world-room-head,
.cat-world-market-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cat-world-room-head h2,
.cat-world-ledger h2,
.cat-world-market-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.cat-world-mood {
  min-width: 132px;
  border: 1px solid #efd69a;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #6b3f08;
  background: #fff2cc;
}

.cat-world-mood span {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.cat-world-mood strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.cat-world-room {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid #d7e3df;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(173, 216, 222, 0.42), transparent 46%),
    linear-gradient(0deg, #e6d7bb 0 28%, #f8fbf7 28% 100%);
}

.cat-world-room::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 27%;
  border-top: 1px solid rgba(113, 97, 75, 0.16);
}

.cat-world-window {
  position: absolute;
  top: 28px;
  left: 34px;
  width: 112px;
  height: 86px;
  border: 7px solid #8db7bd;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent calc(50% - 3px), #8db7bd calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(0deg, transparent calc(50% - 3px), #8db7bd calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(135deg, #dff7ff, #ffefba);
  box-shadow: 0 18px 50px rgba(244, 184, 70, 0.18);
}

.cat-world-shelf {
  position: absolute;
  top: 46px;
  right: 42px;
  display: flex;
  gap: 7px;
  align-items: flex-end;
  width: 128px;
  height: 74px;
  border-bottom: 9px solid #8a643c;
}

.cat-world-shelf span {
  display: block;
  width: 20px;
  border-radius: 4px 4px 0 0;
  background: #3f6f93;
}

.cat-world-shelf span:nth-child(1) {
  height: 52px;
}

.cat-world-shelf span:nth-child(2) {
  height: 62px;
  background: #c6584f;
}

.cat-world-shelf span:nth-child(3) {
  height: 48px;
  background: #d7a03d;
}

.cat-world-shelf span:nth-child(4) {
  height: 58px;
  background: #224b45;
}

.cat-world-rug {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 330px;
  height: 94px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 22%, #dbeafe 23% 56%, #f4d7d1 57% 100%);
  opacity: 0.92;
}

.cat-world-bowl {
  position: absolute;
  right: 86px;
  bottom: 52px;
  width: 76px;
  height: 34px;
  border-radius: 12px 12px 28px 28px;
  background: linear-gradient(180deg, #f7c86f, #b85b3d);
}

.cat-world-bowl::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 12px;
  width: 52px;
  height: 15px;
  border-radius: 50%;
  background: #ffe3a1;
}

.cat-world-scratcher {
  position: absolute;
  left: 70px;
  bottom: 62px;
  width: 96px;
  height: 18px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #b98145 0 8px, #d4a36b 8px 16px);
  transform: rotate(-12deg);
  box-shadow: 0 8px 16px rgba(94, 60, 31, 0.16);
}

.cat-world-wand {
  position: absolute;
  right: 42px;
  bottom: 122px;
  width: 90px;
  height: 4px;
  border-radius: 999px;
  background: #6b4f2f;
  transform: rotate(-28deg);
}

.cat-world-wand::after {
  content: "";
  position: absolute;
  right: -17px;
  top: -13px;
  width: 22px;
  height: 30px;
  border-radius: 70% 30% 70% 30%;
  background: #d85f61;
  transform: rotate(24deg);
}

.cat-world-cat-svg {
  --cat-fur: #d8a15d;
  --cat-mark: #7a4f2c;
  --cat-eye: #17322d;
  position: absolute;
  left: 50%;
  bottom: 48px;
  width: min(280px, 48%);
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 18px rgba(75, 54, 33, 0.22));
}

.cat-tone-british-shorthair {
  --cat-fur: #b8c1c9;
  --cat-mark: #607082;
  --cat-eye: #315f75;
}

.cat-tone-siamese {
  --cat-fur: #e7d1b4;
  --cat-mark: #4f332d;
  --cat-eye: #267d96;
}

.cat-tone-ragdoll {
  --cat-fur: #f1e6d6;
  --cat-mark: #9a7a59;
  --cat-eye: #286f91;
}

.cat-tone-maine-coon {
  --cat-fur: #8d6645;
  --cat-mark: #3e2b20;
  --cat-eye: #d0a24a;
}

.cat-world-cat-svg .cat-body,
.cat-world-cat-svg .cat-face,
.cat-world-cat-svg .cat-ear {
  fill: var(--cat-fur);
  stroke: var(--cat-mark);
  stroke-width: 5;
  stroke-linejoin: round;
}

.cat-world-cat-svg .cat-tail {
  fill: none;
  stroke: var(--cat-mark);
  stroke-width: 18;
  stroke-linecap: round;
}

.cat-world-cat-svg .cat-eye {
  fill: var(--cat-eye);
}

.cat-world-cat-svg .cat-nose,
.cat-world-cat-svg .cat-mouth,
.cat-world-cat-svg .cat-paw {
  fill: none;
  stroke: var(--cat-mark);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cat-world-room-status,
.cat-world-play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cat-world-room-status span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.cat-world-ledger {
  align-self: stretch;
}

.cat-world-energy-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cat-world-energy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cat-world-energy-row span {
  color: var(--ink);
  font-weight: 900;
}

.cat-world-energy-row strong {
  color: var(--accent-dark);
  font-size: 22px;
}

.cat-world-energy-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.cat-world-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-world-tabs button,
.cat-world-cat-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.cat-world-tabs button.active,
.cat-world-cat-chip.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.cat-world-notice {
  margin: 0 0 14px;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-weight: 900;
}

.cat-world-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cat-world-shop-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 253, 251, 0.98)),
    var(--panel);
}

.cat-world-shop-card span,
.cat-world-shop-card p,
.cat-world-cat-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cat-world-shop-card h3 {
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.cat-world-shop-card p {
  margin: 0;
  line-height: 1.55;
}

.cat-world-shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.cat-world-shop-meta strong {
  color: #855b13;
}

.cat-world-shop-card .primary-action-button {
  justify-content: center;
  width: 100%;
}

.cat-world-shop-card .primary-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.cat-world-cat-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.cat-world-cat-chip {
  display: grid;
  gap: 4px;
  text-align: left;
}

.cat-world-cat-chip.locked {
  cursor: not-allowed;
  opacity: 0.62;
}

.cat-world-page {
  gap: 20px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  padding: 20px;
  background:
    radial-gradient(circle at 7% 9%, rgba(255, 194, 211, 0.52) 0 40px, transparent 42px),
    radial-gradient(circle at 93% 7%, rgba(255, 231, 163, 0.58) 0 48px, transparent 50px),
    radial-gradient(circle at 86% 88%, rgba(187, 232, 255, 0.54) 0 64px, transparent 66px),
    linear-gradient(135deg, #fff6fb 0%, #fffdf4 46%, #f3fbff 100%);
  box-shadow: 0 26px 70px rgba(224, 142, 167, 0.18);
}

.cat-world-hero {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 28px;
  color: #74405c;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.9) 0 58px, transparent 60px),
    radial-gradient(circle at 74% 18%, rgba(255, 230, 244, 0.96) 0 86px, transparent 88px),
    linear-gradient(135deg, #ffd4e5 0%, #fff0c9 54%, #dff7ff 100%);
  box-shadow: 0 18px 0 rgba(255, 189, 209, 0.22), 0 24px 50px rgba(197, 124, 148, 0.18);
}

.cat-world-hero::before,
.cat-world-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cat-world-hero::before {
  right: -34px;
  top: -28px;
  width: 180px;
  height: 180px;
  border: 18px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.cat-world-hero::after {
  left: 42%;
  bottom: 18px;
  width: 72px;
  height: 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 15% 50%, #fff 0 18px, transparent 19px),
    radial-gradient(circle at 48% 42%, #fff 0 22px, transparent 23px),
    radial-gradient(circle at 82% 52%, #fff 0 16px, transparent 17px);
  opacity: 0.72;
}

.cat-world-copy {
  position: relative;
  z-index: 1;
}

.cat-world-copy .section-kicker,
.cat-world-market .section-kicker,
.cat-world-room-panel .section-kicker,
.cat-world-ledger .section-kicker,
.cat-world-cats .section-kicker {
  color: #db6f9a;
}

.cat-world-copy h1 {
  margin: 6px 0 10px;
  color: #7a3d60;
  font-size: 38px;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.78);
}

.cat-world-copy p {
  max-width: 720px;
  color: #8f5e74;
  font-weight: 900;
}

.cat-world-wallet {
  position: relative;
  z-index: 1;
  justify-items: center;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  padding: 18px;
  color: #8a5b0d;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.88) 0 22px, transparent 24px),
    linear-gradient(180deg, #fff5bf, #ffd76e);
  box-shadow: 0 12px 0 rgba(224, 164, 46, 0.16), 0 18px 36px rgba(181, 126, 31, 0.16);
}

.cat-world-wallet span,
.cat-world-wallet small {
  color: #9a6812;
}

.cat-world-wallet strong {
  color: #7c4f04;
  font-size: 48px;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.76);
}

.cat-world-room-panel,
.cat-world-ledger,
.cat-world-market,
.cat-world-cats {
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 0 rgba(255, 194, 211, 0.18), 0 24px 44px rgba(180, 139, 154, 0.12);
}

.cat-world-room-head h2,
.cat-world-ledger h2,
.cat-world-market-head h2 {
  color: #51304b;
  font-size: 26px;
}

.cat-world-mood {
  border: 3px solid #fff;
  border-radius: 24px;
  color: #8e4a70;
  background: linear-gradient(180deg, #ffe8f2, #ffd2e2);
  box-shadow: 0 10px 0 rgba(255, 173, 199, 0.2);
}

.cat-world-mood strong {
  color: #c94e84;
  font-size: 28px;
}

.cat-world-room {
  min-height: 430px;
  border: 4px solid #fff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.82) 0 34px, transparent 36px),
    radial-gradient(circle at 26% 15%, rgba(255, 255, 255, 0.62) 0 24px, transparent 26px),
    radial-gradient(circle at 74% 19%, rgba(255, 255, 255, 0.78) 0 42px, transparent 44px),
    linear-gradient(180deg, #ffe3ef 0 54%, #ffd7e7 54% 55%, #ffeec8 55% 100%);
  box-shadow: inset 0 -28px 0 rgba(255, 204, 218, 0.45), inset 0 0 0 8px rgba(255, 255, 255, 0.34);
}

.cat-world-room::before {
  bottom: 45%;
  border-top: 3px dashed rgba(221, 122, 154, 0.34);
}

.cat-world-room::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(420px, 76%);
  height: 104px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  transform: translateX(-50%);
}

.cat-world-window {
  top: 34px;
  left: 40px;
  width: 128px;
  height: 100px;
  border: 8px solid #fff;
  border-radius: 28px;
  background:
    linear-gradient(90deg, transparent calc(50% - 3px), rgba(255, 255, 255, 0.95) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(0deg, transparent calc(50% - 3px), rgba(255, 255, 255, 0.95) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(145deg, #bfeeff, #fff2a8);
  box-shadow: 0 12px 0 rgba(255, 177, 203, 0.18), 0 20px 40px rgba(255, 191, 123, 0.2);
}

.cat-world-shelf {
  top: 54px;
  right: 48px;
  width: 142px;
  height: 86px;
  border-bottom: 10px solid #ffb0c9;
  filter: drop-shadow(0 10px 0 rgba(255, 170, 199, 0.2));
}

.cat-world-shelf span {
  width: 22px;
  border-radius: 10px 10px 0 0;
  background: #9cd8ff;
}

.cat-world-shelf span:nth-child(2) {
  background: #ff95b8;
}

.cat-world-shelf span:nth-child(3) {
  background: #ffd56b;
}

.cat-world-shelf span:nth-child(4) {
  background: #a8e8c2;
}

.cat-world-rug {
  bottom: 34px;
  z-index: 1;
  width: 380px;
  height: 118px;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 24%, transparent 25%),
    repeating-radial-gradient(ellipse at center, #ffbdd2 0 16px, #ffe8f0 16px 32px);
  opacity: 0.98;
}

.cat-world-bowl,
.cat-world-scratcher,
.cat-world-wand,
.cat-world-cat-svg {
  z-index: 2;
}

.cat-world-bowl {
  right: 92px;
  bottom: 64px;
  border: 4px solid #fff;
  border-radius: 16px 16px 32px 32px;
  background: linear-gradient(180deg, #ffd8e6, #ff7fad);
  box-shadow: 0 10px 0 rgba(203, 95, 128, 0.16);
}

.cat-world-bowl::before {
  background: #fff2b3;
}

.cat-world-scratcher {
  left: 74px;
  bottom: 78px;
  width: 110px;
  height: 24px;
  border: 4px solid #fff;
  background: repeating-linear-gradient(90deg, #d49a63 0 8px, #ffd19b 8px 16px);
}

.cat-world-wand {
  right: 54px;
  bottom: 152px;
  height: 5px;
  background: #9d6a45;
}

.cat-world-wand::after {
  right: -20px;
  top: -16px;
  width: 26px;
  height: 34px;
  background: linear-gradient(135deg, #ff83b1, #ffd2e4);
}

.cat-world-cat-svg {
  bottom: 66px;
  width: min(330px, 54%);
  filter: drop-shadow(0 18px 18px rgba(137, 79, 93, 0.22));
  transform-origin: 50% 100%;
}

.cat-world-cat-svg .cat-body,
.cat-world-cat-svg .cat-face,
.cat-world-cat-svg .cat-ear {
  stroke-width: 6;
}

.cat-world-cat-svg .cat-eye {
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.62));
}

.cat-world-cat-svg {
  cursor: pointer;
  outline: none;
}

.cat-world-cat-svg:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.96);
  outline-offset: 6px;
  filter: drop-shadow(0 18px 18px rgba(137, 79, 93, 0.22)) drop-shadow(0 0 0 #fff);
}

.cat-world-reaction {
  position: absolute;
  left: 50%;
  bottom: 285px;
  z-index: 4;
  max-width: min(280px, 72%);
  border: 3px solid #fff;
  border-radius: 999px;
  padding: 10px 16px;
  color: #8d4b6a;
  background: linear-gradient(180deg, #fff, #ffe3ef);
  box-shadow: 0 10px 0 rgba(255, 179, 203, 0.18), 0 18px 34px rgba(166, 91, 118, 0.16);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  animation: cat-world-reaction-pop 2.2s ease both;
}

.cat-world-reaction::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  background: #ffe3ef;
  transform: translateX(-50%) rotate(45deg);
}

.cat-world-sparkles {
  position: absolute;
  left: 50%;
  bottom: 205px;
  z-index: 5;
  width: 190px;
  height: 110px;
  pointer-events: none;
  transform: translateX(-50%);
}

.cat-world-sparkles span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: #ff8ab4;
  opacity: 0;
  transform: rotate(-45deg) scale(0.4);
  animation: cat-world-heart-float 1.25s ease-out both;
}

.cat-world-sparkles span::before,
.cat-world-sparkles span::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cat-world-sparkles span::before {
  left: 0;
  top: -8px;
  width: 18px;
  height: 18px;
}

.cat-world-sparkles span::after {
  left: 8px;
  top: 0;
  width: 18px;
  height: 18px;
}

.cat-world-sparkles span:nth-child(1) {
  left: 20px;
  bottom: 12px;
}

.cat-world-sparkles span:nth-child(2) {
  left: 64px;
  bottom: 40px;
  background: #ffd264;
  animation-delay: 0.08s;
}

.cat-world-sparkles span:nth-child(3) {
  right: 48px;
  bottom: 24px;
  background: #9ddcff;
  animation-delay: 0.16s;
}

.cat-world-sparkles span:nth-child(4) {
  right: 18px;
  bottom: 56px;
  width: 15px;
  height: 15px;
  background: #bda6ff;
  animation-delay: 0.22s;
}

.cat-world-room-status span {
  border: 2px solid #fff;
  padding: 8px 12px;
  color: #995071;
  background: #ffe6f0;
  box-shadow: 0 6px 0 rgba(255, 186, 207, 0.18);
}

.cat-world-play-row .secondary-button {
  border: 2px solid #fff;
  border-radius: 999px;
  color: #7b4b62;
  background: linear-gradient(180deg, #fff, #ffe8f1);
  box-shadow: 0 8px 0 rgba(255, 179, 203, 0.18);
}

.cat-world-ledger {
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 214, 129, 0.46) 0 46px, transparent 48px),
    rgba(255, 255, 255, 0.88);
}

.cat-world-energy-row {
  border: 2px solid #fff;
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #fff7fb);
  box-shadow: 0 8px 0 rgba(255, 204, 220, 0.16);
}

.cat-world-energy-row strong {
  color: #d15a8c;
  font-size: 24px;
}

.cat-world-tabs button,
.cat-world-cat-chip {
  border: 2px solid #fff;
  border-radius: 999px;
  color: #7b4b62;
  background: linear-gradient(180deg, #fff, #fff0f6);
  box-shadow: 0 8px 0 rgba(255, 194, 211, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cat-world-tabs button:hover,
.cat-world-cat-chip:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(255, 194, 211, 0.2);
}

.cat-world-tabs button.active,
.cat-world-cat-chip.active {
  border-color: #fff;
  color: #fff;
  background: linear-gradient(180deg, #ff92ba, #db5f94);
  box-shadow: 0 9px 0 rgba(192, 70, 116, 0.22);
}

.cat-world-notice {
  border: 2px solid #fff;
  border-radius: 20px;
  color: #8a4868;
  background: linear-gradient(180deg, #fff, #ffe5ef);
  box-shadow: 0 8px 0 rgba(255, 194, 211, 0.15);
}

.cat-world-shop-grid {
  gap: 14px;
}

.cat-world-shop-card {
  position: relative;
  overflow: hidden;
  min-height: 244px;
  border: 3px solid #fff;
  border-radius: 26px;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 226, 238, 0.82) 0 42px, transparent 44px),
    linear-gradient(180deg, #fff, #fff8fb);
  box-shadow: 0 13px 0 rgba(255, 194, 211, 0.18), 0 18px 36px rgba(183, 120, 141, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.cat-world-shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 0 rgba(255, 194, 211, 0.22), 0 24px 42px rgba(183, 120, 141, 0.14);
}

.cat-world-shop-card::before {
  content: "";
  display: block;
  width: 58px;
  height: 58px;
  border: 4px solid #fff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.9) 0 9px, transparent 10px),
    linear-gradient(135deg, #ff9dbf, #ffd166);
  box-shadow: 0 9px 0 rgba(255, 194, 211, 0.16);
}

.cat-world-shop-card:nth-child(4n + 2)::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.9) 0 9px, transparent 10px),
    linear-gradient(135deg, #9ad7ff, #b2f0cf);
}

.cat-world-shop-card:nth-child(4n + 3)::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.9) 0 9px, transparent 10px),
    linear-gradient(135deg, #c6a7ff, #ffc1da);
}

.cat-world-shop-card:nth-child(4n + 4)::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.9) 0 9px, transparent 10px),
    linear-gradient(135deg, #ffe17d, #ffacb8);
}

.cat-world-shop-card h3 {
  color: #58334f;
  font-size: 20px;
}

.cat-world-shop-card span,
.cat-world-shop-card p,
.cat-world-cat-chip span {
  color: #8d6b7b;
}

.cat-world-shop-meta strong {
  color: #c85a85;
}

.cat-world-shop-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #8b4d69;
  background: #ffe7f1;
}

.cat-world-shop-card .primary-action-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff8eb9, #d9578d);
  box-shadow: 0 8px 0 rgba(184, 61, 109, 0.28);
}

.cat-world-shop-card .primary-action-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 0 rgba(184, 61, 109, 0.28);
}

.cat-world-shop-card .primary-action-button:disabled {
  color: #9b7585;
  background: linear-gradient(180deg, #f5edf1, #eadce4);
  box-shadow: 0 7px 0 rgba(196, 168, 181, 0.22);
}

.cat-world-cat-chip {
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fff4f8);
}

.cat-world-cat-chip.active {
  background: linear-gradient(180deg, #a9e8c8, #45bd8b);
  box-shadow: 0 9px 0 rgba(64, 157, 119, 0.2);
}

@media (prefers-reduced-motion: no-preference) {
  .cat-world-cat-svg {
    animation: cat-world-bob 3.6s ease-in-out infinite;
  }

  .cat-world-cat-svg.is-petted {
    animation: cat-world-pet 0.64s ease-out, cat-world-bob 3.6s ease-in-out 0.64s infinite;
  }

  .cat-world-wallet {
    animation: cat-world-soft-pop 4.4s ease-in-out infinite;
  }
}

@keyframes cat-world-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.015);
  }
}

@keyframes cat-world-soft-pop {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes cat-world-pet {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  34% {
    transform: translateX(-50%) translateY(-14px) scale(1.08);
  }

  68% {
    transform: translateX(-50%) translateY(2px) scale(0.98);
  }

  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes cat-world-reaction-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.92);
  }

  14%,
  72% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.98);
  }
}

@keyframes cat-world-heart-float {
  0% {
    opacity: 0;
    transform: translateY(12px) rotate(-45deg) scale(0.36);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-64px) rotate(-45deg) scale(1);
  }
}

.challenge-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekday {
  padding: 2px 6px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 9px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.calendar-day.empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.calendar-day.has-records {
  border-color: rgba(29, 127, 91, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(231, 245, 238, 0.92) 100%),
    radial-gradient(circle at top right, rgba(29, 127, 91, 0.14), transparent 70%);
  cursor: pointer;
}

.calendar-day.has-records:hover {
  border-color: var(--accent);
  background: #edf8f2;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.calendar-day-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.calendar-day-number > span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
}

.calendar-day.today .calendar-day-number > span {
  color: #fff;
  background: var(--accent);
}

.calendar-result-lines {
  display: grid;
  width: 100%;
  gap: 5px;
  align-self: end;
}

.calendar-result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.calendar-result-line strong {
  font-size: 14px;
  letter-spacing: 0;
}

.calendar-result-line.is-correct {
  color: #0f7a55;
  background: rgba(218, 247, 234, 0.88);
}

.calendar-result-line.is-correct strong {
  color: #08764f;
}

.calendar-result-line.is-wrong {
  color: #b4232a;
  background: rgba(255, 232, 232, 0.9);
}

.calendar-result-line.is-wrong strong {
  color: #cf1f2b;
}

.calendar-marks {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mark-correct,
.mark-wrong {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.mark-correct {
  color: var(--accent-dark);
  background: #e4f6ee;
}

.mark-wrong {
  color: var(--error);
  background: #fff1f0;
}

.calendar-detail-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.calendar-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-detail-heading strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.calendar-detail-heading span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.calendar-detail-heading button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.calendar-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.calendar-detail-word {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.calendar-detail-word strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-detail-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.calendar-detail-word.is-correct .calendar-detail-icon {
  background: var(--accent);
}

.calendar-detail-word.is-wrong .calendar-detail-icon {
  background: var(--error);
}

.calendar-detail-count {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-detail-empty {
  margin: 0;
  color: var(--muted);
}

.challenge-day-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.challenge-day-hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.challenge-day-hero p {
  margin: 0;
  color: var(--muted);
}

.challenge-day-summary {
  display: grid;
  min-width: 108px;
  min-height: 88px;
  place-items: center;
  border-radius: 8px;
  background: #e9f7ef;
  color: var(--accent-dark);
}

.challenge-day-summary strong {
  font-size: 34px;
  line-height: 1;
}

.challenge-day-summary span {
  font-size: 12px;
  font-weight: 900;
}

.challenge-day-stats {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 0.95fr) minmax(170px, 1fr) minmax(180px, 0.95fr);
  gap: 10px;
  margin-bottom: 14px;
}

.challenge-day-stats .panel,
.challenge-day-back {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 94px;
  padding: 12px 14px;
  text-decoration: none;
}

.challenge-day-filter {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: inherit;
  text-align: left;
  cursor: default;
  font: inherit;
}

.challenge-day-filter.active {
  border-color: var(--accent);
  background: #eef8f3;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.challenge-day-stat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.challenge-day-correction-count {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-dark);
  background: #e4f6ee;
  white-space: nowrap;
}

.challenge-day-stat-number {
  width: max-content;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
}

.challenge-day-stat-number:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.challenge-day-wrong-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.challenge-day-start-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.challenge-day-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.challenge-day-stats .challenge-day-correction-count {
  color: var(--accent-dark);
}

.challenge-day-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.challenge-day-stats strong {
  color: var(--ink);
  font-size: 24px;
}

.challenge-day-back:hover,
.challenge-day-back:hover span,
.challenge-day-back:hover strong {
  color: #fff;
}

.challenge-day-stats .stat-correct {
  color: var(--accent-dark);
}

.challenge-day-stats .stat-wrong {
  color: var(--error);
}

.challenge-day-stats .stat-pending {
  color: var(--warn);
}

.challenge-day-note {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-color: #f4d7a1;
  background: #fff8ec;
  color: #8a5a14;
  font-weight: 800;
  line-height: 1.7;
}

.challenge-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.challenge-day-word {
  position: relative;
  overflow: hidden;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.challenge-day-word:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.spb-page {
  display: grid;
  gap: 18px;
}

.spb-heading {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(29, 127, 91, 0.08), rgba(255, 255, 255, 0.96)),
    var(--panel);
}

.spb-heading h1 {
  margin-bottom: 4px;
}

.spb-heading p:not(.section-kicker) {
  margin: 0;
  color: #526176;
  font-weight: 800;
}

.spb-heading-stats {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
}

.spb-heading-stats span {
  display: grid;
  min-width: 112px;
  border: 1px solid #cfe8dd;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #526176;
  background: #f5fbf8;
  font-size: 12px;
  font-weight: 900;
}

.spb-heading-stats strong {
  color: var(--accent-dark);
  font-size: 28px;
  line-height: 1;
}

.spb-collection-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
}

.spb-collection-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 22px;
  border-radius: var(--radius);
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(15, 127, 89, 0.12), rgba(255, 255, 255, 0.94) 58%),
    #f4fbf7;
}

.spb-collection-hero h2 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.spb-collection-hero span {
  color: #526176;
  font-weight: 900;
}

.spb-hero-picture {
  position: relative;
  min-height: 148px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(12, 93, 67, 0.92), rgba(22, 126, 92, 0.72)),
    radial-gradient(circle at 78% 22%, rgba(255, 232, 151, 0.56), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 18px 34px rgba(15, 127, 89, 0.18);
  overflow: hidden;
}

.spb-hero-picture::before,
.spb-hero-picture::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.spb-hero-picture::before {
  width: 170px;
  height: 170px;
  right: -42px;
  top: -62px;
}

.spb-hero-picture::after {
  width: 92px;
  height: 92px;
  left: 24px;
  bottom: -28px;
}

.spb-hero-book {
  position: absolute;
  left: 34px;
  top: 26px;
  display: flex;
  gap: 8px;
  align-items: end;
}

.spb-hero-book span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 78px;
  border-radius: 8px 8px 5px 5px;
  color: #0c5d43;
  background: #fff8db;
  font-size: 30px;
  font-weight: 950;
  box-shadow: 0 12px 18px rgba(5, 38, 28, 0.2);
}

.spb-hero-book span:nth-child(2) {
  height: 94px;
  background: #f7c95c;
}

.spb-hero-book span:nth-child(3) {
  height: 68px;
  background: #e3fff1;
}

.spb-hero-ribbon {
  position: absolute;
  right: 38px;
  top: 30px;
  width: 66px;
  height: 88px;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, #ffe28a, #c99822);
  box-shadow: 0 12px 22px rgba(5, 38, 28, 0.24);
}

.spb-hero-ribbon::after {
  position: absolute;
  left: 16px;
  bottom: 18px;
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.spb-hero-lines {
  position: absolute;
  right: 116px;
  bottom: 34px;
  display: grid;
  gap: 8px;
  width: 96px;
}

.spb-hero-lines i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.spb-hero-lines i:nth-child(2) {
  width: 72%;
}

.spb-hero-lines i:nth-child(3) {
  width: 52%;
}

.spb-collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.spb-collection-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 118px;
  border: 1px solid #d8e5dd;
  border-radius: var(--radius);
  padding: 16px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff, #f7fbf8);
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.spb-collection-card.active {
  border-color: #8dc9b0;
  background: #f1faf6;
  box-shadow: 0 16px 34px rgba(15, 127, 89, 0.13);
}

.spb-collection-card:hover,
.spb-collection-card:focus-visible {
  border-color: #0f7f59;
  color: #fff;
  background: linear-gradient(135deg, #0f7f59 0%, #184a30 100%);
  box-shadow: 0 18px 36px rgba(15, 127, 89, 0.24);
  transform: translateY(-2px);
}

.spb-collection-card span {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: #096b4a;
  background: #dff6eb;
  font-size: 12px;
  font-weight: 900;
}

.spb-collection-card strong {
  font-size: 22px;
  line-height: 1.15;
}

.spb-collection-card small {
  color: #526176;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.spb-collection-card:hover span,
.spb-collection-card:focus-visible span {
  color: #0f5d43;
  background: rgba(255, 255, 255, 0.96);
}

.spb-collection-card:hover strong,
.spb-collection-card:focus-visible strong {
  color: #fff;
}

.spb-collection-card:hover small,
.spb-collection-card:focus-visible small {
  color: rgba(255, 255, 255, 0.9);
}

.spb-category-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.spb-category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.spb-category-head h2 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.spb-category-head span {
  color: #526176;
  font-weight: 900;
}

.spb-category-head > strong {
  border-radius: 999px;
  padding: 7px 11px;
  color: #096b4a;
  background: #dff6eb;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.spb-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.spb-bank-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 138px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.spb-bank-card.active {
  border-color: #8dc9b0;
  background: #f3fbf7;
  box-shadow: 0 16px 34px rgba(15, 127, 89, 0.13);
  transform: translateY(-2px);
}

.spb-bank-card:hover,
.spb-bank-card:focus-visible {
  border-color: #0f7f59;
  color: #fff;
  background: linear-gradient(135deg, #0f7f59 0%, #184a30 100%);
  box-shadow: 0 18px 36px rgba(15, 127, 89, 0.24);
  transform: translateY(-2px);
}

.spb-bank-card.locked {
  opacity: 0.68;
}

.spb-bank-status {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: #526176;
  background: #eef3f0;
  font-size: 12px;
  font-weight: 900;
}

.spb-bank-card.synced .spb-bank-status,
.spb-group-actions > strong {
  color: #096b4a;
  background: #dff6eb;
}

.spb-bank-card strong {
  margin-top: 12px;
  font-size: 25px;
  line-height: 1.1;
}

.spb-bank-card em,
.spb-bank-card small {
  color: #526176;
  font-style: normal;
  font-weight: 900;
}

.spb-bank-card small {
  margin-top: 12px;
  color: var(--accent-dark);
}

.spb-bank-card:hover .spb-bank-status,
.spb-bank-card:focus-visible .spb-bank-status {
  color: #0f5d43;
  background: rgba(255, 255, 255, 0.96);
}

.spb-bank-card:hover em,
.spb-bank-card:hover small,
.spb-bank-card:hover strong,
.spb-bank-card:focus-visible em,
.spb-bank-card:focus-visible small,
.spb-bank-card:focus-visible strong {
  color: #fff;
}

.spb-group-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.spb-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.spb-group-head h2 {
  margin: 4px 0;
  font-size: 26px;
  letter-spacing: 0;
}

.spb-group-head span {
  color: #526176;
  font-weight: 800;
}

.spb-group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.spb-group-actions > strong {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.spb-sync-notice {
  margin: 0;
}

.spb-sync-progress {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(15, 127, 89, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, #f8fffb 0%, #eff9f3 100%);
}

.spb-sync-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.spb-sync-progress-meta span {
  min-width: 0;
}

.spb-sync-progress-meta strong {
  color: var(--accent);
  white-space: nowrap;
}

.spb-sync-progress-current {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.spb-sync-progress.is-syncing .sync-progress span {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.24) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.24) 75%,
    transparent 75%,
    transparent
  );
  background-size: 22px 22px;
  animation: sync-stripes 0.8s linear infinite;
}

.spb-sync-progress.has-error {
  border-color: #ffd8d3;
  background: #fff8f7;
}

.spb-sync-progress.has-error .sync-progress span {
  background: var(--warn);
}

.spb-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.spb-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 82px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.spb-list-card:hover,
.spb-list-card:focus-within {
  border-color: #0f7f59;
  color: #fff;
  background: linear-gradient(135deg, #0f7f59 0%, #184a30 100%);
  box-shadow: 0 18px 36px rgba(15, 127, 89, 0.2);
  transform: translateY(-2px);
}

.spb-list-main {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: inherit;
  text-align: left;
}

.spb-list-main span,
.spb-list-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spb-list-main span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.spb-list-main small {
  color: #526176;
  font-size: 12px;
  font-weight: 900;
}

.spb-list-count {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 74px;
  min-height: 54px;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--accent-dark);
  background: #e9f8f1;
  line-height: 1;
  text-align: center;
}

.spb-list-count strong {
  color: var(--accent-dark);
  font-size: 20px;
  font-weight: 900;
}

.spb-list-count span {
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.spb-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spb-list-card:hover .spb-list-main span,
.spb-list-card:hover .spb-list-main small,
.spb-list-card:focus-within .spb-list-main span,
.spb-list-card:focus-within .spb-list-main small {
  color: #fff;
}

.spb-list-card:hover .spb-list-count,
.spb-list-card:focus-within .spb-list-count {
  color: #0f5d43;
  background: rgba(255, 255, 255, 0.92);
}

.spb-list-card:hover .spb-list-count strong,
.spb-list-card:focus-within .spb-list-count strong {
  color: #0f5d43;
}

.spb-list-card:hover .secondary-button,
.spb-list-card:focus-within .secondary-button {
  border-color: rgba(255, 255, 255, 0.56);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.spb-list-card:hover .primary-action-button,
.spb-list-card:focus-within .primary-action-button {
  color: #0f5d43;
  background: #fff;
}

.spb-empty-panel {
  display: grid;
  gap: 8px;
  border: 1px dashed #b9daca;
  border-radius: var(--radius);
  padding: 24px;
  color: #526176;
  background: #f8fcfa;
  font-weight: 900;
}

.challenge-day-word img,
.challenge-day-word .image-fallback {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.challenge-day-result {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.challenge-day-word.is-correct .challenge-day-result {
  background: var(--accent);
}

.challenge-day-word.is-wrong .challenge-day-result {
  background: var(--error);
}

.challenge-day-word-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.challenge-day-word-body h2 {
  margin: 0 0 3px;
  font-size: 18px;
  letter-spacing: 0;
}

.challenge-day-word-body span,
.challenge-day-word-body p {
  margin: 0;
  color: var(--muted);
}

.challenge-day-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 900;
}

.challenge-day-status {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 900;
}

.challenge-day-status.is-correct {
  background: #e2f6ec;
  color: var(--accent-dark);
}

.challenge-day-status.is-wrong {
  background: #fde8e8;
  color: var(--error);
}

.challenge-day-word > .challenge-day-status {
  display: none;
}

.challenge-day-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.challenge-day-counts span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f5f7f8;
  font-size: 12px;
  font-weight: 900;
}

.challenge-day-counts .is-corrected {
  color: var(--accent-dark);
  background: #e4f6ee;
}

.challenge-day-filter-empty {
  margin-top: 16px;
}

.word-card img,
.detail-media img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
}

.word-grid .word-card:not(.list-card) > img {
  object-fit: contain;
  background: linear-gradient(135deg, #f3faf6 0%, #e6f0eb 100%);
}

.word-card-body {
  padding: 14px;
}

.word-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.word-card-title-main {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.word-card-title-main strong {
  min-width: 0;
}

.word-audio-badge {
  display: inline-grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(29, 127, 91, 0.2);
  border-radius: 999px;
  color: var(--accent-dark);
  background: #e4f6ee;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.word-audio-issue-badge,
.word-image-issue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #b42318;
  background: #fee4e2;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.word-image-issue-badge {
  color: var(--accent-dark);
  background: #e4f6ee;
}

.status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: #eef2f6;
  color: var(--muted);
}

.status.done {
  background: #e4f6ee;
  color: var(--accent-dark);
}

.status.failed {
  background: #fff1e3;
  color: var(--warn);
}

.challenge-result-badges {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  align-items: center;
}

.challenge-result-badge {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.challenge-result-badge.is-correct {
  background: #e4f6ee;
  color: var(--accent-dark);
}

.challenge-result-badge.is-wrong {
  background: #fff1e3;
  color: var(--warn);
}

.image-fallback {
  display: grid;
  place-items: center;
  height: 168px;
  background: linear-gradient(135deg, #edf6f1 0%, #dfe9e2 100%);
  color: var(--accent-dark);
  font-size: 56px;
  font-weight: 800;
}

.image-fallback.large {
  height: 100%;
  min-height: 360px;
  font-size: 96px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 24px;
  align-items: start;
}

.challenge-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(251, 253, 251, 0.96) 100%);
}

.challenge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.challenge-top h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.challenge-top-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  flex-wrap: wrap;
}

.challenge-top-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.challenge-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-page-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 96px;
  overflow: hidden;
  margin-bottom: 0;
  padding: 20px 22px;
  border-color: rgba(29, 127, 91, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 243, 0.94));
}

.app-page-heading.has-return-link {
  align-items: center;
  justify-content: space-between;
}

.app-page-heading::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 0;
  left: 22px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, rgba(29, 127, 91, 0.54), rgba(29, 127, 91, 0));
}

.app-page-heading .page-heading-title,
.lists-page-heading > div:first-child {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.app-page-heading .section-kicker {
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 11px;
  line-height: 1.2;
}

.app-page-heading .page-heading-return-button {
  flex: 0 0 auto;
  margin-left: auto;
  border-color: rgba(16, 128, 91, 0.32);
  background: #eaf7f1;
  color: #0b6f4c;
  text-decoration: none;
  white-space: nowrap;
}

.app-page-heading .page-heading-return-button:hover,
.app-page-heading .page-heading-return-button:focus-visible {
  border-color: #0f7f59;
  background: #0f7f59;
  color: #fff;
}

.lists-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lists-page-heading-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.list-word-search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border-color: rgba(29, 127, 91, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 244, 0.94));
}

.list-word-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.list-word-search-field {
  position: relative;
  display: block;
}

.list-word-search-field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #709082;
  transform: translateY(-50%);
  pointer-events: none;
}

.list-word-search-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(29, 127, 91, 0.17);
  border-radius: 10px;
  padding: 0 14px 0 44px;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.list-word-search-form input:focus {
  border-color: rgba(29, 127, 91, 0.56);
  box-shadow: 0 0 0 3px rgba(29, 127, 91, 0.12);
  outline: 0;
}

.list-word-search-button,
.list-word-clear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border-radius: 10px;
}

.list-word-clear-button {
  width: 44px;
  padding: 0;
  background: #fff;
}

.list-word-search-results {
  display: grid;
  gap: 10px;
}

.list-word-search-result {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(18, 35, 47, 0.08);
  border-radius: 10px;
  padding: 10px;
  background: #fbfdfb;
}

.list-word-search-word {
  display: grid;
  gap: 4px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.list-word-search-word strong {
  color: var(--ink);
  font-size: 18px;
}

.list-word-search-word span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-word-search-word:hover strong,
.list-word-search-word:focus-visible strong {
  color: var(--accent-dark);
}

.list-word-search-lists {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.list-word-search-lists button {
  border: 1px solid rgba(29, 127, 91, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.list-word-search-lists button:hover,
.list-word-search-lists button:focus-visible {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.list-word-search-notice,
.list-word-search-empty {
  margin: 0;
}

.app-page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.08;
}

.lists-create-backdrop {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 10%, rgba(15, 127, 89, 0.14), transparent 34%),
    rgba(21, 31, 43, 0.58);
  backdrop-filter: blur(7px);
}

.lists-create-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(780px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(15, 127, 89, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(243, 190, 95, 0.13), transparent 28%),
    var(--panel);
  box-shadow: 0 26px 80px rgba(21, 31, 43, 0.3);
}

.lists-create-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 127, 89, 0.12);
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, rgba(246, 253, 250, 0.98), rgba(255, 255, 255, 0.94));
}

.lists-create-heading h2,
.lists-create-heading p {
  margin: 0;
}

.lists-create-heading h2 {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.08;
}

.lists-create-heading p:not(.section-kicker) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.lists-create-body {
  min-height: 0;
  overflow: auto;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 251, 248, 0.72));
}

.lists-create-body .lists-tools-panel {
  margin: 0;
  box-shadow: none;
}

.lists-create-modal > .version-stamp,
.book-upload-modal > .version-stamp {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 12px 18px;
  background: #fbfdfb;
}

.plain-card-button,
button.home-stat-card,
button.calendar-day {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.calendar-day {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.plain-card-button {
  display: block;
  padding: 0;
  background: transparent;
}

.list-title-input,
.inline-edit-input,
.definition-list textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.list-title-input {
  max-width: 32rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
}

.definition-list textarea,
.inline-edit-input {
  min-height: 5rem;
  resize: vertical;
}

.inline-image-grid {
  margin-top: 1rem;
  max-height: 28rem;
  overflow: auto;
}

.booklearner-page {
  display: grid;
  gap: 18px;
}

.booklearner-page .quote-home-panel,
.booklearner-page .query-panel,
.booklearner-page .results > .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.booklearner-page .quote-home-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.booklearner-page .quote-home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.booklearner-page .quote-home-head h1,
.booklearner-page .quote-home-head p {
  margin: 0;
}

.booklearner-page .quote-home-head h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

.booklearner-page .quote-home-head p {
  color: var(--muted);
  line-height: 1.55;
}

.booklearner-page .quote-head-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.booklearner-page .quote-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 800;
}

.booklearner-page .quote-upload-link {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.booklearner-page .featured-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.booklearner-page .featured-quotes-list {
  grid-template-columns: 1fr;
}

.booklearner-page .quote-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--panel-soft);
  box-shadow: var(--shadow-sm);
}

.booklearner-page .quote-card p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.55;
}

.booklearner-page .quote-card strong {
  color: var(--muted);
  font-size: 13px;
}

.booklearner-heading-panel {
  margin-bottom: 16px;
}

.book-quote-feed {
  display: grid;
  gap: 14px;
}

.book-quote-feed-head,
.book-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.book-quote-feed-head h2,
.book-section-head h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.book-quote-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.book-quote-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(180px, 0.32fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 6px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.book-quote-row:hover {
  background: #f8fbf9;
}

.book-quote-cover {
  display: block;
  width: 76px;
  height: 104px;
  overflow: hidden;
  border: 1px solid rgba(29, 127, 91, 0.12);
  border-radius: 10px;
  background: #eef5f0;
  box-shadow: var(--shadow-sm);
}

.book-quote-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-quote-cover .book-history-cover-fallback {
  height: 100%;
  min-height: 0;
  padding: 10px;
  border-radius: 0;
}

.book-quote-cover .book-history-cover-fallback::before {
  inset: 12px 14px auto auto;
  width: 42px;
  height: 42px;
}

.book-quote-cover .book-history-cover-fallback::after {
  right: -38px;
  bottom: -40px;
  width: 92px;
  height: 92px;
}

.book-quote-cover .book-history-cover-fallback span {
  font-size: 10px;
}

.book-quote-cover .book-history-cover-fallback strong {
  font-size: 34px;
}

.book-quote-body {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.book-quote-mark {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 0.9;
}

.book-quote-text {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

.book-quote-source {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.book-quote-source span {
  color: var(--muted);
  font-size: 12px;
}

.book-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.book-detail-main {
  display: grid;
  gap: 22px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 249, 0.98));
}

.book-detail-hero {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  border: 1px solid rgba(29, 127, 91, 0.14);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: #fbfdfb;
  box-shadow: var(--shadow-sm);
}

.book-detail-cover {
  display: grid;
  gap: 10px;
  align-content: start;
}

.book-detail-cover-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(18, 35, 47, 0.08);
  border-radius: var(--radius-lg);
  background: #edf5ef;
  box-shadow: 0 16px 34px rgba(23, 32, 44, 0.12);
}

.book-detail-cover-action {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.book-detail-cover-action:hover,
.book-detail-cover-action:focus-visible {
  border-color: rgba(29, 127, 91, 0.54);
  box-shadow: 0 18px 38px rgba(23, 32, 44, 0.16), 0 0 0 3px rgba(29, 127, 91, 0.12);
}

.book-detail-cover img,
.book-detail-cover .book-history-cover-fallback {
  display: block;
  width: 100%;
  height: 292px;
  object-fit: cover;
}

.book-cover-manager-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(13, 88, 61, 0.88);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(21, 31, 43, 0.2);
}

.book-cover-manager-trigger {
  box-shadow: 0 8px 22px rgba(29, 127, 91, 0.1);
}

.book-detail-info {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.book-detail-info h2 {
  margin: 0;
  color: var(--ink);
  font-size: 38px;
  line-height: 1.12;
}

.book-detail-info p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.book-related-section,
.book-quotes-section,
.book-vocabulary-panel {
  display: grid;
  gap: 14px;
}

.book-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.book-related-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 9px;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.book-related-card:hover {
  border-color: rgba(29, 127, 91, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.book-related-card img,
.book-related-card > span {
  width: 100%;
  height: 106px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9f8f1;
}

.book-related-card > span {
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-size: 34px;
  font-weight: 900;
}

.book-related-card strong {
  font-size: 13px;
  line-height: 1.3;
}

.book-detail-quote-list {
  display: grid;
  gap: 12px;
}

.book-detail-quote {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(18, 35, 47, 0.1);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.book-detail-quote.is-current {
  border-color: rgba(29, 127, 91, 0.46);
  background: linear-gradient(180deg, #f3fbf7, #fff);
  box-shadow:
    inset 5px 0 0 var(--accent),
    0 16px 34px rgba(29, 127, 91, 0.1);
}

.book-detail-quote span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-weight: 900;
}

.book-detail-quote p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.62;
}

.book-detail-quote small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 700;
}

.book-vocabulary-panel {
  position: sticky;
  top: 82px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(251, 253, 251, 0.98), rgba(255, 255, 255, 0.98));
}

.book-vocabulary-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 2px;
}

.book-vocabulary-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(18, 35, 47, 0.1);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.book-vocabulary-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.book-vocabulary-card span {
  width: max-content;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
}

.book-vocabulary-card p,
.book-vocabulary-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.book-vocabulary-card small {
  color: #56667a;
}

.book-vocabulary-head {
  align-items: flex-start;
}

.book-vocabulary-return-button {
  flex: 0 0 auto;
  border-color: #bfe9d2;
  background: #ecfdf4;
  color: var(--accent-dark);
  font-weight: 900;
}

.book-vocabulary-return-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.science-discovery-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 252, 249, 0.98));
}

.science-discovery-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.science-discovery-head h2,
.science-article-panel h1 {
  margin: 4px 0 6px;
  color: var(--ink);
  line-height: 1.12;
}

.science-discovery-head h2 {
  font-size: 28px;
}

.science-discovery-head p,
.science-article-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.science-refresh-button {
  min-width: 92px;
  border-color: #bfe9d2;
  background: #ecfdf4;
  color: var(--accent-dark);
  font-weight: 900;
}

.science-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(190px, 1fr);
  gap: 12px;
  align-items: end;
}

.science-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.science-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.science-cache-note {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(29, 127, 91, 0.16);
  border-radius: 10px;
  padding: 9px 12px;
  background: #f3fbf7;
  color: var(--muted);
  font-size: 13px;
}

.science-cache-note strong {
  color: var(--accent-dark);
}

.science-cache-note small {
  color: #6c7a8d;
  font-weight: 800;
}

.science-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.science-source-strip a {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent-dark);
  background: #e9f8f1;
  text-decoration: none;
}

.science-discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.science-discovery-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 300px;
  border: 1px solid rgba(18, 35, 47, 0.1);
  border-radius: var(--radius-lg);
  padding: 12px;
  color: inherit;
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.science-discovery-card:hover {
  border-color: rgba(29, 127, 91, 0.36);
  color: #fff;
  background: linear-gradient(135deg, #176f50, #0e4738);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.science-card-image {
  height: 132px;
  margin: -2px -2px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #e9f8f1;
}

.science-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.science-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.science-card-topline span,
.science-word-chips span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
}

.science-card-topline small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.science-discovery-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.22;
}

.science-discovery-card p {
  margin: 0;
  color: #4f6074;
  line-height: 1.5;
}

.science-discovery-card:hover h3,
.science-discovery-card:hover p,
.science-discovery-card:hover .science-card-topline small {
  color: #fff;
}

.science-discovery-card:hover .science-card-topline span,
.science-discovery-card:hover .science-word-chips span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.science-word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.science-article-panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 249, 0.98));
}

.science-back-button {
  justify-self: end;
  border-color: #bfe9d2;
  background: #ecfdf4;
  color: var(--accent-dark);
  font-weight: 900;
}

.science-article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.science-article-kicker strong,
.science-article-kicker small {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
}

.science-article-panel h1 {
  max-width: 780px;
  font-size: 42px;
}

.science-article-actions {
  display: flex;
  justify-content: flex-start;
}

.science-read-more-button {
  border-color: #bfe9d2;
  color: var(--accent-dark);
  background: #ecfdf4;
  font-weight: 900;
  text-decoration: none;
}

.science-read-more-button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.science-full-article-error {
  margin: -6px 0 0;
}

.science-article-hero-image {
  max-height: 340px;
  border: 1px solid rgba(29, 127, 91, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #eef8f1;
  box-shadow: var(--shadow-sm);
}

.science-article-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
}

.science-article-source {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
}

.science-article-source a {
  color: var(--accent-dark);
}

.science-reading-body {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(29, 127, 91, 0.14);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.science-reading-body.has-full-article {
  border-color: rgba(29, 127, 91, 0.24);
  background: linear-gradient(180deg, #ffffff, #fbfffc);
}

.science-full-article-note {
  border: 1px solid rgba(29, 127, 91, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--accent-dark);
  background: #effaf4;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.science-inline-figure {
  display: grid;
  gap: 10px;
  margin: 2px 0 6px;
  border: 1px solid rgba(29, 127, 91, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: #f6fbf8;
}

.science-inline-figure img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.science-inline-figure figcaption {
  padding: 0 14px 14px;
  color: #43566a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.science-reading-body p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.72;
}

.science-article-section {
  display: grid;
  gap: 12px;
}

.science-vocabulary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.science-vocabulary-grid span {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-weight: 900;
}

.science-quiz-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.science-quiz-list li {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.science-quiz-question-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.science-answer-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #bfe9d2;
  border-radius: 999px;
  padding: 0;
  color: var(--accent-dark);
  background: #ecfdf4;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.science-answer-toggle:hover {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(18, 120, 86, 0.18);
  transform: translateY(-1px);
}

.science-quiz-response {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.science-quiz-response textarea {
  min-height: 52px;
  width: 100%;
  border: 1px solid rgba(29, 127, 91, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfffd;
  font: 800 14px/1.45 Inter, "Segoe UI", Arial, sans-serif;
  resize: vertical;
}

.science-quiz-response textarea:focus {
  border-color: rgba(29, 127, 91, 0.52);
  box-shadow: 0 0 0 3px rgba(29, 127, 91, 0.12);
  outline: 0;
}

.science-quiz-check {
  min-width: 96px;
  border-color: #bfe9d2;
  color: var(--accent-dark);
  background: #ecfdf4;
  font-weight: 900;
}

.science-quiz-feedback {
  margin: 0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.science-quiz-feedback.is-good {
  color: #075f42;
  background: #e7f8ee;
}

.science-quiz-feedback.is-near {
  color: #7b520c;
  background: #fff6d8;
}

.science-quiz-feedback.is-try,
.science-quiz-feedback.is-empty {
  color: #8a3140;
  background: #fff0f1;
}

.science-quiz-list .science-quiz-answer {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.science-quiz-list .science-quiz-answer.is-hidden {
  width: min(320px, 100%);
  height: 14px;
  border-radius: 999px;
  color: transparent;
  background: linear-gradient(90deg, #eaf4ef, #d9eadf, #eaf4ef);
  user-select: none;
}

.science-parent-note {
  display: grid;
  gap: 8px;
  border: 1px solid #bfe9d2;
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #f3fbf7;
}

.science-parent-note p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.book-history-link {
  height: 100%;
}

.book-history-cover {
  background: #eef5f0;
}

.book-history-cover-fallback {
  position: relative;
  display: grid;
  align-content: end;
  height: 168px;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 35, 47, 0.2), rgba(18, 35, 47, 0.72)),
    linear-gradient(135deg, #1d7f5b, #8bbfa9);
}

.book-history-cover-fallback::before,
.book-history-cover-fallback::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.book-history-cover-fallback::before {
  inset: 18px 28px auto auto;
  width: 80px;
  height: 80px;
}

.book-history-cover-fallback::after {
  right: -34px;
  bottom: -38px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.08);
}

.book-history-cover-fallback span {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.book-history-cover-fallback strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  line-height: 0.9;
}

.book-history-cover-fallback.cover-seed-1 {
  background:
    linear-gradient(135deg, rgba(18, 35, 47, 0.18), rgba(18, 35, 47, 0.7)),
    linear-gradient(135deg, #5f7ea8, #d08f7d);
}

.book-history-cover-fallback.cover-seed-2 {
  background:
    linear-gradient(135deg, rgba(18, 35, 47, 0.18), rgba(18, 35, 47, 0.72)),
    linear-gradient(135deg, #8a6f4d, #d6b25e);
}

.book-history-cover-fallback.cover-seed-3 {
  background:
    linear-gradient(135deg, rgba(18, 35, 47, 0.2), rgba(18, 35, 47, 0.7)),
    linear-gradient(135deg, #147a7e, #98c5d2);
}

.book-history-cover-fallback.cover-seed-4 {
  background:
    linear-gradient(135deg, rgba(18, 35, 47, 0.2), rgba(18, 35, 47, 0.74)),
    linear-gradient(135deg, #7d5a8c, #c398c9);
}

.book-history-cover-fallback.cover-seed-5 {
  background:
    linear-gradient(135deg, rgba(18, 35, 47, 0.18), rgba(18, 35, 47, 0.72)),
    linear-gradient(135deg, #7f5b4a, #d3a16f);
}

.booklearner-page .book-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.booklearner-page .query-panel,
.booklearner-page .results > .panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.booklearner-page .form {
  display: grid;
  gap: 10px;
}

.booklearner-page .input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.booklearner-page textarea {
  min-height: 180px;
  resize: vertical;
}

.book-upload-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 35, 47, 0.48);
  backdrop-filter: blur(6px);
}

.book-upload-modal {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(18, 35, 47, 0.24);
}

.book-upload-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.book-upload-modal-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.book-upload-modal .book-workspace {
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  padding: 18px;
}

.book-file-picker {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(29, 127, 91, 0.42);
  border-radius: 8px;
  padding: 12px;
  color: var(--accent-dark);
  background: #f8fffb;
  text-align: center;
  cursor: pointer;
}

.book-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.book-file-picker span {
  font-weight: 900;
}

.book-file-picker small {
  color: var(--muted);
  font-weight: 700;
}

.book-upload-book-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(29, 127, 91, 0.16);
  border-radius: var(--radius-lg);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(246, 252, 248, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: var(--shadow-sm);
}

.book-upload-cover {
  overflow: hidden;
  border: 1px solid rgba(18, 35, 47, 0.1);
  border-radius: 8px;
  background: #edf5ef;
}

.book-upload-cover img,
.book-upload-cover .book-history-cover-fallback {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.book-upload-book-meta {
  display: grid;
  gap: 10px;
}

.book-upload-book-meta h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.book-upload-book-meta p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.book-upload-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.book-upload-preview-panel {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.book-upload-preview-section {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(18, 35, 47, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.book-upload-preview-section.is-quotes {
  background: linear-gradient(180deg, #fff, #fbfdfb);
}

.book-upload-preview-section.is-vocabulary {
  background: linear-gradient(180deg, #fbfdfb, #fff);
}

.book-upload-quote-list,
.book-upload-vocabulary-list {
  display: grid;
  gap: 10px;
}

.book-upload-quote {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(18, 35, 47, 0.09);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.book-upload-quote span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #e9f8f1;
  font-weight: 900;
}

.book-upload-quote p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.55;
}

.book-upload-quote small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 700;
}

.book-detail-panel {
  display: grid;
  gap: 14px;
}

.book-detail-summary {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.book-detail-summary h2 {
  margin: 4px 0 6px;
  font-size: 28px;
}

.book-detail-summary p {
  margin: 0;
  color: var(--muted);
}

.book-detail-create-button {
  width: auto;
  min-width: 150px;
}

.book-detail-create-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.book-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-detail-stats span {
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--accent-dark);
  background: #e8f7f0;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(29, 127, 91, 0.08);
}

@media (max-width: 900px) {
  .book-upload-modal {
    width: calc(100vw - 24px);
  }

  .book-upload-modal-backdrop {
    padding: 12px;
  }

  .book-upload-modal .book-workspace {
    grid-template-columns: 1fr;
  }

  .book-detail-summary {
    display: grid;
  }

  .book-quote-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .book-quote-cover {
    width: 64px;
    height: 88px;
  }

  .book-quote-body {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .book-quote-mark {
    font-size: 28px;
  }

  .book-quote-source {
    grid-column: 2;
  }

  .book-detail-layout {
    grid-template-columns: 1fr;
  }

  .book-detail-hero {
    grid-template-columns: 1fr;
  }

  .book-vocabulary-panel {
    position: static;
  }

  .book-vocabulary-list {
    max-height: none;
  }

  .science-discovery-head,
  .science-toolbar {
    grid-template-columns: 1fr;
  }

  .science-discovery-head {
    display: grid;
  }

  .science-article-panel {
    padding: 18px;
  }

  .science-article-panel h1 {
    font-size: 32px;
  }

  .growth-detail-hero {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .growth-detail-hero > strong {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .growth-level-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .growth-level-head strong,
  .growth-level-head em {
    grid-column: auto;
    grid-row: auto;
  }

  .challenge-day-stats {
    grid-template-columns: 1fr;
  }
}

button.home-stat-card {
  display: grid;
}

button.calendar-day:disabled {
  cursor: default;
}

.challenge-large-progress {
  height: 12px;
}

.challenge-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.challenge-stats div,
.challenge-result-grid div {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.challenge-stats span,
.challenge-result-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.challenge-stats strong,
.challenge-result-grid strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.result-correct {
  color: var(--accent-dark) !important;
}

.result-wrong {
  color: #b42318 !important;
}

.challenge-card {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.challenge-word-card {
  display: grid;
  gap: 16px;
}

.challenge-word-prompt {
  display: grid;
  gap: 10px;
}

.challenge-prompt-list {
  display: grid;
  gap: 10px;
}

.challenge-prompt-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.76);
}

.challenge-prompt-item.is-highlight {
  border-color: rgba(29, 127, 91, 0.38);
  background: #eefaf4;
  box-shadow: inset 4px 0 0 var(--accent);
}

.challenge-prompt-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.challenge-prompt-value {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

.challenge-prompt-item.is-highlight .challenge-prompt-value {
  color: var(--accent-dark);
  font-size: 17px;
}

.challenge-word-media {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.challenge-word-media img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.challenge-word-body {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  box-shadow: var(--shadow-sm);
}

.challenge-word-body h2,
.challenge-complete h2 {
  margin: 0;
  font-size: 42px;
  letter-spacing: 0;
}

.spelling-prompt {
  color: var(--accent-dark);
}

.challenge-audio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.challenge-audio-row audio {
  display: block;
  width: 100%;
  min-width: 0;
  height: 38px;
}

.challenge-audio-row .secondary-button {
  width: 100%;
  min-height: 38px;
}

.challenge-audio-row label {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.challenge-audio-label-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.challenge-media-issue-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 24px;
  width: 100%;
}

.challenge-media-issue-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border: 1px solid #fecdca;
  border-radius: 999px;
  padding: 3px 7px;
  color: #b42318;
  background: #fff7f5;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.challenge-media-issue-button:hover,
.challenge-media-issue-button:focus-visible,
.challenge-media-issue-button.active {
  border-color: #b42318;
  color: #ffffff;
  background: #b42318;
}

.challenge-image-issue-button {
  border-color: #b7e4d5;
  color: var(--accent-dark);
  background: #eefaf5;
}

.challenge-image-issue-button:hover,
.challenge-image-issue-button:focus-visible,
.challenge-image-issue-button.active {
  border-color: var(--accent-dark);
  color: #ffffff;
  background: var(--accent-dark);
}

.challenge-media-issue-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.speech-audio-player {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7f5 100%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.speech-audio-player.is-playing {
  border-color: rgba(29, 127, 91, 0.35);
  background: var(--accent-soft);
  box-shadow: var(--focus-ring);
}

.speech-audio-play {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(29, 127, 91, 0.18);
}

.speech-audio-play:hover {
  background: var(--accent-dark);
}

.speech-audio-track {
  position: relative;
  height: 5px;
  min-width: 52px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e3;
}

.speech-audio-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.12s linear;
}

.speech-audio-time {
  min-width: 58px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.challenge-audio-actions {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.spelling-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.spelling-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.spelling-form input[type="text"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.challenge-answer-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.challenge-spelling-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 20px;
  font-weight: 800;
}

.challenge-answer-panel .challenge-actions {
  justify-content: flex-end;
}

.challenge-answer-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 29, 43, 0.46);
  backdrop-filter: blur(4px);
}

.challenge-answer-modal {
  position: relative;
  display: grid;
  width: min(760px, 100%);
  min-height: 320px;
  gap: 14px;
  padding: 34px 34px 92px;
  border: 1px solid rgba(178, 56, 56, 0.18);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 29, 43, 0.24);
}

.challenge-answer-modal h2 {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
}

.challenge-correct-answer {
  display: block;
  color: #0f5138;
  font-size: clamp(46px, 8vw, 78px);
  line-height: 1;
  letter-spacing: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  white-space: nowrap;
}

.challenge-answer-diff {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
}

.challenge-answer-letter {
  display: inline-grid;
  min-width: 0.58em;
  place-items: center;
  border-radius: 8px;
}

.challenge-answer-letter.is-match {
  color: #0f5138;
}

.challenge-answer-letter.is-missing {
  color: #b42318;
  background: #fee4e2;
  box-shadow: inset 0 -6px 0 rgba(180, 35, 24, 0.16);
}

.challenge-answer-letter.is-wrong {
  color: #b54708;
  background: #fff4d6;
  box-shadow: inset 0 -6px 0 rgba(181, 71, 8, 0.18);
}

.challenge-typed-answer {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.challenge-typed-answer span {
  color: #b42318;
}

.challenge-extra-answer {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.challenge-extra-answer span {
  color: #b42318;
}

.challenge-answer-confirm {
  position: absolute;
  right: 24px;
  bottom: 24px;
  min-width: 128px;
}

.challenge-count {
  font-weight: 800;
}

.definition-list.compact {
  grid-template-columns: 82px 1fr;
}

.challenge-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.challenge-complete {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.challenge-result-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.challenge-complete-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-media,
.word-image-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.word-image-frame {
  display: grid;
  place-items: center;
  min-height: 280px;
}

.detail-media-panel,
.media-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.word-media-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.media-manager-button,
.image-manager-trigger {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.audio-manager-trigger {
  border-color: rgba(29, 127, 91, 0.24);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.audio-manager-trigger:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.detail-media img,
.word-image-frame img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.word-image-frame img {
  width: 100%;
  height: auto;
  max-height: min(68vh, 560px);
  object-fit: contain;
}

.word-image-frame .image-fallback {
  height: 420px;
}

.image-replace-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.image-replace-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.image-replace-form input[type="file"] {
  max-width: 100%;
}

.ai-image-status {
  grid-column: 1 / -1;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.image-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 31, 43, 0.52);
}

.image-picker-backdrop[hidden] {
  display: none;
}

.image-picker-modal {
  display: grid;
  gap: 16px;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: auto;
  border-radius: 10px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(21, 31, 43, 0.28);
}

.image-picker-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.image-picker-heading h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.image-picker-heading p {
  color: var(--muted);
  font-size: 14px;
}

.image-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.image-candidate-button {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.image-candidate-button:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.14);
}

.image-candidate-button img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.word-image-manager-backdrop {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 31, 43, 0.56);
}

.word-image-manager-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(21, 31, 43, 0.28);
}

.word-image-manager-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.word-image-manager-heading h2,
.word-image-manager-heading p {
  margin: 0;
}

.word-image-manager-heading h2 {
  font-size: 22px;
}

.word-image-manager-heading p:not(.section-kicker),
.word-image-manager-section p,
.word-image-manager-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.word-image-manager-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}

.word-image-manager-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-soft);
}

.word-image-manager-section h3,
.word-image-manager-section p {
  margin: 0;
}

.word-image-manager-section h3 {
  font-size: 16px;
}

.word-image-compare-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fbfcfa;
}

.word-image-compare-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
}

.word-image-compare-card.is-replacement {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.word-image-replacement-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.word-image-manager-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.word-image-save-replacement {
  width: 100%;
}

.word-image-save-bar {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
}

.ai-image-model-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ai-image-model-actions .secondary-button {
  padding: 8px 10px;
  font-size: 12px;
}

.ai-image-model-actions .ai-image-generate-button {
  min-width: 96px;
  padding: 8px 14px;
  font-size: 12px;
}

.ai-image-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-image-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ai-image-form-grid input,
.ai-image-form-grid select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.ai-image-candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-image-candidate {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.ai-image-candidate.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 127, 91, 0.13);
}

.ai-image-candidate img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.ai-image-candidate span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-image-preview {
  display: grid;
  gap: 10px;
}

.ai-image-preview img {
  width: 100%;
  max-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 760px) {
  .ai-image-form-grid,
  .ai-image-candidate-grid {
    grid-template-columns: 1fr;
  }
}

.word-image-manager-preview,
.word-image-upload-preview {
  width: 100%;
  max-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.word-image-compare-section .word-image-manager-preview {
  height: 250px;
  max-height: none;
}

.book-cover-compare-section .book-cover-manager-preview {
  width: min(190px, 100%);
  height: 280px;
  justify-self: center;
  object-fit: cover;
}

.word-image-manager-preview.image-fallback {
  display: grid;
  place-items: center;
  min-height: 180px;
}

.image-upload-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  border: 1px dashed rgba(29, 127, 91, 0.42);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.image-upload-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.image-upload-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.image-upload-picker strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-picker-option {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.image-picker-option:hover {
  border-color: var(--accent);
  background: #f7fbf9;
}

.image-picker-option.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.14);
}

.image-picker-radio {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(28, 36, 48, 0.62);
  box-shadow: 0 2px 8px rgba(28, 36, 48, 0.22);
}

.image-picker-option.is-selected .image-picker-radio {
  background: var(--accent);
}

.image-picker-option.is-selected .image-picker-radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: #fff;
}

.image-picker-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
  background: #eef1ed;
}

.image-picker-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.image-picker-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.image-picker-footer span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-picker-footer button:disabled {
  color: var(--muted);
  background: #eef1ed;
  cursor: not-allowed;
}

.lock-badge {
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: #e4f6ee;
  font-size: 12px;
  font-weight: 800;
}

.detail-panel {
  padding: 24px;
  background: var(--panel-soft);
}

.detail-study-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-heading-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.auto-study-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.auto-study-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auto-study-controls input {
  width: 70px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  color: var(--ink);
  font-weight: 900;
}

.auto-study-controls span {
  min-width: 120px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.challenge-auto-study-controls {
  justify-content: flex-start;
  padding-bottom: 4px;
}

.challenge-auto-study-controls label span {
  min-width: 0;
  color: var(--muted);
  text-align: left;
}

.word-study-controls {
  justify-content: flex-start;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.word-study-controls label span {
  min-width: 0;
  color: var(--muted);
  text-align: left;
}

.word-study-controls .auto-study-status {
  min-width: 110px;
  color: var(--accent-dark);
  text-align: left;
}

.word-title-stack {
  display: grid;
  gap: 8px;
}

.word-title-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.word-title-main h1[title] {
  cursor: text;
}

.word-title-stack .title-alternate-edit {
  width: min(260px, 46vw);
  min-height: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
}

.word-title-stack .title-alternate-edit:focus {
  box-shadow: 0 0 0 3px rgba(29, 127, 91, 0.12);
}

.title-alternate-text {
  max-width: min(320px, 48vw);
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.phonetic {
  color: var(--accent-dark);
  font-size: 18px;
}

.phonetic[title] {
  cursor: text;
}

.phonetic.is-placeholder {
  color: var(--muted);
  font-size: 15px;
}

.phonetic-edit-input {
  width: min(280px, 100%);
  min-height: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 700;
}

.word-audio-quick-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.word-audio-quick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.word-audio-quick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid rgba(29, 127, 91, 0.24);
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.word-audio-quick-button:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.word-audio-quick-button:disabled,
.word-audio-quick-button:disabled:hover {
  color: #8a9a92;
  border-color: rgba(120, 138, 128, 0.18);
  background: #eef3ef;
  cursor: not-allowed;
  opacity: 0.74;
}

.word-audio-quick-controls audio {
  display: none;
}

.alternate-spellings-row {
  display: flex;
  align-items: start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.alternate-spellings-row > strong {
  color: var(--ink);
  font-weight: 800;
  white-space: pre-wrap;
}

.audio-row {
  display: grid;
  gap: 12px;
  margin: 16px 0 24px;
}

.audio-row label,
.audio-accent-panel {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.audio-actions {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.audio-actions.read-only {
  grid-template-columns: auto minmax(220px, 1fr);
}

audio {
  width: 100%;
}

.audio-options {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.audio-options > p {
  color: var(--muted);
  font-size: 13px;
}

.audio-option {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: var(--shadow-sm);
}

.audio-option strong {
  color: var(--ink);
  font-size: 13px;
}

.audio-option-error {
  color: var(--error) !important;
}

.audio-option-success {
  color: var(--accent-dark) !important;
  font-weight: 800;
}

.record-audio-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-soft);
  box-shadow: var(--shadow-sm);
}

.record-audio-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.record-audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-audio-panel audio {
  width: 100%;
}

.audio-manager-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 31, 43, 0.56);
}

.audio-manager-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(21, 31, 43, 0.28);
}

.audio-manager-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.audio-manager-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.audio-manager-accent-switch {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: #fff;
}

.audio-manager-accent-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.audio-manager-accent-switch button.active {
  color: #fff;
  background: var(--accent);
}

.audio-manager-heading h2 {
  margin: 0;
  font-size: 24px;
}

.audio-manager-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.audio-manager-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel-soft);
}

.audio-manager-section.disabled {
  opacity: 0.62;
}

.audio-manager-target-panel {
  border-color: rgba(18, 128, 89, 0.22);
  background: linear-gradient(135deg, #f7fffb 0%, #eefbf5 100%);
}

.audio-manager-target-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.audio-manager-target-button {
  display: grid;
  gap: 5px;
  min-height: 98px;
  border: 1px solid rgba(137, 185, 166, 0.48);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(20, 64, 48, 0.06);
  cursor: pointer;
}

.audio-manager-target-button:hover,
.audio-manager-target-button.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #128059 0%, #0b6748 100%);
  box-shadow: 0 16px 34px rgba(18, 128, 89, 0.22);
}

.audio-manager-target-button span,
.audio-manager-target-button strong,
.audio-manager-target-button small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-manager-target-button span {
  font-weight: 900;
}

.audio-manager-target-button strong {
  color: var(--accent);
  font-size: 12px;
}

.audio-manager-target-button:hover strong,
.audio-manager-target-button.active strong {
  color: #dff9ed;
}

.audio-manager-target-button small {
  color: var(--muted);
  line-height: 1.35;
}

.audio-manager-target-button:hover small,
.audio-manager-target-button.active small {
  color: rgba(255, 255, 255, 0.82);
}

.audio-manager-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.audio-manager-ai-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.audio-manager-ai-row + .audio-manager-ai-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.audio-manager-section h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.audio-manager-section p,
.audio-manager-empty,
.audio-manager-notice {
  color: var(--muted);
  font-size: 13px;
}

.audio-manager-preview {
  border-color: rgba(18, 128, 89, 0.28);
  background: #f6fffb;
}

.audio-manager-preview audio {
  width: 100%;
}

.audio-manager-current-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent);
  background: #e9f8f1;
  font-size: 12px;
  font-weight: 900;
}

.audio-manager-field-panel {
  border-color: rgba(18, 128, 89, 0.2);
  background: #fbfffd;
}

.audio-manager-field-text {
  border-left: 3px solid rgba(18, 128, 89, 0.36);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
}

.audio-manager-button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audio-manager-options {
  display: grid;
  gap: 10px;
}

.audio-manager-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
}

.audio-manager-option strong {
  color: var(--ink);
  font-size: 13px;
}

.audio-upload-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px dashed #8ac6ad;
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfffd;
}

.audio-upload-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.audio-upload-picker span {
  display: inline-flex;
  justify-content: center;
  min-width: 96px;
  border-radius: var(--radius);
  padding: 8px 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.audio-upload-picker strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-upload-picker.disabled {
  background: #f2f5f4;
  cursor: not-allowed;
}

.audio-upload-picker.disabled span {
  background: #a7b6b0;
}

.audio-manager-save:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.definition-list {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px 18px;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  line-height: 1.7;
}

.definition-edit-form {
  display: grid;
  gap: 10px;
}

.definition-edit-form textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  background: #fff;
}

.definition-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-edit {
  display: grid;
  gap: 6px;
}

.inline-edit-text {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  white-space: pre-wrap;
  cursor: text;
}

.inline-edit-text:hover {
  border-color: rgba(29, 127, 91, 0.24);
  background: var(--accent-soft);
}

.definition-inline-edit {
  width: 100%;
}

.definition-display-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 10px;
}

.definition-display-text {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  line-height: 1.65;
  cursor: text;
}

.definition-audio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 1px solid rgba(29, 127, 91, 0.22);
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.definition-audio-button:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.definition-audio-button:disabled {
  color: #8a9a92;
  border-color: rgba(120, 138, 128, 0.18);
  background: #eef3ef;
  opacity: 0.74;
  cursor: not-allowed;
}

.definition-audio-button:disabled:hover {
  color: #8a9a92;
  border-color: rgba(120, 138, 128, 0.18);
  background: #eef3ef;
}

.definition-display-row audio {
  display: none;
}

.definition-display-text:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent-dark);
}

.inline-edit textarea {
  display: none;
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  background: #fff;
}

.inline-edit.is-editing .inline-edit-text {
  display: none;
}

.inline-edit.is-editing textarea {
  display: block;
}

.inline-edit-compact {
  flex: 1 1 auto;
  min-width: 220px;
}

.inline-edit-compact .inline-edit-text {
  min-height: 0;
  padding: 0 6px;
  color: var(--ink);
  font-weight: 800;
}

.inline-edit-compact textarea {
  min-height: 58px;
}

.inline-edit-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: #eef2f6;
  font-size: 12px;
  font-weight: 800;
}

.inline-edit-status:empty {
  display: none;
}

.list-title-edit {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-width: 0;
}

.list-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.list-title-edit h1 {
  margin-bottom: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 3px 6px;
  cursor: text;
}

.list-title-edit h1:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.list-title-edit input {
  width: min(720px, 100%);
  max-width: none;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 28, 36, 0.06);
}

.list-title-edit input:focus {
  border-color: rgba(15, 127, 89, 0.5);
  outline: 3px solid rgba(15, 127, 89, 0.12);
}

.list-title-edit-button,
.list-title-save-button,
.list-title-cancel-button {
  min-height: 36px;
  border-radius: 10px;
  white-space: nowrap;
}

.word-list-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.word-list-meta p {
  line-height: 28px;
}

.word-list-group-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(15, 127, 89, 0.18);
  border-radius: 999px;
  padding: 4px 5px 4px 12px;
  color: var(--accent-dark);
  background: rgba(232, 247, 239, 0.82);
  box-shadow: 0 8px 18px rgba(15, 28, 36, 0.06);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.word-list-group-picker select {
  min-height: 28px;
  max-width: 260px;
  border: 0;
  border-radius: 999px;
  padding: 3px 28px 3px 10px;
  color: #0b6f4c;
  background: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.word-list-group-picker select:focus {
  outline: 3px solid rgba(15, 127, 89, 0.14);
  outline-offset: 1px;
}

.word-list-group-notice {
  color: #0b6f4c;
  font-size: 12px;
  font-weight: 900;
}

.compact-button {
  min-height: 28px;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 13px;
  line-height: 18px;
}

.error-box {
  margin-top: 24px;
  padding: 12px 14px;
  color: var(--error);
  background: #fff1f0;
  border: 1px solid #ffd8d3;
  border-radius: 6px;
}

.app-error-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.app-error-box .secondary-button {
  color: #7a271a;
  background: #fff;
}

.stacked-panel {
  align-items: stretch;
  flex-direction: column;
}

.wide-form {
  align-items: end;
  padding: 18px;
  gap: 14px;
  overflow: visible;
}

.wide-form label,
.rename-form {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.wide-form label {
  flex: 1 1 190px;
  min-width: 0;
}

.wide-form input,
.wide-form select {
  width: 100%;
  min-height: 38px;
}

.rename-form {
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: end;
}

.list-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.delete-list-form {
  display: grid;
  grid-template-columns: 180px 44px auto;
  gap: 8px;
  align-items: center;
}

.delete-password-field {
  display: block;
  min-width: 0;
}

.delete-list-form .delete-password-field input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

.password-toggle-button {
  display: inline-flex;
  width: 44px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(29, 127, 91, 0.22);
  border-radius: 6px;
  color: var(--accent-dark);
  background: #eef8f3;
  cursor: pointer;
}

.password-toggle-button svg,
.password-toggle-icon {
  display: block;
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.8;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  color: #fff;
  background: var(--accent);
}

.password-toggle-button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.list-delete-error {
  margin: -8px 0 16px;
}

.sync-image-button:disabled {
  color: var(--muted);
  background: #eef1ed;
  cursor: not-allowed;
}

.image-sync-panel {
  display: none !important;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 320px) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  margin: -8px 0 18px;
  background: #fbfcfa;
}

.sync-summary {
  display: grid;
  gap: 3px;
}

.sync-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.sync-heading strong {
  font-size: 14px;
}

.sync-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sync-summary p {
  font-size: 13px;
  line-height: 1.35;
}

.sync-progress-wrap {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.sync-progress-wrap strong {
  min-width: 64px;
  color: var(--accent);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.sync-progress {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e5eae4;
  box-shadow: inset 0 0 0 1px rgba(21, 31, 43, 0.04);
}

.sync-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s ease;
}

.image-sync-panel.is-syncing .sync-progress span {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.24) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.24) 75%,
    transparent 75%,
    transparent
  );
  background-size: 22px 22px;
  animation: sync-stripes 0.8s linear infinite;
}

.image-sync-panel.is-complete .sync-progress span {
  width: 100%;
}

.image-sync-panel.has-error {
  border-color: #ffd8d3;
  background: #fff8f7;
}

.image-sync-panel.has-error .sync-progress span {
  background: var(--warn);
}

@keyframes sync-stripes {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 22px 0;
  }
}

.preview-panel {
  padding: 22px;
}

.preview-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.preview-form {
  display: grid;
  gap: 16px;
}

.import-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.import-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.word-column-picker {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

.sheet-picker {
  min-width: 180px;
}

.sheet-picker select,
.sheet-picker input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.word-column-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  text-align: left;
}

.word-column-trigger::after {
  content: "选择";
  flex: 0 0 auto;
  margin-left: 12px;
  color: var(--accent-dark);
  font-size: 12px;
}

.word-column-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-column-hidden {
  display: none;
}

.word-column-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 31, 43, 0.52);
}

.word-column-modal-backdrop[hidden] {
  display: none;
}

.word-column-modal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  width: min(860px, 100%);
  max-height: min(720px, calc(100vh - 56px));
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(21, 31, 43, 0.28);
}

.word-column-modal-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  min-height: 0;
}

.word-column-modal-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.word-column-modal-heading h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.word-column-modal-heading p {
  margin: 0;
  color: var(--muted);
}

.word-column-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.word-column-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.word-column-option:hover {
  border-color: var(--accent);
  background: #f7fbf9;
}

.word-column-option input {
  width: 18px;
  height: 18px;
}

.word-column-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-column-modal-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding: 18px;
  background: #f8faf7;
}

.word-column-modal-side strong {
  color: var(--ink);
}

.word-column-selected-list {
  display: flex;
  align-content: start;
  flex-wrap: wrap;
  gap: 8px;
  overflow: auto;
}

.word-column-selected-list span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #e4f6ee;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.word-column-selected-list em {
  color: var(--muted);
  font-style: normal;
}

.word-column-modal-side button {
  min-height: 42px;
}

@media (max-width: 980px) {
  .challenge-day-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

select {
  min-width: 180px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.table-wrap {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
}

.preview-table-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.preview-table th,
.preview-table td {
  min-width: 120px;
  max-width: 280px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8faf7;
  text-align: left;
}

.preview-table .sticky-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 72px;
  background: #f8faf7;
}

.preview-table tbody .sticky-cell {
  background: #fff;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .login-screen {
    align-content: start;
    padding: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-hero-panel,
  .login-card {
    padding: 24px;
  }

  .login-hero-copy h1 {
    font-size: 30px;
  }

  .login-hero-quote p {
    font-size: 18px;
  }

  .login-footer {
    justify-content: center;
    text-align: center;
  }

  .admin-create-panel,
  .admin-user-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .admin-user-head,
  .admin-user-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-head-fields {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .daily-quote {
    width: 100%;
    margin-left: 0;
    font-size: 14px;
  }

  .app-layout {
    grid-template-columns: 1fr;
    width: min(100vw - 24px, 1180px);
    margin-top: 16px;
  }

  .shell-sidebar-toggle:checked ~ .app-layout .sidebar {
    display: none;
  }

  .home-hero,
  .home-main-grid,
  .home-wrong-strip,
  .home-section-head,
  .list-page-heading,
  .lists-page-heading {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .app-page-heading {
    min-height: auto;
    padding: 18px;
  }

  .app-page-heading h1 {
    font-size: 30px;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-footer-version {
    justify-content: flex-start;
  }

  .home-hero {
    padding: 20px;
  }

  .home-hero h1 {
    font-size: 34px;
  }

  .home-hero-board {
    grid-template-columns: 1fr;
  }

  .home-today-card {
    min-height: 112px;
  }

  .home-wrong-chips {
    justify-content: flex-start;
  }

  .app-error-box {
    align-items: stretch;
    flex-direction: column;
  }

  .app-error-actions {
    justify-content: flex-start;
  }

  .list-word-search-form,
  .list-word-search-result,
  .science-quiz-response {
    grid-template-columns: 1fr;
  }

  .list-word-search-lists {
    justify-content: flex-start;
  }

  .home-stats-grid,
  .home-news-grid,
  .home-quote-grid {
    grid-template-columns: 1fr;
  }

  .lists-tools-panel,
  .lists-import-form,
  .batch-image-form {
    grid-template-columns: 1fr;
  }

  .lists-create-backdrop {
    align-items: stretch;
    padding: 14px;
  }

  .lists-create-heading {
    flex-direction: column;
  }

  .word-image-manager-backdrop {
    align-items: stretch;
    padding: 14px;
  }

  .word-image-manager-heading,
  .word-image-manager-section-head {
    flex-direction: column;
  }

  .word-image-compare-section {
    grid-template-columns: 1fr;
  }

  .word-image-compare-card.is-replacement {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 14px;
    padding-left: 0;
  }

  .word-image-save-replacement {
    width: 100%;
  }

  .image-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .challenge-card-actions {
    grid-template-columns: 1fr;
  }

  .challenge-button {
    width: 100%;
  }

  .upload-panel,
  .detail-heading,
  .preview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .newspaper-layout {
    grid-template-columns: 1fr;
  }

  .newspaper-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .newspaper-article {
    padding: 20px;
  }

  .newspaper-article-head,
  .newspaper-article-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .newspaper-article-head h1 {
    font-size: 28px;
  }

  .detail-heading-actions {
    justify-items: stretch;
  }

  .auto-study-controls {
    justify-content: flex-start;
  }

  .auto-study-controls span {
    min-width: 0;
    text-align: left;
  }

  .alternate-spellings-row {
    flex-direction: column;
    gap: 4px;
  }

  .inline-edit-compact {
    width: 100%;
    min-width: 0;
  }

  .challenge-card {
    grid-template-columns: 1fr;
  }

  .challenge-stats,
  .challenge-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .challenge-top {
    align-items: stretch;
    flex-direction: column;
  }

  .challenge-top-actions {
    justify-content: flex-start;
  }

  .challenge-prompt-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .spelling-form {
    grid-template-columns: 1fr;
  }

  .challenge-answer-panel {
    grid-template-columns: 1fr;
  }

  .challenge-audio-row {
    grid-template-columns: 1fr;
  }

  .challenge-audio-actions {
    grid-template-columns: 1fr;
  }

  .definition-list {
    grid-template-columns: 1fr;
  }

  .audio-actions {
    grid-template-columns: 1fr;
  }

  .audio-option {
    grid-template-columns: 1fr;
  }

  .audio-manager-backdrop {
    padding: 14px;
  }

  .audio-manager-heading,
  .audio-manager-section-head,
  .audio-manager-ai-row {
    flex-direction: column;
  }

  .audio-manager-target-grid {
    grid-template-columns: 1fr;
  }

  .audio-manager-option,
  .audio-upload-picker {
    grid-template-columns: 1fr;
  }

  .image-sync-panel {
    grid-template-columns: 1fr;
  }

  .word-resource-filter-top {
    align-items: stretch;
    flex-direction: column;
  }

  .word-resource-filter-top > div:first-child {
    justify-content: space-between;
    min-width: 0;
  }

  .spb-heading,
  .spb-collection-hero,
  .spb-category-head,
  .spb-group-head {
    align-items: stretch;
  }

  .spb-heading,
  .spb-group-head {
    flex-direction: column;
  }

  .spb-heading-stats,
  .spb-list-card {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .spb-list-count {
    justify-items: center;
    width: fit-content;
  }

  .spb-list-actions {
    justify-content: stretch;
  }

  .spb-list-actions > button {
    flex: 1;
  }

  .spb-heading-stats {
    display: grid;
    justify-self: stretch;
  }

  .spb-collection-hero {
    grid-template-columns: 1fr;
  }

  .spb-hero-picture {
    min-height: 126px;
  }

  .spb-category-head {
    flex-direction: column;
    align-items: stretch;
  }

  .spb-category-head > strong {
    width: fit-content;
  }

  .spb-collection-grid,
  .spb-bank-grid,
  .spb-list-grid {
    grid-template-columns: 1fr;
  }

  .word-resource-filter-actions {
    justify-content: flex-start;
  }

  .list-ai-image-toolbar {
    grid-template-columns: 1fr;
  }

  .list-paid-confirm-actions {
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .cat-world-hero,
  .cat-world-layout {
    grid-template-columns: 1fr;
  }

  .cat-world-wallet {
    justify-items: start;
  }

  .cat-world-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-world-cat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cat-world-hero,
  .cat-world-room-panel,
  .cat-world-ledger,
  .cat-world-market,
  .cat-world-cats {
    padding: 16px;
  }

  .cat-world-copy h1 {
    font-size: 28px;
  }

  .cat-world-room {
    min-height: 300px;
  }

  .cat-world-window {
    left: 20px;
    width: 92px;
    height: 72px;
  }

  .cat-world-shelf {
    right: 18px;
    width: 104px;
  }

  .cat-world-rug {
    width: 230px;
  }

  .cat-world-cat-svg {
    width: min(230px, 68%);
  }

  .cat-world-reaction {
    bottom: 218px;
    max-width: min(250px, 80%);
    padding: 9px 12px;
    font-size: 12px;
  }

  .cat-world-sparkles {
    bottom: 152px;
    width: 150px;
  }

  .cat-world-bowl {
    right: 28px;
  }

  .cat-world-scratcher {
    left: 28px;
  }

  .cat-world-wand {
    right: 26px;
    bottom: 116px;
  }

  .cat-world-room-head,
  .cat-world-market-head {
    align-items: stretch;
    flex-direction: column;
  }

  .cat-world-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-world-tabs button {
    width: 100%;
  }

  .cat-world-shop-grid,
  .cat-world-cat-list {
    grid-template-columns: 1fr;
  }
}
