@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf8fd;
  --surface: #ffffff;
  --ink: #20242a;
  --muted: #66706d;
  --line: #ddd4e8;
  --jade: #4c2d71;
  --jade-dark: #2a173d;
  --coral: #e85d4f;
  --gold: #f5b942;
  --sky: #eee7f8;
  --plum: #5b377d;
  --shadow: 0 18px 48px rgba(44, 28, 64, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(237, 229, 248, 0.95), rgba(250, 247, 252, 0.96) 36%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin-top: 8px;
}

.login-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.login-message {
  padding: 10px 12px;
  border: 1px solid rgba(232, 93, 79, 0.28);
  border-radius: 8px;
  background: rgba(232, 93, 79, 0.08);
  color: var(--ink) !important;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

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

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.app-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.brand-home-link {
  color: inherit;
  text-decoration: none;
}

.brand-home-link:hover .brand-mark {
  transform: translateY(-1px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-mark svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--jade-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.08;
}

.brand-block p {
  margin-top: 4px;
  color: var(--muted);
}

.control-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

body.admin-mode .control-strip {
  display: none;
}

body.language-tools-off .control-strip {
  display: none;
}

.app-account-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 42px;
}

.control-strip label,
.switch,
.voice-test-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 0.92rem;
}

.voice-test-button {
  color: var(--ink);
}

.voice-hint {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: right;
}

.planning-mode .control-strip {
  display: none;
}

select {
  max-width: 230px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.switch input {
  accent-color: var(--jade);
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  grid-template-areas:
    "tabs tabs tabs"
    "scenarios practice progress";
  gap: 16px;
  align-items: start;
}

.mode-tabs {
  grid-area: tabs;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab,
.primary-button,
.choice-button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.tab[hidden],
body.language-tools-off .tab[data-mode="conversation"],
body.language-tools-off .tab[data-mode="tones"],
body.language-tools-off .tab[data-mode="phrases"],
body.language-tools-off .tab[data-mode="mic"] {
  display: none;
}

.tab-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tab.is-active {
  background: var(--ink);
  color: white;
  box-shadow: 0 10px 24px rgba(32, 36, 42, 0.18);
}

.scenario-panel,
.practice-surface,
.progress-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.scenario-panel {
  grid-area: scenarios;
  padding: 14px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scenario-list {
  display: grid;
  gap: 8px;
}

.scenario-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.scenario-button.is-active {
  border-color: var(--jade);
  background: rgba(76, 45, 113, 0.08);
}

.scenario-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--sky);
  color: var(--jade-dark);
  font-weight: 800;
}

.scenario-button strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-button span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
}

.practice-surface {
  grid-area: practice;
  min-height: 610px;
  padding: clamp(16px, 2.4vw, 28px);
}

.progress-panel {
  grid-area: progress;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 55%, transparent 56%),
    conic-gradient(var(--gold) calc(var(--scoreArc, 0) * 1%), #e6ece8 0);
}

.score-ring span {
  display: block;
  font-size: 2.6rem;
  font-weight: 850;
}

.score-ring small {
  margin-top: -14px;
  color: var(--muted);
  font-weight: 700;
}

.streak-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(245, 185, 66, 0.16);
}

.passport-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stamp {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed #b5bdb7;
  border-radius: 8px;
  color: #9aa39e;
  font-size: 0.8rem;
  font-weight: 800;
}

.stamp.is-filled {
  border-style: solid;
  border-color: rgba(76, 45, 113, 0.35);
  background: rgba(76, 45, 113, 0.12);
  color: var(--jade-dark);
}

.view-stack {
  display: grid;
  gap: 18px;
}

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

.lesson-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.lesson-head p {
  max-width: 58ch;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
}

.mini-visual {
  width: 112px;
  min-width: 112px;
  height: 92px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(76, 45, 113, 0.18), rgba(232, 93, 79, 0.18)),
    var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.mini-visual svg {
  width: 100%;
  height: 100%;
}

.mini-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fbf8);
  border: 1px solid var(--line);
}

.speaker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.line-content {
  min-width: 0;
}

.line-content strong {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pinyin {
  margin-top: 4px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.12;
}

.hanzi {
  display: none;
  margin-top: 8px;
  color: var(--jade-dark);
  font-size: 1.35rem;
  font-weight: 700;
}

body.show-hanzi .hanzi {
  display: block;
}

.landing-body {
  background: #f4f7f3;
}

.landing-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 18px;
}

.landing-brand,
.landing-nav-actions,
.landing-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-brand,
.ghost-link,
.primary-link,
.secondary-link,
.planner-action-card.link-card {
  color: inherit;
  text-decoration: none;
}

.compact-brand {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
}

.compact-brand svg {
  width: 31px;
  height: 31px;
}

.ghost-link,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

.primary-link {
  border-color: var(--jade);
  background: var(--jade);
  color: white;
}

.secondary-link,
.ghost-link {
  background: rgba(255, 255, 255, 0.82);
}

.large-link {
  min-height: 48px;
  padding: 12px 18px;
}

.landing-hero {
  position: relative;
  min-height: clamp(560px, 74vh, 760px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.landing-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 18, 20, 0.78), rgba(12, 18, 20, 0.28) 52%, rgba(12, 18, 20, 0.1));
}

.landing-hero-copy {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 72px);
  color: white;
}

.landing-hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.landing-hero-copy h1 {
  margin-top: 12px;
  font-size: clamp(2.6rem, 6vw, 5.9rem);
  line-height: 0.96;
}

.landing-hero-copy p {
  max-width: 56ch;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.55;
}

.landing-hero-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.landing-feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.landing-feature-band article,
.trip-create-panel,
.trip-list-panel,
.trip-card,
.empty-trip-card,
.plan-hero-panel,
.planner-action-card,
.share-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(28, 35, 32, 0.08);
}

.landing-feature-band article {
  padding: 18px;
}

.landing-feature-band span {
  color: var(--jade-dark);
  font-weight: 900;
}

.landing-feature-band strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.landing-feature-band p,
.trip-dashboard-hero p,
.trip-card p,
.planner-action-card p,
.plan-hero-panel p,
.empty-copy,
.empty-trip-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.trip-dashboard,
.plan-view {
  gap: 16px;
}

.trip-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7faf7);
}

.trip-dashboard-hero h2,
.plan-hero-panel h2 {
  margin-top: 6px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.98;
}

.trip-dashboard-hero img,
.trip-dashboard-visual {
  width: 100%;
  min-height: 260px;
  border-radius: 8px;
}

.trip-dashboard-visual {
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent, rgba(8, 23, 24, 0.58)),
    url("assets/images/travel-planner-hero-optimized.jpg") center / cover no-repeat,
    var(--ink);
}

.trip-dashboard-visual span {
  margin: 16px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trip-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: stretch;
}

.trip-create-panel,
.trip-list-panel,
.share-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.trip-create-panel label,
.share-form label,
.trip-admin-selector,
.member-access-form label,
.traveller-note-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.trip-create-panel input,
.trip-create-panel select,
.trip-create-panel textarea,
.share-form input,
.share-form select,
.share-form textarea,
.trip-admin-selector select,
.member-access-form select,
.member-access-form textarea,
.traveller-note-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.trip-create-panel textarea,
.share-form textarea,
.member-access-form textarea,
.traveller-note-form textarea {
  resize: vertical;
}

.feature-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 247, 0.82);
}

.trip-create-panel .feature-checkbox input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--jade);
}

.feature-checkbox strong,
.feature-checkbox small {
  display: block;
}

.feature-checkbox strong {
  color: var(--ink);
}

.feature-checkbox small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.language-settings-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(28, 35, 32, 0.06);
}

.language-settings-panel p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.language-toggle-card {
  min-width: min(100%, 340px);
}

.form-row,
.share-form,
.plan-stat-grid,
.planner-action-grid,
.trip-card-grid {
  display: grid;
  gap: 12px;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.trip-card,
.empty-trip-card,
.planner-action-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  text-align: left;
}

.trip-card.is-selected {
  border-color: rgba(76, 45, 113, 0.5);
  background: rgba(76, 45, 113, 0.07);
}

.trip-card h3 {
  font-size: 1.25rem;
}

.trip-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-card-meta span,
.plan-stat-grid span {
  display: inline-grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f3f6f1;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.plan-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 20px;
}

.plan-stat-grid {
  grid-template-columns: 1fr;
}

.plan-stat-grid strong {
  font-size: 1rem;
}

.plan-stat-grid small {
  color: var(--muted);
}

.planner-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planner-action-card {
  min-height: 190px;
  border-color: var(--line);
  color: var(--ink);
  cursor: pointer;
}

