:root {
        --paper: #eee5d6;
        --paper-soft: #f8f3ea;
        --paper-deep: #ded0bb;
        --ink: #27211b;
        --muted: #766d62;
        --faint: #a99a86;
        --line: rgba(91, 70, 46, 0.2);
        --line-strong: rgba(91, 70, 46, 0.36);
        --cinnabar: #9d463d;
        --moss: #657561;
        --tea: #9a815d;
        --shadow: rgba(69, 51, 31, 0.16);
      }

      * {
        box-sizing: border-box;
      }

      html {
        background: #d8cbb8;
      }

      body {
        margin: 0;
        min-height: 100vh;
        color: var(--ink);
        font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
        background:
          radial-gradient(circle at 20% 0%, rgba(255, 252, 243, 0.82), transparent 32%),
          linear-gradient(135deg, rgba(101, 117, 97, 0.12), transparent 38%),
          #d8cbb8;
      }

      button,
      textarea {
        font: inherit;
      }

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

      .app {
        position: relative;
        max-width: 480px;
        min-height: 100vh;
        margin: 0 auto;
        background:
          linear-gradient(rgba(114, 91, 62, 0.035) 1px, transparent 1px),
          linear-gradient(90deg, rgba(114, 91, 62, 0.025) 1px, transparent 1px),
          var(--paper);
        background-size: 30px 30px;
        box-shadow: 0 0 48px rgba(42, 31, 20, 0.24);
        overflow: hidden;
      }

      .app::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: 0.42;
        background:
          radial-gradient(circle at 12% 18%, rgba(80, 58, 35, 0.08) 0 1px, transparent 2px),
          radial-gradient(circle at 74% 32%, rgba(80, 58, 35, 0.07) 0 1px, transparent 2px),
          radial-gradient(circle at 42% 76%, rgba(80, 58, 35, 0.06) 0 1px, transparent 2px);
        background-size: 36px 44px, 50px 64px, 42px 54px;
        mix-blend-mode: multiply;
      }

      .content {
        position: relative;
        z-index: 1;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 76px;
      }

      .view {
        display: none;
      }

      .view.active {
        display: block;
      }

#viewEnter.active {
  display: flex;
  flex-direction: column;
}

.home-card {
  order: 0;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 14px;
  margin: 16px 20px 0;
  padding: 14px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(235, 225, 210, 0.72)),
    var(--paper-soft);
  box-shadow: 0 14px 32px var(--shadow);
}

.home-art {
  min-height: 150px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 27%, rgba(39, 33, 27, 0.88) 0 27px, transparent 28px),
    linear-gradient(145deg, rgba(101, 117, 97, 0.28), rgba(154, 129, 93, 0.14)),
    var(--paper-deep);
  position: relative;
  overflow: hidden;
}

.home-art::before {
  content: "";
  position: absolute;
  left: 31px;
  right: 31px;
  bottom: -12px;
  height: 80px;
  background: rgba(39, 33, 27, 0.72);
  border-radius: 50% 50% 0 0;
}

.home-kicker {
  margin: 0 0 5px;
  color: var(--cinnabar);
  font-size: 12px;
  font-weight: 700;
}

.home-copy h2 {
  margin: 0 0 5px;
  font-size: 25px;
}

.home-copy p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 68px;
  gap: 8px;
  margin-top: 12px;
}

.home-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.74);
  color: var(--ink);
  cursor: pointer;
}

