:root {
  color-scheme: light;
  --theme-id: aurora-trade-tech-v17;
  --tech-night: #071c2d;
  --tech-ocean: #0b3450;
  --tech-blue: #106fa4;
  --tech-cyan: #35b8d4;
  --tech-mint: #2db49d;
  --tech-violet: #6671e5;
  --tech-canvas: #eef6fb;
  --glass-border: rgba(24, 91, 128, 0.16);
  --glass-surface: rgba(255, 255, 255, 0.9);
  /* Light international-trade palette: mist blue, clear business blue and restrained champagne. */
  --forest-950: #0b2e4f;
  --forest-900: #155e8a;
  --forest-800: #165f8b;
  --forest-700: #1f6f9f;
  --forest-100: #cfe6f4;
  --forest-50: #eaf5fb;
  --gold-600: #8a5a16;
  --gold-500: #c88a2d;
  --gold-200: #ecd5aa;
  --gold-100: #fbf5e9;
  --ink: #102c43;
  --muted: #486478;
  --muted-light: #5a7285;
  --paper: #eff7fc;
  --paper-deep: #e1eff8;
  --surface: #ffffff;
  --surface-soft: #f6fafd;
  --line: #cbddea;
  --line-strong: #a8c5d9;
  --blue: #155e8a;
  --danger: #a3373a;
  --success: #176b4d;
  --success-bg: #e9f7f0;
  --success-line: #a9d9c6;
  --danger-bg: #fff0f1;
  --danger-line: #f1b8bc;
  --warning: #8a5a14;
  --warning-bg: #fff7e8;
  --warning-line: #ebcf97;
  --focus-ring: rgba(31, 111, 159, 0.32);
  --shadow-sm: 0 5px 18px rgba(11, 46, 79, 0.06);
  --shadow-md: 0 14px 38px rgba(11, 46, 79, 0.12);
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --sidebar-width: 238px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 94% 0%, rgba(31, 111, 159, 0.1), transparent 30rem),
    linear-gradient(180deg, #f7fbfe 0%, var(--paper) 38%, #eaf4fa 100%);
  color: var(--ink);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 31px 21px 24px;
  background: linear-gradient(180deg, #0b1f33 0%, #0d2740 100%);
  color: #eef3f7;
  overflow-x: hidden;
  overflow-y: auto;
}

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

.sidebar::before {
  right: -95px;
  bottom: 130px;
  width: 220px;
  height: 220px;
}

.sidebar::after {
  right: -54px;
  bottom: 172px;
  width: 135px;
  height: 135px;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 11px;
  background:
    radial-gradient(circle at 78% 22%, #f1bd61 0 4px, transparent 4.5px),
    linear-gradient(145deg, #155e8a 0%, #2f8faf 62%, #49a9c6 100%);
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(3, 15, 28, 0.22);
}

.brand-mark::before {
  position: absolute;
  inset: -22px 15px 17px -24px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  content: "";
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.06em;
}

.brand small {
  margin-top: 3px;
  color: rgba(238, 246, 242, 0.55);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.side-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  margin-top: 55px;
}

.nav-section-label {
  margin: 15px 15px 1px;
  color: rgba(238, 246, 242, 0.34);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 15px;
  padding: 0 15px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(238, 246, 242, 0.63);
  cursor: pointer;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: #fff;
  transform: translateX(2px);
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.105);
  color: #fff;
}

.nav-item.is-active::before {
  position: absolute;
  top: 50%;
  left: -21px;
  width: 3px;
  height: 25px;
  border-radius: 0 3px 3px 0;
  background: var(--gold-500);
  content: "";
  transform: translateY(-50%);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-note .note-icon {
  color: var(--gold-500);
}

.sidebar-note p {
  margin: 0;
  color: rgba(238, 246, 242, 0.65);
  font-size: 12px;
  line-height: 1.75;
}

.sidebar-note strong {
  color: #f4f8f6;
  font-weight: 600;
}

.main-content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px clamp(24px, 4vw, 66px) 64px;
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold-600);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-account-button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  gap: 8px;
  max-width: 180px;
  padding: 4px 12px 4px 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--forest-900);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.auth-account-button > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-initial {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-100);
  color: var(--forest-800);
  font-family: Georgia, serif;
  font-size: 13px;
}

.auth-account-button.is-signed-in .auth-user-initial {
  background: var(--forest-900);
  color: var(--gold-200);
}

.icon-button,
.streak-chip {
  min-height: 41px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
}

.icon-button {
  display: grid;
  width: 41px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.streak-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 13px;
  border-radius: 22px;
  font-size: 12px;
}

.streak-chip strong {
  font-size: 14px;
}

.page[hidden] {
  display: none !important;
}

.page.is-active {
  animation: page-in 220ms ease both;
}

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

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 305px;
  gap: 21px;
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 322px;
  grid-column: 1 / -1;
  grid-template-columns: 58% 42%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(112deg, #0b1f33 0%, #102f4d 57%, #174365 100%);
  color: #f5f8fb;
  box-shadow: var(--shadow-md);
}

.hero-card::before {
  position: absolute;
  top: -130px;
  right: 18%;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(195, 154, 90, 0.14), transparent 68%);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(34px, 5vw, 56px);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--gold-200);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.hero-kicker span {
  width: 23px;
  height: 1px;
  background: var(--gold-500);
}

.hero-copy h2 {
  margin: 0;
  font-family: "Songti SC", STSong, Georgia, serif;
  font-size: clamp(30px, 4vw, 47px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.hero-copy > p:not(.hero-kicker) {
  max-width: 480px;
  margin: 15px 0 24px;
  color: rgba(238, 244, 249, 0.76);
  font-size: 13px;
  line-height: 1.8;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  border: 1px solid var(--forest-900);
  background: var(--forest-900);
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(11, 31, 51, 0.16);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.hero-visual {
  position: relative;
  min-height: 290px;
}

.globe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-48%, -46%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.08), transparent 54%);
  box-shadow: inset 0 0 45px rgba(255, 255, 255, 0.02), 0 0 70px rgba(212, 155, 72, 0.08);
}

.globe::before,
.globe::after,
.globe-line {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
}

.globe::before {
  top: 0;
  bottom: 0;
  left: 34%;
  width: 32%;
}

.globe::after {
  top: 48%;
  right: 0;
  left: 0;
  height: 1px;
  border-width: 1px 0 0;
  border-radius: 0;
}

.globe-line-a {
  top: 17%;
  right: 3%;
  bottom: 17%;
  left: 3%;
}

.globe-line-b {
  top: 22%;
  right: 0;
  left: 0;
  height: 29%;
}

.globe-line-c {
  right: 0;
  bottom: 21%;
  left: 0;
  height: 28%;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(212, 155, 72, 0.18);
  border-radius: 50%;
}

.orbit-one {
  width: 302px;
  height: 188px;
  transform: translate(-52%, -47%) rotate(18deg);
}

.orbit-two {
  width: 270px;
  height: 270px;
  transform: translate(-52%, -47%) rotate(-17deg);
}

.route {
  position: absolute;
  border-top: 2px solid var(--gold-500);
  border-radius: 50%;
  opacity: 0.8;
}

.route-a {
  top: 64px;
  left: 42px;
  width: 98px;
  height: 55px;
  transform: rotate(12deg);
}

.route-b {
  right: 30px;
  bottom: 55px;
  width: 88px;
  height: 47px;
  transform: rotate(165deg);
}

.route-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 2px solid var(--gold-200);
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 5px rgba(212, 155, 72, 0.13);
}

.dot-a { top: 62px; left: 47px; }
.dot-b { top: 104px; left: 136px; }
.dot-c { right: 39px; bottom: 58px; }

.floating-tag {
  position: absolute;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(10, 42, 37, 0.72);
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  letter-spacing: 0.12em;
  backdrop-filter: blur(8px);
}

.tag-a { top: 54px; right: 13%; }
.tag-b { right: 20%; bottom: 40px; }

.metric-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  border: 1px solid rgba(210, 202, 189, 0.74);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.8);
}

.metric-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
}

.metric-icon.green { background: var(--forest-50); color: var(--forest-700); }
.metric-icon.gold { background: var(--gold-100); color: var(--gold-600); }
.metric-icon.blue { background: #e5edf1; color: var(--blue); }

.metric-card strong,
.metric-card span {
  display: block;
}

.metric-card strong {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.metric-card div > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.content-section {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.7);
}

.scenario-section {
  grid-column: 1;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.text-button {
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--forest-700);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

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

.scenario-card {
  display: flex;
  min-height: 80px;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--surface-soft);
  cursor: pointer;
  text-align: left;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.scenario-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.scenario-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--forest-50);
  font-size: 16px;
}

.scenario-card:nth-child(3n + 2) .scenario-symbol { background: var(--gold-100); }
.scenario-card:nth-child(3n + 3) .scenario-symbol { background: #e8edf0; }

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

.scenario-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.daily-phrase {
  position: relative;
  grid-column: 2;
  overflow: hidden;
  padding: 27px;
  border-radius: var(--radius-lg);
  background: var(--forest-900);
  color: #f6faf8;
}

.daily-phrase::after {
  position: absolute;
  right: -60px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.phrase-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.round-sound-button {
  display: grid;
  width: 39px;
  height: 39px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-200);
  cursor: pointer;
}

.round-sound-button svg {
  width: 17px;
  height: 17px;
}

.daily-phrase h2 {
  position: relative;
  z-index: 1;
  margin: 36px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.45;
}

.daily-phrase > p {
  margin: 0;
  color: rgba(246, 250, 248, 0.62);
  font-size: 12px;
  line-height: 1.7;
}

.phrase-note {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  padding-top: 19px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.phrase-note span {
  color: var(--gold-200);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.phrase-note p {
  margin: 7px 0 0;
  color: rgba(246, 250, 248, 0.65);
  font-size: 10px;
  line-height: 1.7;
}

/* Vocabulary */
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 15px 0 27px;
}

.page-intro h2,
.resource-hero h2,
.profile-hero h2 {
  margin: 0;
  font-family: "Songti SC", STSong, Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
}

.page-intro p:not(.eyebrow),
.resource-hero > p:not(.eyebrow),
.profile-hero p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.library-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 4px;
}

.library-count strong {
  color: var(--forest-800);
  font-family: Georgia, serif;
  font-size: 29px;
}

.library-count span {
  color: var(--muted);
  font-size: 11px;
}

.library-intro-actions {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.library-add-word-button {
  min-height: 43px;
  white-space: nowrap;
}

.search-box {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 13px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 155, 72, 0.12);
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--muted-light);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search-box input::placeholder { color: #9da7a2; }

.search-box kbd {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted-light);
  font-family: inherit;
  font-size: 9px;
}

.filter-chips {
  display: flex;
  gap: 8px;
  margin: 18px 0 21px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  min-height: 35px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.68);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.filter-chip.is-active {
  border-color: var(--forest-900);
  background: var(--forest-900);
  color: #fff;
}

.word-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.word-item {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 13px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.76);
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.word-item:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.word-open {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.word-item-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.word-item-meta span {
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 9px;
}

.word-item-meta small {
  color: var(--muted-light);
  font-size: 9px;
}

.word-item h3 {
  overflow: hidden;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-phonetic {
  margin: 4px 0 10px;
  color: var(--muted-light);
  font-size: 10px;
}

.word-meaning {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.word-action {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.word-action.is-favorite {
  border-color: var(--gold-200);
  background: var(--gold-100);
  color: var(--gold-600);
}

.word-action svg {
  width: 16px;
  height: 16px;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
}

.empty-state > span {
  color: var(--muted-light);
  font-size: 36px;
}

.empty-state h3 {
  margin: 10px 0 4px;
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

/* Study */
.study-header {
  display: flex;
  max-width: 720px;
  align-items: center;
  gap: 18px;
  margin: 0 auto 26px;
}

.back-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.75);
  cursor: pointer;
}

.back-button svg { width: 18px; height: 18px; }

.study-progress-wrap { flex: 1; }

.study-progress-wrap > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.study-progress-wrap strong { color: var(--ink); }

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper-deep);
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-700), var(--gold-500));
  transition: width 260ms ease;
}

.study-stage {
  max-width: 720px;
  margin: 0 auto;
}

.study-card {
  position: relative;
  min-height: 475px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.study-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(90deg, var(--forest-800), var(--gold-500));
  content: "";
}

.study-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-badge {
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 650;
}

.favorite-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted-light);
  cursor: pointer;
}

.favorite-button[aria-pressed="true"] {
  border-color: var(--gold-200);
  background: var(--gold-100);
  color: var(--gold-600);
}

.favorite-button[aria-pressed="true"] svg { fill: currentColor; }
.favorite-button svg { width: 19px; height: 19px; }

.study-term-block {
  padding: 42px 0 35px;
  text-align: center;
}

.study-term-block > p {
  margin: 0 0 12px;
  color: var(--gold-600);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.study-term-block h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(39px, 7vw, 58px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.phonetic-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 20px;
  background: var(--forest-50);
  color: var(--forest-700);
  cursor: pointer;
}

.phonetic-button svg { width: 17px; height: 17px; }
.phonetic-button span { font-size: 12px; }

.reveal-button {
  display: block;
  width: min(100%, 330px);
  min-height: 49px;
  margin: 0 auto;
  border: 1px solid var(--forest-800);
  border-radius: 14px;
  background: var(--forest-900);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.reveal-button[hidden] {
  display: none;
}

.study-answer {
  display: grid;
  gap: 16px;
  animation: answer-in 220ms ease both;
}

.study-answer[hidden] { display: none; }

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

.meaning-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.meaning-row span,
.collocation-block > span,
.example-heading > span,
.dialog-example span,
.dialog-collocations > span {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.meaning-row strong { font-size: 17px; }

.example-block {
  padding: 17px;
  border-radius: 15px;
  background: var(--surface-soft);
}

.example-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.example-heading button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--forest-50);
  color: var(--forest-700);
  cursor: pointer;
}

.example-heading svg { width: 14px; height: 14px; }

.example-block p {
  margin: 8px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.65;
}

.example-block small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.collocation-block > div,
.dialog-collocations > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.collocation-block > div span,
.dialog-collocations > div span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 10px;
}

.rating-panel {
  margin-top: 17px;
  animation: answer-in 200ms ease both;
}

.rating-panel[hidden] { display: none; }

.rating-panel > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.rating-buttons button {
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.78);
  cursor: pointer;
}

.rating-buttons button:hover { border-color: var(--gold-500); }
.rating-buttons span,
.rating-buttons small { display: block; }
.rating-buttons span { font-size: 11px; font-weight: 650; }
.rating-buttons small { margin-top: 3px; color: var(--muted-light); font-size: 8px; }

.study-complete {
  max-width: 620px;
  margin: 50px auto 0;
  text-align: center;
}

.complete-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 21px;
  place-items: center;
  border-radius: 24px 24px 24px 8px;
  background: var(--forest-900);
  color: var(--gold-200);
  font-size: 28px;
  box-shadow: var(--shadow-md);
}

.study-complete h2 {
  margin: 5px 0 8px;
  font-family: "Songti SC", STSong, serif;
  font-size: 30px;
}

.study-complete > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.complete-actions { display: flex; justify-content: center; gap: 10px; margin-top: 25px; }

/* Resources */
.resource-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 33px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, var(--surface), #f2e8d7);
  border: 1px solid var(--line);
}

.resource-hero::after {
  position: absolute;
  top: -80px;
  right: -30px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(23, 75, 66, 0.11);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(23, 75, 66, 0.035), 0 0 0 70px rgba(23, 75, 66, 0.025);
  content: "";
}

.resource-hero h2 { max-width: 600px; }
.resource-hero > p:not(.eyebrow) { max-width: 650px; line-height: 1.8; }

.resource-section { margin-top: 31px; }
.section-heading.compact { margin-bottom: 15px; }

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

.resource-card {
  display: flex;
  min-width: 0;
  min-height: 295px;
  flex-direction: column;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.8);
  transition: transform 160ms ease, border 160ms ease;
}

.resource-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.resource-card:focus-within {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(31, 111, 159, 0.2), var(--shadow-sm);
}
.featured-resource { border-top: 3px solid var(--forest-700); }

.resource-brand {
  --icon-start: #155e8a;
  --icon-end: #2f8faf;
  --icon-accent: #f1bd61;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background:
    radial-gradient(circle at 82% 18%, var(--icon-accent) 0 4px, transparent 4.5px),
    linear-gradient(145deg, var(--icon-start), var(--icon-end));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(11, 46, 79, 0.14);
}

.resource-brand::before {
  position: absolute;
  right: -13px;
  bottom: -17px;
  width: 43px;
  height: 43px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.resource-brand svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(11, 46, 79, 0.2));
}

.resource-brand.voa {
  --icon-start: #0f5f8f;
  --icon-end: #1689a9;
}

.resource-brand.bbc {
  --icon-start: #743d70;
  --icon-end: #a75671;
}

.resource-brand.bc {
  --icon-start: #4b4b9b;
  --icon-end: #7567bd;
  --icon-accent: #77d0c6;
}

.resource-brand.tradegov {
  --icon-start: #215798;
  --icon-end: #3384b5;
}

.resource-brand.itc {
  --icon-start: #0b686e;
  --icon-end: #24937a;
  --icon-accent: #8bd7b3;
}

.resource-copy { min-width: 0; }

.resource-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 19px;
  color: var(--muted-light);
  font-size: 9px;
}

.safe-badge,
.link-badge {
  padding: 3px 7px;
  border-radius: 8px;
}

.safe-badge { background: var(--forest-50); color: var(--forest-700); }
.link-badge { background: var(--gold-100); color: var(--gold-600); }

.resource-card h3 { margin: 8px 0; font-size: 16px; }
.resource-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.resource-tags span {
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
}

.resource-card > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
}

.trade-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.horizontal-resource {
  display: grid;
  min-height: 122px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.horizontal-resource .resource-meta { margin: 0; justify-content: flex-start; }
.horizontal-resource h3 { margin: 5px 0 3px; }
.horizontal-resource > a { border: 0; padding: 13px; font-size: 18px; }

.copyright-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 28px;
  padding: 17px 19px;
  border: 1px solid var(--gold-200);
  border-radius: 15px;
  background: var(--gold-100);
}