.planner-action-card strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.traveller-preferences-panel,
.itinerary-preferences-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 0%, rgba(245, 185, 66, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 245, 252, 0.62)),
    rgba(255, 255, 255, 0.72);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

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

.traveller-preference-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.traveller-preference-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(76, 45, 113, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(44, 28, 64, 0.06), var(--glass-inset);
}

.traveller-preference-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.traveller-preference-card strong,
.traveller-preference-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traveller-preference-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.traveller-preference-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.self-preference-form {
  padding: 0;
}

.self-preference-form textarea {
  min-height: 118px;
}

.share-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.trip-access-panel {
  gap: 16px;
}

.trip-access-form {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 230px) auto;
  gap: 12px;
  align-items: end;
}

.trip-access-form button {
  min-height: 44px;
}

.trip-access-form select,
.member-permission-field select {
  min-height: 44px;
  padding: 10px 38px 10px 12px;
  -webkit-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.94);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--plum) 50%),
    linear-gradient(135deg, var(--plum) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  box-shadow: 0 8px 18px rgba(44, 28, 64, 0.06), var(--glass-inset, inset 0 1px 0 rgba(255, 255, 255, 0.72));
  font-weight: 850;
  line-height: 1.2;
}

.member-list {
  display: grid;
  gap: 8px;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.member-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.access-member-row {
  display: block;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.member-access-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
}

.traveller-note-form {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.member-access-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.member-access-main strong,
.readonly-member-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-permission-field {
  min-width: 0;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.readonly-member-row {
  display: block;
  padding: 12px;
}

.readonly-member-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
}

.landing-body {
  background:
    linear-gradient(180deg, rgba(248, 250, 246, 0.92), rgba(231, 239, 232, 0.92)),
    #edf4ee;
}

.landing-page {
  width: min(1240px, calc(100% - 40px));
  padding-top: 14px;
}

.landing-nav {
  position: sticky;
  top: 10px;
  z-index: 5;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 222, 215, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 52px rgba(31, 43, 38, 0.1);
  backdrop-filter: blur(18px);
}

.landing-brand {
  min-width: 0;
}

.landing-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghost-link,
.primary-link,
.secondary-link {
  border-radius: 10px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.55fr);
  grid-template-rows: 1fr auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: end;
  min-height: 560px;
  height: min(760px, calc(100vh - 118px));
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(9, 20, 20, 0.82), rgba(9, 20, 20, 0.5) 44%, rgba(9, 20, 20, 0.18)),
    linear-gradient(180deg, rgba(9, 20, 20, 0.08), rgba(9, 20, 20, 0.5)),
    url("assets/images/travel-planner-hero-optimized.jpg") center / cover no-repeat,
    var(--ink);
}

.landing-hero::after,
.landing-hero img {
  display: none;
}

.landing-hero-copy {
  align-self: center;
  padding: clamp(28px, 5vw, 64px);
}

.landing-hero-copy h1 {
  max-width: 10.5ch;
  font-size: clamp(3.4rem, 8vw, 7.9rem);
  letter-spacing: 0;
}

.landing-hero-copy p {
  max-width: 58ch;
  font-weight: 650;
}

.hero-route-board {
  position: relative;
  z-index: 1;
  align-self: center;
  margin: 28px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  background: rgba(250, 253, 249, 0.82);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(4, 14, 14, 0.28);
  backdrop-filter: blur(18px);
}

.route-board-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.route-board-head span {
  color: var(--jade-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-route-board ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: route;
}

.hero-route-board li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-route-board li::before {
  counter-increment: route;
  content: counter(route);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 0.85rem;
  font-weight: 900;
}

.hero-route-board li span,
.hero-route-board li small {
  grid-column: 2;
}

.hero-route-board li span {
  font-weight: 900;
}

.hero-route-board li small {
  margin-top: -4px;
  color: var(--muted);
}

.hero-signal-strip {
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(16px);
}

.hero-signal-strip span {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 18px clamp(16px, 3vw, 28px);
  color: white;
  background: rgba(7, 24, 24, 0.42);
}

.hero-signal-strip strong {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.hero-signal-strip small {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.landing-feature-band {
  grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 18px;
}

.landing-section-heading {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 16px;
  background: var(--ink);
  color: white;
}

.landing-section-heading .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.landing-section-heading h2 {
  margin-top: 10px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.landing-feature-band article {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 248, 0.9)),
    white;
}

.landing-feature-band article span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(76, 45, 113, 0.12);
}

.landing-planner-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 22%, rgba(245, 185, 66, 0.18), transparent 30%),
    linear-gradient(135deg, #fff, #eef6f1 58%, #f7fbff);
  box-shadow: 0 18px 52px rgba(31, 43, 38, 0.09);
}

.landing-planner-showcase h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.landing-planner-showcase p {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.preference-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: center;
  min-height: 280px;
}

.matrix-chip {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(28, 35, 32, 0.08);
}

.matrix-chip.is-hot {
  background: #fff1df;
  border-color: rgba(245, 185, 66, 0.42);
}

.matrix-chip.is-cool {
  background: #e8f6fb;
  border-color: rgba(95, 159, 181, 0.38);
}

.matrix-chip.is-warm {
  background: #fff0ee;
  border-color: rgba(232, 93, 79, 0.32);
}

.english {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 42px;
  padding: 10px 13px;
}

.primary-button {
  background: var(--jade);
  color: white;
  box-shadow: 0 10px 24px rgba(76, 45, 113, 0.2);
}

.ghost-button,
.icon-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.ghost-button:disabled,
.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

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

.choice-button {
  min-height: 118px;
  padding: 13px;
  background: var(--surface);
  border-color: var(--line);
  text-align: left;
}

.choice-button strong {
  display: block;
  font-size: 1.06rem;
  line-height: 1.25;
}

.choice-button span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.choice-button.is-correct {
  border-color: var(--jade);
  background: rgba(76, 45, 113, 0.12);
}

.choice-button.is-wrong {
  border-color: var(--coral);
  background: rgba(232, 93, 79, 0.11);
}

.feedback {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(215, 236, 247, 0.7);
  color: var(--ink);
}

.tone-grid,
.phrase-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.tone-card,
.phrase-card,
.mic-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.tone-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
}

.tone-card svg {
  width: 100%;
  height: 70px;
}

.tone-card path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
}

.tone-card .tone-number {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tone-card h3 {
  font-size: 1.45rem;
}

.quiz-strip {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(245, 185, 66, 0.13);
  border: 1px solid rgba(245, 185, 66, 0.38);
}

.tone-choice-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.phrase-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.phrase-filter {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.phrase-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
}

.phrase-card h3 {
  font-size: 1.25rem;
}

.mic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
}

.mic-card {
  display: grid;
  gap: 14px;
}

.transcript {
  min-height: 74px;
  padding: 12px;
  border-radius: 8px;
  background: #f3f6f1;
  color: var(--muted);
  line-height: 1.5;
}

.coach-note {
  padding: 14px;
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  background: rgba(232, 93, 79, 0.09);
  line-height: 1.5;
}

.workspace.is-home,
.workspace.is-plan,
.workspace.is-itinerary,
.workspace.is-mobile {
  grid-template-columns: 1fr;
  grid-template-areas:
    "tabs"
    "practice";
}

.workspace.is-home .mode-tabs {
  justify-self: start;
  max-width: 100%;
}

.workspace.is-home .tab:not([data-mode="home"]) {
  display: none;
}

.workspace.is-admin {
  grid-template-columns: 1fr;
  grid-template-areas: "practice";
}

.workspace.is-home .scenario-panel,
.workspace.is-home .progress-panel,
.workspace.is-plan .scenario-panel,
.workspace.is-plan .progress-panel,
.workspace.is-itinerary .scenario-panel,
.workspace.is-itinerary .progress-panel,
.workspace.is-mobile .scenario-panel,
.workspace.is-mobile .progress-panel,
.workspace.is-admin .scenario-panel,
.workspace.is-admin .progress-panel,
.workspace.is-admin .mode-tabs {
  display: none;
}

.workspace.is-home .practice-surface,
.workspace.is-plan .practice-surface,
.workspace.is-itinerary .practice-surface,
.workspace.is-mobile .practice-surface,
.workspace.is-admin .practice-surface {
  min-height: 690px;
}

.home-view {
  display: grid;
  gap: 18px;
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(28, 35, 32, 0.08);
}

.offline-banner.is-online {
  border-left-color: var(--jade);
}

.offline-banner.is-offline {
  border-left-color: var(--gold);
  background: #fffaf0;
}

.offline-banner strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
}

.offline-banner p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.offline-pill-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.offline-pill-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.home-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f7faf7);
}

.home-hero h2 {
  margin-top: 4px;
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  line-height: 1.03;
}

