:root {
  color-scheme: light;
  /* International trade business palette: navy, mist white and restrained champagne. */
  --forest-950: #0b1f33;
  --forest-900: #102a43;
  --forest-800: #163a5f;
  --forest-700: #24577a;
  --forest-100: #e4edf5;
  --forest-50: #f1f6fa;
  --gold-600: #8a6229;
  --gold-500: #c39a5a;
  --gold-200: #e7d5b5;
  --gold-100: #f8f2e8;
  --ink: #172534;
  --muted: #566778;
  --muted-light: #758595;
  --paper: #f3f5f7;
  --paper-deep: #e6ebf0;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #d9e1e8;
  --line-strong: #bdc9d4;
  --blue: #315f85;
  --danger: #a13f3f;
  --shadow-sm: 0 5px 18px rgba(11, 31, 51, 0.055);
  --shadow-md: 0 14px 38px rgba(11, 31, 51, 0.095);
  --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(195, 154, 90, 0.07), transparent 30rem),
    linear-gradient(180deg, #f6f8fa 0%, var(--paper) 38%, #f1f4f6 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 rgba(36, 87, 122, 0.38);
  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 {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 11px;
  background: linear-gradient(145deg, #d0aa6b, #a87835);
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(3, 15, 28, 0.22);
}

.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(3, 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); }
.featured-resource { border-top: 3px solid var(--forest-700); }

.resource-brand {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.resource-brand.voa { background: #16426a; color: #fff; }
.resource-brand.bbc { background: #1f1f1f; color: #fff; }
.resource-brand.bc { background: #e8ecf1; color: #375c80; }
.resource-brand.tradegov { background: #e7edf3; color: #345673; }
.resource-brand.itc { background: var(--forest-50); color: var(--forest-700); }

.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: 9px; line-height: 1.75; }
.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,
.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 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);
}

.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);
  padding: 31px;
  overflow-y: auto;
  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-form { display: grid; gap: 13px; }
.auth-form [hidden] { display: none !important; }
.auth-form .form-field { gap: 7px; }
.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; }
  .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 { 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%; }
  .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;
  }
}