.home-actions button:first-child {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-soft);
}

      .hero {
        padding: 22px 20px 14px;
        border-bottom: 1px solid var(--line);
      }

      .kicker {
        margin: 0 0 6px;
        color: var(--cinnabar);
        font-size: 12px;
        letter-spacing: 0;
      }

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

      h1 {
        margin: 0;
        font-size: 36px;
        line-height: 1.05;
        font-weight: 800;
      }

      .subtitle {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.7;
      }

      .seal {
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        flex: 0 0 auto;
        border: 2px solid var(--cinnabar);
        color: var(--cinnabar);
        font-size: 23px;
        font-weight: 800;
      }

      .rank-card {
        margin-top: 18px;
        padding: 14px;
        border: 1px solid var(--line-strong);
        background: rgba(248, 243, 234, 0.7);
      }

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

      .rank-name {
        font-size: 22px;
        font-weight: 800;
      }

      .score-pill {
        padding: 6px 10px;
        border: 1px solid rgba(157, 70, 61, 0.28);
        color: var(--cinnabar);
        background: rgba(157, 70, 61, 0.06);
        font-size: 13px;
      }

      .progress {
        height: 8px;
        margin-top: 12px;
        background: rgba(87, 68, 45, 0.12);
        overflow: hidden;
      }

      .bar {
        height: 100%;
        width: 0;
        background: linear-gradient(90deg, var(--moss), var(--tea));
        transition: width 350ms ease;
      }

      .next-rank {
        margin: 9px 0 0;
        color: var(--muted);
        font-size: 12px;
      }

      .dev-key {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 68px;
        gap: 8px;
        margin-top: 12px;
      }

      .dev-key input {
        min-width: 0;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        color: var(--ink);
        padding: 9px 10px;
        outline: none;
        font: inherit;
        font-size: 12px;
      }

      .dev-key button {
        border: 1px solid rgba(157, 70, 61, 0.3);
        background: rgba(157, 70, 61, 0.08);
        color: var(--cinnabar);
        cursor: pointer;
        font-size: 12px;
      }

      .dev-status {
        grid-column: 1 / -1;
        margin: -2px 0 0;
        color: var(--muted);
        font-size: 11px;
      }

      .mode-note {
        margin-top: 10px;
        padding: 8px 10px;
        border: 1px solid rgba(101, 117, 97, 0.22);
        background: rgba(101, 117, 97, 0.07);
        color: var(--moss);
        font-size: 12px;
        line-height: 1.5;
      }

      .section {
        padding: 16px 20px 0;
      }

      .selector-section {
        order: 2;
      }

      .selector-section.compact {
        display: none;
      }

      .section-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin-bottom: 10px;
      }

      .section h2 {
        margin: 0;
        font-size: 17px;
      }

      .hint {
        color: var(--muted);
        font-size: 12px;
      }

      .npc-list,
      .scene-list,
      .trial-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
      }

      .npc-list::-webkit-scrollbar,
      .scene-list::-webkit-scrollbar,
      .trial-list::-webkit-scrollbar {
        display: none;
      }

      .npc,
      .scene,
      .trial {
        border: 1px solid var(--line);
        background: rgba(248, 243, 234, 0.72);
        color: var(--ink);
        cursor: pointer;
        box-shadow: 0 8px 18px rgba(62, 45, 28, 0.05);
      }

      .npc {
        width: 118px;
        flex: 0 0 118px;
        padding: 10px;
        text-align: left;
      }

      .npc.active,
      .scene.active,
      .trial.active {
        border-color: rgba(157, 70, 61, 0.55);
        box-shadow: inset 0 0 0 1px rgba(157, 70, 61, 0.22), 0 10px 24px rgba(62, 45, 28, 0.08);
      }

      .portrait {
        position: relative;
        height: 88px;
        margin-bottom: 9px;
        background:
          radial-gradient(circle at 50% 27%, rgba(39, 33, 27, 0.88) 0 18px, transparent 19px),
          linear-gradient(145deg, rgba(101, 117, 97, 0.32), rgba(154, 129, 93, 0.15)),
          var(--paper-deep);
        overflow: hidden;
      }

      .portrait::before {
        content: "";
        position: absolute;
        left: 29px;
        right: 29px;
        bottom: -12px;
        height: 54px;
        background: rgba(39, 33, 27, 0.72);
        border-radius: 50% 50% 0 0;
      }

      .portrait::after {
        content: "";
        position: absolute;
        inset: 8px;
        border: 1px solid rgba(255, 250, 240, 0.36);
      }

      .npc strong,
      .scene strong {
        display: block;
        font-size: 15px;
      }

      .npc span,
      .scene span {
        display: block;
        margin-top: 4px;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.45;
      }

      .scene {
        width: 132px;
        min-height: 78px;
        flex: 0 0 132px;
        padding: 12px;
        text-align: left;
        position: relative;
      }

      .trial {
        width: 142px;
        min-height: 88px;
        flex: 0 0 142px;
        padding: 12px;
        text-align: left;
        position: relative;
      }

      .trial em {
        display: inline-block;
        margin-bottom: 7px;
        color: var(--cinnabar);
        font-style: normal;
        font-size: 12px;
      }

      .scene.locked,
      .trial.locked {
        opacity: 0.58;
      }

      .lock {
        position: absolute;
        top: 9px;
        right: 10px;
        color: var(--cinnabar);
        font-size: 12px;
      }