.home-hero p {
  max-width: 62ch;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.home-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-choice {
  min-height: 260px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  box-shadow: 0 14px 32px rgba(28, 35, 32, 0.09);
}

.home-choice.itinerary-choice {
  border-top: 6px solid var(--jade);
}

.home-choice.practice-choice {
  border-top: 6px solid var(--coral);
}

.choice-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(76, 45, 113, 0.1);
  color: var(--jade-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practice-choice .choice-kicker {
  background: rgba(232, 93, 79, 0.1);
  color: var(--coral);
}

.home-choice strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.home-choice p {
  max-width: 42ch;
  margin-top: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.home-choice small {
  display: block;
  margin-top: 22px;
  color: var(--ink);
  font-weight: 750;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-quick-grid button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6f1;
  color: var(--ink);
  font-weight: 800;
}

.itinerary-view {
  gap: 16px;
}

.mobile-view {
  gap: 16px;
}

.mobile-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mobile-status-card,
.mobile-pack-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.mobile-status-card {
  min-height: 96px;
  padding: 14px;
}

.mobile-status-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-status-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.28rem;
  line-height: 1.15;
}

.mobile-pack-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #f7faf7);
}

.mobile-pack-panel h3 {
  margin-top: 3px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.mobile-pack-note {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(215, 236, 247, 0.7);
  color: var(--ink);
}

.admin-view {
  gap: 18px;
}

.admin-console-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.admin-console-hero h2 {
  margin: 5px 0 8px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 0.95;
}

.admin-console-hero p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.5;
}

.admin-console-badge {
  display: grid;
  min-width: min(240px, 100%);
  gap: 5px;
  border: 1px solid rgba(76, 45, 113, 0.18);
  border-radius: 8px;
  padding: 13px 14px;
  background:
    linear-gradient(135deg, rgba(231, 248, 241, 0.88), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.72);
}

.admin-console-badge strong {
  font-size: 1rem;
}

.admin-console-badge span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.35;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.admin-usage-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.admin-usage-stack {
  display: grid;
  gap: 16px;
}

.admin-log-list {
  display: grid;
  gap: 10px;
}

.admin-log-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(76, 45, 113, 0.45);
  border-radius: 8px;
  background: #f8faf7;
}

.admin-log-row.error {
  border-left-color: #c9453b;
  background: rgba(232, 93, 79, 0.08);
}

.admin-log-row strong,
.admin-log-row span {
  display: block;
}

.admin-log-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.admin-log-row dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.admin-log-row dl div {
  display: grid;
  grid-template-columns: minmax(90px, 150px) minmax(0, 1fr);
  gap: 10px;
}

.admin-log-row dt,
.admin-log-row dd {
  margin: 0;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.admin-log-row dt {
  color: var(--muted);
  font-weight: 850;
}

.admin-log-row dd {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

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

.admin-panel-head h3 {
  margin: 3px 0 6px;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.08;
}

.admin-panel-head.compact h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
}

.admin-panel-head p {
  max-width: 72ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-usage-summary div,
.admin-cost-note {
  min-width: 0;
  border: 1px solid rgba(76, 45, 113, 0.16);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(248, 245, 252, 0.54)),
    rgba(255, 255, 255, 0.56);
  box-shadow: 0 10px 24px rgba(44, 28, 64, 0.07), var(--glass-inset, inset 0 1px 0 rgba(255, 255, 255, 0.78));
}

.admin-usage-summary span,
.admin-usage-summary em {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.admin-usage-summary span {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-usage-summary strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.admin-usage-summary em {
  margin-top: 7px;
}

.admin-cost-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: rgba(232, 93, 79, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.88), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.7);
}

.admin-cost-note strong {
  flex: 0 0 auto;
}

.admin-cost-note span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
  text-align: right;
}

.admin-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-usage-grid > section {
  display: grid;
  gap: 10px;
}

.cost-note-panel {
  align-content: start;
  min-height: 210px;
  border-color: rgba(232, 93, 79, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.86), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.7);
}