.copyright-note svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--gold-600); }
.copyright-note p { margin: 0; color: #6e5837; font-size: 11px; line-height: 1.7; }
.copyright-note strong { color: #4f3d25; }

/* Community */
.community-page {
  --community-blue: #466d82;
}

.community-hero {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--radius-lg);
  background: linear-gradient(112deg, var(--forest-950), var(--forest-800));
  color: #f7fbf9;
  box-shadow: var(--shadow-md);
}

.community-hero::after {
  position: absolute;
  top: -115px;
  right: -40px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.025), 0 0 0 90px rgba(255, 255, 255, 0.018);
  content: "";
}

.community-hero > * { position: relative; z-index: 1; }
.community-hero h2 {
  max-width: 650px;
  margin: 0;
  font-family: "Songti SC", STSong, Georgia, serif;
  font-size: clamp(30px, 4.6vw, 45px);
  font-weight: 600;
}
.community-hero p:not(.eyebrow) { max-width: 690px; margin: 12px 0 0; color: rgba(247, 251, 249, 0.65); font-size: 12px; line-height: 1.8; }
.community-hero .primary-button { flex: 0 0 auto; background: var(--gold-500); color: var(--forest-950); }

.community-tabs {
  display: flex;
  gap: 4px;
  margin: 22px 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.65);
  scrollbar-width: none;
}

.community-tabs::-webkit-scrollbar { display: none; }
.community-tab {
  min-height: 39px;
  flex: 1 0 auto;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.community-tab:hover { color: var(--forest-800); }
.community-tab.is-active { background: var(--forest-900); color: #fff; box-shadow: 0 6px 15px rgba(13, 47, 42, 0.16); }

.community-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) repeat(3, minmax(130px, auto));
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.72);
}

.community-search {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.community-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(212, 155, 72, 0.1); }
.community-search svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted-light); }
.community-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.community-search input::placeholder { color: var(--muted-light); }

.filter-select { display: grid; gap: 4px; }
.filter-select > span { padding-left: 3px; color: var(--muted-light); font-size: 8px; font-weight: 650; }
.filter-select select,
.form-field select,
.form-field input,
.form-field textarea,
.visibility-fieldset select,
.join-group-panel input,
.moderation-filters input,
.moderation-filters select {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
}
.filter-select select { min-width: 130px; padding: 0 30px 0 11px; }

.community-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 2px 11px;
}
.community-result-line p { margin: 0; color: var(--muted); font-size: 10px; }
.group-filter-reset { padding: 5px 9px; border: 1px solid var(--gold-200); border-radius: 8px; background: var(--gold-100); color: var(--gold-600); cursor: pointer; font-size: 8px; font-weight: 700; }
.group-filter-reset[hidden] { display: none; }
.visibility-legend { display: flex; gap: 14px; color: var(--muted-light); font-size: 9px; }
.visibility-legend span,
.visibility-badge { display: inline-flex; align-items: center; gap: 5px; }
.dot-public,
.dot-group { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot-public { background: #50a176; }
.dot-group { background: var(--gold-500); }

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

.shared-resource-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 355px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 8px 25px rgba(21, 52, 45, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.shared-resource-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.featured-shared-card { border-top: 3px solid var(--forest-700); }
.shared-card-topline,
.shared-card-title,
.shared-card-footer,
.shared-card-footer > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.resource-kind { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 7px; font-size: 8px; font-weight: 700; letter-spacing: 0.04em; }
.kind-term { background: var(--forest-50); color: var(--forest-700); }
.kind-email { background: var(--gold-100); color: #9a6324; }
.kind-document { background: #e8eff3; color: var(--community-blue); }
.visibility-badge { color: var(--muted-light); font-size: 8px; }
.visibility-badge.group-only { color: #9a6324; }
.shared-card-title { align-items: flex-start; margin-top: 20px; }
.shared-card-title p { margin: 0 0 5px; color: var(--gold-600); font-size: 8px; font-weight: 700; letter-spacing: 0.12em; }
.shared-card-title h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.card-icon-button { display: grid; width: 36px; height: 36px; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--forest-50); color: var(--forest-700); cursor: pointer; }
.card-icon-button svg { width: 15px; height: 15px; }
.verified-mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--forest-700); color: #fff; font-size: 12px; }
.field-count { padding: 6px 8px; border-radius: 8px; background: #e8eff3; color: var(--community-blue); font-size: 9px; font-weight: 700; }
.shared-card-description { margin: 14px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.shared-resource-card blockquote { margin: 0; padding: 12px; border-left: 2px solid var(--gold-500); border-radius: 0 10px 10px 0; background: var(--surface-soft); color: #42524e; font-family: Georgia, serif; font-size: 10px; line-height: 1.7; }
.field-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.field-preview li { padding: 6px 8px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 8px; }
.shared-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.shared-card-tags span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 8px; }
.shared-card-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.shared-card-footer > span { min-width: 0; overflow: hidden; color: var(--muted-light); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.shared-card-footer button { min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--forest-700); cursor: pointer; font-size: 9px; font-weight: 650; }
.shared-card-footer button:hover { background: var(--forest-50); }

.community-empty {
  padding: 54px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.55);
  text-align: center;
}
.community-empty[hidden] { display: none; }
.community-empty > span { display: grid; width: 54px; height: 54px; margin: 0 auto 14px; place-items: center; border-radius: 17px; background: var(--forest-50); color: var(--forest-700); font-size: 21px; }
.community-empty h3 { margin: 0; font-size: 15px; }
.community-empty p { margin: 7px 0 17px; color: var(--muted); font-size: 10px; }
.community-mode-banner { display: flex; align-items: flex-start; gap: 9px; margin: -8px 0 15px; padding: 11px 13px; border: 1px solid var(--gold-200); border-radius: 11px; background: rgba(250, 236, 213, 0.72); color: #6d512c; font-size: 9px; line-height: 1.6; }
.community-mode-banner strong { flex: 0 0 auto; }
.community-mode-banner[data-mode="online"] { border-color: rgba(23, 121, 111, 0.24); background: rgba(230, 246, 241, 0.78); color: var(--forest-800); }
.community-mode-banner[data-mode="loading"] { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.community-mode-banner[data-mode="error"] { border-color: rgba(169, 71, 61, 0.24); background: #fff3f0; color: var(--danger); }

.community-intro { align-items: center; }
.community-intro .secondary-button { flex: 0 0 auto; }
.draft-status { padding: 8px 11px; border-radius: 9px; background: var(--forest-50); color: var(--forest-700); font-size: 9px; }

.group-summary-grid,
.moderation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 18px;
}
.group-summary-grid article,
.moderation-summary article { padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 248, 0.76); }
.group-summary-grid strong { display: block; font-family: Georgia, serif; font-size: 25px; }
.group-summary-grid span { color: var(--muted); font-size: 9px; }
.group-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 10px; margin-bottom: 13px; }
.compact-filter { grid-template-columns: auto 1fr; align-items: center; gap: 7px; }
.compact-filter select { min-width: 0; }
.group-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.group-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.group-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 253, 248, 0.84); }
.group-card-cover { position: relative; display: grid; height: 108px; place-items: center; overflow: hidden; color: #fff; }
.group-card-cover span { position: relative; z-index: 2; font-family: Georgia, serif; font-size: 29px; font-weight: 700; letter-spacing: 0.08em; }
.group-card-cover i { position: absolute; width: 120px; height: 120px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%; }
.group-card-cover i:first-of-type { top: -55px; right: -20px; }
.group-card-cover i:last-of-type { bottom: -75px; left: -20px; }
.cover-general { background: linear-gradient(125deg, var(--forest-900), #27705f); }
.cover-machinery { background: linear-gradient(125deg, #365a6d, #6b8390); }
.cover-quotation { background: linear-gradient(125deg, #8f5d27, #c58d43); }
.group-card-cover:not(.cover-general):not(.cover-machinery):not(.cover-quotation) {
  background: linear-gradient(125deg, var(--group-accent, var(--forest-900)), var(--forest-950));
}
.group-card-body { padding: 17px; }
.group-role-line { display: flex; align-items: center; justify-content: space-between; color: var(--muted-light); font-size: 8px; }
.group-role { padding: 4px 7px; border-radius: 7px; font-weight: 700; }
.group-role.owner { background: var(--gold-100); color: #946021; }
.group-role.reviewer { background: var(--forest-50); color: var(--forest-700); }
.group-role.member { background: #edf0f1; color: #637279; }
.group-card h3 { margin: 12px 0 6px; font-size: 14px; }
.group-card p { min-height: 34px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.group-meta { display: flex; gap: 12px; margin: 13px 0; color: var(--muted-light); font-size: 8px; }
.group-open-button { width: 100%; }

.join-group-panel { padding: 22px; border: 1px solid var(--gold-200); border-radius: var(--radius-md); background: linear-gradient(145deg, var(--surface), var(--gold-100)); }
.join-panel-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--forest-900); color: var(--gold-200); font-size: 19px; }
.join-group-panel h3 { margin: 16px 0 7px; font-size: 15px; }
.join-group-panel p { margin: 0 0 18px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.join-group-panel label { display: block; margin-bottom: 6px; font-size: 9px; font-weight: 650; }
.join-group-panel input { padding: 0 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.join-group-panel .primary-button { width: 100%; margin-top: 9px; }
.join-group-panel small { display: block; margin-top: 8px; color: var(--muted-light); font-size: 8px; text-align: center; }

.contribution-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 16px; align-items: start; }
.contribution-form { padding: clamp(20px, 3.5vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 253, 248, 0.82); }
.form-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.form-section-heading > span { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--forest-900); color: var(--gold-200); font-family: Georgia, serif; font-size: 10px; }
.form-section-heading h3 { margin: 1px 0 4px; font-size: 14px; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 9px; }
.form-section-heading code { padding: 2px 4px; border-radius: 4px; background: var(--forest-50); color: var(--forest-700); font-size: 9px; }
.divided-heading { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { position: relative; display: grid; gap: 6px; }
.form-field-wide { grid-column: 1 / -1; }
.form-field > span,
.form-field > label,
.visibility-fieldset legend { font-size: 9px; font-weight: 650; }
.form-field b,
.visibility-fieldset b { color: var(--danger); }
.form-field input,
.form-field select,
.form-field textarea { padding: 10px 12px; resize: vertical; }
.form-field textarea { min-height: 110px; line-height: 1.65; }
.form-field small { color: var(--muted-light); font-size: 8px; line-height: 1.55; }
.form-field-wide > small { position: absolute; right: 10px; bottom: 9px; padding-left: 6px; background: var(--surface); }
.form-stack { display: grid; gap: 14px; }
.visibility-fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 25px 0 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; }
.visibility-fieldset legend { padding: 0 6px; }
.visibility-fieldset > label { display: flex; align-items: flex-start; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.visibility-fieldset input[type="radio"] { margin-top: 2px; accent-color: var(--forest-700); }
.visibility-fieldset strong,
.visibility-fieldset small { display: block; }
.visibility-fieldset strong { font-size: 9px; }
.visibility-fieldset small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.visibility-fieldset select { grid-column: 1 / -1; padding: 0 11px; }
.visibility-fieldset select:disabled { opacity: 0.55; cursor: not-allowed; }
.review-group-help { grid-column: 1 / -1; color: var(--muted); font-size: 8px; line-height: 1.55; }
.privacy-check { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 15px; border-radius: 13px; background: var(--gold-100); color: #6f5633; }
.privacy-check > svg { width: 21px; height: 21px; flex: 0 0 auto; color: var(--gold-600); }
.privacy-check strong { font-size: 10px; }
.privacy-check p { margin: 4px 0 10px; font-size: 8px; line-height: 1.6; }
.privacy-check label { display: flex; align-items: flex-start; gap: 7px; color: #554027; font-size: 8px; line-height: 1.55; }
.privacy-check input { margin-top: 1px; accent-color: var(--forest-700); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; }

.guide-sticky-card { position: sticky; top: 24px; padding: 23px; border-radius: var(--radius-md); background: var(--forest-950); color: #fff; box-shadow: var(--shadow-sm); }
.guide-sticky-card h3 { margin: 7px 0 18px; font-family: "Songti SC", STSong, serif; font-size: 19px; }
.guide-sticky-card ol { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.guide-sticky-card li { display: flex; gap: 10px; }
.guide-sticky-card li > span { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; color: var(--gold-200); font-family: Georgia, serif; font-size: 9px; }
.guide-sticky-card li strong { display: block; font-size: 10px; }
.guide-sticky-card li p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.55); font-size: 8px; line-height: 1.65; }
.guide-tip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.guide-tip strong { font-size: 9px; }
.guide-tip span { color: var(--gold-200); font-size: 8px; }

.reviewer-badge { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--forest-100); border-radius: 12px; background: var(--forest-50); }
.reviewer-badge > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--forest-700); color: #fff; }
.reviewer-badge strong,
.reviewer-badge small { display: block; }
.reviewer-badge strong { font-size: 9px; }
.reviewer-badge small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.moderation-summary article { position: relative; min-height: 100px; }
.moderation-summary article.urgent { border-color: var(--gold-200); background: var(--gold-100); }
.moderation-summary article > span,
.moderation-summary article > strong,
.moderation-summary article > small { display: block; }
.moderation-summary article > span { color: var(--muted); font-size: 9px; }
.moderation-summary article > strong { margin: 8px 0 3px; font-family: Georgia, serif; font-size: 26px; }
.moderation-summary article > small { color: var(--muted-light); font-size: 8px; }
.moderation-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 253, 248, 0.76); }
.moderation-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px; border-bottom: 1px solid var(--line); }
.moderation-panel-head h3 { margin: 0; font-size: 14px; }
.moderation-filters { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; gap: 7px; }
.moderation-filters input,
.moderation-filters select { min-height: 38px; padding: 0 10px; }
.review-queue { display: grid; }
.review-item { display: grid; grid-template-columns: 23px minmax(0, 1fr) 190px; gap: 14px; padding: 19px; border-bottom: 1px solid var(--line); }
.review-item.has-warning { background: rgba(250, 236, 213, 0.2); }
.review-select input { accent-color: var(--forest-700); }
.review-item-topline { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.review-age { color: var(--muted-light); font-size: 8px; }
.review-age.is-late { color: var(--danger); }
.review-item h4 { margin: 10px 0 6px; font-size: 12px; }
.review-item-main > p { margin: 0; color: var(--muted); font-family: Georgia, serif; font-size: 9px; line-height: 1.7; }
.review-context { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; color: var(--muted-light); font-size: 8px; }
.review-warning { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 9px; border-radius: 9px; background: #fff1e7; color: #82523b; }
.review-warning > span { display: grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #d78359; color: #fff; font-size: 8px; }
.review-warning p { margin: 0; font-size: 8px; line-height: 1.55; }
.review-actions { display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.review-actions > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.review-actions button { min-height: 35px; padding: 0 8px; border-radius: 9px; cursor: pointer; font-size: 8px; font-weight: 650; }
.review-preview-button { border: 1px solid var(--line); background: var(--surface); color: var(--forest-700); }
.reject-button { border: 1px solid rgba(169, 71, 61, 0.22); background: #fff8f7; color: var(--danger); }
.approve-button { border: 1px solid var(--forest-700); background: var(--forest-700); color: #fff; }
.bulk-review-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 19px; background: var(--forest-950); color: #fff; font-size: 9px; }
.bulk-review-bar[hidden] { display: none; }
.bulk-review-bar button { min-height: 32px; margin-left: 6px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; font-size: 8px; }
.compact-empty { margin: 20px; padding: 35px 20px; }

/* Shared resource detail */
.community-detail-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: clamp(24px, 4vw, 38px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(13, 47, 42, 0.25);
}
.community-detail-dialog::backdrop { background: rgba(10, 33, 29, 0.58); backdrop-filter: blur(4px); }
.community-detail-topline { display: flex; gap: 8px; padding-right: 38px; }
.community-detail-topline span { padding: 5px 8px; border-radius: 7px; background: var(--forest-50); color: var(--forest-700); font-size: 9px; font-weight: 700; }
.community-detail-dialog h2 { margin: 18px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 4vw, 36px); line-height: 1.25; overflow-wrap: anywhere; }
.community-detail-summary { margin: 0 0 22px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.community-detail-dialog #community-detail-content { color: #334743; font-size: 11px; line-height: 1.75; }
.community-detail-phonetic { margin: 0; color: var(--gold-600); font-family: Georgia, serif; font-size: 15px; }
.community-detail-meaning { margin: 5px 0 16px; color: var(--forest-900); font-size: 18px; font-weight: 700; }
.community-detail-example,
.community-detail-note,
.community-detail-source { margin-top: 17px; padding: 15px; border-radius: 12px; background: var(--surface-soft); }
.community-detail-example p { margin: 8px 0 3px; font-family: Georgia, serif; font-size: 13px; }
.community-detail-example small,
.community-detail-source small { color: var(--muted); }
.community-detail-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.community-detail-chips span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--forest-700); font-size: 9px; }
.community-template-body { max-height: 320px; margin: 15px 0; padding: 17px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf6; color: #263a36; font: 11px/1.7 Georgia, "Times New Roman", serif; white-space: pre-wrap; }
.community-detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.community-detail-meta > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.community-detail-meta dt { color: var(--muted); font-size: 8px; }
.community-detail-meta dd { margin: 4px 0 0; font-weight: 650; }
.community-document-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.community-document-sections section { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.community-document-sections h4 { margin: 0 0 7px; }
.community-document-sections ul,
.community-detail-list { margin: 0; padding-left: 18px; }
.community-detail-source { border-left: 3px solid var(--gold-500); }
.community-detail-source p { margin: 5px 0; }
.community-detail-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.shared-card-footer button.is-saved { background: var(--gold-100); color: var(--gold-600); }

/* Profile */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 19px;
  margin: 14px 0 25px;
}

.profile-hero > div:nth-child(2) { min-width: 0; }
.profile-signout-button { margin-left: auto; }

.avatar {
  display: grid;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 23px 23px 23px 7px;
  background: var(--forest-900);
  color: var(--gold-200);
  font-family: Georgia, serif;
  font-size: 29px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.profile-stats article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.74);
  text-align: center;
}

.profile-stats strong,
.profile-stats span { display: block; }
.profile-stats strong { font-family: Georgia, serif; font-size: 27px; }
.profile-stats span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.settings-panel {
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.78);
}

.settings-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px;
  border-bottom: 1px solid var(--line);
}

.settings-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--forest-50);
  color: var(--forest-700);
}

.settings-heading > span svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.settings-heading h3 { margin: 0; font-size: 13px; }
.settings-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }

.setting-row {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 15px 19px;
}

.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row label { min-width: 130px; }
.setting-row label > span,
.setting-row div > span { display: block; font-size: 11px; font-weight: 650; }
.setting-row label > small,
.setting-row div > small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.setting-row select {
  min-height: 39px;
  padding: 0 33px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
}

.setting-row input[type="range"] {
  width: min(280px, 45vw);
  accent-color: var(--forest-700);
}

.playback-settings-panel .settings-heading {
  border-bottom: 0;
  padding-bottom: 10px;
}

.playback-rate-row {
  min-height: 92px;
  padding-top: 8px;
}

.speech-rate-control {
  width: min(420px, 58%);
}

.speech-rate-control input[type="range"] {
  width: 100%;
}

.speech-rate-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.voice-control {
  display: grid;
  width: min(440px, 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.voice-control select { min-width: 0; min-height: 44px; font-size: 11px; }
.voice-preview-button { min-height: 44px; padding: 0 15px; white-space: nowrap; }
.voice-control > small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.55; }
.voice-preview-button[data-playing="true"] { border-color: var(--gold-500); background: var(--gold-100); color: var(--forest-900); }

.danger-text-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(169, 71, 61, 0.24);
  border-radius: 10px;
  background: #fff8f7;
  color: var(--danger);
  cursor: pointer;
  font-size: 10px;
}

/* Dialog */
.word-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 31px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(9, 29, 25, 0.28);
}

.word-dialog::backdrop {
  background: rgba(9, 29, 25, 0.58);
  backdrop-filter: blur(4px);
}

.auth-dialog { width: min(460px, calc(100% - 32px)); }
.auth-dialog h2 { margin: 8px 42px 6px 0; font-size: 27px; }
.auth-dialog-intro { margin: 0 0 19px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 17px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.auth-mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.auth-mode-switch button.is-active {
  background: var(--surface);
  color: var(--forest-900);
  box-shadow: 0 3px 12px rgba(16, 55, 49, 0.08);
}

.auth-method-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: -4px 0 17px;
}

.auth-method-switch[hidden],
.auth-method-switch button[hidden] { display: none !important; }

.auth-method-switch button {
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-method-switch button:hover {
  border-color: color-mix(in srgb, var(--tech-cyan) 54%, var(--line));
  color: var(--forest-900);
  transform: translateY(-1px);
}

.auth-method-switch button.is-active {
  border-color: color-mix(in srgb, var(--tech-cyan) 68%, var(--line));
  background: linear-gradient(135deg, rgba(222, 247, 250, 0.96), rgba(235, 239, 255, 0.96));
  color: var(--forest-900);
  box-shadow: 0 6px 18px rgba(33, 142, 175, 0.11);
}

.auth-method-switch button:disabled { cursor: wait; opacity: 0.58; transform: none; }

.auth-form { display: grid; gap: 13px; }
.auth-form [hidden] { display: none !important; }
.auth-form .form-field { gap: 7px; }
.auth-form #auth-identifier {
  min-height: 50px;
  font-size: 13px;
  letter-spacing: 0.01em;
}
#auth-identifier-field small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.auth-way-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 26px;
  margin-top: -4px;
  color: var(--muted);
  font-size: 10px;
}
.auth-way-switch button {
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #087eaa;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}
.auth-way-switch button:hover,
.auth-way-switch button:focus-visible { color: #165ad0; text-decoration: underline; text-underline-offset: 3px; }
.auth-way-switch button:disabled { cursor: wait; opacity: 0.55; }
.auth-phone-row { display: grid; grid-template-columns: minmax(132px, 0.8fr) minmax(0, 1.35fr); gap: 9px; }
.auth-phone-row select,
.auth-phone-row input { min-width: 0; }
#auth-phone-field small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.auth-otp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.auth-otp-row input { min-width: 0; letter-spacing: 0.22em; font-variant-numeric: tabular-nums; }
.auth-resend-button { min-width: 116px; padding: 0 13px; white-space: nowrap; }
.auth-resend-button:disabled { cursor: wait; opacity: 0.58; }
.auth-otp-field small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-otp-help { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; }
.auth-otp-help button { flex: 0 0 auto; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--forest-700); cursor: pointer; font-size: 11px; font-weight: 700; }
.auth-otp-help button:hover { text-decoration: underline; }
.auth-submit-button { width: 100%; margin-top: 3px; }
.auth-submit-button:disabled { cursor: wait; opacity: 0.62; }
.auth-message { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--forest-50); color: var(--forest-800); font-size: 10px; line-height: 1.55; }
.auth-message[data-tone="error"] { background: #fff2ef; color: var(--danger); }
.auth-message[data-tone="success"] { background: #eef8f2; color: #176848; }
.auth-security-note { display: block; margin-top: 15px; color: var(--muted-light); font-size: 9px; line-height: 1.6; }

.create-group-dialog { width: min(560px, calc(100% - 32px)); }
.create-group-dialog h2 { margin: 8px 42px 6px 0; font-size: 27px; }
.create-group-dialog-intro { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.create-group-form { display: grid; gap: 15px; }
.create-group-form .form-field { gap: 7px; }
.create-group-form .form-field textarea { min-height: 116px; }
.create-group-field-help { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.create-group-field-help > span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.create-group-policy {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(23, 121, 111, 0.23);
  border-radius: 13px;
  background: var(--forest-50);
}
.create-group-policy-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--forest-800); color: #fff; font-size: 13px; }
.create-group-policy strong { display: block; color: var(--forest-900); font-size: 11px; }
.create-group-policy p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.create-group-mode-note { margin: -4px 2px 0; color: var(--muted-light); font-size: 9px; line-height: 1.6; }
.create-group-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 2px; }
.create-group-actions button { min-width: 112px; }
.create-group-actions button:disabled { cursor: wait; opacity: 0.62; }

.add-word-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain;
}
.add-word-dialog h2 { margin: 8px 42px 6px 0; font-size: 27px; }
.add-word-dialog-intro { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.add-word-form { display: grid; gap: 16px; }
.add-word-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.add-word-form-grid .form-field { align-content: start; gap: 7px; }
.add-word-form-grid .form-field-wide { grid-column: 1 / -1; }
.add-word-form-grid .form-field-wide > small { position: static; padding-left: 0; background: transparent; }
.add-word-form-grid textarea { min-height: 82px; }
.add-word-form-grid .form-field-wide textarea { min-height: 72px; }
.add-word-policy {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(23, 121, 111, 0.23);
  border-radius: 13px;
  background: var(--forest-50);
}
.add-word-policy-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--forest-800); color: #fff; font-size: 13px; }
.add-word-policy strong { display: block; color: var(--forest-900); font-size: 11px; }
.add-word-policy p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.add-word-rights {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  line-height: 1.6;
}
.add-word-rights input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--forest-700); }
.add-word-rights b { color: var(--danger); }
.add-word-message { margin: 0; }
.add-word-actions { margin-top: 0; }

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 20px;
}

.dialog-topline { display: flex; gap: 7px; padding-right: 35px; }
.dialog-topline span { padding: 4px 8px; border-radius: 8px; background: var(--forest-50); color: var(--forest-700); font-size: 9px; }

.dialog-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 21px;
}

.dialog-title-row h2 { margin: 0; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.dialog-title-row p { margin: 4px 0 0; color: var(--muted-light); font-size: 11px; }

.dialog-sound {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--forest-900);
  color: #fff;
  cursor: pointer;
}

.dialog-sound svg { width: 19px; height: 19px; }
.dialog-meaning { margin: 16px 0 21px; font-size: 16px; font-weight: 650; }

.dialog-example { padding: 17px; border-radius: 15px; background: var(--surface-soft); }
.dialog-example > div { display: flex; align-items: center; justify-content: space-between; }
.dialog-example button { border: 0; background: transparent; color: var(--forest-700); cursor: pointer; font-size: 10px; }
.dialog-example p { margin: 9px 0 5px; font-family: Georgia, serif; font-size: 15px; line-height: 1.6; }
.dialog-example small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.dialog-collocations { margin-top: 20px; }

.dialog-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  padding: 13px;
  border-radius: 12px;
  background: var(--gold-100);
  color: #6d5532;
}

.dialog-tip span { color: var(--gold-600); }
.dialog-tip p { margin: 0; font-size: 9px; line-height: 1.7; }
.dialog-favorite { width: 100%; margin-top: 18px; }

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 17px;
  border-radius: 12px;
  background: var(--forest-950);
  color: #fff;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }

@media (max-width: 1060px) {
  .home-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { grid-template-columns: 62% 38%; }
  .globe { width: 190px; height: 190px; }
  .orbit-one { width: 250px; height: 165px; }
  .orbit-two { width: 230px; height: 230px; }
  .community-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px, auto)); }
  .community-toolbar .filter-select:last-child { grid-column: 3; }
  .community-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-page-layout { grid-template-columns: minmax(0, 1fr) 235px; }
  .group-card-grid { grid-template-columns: 1fr; }
  .contribution-layout { grid-template-columns: minmax(0, 1fr) 245px; }
  .review-item { grid-template-columns: 23px minmax(0, 1fr) 165px; }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-content { padding: 22px 20px 110px; }
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .scenario-section,
  .daily-phrase { grid-column: 1; }
  .daily-phrase { min-height: 270px; }
  .resource-grid { grid-template-columns: 1fr; }
  .trade-resource-grid { grid-template-columns: 1fr; }
  .resource-card:not(.horizontal-resource) { min-height: 260px; }
  .community-hero { min-height: 205px; }
  .community-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-toolbar .community-search { grid-column: 1 / -1; }
  .community-toolbar .filter-select:last-child { grid-column: auto; }
  .community-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-page-layout,
  .contribution-layout { grid-template-columns: 1fr; }
  .join-group-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; }
  .join-panel-icon { grid-row: 1 / 3; }
  .join-group-panel h3 { margin: 2px 0 4px; }
  .join-group-panel p,
  .join-group-panel label,
  .join-group-panel input,
  .join-group-panel .primary-button,
  .join-group-panel small { grid-column: 1 / -1; }
  .contribution-guide { order: -1; }
  .guide-sticky-card { position: static; }
  .guide-sticky-card ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moderation-panel-head { align-items: flex-start; flex-direction: column; }
  .moderation-filters { width: 100%; }
  .review-item { grid-template-columns: 23px minmax(0, 1fr); }
  .review-actions { grid-column: 2; flex-direction: row; justify-content: flex-end; }
  .review-actions > div { display: flex; }
  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    min-height: 67px;
    padding: 7px 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: rgba(13, 47, 42, 0.96);
    color: rgba(255, 255, 255, 0.62);
    box-shadow: 0 15px 40px rgba(13, 47, 42, 0.25);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-item {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 9px;
  }
  .mobile-nav-item svg { width: 19px; height: 19px; }
  .mobile-nav-item.is-active { color: var(--gold-200); }
  .study-nav-icon {
    position: absolute;
    top: -22px;
    display: grid;
    width: 47px;
    height: 47px;
    place-items: center;
    border: 5px solid var(--paper);
    border-radius: 50%;
    background: var(--gold-500);
    color: var(--forest-950);
  }
  .study-nav > span:last-child { margin-top: 29px; }
  .word-list { grid-template-columns: 1fr; }
  .topbar { margin-bottom: 20px; }
  .toast { right: 16px; bottom: 95px; }
}