.stage {
  order: 1;
        margin: 12px 20px 0;
        border: 1px solid var(--line-strong);
        background:
          linear-gradient(180deg, rgba(255, 252, 244, 0.78), rgba(235, 225, 210, 0.72)),
          var(--paper-soft);
        box-shadow: 0 14px 32px var(--shadow);
      }

      .stage::before {
        content: "修习中";
        display: block;
        padding: 10px 14px 0;
        color: var(--cinnabar);
        font-size: 12px;
        font-weight: 700;
      }

.stage {
  position: relative;
}

.stage.compact {
  display: none;
}

#viewEnter.dialogue-mode .home-card {
  display: none;
}

.content.in-dialogue .hero {
  display: none;
}

.dialogue-nav {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px 0;
}

.dialogue-nav strong {
  display: block;
  font-size: 18px;
}

.dialogue-nav span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.back-home {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.72);
  color: var(--muted);
  cursor: pointer;
  min-height: 34px;
  padding: 0;
  font-size: 12px;
}

.stage::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(157, 70, 61, 0.18);
  opacity: 0.45;
  pointer-events: none;
}

      .stage-head {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 15px;
        padding: 14px 14px 16px;
        border-bottom: 1px solid var(--line);
      }

      .switcher {
        display: flex;
        gap: 8px;
        padding: 0 14px 12px;
        border-bottom: 1px solid var(--line);
      }

      .switcher button {
        flex: 1;
        min-height: 36px;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        color: var(--muted);
        cursor: pointer;
        font-size: 12px;
      }

      .stage-portrait {
        height: 118px;
        background:
          radial-gradient(circle at 50% 25%, rgba(39, 33, 27, 0.88) 0 24px, transparent 25px),
          linear-gradient(145deg, rgba(157, 70, 61, 0.18), rgba(101, 117, 97, 0.22)),
          var(--paper-deep);
        position: relative;
      }

      .stage-portrait::before {
        content: "";
        position: absolute;
        left: 17px;
        right: 17px;
        bottom: -9px;
        height: 68px;
        background: rgba(39, 33, 27, 0.73);
        border-radius: 50% 50% 0 0;
      }

      .stage-meta h2 {
        margin: 0 0 6px;
        font-size: 24px;
      }

      .stage-meta p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.62;
      }

      .continue-chip {
        display: inline-block;
        margin-top: 10px;
        padding: 6px 10px;
        border: 1px solid rgba(157, 70, 61, 0.28);
        color: var(--cinnabar);
        background: rgba(157, 70, 61, 0.06);
        font-size: 12px;
      }

.objective {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: center;
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
        background: rgba(222, 208, 187, 0.22);
      }