.cost-note-panel h3 {
  margin: 2px 0 4px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.cost-note-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.cost-rate-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.cost-rate-list span {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(216, 222, 215, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.cost-rate-list strong,
.cost-rate-list em {
  display: block;
}

.cost-rate-list strong {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.cost-rate-list em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1.35;
}

.admin-token-chart {
  display: grid;
  gap: 12px;
  min-height: 310px;
}

.admin-chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(92px, 1fr);
  align-items: end;
  gap: 12px;
  min-height: 260px;
  overflow-x: auto;
  border: 1px solid rgba(216, 222, 215, 0.72);
  border-radius: 8px;
  padding: 16px 14px 12px;
  background:
    repeating-linear-gradient(
      to top,
      rgba(216, 222, 215, 0.42) 0,
      rgba(216, 222, 215, 0.42) 1px,
      transparent 1px,
      transparent 54px
    ),
    rgba(255, 255, 255, 0.42);
}

.admin-chart-column {
  display: grid;
  min-width: 92px;
  height: 228px;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px;
  justify-items: center;
}

.admin-chart-stack {
  display: flex;
  width: min(46px, 70%);
  height: 100%;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid rgba(76, 45, 113, 0.18);
  border-radius: 999px 999px 8px 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.admin-chart-stack i {
  display: block;
  width: 50%;
  min-height: 2px;
}

.admin-chart-column strong {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.1;
  text-align: center;
}

.admin-chart-column span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.admin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-chart-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.admin-chart-stack .prompt,
.admin-chart-legend .prompt {
  background: var(--jade);
}

.admin-chart-stack .completion,
.admin-chart-legend .completion {
  background: var(--coral);
}

.admin-chart-empty {
  display: grid;
  min-height: 240px;
  place-content: center;
  gap: 8px;
  border: 1px dashed rgba(76, 45, 113, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.admin-chart-empty span {
  color: var(--muted);
}

.admin-health-graph {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 124px;
}

.admin-health-bar {
  display: flex;
  overflow: hidden;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(216, 222, 215, 0.52);
}

.admin-health-bar i {
  display: block;
  min-width: 0;
}

.admin-health-bar .succeeded,
.admin-chart-legend .succeeded {
  background: var(--jade);
}

.admin-health-bar .failed,
.admin-chart-legend .failed {
  background: var(--coral);
}

.admin-usage-table {
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-usage-row {
  display: grid;
  min-width: 960px;
  min-height: 50px;
  border-top: 1px solid rgba(216, 222, 215, 0.72);
}

.admin-usage-table.monthly .admin-usage-row {
  grid-template-columns: minmax(100px, 0.6fr) minmax(180px, 1.05fr) minmax(100px, 0.6fr) minmax(100px, 0.6fr) minmax(105px, 0.6fr) minmax(115px, 0.65fr) minmax(105px, 0.6fr) minmax(145px, 0.8fr);
}

.admin-usage-table.recent .admin-usage-row {
  grid-template-columns: minmax(120px, 0.72fr) minmax(180px, 1.05fr) minmax(160px, 0.95fr) minmax(150px, 0.85fr) minmax(95px, 0.55fr) minmax(150px, 0.85fr);
}

.admin-usage-row:first-child {
  border-top: 0;
}

.admin-usage-row.heading {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 38px;
  background:
    linear-gradient(135deg, rgba(245, 239, 250, 0.98), rgba(255, 247, 232, 0.96)),
    rgba(255, 255, 255, 0.96);
}

.admin-usage-row span {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
  border-left: 1px solid rgba(216, 222, 215, 0.62);
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 780;
}

.admin-usage-row span:first-child {
  border-left: 0;
  color: var(--muted);
}

.admin-usage-row.heading span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-usage-row strong,
.admin-usage-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-usage-row strong {
  color: var(--ink);
}

.admin-usage-row em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 740;
}

.usage-status {
  justify-self: start;
  border: 1px solid rgba(76, 45, 113, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(231, 248, 241, 0.82);
  color: var(--jade-dark);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.usage-status.failed {
  border-color: rgba(232, 93, 79, 0.24);
  background: rgba(255, 230, 224, 0.86);
  color: #9f3028;
}

.usage-status.running {
  border-color: rgba(245, 185, 66, 0.34);
  background: rgba(255, 247, 218, 0.9);
  color: #8a6412;
}

@media (max-width: 980px) {
  .admin-usage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-console-hero,
  .admin-panel-head,
  .admin-cost-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-usage-grid {
    grid-template-columns: 1fr;
  }

  .admin-cost-note span {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .admin-usage-summary {
    grid-template-columns: 1fr;
  }

  .admin-usage-panel {
    padding: 14px;
  }

  .admin-console-hero {
    padding: 16px;
  }

  .admin-console-badge {
    min-width: 0;
    width: 100%;
  }

  .admin-usage-row {
    min-width: 720px;
  }

  .admin-chart-bars {
    grid-auto-columns: minmax(78px, 1fr);
  }
}

.admin-email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-plan-form {
  display: grid;
  gap: 12px;
}

.admin-email-form label,
.admin-plan-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-email-form input,
.admin-plan-form textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

.admin-plan-form textarea {
  min-height: 320px;
  resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-email-list {
  display: grid;
  gap: 10px;
}

.admin-email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.admin-email-row strong,
.admin-email-row span {
  display: block;
}

.admin-email-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-email-row button {
  flex: 0 0 auto;
}

.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.itinerary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sync-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.sync-status-dock {
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.sync-status-dock.is-prominent {
  position: sticky;
  bottom: 12px;
  z-index: 15;
}

.sync-status-dock.is-quiet {
  position: static;
  opacity: 0.78;
}

.sync-status-dock .sync-status-badge {
  pointer-events: auto;
}

.sync-status-dock.is-prominent .sync-status-badge {
  box-shadow: 0 14px 30px rgba(28, 35, 32, 0.18);
}

.sync-status-dock.is-quiet .sync-status-badge {
  box-shadow: none;
}

.sync-status-badge.saving,
.sync-status-badge.pending {
  border-color: rgba(245, 185, 66, 0.48);
  background: rgba(245, 185, 66, 0.14);
  color: #6f4d08;
}

.sync-status-badge.saved {
  border-color: rgba(76, 45, 113, 0.35);
  background: rgba(76, 45, 113, 0.1);
  color: var(--jade-dark);
}

.sync-status-badge.offline {
  border-color: rgba(122, 77, 143, 0.28);
  background: rgba(122, 77, 143, 0.1);
  color: var(--plum);
}

.compact-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-actions form {
  margin: 0;
}

.segmented-control {
  display: inline-flex;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6f1;
}

.segmented-control button {
  min-width: 86px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(32, 36, 42, 0.1);
}

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

.trip-stats div {
  min-height: 72px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.trip-stats strong,
.trip-stats span {
  display: block;
}

.trip-stats strong {
  font-size: 1.3rem;
  line-height: 1.1;
}

.trip-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.selected-hotel-summary,
.selected-days-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-stepper {
  display: grid;
  grid-template-columns: 38px 74px 38px;
  align-items: stretch;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.day-stepper button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 850;
}

.day-stepper label {
  display: grid;
  place-items: center;
  border-inline: 1px solid var(--line);
}

.day-stepper label span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.day-stepper input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-align: center;
}

.stop-form,
.hotel-form,
.hotel-pdf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hotel-input {
  display: grid;
  gap: 6px;
}

.hotel-input span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hotel-input input,
.hotel-input textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 9px 10px;
}

.hotel-input input[type="file"] {
  padding: 8px;
}

.hotel-input textarea {
  min-height: 104px;
  line-height: 1.45;
  resize: vertical;
}

.hotel-notes,
.hotel-pdf-input {
  display: grid;
}

.hotel-pdf-input {
  align-content: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.68);
}

.hotel-pdf-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hotel-pdf-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotel-pdf-meta small {
  margin-top: 0;
  color: var(--muted);
}

.hotel-pdf-buttons,
.hotel-pdf-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hotel-pdf-buttons {
  margin-top: 2px;
}

.hotel-pdf-links {
  margin-top: 9px;
}

.hotel-pdf-link {
  min-height: 34px;
  padding: 7px 10px;
}

.hotel-zh-name {
  display: block;
  margin-top: 5px;
  color: var(--jade-dark);
  font-size: 0.95rem;
  line-height: 1.25;
}

.hotel-admin-line {
  color: var(--ink);
  font-size: 0.95rem;
}

.stop-edit-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.day-trip-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(122, 77, 143, 0.18);
  border-radius: 9px;
  background: rgba(122, 77, 143, 0.06);
}

.day-trip-head,
.day-trip-row {
  display: grid;
  gap: 10px;
}

.day-trip-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.day-trip-head strong {
  display: block;
  margin-top: 3px;
  line-height: 1.2;
}

.day-trip-list {
  display: grid;
  gap: 9px;
}

.day-trip-row {
  grid-template-columns: minmax(0, 1.1fr) 86px minmax(0, 1.2fr) auto;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.day-trip-empty {
  color: var(--muted);
  font-weight: 720;
}

.compact-danger {
  min-height: 42px;
  padding-inline: 12px;
}

.danger-button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(180, 55, 45, 0.35);
  border-radius: 9px;
  background: rgba(232, 93, 79, 0.08);
  color: #8f2f27;
  font-weight: 850;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.trip-map-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(28, 35, 32, 0.08);
}

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

.map-head h3 {
  margin-top: 3px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.1;
}

.map-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.map-scale-note {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.map-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.map-zoom-controls {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f1;
}

.map-zoom-controls button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
}

.map-zoom-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.map-zoom-controls span {
  min-width: 48px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  height: clamp(360px, 46vw, 520px);
  gap: 14px;
  align-items: stretch;
}

.map-frame {
  min-width: 0;
  height: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sky);
  cursor: grab;
  overscroll-behavior: contain;
  scrollbar-color: #a8b4ad transparent;
  touch-action: none;
}

.map-frame.is-panning {
  cursor: grabbing;
}

.china-route-map {
  display: block;
  width: var(--map-zoom-size, 100%);
  height: var(--map-zoom-size, 100%);
  min-width: 100%;
  min-height: 100%;
  max-width: none;
}

.map-arrow-adults {
  fill: #b97813;
}

.map-arrow-family {
  fill: var(--plum);
}

.map-arrow-active {
  fill: var(--coral);
}

.map-water {
  fill: #d7ecf7;
}

.map-land,
.map-island {
  fill: #edf5e9;
  stroke: #91aa9d;
  stroke-width: 2.6;
}

.map-island {
  stroke-width: 1.8;
}

.map-route-segment {
  stroke: #c88a22;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.map-route-segment.family {
  stroke: var(--plum);
  stroke-width: 3.4;
}

.map-route-segment.is-active {
  stroke: var(--coral);
  stroke-width: 4.8;
}

.map-city-marker {
  cursor: pointer;
  outline: none;
}

.map-city-marker:focus {
  outline: none;
}

.map-city-marker:focus-visible .map-city-hit {
  stroke: rgba(76, 45, 113, 0.45);
  stroke-width: 5;
}

.map-label-guide {
  stroke: rgba(82, 94, 88, 0.34);
  stroke-width: 1.4;
}

.map-city-hit {
  fill: transparent;
  stroke: transparent;
}

.map-city-label-hit {
  fill: rgba(255, 255, 255, 0.01);
  stroke: transparent;
}

.map-city-dot {
  fill: var(--surface);
  stroke: var(--jade-dark);
  stroke-width: 4;
}

.map-city-marker.is-active .map-city-dot {
  fill: var(--coral);
  stroke: #fff;
  stroke-width: 5;
}

.map-city-label {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.map-city-marker.is-active .map-city-label {
  fill: var(--coral);
}

.map-route-list {
  display: grid;
  align-content: start;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: #a8b4ad transparent;
}

.map-route-stop {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 9px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: var(--ink);
  text-align: left;
}

.map-route-stop span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(76, 45, 113, 0.12);
  color: var(--jade-dark);
  font-weight: 850;
}

.map-route-stop strong,
.map-route-stop small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-route-stop strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.map-route-stop small {
  grid-column: 2;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.map-route-stop.is-active {
  border-color: var(--coral);
  background: rgba(232, 93, 79, 0.08);
}

.map-route-stop.is-active span {
  background: var(--coral);
  color: #fff;
}

.timeline-shell {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 12px;
  scrollbar-color: #a8b4ad transparent;
}

.timeline-grid {
  display: grid;
  grid-auto-rows: auto;
  gap: 8px;
  min-width: max-content;
}

.stay-band,
.timeline-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
}

.stay-band {
  grid-row: 1;
  min-height: 48px;
  padding: 9px 11px;
  background: rgba(76, 45, 113, 0.12);
  color: var(--jade-dark);
}

.stay-band.family {
  background: rgba(122, 77, 143, 0.12);
  color: var(--plum);
}

.stay-band strong,
.stay-band span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stay-band span {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline-day {
  grid-row: 2;
  width: var(--day-width);
  min-height: 162px;
  padding: 12px;
  background: var(--surface);
  border-top: 4px solid var(--jade);
  color: var(--ink);
}

.timeline-day.family {
  border-top-color: var(--plum);
}

.timeline-day.is-active {
  border-color: var(--coral);
  border-top-color: var(--coral);
  box-shadow: 0 14px 28px rgba(232, 93, 79, 0.16);
}

.timeline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timeline-date,
.timeline-day em,
.timeline-day small {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 750;
}

.timeline-day strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
  line-height: 1.15;
}

.booking-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(76, 45, 113, 0.28);
  border-radius: 50%;
  background: rgba(76, 45, 113, 0.12);
  color: var(--jade-dark);
}

.booking-badge svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: currentColor;
}

.timeline-day p {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.timeline-day small {
  margin-top: 8px;
  color: var(--jade-dark);
}

.zoom-0 .timeline-day {
  min-height: 126px;
}

.zoom-0 .timeline-day p {
  -webkit-line-clamp: 2;
}

.zoom-2 .timeline-day {
  min-height: 222px;
}

.zoom-2 .timeline-day p {
  -webkit-line-clamp: 6;
}

.day-detail {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f7faf7);
}

.day-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.day-detail h3 {
  margin-top: 3px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.day-detail p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.48;
}

.selected-hotel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(76, 45, 113, 0.25);
  border-radius: 10px;
  background: rgba(76, 45, 113, 0.08);
}

.selected-hotel.is-editing {
  background: #f4fbf8;
}

.selected-hotel h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 1.08rem;
  line-height: 1.2;
}

.selected-hotel small {
  display: block;
  margin-top: 7px;
  color: var(--jade-dark);
  font-weight: 750;
  line-height: 1.35;
}

.selected-stop-form {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(76, 45, 113, 0.22);
}

.selected-days-row strong {
  display: block;
  margin-top: 3px;
  line-height: 1.2;
}

.selected-hotel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

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

.detail-block {
  min-height: 116px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.detail-block span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-block p {
  margin-top: 8px;
  color: var(--ink);
  line-height: 1.42;
}

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

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(76, 45, 113, 0.34);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
    grid-template-areas:
      "tabs tabs"
      "scenarios practice"
      "progress progress";
  }

  .progress-panel {
    grid-template-columns: 160px minmax(0, 1fr) 120px;
    align-items: center;
  }

  .passport-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .choice-grid,
  .tone-grid,
  .phrase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .map-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .map-route-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .trip-dashboard-grid,
  .trip-dashboard-hero,
  .plan-hero-panel {
    grid-template-columns: 1fr;
  }

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

  .trip-access-form,
  .member-access-form,
  .member-access-main,
  .readonly-member-row,
  .traveller-preference-list,
  .traveller-preference-list.compact {
    grid-template-columns: 1fr;
  }

  .member-actions {
    justify-content: flex-start;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 640px;
  }

  .hero-route-board {
    align-self: end;
    width: min(520px, calc(100% - 56px));
    margin: 0 28px 28px auto;
  }

  .landing-feature-band,
  .landing-planner-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-section-heading {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .app-header,
  .lesson-head,
  .home-hero,
  .offline-banner,
  .language-settings-panel,
  .landing-nav,
  .landing-brand,
  .landing-nav-actions,
  .landing-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-feature-band,
  .landing-planner-showcase,
  .trip-card-grid,
  .planner-action-grid,
  .form-row,
  .share-form {
    grid-template-columns: 1fr;
  }

  .landing-page {
    width: min(100% - 24px, 1180px);
  }

  .landing-hero {
    min-height: auto;
    height: auto;
    grid-template-columns: 1fr;
    gap: 0;
    background-position: center;
  }

  .landing-hero::after {
    background: linear-gradient(180deg, rgba(12, 18, 20, 0.78), rgba(12, 18, 20, 0.34));
  }

  .landing-hero-copy {
    padding: 28px;
  }

  .landing-hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .hero-route-board {
    width: auto;
    margin: 0 16px 16px;
  }

  .hero-signal-strip {
    grid-template-columns: 1fr;
  }

  .hero-signal-strip span {
    min-height: 64px;
  }

  .offline-pill-grid {
    justify-content: flex-start;
  }

  .control-strip {
    justify-content: stretch;
  }

  .control-strip label,
  .switch,
  .voice-test-button {
    flex: 1 1 145px;
  }

  .voice-hint {
    text-align: left;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tabs"
      "scenarios"
      "practice"
      "progress";
  }

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

  .practice-surface {
    min-height: auto;
  }

  .choice-grid,
  .tone-grid,
  .phrase-grid,
  .tone-choice-row {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 126px;
    height: 126px;
  }

  .trip-stats,
  .detail-grid,
  .home-choice-grid,
  .home-quick-grid,
  .mobile-status-grid,
  .admin-email-form,
  .stop-form,
  .hotel-form,
  .hotel-pdf-grid {
    grid-template-columns: 1fr;
  }

  .member-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .itinerary-toolbar,
  .selected-hotel-summary,
  .selected-days-row {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-actions,
  .selected-hotel-actions,
  .stop-edit-actions,
  .day-trip-head {
    justify-content: stretch;
  }

  .sync-status-dock.is-prominent {
    bottom: 8px;
    justify-content: stretch;
  }

  .sync-status-dock.is-prominent .sync-status-badge {
    justify-content: center;
    width: 100%;
  }

  .compact-actions > *,
  .selected-hotel-actions > *,
  .stop-edit-actions > *,
  .day-trip-head > * {
    width: 100%;
  }

  .day-trip-head,
  .day-trip-row {
    grid-template-columns: 1fr;
  }

  .admin-email-row {
    align-items: stretch;
    flex-direction: column;
  }

  .day-stepper {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    min-height: 48px;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    min-width: 0;
    flex: 1 1 0;
  }

  .map-head {
    flex-direction: column;
  }

  .map-head-actions {
    width: 100%;
    justify-content: stretch;
  }

  .map-scale-note {
    flex: 1 1 140px;
  }

  .map-zoom-controls {
    flex: 1 1 170px;
    justify-content: space-between;
  }

  .map-frame {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .map-route-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .scenario-list {
    grid-template-columns: 1fr;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
}

/* Photo-led landing refresh */
.landing-body {
  background:
    linear-gradient(180deg, rgba(239, 232, 247, 0.82), rgba(255, 252, 244, 0.92) 38%, rgba(249, 245, 252, 0.96)),
    #fbf8fd;
}

.landing-page {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 14px 0 64px;
}

.landing-nav {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 44px rgba(27, 56, 50, 0.12);
  backdrop-filter: blur(18px);
}

.landing-brand,
.landing-nav-actions,
.landing-hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.landing-brand,
.nav-text-link,
.account-link,
.hero-text-link,
.booking-link {
  color: inherit;
  text-decoration: none;
}

.landing-brand strong {
  color: #1f2627;
  font-size: 1rem;
}

.compact-brand {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(19, 68, 56, 0.12);
}

.compact-brand svg {
  width: 29px;
  height: 29px;
}

.compact-brand img {
  width: 100%;
  height: 100%;
}

.nav-text-link {
  color: #342b3f;
  font-weight: 850;
}

.nav-text-link:hover,
.hero-text-link:hover,
.booking-link:hover {
  color: var(--jade-dark);
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(76, 45, 113, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #2a173d;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(76, 45, 113, 0.1);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4c2d71, #9b72d4);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
}

.landing-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(540px, 72svh, 760px);
  overflow: hidden;
  border-radius: 8px;
  background: #eee6f7;
  box-shadow: 0 26px 70px rgba(60, 38, 82, 0.2);
}

.landing-hero .landing-hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(90deg, rgba(43, 24, 66, 0.58), rgba(43, 24, 66, 0.22) 48%, rgba(43, 24, 66, 0.02) 78%),
    linear-gradient(180deg, rgba(255, 197, 91, 0.08), rgba(31, 18, 48, 0.24));
}

.landing-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(740px, 100%);
  padding: clamp(34px, 7vw, 82px);
  color: #fff;
  text-shadow: 0 2px 22px rgba(10, 46, 45, 0.34);
}

.landing-hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

.landing-hero-copy h1 {
  max-width: 11ch;
  margin-top: 12px;
  color: #fff;
  font-size: clamp(3.2rem, 7.4vw, 7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.landing-hero-copy p {
  max-width: 56ch;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.05rem, 1.6vw, 1.26rem);
  font-weight: 700;
  line-height: 1.55;
}

.landing-hero-actions {
  flex-wrap: wrap;
  margin-top: 30px;
}

.landing-body .primary-link {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #4c2d71, #8f63c9);
  color: white;
  box-shadow: 0 15px 34px rgba(76, 45, 113, 0.28);
}

.landing-body .primary-link:hover {
  transform: translateY(-1px);
}

.hero-text-link {
  color: white;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.travel-pro-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.travel-section-heading {
  grid-column: 1 / -1;
  max-width: 880px;
  padding: 8px 2px 4px;
}

.travel-section-heading .eyebrow,
.showcase-copy .eyebrow {
  color: var(--coral);
}

.travel-section-heading h2,
.showcase-copy h2 {
  margin-top: 8px;
  color: #1f2627;
  font-size: clamp(2.2rem, 4.6vw, 5rem);
  line-height: 0.98;
}

.travel-pro-card {
  display: flex;
  min-height: 440px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(61, 42, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(39, 66, 62, 0.12);
}

.travel-pro-copy {
  display: grid;
  gap: 8px;
  padding: 22px 22px 16px;
}

.travel-pro-copy strong {
  color: #1f2627;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.travel-pro-copy p {
  margin: 0;
  color: #536561;
  line-height: 1.48;
}

.travel-pro-card img {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  height: clamp(240px, 22vw, 310px);
  min-height: 0;
  margin-top: auto;
  object-fit: cover;
}

.landing-planner-showcase {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(34px, 6vw, 72px);
  padding: clamp(10px, 2vw, 18px) 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.8), rgba(229, 247, 243, 0.72)),
    transparent;
  box-shadow: none;
}

.showcase-image-wrap {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 22px 58px rgba(46, 74, 70, 0.16);
}

.showcase-image-wrap img {
  display: block;
  width: 100%;
  min-height: 480px;
  object-fit: cover;
}

.showcase-copy p {
  max-width: 64ch;
  margin-top: 18px;
  color: #50615e;
  font-size: 1.05rem;
  line-height: 1.68;
}

.planner-profile-grid {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.planner-profile-grid span {
  display: grid;
  gap: 4px;
  padding: 14px 0 14px 18px;
  border-left: 5px solid var(--gold);
}

.planner-profile-grid span:nth-child(2) {
  border-left-color: #9b72d4;
}

.planner-profile-grid span:nth-child(3) {
  border-left-color: var(--coral);
}

.planner-profile-grid strong {
  color: #1f2627;
  font-size: 1.05rem;
}

.planner-profile-grid small {
  color: #5d6f6b;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
}

.booking-link {
  display: inline-flex;
  align-items: center;
  margin-top: 26px;
  color: var(--jade-dark);
  font-weight: 950;
}

.booking-link::after {
  content: "->";
  margin-left: 10px;
}

.landing-footer {
  margin-top: clamp(46px, 7vw, 88px);
  padding: clamp(28px, 5vw, 46px);
  border-radius: 8px;
  background: #1c122b;
  color: #d7e3de;
  box-shadow: 0 22px 62px rgba(35, 23, 50, 0.18);
}

.landing-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: clamp(26px, 5vw, 56px);
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.landing-footer-brand h3 {
  color: #ffb45f;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.landing-footer-about p {
  max-width: 60ch;
  color: #aebfba;
  line-height: 1.65;
}

.landing-footer-links h4 {
  color: #fff;
  font-size: 1.06rem;
}

.landing-footer-links ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.landing-footer-links a {
  color: #aebfba;
  font-weight: 800;
  text-decoration: none;
}

.landing-footer-links a:hover {
  color: #ffb45f;
}

.landing-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(215, 227, 222, 0.13);
  color: #8fa19c;
  font-size: 0.92rem;
}

.landing-footer-bottom p {
  margin: 0;
}

.landing-footer-bottom span {
  text-align: right;
}

.policy-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(28, 18, 43, 0.94), rgba(62, 36, 88, 0.82)),
    url("assets/images/china-planner-hero-bright-optimized.jpg") center / cover fixed;
  color: #eaf2ef;
}

.policy-shell {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 84px) 0;
}

.policy-card {
  position: relative;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(28, 18, 43, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.policy-back-link {
  position: absolute;
  top: 22px;
  right: 24px;
  color: #ffb45f;
  font-weight: 900;
  text-decoration: none;
}

.policy-back-link:hover,
.policy-card a:hover {
  color: #ffd39b;
}

.policy-card header {
  padding-right: 130px;
}

.policy-card h1 {
  margin-top: 10px;
  color: #ffb45f;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.policy-card header p {
  margin-top: 10px;
  color: #9fb4ae;
  font-weight: 800;
}

.policy-card section {
  margin-top: 30px;
}

.policy-card h2 {
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.policy-card p,
.policy-card li {
  color: #c7d6d1;
  line-height: 1.68;
}

.policy-card p {
  margin-top: 12px;
}

.policy-card ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 22px;
}

.policy-card strong,
.policy-card a {
  color: #ffb45f;
}

@media (max-width: 980px) {
  .travel-pro-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-planner-showcase {
    grid-template-columns: 1fr;
  }

  .showcase-image-wrap img {
    min-height: 360px;
  }

  .travel-pro-card img {
    height: clamp(260px, 38vw, 340px);
  }

  .landing-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .landing-footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .landing-page {
    width: min(100% - 24px, 1280px);
    padding-top: 10px;
  }

  .landing-nav {
    position: relative;
    top: auto;
    flex-wrap: wrap;
    align-items: center;
  }

  .landing-brand strong {
    max-width: 150px;
    white-space: normal;
  }

  .landing-nav-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .nav-text-link[href="#how-it-works"] {
    display: none;
  }

  .landing-hero {
    min-height: 590px;
    align-items: flex-end;
  }

  .landing-hero .landing-hero-image {
    object-position: 64% center;
  }

  .landing-hero::after {
    background:
      linear-gradient(180deg, rgba(43, 24, 66, 0.06), rgba(43, 24, 66, 0.76)),
      linear-gradient(90deg, rgba(43, 24, 66, 0.18), rgba(43, 24, 66, 0.18));
  }

  .landing-hero-copy {
    align-self: flex-end;
    padding: 28px;
  }

  .landing-hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .landing-hero-copy p {
    font-size: 1rem;
  }

  .travel-pro-section {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .travel-section-heading h2,
  .showcase-copy h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .travel-pro-card {
    min-height: 0;
  }

  .travel-pro-card img {
    height: clamp(230px, 64vw, 320px);
    min-height: 0;
  }

  .showcase-image-wrap img {
    min-height: 320px;
  }

  .landing-footer {
    padding: 26px 20px;
  }

  .landing-footer-grid,
  .landing-footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-footer-bottom span {
    text-align: left;
  }

  .policy-card {
    padding: 64px 22px 28px;
  }

  .policy-card header {
    padding-right: 0;
  }

  .policy-back-link {
    top: 20px;
    left: 22px;
    right: auto;
  }
}

/* Refined landing typography pass */
.landing-body {
  font-weight: 450;
}

.landing-brand strong {
  font-size: 0.98rem;
  font-weight: 720;
}

.landing-nav {
  padding: 9px 12px;
}

.account-link {
  min-height: 40px;
  padding-right: 13px;
  font-weight: 760;
}

.sign-in-link {
  padding: 10px 16px;
}

.account-avatar {
  font-weight: 760;
}

.account-menu {
  position: relative;
}

.avatar-menu-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 1px solid rgba(76, 45, 113, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(76, 45, 113, 0.1);
  cursor: pointer;
  list-style: none;
}

.avatar-menu-button::-webkit-details-marker {
  display: none;
}

.avatar-menu-button .account-avatar {
  width: 32px;
  height: 32px;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(61, 42, 82, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px rgba(44, 28, 64, 0.18);
}

.account-menu-email {
  min-width: 0;
  overflow: hidden;
  padding: 7px 10px 9px;
  border-bottom: 1px solid rgba(61, 42, 82, 0.1);
  color: rgba(42, 23, 61, 0.68);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-panel a,
.account-menu-panel button {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #2a173d;
  font: inherit;
  font-weight: 720;
  text-align: left;
  text-decoration: none;
}

.account-menu-panel a:hover,
.account-menu-panel button:hover {
  background: rgba(76, 45, 113, 0.1);
}

.app-account-menu .account-menu-panel {
  min-width: 220px;
}

.app-account-slot .sign-in-link {
  white-space: nowrap;
}

.landing-hero-copy {
  width: min(640px, 100%);
}

.landing-hero-copy .eyebrow,
.travel-section-heading .eyebrow,
.showcase-copy .eyebrow {
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.1em;
}

.landing-hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 5.9vw, 5.7rem);
  font-weight: 680;
  line-height: 1;
  text-wrap: balance;
}

.landing-hero-copy p {
  max-width: 50ch;
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
  font-weight: 520;
  line-height: 1.58;
}

.landing-body .primary-link,
.hero-text-link,
.booking-link {
  font-weight: 760;
}

.travel-section-heading {
  max-width: 780px;
}

.travel-section-heading h2,
.showcase-copy h2 {
  max-width: 13ch;
  font-size: clamp(2rem, 3.7vw, 4rem);
  font-weight: 680;
  line-height: 1.04;
  text-wrap: balance;
}

.travel-pro-copy strong,
.landing-footer-brand h3,
.policy-card h2 {
  font-weight: 700;
}

.travel-pro-copy p,
.showcase-copy p,
.landing-footer-about p,
.policy-card p,
.policy-card li {
  font-weight: 450;
}

@media (max-width: 700px) {
  .landing-hero-copy h1 {
    font-size: clamp(2.65rem, 12vw, 4.1rem);
  }

  .travel-section-heading h2,
  .showcase-copy h2 {
    font-size: clamp(1.9rem, 8.6vw, 3rem);
  }
}

/* Frosted planner refresh */
:root {
  --glass-surface: rgba(255, 255, 255, 0.62);
  --glass-surface-strong: rgba(255, 255, 255, 0.78);
  --glass-tint: rgba(248, 245, 252, 0.7);
  --glass-border: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(61, 42, 82, 0.14);
  --glass-shadow: 0 22px 54px rgba(44, 28, 64, 0.14), 0 8px 18px rgba(44, 28, 64, 0.08);
  --glass-shadow-hover: 0 30px 70px rgba(44, 28, 64, 0.2), 0 12px 28px rgba(44, 28, 64, 0.1);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body:not(.landing-body):not(.policy-body) {
  background:
    linear-gradient(135deg, rgba(238, 231, 248, 0.86), rgba(255, 247, 232, 0.72) 44%, rgba(245, 239, 250, 0.92)),
    linear-gradient(180deg, #fcfafd, #f7f2fb);
  background-attachment: fixed;
}

.app-shell {
  position: relative;
}

.app-header,
.login-card,
.mode-tabs,
.scenario-panel,
.practice-surface,
.progress-panel,
.conversation-card,
.tone-card,
.phrase-card,
.mic-card,
.offline-banner,
.home-hero,
.home-choice,
.mobile-status-card,
.mobile-pack-panel,
.admin-panel,
.admin-console-hero,
.admin-usage-panel,
.admin-log-row,
.sync-status-badge,
.trip-dashboard-hero,
.trip-create-panel,
.trip-list-panel,
.trip-card,
.empty-trip-card,
.plan-hero-panel,
.planner-action-card,
.share-panel,
.trip-map-panel,
.day-detail,
.detail-block,
.selected-hotel,
.hotel-pdf-input,
.day-trip-editor,
.day-trip-row,
.map-route-stop,
.timeline-day,
.stay-band,
.trip-stats div,
.selected-hotel-summary,
.selected-days-row {
  border-color: var(--glass-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.48)),
    var(--glass-tint);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: blur(18px) saturate(1.22);
  backdrop-filter: blur(18px) saturate(1.22);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.app-header {
  padding: 12px;
  border: 1px solid var(--glass-line);
}

.mode-tabs {
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.42)),
    rgba(242, 235, 249, 0.58);
}

.tab,
.primary-button,
.ghost-button,
.choice-button,
.icon-button,
.compact-button,
.danger-button,
.segmented-control,
.day-stepper,
.control-strip label,
.switch,
.voice-test-button,
.scenario-button,
.home-quick-grid button,
.hotel-input input,
.hotel-input textarea,
.trip-create-panel input,
.trip-create-panel select,
.trip-create-panel textarea,
.share-form input,
.share-form select,
.share-form textarea,
.trip-admin-selector select,
.member-access-form select,
.member-access-form textarea,
.traveller-note-form textarea,
.admin-email-form input,
.admin-plan-form textarea,
.map-zoom-controls button,
.ghost-link {
  border-color: var(--glass-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(44, 28, 64, 0.08), var(--glass-inset);
  -webkit-backdrop-filter: blur(12px) saturate(1.14);
  backdrop-filter: blur(12px) saturate(1.14);
}

.tab.is-active,
.primary-button,
.segmented-control button.is-active {
  border-color: rgba(76, 45, 113, 0.34);
  background: linear-gradient(135deg, #4c2d71, #8f63c9);
  color: #fff;
  box-shadow: 0 16px 34px rgba(76, 45, 113, 0.24);
}

.ghost-button,
.icon-button,
.compact-button,
.ghost-link {
  color: #2b2235;
}

.brand-mark,
.scenario-icon,
.booking-badge,
.score-ring {
  box-shadow: 0 12px 28px rgba(44, 28, 64, 0.14), var(--glass-inset);
}

.trip-card.is-selected,
.scenario-button.is-active,
.timeline-day.is-active,
.map-route-stop.is-active,
.selected-hotel.is-editing {
  border-color: rgba(232, 93, 79, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 245, 241, 0.56)),
    rgba(255, 255, 255, 0.64);
  box-shadow: 0 24px 58px rgba(232, 93, 79, 0.16), var(--glass-inset);
}

.day-detail,
.trip-map-panel,
.mobile-pack-panel,
.admin-panel,
.trip-dashboard-hero,
.plan-hero-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(248, 245, 252, 0.5)),
    rgba(255, 255, 255, 0.6);
}

.trip-dashboard-visual,
.showcase-image-wrap,
.map-frame {
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(44, 28, 64, 0.16);
}

.timeline-day,
.stay-band,
.map-route-stop,
.trip-card,
.planner-action-card,
.home-choice,
.scenario-button,
.choice-button,
.tone-card,
.phrase-card,
.mic-card,
.mobile-status-card,
.detail-block,
.day-trip-row,
.hotel-pdf-input,
.admin-email-row {
  transform: translateZ(0);
}

@media (hover: hover) and (pointer: fine) {
  .trip-card:hover,
  .planner-action-card:hover,
  .home-choice:hover,
  .scenario-button:hover,
  .choice-button:hover,
  .tone-card:hover,
  .phrase-card:hover,
  .mic-card:hover,
  .timeline-day:hover,
  .map-route-stop:hover,
  .mobile-status-card:hover,
  .detail-block:hover,
  .day-trip-row:hover,
  .hotel-pdf-input:hover,
  .admin-email-row:hover {
    transform: translateY(-3px);
    border-color: rgba(76, 45, 113, 0.22);
    box-shadow: var(--glass-shadow-hover), var(--glass-inset);
  }

  .scenario-panel:hover,
  .progress-panel:hover,
  .trip-create-panel:hover,
  .trip-list-panel:hover,
  .share-panel:hover,
  .trip-map-panel:hover,
  .day-detail:hover,
  .admin-panel:hover,
  .admin-console-hero:hover,
  .admin-usage-panel:hover,
  .mobile-pack-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow-hover), var(--glass-inset);
  }

  .tab:hover,
  .ghost-button:hover,
  .icon-button:hover,
  .compact-button:hover,
  .home-quick-grid button:hover,
  .map-zoom-controls button:hover,
  .ghost-link:hover {
    transform: translateY(-2px);
    border-color: rgba(76, 45, 113, 0.24);
    box-shadow: 0 14px 30px rgba(44, 28, 64, 0.13), var(--glass-inset);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-header,
  .scenario-panel,
  .practice-surface,
  .progress-panel,
  .conversation-card,
  .tone-card,
  .phrase-card,
  .mic-card,
  .offline-banner,
  .home-hero,
  .home-choice,
  .mobile-status-card,
  .mobile-pack-panel,
  .admin-panel,
  .trip-dashboard-hero,
  .trip-create-panel,
  .trip-list-panel,
  .trip-card,
  .empty-trip-card,
  .plan-hero-panel,
  .planner-action-card,
  .share-panel,
  .trip-map-panel,
  .day-detail,
  .detail-block,
  .selected-hotel,
  .hotel-pdf-input,
  .day-trip-editor,
  .day-trip-row,
  .map-route-stop,
  .timeline-day,
  .stay-band,
  .trip-stats div,
  .tab,
  .primary-button,
  .ghost-button,
  .choice-button,
  .icon-button {
    transition: none;
  }
}

/* Cohesive glass polish */
body:not(.landing-body):not(.policy-body) {
  background:
    linear-gradient(135deg, rgba(252, 250, 254, 0.66), rgba(255, 246, 232, 0.58) 42%, rgba(239, 232, 247, 0.72)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(248, 245, 252, 0.9)),
    url("assets/images/china-planner-hero-bright-optimized.jpg") center top / cover fixed no-repeat,
    #fbf8fd;
}

.landing-nav,
.travel-pro-card,
.showcase-image-wrap,
.planner-profile-grid span,
.account-menu-panel,
.policy-card,
.member-row,
.admin-email-row,
.quiz-strip,
.coach-note,
.feedback,
.transcript,
.phrase-filter,
.map-scale-note {
  border-color: var(--glass-line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)),
    rgba(248, 245, 252, 0.6);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  backdrop-filter: blur(16px) saturate(1.18);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.landing-nav {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.52)),
    rgba(249, 245, 252, 0.64);
}