@media (max-width: 620px) {
  .main-content { padding: 18px 14px 108px; }
  .topbar h1 { font-size: 20px; }
  .topbar .eyebrow { font-size: 9px; }
  .top-actions { gap: 6px; }
  .auth-account-button { width: 41px; padding: 4px; }
  .auth-account-button > span:last-child { display: none; }
  .auth-user-initial { width: 31px; height: 31px; }
  .auth-method-switch { grid-template-columns: 1fr; }
  .auth-phone-row { grid-template-columns: 1fr; }
  .auth-otp-row { grid-template-columns: 1fr; }
  .auth-resend-button { width: 100%; min-height: 46px; }
  .hero-card { display: block; min-height: 390px; }
  .hero-copy { padding: 29px 24px 25px; }
  .hero-copy h2 { font-size: 31px; }
  .hero-copy > p:not(.hero-kicker) { margin-bottom: 19px; font-size: 11px; }
  .hero-visual { position: absolute; right: -20px; bottom: -58px; width: 230px; min-height: 230px; opacity: 0.58; }
  .globe { width: 170px; height: 170px; }
  .floating-tag { display: none; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .metric-card { min-height: 74px; align-items: flex-start; flex-direction: column; gap: 7px; padding: 12px; }
  .metric-icon { width: 29px; height: 29px; border-radius: 9px; font-size: 12px; }
  .metric-card strong { font-size: 18px; }
  .metric-card div > span { font-size: 9px; }
  .content-section { padding: 21px 16px; }
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .scenario-card { min-height: 70px; gap: 8px; padding: 9px; }
  .scenario-symbol { width: 33px; height: 33px; border-radius: 10px; font-size: 14px; }
  .scenario-card strong { font-size: 10px; }
  .daily-phrase { padding: 22px; }
  .daily-phrase h2 { margin-top: 30px; font-size: 20px; }
  .page-intro { align-items: flex-start; margin-top: 5px; }
  .page-intro h2,
  .resource-hero h2,
  .profile-hero h2 { font-size: 29px; }
  .library-count { display: none; }
  #page-vocabulary .page-intro { align-items: stretch; flex-direction: column; gap: 16px; }
  .library-intro-actions,
  .library-add-word-button { width: 100%; }
  .library-intro-actions { display: block; }
  .search-box kbd { display: none; }
  .word-item { padding: 16px; }
  .study-header { gap: 11px; margin-bottom: 18px; }
  .study-card { min-height: 450px; padding: 23px 19px; border-radius: 22px; }
  .study-term-block { padding: 34px 0 30px; }
  .study-term-block h2 { font-size: 38px; overflow-wrap: anywhere; }
  .rating-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .rating-buttons button { padding: 6px 3px; }
  .complete-actions { flex-direction: column; }
  .resource-hero { padding: 27px 22px; }
  .horizontal-resource { grid-template-columns: 43px minmax(0, 1fr) auto; padding: 17px; }
  .horizontal-resource .resource-brand { width: 43px; height: 43px; }
  .copyright-note { padding: 14px; }
  .community-hero { display: block; padding: 27px 22px; }
  .community-hero h2 { font-size: 30px; }
  .community-hero .primary-button { margin-top: 20px; }
  .community-tabs { margin: 15px 0; padding: 4px; }
  .community-tab { min-height: 36px; padding: 0 13px; font-size: 10px; }
  .community-toolbar { grid-template-columns: 1fr; padding: 10px; }
  .community-toolbar .community-search,
  .community-toolbar .filter-select:last-child { grid-column: auto; }
  .community-result-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .community-resource-grid { grid-template-columns: 1fr; }
  .shared-resource-card { min-height: 330px; padding: 18px; }
  .community-intro { align-items: flex-start; flex-direction: column; gap: 14px; }
  .group-summary-grid,
  .moderation-summary { gap: 7px; }
  .group-summary-grid article,
  .moderation-summary article { padding: 13px 10px; }
  .group-summary-grid strong { font-size: 21px; }
  .group-toolbar { grid-template-columns: 1fr; }
  .compact-filter { grid-template-columns: auto 1fr; }
  .group-card-grid { grid-template-columns: 1fr; }
  .contribution-form { padding: 20px 15px; border-radius: var(--radius-md); }
  .form-grid,
  .visibility-fieldset { grid-template-columns: 1fr; }
  .visibility-fieldset select { grid-column: auto; }
  .review-group-help { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions button { width: 100%; }
  .guide-sticky-card { padding: 20px; }
  .guide-sticky-card ol { grid-template-columns: 1fr; }
  .moderation-summary article { min-height: 95px; }
  .moderation-summary article > strong { font-size: 23px; }
  .moderation-filters { grid-template-columns: 1fr; }
  .review-item { grid-template-columns: 20px minmax(0, 1fr); padding: 15px 12px; gap: 8px; }
  .review-actions { align-items: stretch; flex-direction: column; }
  .review-actions > div { display: grid; }
  .review-actions button { width: 100%; }
  .profile-hero { align-items: flex-start; flex-wrap: wrap; margin-top: 5px; }
  .profile-signout-button { width: 100%; margin-left: 0; }
  .profile-stats { gap: 7px; }
  .profile-stats article { padding: 15px 7px; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .setting-row select,
  .setting-row input[type="range"] { width: 100%; }
  .speech-rate-control { width: 100%; }
  .speech-rate-scale { font-size: 11px; }
  .setting-row select { min-height: 46px; font-size: 16px; }
  .voice-control { width: 100%; grid-template-columns: 1fr; }
  .voice-preview-button { width: 100%; min-height: 46px; }
  .voice-control > small { grid-column: auto; font-size: 12px; }
  .action-setting { align-items: stretch; }
  .word-dialog { max-height: calc(100vh - 20px); padding: 27px 19px; border-radius: 20px; }
  .add-word-dialog { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding-bottom: max(27px, env(safe-area-inset-bottom)); }
  .add-word-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .add-word-form-grid .form-field-wide { grid-column: auto; }
  .add-word-form-grid textarea,
  .add-word-form-grid .form-field-wide textarea { min-height: 96px; }
  .add-word-actions { flex-direction: column-reverse; }
  .add-word-actions button { width: 100%; }
  .create-group-actions { flex-direction: column-reverse; }
  .create-group-actions button { width: 100%; }
  .community-detail-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 25px 18px; border-radius: 20px; }
  .community-detail-meta,
  .community-document-sections { grid-template-columns: 1fr; }
  .community-detail-actions { flex-direction: column; }
  .community-detail-actions button { width: 100%; }
  .dialog-title-row h2 { font-size: 30px; overflow-wrap: anywhere; }
  .mobile-nav { right: 7px; left: 7px; padding-right: 2px; padding-left: 2px; }
  .mobile-nav-item { font-size: 8px; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .side-nav { gap: 3px; margin-top: 24px; }
  .nav-item { min-height: 40px; }
  .sidebar-note { display: none; }
}

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

}

/* 2026 business theme refinement
   Shared surfaces and controls use a quiet navy / mist / champagne system. */
:where(
  .auth-account-button,
  .icon-button,
  .streak-chip,
  .metric-card,
  .content-section,
  .word-item,
  .back-button,
  .study-card,
  .resource-card,
  .shared-resource-card,
  .group-card,
  .contribution-form,
  .moderation-summary article,
  .moderation-panel,
  .profile-stats article,
  .settings-card
) {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
}

:where(
  .auth-account-button,
  .icon-button,
  .streak-chip,
  .word-action,
  .back-button,
  .favorite-button,
  .dialog-close,
  .card-icon-button,
  .filter-chip,
  .community-tab,
  .secondary-button
):hover {
  border-color: var(--line-strong);
  background-color: var(--forest-50);
}

.metric-card,
.word-item,
.resource-card,
.shared-resource-card,
.group-card,
.moderation-summary article,
.profile-stats article {
  box-shadow: 0 1px 2px rgba(11, 31, 51, 0.025);
}

.content-section,
.contribution-form,
.moderation-panel,
.settings-card {
  box-shadow: var(--shadow-sm);
}

.search-box,
.community-toolbar,
.community-tabs {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within,
.community-search:focus-within {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(36, 87, 122, 0.12);
}

.filter-chip,
.community-tab {
  background: #ffffff;
  color: var(--muted);
}

.filter-chip.is-active,
.community-tab.is-active {
  border-color: var(--forest-900);
  background: var(--forest-900);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(11, 31, 51, 0.13);
}

.primary-button:hover,
.approve-button:hover {
  border-color: var(--forest-800);
  background: var(--forest-800);
  box-shadow: 0 9px 22px rgba(11, 31, 51, 0.18);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.word-item-meta span,
.level-badge,
.phonetic-button,
.safe-badge,
.kind-term,
.reviewer-badge,
.draft-status,
.dialog-topline span {
  background: var(--forest-50);
  color: var(--forest-700);
}

.resource-hero,
.community-hero {
  background: linear-gradient(112deg, #102a43 0%, #163a5f 62%, #24577a 100%);
  color: #f5f8fb;
  box-shadow: var(--shadow-md);
}

.community-hero p:not(.eyebrow) {
  color: rgba(238, 244, 249, 0.76);
}

.community-hero .primary-button {
  border-color: var(--gold-500);
  background: var(--gold-500);
  color: #0b1f33;
  box-shadow: none;
}

.community-hero .primary-button:hover {
  border-color: #d0aa6b;
  background: #d0aa6b;
}

.join-group-panel {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, #ffffff, var(--forest-50));
}

.community-mode-banner {
  border-color: var(--gold-200);
  background: var(--gold-100);
  color: #65491f;
}

.community-mode-banner[data-mode="online"] {
  border-color: #b9d5c8;
  background: #edf7f2;
  color: #1e5d47;
}

.cover-general,
.group-card-cover:not(.cover-general):not(.cover-machinery):not(.cover-quotation) {
  background: linear-gradient(125deg, #102a43, #24577a);
}

.cover-machinery {
  background: linear-gradient(125deg, #263f58, #698098);
}

.cover-quotation {
  background: linear-gradient(125deg, #6f552b, #b48b4e);
}

.privacy-check,
.dialog-tip,
.moderation-summary article.urgent {
  background: var(--gold-100);
  color: #65491f;
}

.guide-sticky-card,
.bulk-review-bar,
.toast {
  background: linear-gradient(155deg, #0b1f33, #102f4d);
}

.community-detail-dialog::backdrop,
.word-dialog::backdrop,
.auth-dialog::backdrop,
.create-group-dialog::backdrop,
.add-word-dialog::backdrop {
  background: rgba(7, 22, 37, 0.58);
}

:where(
  .form-field input,
  .form-field select,
  .form-field textarea,
  .filter-select select,
  .moderation-filters select,
  .community-search,
  .join-group-panel input,
  .setting-row select
) {
  border-color: var(--line);
  background-color: #ffffff;
  color: var(--ink);
}

:where(
  .form-field input,
  .form-field select,
  .form-field textarea,
  .filter-select select,
  .moderation-filters select,
  .join-group-panel input,
  .setting-row select
):focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(36, 87, 122, 0.11);
  outline: 0;
}

::placeholder {
  color: #8492a0;
  opacity: 1;
}

@media (max-width: 860px) {
  .mobile-nav {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(11, 31, 51, 0.96);
    box-shadow: 0 12px 34px rgba(7, 22, 37, 0.24);
  }

  .study-nav-icon {
    background: var(--gold-500);
    color: var(--forest-950);
  }

  body:has(input:focus, textarea:focus, select:focus) .mobile-nav {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

/* 2026 light-blue trade theme
   A bright B2B workspace with clear blue actions and restrained champagne accents. */
.sidebar {
  background: linear-gradient(180deg, #dceffa 0%, #cce5f4 100%);
  color: #113a56;
  border-right: 1px solid #b6d2e4;
}

.sidebar::before,
.sidebar::after {
  border-color: rgba(21, 94, 138, 0.1);
}

.brand {
  color: #0b2e4f;
}

.brand-mark {
  border-color: rgba(11, 46, 79, 0.12);
  box-shadow: 0 7px 18px rgba(11, 46, 79, 0.13);
}

.brand small,
.sidebar-note p {
  color: #3f6075;
}

.nav-section-label {
  color: #45677d;
}

.nav-item {
  color: #3f6075;
}

.nav-item:hover {
  color: #0b2e4f;
  background: rgba(255, 255, 255, 0.45);
}

.nav-item.is-active {
  color: #0b2e4f;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 14px rgba(11, 46, 79, 0.07);
}

.sidebar-note {
  border-color: #b6d2e4;
  background: rgba(255, 255, 255, 0.55);
}

.sidebar-note strong {
  color: #113a56;
}

.hero-card,
.resource-hero,
.community-hero {
  border: 1px solid #b6d2e4;
  background: linear-gradient(112deg, #d8effb 0%, #c7e6f6 57%, #b9def1 100%);
  color: #0b2e4f;
  box-shadow: var(--shadow-md);
}

.hero-card::before {
  background: radial-gradient(circle, rgba(31, 111, 159, 0.15), transparent 68%);
}

.hero-kicker {
  color: var(--gold-600);
}

.hero-copy > p:not(.hero-kicker),
.community-hero p:not(.eyebrow),
.resource-hero > p:not(.eyebrow) {
  color: #39586f;
}

.hero-card .primary-button,
.community-hero .primary-button {
  border-color: #155e8a;
  background: #155e8a;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(11, 46, 79, 0.15);
}

.hero-card .primary-button:hover,
.community-hero .primary-button:hover {
  border-color: #0f4f78;
  background: #0f4f78;
}

.globe {
  border-color: rgba(15, 73, 111, 0.22);
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.32), transparent 55%);
  box-shadow: inset 0 0 45px rgba(21, 94, 138, 0.04), 0 0 70px rgba(21, 94, 138, 0.1);
}

.globe::before,
.globe::after,
.globe-line {
  border-color: rgba(15, 73, 111, 0.19);
}

.orbit {
  border-color: rgba(21, 94, 138, 0.25);
}

.route-dot {
  box-shadow: 0 0 0 5px rgba(200, 138, 45, 0.17);
}

.floating-tag {
  border-color: rgba(21, 94, 138, 0.16);
  background: rgba(255, 255, 255, 0.75);
  color: #10496f;
  box-shadow: 0 4px 14px rgba(11, 46, 79, 0.08);
}

.daily-phrase {
  background: linear-gradient(145deg, #155e8a 0%, #247aa7 100%);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.daily-phrase > p,
.phrase-note p {
  color: rgba(255, 255, 255, 0.78);
}

.daily-phrase .eyebrow,
.phrase-note span {
  color: #fff1d2;
}

.round-sound-button {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

:where(
  .auth-account-button,
  .icon-button,
  .streak-chip,
  .metric-card,
  .content-section,
  .filter-chip,
  .word-item,
  .back-button,
  .study-card,
  .resource-card,
  .community-tabs,
  .community-toolbar,
  .shared-resource-card,
  .community-empty,
  .group-summary-grid article,
  .group-card,
  .contribution-form,
  .moderation-summary article,
  .moderation-panel,
  .profile-stats article,
  .settings-panel
) {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.metric-card,
.content-section,
.resource-card,
.shared-resource-card,
.group-card,
.contribution-form,
.moderation-panel,
.settings-panel {
  box-shadow: var(--shadow-sm);
}

.search-box,
.community-toolbar,
.community-tabs {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.search-box:focus-within,
.community-search:focus-within {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.filter-chip.is-active,
.community-tab.is-active {
  border-color: #155e8a;
  background: #155e8a;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(11, 46, 79, 0.14);
}

.resource-hero::after,
.community-hero::after {
  border-color: rgba(21, 94, 138, 0.14);
  box-shadow: 0 0 0 45px rgba(21, 94, 138, 0.045), 0 0 0 90px rgba(21, 94, 138, 0.025);
}

.join-group-panel {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, #ffffff, #eaf5fb);
}

.cover-general,
.group-card-cover:not(.cover-general):not(.cover-machinery):not(.cover-quotation) {
  background: linear-gradient(125deg, #155e8a, #2a7ca7);
}

.cover-machinery {
  background: linear-gradient(125deg, #3e6f8d, #78a8c3);
}

.guide-sticky-card,
.bulk-review-bar,
.toast {
  background: linear-gradient(155deg, #10496f, #1f6f9f);
}

.community-detail-dialog::backdrop,
.word-dialog::backdrop,
.auth-dialog::backdrop,
.create-group-dialog::backdrop,
.add-word-dialog::backdrop {
  background: rgba(11, 46, 79, 0.48);
}

:where(
  .form-field input,
  .form-field select,
  .form-field textarea,
  .filter-select select,
  .moderation-filters select,
  .join-group-panel input,
  .setting-row select
):focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

::placeholder {
  color: #5a7285;
}

@media (max-width: 860px) {
  .mobile-nav {
    border-color: rgba(168, 197, 217, 0.82);
    background: rgba(246, 250, 253, 0.96);
    color: #486478;
    box-shadow: 0 12px 34px rgba(11, 46, 79, 0.16);
  }

  .mobile-nav-item.is-active {
    color: #155e8a;
  }

  .study-nav-icon {
    border-color: var(--paper);
    background: #155e8a;
    color: #ffffff;
  }
}

/* 2026 Aurora Trade Intelligence theme
   Ice-blue workspace, deep-ocean structure and restrained cyan/violet aurora light. */
body {
  background-color: var(--tech-canvas);
  background-image:
    linear-gradient(rgba(28, 104, 145, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 104, 145, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 8% 10%, rgba(53, 184, 212, 0.2), transparent 29rem),
    radial-gradient(circle at 92% 6%, rgba(102, 113, 229, 0.13), transparent 31rem),
    radial-gradient(circle at 74% 82%, rgba(45, 180, 157, 0.11), transparent 27rem),
    linear-gradient(180deg, #fbfdff 0%, #edf6fb 52%, #f5f9fc 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto, auto;
}

.sidebar {
  border-right-color: rgba(123, 207, 229, 0.18);
  background:
    radial-gradient(circle at 24% 2%, rgba(53, 184, 212, 0.27), transparent 16rem),
    radial-gradient(circle at 112% 52%, rgba(102, 113, 229, 0.19), transparent 20rem),
    linear-gradient(180deg, #071c2d 0%, #0a2c45 58%, #0b3651 100%);
  color: #edf8ff;
  box-shadow: 12px 0 42px rgba(7, 28, 45, 0.13);
}

.sidebar::before,
.sidebar::after {
  border-color: rgba(107, 207, 228, 0.15);
  box-shadow: 0 0 30px rgba(53, 184, 212, 0.05);
}

.brand {
  color: #ffffff;
}

.brand small,
.sidebar-note p {
  color: rgba(218, 239, 248, 0.7);
}

.nav-section-label {
  color: rgba(126, 214, 232, 0.68);
}

.nav-item {
  border: 1px solid transparent;
  color: rgba(226, 242, 250, 0.74);
}

.nav-item:hover {
  border-color: rgba(126, 220, 238, 0.15);
  background: rgba(53, 184, 212, 0.1);
  color: #ffffff;
}

.nav-item.is-active {
  border-color: rgba(126, 220, 238, 0.27);
  background: linear-gradient(100deg, rgba(53, 184, 212, 0.25), rgba(102, 113, 229, 0.14));
  color: #ffffff;
  box-shadow: inset 3px 0 #58c8dc, 0 10px 26px rgba(2, 15, 25, 0.18);
}

.nav-item.is-active::before {
  background: #d8a64c;
  box-shadow: 0 0 12px rgba(216, 166, 76, 0.48);
}

.sidebar-note {
  border-color: rgba(126, 220, 238, 0.21);
  background: linear-gradient(135deg, rgba(53, 184, 212, 0.13), rgba(102, 113, 229, 0.09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.sidebar-note strong {
  color: #ffffff;
}

.topbar {
  padding: 10px 12px;
  border: 1px solid rgba(24, 91, 128, 0.12);
  border-radius: 18px;
  background: rgba(250, 253, 255, 0.7);
  box-shadow: 0 10px 30px rgba(15, 73, 111, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(125%);
}

.auth-account-button,
.icon-button,
.streak-chip {
  border-color: rgba(24, 91, 128, 0.15);
  background: rgba(255, 255, 255, 0.79);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.hero-card,
.resource-hero,
.community-hero {
  border-color: rgba(123, 211, 233, 0.27);
  background:
    radial-gradient(circle at 84% 8%, rgba(78, 167, 255, 0.34), transparent 35%),
    radial-gradient(circle at 58% 112%, rgba(45, 180, 157, 0.23), transparent 42%),
    linear-gradient(120deg, #071c2d 0%, #0b3856 50%, #0d6680 100%);
  color: #f7fbff;
  box-shadow: 0 27px 64px rgba(7, 31, 49, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.hero-card::before {
  background: radial-gradient(circle, rgba(102, 113, 229, 0.27), transparent 68%);
}

.hero-kicker,
.resource-hero .eyebrow,
.community-hero .eyebrow {
  color: #f1c672;
}

.hero-copy > p:not(.hero-kicker),
.community-hero p:not(.eyebrow),
.resource-hero > p:not(.eyebrow) {
  color: rgba(226, 243, 250, 0.8);
}

.hero-card .primary-button,
.community-hero .primary-button {
  border-color: rgba(153, 231, 244, 0.48);
  background: linear-gradient(120deg, #1385ae, #2db49d);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 175, 181, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-card .primary-button:hover,
.community-hero .primary-button:hover {
  border-color: rgba(187, 240, 249, 0.65);
  background: linear-gradient(120deg, #0f769e, #269a87);
}

.globe {
  border-color: rgba(112, 216, 235, 0.35);
  background: radial-gradient(circle at 40% 35%, rgba(77, 194, 220, 0.17), transparent 55%);
  box-shadow: inset 0 0 50px rgba(53, 184, 212, 0.08), 0 0 80px rgba(102, 113, 229, 0.16);
}

.globe::before,
.globe::after,
.globe-line {
  border-color: rgba(126, 220, 238, 0.27);
}

.orbit {
  border-color: rgba(113, 202, 229, 0.31);
}

.floating-tag {
  border-color: rgba(145, 224, 239, 0.27);
  background: rgba(5, 34, 52, 0.6);
  color: rgba(229, 248, 253, 0.82);
  box-shadow: 0 8px 22px rgba(2, 20, 33, 0.2);
}

.metric-card,
.content-section,
.word-item,
.study-card,
.resource-card,
.community-tabs,
.community-toolbar,
.shared-resource-card,
.community-empty,
.group-summary-grid article,
.group-card,
.profile-stats article,
.settings-panel {
  border-color: var(--glass-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 249, 254, 0.84));
  box-shadow: 0 16px 42px rgba(15, 73, 111, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tech-cyan);
  box-shadow: 0 0 14px rgba(53, 184, 212, 0.48);
  content: "";
}

.metric-card:nth-child(2)::before {
  background: #d8a64c;
  box-shadow: 0 0 14px rgba(216, 166, 76, 0.42);
}

.metric-card:nth-child(3)::before {
  background: var(--tech-violet);
  box-shadow: 0 0 14px rgba(102, 113, 229, 0.42);
}

.metric-icon.green {
  background: linear-gradient(145deg, #ddf8f8, #e9fbf5);
  color: #137f83;
}

.metric-icon.gold {
  background: linear-gradient(145deg, #fff2d8, #fff8ea);
  color: #99640f;
}

.metric-icon.blue {
  background: linear-gradient(145deg, #e8eaff, #eef6ff);
  color: #5261c5;
}

.scenario-card {
  border-color: rgba(24, 91, 128, 0.08);
  background: linear-gradient(145deg, rgba(246, 251, 254, 0.96), rgba(237, 247, 252, 0.82));
}

.scenario-card:hover {
  border-color: rgba(53, 184, 212, 0.34);
  box-shadow: 0 10px 24px rgba(15, 73, 111, 0.08);
}

.scenario-symbol {
  background: linear-gradient(145deg, #ddf7fa, #e9f8ff);
  color: #0f739c;
}

.scenario-card:nth-child(3n + 2) .scenario-symbol {
  background: linear-gradient(145deg, #fff0d5, #fff8ea);
  color: #95610e;
}

.scenario-card:nth-child(3n + 3) .scenario-symbol {
  background: linear-gradient(145deg, #e9eaff, #eef4ff);
  color: #5663c9;
}

.daily-phrase {
  border: 1px solid rgba(123, 211, 233, 0.2);
  background:
    radial-gradient(circle at 105% -10%, rgba(102, 113, 229, 0.32), transparent 45%),
    linear-gradient(145deg, #0a3651 0%, #106a86 100%);
  box-shadow: 0 19px 44px rgba(7, 42, 65, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.search-box,
.community-toolbar,
.community-tabs {
  border-color: var(--glass-border);
  background: rgba(251, 254, 255, 0.88);
  box-shadow: 0 12px 32px rgba(15, 73, 111, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.filter-chip.is-active,
.community-tab.is-active {
  border-color: #106fa4;
  background: linear-gradient(120deg, #106fa4, #168aa5);
  box-shadow: 0 7px 18px rgba(16, 111, 164, 0.2);
}

.contribution-form,
.moderation-panel,
.auth-card,
.word-dialog-card {
  border-color: var(--glass-border);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(7, 42, 65, 0.11);
}

.guide-sticky-card,
.bulk-review-bar,
.toast {
  background: linear-gradient(145deg, #08253a, #0e607b);
  box-shadow: 0 16px 38px rgba(7, 31, 49, 0.24);
}

@media (max-width: 860px) {
  body {
    background-image:
      radial-gradient(circle at 2% 5%, rgba(53, 184, 212, 0.18), transparent 22rem),
      radial-gradient(circle at 100% 12%, rgba(102, 113, 229, 0.11), transparent 24rem),
      linear-gradient(180deg, #f9fcfe 0%, #edf6fb 55%, #f7fbfd 100%);
    background-size: auto;
  }

  .topbar {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .hero-card,
  .resource-hero,
  .community-hero {
    box-shadow: 0 18px 42px rgba(7, 31, 49, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .hero-visual {
    opacity: 0.58;
  }

  .metric-card,
  .content-section,
  .word-item,
  .study-card,
  .resource-card,
  .shared-resource-card,
  .group-card,
  .profile-stats article,
  .settings-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 254, 0.94));
    box-shadow: 0 11px 28px rgba(15, 73, 111, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  }

  .mobile-nav {
    border-color: rgba(108, 176, 207, 0.35);
    background: rgba(248, 252, 255, 0.92);
    color: #405f73;
    box-shadow: 0 14px 36px rgba(7, 42, 65, 0.18);
    backdrop-filter: blur(18px) saturate(135%);
  }

  .mobile-nav-item.is-active {
    color: #0c719d;
  }

  .study-nav-icon {
    border-color: #edf7fc;
    background: linear-gradient(145deg, #1079a6, #2db49d);
    box-shadow: 0 9px 22px rgba(20, 143, 160, 0.26);
  }
}

/* Aurora Trade Signals: original home metric and scenario icon system. */
.home-line-icon {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.home-line-icon .icon-highlight {
  stroke: #e3a63f;
}

.home-line-icon .icon-node {
  fill: #f2b64b;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.15;
}

.metric-card::before {
  display: none;
}

.metric-card {
  gap: 15px;
  padding-inline: 20px;
}

.metric-icon {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--signal-border);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--signal-from), var(--signal-to));
  color: var(--signal-ink);
  box-shadow: 0 9px 20px var(--signal-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  font-size: 0;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.metric-icon::after {
  position: absolute;
  top: -9px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  content: "";
  filter: blur(5px);
  pointer-events: none;
}

.metric-icon .home-line-icon {
  position: relative;
  z-index: 1;
}

.metric-card:hover .metric-icon {
  transform: translateY(-1px);
}

.metric-icon.green {
  --signal-ink: #1189a8;
  --signal-from: #d8f7fc;
  --signal-to: #edf9ff;
  --signal-border: rgba(17, 137, 168, 0.19);
  --signal-shadow: rgba(17, 137, 168, 0.13);
}

.metric-icon.gold {
  --signal-ink: #ad7118;
  --signal-from: #fff0d2;
  --signal-to: #fff9ed;
  --signal-border: rgba(173, 113, 24, 0.19);
  --signal-shadow: rgba(173, 113, 24, 0.13);
}

.metric-icon.blue {
  --signal-ink: #5964d6;
  --signal-from: #e8e9ff;
  --signal-to: #f3f4ff;
  --signal-border: rgba(89, 100, 214, 0.18);
  --signal-shadow: rgba(89, 100, 214, 0.13);
}

.scenario-card {
  gap: 13px;
}

#scenario-grid .scenario-symbol {
  --signal-ink: #138eac;
  --signal-from: #ddf8fc;
  --signal-to: #effaff;
  --signal-border: rgba(19, 142, 172, 0.18);
  --signal-shadow: rgba(19, 142, 172, 0.12);
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--signal-border);
  border-radius: 15px;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.88), transparent 34%),
    linear-gradient(145deg, var(--signal-from), var(--signal-to));
  color: var(--signal-ink);
  box-shadow: 0 8px 18px var(--signal-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  font-size: 0;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

#scenario-grid .scenario-symbol .home-line-icon {
  width: 22px;
  height: 22px;
}

.scenario-card:hover .scenario-symbol {
  transform: translateY(-1px);
  box-shadow: 0 11px 23px var(--signal-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

#scenario-grid .scenario-symbol.tone-cyan {
  --signal-ink: #138eac;
  --signal-from: #ddf8fc;
  --signal-to: #effaff;
  --signal-border: rgba(19, 142, 172, 0.18);
  --signal-shadow: rgba(19, 142, 172, 0.12);
}

#scenario-grid .scenario-symbol.tone-amber {
  --signal-ink: #ad7118;
  --signal-from: #fff0d5;
  --signal-to: #fff9ee;
  --signal-border: rgba(173, 113, 24, 0.18);
  --signal-shadow: rgba(173, 113, 24, 0.12);
}

#scenario-grid .scenario-symbol.tone-violet {
  --signal-ink: #5b63d4;
  --signal-from: #e9e9ff;
  --signal-to: #f4f3ff;
  --signal-border: rgba(91, 99, 212, 0.18);
  --signal-shadow: rgba(91, 99, 212, 0.12);
}

#scenario-grid .scenario-symbol.tone-mint {
  --signal-ink: #168d83;
  --signal-from: #dcf8f1;
  --signal-to: #effbf7;
  --signal-border: rgba(22, 141, 131, 0.18);
  --signal-shadow: rgba(22, 141, 131, 0.12);
}

#scenario-grid .scenario-symbol.tone-blue {
  --signal-ink: #2672c8;
  --signal-from: #e1efff;
  --signal-to: #f0f7ff;
  --signal-border: rgba(38, 114, 200, 0.18);
  --signal-shadow: rgba(38, 114, 200, 0.12);
}

#scenario-grid .scenario-symbol.tone-green {
  --signal-ink: #17845f;
  --signal-from: #ddf6eb;
  --signal-to: #f0fbf6;
  --signal-border: rgba(23, 132, 95, 0.18);
  --signal-shadow: rgba(23, 132, 95, 0.12);
}

/* Executive Spectrum frames: low-saturation business colour for home panels. */
.metric-card {
  --card-accent: #2a8fa2;
  --card-border: #b8dce2;
  --card-from: #e8f4f6;
  --card-to: #f8fbfc;
  --card-hover: #e1eff2;
  position: relative;
  border-color: var(--card-border);
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--card-accent) 11%, transparent), transparent 40%),
    linear-gradient(135deg, var(--card-from), var(--card-to));
  box-shadow: inset 3px 0 0 var(--card-accent), 0 12px 28px rgba(15, 61, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.metric-card:nth-child(2) {
  --card-accent: #a9782d;
  --card-border: #deceb4;
  --card-from: #f5efe4;
  --card-to: #fcfaf6;
  --card-hover: #f0e7d8;
}

.metric-card:nth-child(3) {
  --card-accent: #626db3;
  --card-border: #cbd0e6;
  --card-from: #eceff8;
  --card-to: #f9f9fc;
  --card-hover: #e6e9f4;
}

.metric-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 48%, var(--card-border));
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--card-accent) 15%, transparent), transparent 42%),
    linear-gradient(135deg, var(--card-hover), var(--card-to));
  box-shadow: inset 3px 0 0 var(--card-accent), 0 15px 31px rgba(15, 61, 88, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-2px);
}

.scenario-section {
  border-color: rgba(35, 82, 110, 0.2);
  background:
    radial-gradient(circle at 12% 0%, rgba(49, 143, 160, 0.11), transparent 30%),
    radial-gradient(circle at 92% 100%, rgba(82, 94, 151, 0.09), transparent 34%),
    linear-gradient(145deg, #edf6f8 0%, #eef3f8 58%, #f7f9fb 100%);
  box-shadow: 0 18px 42px rgba(12, 53, 80, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#scenario-grid .scenario-card {
  --card-accent: #27899e;
  --card-border: #b9dce2;
  --card-from: #e9f4f6;
  --card-to: #f8fbfc;
  --card-hover: #e2eff2;
  position: relative;
  overflow: hidden;
  border-color: var(--card-border);
  background:
    linear-gradient(90deg, var(--card-accent), var(--card-accent)) 0 50% / 3px calc(100% - 24px) no-repeat,
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--card-accent) 8%, transparent), transparent 44%),
    linear-gradient(135deg, var(--card-from), var(--card-to));
  box-shadow: 0 9px 22px rgba(15, 61, 88, 0.065), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

#scenario-grid .scenario-card:nth-child(2) {
  --card-accent: #a7772d;
  --card-border: #dfcfb6;
  --card-from: #f5efe4;
  --card-to: #fcfaf6;
  --card-hover: #f0e7d8;
}

#scenario-grid .scenario-card:nth-child(3) {
  --card-accent: #606bb1;
  --card-border: #ccd1e7;
  --card-from: #edeff8;
  --card-to: #f9f9fc;
  --card-hover: #e6e9f4;
}

#scenario-grid .scenario-card:nth-child(4) {
  --card-accent: #338979;
  --card-border: #bedad2;
  --card-from: #e9f3f0;
  --card-to: #f8fbfa;
  --card-hover: #e2eeea;
}

#scenario-grid .scenario-card:nth-child(5) {
  --card-accent: #3b78a4;
  --card-border: #c0d3e4;
  --card-from: #e9f1f7;
  --card-to: #f8fafc;
  --card-hover: #e2ecf4;
}

#scenario-grid .scenario-card:nth-child(6) {
  --card-accent: #4c8060;
  --card-border: #c5d9ca;
  --card-from: #ecf3ee;
  --card-to: #f9fbf9;
  --card-hover: #e5eee7;
}

#scenario-grid .scenario-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 52%, var(--card-border));
  background:
    linear-gradient(90deg, var(--card-accent), var(--card-accent)) 0 50% / 3px calc(100% - 24px) no-repeat,
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--card-accent) 12%, transparent), transparent 44%),
    linear-gradient(135deg, var(--card-hover), var(--card-to));
  box-shadow: 0 13px 28px rgba(15, 61, 88, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .metric-card {
    gap: 8px;
    padding-inline: 11px;
  }

  .metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .metric-icon .home-line-icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
  }

  #scenario-grid .scenario-symbol {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  #scenario-grid .scenario-symbol .home-line-icon {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
  }

  .metric-card,
  .metric-card:hover,
  #scenario-grid .scenario-card,
  #scenario-grid .scenario-card:hover {
    transform: none;
  }

  .metric-card {
    box-shadow: inset 2px 0 0 var(--card-accent), 0 8px 18px rgba(15, 61, 88, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  }

  #scenario-grid .scenario-card,
  #scenario-grid .scenario-card:hover {
    background:
      linear-gradient(90deg, var(--card-accent), var(--card-accent)) 0 50% / 2px calc(100% - 20px) no-repeat,
      radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--card-accent) 8%, transparent), transparent 44%),
      linear-gradient(135deg, var(--card-from), var(--card-to));
    box-shadow: 0 7px 16px rgba(15, 61, 88, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-icon,
  #scenario-grid .scenario-symbol {
    transition: none;
  }
}

/* Authentication gateway v18 — fail-closed first screen */
[hidden] { display: none !important; }

html.auth-pending,
html.auth-required,
html.auth-pending body,
html.auth-required body {
  min-height: 100%;
  overflow: hidden;
}

html.auth-pending .app-shell,
html.auth-required .app-shell {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.auth-gate-screen {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: clamp(28px, 6vw, 88px) min(52vw, 760px) clamp(28px, 6vw, 88px) clamp(28px, 7vw, 112px);
  background:
    linear-gradient(rgba(42, 151, 190, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(42, 151, 190, 0.055) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at 12% 14%, rgba(42, 206, 196, 0.30), transparent 27%),
    radial-gradient(circle at 72% 86%, rgba(111, 97, 224, 0.24), transparent 31%),
    linear-gradient(128deg, #061b2b 0%, #0a3550 48%, #0b6077 100%);
  color: #f7fcff;
}

.auth-gate-screen::before {
  position: absolute;
  width: min(46vw, 680px);
  aspect-ratio: 1;
  border: 1px solid rgba(126, 229, 237, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 190, 214, 0.10), transparent 64%);
  content: "";
  left: -13vw;
  bottom: -30vw;
  box-shadow: 0 0 120px rgba(30, 194, 201, 0.12);
}

.auth-gate-content {
  position: relative;
  z-index: 1;
  width: min(590px, 100%);
}

.auth-gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-bottom: clamp(44px, 8vh, 82px);
  color: inherit;
  text-decoration: none;
}

.auth-gate-brand .brand-mark {
  width: 52px;
  height: 52px;
  color: #fff;
  background: linear-gradient(145deg, #2ba6d0, #24b8a8);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.auth-gate-brand strong,
.auth-gate-brand small { display: block; }
.auth-gate-brand strong { font-size: 20px; letter-spacing: 0.02em; }
.auth-gate-brand small { margin-top: 3px; color: rgba(221, 243, 250, 0.68); font-size: 9px; letter-spacing: 0.24em; }
.auth-gate-content > .eyebrow { color: #7fe0e2; }

.auth-gate-content h1 {
  margin: 12px 0 19px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(38px, 4.2vw, 70px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.auth-gate-lead {
  max-width: 530px;
  margin: 0;
  color: rgba(226, 243, 249, 0.74);
  font-size: clamp(13px, 1.25vw, 17px);
  line-height: 1.9;
}

.auth-gate-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 31px;
}

.auth-gate-features span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(151, 224, 233, 0.18);
  border-radius: 999px;
  background: rgba(10, 42, 61, 0.38);
  color: rgba(234, 248, 252, 0.82);
  font-size: 10px;
  backdrop-filter: blur(10px);
}

.auth-gate-features b { color: #58d4d5; font-size: 8px; letter-spacing: 0.1em; }

.auth-gate-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 30px 0 0;
  color: rgba(224, 244, 249, 0.68);
  font-size: 10px;
}

.auth-gate-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #54d9c8;
  box-shadow: 0 0 0 5px rgba(84, 217, 200, 0.11), 0 0 17px rgba(84, 217, 200, 0.7);
}

.auth-gate-orbit {
  position: absolute;
  border: 1px solid rgba(110, 221, 229, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.auth-gate-orbit-one { width: 330px; height: 120px; right: 42%; top: 12%; transform: rotate(-24deg); }
.auth-gate-orbit-two { width: 210px; height: 380px; right: 46%; bottom: 7%; transform: rotate(37deg); }

html.auth-required .auth-dialog {
  width: min(430px, calc(100% - 32px));
  margin: auto clamp(28px, 8vw, 130px) auto auto;
  border-color: rgba(188, 224, 236, 0.72);
  background: rgba(250, 253, 255, 0.96);
  box-shadow: 0 34px 110px rgba(1, 18, 31, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.44) inset;
  backdrop-filter: blur(24px);
}

html.auth-required .auth-dialog::backdrop {
  background: rgba(3, 20, 33, 0.18);
  backdrop-filter: blur(2px);
}

html.auth-required #auth-dialog-close { display: none !important; }
html.auth-required .auth-mode-switch button { min-height: 44px; }
html.auth-required .auth-security-note { font-size: 10px; line-height: 1.6; }

@media (max-width: 900px) {
  .auth-gate-screen {
    place-items: start center;
    padding: 34px 24px 55vh;
    text-align: center;
  }
  .auth-gate-content { width: min(560px, 100%); }
  .auth-gate-brand { margin-bottom: 25px; }
  .auth-gate-content h1 { margin-top: 8px; font-size: clamp(34px, 9vw, 49px); }
  .auth-gate-lead { margin-inline: auto; }
  .auth-gate-features { display: none; }
  .auth-gate-status { justify-content: center; margin-top: 18px; }
  html.auth-required .auth-dialog { margin: auto; }
}

@media (max-width: 520px) {
  .auth-gate-screen { padding: 24px 18px 62vh; }
  .auth-gate-brand .brand-mark { width: 44px; height: 44px; }
  .auth-gate-brand strong { font-size: 17px; }
  .auth-gate-content h1 { font-size: 34px; }
  .auth-gate-lead { font-size: 12px; line-height: 1.75; }
  html.auth-required .auth-dialog { max-height: calc(100dvh - 24px); padding: 25px 21px; }
}

/* Bright Prism Commerce v20 */
:root {
  --theme-id: aurora-trade-bright-v20;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-english-display: "Segoe UI Variable Display", "Aptos Display", "Trebuchet MS", Arial, sans-serif;
  --prism-ink: #092b4a;
  --prism-blue: #0878d1;
  --prism-cyan: #13bfd0;
  --prism-mint: #20bfa2;
  --prism-violet: #6b5ce7;
  --prism-amber: #f4a51c;
  --prism-rose: #e85f8a;
  --prism-line: rgba(21, 111, 171, 0.21);
  --prism-shadow: 0 18px 44px rgba(18, 80, 125, 0.13);
  --ink: var(--prism-ink);
  --muted: #46657d;
  --muted-light: #5d7588;
  --focus-ring: rgba(8, 120, 209, 0.34);
}

body {
  background-color: #edfaff;
  background-image:
    linear-gradient(rgba(8, 120, 209, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 120, 209, 0.038) 1px, transparent 1px),
    radial-gradient(circle at 6% 8%, rgba(19, 191, 208, 0.25), transparent 28rem),
    radial-gradient(circle at 94% 4%, rgba(107, 92, 231, 0.2), transparent 31rem),
    radial-gradient(circle at 78% 88%, rgba(244, 165, 28, 0.14), transparent 28rem),
    linear-gradient(145deg, #f7fdff 0%, #e9f8ff 42%, #f1efff 72%, #fff8e8 100%);
  color: var(--prism-ink);
  font-family: var(--font-ui);
}

.sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(26, 200, 218, 0.34), transparent 15rem),
    radial-gradient(circle at 112% 46%, rgba(112, 92, 238, 0.26), transparent 20rem),
    linear-gradient(180deg, #061f36 0%, #082f50 54%, #0b4770 100%);
}

.brand-mark {
  border-color: rgba(198, 246, 255, 0.58);
  background:
    radial-gradient(circle at 78% 22%, #ffd166 0 4px, transparent 4.5px),
    linear-gradient(145deg, #087dcc 0%, #18b9cc 55%, #6b5ce7 118%);
  box-shadow: 0 10px 25px rgba(2, 19, 38, 0.31), 0 0 24px rgba(19, 191, 208, 0.18);
}

.sidebar .brand strong,
.auth-gate-brand strong {
  color: #eafcff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.sidebar .brand small,
.auth-gate-brand small {
  color: #78ddea;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.topbar {
  border-color: var(--prism-line);
  background:
    radial-gradient(circle at 4% 0%, rgba(19, 191, 208, 0.16), transparent 18rem),
    radial-gradient(circle at 72% 110%, rgba(107, 92, 231, 0.13), transparent 22rem),
    linear-gradient(115deg, rgba(232, 250, 255, 0.94), rgba(242, 239, 255, 0.9) 64%, rgba(255, 247, 226, 0.87));
  box-shadow: 0 14px 34px rgba(18, 80, 125, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.topbar .eyebrow {
  color: #a65a00;
  font-weight: 800;
}

.topbar #page-title {
  color: #075faf;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.15vw, 31px);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.hero-card,
.resource-hero,
.community-hero {
  border-color: rgba(111, 226, 239, 0.38);
  background:
    radial-gradient(circle at 86% 2%, rgba(87, 155, 255, 0.48), transparent 35%),
    radial-gradient(circle at 58% 116%, rgba(32, 191, 162, 0.34), transparent 42%),
    radial-gradient(circle at 20% -28%, rgba(107, 92, 231, 0.25), transparent 35%),
    linear-gradient(120deg, #061d3a 0%, #07456f 50%, #07829a 100%);
  box-shadow: 0 28px 68px rgba(4, 38, 70, 0.28), 0 0 0 1px rgba(114, 232, 242, 0.08) inset, inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-kicker,
.resource-hero .eyebrow,
.community-hero .eyebrow {
  color: #ffd166;
  font-family: var(--font-ui);
  font-weight: 800;
}

.hero-copy h2 {
  color: #c8f7ff;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.25vw, 51px);
  font-weight: 830;
  line-height: 1.18;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(0, 16, 37, 0.22);
}

.hero-copy > p:not(.hero-kicker),
.community-hero p:not(.eyebrow),
.resource-hero > p:not(.eyebrow) {
  color: rgba(230, 249, 255, 0.85);
}

.hero-card .primary-button,
.community-hero .primary-button {
  border-color: rgba(190, 248, 255, 0.62);
  background: linear-gradient(120deg, #079bd0 0%, #20bfa2 54%, #6b5ce7 135%);
  box-shadow: 0 13px 30px rgba(13, 188, 196, 0.31), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.hero-card .primary-button:hover,
.community-hero .primary-button:hover {
  border-color: rgba(226, 253, 255, 0.82);
  background: linear-gradient(120deg, #0589bd 0%, #18aa91 54%, #5e4fda 135%);
}

.page-intro h2,
.resource-hero h2,
.community-hero h2,
.profile-hero h2,
.section-heading h2,
.completion-card h2,
#auth-dialog-title,
#create-group-dialog-title,
#add-word-dialog-title,
.guide-sticky-card h3 {
  font-family: var(--font-display);
  font-weight: 790;
  letter-spacing: -0.035em;
}

.auth-gate-content h1 {
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: -0.045em;
}

.daily-phrase h2 {
  font-family: var(--font-english-display);
  font-weight: 670;
  letter-spacing: -0.025em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .sidebar .brand strong,
  .auth-gate-brand strong {
    background: linear-gradient(100deg, #ffffff 0%, #82eff4 50%, #c8bcff 82%, #ffd166 118%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .topbar #page-title {
    background: linear-gradient(100deg, #0669be 0%, #08a7bf 52%, #6853df 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-copy h2,
  .auth-gate-content h1 {
    background: linear-gradient(102deg, #d3f9ff 0%, #ffffff 31%, #78ebf2 56%, #c2b6ff 79%, #ffd166 108%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.metric-card {
  --card-accent: #02a9c2;
  --card-border: rgba(2, 169, 194, 0.34);
  --card-from: #d9f9ff;
  --card-to: #f0f7ff;
  --card-hover: #cdf5ff;
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--card-accent) 24%, transparent), transparent 43%),
    linear-gradient(135deg, var(--card-from), var(--card-to));
  box-shadow: inset 4px 0 0 var(--card-accent), 0 14px 34px color-mix(in srgb, var(--card-accent) 14%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.metric-card:nth-child(2) {
  --card-accent: #e18a00;
  --card-border: rgba(225, 138, 0, 0.32);
  --card-from: #fff0c7;
  --card-to: #fff9eb;
  --card-hover: #ffe8ac;
}

.metric-card:nth-child(3) {
  --card-accent: #6956e8;
  --card-border: rgba(105, 86, 232, 0.3);
  --card-from: #e9e5ff;
  --card-to: #f5f1ff;
  --card-hover: #ded8ff;
}

.metric-card:hover {
  box-shadow: inset 4px 0 0 var(--card-accent), 0 18px 38px color-mix(in srgb, var(--card-accent) 20%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.scenario-section {
  border-color: rgba(49, 103, 170, 0.25);
  background:
    radial-gradient(circle at 8% 0%, rgba(19, 191, 208, 0.25), transparent 34%),
    radial-gradient(circle at 94% 100%, rgba(107, 92, 231, 0.2), transparent 38%),
    radial-gradient(circle at 58% 40%, rgba(244, 165, 28, 0.1), transparent 30%),
    linear-gradient(140deg, #def8ff 0%, #e9f3ff 45%, #f0eaff 73%, #fff4d8 118%);
  box-shadow: 0 21px 48px rgba(18, 80, 125, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

#scenario-grid .scenario-card {
  --card-accent: #049fbd;
  --card-border: rgba(4, 159, 189, 0.3);
  --card-from: #d8f8ff;
  --card-to: #eefaff;
  --card-hover: #ccf4ff;
  box-shadow: 0 11px 25px color-mix(in srgb, var(--card-accent) 11%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#scenario-grid .scenario-card:nth-child(2) {
  --card-accent: #d87800;
  --card-border: rgba(216, 120, 0, 0.29);
  --card-from: #ffedc3;
  --card-to: #fff8e9;
  --card-hover: #ffe3a0;
}

#scenario-grid .scenario-card:nth-child(3) {
  --card-accent: #6854e1;
  --card-border: rgba(104, 84, 225, 0.28);
  --card-from: #e8e4ff;
  --card-to: #f5f2ff;
  --card-hover: #dcd5ff;
}

#scenario-grid .scenario-card:nth-child(4) {
  --card-accent: #0d9b77;
  --card-border: rgba(13, 155, 119, 0.28);
  --card-from: #d5f8ed;
  --card-to: #edfcf7;
  --card-hover: #c8f2e5;
}

#scenario-grid .scenario-card:nth-child(5) {
  --card-accent: #167bd0;
  --card-border: rgba(22, 123, 208, 0.28);
  --card-from: #dceeff;
  --card-to: #f0f7ff;
  --card-hover: #cee7ff;
}

#scenario-grid .scenario-card:nth-child(6) {
  --card-accent: #cf527f;
  --card-border: rgba(207, 82, 127, 0.27);
  --card-from: #ffe2ee;
  --card-to: #fff3f8;
  --card-hover: #ffd4e5;
}

:where(
  .word-item,
  .study-card,
  .resource-card,
  .shared-resource-card,
  .group-card,
  .profile-stats article,
  .settings-panel,
  .community-toolbar,
  .community-tabs,
  .search-box,
  .contribution-form,
  .moderation-panel,
  .word-dialog,
  .community-detail-dialog
) {
  border-color: var(--prism-line);
  background:
    radial-gradient(circle at 96% 0%, rgba(107, 92, 231, 0.12), transparent 38%),
    radial-gradient(circle at 5% 100%, rgba(19, 191, 208, 0.12), transparent 34%),
    linear-gradient(138deg, rgba(232, 249, 255, 0.97), rgba(245, 241, 255, 0.93) 64%, rgba(255, 248, 229, 0.9));
  box-shadow: var(--prism-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.daily-phrase {
  border-color: rgba(123, 226, 239, 0.38);
  background:
    radial-gradient(circle at 108% -12%, rgba(125, 97, 240, 0.48), transparent 46%),
    radial-gradient(circle at 10% 115%, rgba(32, 191, 162, 0.28), transparent 42%),
    linear-gradient(145deg, #07375b 0%, #086d91 64%, #0b8395 100%);
  box-shadow: 0 22px 50px rgba(5, 54, 88, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (max-width: 860px) {
  body {
    background-image:
      radial-gradient(circle at 0% 4%, rgba(19, 191, 208, 0.21), transparent 19rem),
      radial-gradient(circle at 100% 10%, rgba(107, 92, 231, 0.17), transparent 21rem),
      linear-gradient(150deg, #f5fcff 0%, #e8f7ff 50%, #f4efff 82%, #fff8e8 100%);
  }

  .topbar {
    padding: 8px 10px;
    border: 1px solid var(--prism-line);
    background: linear-gradient(115deg, rgba(232, 250, 255, 0.94), rgba(242, 239, 255, 0.92));
    box-shadow: 0 10px 25px rgba(18, 80, 125, 0.09);
    backdrop-filter: blur(12px) saturate(120%);
  }

  .metric-card,
  #scenario-grid .scenario-card {
    box-shadow: inset 3px 0 0 var(--card-accent), 0 9px 22px color-mix(in srgb, var(--card-accent) 12%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  }
}

@media (max-width: 620px) {
  .topbar #page-title {
    font-size: 21px;
    letter-spacing: -0.035em;
  }

  .sidebar .brand strong {
    font-size: 17px;
  }

  .hero-copy h2 {
    font-size: 31px;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-card,
  #scenario-grid .scenario-card,
  .hero-card .primary-button,
  .community-hero .primary-button {
    transition: none;
  }
}

@media (forced-colors: active) {
  .sidebar,
  .topbar,
  .hero-card,
  .resource-hero,
  .community-hero,
  .metric-card,
  .scenario-section,
  #scenario-grid .scenario-card,
  .daily-phrase,
  .word-item,
  .study-card,
  .resource-card,
  .shared-resource-card,
  .group-card,
  .settings-panel,
  .word-dialog,
  .community-detail-dialog {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }

  .sidebar .brand strong,
  .auth-gate-brand strong,
  .topbar #page-title,
  .hero-copy h2,
  .auth-gate-content h1 {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    text-shadow: none;
  }
}

/* Single natural female voice — generated locally in the browser */
.voice-style-fieldset {
  margin: 0;
  padding: 18px 19px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.voice-style-fieldset legend {
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.voice-style-fieldset > p {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.voice-style-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  gap: 10px;
}

.voice-style-card {
  --voice-a: #1a9fbb;
  --voice-b: #36c4af;
  --voice-surface-a: #e9fbff;
  --voice-surface-b: #f1fcf8;
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 112px;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 7px 10px;
  padding: 14px;
  overflow: hidden;
  border: 1.5px solid transparent;
  border-radius: 17px;
  background:
    linear-gradient(145deg, var(--voice-surface-a), var(--voice-surface-b)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--voice-a) 72%, white), color-mix(in srgb, var(--voice-b) 72%, white)) border-box;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--voice-a) 13%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.voice-style-card::before {
  position: absolute;
  width: 75px;
  height: 75px;
  top: -38px;
  right: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--voice-b) 20%, transparent), transparent 70%);
  content: "";
  pointer-events: none;
}

.voice-style-card[data-tone="coral"] { --voice-a: #e87655; --voice-b: #efa63d; --voice-surface-a: #fff0ea; --voice-surface-b: #fff8e8; }
.voice-style-card[data-tone="mint"] { --voice-a: #32977f; --voice-b: #54b99a; --voice-surface-a: #e9f8f3; --voice-surface-b: #f3fbf7; }
.voice-style-card[data-tone="gold"] { --voice-a: #b87920; --voice-b: #dca33e; --voice-surface-a: #fff4de; --voice-surface-b: #fffaed; }
.voice-style-card[data-tone="violet"] { --voice-a: #7665d7; --voice-b: #b15fc6; --voice-surface-a: #f0edff; --voice-surface-b: #fbf0ff; }
.voice-style-card[data-tone="blue"] { --voice-a: #317ac1; --voice-b: #4b9fda; --voice-surface-a: #eaf4ff; --voice-surface-b: #f2f9ff; }

.voice-style-card:hover { transform: translateY(-2px); box-shadow: 0 13px 28px color-mix(in srgb, var(--voice-a) 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.96); }
.voice-style-card[data-selected="true"] { border-color: var(--voice-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--voice-a) 16%, transparent), 0 13px 30px color-mix(in srgb, var(--voice-a) 19%, transparent); }
.voice-style-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--voice-a) 48%, white); outline-offset: 3px; }

.voice-style-mark {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--voice-a) 31%, white);
  border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--voice-a) 88%, white), var(--voice-b));
  color: #fff;
  font: 750 17px/1 "Segoe UI Variable Display", "Microsoft YaHei UI", sans-serif;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--voice-a) 23%, transparent);
}

.voice-style-copy { min-width: 0; align-self: center; }
.voice-style-copy strong { display: block; overflow-wrap: anywhere; font-size: 11px; line-height: 1.35; }
.voice-style-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.voice-style-state { grid-column: 2; color: var(--voice-a); font-size: 9px; font-weight: 700; }
.voice-ai-disclosure {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(45, 122, 164, 0.18);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(229, 248, 255, 0.88), rgba(244, 239, 255, 0.82));
  color: #355c74;
  font-size: 11px;
  line-height: 1.5;
}
.voice-ai-disclosure span { color: #6d63cf; font-size: 14px; }

@media (max-width: 620px) {
  .voice-style-fieldset { padding: 17px 15px 19px; }
  .voice-style-fieldset legend { font-size: 14px; }
  .voice-style-fieldset > p { font-size: 12px; }
  .voice-style-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 3px 3px 7px;
  }
  .voice-style-card { min-height: 112px; }
  .voice-style-copy strong { font-size: 14px; }
  .voice-style-copy small,
  .voice-style-state { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-style-card { transition: none; }
  .voice-style-card:hover { transform: none; }
}

@media (forced-colors: active) {
  .voice-style-fieldset,
  .voice-style-card,
  .voice-style-mark {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }
}

.guided-course-actions {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #dce9f0;
}

.guided-course-actions > .primary-button {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  font-size: 10px;
}

.guided-course-actions > div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.guided-course-actions > div > button {
  min-height: 33px;
  border: 1px solid #c8dce7;
  border-radius: 9px;
  background: #f8fbfd;
  color: #476b80;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.guided-course-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.guided-custom-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 99px;
  background: #e8f5fa;
  color: #16809f;
  font-size: 7px;
  font-style: normal;
  vertical-align: 2px;
}

.guided-listen-all { margin-left: auto; }

.guided-custom-actions {
  display: flex;
  gap: 6px;
}

.guided-custom-actions[hidden] { display: none; }

.guided-custom-actions button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #c8dce7;
  border-radius: 10px;
  background: #f8fbfd;
  color: #38647d;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

#guided-delete-lesson {
  border-color: #efc3c6;
  background: #fff6f6;
  color: #a33b40;
}

.guided-builder-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: min(88vh, 920px);
  padding: 27px;
  overflow-y: auto;
  border: 1px solid rgba(67, 133, 168, 0.25);
  border-radius: 22px;
  background: #f8fbfd;
}

.guided-builder-dialog::backdrop {
  background: rgba(5, 27, 43, 0.62);
  backdrop-filter: blur(5px);
}

.guided-builder-dialog > h2 {
  margin: 5px 0 7px;
  color: #12364d;
  font-size: 25px;
}

.guided-builder-intro {
  max-width: 720px;
  margin: 0 0 20px;
  color: #617d8e;
  font-size: 11px;
  line-height: 1.65;
}

.guided-builder-form {
  display: grid;
  gap: 15px;
}

.guided-builder-section {
  padding: 17px;
  border: 1px solid #d7e6ee;
  border-radius: 16px;
  background: #ffffff;
}

.guided-builder-section-heading {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.guided-builder-section-heading > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  background: #dff2f8;
  color: #137b9b;
  font-size: 9px;
  font-weight: 900;
}

.guided-builder-section-heading h3,
.guided-builder-section-heading p {
  margin: 0;
}

.guided-builder-section-heading h3 {
  color: #173b51;
  font-size: 13px;
}

.guided-builder-section-heading p {
  margin-top: 3px;
  color: #78909e;
  font-size: 9px;
}

.guided-builder-grid,
.guided-builder-keywords {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.guided-builder-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guided-builder-block {
  display: grid;
  min-width: 0;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid #dce8ef;
  border-radius: 13px;
  background: #f8fbfd;
}

.guided-builder-block legend {
  padding: 0 6px;
  color: #157b9a;
  font-size: 9px;
  font-weight: 850;
}

.guided-builder-block label,
.guided-builder-keywords label {
  display: grid;
  gap: 5px;
  color: #557487;
  font-size: 9px;
  font-weight: 700;
}

.guided-builder-block input,
.guided-builder-keywords input {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid #bfd4e0;
  border-radius: 9px;
  background: #ffffff;
  color: #17384d;
  font-size: 11px;
  font-weight: 500;
}

.guided-builder-block input:focus,
.guided-builder-keywords input:focus {
  border-color: #258ba9;
  box-shadow: 0 0 0 3px rgba(53, 184, 212, 0.13);
  outline: 0;
}

.guided-builder-message {
  margin: 0;
  border: 1px solid var(--danger-line);
  border-radius: 11px;
  background: var(--danger-bg);
  color: var(--danger);
}

.guided-builder-message[data-tone="success"] {
  border-color: var(--success-line);
  background: var(--success-bg);
  color: var(--success);
}

.guided-builder-actions {
  position: sticky;
  bottom: -27px;
  z-index: 2;
  margin: 0 -27px -27px;
  padding: 14px 27px 22px;
  border-top: 1px solid rgba(76, 141, 172, 0.17);
  background: rgba(248, 251, 253, 0.96);
  backdrop-filter: blur(12px);
}

@media (max-width: 860px) {
  .guided-course-actions {
    grid-template-columns: minmax(150px, 1fr) auto;
    align-items: center;
  }
  .guided-course-actions > div { min-width: 120px; }
}

@media (max-width: 620px) {
  .guided-workspace-head { flex-wrap: wrap; }
  .guided-custom-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .guided-course-actions { grid-template-columns: 1fr; }
  .guided-builder-dialog {
    width: calc(100vw - 18px);
    max-height: 94vh;
    padding: 20px 15px;
    border-radius: 18px;
  }
  .guided-builder-grid,
  .guided-builder-keywords,
  .guided-builder-blocks { grid-template-columns: 1fr; }
  .guided-builder-section { padding: 13px; }
  .guided-builder-actions {
    bottom: -20px;
    margin: 0 -15px -20px;
    padding: 12px 15px max(18px, env(safe-area-inset-bottom));
  }
}

/* Guided speaking: progressive recall for real customer-reception conversations. */
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-guided-button {
  min-height: 45px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.hero-guided-button:hover {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.17);
}

.guided-page {
  --guided-accent: #1486a7;
  max-width: 1240px;
  margin: 0 auto;
}

.guided-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 172px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 18px;
  padding: 28px 32px;
  border: 1px solid rgba(79, 151, 187, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 18%, rgba(53, 184, 212, 0.2), transparent 31%),
    radial-gradient(circle at 64% 118%, rgba(102, 113, 229, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 248, 253, 0.96));
  box-shadow: 0 16px 42px rgba(10, 65, 96, 0.1);
}

.guided-intro::after {
  position: absolute;
  width: 190px;
  height: 190px;
  right: 100px;
  border: 1px solid rgba(28, 149, 185, 0.14);
  border-radius: 50%;
  content: "";
}

.guided-intro > div {
  position: relative;
  z-index: 1;
}

.guided-intro h2 {
  margin: 5px 0 8px;
  color: #0b3854;
  font-size: clamp(25px, 3vw, 37px);
  letter-spacing: -0.045em;
}

.guided-intro p:not(.eyebrow) {
  max-width: 670px;
  margin: 0;
  color: #527085;
  line-height: 1.7;
}

.guided-overview {
  display: grid;
  min-width: 124px;
  min-height: 104px;
  place-content: center;
  border: 1px solid rgba(38, 144, 174, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  box-shadow: 0 12px 30px rgba(17, 103, 139, 0.1);
}

.guided-overview strong {
  color: #0e7798;
  font-size: 35px;
  line-height: 1;
}

.guided-overview span {
  margin-top: 8px;
  color: #607b8d;
  font-size: 11px;
}

.guided-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.guided-course-panel,
.guided-workspace {
  border: 1px solid rgba(67, 133, 168, 0.17);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 13px 34px rgba(11, 60, 91, 0.075);
}

.guided-course-panel {
  position: sticky;
  top: 105px;
  overflow: hidden;
  padding: 14px;
}

.guided-course-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 5px 7px 13px;
}

.guided-course-heading span {
  color: #153f58;
  font-size: 13px;
  font-weight: 800;
}

.guided-course-heading small {
  color: #7a92a2;
  font-size: 9px;
}

.guided-lesson-list {
  display: grid;
  gap: 7px;
}

.guided-lesson-item {
  --lesson-accent: #1885a6;
  display: grid;
  width: 100%;
  grid-template-columns: 37px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.guided-lesson-item.tone-violet { --lesson-accent: #6671e5; }
.guided-lesson-item.tone-amber { --lesson-accent: #bd7923; }
.guided-lesson-item.tone-mint { --lesson-accent: #238e77; }
.guided-lesson-item.tone-blue { --lesson-accent: #376eb6; }
.guided-lesson-item.tone-rose { --lesson-accent: #b45472; }

.guided-lesson-item:hover {
  background: #f2f8fc;
}

.guided-lesson-item.is-active {
  border-color: color-mix(in srgb, var(--lesson-accent) 32%, #d5e5ef);
  background: color-mix(in srgb, var(--lesson-accent) 7%, white);
  box-shadow: inset 3px 0 var(--lesson-accent);
}

.guided-lesson-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #edf5fa;
  color: #5d7788;
  font-size: 10px;
  font-weight: 900;
}

.guided-lesson-item.is-active .guided-lesson-index {
  background: var(--lesson-accent);
  color: #ffffff;
  box-shadow: 0 7px 15px color-mix(in srgb, var(--lesson-accent) 25%, transparent);
}

.guided-lesson-item.is-complete:not(.is-active) .guided-lesson-index {
  background: #e5f5ee;
  color: #177153;
}

.guided-lesson-item strong,
.guided-lesson-item small {
  display: block;
}

.guided-lesson-item strong {
  color: #173c54;
  font-size: 12px;
}

.guided-lesson-item small {
  overflow: hidden;
  margin-top: 3px;
  color: #78909f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guided-workspace {
  min-width: 0;
  padding: 24px;
}

.guided-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 19px;
  border-bottom: 1px solid #deebf2;
}

.guided-workspace-head p,
.guided-workspace-head h3,
.guided-workspace-head span {
  margin: 0;
}

.guided-workspace-head p {
  color: #1983a3;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.guided-workspace-head h3 {
  margin-top: 4px;
  color: #102f44;
  font-size: 24px;
}

.guided-workspace-head span {
  display: block;
  margin-top: 4px;
  color: #657f90;
  font-size: 11px;
}

.guided-listen-all {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid #b8d9e8;
  border-radius: 12px;
  background: #eef8fc;
  color: #146d8c;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.guided-listen-all svg,
.guided-sound-button svg {
  width: 17px;
  height: 17px;
}

.guided-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 21px 0 26px;
}

.guided-stepper::before {
  position: absolute;
  top: 14px;
  right: 9%;
  left: 9%;
  height: 1px;
  background: #d8e7ef;
  content: "";
}

.guided-stepper button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8196a5;
  cursor: pointer;
}

.guided-stepper button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.guided-stepper button > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid #d7e5ed;
  border-radius: 50%;
  background: #ffffff;
  font-size: 9px;
  font-weight: 850;
}

.guided-stepper button small {
  font-size: 9px;
  font-weight: 700;
}

.guided-stepper button.is-active {
  color: #0e7698;
}

.guided-stepper button.is-active > span {
  border-color: #25a8c5;
  background: #e9f8fb;
  box-shadow: 0 0 0 5px rgba(53, 184, 212, 0.1);
}

.guided-stepper button.is-done > span {
  border-color: #43a98c;
  background: #e6f6ef;
  color: #177052;
}

.guided-stage-content {
  min-height: 450px;
}

.guided-stage-heading {
  margin-bottom: 18px;
}

.guided-stage-heading > span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9f6fb;
  color: #13799a;
  font-size: 9px;
  font-weight: 850;
}

.guided-stage-heading h4 {
  margin: 10px 0 5px;
  color: #12364d;
  font-size: 19px;
}

.guided-stage-heading p {
  margin: 0;
  color: #6b8291;
  font-size: 11px;
  line-height: 1.65;
}

.guided-sentence-list {
  display: grid;
  gap: 9px;
}

.guided-sentence-card {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #d8e8f0;
  border-radius: 15px;
  background: linear-gradient(135deg, #fbfdff, #f5fafc);
}

.guided-block-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #dff3f8;
  color: #117b9b;
  font-size: 10px;
  font-weight: 900;
}

.guided-sentence-card strong {
  display: block;
  color: #102e43;
  font-size: 14px;
  line-height: 1.45;
}

.guided-sentence-card p {
  margin: 5px 0 0;
  color: #688091;
  font-size: 10px;
}

.guided-sound-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #b9dce9;
  border-radius: 50%;
  background: #ffffff;
  color: #137c9d;
  cursor: pointer;
}

.guided-sound-button:hover {
  background: #eaf8fb;
}

.guided-coach-tip,
.guided-thinking-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e7d7b6;
  border-radius: 13px;
  background: #fffaf0;
}

.guided-coach-tip span,
.guided-thinking-note span {
  color: #946421;
  font-size: 9px;
  font-weight: 850;
}

.guided-coach-tip p,
.guided-thinking-note p {
  margin: 0;
  color: #735f42;
  font-size: 10px;
  line-height: 1.55;
}

.guided-thinking-note.is-hidden { display: none; }

.guided-fill-form {
  display: grid;
  gap: 10px;
}

.guided-fill-row {
  display: grid;
  grid-template-columns: 27px minmax(210px, 1fr) minmax(150px, 0.55fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e7ef;
  border-radius: 14px;
  background: #fbfdfe;
}

.guided-fill-row > span:first-child {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #eaf4f8;
  color: #3f718a;
  font-size: 9px;
  font-weight: 850;
}

.guided-fill-copy {
  color: #17394f;
  font-size: 12px;
  font-weight: 700;
}

.guided-fill-row input {
  width: 100%;
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid #bfd4e1;
  border-radius: 10px;
  background: #ffffff;
  color: #102f43;
}

.guided-fill-row small {
  display: none;
  grid-column: 3;
  color: #7b8e99;
  font-size: 9px;
}

.guided-fill-row.is-correct {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.guided-fill-row.is-correct small,
.guided-fill-row.is-wrong small {
  display: block;
}

.guided-fill-row.is-correct small { color: var(--success); }

.guided-fill-row.is-wrong {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.guided-fill-row.is-wrong small { color: var(--danger); }

.guided-order-attempt {
  width: fit-content;
  margin: -4px 0 12px;
  padding: 6px 10px;
  border: 1px solid #cfe2ed;
  border-radius: 999px;
  background: #eef8fc;
  color: #3f718a;
  font-size: 9px;
  font-weight: 800;
}

.guided-order-form {
  display: grid;
  gap: 12px;
}

.guided-order-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d5e5ee;
  border-radius: 16px;
  background: linear-gradient(145deg, #fbfdff, #f2f8fc);
  transition: border-color 160ms ease, background 160ms ease;
}

.guided-order-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #17394f;
}

.guided-order-head > span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #e4f3f9;
  color: #2d7596;
  font-size: 9px;
  font-weight: 900;
}

.guided-order-head strong {
  font-size: 11px;
  line-height: 1.5;
}

.guided-order-answer,
.guided-word-bank {
  display: flex;
  min-height: 48px;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 7px;
  padding: 9px;
  border-radius: 12px;
}

.guided-order-answer {
  border: 1px dashed #9fc8da;
  background: #ffffff;
}

.guided-word-bank {
  border: 1px solid #d8e7ef;
  background: #edf6fa;
}

.guided-order-placeholder {
  color: #8299a6;
  font-size: 10px;
}

.guided-order-chip {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #9cc9dc;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff, #e8f6fb);
  color: #123b54;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(35, 98, 126, 0.08);
  transition: transform 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.guided-order-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #38a9ca;
}

.guided-order-chip.is-selected {
  border-color: #2ca5c7;
  background: linear-gradient(145deg, #e3fbff, #d9f2fb);
}

.guided-order-chip:disabled {
  cursor: default;
  opacity: 0.3;
  box-shadow: none;
}

.guided-order-answer .guided-order-chip:disabled { opacity: 1; }

.guided-order-feedback {
  min-height: 15px;
  color: #718894;
  font-size: 9px;
}

.guided-order-row.is-correct {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.guided-order-row.is-correct .guided-order-feedback { color: var(--success); }

.guided-order-row.is-wrong {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.guided-order-row.is-wrong .guided-order-feedback { color: var(--danger); }

.guided-cue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.guided-cue-card {
  position: relative;
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #d4e4ed;
  border-radius: 16px;
  background: linear-gradient(145deg, #f9fcfe, #eef7fb);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.guided-cue-card:hover { transform: translateY(-2px); }

.guided-cue-card.is-revealed {
  border-color: #8ccfbe;
  background: linear-gradient(145deg, #f1faf6, #e5f6ef);
}

.guided-cue-card > span {
  color: #3190aa;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.guided-cue-card strong {
  color: #16384c;
  font-size: 13px;
  line-height: 1.45;
}

.guided-cue-card small {
  color: #738a99;
  font-size: 9px;
  line-height: 1.45;
}

.guided-cue-card.is-revealed small {
  color: #1f745a;
  font-size: 11px;
  font-weight: 750;
}

.guided-dialogue-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  max-width: 700px;
  margin: 8px auto;
}

.guided-dialogue-card.answer { margin-top: 15px; }

.guided-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.guided-avatar.customer { background: linear-gradient(145deg, #5a6cd7, #384baf); }
.guided-avatar.jean { background: linear-gradient(145deg, #29a787, #16745e); }

.guided-dialogue-bubble {
  padding: 15px 17px;
  border-radius: 16px 16px 16px 4px;
}

.guided-dialogue-bubble.customer {
  border: 1px solid #ced5f4;
  background: #f1f3fd;
}

.guided-dialogue-bubble.jean {
  border: 1px solid #bfe1d6;
  background: #edf8f3;
}

.guided-dialogue-bubble span,
.guided-dialogue-bubble strong,
.guided-dialogue-bubble small {
  display: block;
}

.guided-dialogue-bubble span {
  margin-bottom: 4px;
  color: #627888;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.guided-dialogue-bubble strong {
  color: #19394e;
  font-size: 13px;
  line-height: 1.5;
}

.guided-dialogue-bubble small {
  margin-top: 5px;
  color: #728797;
  font-size: 9px;
}

.guided-question-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.guided-question-dots span {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #d8e5ec;
}

.guided-question-dots span.is-active { width: 22px; background: #2c9fba; }
.guided-question-dots span.is-done { background: #53ad91; }

.guided-keyword-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 18px;
  border: 1px solid #cfe4ed;
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 184, 212, 0.1), transparent 42%),
    #f5fafc;
}

.guided-keyword-board > div {
  display: grid;
  min-height: 78px;
  place-content: center;
  gap: 8px;
  border: 1px solid #dceaf1;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.guided-keyword-board span {
  color: #3a9bb4;
  font-size: 9px;
  font-weight: 900;
}

.guided-keyword-board strong {
  color: #183b51;
  font-size: 11px;
}

.guided-optional-notes {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.guided-optional-notes span {
  color: #607b8c;
  font-size: 10px;
  font-weight: 700;
}

.guided-optional-notes textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid #c8dce7;
  border-radius: 12px;
  background: #ffffff;
  color: #17384d;
  line-height: 1.55;
}

.guided-model-toggle {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #167a9a;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.guided-model-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid #bfe0d4;
  border-radius: 13px;
  background: #edf8f3;
}

.guided-model-answer p {
  margin: 0;
  color: #235a49;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.65;
}

.guided-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #dfebf2;
}

.guided-controls .primary-button,
.guided-controls .secondary-button {
  min-width: 130px;
}

.guided-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.guided-completion {
  display: grid;
  min-height: 440px;
  place-content: center;
  justify-items: center;
  padding: 35px;
  text-align: center;
}

.guided-complete-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, #2db49d, #16755f);
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 15px 30px rgba(28, 139, 112, 0.22);
}

.guided-completion h4 {
  margin: 8px 0;
  color: #12364d;
  font-size: 23px;
}

.guided-completion > p:not(.eyebrow) {
  max-width: 520px;
  margin: 0;
  color: #657f90;
  font-size: 11px;
  line-height: 1.7;
}

.guided-completion > div:last-child {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

@media (max-width: 1060px) {
  .guided-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .guided-course-panel { padding: 11px; }
  .guided-workspace { padding: 20px; }
}

@media (max-width: 860px) {
  .mobile-nav { grid-template-columns: repeat(6, 1fr); }
  .guided-layout { grid-template-columns: 1fr; }
  .guided-course-panel { position: static; }
  .guided-lesson-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .guided-lesson-item {
    min-width: 205px;
    scroll-snap-align: start;
  }
  .guided-stage-content { min-height: 420px; }
}

/* Private Work Corpus: daily customer conversations to personal learning items. */
.work-corpus-page {
  --corpus-cyan: #14b8cf;
  --corpus-blue: #2f78e8;
  --corpus-violet: #7158d9;
  display: grid;
  gap: 20px;
}

.work-corpus-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  min-height: 220px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(55, 143, 183, 0.26);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 18%, rgba(123, 91, 224, 0.24), transparent 35%),
    radial-gradient(circle at 8% 95%, rgba(27, 198, 193, 0.25), transparent 34%),
    linear-gradient(128deg, #082c4a 0%, #0c6080 58%, #315aa2 100%);
  color: #fff;
  box-shadow: 0 24px 58px rgba(7, 46, 74, 0.2);
}

.work-corpus-hero::after {
  content: "";
  position: absolute;
  inset: -45% -8% auto auto;
  width: 360px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.035), 0 0 0 96px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.work-corpus-hero > * { position: relative; z-index: 1; }
.work-corpus-hero > div:first-child { max-width: 760px; }
.work-corpus-hero .eyebrow { color: #ffd67c; }
.work-corpus-hero h2 {
  max-width: 760px;
  margin: 8px 0 14px;
  color: #fff;
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.work-corpus-hero p:last-child { max-width: 720px; color: rgba(236, 250, 255, 0.84); line-height: 1.8; }

.work-corpus-privacy {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(16px);
}
.work-corpus-privacy > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(61, 224, 200, 0.18); color: #7ff5df; }
.work-corpus-privacy strong, .work-corpus-privacy small { display: block; }
.work-corpus-privacy small { margin-top: 3px; color: rgba(236, 250, 255, 0.72); }

.work-corpus-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(58, 126, 166, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(11, 63, 93, 0.08);
  backdrop-filter: blur(16px);
}
.work-corpus-flow span { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 58px; color: #577287; font-weight: 700; }
.work-corpus-flow span + span { border-left: 1px solid rgba(58, 126, 166, 0.14); }
.work-corpus-flow b { color: #1888aa; font-size: 12px; letter-spacing: 0.08em; }
.work-corpus-flow .is-current { background: linear-gradient(135deg, rgba(29, 190, 203, 0.13), rgba(99, 105, 221, 0.11)); color: #103b58; }

.work-corpus-panel {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(61, 133, 173, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(119, 91, 222, 0.11), transparent 35%),
    radial-gradient(circle at 0% 100%, rgba(19, 190, 208, 0.1), transparent 34%),
    linear-gradient(142deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 254, 0.93));
  box-shadow: 0 18px 44px rgba(10, 57, 88, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.work-corpus-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.work-corpus-heading h3 { margin: 4px 0 0; color: #103753; font-size: clamp(21px, 2.4vw, 29px); }
.work-corpus-heading .eyebrow { margin: 0; }
.work-corpus-import {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid rgba(43, 145, 184, 0.23);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 5%, rgba(113, 88, 217, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(229, 250, 253, 0.92), rgba(242, 244, 255, 0.91));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
.work-corpus-import-copy { display: flex; align-items: center; gap: 13px; color: #123d59; }
.work-corpus-import-copy strong, .work-corpus-import-copy small { display: block; }
.work-corpus-import-copy strong { font-size: 18px; }
.work-corpus-import-copy small { margin-top: 4px; color: #55758a; line-height: 1.55; }
.work-corpus-import-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(145deg, #16b9ca, #5471df);
  color: #fff;
  font-size: 25px;
  font-weight: 300;
  box-shadow: 0 10px 23px rgba(39, 132, 180, 0.2);
}
.work-corpus-format-list { display: flex; flex-wrap: wrap; gap: 8px; }
.work-corpus-format-list span {
  padding: 7px 10px;
  border: 1px solid rgba(40, 142, 177, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #315f77;
  font-size: 12px;
  font-weight: 800;
}
.work-corpus-dropzone {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  min-height: 116px;
  padding: 18px;
  border: 1.5px dashed rgba(33, 139, 182, 0.48);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.73);
  color: #163f5b;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.work-corpus-dropzone:hover, .work-corpus-dropzone:focus-visible, .work-corpus-dropzone.is-dragging {
  border-color: #16a7c3;
  background: rgba(242, 254, 255, 0.96);
  box-shadow: 0 14px 30px rgba(28, 127, 163, 0.13);
  transform: translateY(-1px);
  outline: none;
}
.work-corpus-dropzone-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(31, 190, 202, 0.16), rgba(95, 92, 219, 0.14));
  color: #168cab;
  font-size: 28px;
}
.work-corpus-dropzone > span:nth-of-type(2) strong, .work-corpus-dropzone > span:nth-of-type(2) small { display: block; }
.work-corpus-dropzone > span:nth-of-type(2) strong { font-size: 16px; }
.work-corpus-dropzone > span:nth-of-type(2) small { margin-top: 5px; color: #617d8f; line-height: 1.55; }
.work-corpus-dropzone .secondary-button { min-width: 120px; background: rgba(255, 255, 255, 0.9); }
.work-corpus-import-summary { padding-top: 2px; }
.work-corpus-import-summary > div { display: flex; justify-content: space-between; gap: 12px; color: #284f66; font-size: 13px; }
.work-corpus-import-summary ul { display: grid; gap: 8px; margin: 11px 0 0; padding: 0; list-style: none; }
.work-corpus-import-item { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(41, 137, 171, 0.14); border-radius: 13px; background: rgba(255, 255, 255, 0.72); color: #31586e; }
.work-corpus-import-item-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #dff7ef; color: #17775d; font-weight: 900; }
.work-corpus-import-item strong, .work-corpus-import-item small { display: block; overflow-wrap: anywhere; }
.work-corpus-import-item strong { font-size: 13px; }
.work-corpus-import-item small { margin-top: 2px; color: #638091; }
.work-corpus-import-item.is-error { border-color: rgba(188, 75, 78, 0.18); background: rgba(255, 244, 244, 0.8); }
.work-corpus-import-item.is-error .work-corpus-import-item-mark { background: #ffe6e5; color: #a43f42; }
.work-corpus-divider { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; color: #718898; font-size: 12px; font-weight: 750; }
.work-corpus-divider::before, .work-corpus-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: rgba(56, 125, 165, 0.17); }
.work-corpus-panel textarea { resize: vertical; min-height: 190px; }
.work-corpus-panel textarea, .work-corpus-panel input[type="text"] { background: rgba(255, 255, 255, 0.82); }
.work-corpus-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.work-corpus-actions button { min-width: 190px; }

.work-corpus-review-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, 0.75fr); gap: 18px; }
.work-corpus-review-grid > div { padding: 18px; border: 1px solid rgba(56, 137, 176, 0.17); border-radius: 18px; background: rgba(255, 255, 255, 0.68); }
.work-corpus-review-grid h4 { margin: 0 0 12px; color: #163f5c; }
#work-corpus-redaction-preview { min-height: 210px; max-height: 420px; overflow: auto; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #23485f; font: 14px/1.75 "Cascadia Mono", "SFMono-Regular", Consolas, monospace; }
.work-corpus-findings { display: grid; gap: 9px; }
.work-corpus-finding, .work-corpus-findings > span { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid rgba(26, 145, 161, 0.16); border-radius: 12px; background: rgba(226, 248, 247, 0.76); color: #28576b; font-size: 13px; }
.work-corpus-safe-badge { flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(41, 157, 135, 0.24); border-radius: 999px; background: #e9f8f2; color: #176b55; font-size: 12px; font-weight: 800; }
.work-corpus-confirm { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; padding: 15px 17px; border: 1px solid rgba(204, 139, 38, 0.24); border-radius: 16px; background: rgba(255, 247, 228, 0.8); color: #60481d; line-height: 1.65; cursor: pointer; }
.work-corpus-confirm input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: #157e9f; }

.work-corpus-candidates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.work-corpus-candidate { position: relative; padding: 18px; border: 1px solid rgba(44, 124, 170, 0.2); border-radius: 18px; background: linear-gradient(138deg, rgba(237, 250, 255, 0.95), rgba(248, 244, 255, 0.92)); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.work-corpus-candidate:has(input:checked) { border-color: rgba(36, 149, 174, 0.56); box-shadow: 0 12px 28px rgba(20, 119, 151, 0.12), inset 3px 0 0 #1cb8c6; transform: translateY(-1px); }
.work-corpus-candidate label { display: grid; grid-template-columns: auto 1fr; gap: 11px; cursor: pointer; }
.work-corpus-candidate input[type="checkbox"] { width: 19px; height: 19px; margin-top: 3px; accent-color: #187fa7; }
.work-corpus-candidate h4 { margin: 0; color: #103d5c; font-size: 19px; }
.work-corpus-candidate p { margin: 7px 0; color: #496879; line-height: 1.65; }
.work-corpus-candidate small { color: #647f8f; }
.work-corpus-status { min-height: 26px; margin: 0; color: #315b72; font-weight: 650; }
.work-corpus-status[data-tone="error"] { color: #a3373a; }
.work-corpus-status[data-tone="success"] { color: #176b4d; }

@media (max-width: 860px) {
  .work-corpus-hero { flex-direction: column; min-height: 0; }
  .work-corpus-privacy { align-self: stretch; min-width: 0; }
  .work-corpus-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-corpus-flow span:nth-child(3) { border-left: 0; border-top: 1px solid rgba(58, 126, 166, 0.14); }
  .work-corpus-flow span:nth-child(4) { border-top: 1px solid rgba(58, 126, 166, 0.14); }
  .work-corpus-review-grid, .work-corpus-candidates { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .work-corpus-page { gap: 14px; }
  .work-corpus-hero, .work-corpus-panel { border-radius: 20px; padding: 20px; }
  .work-corpus-hero h2 { font-size: 31px; }
  .work-corpus-heading { align-items: stretch; flex-direction: column; }
  .work-corpus-heading .secondary-button { align-self: flex-start; }
  .work-corpus-dropzone { grid-template-columns: auto 1fr; min-height: 0; }
  .work-corpus-dropzone .secondary-button { grid-column: 1 / -1; width: 100%; }
  .work-corpus-format-list span { font-size: 10px; }
  .work-corpus-actions { position: sticky; bottom: 82px; z-index: 3; margin: 18px -8px -8px; padding: 10px 8px 8px; background: linear-gradient(180deg, rgba(245, 251, 255, 0), rgba(245, 251, 255, 0.96) 30%); }
  .work-corpus-actions button { width: 100%; min-width: 0; min-height: 46px; }
  #work-corpus-redaction-preview { max-height: 310px; }
  .mobile-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mobile-nav-item { min-width: 0; }
  .mobile-nav-item span:last-child { font-size: 9px; }
}

@media (forced-colors: active) {
  .work-corpus-hero, .work-corpus-panel, .work-corpus-flow, .work-corpus-candidate, .work-corpus-review-grid > div {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }
  .work-corpus-hero h2, .work-corpus-hero p:last-child { color: CanvasText; }
}

@media (max-width: 620px) {
  .guided-intro {
    min-height: 0;
    align-items: flex-start;
    padding: 21px;
  }
  .guided-intro::after { display: none; }
  .guided-intro p:not(.eyebrow) { font-size: 11px; }
  .guided-overview {
    min-width: 82px;
    min-height: 76px;
    border-radius: 15px;
  }
  .guided-overview strong { font-size: 26px; }
  .guided-overview span { font-size: 8px; }
  .guided-workspace { padding: 16px; }
  .guided-workspace-head { align-items: flex-start; }
  .guided-workspace-head h3 { font-size: 21px; }
  .guided-listen-all {
    width: 42px;
    min-height: 42px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }
  .guided-stepper { margin-block: 19px 23px; }
  .guided-stepper button small { font-size: 8px; }
  .guided-stepper button > span { width: 27px; height: 27px; }
  .guided-sentence-card { grid-template-columns: 30px minmax(0, 1fr) 35px; padding: 12px; }
  .guided-sentence-card strong { font-size: 12px; }
  .guided-fill-row {
    grid-template-columns: 26px minmax(0, 1fr);
  }
  .guided-fill-row input,
  .guided-fill-row small {
    grid-column: 2;
  }
  .guided-order-row { padding: 12px; }
  .guided-order-answer,
  .guided-word-bank { min-height: 45px; padding: 8px; gap: 6px; }
  .guided-order-chip { min-height: 32px; padding: 5px 9px; font-size: 10px; }
  .guided-cue-grid { grid-template-columns: 1fr; }
  .guided-cue-card { min-height: 116px; }
  .guided-keyword-board { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .guided-dialogue-card { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 8px; }
  .guided-avatar { width: 34px; height: 34px; }
  .guided-dialogue-bubble { padding: 13px; }
  .guided-controls .primary-button,
  .guided-controls .secondary-button { min-width: 0; }
  .guided-completion { padding: 25px 10px; }
  .guided-completion > div:last-child { flex-direction: column; }
}

@media (forced-colors: active) {
  .guided-intro,
  .guided-course-panel,
  .guided-workspace,
  .guided-sentence-card,
  .guided-cue-card,
  .guided-dialogue-bubble,
  .guided-keyword-board,
  .guided-model-answer {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

@media (forced-colors: active) {
  body {
    background: Canvas;
  }

  .metric-icon,
  #scenario-grid .scenario-symbol {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }

  .metric-icon::after {
    display: none;
  }

  .home-line-icon .icon-highlight {
    stroke: CanvasText;
  }

  .home-line-icon .icon-node {
    fill: CanvasText;
    stroke: Canvas;
  }

  .sidebar::before,
  .sidebar::after,
  .hero-card::before,
  .resource-hero::after,
  .community-hero::after,
  .metric-card::before {
    display: none;
  }

  .brand-mark,
  .resource-brand {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }

  .brand-mark::before,
  .resource-brand::before {
    display: none;
  }
}

/* Editable word enrichment */
.add-word-term-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.add-word-term-row > input {
  min-width: 0;
}

.add-word-enrich-button {
  min-width: 88px;
  min-height: 42px;
  padding: 0 12px;
  border-color: rgba(15, 164, 194, 0.3);
  background: linear-gradient(135deg, rgba(224, 250, 255, 0.98), rgba(237, 233, 255, 0.96));
  color: #075b82;
  white-space: nowrap;
}

.add-word-enrich-button:hover {
  border-color: rgba(91, 83, 220, 0.44);
  background: linear-gradient(135deg, #d7f8ff, #e6e1ff);
}

.add-word-enrich-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.add-word-enrichment-status {
  min-height: 30px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid rgba(33, 159, 187, 0.16);
  border-radius: 9px;
  background: rgba(230, 248, 255, 0.68);
  color: #426779;
  font-size: 9px;
  line-height: 1.55;
}

.add-word-enrichment-status[data-tone="loading"] {
  border-color: rgba(91, 83, 220, 0.24);
  background: rgba(237, 233, 255, 0.76);
  color: #514aa4;
}

.add-word-enrichment-status[data-tone="success"] {
  border-color: rgba(24, 160, 121, 0.23);
  background: rgba(225, 250, 240, 0.82);
  color: #157255;
}

.add-word-enrichment-status[data-tone="error"] {
  border-color: rgba(194, 72, 72, 0.22);
  background: rgba(255, 237, 237, 0.88);
  color: #a33a3a;
}

.add-word-spelling-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 147, 36, 0.36);
  border-radius: 11px;
  background: #fff7e7;
  color: #70460a;
  font-size: 10px;
}

.add-word-spelling-review[hidden] { display: none; }
.add-word-spelling-review p { margin: 0; }
.add-word-spelling-review > div { display: flex; gap: 7px; }
.add-word-spelling-review button { min-height: 34px; padding: 0 10px; font-size: 9px; }

.add-word-enrichment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px !important;
}

.add-word-enrichment-meta[hidden] { display: none; }
.add-word-enrichment-meta span {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid rgba(42, 129, 180, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.add-word-enrichment {
  display: grid;
  min-width: 0;
  max-height: min(650px, 68dvh);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(61, 154, 209, 0.29);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(111, 88, 232, 0.13), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(26, 191, 193, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(238, 251, 255, 0.98), rgba(247, 244, 255, 0.98));
  box-shadow: 0 15px 34px rgba(22, 93, 137, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.add-word-enrichment[hidden] {
  display: none;
}

.add-word-enrichment-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid rgba(61, 154, 209, 0.2);
  background: linear-gradient(115deg, rgba(229, 249, 255, 0.98), rgba(239, 235, 255, 0.97));
}

.add-word-enrichment-header h3 {
  margin: 7px 0 4px;
  color: #0a3657;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.add-word-enrichment-header p {
  max-width: 470px;
  margin: 0;
  color: #557080;
  font-size: 9px;
  line-height: 1.6;
}

.add-word-enrichment-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(91, 83, 220, 0.2);
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(216, 250, 255, 0.95), rgba(232, 225, 255, 0.95));
  color: #3655a8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.add-word-enrichment-badge[data-state="accepted"] {
  border-color: rgba(22, 157, 114, 0.24);
  background: #e0f9ee;
  color: #116f53;
}

.add-word-enrichment-badge[data-state="edited"] {
  border-color: rgba(220, 147, 36, 0.28);
  background: #fff1d8;
  color: #8a5710;
}

.add-word-enrichment-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.add-word-enrichment-actions button {
  min-width: 88px;
  min-height: 38px;
  padding: 0 11px;
  font-size: 9px;
}

.add-word-enrichment-scroll {
  min-height: 0;
  padding: 15px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.add-word-enrichment-group {
  min-width: 0;
  margin: 0 0 13px;
  padding: 13px;
  border: 1px solid rgba(83, 149, 187, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.add-word-enrichment-group:last-child {
  margin-bottom: 0;
}

.add-word-enrichment-group legend {
  padding: 0 7px;
  color: #17698f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.add-word-enrichment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.add-word-enrichment-grid .form-field-wide {
  grid-column: 1 / -1;
}

.add-word-enrichment-grid input,
.add-word-enrichment-grid textarea {
  border-color: rgba(54, 139, 187, 0.24);
  background: rgba(252, 254, 255, 0.91);
}

.add-word-enrichment-grid textarea {
  min-height: 74px;
}

.add-word-enrichment-grid input:focus,
.add-word-enrichment-grid textarea:focus {
  border-color: rgba(35, 167, 195, 0.72);
  box-shadow: 0 0 0 3px rgba(35, 167, 195, 0.12);
}

.dialog-enrichment-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(62, 150, 199, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(103, 87, 224, 0.09), transparent 38%),
    linear-gradient(140deg, rgba(235, 250, 255, 0.85), rgba(248, 245, 255, 0.86));
}

.dialog-enrichment-section[hidden] {
  display: none;
}

.dialog-enrichment-section h3 {
  margin: 0 0 9px;
  color: #145f86;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.dialog-enrichment-section p,
.dialog-enrichment-section li,
.dialog-enrichment-section > div {
  color: #345564;
  font-size: 10px;
  line-height: 1.75;
}

.dialog-enrichment-section p {
  margin: 0;
}

.dialog-morphology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dialog-morphology-grid > div {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.dialog-morphology-grid span {
  display: block;
  margin-bottom: 4px;
  color: #607b89;
  font-size: 8px;
  font-weight: 800;
}

.dialog-morphology-note {
  margin-top: 9px !important;
  padding-top: 9px;
  border-top: 1px dashed rgba(62, 150, 199, 0.25);
}

.dialog-enrichment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dialog-enrichment-chips > span {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(40, 150, 183, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #145f78;
  font-size: 9px;
  line-height: 1.4;
}

.dialog-extra-examples {
  display: grid;
  gap: 9px;
}

.dialog-extra-examples > article,
.dialog-extra-examples > div {
  padding: 10px;
  border-left: 3px solid #2db4c5;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.72);
}

.dialog-extra-examples small {
  display: block;
  margin-top: 4px;
  color: #6a7f89;
  font-size: 9px;
  line-height: 1.6;
}

.dialog-common-mistakes-section {
  border-color: rgba(221, 154, 45, 0.24);
  background: linear-gradient(140deg, rgba(255, 247, 224, 0.9), rgba(255, 238, 241, 0.8));
}

.dialog-common-mistakes-section h3 {
  color: #9a5e0c;
}

#dialog-common-mistakes > p,
#dialog-common-mistakes > div,
#dialog-common-mistakes > li {
  margin: 0 0 7px;
}

#dialog-common-mistakes > :last-child {
  margin-bottom: 0;
}

@media (max-width: 620px) {
  .add-word-term-row {
    grid-template-columns: 1fr;
  }

  .add-word-enrich-button {
    width: 100%;
    min-height: 44px;
  }

  .add-word-enrichment {
    max-height: 60dvh;
    border-radius: 16px;
  }

  .add-word-enrichment-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }

  .add-word-spelling-review {
    align-items: stretch;
    flex-direction: column;
  }

  .add-word-spelling-review > div,
  .add-word-spelling-review button {
    width: 100%;
  }

  .add-word-enrichment-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .add-word-enrichment-actions button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .add-word-enrichment-scroll {
    padding: 12px;
  }

  .add-word-enrichment-group {
    padding: 11px;
  }

  .add-word-enrichment-grid,
  .dialog-morphology-grid {
    grid-template-columns: 1fr;
  }

  .add-word-enrichment-grid .form-field-wide {
    grid-column: auto;
  }

  .add-word-enrichment-grid textarea {
    min-height: 92px;
  }

  .add-word-actions {
    position: sticky;
    z-index: 4;
    bottom: -27px;
    padding: 12px 0 max(27px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(74, 150, 187, 0.16);
    background: linear-gradient(to bottom, rgba(244, 249, 253, 0.92), rgba(244, 249, 253, 0.99) 34%);
    backdrop-filter: blur(12px);
  }

  .dialog-enrichment-section {
    padding: 12px;
  }
}

@media (forced-colors: active) {
  .add-word-enrich-button,
  .add-word-enrichment-status,
  .add-word-enrichment,
  .add-word-enrichment-header,
  .add-word-enrichment-group,
  .dialog-enrichment-section,
  .dialog-morphology-grid > div,
  .dialog-enrichment-chips > span,
  .dialog-extra-examples > article,
  .dialog-extra-examples > div {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }
}