.objective {
  background: rgba(101, 117, 97, 0.08);
}

      .objective p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.55;
      }

      .round {
        color: var(--cinnabar);
        font-weight: 700;
        font-size: 13px;
      }

      .reset-quest {
        margin-top: 6px;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        color: var(--muted);
        cursor: pointer;
        font-size: 12px;
      }

.quest {
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
        background: rgba(101, 117, 97, 0.08);
      }

.quest {
  background:
    linear-gradient(90deg, rgba(157, 70, 61, 0.06), transparent 70%),
    rgba(255, 252, 244, 0.48);
}

.quest.pulse {
  animation: pulseQuest 900ms ease;
}

@keyframes pulseQuest {
  0% { box-shadow: inset 0 0 0 0 rgba(157, 70, 61, 0); }
  40% { box-shadow: inset 0 0 0 2px rgba(157, 70, 61, 0.28); }
  100% { box-shadow: inset 0 0 0 0 rgba(157, 70, 61, 0); }
}

      .quest-top {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 7px;
        color: var(--moss);
        font-size: 12px;
        font-weight: 700;
      }

      .quest h3 {
        margin: 0 0 6px;
        font-size: 16px;
      }

      .quest p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.55;
      }

.dialogue {
  height: 318px;
        overflow-y: auto;
        padding: 14px;
        display: flex;
        flex-direction: column;
  gap: 10px;
}

.dialogue.compact-log {
  height: 120px;
  mask-image: linear-gradient(180deg, black 68%, transparent);
}

.dialogue-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.dialogue-tools button {
  border: 1px solid var(--line);
  background: rgba(255, 252, 244, 0.72);
  color: var(--muted);
  cursor: pointer;
  padding: 5px 9px;
  font-size: 12px;
}

      .bubble {
        max-width: 92%;
        padding: 11px 12px;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.82);
        line-height: 1.65;
        font-size: 14px;
        white-space: pre-wrap;
      }

      .bubble.user {
        align-self: flex-end;
        background: rgba(101, 117, 97, 0.1);
      }

      .bubble.npc {
        align-self: flex-start;
      }

      .bubble.system {
        max-width: 100%;
        border-color: rgba(157, 70, 61, 0.22);
        color: var(--muted);
        background: rgba(157, 70, 61, 0.055);
        font-size: 13px;
      }

      .correction {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
        color: var(--muted);
        font-size: 13px;
      }

      .correction-grid {
        display: grid;
        gap: 7px;
      }

      .correction-grid div {
        padding: 7px 8px;
        background: rgba(255, 252, 244, 0.58);
        border: 1px solid rgba(91, 70, 46, 0.13);
      }

      .correction-grid b {
        display: block;
        margin-bottom: 3px;
        color: var(--cinnabar);
        font-weight: 700;
      }

      .quick {
        display: flex;
        gap: 8px;
        padding: 0 14px 12px;
        overflow-x: auto;
        scrollbar-width: none;
      }

      .quick::-webkit-scrollbar {
        display: none;
      }

      .quick button {
        flex: 0 0 auto;
        min-height: 34px;
        border: 1px solid var(--line);
        background: rgba(248, 243, 234, 0.9);
        color: var(--ink);
        padding: 0 10px;
        cursor: pointer;
        font-size: 13px;
      }

      .cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 14px 12px;
      }

      .word-card {
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        padding: 10px 12px;
      }

      .word-card strong {
        display: inline;
        margin-right: 8px;
        color: var(--ink);
        font-size: 15px;
      }

      .word-card span {
        display: inline;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.45;
      }

      .score-sheet {
        margin-top: 8px;
        display: grid;
        gap: 8px;
      }

      .score-row {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) 38px;
        align-items: center;
        gap: 8px;
        font-size: 12px;
      }

      .score-track {
        height: 7px;
        background: rgba(87, 68, 45, 0.12);
      }

      .score-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--moss), var(--tea));
      }

      .lexicon {
        padding: 16px 20px 24px;
      }

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

      .lexicon-head h2 {
        margin: 0;
        font-size: 23px;
      }

      .lexicon-head p {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 13px;
      }