.travel-pro-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.72);
}

.travel-pro-card img,
.showcase-image-wrap img,
.trip-dashboard-visual {
  transform: translateZ(0);
  transition: transform 260ms ease, filter 260ms ease;
}

.landing-footer {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(28, 18, 43, 0.94), rgba(62, 36, 88, 0.8)),
    rgba(28, 18, 43, 0.86);
  box-shadow: 0 30px 74px rgba(35, 23, 50, 0.25), var(--glass-inset);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  backdrop-filter: blur(18px) saturate(1.16);
}

.policy-card {
  background:
    linear-gradient(145deg, rgba(28, 18, 43, 0.82), rgba(76, 45, 113, 0.62)),
    rgba(28, 18, 43, 0.74);
}

.trip-card-meta span,
.plan-stat-grid span,
.streak-line,
.stamp,
.selected-hotel-summary,
.selected-days-row,
.hotel-input,
.hotel-pdf-link,
.day-stepper,
.map-scale-note,
.mobile-pack-note,
.empty-state {
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 20px rgba(44, 28, 64, 0.07), var(--glass-inset);
  -webkit-backdrop-filter: blur(10px) saturate(1.12);
  backdrop-filter: blur(10px) saturate(1.12);
}

.planner-profile-grid span {
  padding: 14px 14px 14px 18px;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
}

.planner-profile-grid span:nth-child(2) {
  border-left-color: #9b72d4;
}

.planner-profile-grid span:nth-child(3) {
  border-left-color: var(--coral);
}

.hotel-input {
  padding: 10px;
  border-radius: 8px;
}

.mobile-pack-note,
.empty-state {
  padding: 11px 12px;
  border-radius: 8px;
}

.member-row,
.admin-email-row,
.quiz-strip,
.coach-note,
.feedback,
.transcript {
  border-radius: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .travel-pro-card:hover,
  .planner-profile-grid span:hover,
  .member-row:hover,
  .quiz-strip:hover,
  .coach-note:hover,
  .phrase-filter:hover {
    transform: translateY(-3px);
    border-color: rgba(76, 45, 113, 0.22);
    box-shadow: var(--glass-shadow-hover), var(--glass-inset);
  }

  .travel-pro-card:hover img,
  .showcase-image-wrap:hover img,
  .trip-dashboard-visual:hover {
    transform: scale(1.025);
    filter: saturate(1.08) contrast(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-nav,
  .travel-pro-card,
  .showcase-image-wrap,
  .planner-profile-grid span,
  .account-menu-panel,
  .policy-card,
  .member-row,
  .admin-email-row,
  .quiz-strip,
  .coach-note,
  .feedback,
  .transcript,
  .phrase-filter,
  .map-scale-note,
  .travel-pro-card img,
  .showcase-image-wrap img,
  .trip-dashboard-visual {
    transition: none;
  }
}

/* Persistent top navigation */
.auth-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(252, 250, 254, 0.72), rgba(255, 246, 232, 0.62) 42%, rgba(239, 232, 247, 0.76)),
    url("assets/images/china-planner-hero-bright-optimized.jpg") center top / cover fixed no-repeat,
    #fbf8fd;
}