.clear-words {
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        color: var(--muted);
        cursor: pointer;
        padding: 7px 10px;
        font-size: 12px;
      }

      .profile-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 72px;
        gap: 8px;
        margin-top: 10px;
      }

      .profile-form input {
        min-width: 0;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        color: var(--ink);
        padding: 9px 10px;
        outline: none;
        font: inherit;
        font-size: 13px;
      }

      .profile-form button {
        border: 1px solid rgba(157, 70, 61, 0.28);
        background: rgba(157, 70, 61, 0.06);
        color: var(--cinnabar);
        cursor: pointer;
        font-size: 13px;
      }

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

      .lexicon-card {
        border: 1px solid var(--line-strong);
        background: rgba(248, 243, 234, 0.78);
        padding: 13px;
      }

      .lexicon-card strong {
        display: block;
        margin-bottom: 6px;
        font-size: 20px;
      }

      .lexicon-card p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.6;
      }

      .lexicon-card small {
        display: inline-block;
        margin-top: 9px;
        color: var(--cinnabar);
        font-size: 12px;
      }

      .practice-word {
        margin-top: 10px;
        border: 1px solid rgba(157, 70, 61, 0.28);
        background: rgba(157, 70, 61, 0.06);
        color: var(--cinnabar);
        cursor: pointer;
        padding: 7px 10px;
        font-size: 12px;
      }

      .speak-again {
        margin-top: 9px;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.72);
        color: var(--muted);
        cursor: pointer;
        padding: 6px 9px;
        font-size: 12px;
      }

      .empty {
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.62);
        color: var(--muted);
        padding: 18px;
        line-height: 1.7;
        font-size: 14px;
      }

      .activity-grid {
        display: grid;
        gap: 10px;
      }

      .activity-card {
        border: 1px solid var(--line-strong);
        background: rgba(248, 243, 234, 0.78);
        color: var(--ink);
        cursor: pointer;
        padding: 14px;
        text-align: left;
      }

      .activity-card.locked {
        opacity: 0.58;
      }

      .activity-card em {
        display: inline-block;
        margin-bottom: 7px;
        color: var(--cinnabar);
        font-style: normal;
        font-size: 12px;
      }

      .activity-card strong {
        display: block;
        margin-bottom: 6px;
        font-size: 19px;
      }

      .activity-card span {
        display: block;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.55;
      }

      .bottom-nav {
        position: fixed;
        left: 50%;
        bottom: 0;
        z-index: 4;
        width: min(480px, 100vw);
        transform: translateX(-50%);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        border-top: 1px solid var(--line-strong);
        background: rgba(238, 229, 214, 0.94);
        backdrop-filter: blur(14px);
        box-shadow: 0 -12px 30px rgba(47, 35, 22, 0.12);
      }

      .nav-btn {
        min-height: 62px;
        border: 0;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        font-size: 12px;
      }

      .nav-btn strong {
        display: block;
        margin-bottom: 4px;
        color: inherit;
        font-size: 18px;
        line-height: 1;
      }

      .nav-btn.active {
        color: var(--cinnabar);
        background: rgba(157, 70, 61, 0.06);
      }

      .call-panel {
        padding: 16px 20px 24px;
      }

      .call-card {
        min-height: calc(100vh - 210px);
        border: 1px solid var(--line-strong);
        background:
          radial-gradient(circle at 50% 16%, rgba(255, 252, 244, 0.8), transparent 30%),
          rgba(248, 243, 234, 0.78);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 22px 16px;
      }

      .call-card.offline {
        opacity: 0.82;
      }

      .call-avatar {
        width: 132px;
        height: 132px;
        margin: 8px auto 14px;
        border: 1px solid var(--line-strong);
        background:
          radial-gradient(circle at 50% 27%, rgba(39, 33, 27, 0.88) 0 28px, transparent 29px),
          linear-gradient(145deg, rgba(101, 117, 97, 0.32), rgba(154, 129, 93, 0.15)),
          var(--paper-deep);
        position: relative;
        overflow: hidden;
      }

      .call-avatar::before {
        content: "";
        position: absolute;
        left: 34px;
        right: 34px;
        bottom: -10px;
        height: 78px;
        background: rgba(39, 33, 27, 0.72);
        border-radius: 50% 50% 0 0;
      }

      .call-card h2 {
        margin: 0 0 5px;
        font-size: 24px;
      }

      .call-card p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.6;
      }

      .call-status {
        margin: 16px 0;
        padding: 8px 12px;
        border: 1px solid rgba(101, 117, 97, 0.25);
        color: var(--moss);
        background: rgba(101, 117, 97, 0.08);
        font-size: 13px;
      }

      .call-orb {
        width: 96px;
        height: 96px;
        margin: 8px auto 14px;
        border: 1px solid rgba(157, 70, 61, 0.35);
        border-radius: 50%;
        background: var(--cinnabar);
        color: var(--paper-soft);
        cursor: pointer;
        box-shadow: 0 12px 28px rgba(157, 70, 61, 0.24);
        font-size: 15px;
        font-weight: 800;
      }

      .call-orb.listening {
        background: var(--moss);
        border-color: rgba(101, 117, 97, 0.45);
      }

      .call-orb.offline {
        background: var(--ink);
      }

      .call-input {
        width: 100%;
        min-height: 82px;
        margin-top: auto;
      }

      .call-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 9px;
        width: 100%;
        margin-top: 10px;
      }

      .call-actions button {
        min-height: 44px;
        border: 1px solid var(--line);
        background: rgba(255, 252, 244, 0.78);
        color: var(--ink);
        cursor: pointer;
      }

      .call-actions .primary {
        background: var(--ink);
        color: var(--paper-soft);
      }

      .call-log {
        width: 100%;
        max-height: 240px;
        overflow-y: auto;
        margin-top: 14px;
        text-align: left;
      }

      .call-log.collapsed {
        display: none;
      }