.auth-page-shell {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 14px 0 42px;
}

.auth-body .login-shell {
  min-height: calc(100vh - 118px);
  padding: clamp(24px, 6vw, 72px) 0;
}

.app-header,
.landing-nav,
.page-top-nav {
  position: sticky;
  top: 10px;
  z-index: 50;
}

.app-header {
  top: 12px;
}

.page-top-nav {
  margin-bottom: 16px;
}

.policy-shell {
  width: min(1280px, calc(100% - 32px));
}

.policy-card {
  width: min(900px, 100%);
  margin: 16px auto 0;
}

@media (max-width: 760px) {
  .landing-nav,
  .page-top-nav {
    flex-direction: row;
    align-items: center;
  }

  .landing-brand {
    flex-direction: row;
    align-items: center;
  }

  .app-header,
  .landing-nav,
  .page-top-nav {
    top: 8px;
  }

  .auth-page-shell {
    width: min(100% - 24px, 1280px);
    padding-top: 10px;
  }
}

@media (max-width: 520px) {
  .landing-brand strong {
    max-width: 138px;
    white-space: normal;
  }
}

/* Planning brief */
.planning-brief-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 0%, rgba(143, 99, 201, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(248, 245, 252, 0.58)),
    rgba(255, 255, 255, 0.68);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