.composer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 72px;
        gap: 8px;
        padding: 12px 14px 14px;
        border-top: 1px solid var(--line);
      }

.composer {
  position: sticky;
  bottom: 62px;
  background: rgba(238, 229, 214, 0.92);
  backdrop-filter: blur(10px);
}

.danger-button {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(157, 70, 61, 0.34);
  background: rgba(157, 70, 61, 0.08);
  color: var(--cinnabar);
  cursor: pointer;
  padding: 9px 10px;
  font-size: 13px;
}

      textarea {
        width: 100%;
        min-height: 62px;
        resize: none;
        border: 1px solid var(--line-strong);
        background: rgba(255, 252, 244, 0.92);
        color: var(--ink);
        padding: 10px;
        line-height: 1.55;
        outline: none;
      }

      .send {
        border: 0;
        background: var(--ink);
        color: var(--paper-soft);
        cursor: pointer;
        font-weight: 700;
      }

      .toast {
        position: fixed;
        left: 50%;
        bottom: 18px;
        width: min(420px, calc(100vw - 36px));
        transform: translateX(-50%) translateY(16px);
        padding: 11px 14px;
        border: 1px solid rgba(157, 70, 61, 0.3);
        background: rgba(248, 243, 234, 0.96);
        color: var(--ink);
        box-shadow: 0 14px 36px rgba(47, 35, 22, 0.2);
        opacity: 0;
        pointer-events: none;
        transition: 240ms ease;
        z-index: 5;
        font-size: 14px;
      }

      .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }

      @media (max-width: 420px) {
        .hero,
        .section {
          padding-left: 16px;
          padding-right: 16px;
        }

        .stage {
          margin-left: 16px;
          margin-right: 16px;
        }

        h1 {
          font-size: 32px;
        }
      }