.planning-brief-panel .section-head {
  align-items: start;
}

.planning-brief-panel .section-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(76, 45, 113, 0.22);
  border-radius: 999px;
  background: rgba(76, 45, 113, 0.1);
  color: var(--jade-dark);
  font-size: 0.9rem;
  font-weight: 850;
  white-space: nowrap;
}

.planning-brief-panel .eyebrow {
  color: var(--plum);
}

.planning-brief-intro {
  max-width: 82ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.planning-brief-form {
  display: grid;
  gap: 18px;
}

.planning-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.planning-brief-field {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  min-height: 158px;
  padding: 13px;
  border: 1px solid rgba(76, 45, 113, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5)),
    rgba(238, 231, 248, 0.26);
  box-shadow: 0 10px 26px rgba(44, 28, 64, 0.07), var(--glass-inset);
}

.planning-brief-field span {
  color: var(--jade-dark);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.25;
}

.planning-brief-field--select {
  min-height: 118px;
}

.planning-brief-grid select,
.planning-brief-grid textarea {
  width: 100%;
  max-width: none;
  border: 1px solid rgba(76, 45, 113, 0.18);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(44, 28, 64, 0.06), var(--glass-inset);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(12px) saturate(1.14);
  backdrop-filter: blur(12px) saturate(1.14);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.planning-brief-grid select {
  min-height: 48px;
  padding: 11px 42px 11px 13px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--plum) 50%),
    linear-gradient(135deg, var(--plum) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 21px,
    calc(100% - 14px) 21px;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

.planning-brief-grid textarea {
  min-height: 112px;
  padding: 12px 13px;
  line-height: 1.45;
  resize: vertical;
}

.planning-brief-grid select:focus,
.planning-brief-grid textarea:focus {
  border-color: rgba(76, 45, 113, 0.54);
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(143, 99, 201, 0.14),
    0 12px 24px rgba(44, 28, 64, 0.1),
    var(--glass-inset);
  outline: 0;
}

.planning-brief-grid textarea::placeholder {
  color: rgba(43, 34, 53, 0.46);
  font-weight: 650;
}

.planning-brief-actions {
  padding-top: 2px;
}

.planning-brief-actions .primary-button,
.planning-brief-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-spinner,
.ai-generation-spinner {
  display: inline-block;
  border-radius: 50%;
  border: 2px solid rgba(76, 45, 113, 0.22);
  border-top-color: var(--plum);
  animation: ai-spin 800ms linear infinite;
}

.button-spinner {
  width: 15px;
  height: 15px;
  border-color: rgba(76, 45, 113, 0.18);
  border-top-color: currentColor;
}

.ai-generation-status {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(76, 45, 113, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(76, 45, 113, 0.12), rgba(143, 99, 201, 0.08)),
    rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 30px rgba(44, 28, 64, 0.1), var(--glass-inset);
}

.ai-generation-spinner {
  width: 30px;
  height: 30px;
  margin-top: 2px;
}

.ai-generation-status strong {
  display: block;
  color: var(--jade-dark);
  font-size: 0.98rem;
  font-weight: 900;
}

.ai-generation-status p {
  margin: 4px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.ai-generation-meter {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(76, 45, 113, 0.12);
}

.ai-generation-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4c2d71, #8f63c9);
  animation: ai-meter 1500ms ease-in-out infinite;
}

@keyframes ai-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ai-meter {
  0% {
    transform: translateX(-105%);
  }

  50% {
    transform: translateX(82%);
  }

  100% {
    transform: translateX(245%);
  }
}

@media (hover: hover) and (pointer: fine) {
  .planning-brief-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow-hover), var(--glass-inset);
  }

  .planning-brief-field:hover {
    border-color: rgba(76, 45, 113, 0.28);
    box-shadow: 0 14px 30px rgba(44, 28, 64, 0.1), var(--glass-inset);
  }
}

@media (max-width: 760px) {
  .planning-brief-panel {
    padding: 16px;
  }

  .planning-brief-panel .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .planning-brief-panel .section-head strong {
    width: fit-content;
  }

  .planning-brief-grid {
    grid-template-columns: 1fr;
  }

  .planning-brief-field,
  .planning-brief-field--select {
    min-height: auto;
  }

  .planning-brief-grid textarea {
    min-height: 144px;
  }
}
