.echo-play {
  --hud:#fffdf8f2;
  --button-alpha:74%;
  --hud-button:color-mix(in srgb,var(--panel) var(--button-alpha),transparent);
  --panel:#fffdf8;
  --paper:#28374c;
  --quiet:#53647c;
  --rule:#c6d2df;
  --gold:#a74352;
  --blue:#315e9b;
  --margin:clamp(14px,2vw,32px);
}

.echo-play button:focus-visible,.echo-play a:focus-visible {outline-color:var(--blue)}
.echo-top,.echo-mission,.echo-minimap,.echo-prompt,.echo-dock,.echo-drive,.echo-control-tip {position:fixed;z-index:3}
.echo-top {inset:var(--margin) var(--margin) auto;display:grid;grid-template-columns:1fr auto 1fr;align-items:start;pointer-events:none}
.echo-mark,.echo-calendar,.echo-compass {
  min-height:48px;display:flex;align-items:center;gap:12px;color:var(--paper);
  background:var(--hud);border:1px solid var(--rule);border-radius:12px;
}
.echo-mark {justify-self:start;padding:8px 16px 8px 10px}
.echo-mark strong,.echo-mark small {display:block;line-height:1.22}
.echo-mark strong {font:800 1.22rem/1.2 var(--display);letter-spacing:.03em}
.echo-mark small {color:var(--quiet);font-size:.72rem;margin-top:4px}
.echo-compass {padding:0 14px;min-height:36px;color:var(--paper);gap:24px;font-size:.78rem;font-variant-numeric:tabular-nums}
.echo-compass span {color:var(--quiet)}
.echo-top-actions {justify-self:end;display:flex;gap:8px;align-items:center}
.echo-calendar {padding:6px 14px;gap:10px;font:inherit;pointer-events:auto;cursor:pointer}
.echo-calendar svg {width:18px;color:var(--gold)}
.echo-calendar small:not([hidden]) {display:block;font-size:.67rem;color:var(--quiet);line-height:1.1}
.echo-calendar strong {display:flex;gap:8px;align-items:center;font-size:.91rem;font-variant-numeric:tabular-nums}
#echo-season {font-size:.73rem;font-weight:500;color:var(--gold)}
.echo-icon-button,.echo-dock button,.echo-prompt button,.echo-drive button,#echo-task-action {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;color:var(--paper);
  background:var(--hud);border:1px solid var(--rule);border-radius:10px;box-shadow:0 2px 0 #8098b333;
  min-height:40px;padding:6px 10px;pointer-events:auto;
}
.echo-icon-button {width:46px;min-height:46px}
.echo-play:not(.touch-campus) #echo-mobile-menu,#echo-share {width:auto;min-width:46px;white-space:nowrap}
.echo-top-actions button:hover,.echo-dock button:hover,.echo-prompt button:hover,.echo-drive button:hover,#echo-task-action:hover {border-color:var(--gold);color:var(--gold);background:#fbe4e6}
.echo-top svg,.echo-dock svg,.echo-dialog button svg,.echo-tracker-head svg,.echo-speaker-mark svg {width:18px;height:18px;flex:none}
.echo-play kbd {
  min-width:22px;padding:3px 4px;text-align:center;color:var(--paper);background:#e9f1f8;
  border:1px solid #bdcbdc;border-radius:3px;white-space:nowrap
}
.echo-mission {
  left:var(--margin);top:calc(var(--margin) + 68px);width:min(310px,calc(100% - 32px));
  background:var(--hud);border:1px solid var(--rule);border-radius:13px;padding:12px 14px;box-shadow:0 3px 0 #8098b348;
}
.echo-tracker-head {display:flex;align-items:center;gap:7px;color:var(--gold);font-weight:700;font-size:.7rem;letter-spacing:.12em}
.echo-tracker-head svg {width:15px;height:15px}
.echo-mission h2 {font:800 1.27rem/1.22 var(--display);margin:8px 0 4px}
.echo-mission p {font-size:.83rem;margin:4px 0 8px;color:var(--quiet);line-height:1.55}
#echo-task-jump {
  display:block;width:max-content;min-height:24px;padding:2px 0;border:0;
  background:transparent;color:var(--blue);font-size:.72rem;font-weight:650;
  text-decoration:underline;text-underline-offset:2px;pointer-events:auto;
}
#echo-task-action {min-height:32px;font-size:.73rem;padding:3px 7px;background:transparent}
.echo-progress {display:flex;justify-content:space-between;gap:8px;color:var(--quiet);font-size:.73rem;font-variant-numeric:tabular-nums;margin-top:6px}
.echo-aim {position:fixed;z-index:2;top:50%;left:50%;width:4px;height:4px;transform:translate(-50%,-50%);border-radius:50%;background:#fffbefb8;box-shadow:0 0 0 1px #161b23;pointer-events:none}
.echo-prompt {left:50%;bottom:clamp(92px,14vh,152px);transform:translateX(-50%);display:flex;gap:6px;width:max-content;max-width:calc(100vw - 24px)}
.echo-prompt button {min-height:42px;font-size:.88rem;box-shadow:0 4px 15px #333f5828}
#echo-interact {border-color:#ca8e96;font-weight:750;padding-right:16px}
#echo-interact kbd {color:#752837;background:#f9d9dc;border-color:#d6949d;font-size:.78rem}
.echo-drive {right:var(--margin);bottom:calc(var(--margin) + 50px);display:flex;align-items:center;gap:6px}
.echo-drive output {color:var(--paper);font-size:1.25rem;background:var(--hud);padding:5px 12px;border-radius:4px;font-variant-numeric:tabular-nums}
.echo-dock {right:var(--margin);bottom:var(--margin);display:flex;gap:6px}
.echo-dock button {font-size:.79rem}
.echo-dock button[aria-pressed="true"] svg {color:var(--gold)}
.echo-play:not(.touch-campus) {--echo-quick-width:min(252px,calc(100vw - 2 * var(--margin)))}
.echo-play:not(.touch-campus) :is(.echo-dock,.social-chat) {width:var(--echo-quick-width);box-sizing:border-box}
.echo-play:not(.touch-campus) .echo-dock {display:grid;grid-template-columns:minmax(0,4fr) minmax(0,5fr);gap:5px}
.echo-play:not(.touch-campus) .echo-dock button {padding-inline:5px;white-space:nowrap}
.echo-play:not(.touch-campus) .social-chat {bottom:calc(var(--margin) + 46px)}
.echo-top:has(#echo-mobile-menu[aria-expanded="true"]) {z-index:7}
.echo-menu {
  position:absolute;inset:calc(100% + 7px) 0 auto auto;z-index:1;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;
  width:min(340px,calc(100vw - 24px));max-height:calc(100dvh - 86px);overflow:auto;
  padding:7px;background:var(--panel);border:1px solid var(--rule);border-radius:12px;
  box-shadow:0 8px 24px #202b3d36;pointer-events:auto;
}
.echo-menu[hidden],#echo-hud-restore[hidden] {display:none}
.echo-menu button {
  display:flex;align-items:center;justify-content:flex-start;gap:6px;width:100%;min-width:0;
  min-height:37px;padding:4px 7px;color:var(--paper);background:var(--hud);border:1px solid var(--rule);
  border-radius:7px;font:650 .74rem/1.25 var(--display);cursor:pointer;
}
.echo-menu button:hover {background:#f1f6fb;border-color:var(--blue)}
.echo-menu button kbd {margin-inline-start:auto}
.touch-campus .echo-menu {grid-template-columns:repeat(3,minmax(0,1fr));width:min(420px,calc(100vw - 24px))}
.touch-campus .echo-menu .echo-icon-button {
  width:100%;min-height:37px;aspect-ratio:auto;border-radius:7px;justify-content:flex-start;
}
#echo-hud-restore {
  position:fixed;z-index:5;right:var(--safe-right,var(--margin));top:var(--safe-top,var(--margin));
  width:auto;white-space:nowrap;pointer-events:auto;
}
.echo-hud-hidden :is(.echo-top,.echo-mission,.echo-minimap,.echo-prompt,.echo-dock,.echo-drive,
  .echo-aim,.echo-control-tip,.echo-toast,.echo-season-note,.echo-chapter-card,.echo-touch-controls,
  .social-chat,.social-toast,#echo-mobile-left,#echo-mobile-social,.fps) {display:none!important}
.echo-control-tip {left:50%;bottom:var(--margin);transform:translateX(-50%);margin:0;font-size:.76rem;color:#fff;text-shadow:0 1px 3px #000,0 0 7px #000;white-space:nowrap;pointer-events:none}
.echo-play:not(.touch-campus) .echo-control-tip {
  opacity:0;
  transition:opacity .24s ease-out;
  bottom:calc(var(--margin) + 34px);
}
.echo-play:not(.touch-campus) .echo-control-tip.is-visible,
.echo-play:not(.touch-campus) .echo-control-tip.is-ride-hint {opacity:1;transition-duration:.18s}
@media (prefers-reduced-motion: reduce) {
  .echo-play:not(.touch-campus) .echo-control-tip {transition:none}
}
.echo-session-notice {margin:0 0 10px;padding:8px 10px;border-radius:7px;background:#fbe6e7;color:#7e3445;font-size:.83rem}
.echo-notice-stack {
  position:fixed;z-index:5;top:calc(var(--margin) + 60px);left:50%;transform:translateX(-50%);
  display:grid;justify-items:center;gap:8px;width:min(480px,55vw);pointer-events:none;
}
@media (max-width:1000px) {
  .echo-play:not(.touch-campus) .echo-notice-stack {top:calc(var(--margin) + 76px)}
}
.echo-toast {max-width:100%;margin:0;padding:8px 13px;border:1px solid var(--rule);border-radius:5px;background:var(--hud);color:var(--paper);font-size:.83rem;text-align:center;overflow-wrap:anywhere}

.echo-season-note {
  position:fixed;z-index:4;left:50%;top:calc(var(--margin) + 96px);transform:translateX(-50%);
  margin:0;padding:9px 18px;max-width:calc(100% - 32px);border:1px solid #d9a2a9;border-radius:12px;
  background:#fff6ed;color:var(--gold);font-weight:750;text-align:center;pointer-events:none;
  animation:echo-season-arrive .45s ease-out;
}
@keyframes echo-season-arrive {from {opacity:0;transform:translate(-50%,-6px)}}
@media(prefers-reduced-motion:reduce) {.echo-season-note {animation:none}}

.echo-minimap {left:var(--margin);bottom:var(--margin);width:196px;isolation:isolate}
.echo-map-button {
  display:block;width:100%;padding:4px;border:1px solid var(--rule);background:var(--panel);
  border-radius:16px;overflow:hidden;box-shadow:0 3px 0 #8399b559,0 8px 18px #2f426629;
}
.echo-vector-map {display:block;width:100%;aspect-ratio:1;border-radius:11px;background:#e6eddd}
.echo-vitals {
  display:grid;gap:3px;margin-top:4px;padding:5px 6px;border-radius:8px;
  background:var(--hud);color:var(--paper);font-size:.67rem;font-variant-numeric:tabular-nums;
}
.echo-vitals label {display:grid;grid-template-columns:max-content minmax(0,1fr) 2.5em;align-items:center;gap:3px}
.echo-vitals label span {text-align:right}
.echo-vitals progress {width:100%;height:6px;accent-color:#ae5360}
.echo-vitals #echo-hunger {accent-color:#557b57}
.echo-vitals button {
  display:flex;justify-content:space-between;align-items:center;min-height:25px;padding:2px 5px;
  color:var(--paper);border:1px solid var(--rule);border-radius:6px;background:transparent;font:inherit;cursor:pointer;
}
.echo-dialog[data-view="animal"] {width:min(390px,84vw)}
.echo-wallet-history {display:grid;gap:4px;margin:0;padding-inline-start:18px;color:var(--quiet);font-size:.82rem}
.touch-campus .echo-vitals {padding:4px;gap:2px;font-size:.58rem}
.touch-campus .echo-vitals button {min-height:25px}
.echo-vector-full {display:block;width:100%;aspect-ratio:9/7;background:#e6eddd}
.echo-map-goal {fill:#e17b8a;stroke:#fffdf8;stroke-width:1.3}
.echo-map-player {fill:#15263a;stroke:#fffdf8;stroke-width:1.35}
.echo-map-radar {fill:#223f58;opacity:.24}
.echo-vector-map .echo-map-player {fill:#0a1729;stroke-width:1.6}
.echo-vector-line,.echo-vector-line-back {fill:none;stroke-linejoin:round;stroke-linecap:round}
.echo-vector-line {stroke:#9046a1;stroke-width:3}
.echo-vector-line-back {stroke:#fffdf8;stroke-width:5}

.echo-dialog {
  width:min(840px,calc(100% - 32px));max-height:calc(100dvh - 48px);padding:0;margin:auto;
  overflow:hidden;border:1px solid #bacadd;border-radius:18px;color:var(--paper);background:#fffdf8;
  box-shadow:0 24px 100px #29395150;
}
.echo-dialog[open] {display:flex;flex-direction:column}
.echo-dialog::backdrop {background:#41577742}
.echo-dialog>header {
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex:none;
  border-bottom:1px solid var(--rule);padding:16px 24px;background:linear-gradient(105deg,#fce7e7,#fff9ee 54%,#e7f2fc);
}
.echo-dialog>header h2 {margin:0;font:800 clamp(1.5rem,3.2vw,2.35rem)/1.12 var(--display);letter-spacing:-.02em}
.echo-dialog-label {margin:0 0 4px;color:var(--gold);font-size:.67rem;letter-spacing:.18em}
.echo-tabs {
  display:flex;flex:none;overflow:auto;gap:5px;padding:7px 16px;border-bottom:1px solid var(--rule);background:#faf6ef;
}
.echo-dialog .echo-tabs button {white-space:nowrap;flex:1;border-color:transparent;background:transparent;justify-content:center;font-size:.8rem;color:var(--quiet)}
.echo-dialog .echo-tabs button[aria-current] {background:#f9e0e2;border-color:#d9a2a9;color:#8a3545}
.echo-tabs kbd {font-size:.59rem;padding:2px 3px;min-width:17px}
.echo-content {min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 24px 24px}
.echo-pane {display:grid;gap:12px;min-width:0}
.echo-pane p {margin:0;overflow-wrap:anywhere}
.echo-pane h3 {margin:5px 0 0;font-size:1.08rem;line-height:1.35;color:var(--paper)}
.echo-pane .echo-title {font:800 clamp(1.4rem,2.6vw,2rem)/1.2 var(--display)}
.echo-kicker {color:var(--gold);font-size:.72rem;letter-spacing:.12em;font-weight:700}
.echo-caption {color:var(--quiet);font-size:.83rem;line-height:1.55}
.echo-story {white-space:pre-wrap;line-height:1.8}
.echo-row,.echo-list,.echo-badges,.echo-achievements {display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}
.echo-row>.echo-field {flex:1;min-width:min(150px,100%)}
.echo-dialog button,.echo-dialog a {
  display:inline-flex;align-items:center;gap:8px;width:fit-content;max-width:100%;min-height:40px;
  padding:6px 12px;color:var(--paper);background:#fff;border:1px solid #c0cddc;border-radius:9px;
  text-decoration:none;text-align:left;font-size:.87rem;
}
.echo-dialog button:hover,.echo-dialog a:hover {border-color:var(--gold);background:#f4f8fd}
.echo-dialog .echo-primary {background:#f9d9dc;border-color:#d89ca6;color:#762b39;font-weight:750}
.echo-dialog .echo-primary:hover {background:#f5c5cd;border-color:#f5c5cd}
.echo-dialog .echo-list-item {width:100%}
.echo-dialog .echo-choice {width:100%;display:grid;gap:3px;padding:10px 14px}
.echo-dialog .echo-dialog-choice-current {border-color:var(--gold);box-shadow:inset 0 0 0 1px #ce8b9560}
.echo-choice small {color:var(--quiet);font-size:.73rem}
.echo-dialog :is(input:not([type="checkbox"]),textarea,select) {width:100%;max-width:100%;min-height:38px;padding:6px 9px;border:1px solid #b8c9db;border-radius:4px;background:#fff;color:var(--paper)}
.echo-dialog textarea {min-height:78px;resize:vertical}
.echo-field {display:grid;gap:4px;color:var(--paper);font-size:.82rem}
.echo-check {display:flex;gap:8px;align-items:center;font-size:.83rem}
.echo-form-status {margin:10px 0 0;color:var(--blue);font-size:.83rem}
.echo-form-status:empty {display:none}
.echo-form-status.error {color:#a33248}

.echo-map-layout {display:grid;gap:16px}
.echo-pause-layout section,.echo-location-list {display:grid;gap:10px;align-content:start;min-width:0}
.echo-controls {display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:4px 12px;margin:0;font-size:.82rem}
.echo-controls dd {margin:0;color:var(--quiet)}
.echo-controls kbd {display:inline-block}
.echo-dialog.echo-dialog-pages {
  width:min(1050px,calc(100% - 32px));height:min(760px,calc(100dvh - 48px));
}
.echo-dialog-pages>.echo-content {flex:1;scrollbar-gutter:stable}
.echo-status-layout {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));align-items:start;gap:10px}
.echo-status-card {min-width:0;background:var(--panel);border:1px solid var(--rule);border-radius:10px;padding:12px;display:grid;gap:8px}
.echo-status-card h3 {margin:0}
.echo-status-meter {display:grid;grid-template-columns:max-content minmax(32px,1fr) max-content;align-items:center;gap:8px;font-size:.82rem}
.echo-status-meter progress {width:100%;accent-color:var(--gold)}
.echo-status-meter progress[data-vital="hunger"] {accent-color:#547c64}
.echo-status-meter span:last-child {font-variant-numeric:tabular-nums}
.echo-wallet-balance {font-size:1.2rem;font-weight:750}
.echo-status-card .echo-caption:empty {display:none}
.echo-dialog[data-view="pause"] {width:min(760px,calc(100% - 32px))}
.echo-dialog[data-view="pause"] .echo-dialog-label {display:none}
.echo-dialog[data-view="pause"] > .echo-content {padding-block:12px}
.echo-pause-layout {display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:20px;align-items:start}
.echo-pause-layout section + section {padding-inline-start:20px;border-inline-start:1px solid var(--rule)}
.echo-pause-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.echo-pause-actions > :is(button,a) {width:100%;min-height:36px}
.echo-pause-footer {padding-top:10px;border-top:1px solid var(--rule)}
.echo-pause-footer button:first-child {margin-inline-end:auto}
.echo-top-actions .echo-profile {border-radius:50%;aspect-ratio:1;padding:8px;background:#f7e4e6;color:#87394d;justify-content:center}
@media(max-width:520px) {
  #echo-mobile-menu span {display:none}
  .echo-top-actions {gap:4px}
  .echo-dock button svg {display:none}
}
.echo-map-layout {grid-template-columns:minmax(0,1fr) minmax(175px,220px);align-items:start}
.echo-map-column {min-width:0;display:grid;gap:6px}
.echo-atlas {min-width:0;padding:7px;background:#fffaf0;border:1px solid #ded3bb;border-radius:14px;box-shadow:0 3px 0 #ded3bb65}
.echo-map-viewport {--atlas-width:80.5dvh;max-height:63dvh;overflow:auto;overscroll-behavior:contain;border:1px solid #c4cfb9;border-radius:9px;background:#e6eddd}
.echo-map {position:relative;isolation:isolate;width:calc(min(100%,var(--atlas-width)) * var(--map-zoom,1));margin:auto}
.echo-map-destination {display:grid;gap:7px;padding:10px;border:1px solid var(--rule);border-radius:10px;background:#f4f8fd}
.echo-location-list output {align-self:center;font-variant-numeric:tabular-nums}
.echo-map-selection {fill:#9846a159;stroke:#6f287e;stroke-width:2}
.echo-dialog .echo-building-pin {
  position:absolute;transform:translate(-50%,-50%);display:block;width:14px;height:14px;min-height:0;
  padding:0;border:0;background:transparent;border-radius:50%;
}
.echo-building-pin::before {
  content:"";position:absolute;inset:3px;border:1px solid #fff;border-radius:50%;
  background:#963f52;box-shadow:0 0 0 1px #963f52;
}
.echo-building-pin > span {
  position:absolute;bottom:calc(100% - 1px);left:50%;transform:translateX(-50%);padding:1px 5px;
  background:#fffdf8;border:1px solid #c59496;border-radius:5px;white-space:nowrap;
  font-size:.62rem;font-weight:750;line-height:1.3;
}
.echo-building-pin.is-landmark > span {font-size:.7rem;border-color:#7897b8}
.echo-building-pin.is-landmark::before {background:#315e9b;box-shadow:0 0 0 1px #315e9b}
.echo-building-pin.label-crowded > span {visibility:hidden}
.echo-building-pin:is(:hover,:focus-visible,[aria-pressed="true"]) {z-index:2}
.echo-building-pin:is(:hover,:focus-visible,[aria-pressed="true"]) > span {visibility:visible;background:#fff0eb}
.echo-atlas-north {position:absolute;right:7px;top:7px;padding:2px 7px;background:#fffdf8;border:1px solid #aabfd1;border-radius:7px;color:#15263a;font-size:.68rem;font-weight:800;pointer-events:none}
.echo-map-legend {display:flex;flex-wrap:wrap;gap:4px 12px;margin:0;padding:7px 4px 1px;list-style:none;color:var(--quiet);font-size:.68rem}
.echo-map-legend li {display:flex;align-items:center;gap:4px}
.echo-map-legend li::before {content:"";width:10px;height:10px;border:1px solid var(--swatch-edge);border-radius:3px;background:var(--swatch)}
.echo-map-legend [data-kind="building"] {--swatch:#e6aaa2;--swatch-edge:#a8656e}
.echo-map-legend [data-kind="green"] {--swatch:#b0d2a9;--swatch-edge:#699a76}
.echo-map-legend [data-kind="water"] {--swatch:#9ed5ea;--swatch-edge:#609fba}
.echo-map-legend [data-kind="route"] {--swatch:#9046a1;--swatch-edge:#9046a1}
.echo-location-list .echo-list {display:grid}
.echo-location-list .echo-list button {width:100%;min-height:34px}
.echo-pane>img {display:block;width:100%;height:auto;border-radius:5px}

.echo-dialog:is([data-view="scene"],[data-view="broadcast"]) {
  position:fixed;inset:auto auto 24px 50%;transform:translateX(-50%);width:min(890px,calc(100% - 32px));margin:0;max-height:85dvh;
}
.echo-dialog:is([data-view="scene"],[data-view="broadcast"])::backdrop {background:linear-gradient(0deg,#627b9c32,transparent 65%)}
.echo-dialog:is([data-view="scene"],[data-view="broadcast"])>header {padding-block:8px}
.echo-dialog:is([data-view="scene"],[data-view="broadcast"])>header h2 {font-size:1rem}
.echo-dialog:is([data-view="scene"],[data-view="broadcast"]) .echo-dialog-label {display:none}
.echo-speaker {display:flex;align-items:center;gap:8px;color:var(--gold)}
.echo-speaker-mark {width:30px;height:30px;display:grid;place-items:center;border:1px solid #dbabb2;background:#fce8eb;border-radius:5px}
.echo-scene-speaker {font-weight:800;letter-spacing:.08em}
.echo-scene-speaker.is-you {color:var(--blue)}
.echo-scene-text {font-size:clamp(1rem,1.7vw,1.2rem);line-height:1.8;min-height:2.3em;color:var(--text)}
.echo-scene-hint {font-size:.71rem;color:var(--quiet);text-align:right;font-variant-numeric:tabular-nums}
.echo-dialog[data-view="puzzle"],.echo-dialog[data-view="choice"],.echo-dialog[data-view="ending"],.echo-dialog[data-view="fork"],.echo-dialog[data-view="npc"] {width:min(600px,calc(100% - 32px))}
.echo-dialog[data-view="placement"],.echo-dialog[data-view="fish"],.echo-dialog[data-view="quiz"] {margin:auto 20px 20px auto;width:min(450px,calc(100% - 32px))}
.echo-dialog[data-view="fish"]::backdrop,.echo-dialog[data-view="placement"]::backdrop,.echo-dialog[data-view="quiz"]::backdrop {background:#4b638534}
.echo-challenge-card,.echo-task-card,.echo-story-card,.echo-timeline-row,.echo-evidence-log,.echo-species-card {
  display:grid;gap:7px;padding:12px 14px;background:#f5f8fa;border:1px solid var(--rule);border-radius:5px;
}
.echo-challenge-card h3,.echo-task-card h3 {margin:0}
.echo-story-side,.echo-timeline,.echo-species {display:grid;gap:7px}
.echo-species {grid-template-columns:repeat(2,minmax(0,1fr))}
.echo-timeline-row {grid-template-columns:5rem 1fr auto;align-items:center;font-size:.83rem}
.echo-timeline-row.now,.echo-steps .now {color:var(--gold)}
.echo-steps .done,.echo-timeline-row.done {color:var(--blue)}
.echo-timeline-no,.echo-timeline-count {color:var(--quiet);font-size:.73rem}
.echo-steps,.echo-log,.echo-daily {margin:0;padding-left:22px;font-size:.85rem}
.echo-steps li,.echo-log li,.echo-daily li {padding:3px 0}
.echo-stats {display:grid;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}
.echo-stat {display:grid;grid-template-columns:1fr auto;grid-template-areas:"label number" "meter meter";gap:3px;padding:8px;background:#edf3f8;font-size:.73rem}
.echo-stat b {grid-area:number;color:var(--gold)}
.echo-stat i {grid-area:meter;height:3px;background:var(--blue)}
.echo-stats-note {color:var(--quiet);font-size:.77rem}
.echo-tag,.echo-badge,.echo-ach {display:inline-flex;align-items:center;gap:4px;justify-self:start;padding:3px 8px;border:1px solid #c2cfe0;border-radius:4px;font-size:.72rem;color:var(--quiet)}
.echo-badge,.echo-ach.got,.echo-tag.done {color:var(--gold);border-color:#cf9aa4}
.echo-tag.locked {opacity:.72}
.echo-evidence {margin:0;padding:12px 17px 12px 32px;background:#f1f6fb;border:1px solid var(--rule);border-radius:6px;color:var(--paper);font-size:.88rem}
.echo-evidence-log summary {cursor:pointer;color:var(--gold)}
.echo-puzzle-steps {margin:0;padding-left:24px;color:var(--quiet);font-size:.81rem}
.echo-puzzle-steps .done {color:var(--blue)}
.echo-puzzle-options {display:grid;gap:6px}
.echo-puzzle-options button {width:100%}
.echo-puzzle-options button:disabled {text-decoration:line-through}
.echo-chat,.echo-replies {display:grid;gap:8px;max-height:42vh;overflow:auto;padding:10px;border:1px solid var(--rule);background:#f0f5fa;border-radius:5px}
.echo-chat-user,.echo-chat-assistant {width:fit-content;max-width:90%;padding:7px 12px;border-radius:5px;background:#e1edf9;white-space:pre-wrap;font-size:.87rem}
.echo-chat-user {justify-self:end;background:#f9e2e5}
/* Dock fishing UI low, leaving the angler and the waterline visible. */
.echo-fishing {
  --fish-bottom:max(12px,var(--safe-bottom,0px),env(safe-area-inset-bottom));
  --fish-left:max(12px,var(--safe-left,0px),env(safe-area-inset-left));
  --fish-right:max(12px,var(--safe-right,0px),env(safe-area-inset-right));
  position:fixed;inset:0;z-index:46;pointer-events:none;color:#fff;
}
.echo-fishing-center {
  position:absolute;left:50%;bottom:var(--fish-bottom);transform:translateX(-50%);
  display:grid;justify-items:center;gap:10px;width:max-content;max-width:calc(100% - 28px);
}
.echo-fishing-stage,.echo-fishing-footer {
  display:grid;justify-items:center;max-width:100%;gap:6px;text-align:center;
}
.echo-fishing-heading {display:flex;align-items:center;justify-content:center;gap:6px}
.echo-fishing svg {width:18px;height:18px;color:inherit}
.echo-fishing-mark {flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#21354a;border:1px solid #ffffff68}
.echo-fishing[data-phase="reel"] .echo-fishing-mark {background:#995021}
.echo-fishing p {margin:0}
.echo-fishing :is([role="status"],.echo-fishing-unlocked,.echo-fishing-keys) {
  background:#142438f0;padding:4px 9px;border-radius:7px;font-size:.76rem;line-height:1.45;
}
.echo-fishing button {pointer-events:auto;touch-action:none;font:inherit;cursor:pointer}
.echo-fishing button:focus-visible {outline:2px solid #f8dda0;outline-offset:3px}
.echo-fishing .echo-fishing-action {
  position:absolute;right:var(--fish-right);bottom:calc(var(--fish-bottom) + 44px);display:grid;place-content:center;
  justify-items:center;gap:3px;width:82px;height:82px;text-align:center;border:1px solid #bfd6e8;border-radius:50%;
  padding:6px;background:#f6fbff;color:#132b40;box-shadow:0 3px 12px #050e22a0;font-size:.72rem;font-weight:750;line-height:1.1;
}
.echo-fishing-action svg {width:23px;height:23px}
.echo-fishing .echo-fishing-action[data-hold] {background:#dff3e7}
.echo-fishing .echo-fishing-action[data-hold]:active {background:#a7d5b8}
.echo-fishing-action:disabled {opacity:.72;cursor:default}
.echo-fishing .echo-fishing-exit {
  background:#142438f5;color:#fff;border:1px solid #ffffff68;border-radius:7px;
  min-height:36px;padding:4px 12px;font-size:.78rem;
}
.echo-fishing-keys {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px}
.echo-fishing-keys span {display:inline-flex;align-items:center;gap:3px}
.echo-fishing-keys kbd {padding:1px 4px;border:1px solid #ffffff68;border-radius:4px;font:inherit;line-height:1.2}
.echo-fishing:not([data-unlocked]) .echo-fishing-unlocked {display:none}
.echo-fishing-track {position:relative;width:min(310px,42vw);height:26px;border:1px solid #ffffff85;border-radius:13px;background:#244263;overflow:hidden}
.echo-fishing-bar {position:absolute;inset-block:2px;background:#83c89b;border-radius:8px}
.echo-fishing-target {position:absolute;top:50%;width:10px;height:17px;border-radius:50%;transform:translate(-50%,-50%);background:#ffe49a;border:1px solid #794d21}
.echo-fishing progress {width:min(310px,42vw);height:7px;accent-color:#83c89b}
.echo-fishing-history {
  position:absolute;left:var(--fish-left);bottom:calc(var(--fish-bottom) + 44px);width:min(178px,25vw);
  padding:9px 12px;border:1px solid #ffffff4f;border-radius:10px;background:#142438ee;font-size:.76rem;
  overflow-wrap:anywhere;pointer-events:auto;
}
.echo-fishing-history h3 {margin:0 0 4px;font-size:.84rem}
.echo-fishing-total {font-weight:700;color:#f8dda0}
.echo-fishing-catches {max-height:min(30dvh,210px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;list-style:none;padding:0;margin:5px 0 0}
.echo-fishing-catches li {display:flex;justify-content:space-between;gap:5px;padding:2px 0}
.echo-fishing-catches li :last-child {color:#bfdfd8;flex:none;font-variant-numeric:tabular-nums}
.touch-campus .echo-fishing-action {width:64px;height:64px;bottom:calc(var(--fish-bottom) + 10px)}
.touch-campus .echo-fishing-exit {min-height:40px}
.touch-campus .echo-fishing-history {bottom:calc(var(--fish-bottom) + 10px);padding:6px 8px}
@media (max-width:620px), (max-height:330px) {
  .echo-fishing-history {max-width:112px;bottom:calc(var(--fish-bottom) + 10px);padding:6px 8px}
  .echo-fishing .echo-fishing-action {width:62px;height:62px;bottom:calc(var(--fish-bottom) + 10px)}
  .echo-fishing-center {max-width:calc(100% - 250px)}
}
.echo-fish-cards {list-style:none;padding:0;margin:6px 0 0;grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr))}
.echo-fish-cards .echo-species-card {display:flex;gap:10px;align-items:flex-start}
.echo-fish-cards .echo-caption {margin:3px 0}
.echo-fish-portrait {
  width:38px;height:38px;flex:none;display:grid;place-items:center;
  border-radius:9px;background:color-mix(in srgb,var(--fish-tone) 40%,white);color:#22364a;
}
.echo-fish-portrait svg {width:24px;height:24px}
.echo-fish-tier {border:1px solid var(--rule);padding:8px 10px;border-radius:8px}
.echo-fish-tier summary {cursor:pointer;font-weight:650}
[data-view="fish-dex"] progress {width:min(100%,260px);accent-color:#397759}
.echo-fishing-active :is(.echo-top,.echo-minimap,.echo-mission,.echo-dock,.echo-prompt,.echo-aim,.echo-control-tip,.echo-touch-controls,.echo-drive,.social-chat,#echo-mobile-social,.echo-chat) {visibility:hidden;pointer-events:none}
.echo-chapter-card {
  transform:translateY(-5px);width:min(455px,100%);
  border-block:1px solid #d1a3ad;text-align:center;padding:11px 16px;
  background:#fffbf2f2;opacity:0;transition:opacity .3s,transform .3s;
}
.echo-chapter-card.in {opacity:1;transform:translateY(0)}
.echo-chapter-card :is(p,h2) {margin:0}
.echo-chapter-card .no {color:var(--gold);font-size:.76rem;letter-spacing:.18em}
.echo-chapter-card h2 {font:800 2.1rem/1.24 var(--display)}
.echo-chapter-card .sub {color:var(--quiet);font-size:.78rem}

@media(max-width:770px) {
  .echo-compass {gap:10px}.echo-compass span {display:none}
  .echo-dialog>header {padding:12px 14px}.echo-content {padding:14px}
  .echo-tabs {padding-inline:8px}.echo-dialog .echo-tabs button {min-height:36px;padding-inline:7px}
  .echo-tabs kbd,.echo-control-tip {display:none}
  .echo-map-layout,.echo-pause-layout {grid-template-columns:1fr}
  .echo-pause-layout section + section {padding-inline-start:0;padding-block-start:10px;border-inline-start:0;border-block-start:1px solid var(--rule)}
  .echo-map-viewport {--atlas-width:63.5dvh;max-height:50dvh}
  .echo-minimap {width:148px}
  .echo-dock button {padding-inline:7px}
}
@media(max-height:550px) {
  .echo-minimap {width:140px}
  .echo-mission {top:calc(var(--margin) + 56px)}
  .echo-dialog {max-height:calc(100dvh - 28px)}
  .echo-timed .echo-compass,.echo-control-tip {display:none}
}

.echo-camera-hud {
  position:fixed;z-index:6;left:50%;bottom:24px;transform:translateX(-50%);
  width:max-content;max-width:calc(100% - 32px);padding:7px 12px;text-align:center;
  background:var(--hud);border:1px solid var(--rule);border-radius:10px;color:var(--paper);font-size:.78rem;
}
.echo-camera-hud p {margin:0}
.echo-camera-hud .echo-row {justify-content:center;margin-top:6px}
.echo-camera-hud button {padding:5px 12px;min-height:34px;background:var(--raised);border:1px solid var(--rule);border-radius:7px}
.echo-camera-hud button:hover {border-color:var(--blue);color:var(--blue)}
:is(.echo-filming,.echo-camera-photo) :is(.echo-top,.echo-mission,.echo-minimap,.echo-prompt,.echo-drive,.echo-dock,.echo-aim,.echo-control-tip,.echo-toast,.echo-season-note,.echo-chapter-card,.social-chat,.social-toast,#echo-mobile-social,.fps) {display:none!important}

/* Use the same palette even when a proxy returns an older copy of the map. */
:is(.echo-vector-map,.echo-vector-full) rect {fill:#e6eddd}
:is(.echo-vector-map,.echo-vector-full) .land {fill:#f4edda}
:is(.echo-vector-map,.echo-vector-full) .grounds {fill:#dbeac9}
:is(.echo-vector-map,.echo-vector-full) .water {fill:#9ed5ea}
:is(.echo-vector-map,.echo-vector-full) .garden {fill:#b0d2a9}
:is(.echo-vector-map,.echo-vector-full) .footpaths {fill:#f3dfbc}
:is(.echo-vector-map,.echo-vector-full) .roads {fill:#fffbf1}
:is(.echo-vector-map,.echo-vector-full) .buildings {fill:#e6aaa2}
.echo-pet-status {display:flex;gap:8px 20px;flex-wrap:wrap;margin:0}
.echo-pet-status div {display:grid;gap:2px;padding:7px 12px;border:1px solid var(--rule);border-radius:9px;background:#f5f8fa}
.echo-pet-status dt {color:var(--quiet);font-size:.73rem}
.echo-pet-status dd {margin:0;font-weight:750}

#echo-film-reticle {
  position:fixed;z-index:3;left:50%;top:50%;width:5px;height:5px;transform:translate(-50%,-50%);
  border:1px solid #28374c;border-radius:50%;background:#fffdf8;pointer-events:none;
}
.echo-film-tools {
  position:fixed;z-index:6;right:var(--margin);bottom:var(--margin);width:min(262px,calc(100vw - 32px));
  padding:10px 12px;border:1px solid var(--rule);border-radius:12px;background:var(--hud);color:var(--paper);
}
.echo-film-tools strong {font-size:.88rem}
.echo-film-tools p {margin:2px 0;color:var(--quiet);font-size:.70rem}
.echo-film-tools .echo-row {display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}
.echo-film-tools button {
  display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:29px;padding:3px 6px;
  border:1px solid var(--rule);border-radius:6px;background:var(--raised);font-size:.70rem;
}
.echo-film-tools button:hover {border-color:var(--blue)}
.echo-film-tools kbd {min-width:15px;padding:1px 3px}
.echo-camera-hidden :is(.echo-camera-hud,.echo-film-tools,#echo-film-reticle),
.echo-camera-shot :is(.echo-film-tools,#echo-film-reticle),
.echo-camera-photo :is(.echo-camera-hud,.echo-film-tools,#echo-film-reticle) {display:none!important}
.echo-phone {
  position:fixed;z-index:8;inset:0;display:grid;place-items:center;
  color:#fff8ea;font-size:.78rem;
}
.echo-phone-layout {display:grid;justify-items:center;gap:8px;max-width:100%}
.echo-phone-head {
  position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;
  justify-self:stretch;padding:0 2px;font-size:.95rem;
}
.echo-phone button {
  border:1px solid #fff3;border-radius:7px;background:#202b3a;color:inherit;
  padding:5px 9px;min-height:30px;font:inherit;white-space:nowrap;cursor:pointer;
}
.echo-phone button[aria-pressed="true"] {background:#f5e4cd;color:#242c38;border-color:#f5e4cd;font-weight:700}
.echo-phone :focus-visible {outline:2px solid #f5cf96;outline-offset:3px}
.echo-phone-head button {width:32px;height:32px;padding:0;font-size:1.4rem}
.echo-phone-view {
  position:relative;width:min(420px,calc((100dvh - 160px) * .5625),calc(100vw - 28px));aspect-ratio:9/16;
  border-radius:12px;outline:1px solid #fff6;
  box-shadow:0 0 0 100vmax #101824bb,0 10px 35px #1118;
  cursor:grab;touch-action:none;
}
.echo-phone[data-format="landscape"] .echo-phone-view {width:min(1000px,calc((100dvh - 160px) * 1.77778),calc(100vw - 28px));aspect-ratio:16/9}
.echo-phone-view:active {cursor:grabbing}
.echo-phone-view::after {
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:#fff;opacity:0;
}
.echo-phone-view.is-flashing::after {animation:echo-shutter-flash .27s ease-out}
@keyframes echo-shutter-flash {from {opacity:.82} to {opacity:0}}
.echo-phone-view i {
  position:absolute;inset:0;opacity:.35;pointer-events:none;
  background:linear-gradient(90deg, #fff 1px, transparent 1px) 0 0 / 33.333% 100%,
             linear-gradient(#fff 1px, transparent 1px) 0 0 / 100% 33.333%;
  mask-image:linear-gradient(to bottom,transparent 1px,#000 8px,#000 calc(100% - 8px),transparent);
}
.echo-photo-corners {
  position:absolute;inset:10px;border:1px solid #fff6;border-radius:6px;pointer-events:none;
}
.echo-photo-toolbar {
  position:relative;z-index:1;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:6px 10px;max-width:calc(100vw - 20px);
}
.echo-photo-group {display:flex;gap:4px}
.echo-photo-zoom {display:flex;align-items:center;gap:6px;white-space:nowrap}
.echo-photo-zoom input {width:clamp(65px,12vw,112px);accent-color:#f5e4cd}
.echo-photo-zoom span {min-width:2em}
.echo-phone .echo-shutter {
  width:40px;height:40px;padding:0;border:3px solid white;border-radius:50%;background:#fff;
  box-shadow:inset 0 0 0 3px #28374c;
}
.echo-phone output {position:relative;z-index:1;min-height:1.3em;text-align:center;color:#fff;padding:0 9px}
@media(prefers-reduced-motion:reduce) {.echo-phone-view.is-flashing::after {animation:none}}
.echo-photo-movement {display:none}
.echo-phone .echo-shutter:disabled {opacity:.5;cursor:wait}
@media (pointer:coarse) {
  .echo-photo-movement {
    position:absolute;z-index:1;left:14px;bottom:14px;display:grid;
    grid-template-columns:repeat(3,32px);gap:3px;
  }
  .echo-photo-movement button {padding:0;min-height:32px;touch-action:none}
  .echo-photo-movement button:first-child {grid-column:2}
  .echo-photo-movement button:nth-child(2) {grid-column:1;grid-row:2}
}

.echo-calendar {text-align:left}
#echo-date {font-size:.63rem;color:var(--quiet)}
.echo-dialog[data-view="time"] {width:min(470px,calc(100% - 28px))}
.echo-environment {display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:12px}
.echo-environment-options {display:grid;gap:5px}
.echo-environment :is(h3,output) {margin:0}
.echo-time-dial {
  --dial-angle:0deg;
  position:relative;width:clamp(106px,25vw,144px);aspect-ratio:1;margin-top:5px;
  touch-action:none;cursor:grab;user-select:none;
}
.echo-time-dial:active {cursor:grabbing}
.echo-time-dial:focus-within {outline:2px solid var(--blue);outline-offset:1px;border-radius:50%}
.echo-time-dial::before {
  content:"";position:absolute;inset:16px;border-radius:50%;
  background:conic-gradient(var(--blue) var(--dial-angle),#dbe4ed 0);
}
.echo-time-labels {position:absolute;inset:0;color:var(--quiet);font:700 .64rem/1 var(--display)}
.echo-time-labels span {position:absolute}
.echo-time-labels span:nth-child(1) {top:1px;left:50%;transform:translateX(-50%)}
.echo-time-labels span:nth-child(2) {right:0;top:50%;transform:translateY(-50%)}
.echo-time-labels span:nth-child(3) {bottom:1px;left:50%;transform:translateX(-50%)}
.echo-time-labels span:nth-child(4) {left:0;top:50%;transform:translateY(-50%)}
.echo-time-reading {
  position:absolute;inset:23px;display:grid;place-items:center;border-radius:50%;
  background:var(--panel);color:var(--paper);font:750 1.05rem/1 var(--display);
  font-variant-numeric:tabular-nums;
}
.echo-time-knob {position:absolute;inset:19px;transform:rotate(var(--dial-angle));z-index:1}
.echo-time-knob::after {
  content:"";position:absolute;top:-5px;left:50%;transform:translateX(-50%);
  width:10px;height:10px;border-radius:50%;border:2px solid #fff;
  background:var(--blue);box-shadow:0 1px 3px #172b4a70;
}
.echo-time-dial input[type="range"] {
  position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;
  opacity:0;pointer-events:none;
}
.echo-environment-presets {display:flex;gap:4px;flex-wrap:wrap}
.echo-dialog .echo-environment-presets button {
  min-height:32px;padding:3px 7px;white-space:nowrap;
}
.echo-dialog .echo-environment-presets button[aria-pressed="true"] {
  background:#dbe9f4;color:#183b61;border-color:#8aa9c3;font-weight:700;
}
@media (max-width:450px) {
  .echo-environment {gap:7px}
  .echo-time-reading {font-size:.85rem}
}

.echo-dialog:is([data-view="scene"],[data-view="broadcast"],[data-view="choice"],[data-view="npc"]) {
  position:fixed;inset:auto var(--margin) max(var(--margin),env(safe-area-inset-bottom)) auto;
  transform:none;margin:0;width:min(470px,calc(100% - 2 * var(--margin)));max-height:66dvh;
}
.echo-dialog:is([data-view="scene"],[data-view="broadcast"],[data-view="choice"],[data-view="npc"]) .echo-content {padding:14px 16px}
.echo-dialog:is([data-view="scene"],[data-view="broadcast"],[data-view="choice"],[data-view="npc"])>header {padding:8px 16px}
.echo-dialog:is([data-view="choice"],[data-view="npc"])>header h2 {font-size:1rem}
.echo-dialog:is([data-view="choice"],[data-view="npc"]) .echo-dialog-label {display:none}
.echo-dialog:is([data-view="scene"],[data-view="choice"],[data-view="npc"]) button {min-height:32px;padding:4px 8px;font-size:.78rem}
.echo-dialogue-footer {display:flex;align-items:center;justify-content:space-between;gap:8px}
.echo-dialogue-footer .echo-row {justify-content:flex-end}
.echo-dialog[data-view="scene"] .echo-scene-text {font-size:.94rem;line-height:1.6;margin:.55rem 0;min-height:0}
.echo-dialog[data-view="scene"] .echo-scene-hint {margin:0}

.echo-touch-controls,.echo-film-tools [data-film="close"] {display:none}
.touch-campus.echo-play {
  --safe-left:max(12px,env(safe-area-inset-left),var(--preview-safe-left,0px));
  --safe-right:max(12px,env(safe-area-inset-right),var(--preview-safe-right,0px));
  --safe-top:max(9px,env(safe-area-inset-top),var(--preview-safe-top,0px));
  --safe-bottom:max(9px,env(safe-area-inset-bottom),var(--preview-safe-bottom,0px));
  --stick-size:clamp(70px,24dvh,98px);
  --margin:12px;
}
.touch-campus.echo-play {--minimap-size:clamp(72px,25dvh,106px)}
.touch-campus .echo-top {
  inset:var(--safe-top) var(--safe-right) auto var(--safe-left);
  z-index:5;grid-template-columns:1fr;
}
.touch-campus :is(.echo-mark,.echo-compass) {display:none}
.touch-campus .echo-top-actions {gap:6px}
.touch-campus :is(.echo-calendar,.echo-icon-button) {min-height:42px;padding:5px 8px;gap:6px}
.touch-campus .echo-icon-button {width:42px;justify-content:center}
.touch-campus #echo-hud-restore {width:auto}
#echo-mobile-menu[aria-expanded="true"] {background:#f7e4e6;color:var(--gold)}
.touch-campus :is(.echo-dock kbd,.echo-prompt kbd,.echo-drive kbd,.echo-tabs kbd,.echo-film-tools kbd) {display:none}
.touch-campus .echo-calendar strong {font-size:.83rem;gap:4px}
.touch-campus .echo-dock {
  position:absolute;inset:calc(100% + 6px) 0 auto auto;
  display:grid;grid-template-columns:repeat(3,58px);gap:4px;padding:5px;
  pointer-events:auto;border:1px solid var(--rule);border-radius:11px;background:var(--panel);
  box-shadow:0 4px 18px #202b3d36;
}
.touch-campus .echo-dock button {
  display:grid;place-content:center;justify-items:center;gap:4px;
  width:58px;min-height:49px;padding:3px 2px;white-space:nowrap;
  font-size:.65rem;line-height:1.15;box-shadow:none;border-radius:7px;
}
.touch-campus .echo-dock button svg {display:block;width:19px;height:19px}
.touch-campus #echo-mobile-left {
  position:fixed;z-index:3;display:flex;align-items:flex-start;gap:7px;
  left:var(--safe-left);top:var(--safe-top);pointer-events:none;
}
.touch-campus .echo-minimap {position:relative;inset:auto;width:var(--minimap-size);pointer-events:auto}
.touch-campus .echo-map-button {padding:0;border:1px solid #52695880;border-radius:8px;box-shadow:0 2px 6px #17233135}
.touch-campus .echo-vector-map {border-radius:inherit}
.touch-campus .echo-mission {
  position:relative;inset:auto;box-sizing:border-box;
  width:clamp(116px,22vw,166px);padding:6px 8px;border-radius:8px;pointer-events:auto;
}
.touch-campus .echo-mission h2 {font-size:.83rem;margin:0 0 3px}
.touch-campus .echo-mission p {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
  font-size:.68rem;line-height:1.3;margin:0;
}
.touch-campus #echo-mobile-task {position:absolute;inset:0;width:100%;border:0;border-radius:inherit;background:transparent;cursor:pointer}
.touch-campus #echo-task-jump {position:relative;z-index:1;min-height:19px;padding:0;font-size:.67rem}
.touch-campus :is(#echo-task-action,.echo-tracker-head,.echo-progress) {display:none}
.touch-campus .echo-prompt {
  left:75%;right:auto;bottom:clamp(60px,25dvh,104px);
  max-width:39vw;
}
.touch-campus #echo-interact {padding-inline:10px}
.touch-campus .echo-drive {right:var(--safe-right);bottom:calc(var(--safe-bottom) + 53px)}
.touch-campus .echo-top #echo-speed {
  display:grid;place-items:center;min-width:66px;min-height:38px;padding:4px 8px;
  color:var(--paper);background:var(--hud);border:1px solid var(--rule);border-radius:9px;
  font-size:.9rem;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap;
}
.touch-campus .echo-control-tip {
  display:block;bottom:calc(4px + max(env(safe-area-inset-bottom),var(--preview-safe-bottom,0px)));
  max-width:min(48vw,460px);
  padding:5px 10px;border-radius:7px;background:#152231e8;
  font-size:clamp(.74rem,1.65vw,.92rem);line-height:1.35;text-align:center;text-shadow:none;
  white-space:normal;overflow-wrap:anywhere;
}
.touch-campus .echo-control-tip[hidden],.touch-campus .echo-control-tip:empty {display:none}
.touch-campus .echo-control-tip mark {background:none;color:#ffdb78;font-weight:800}
/* 桌面：操作提示靠左下，避免被右下互动条压住 */
@media (pointer:fine) {
  .echo-control-tip {bottom:calc(var(--margin) + 118px)}
}
.touch-campus .echo-touch-controls {
  display:block;position:fixed;inset:0;z-index:4;pointer-events:none;
}
.touch-campus.echo-camera-photo .echo-touch-controls,.touch-campus:has(.echo-dialog[open]) .echo-touch-controls {display:none}
.echo-touch-stick,.echo-touch-actions {position:absolute;pointer-events:auto;touch-action:none}
.echo-touch-stick {
  display:grid;place-items:center;
  left:calc(var(--safe-left) + clamp(12px,3vw,28px));
  bottom:calc(var(--safe-bottom) + clamp(10px,4dvh,22px));
  width:var(--stick-size);aspect-ratio:1;border:1px solid #fff8;border-radius:50%;
  background:#25394b60;touch-action:none;user-select:none;
}
/* Keep the floating indicator in view without shifting the gesture origin. */
.echo-touch-stick.is-floating {
  left:clamp(var(--safe-left),calc(var(--stick-x) - var(--stick-size) / 2),calc(100vw - var(--safe-right) - var(--stick-size)));
  top:clamp(var(--safe-top),calc(var(--stick-y) - var(--stick-size) / 2),calc(100dvh - var(--safe-bottom) - var(--stick-size)));
  bottom:auto;pointer-events:none;
}
.echo-touch-stick.is-sprinting {border-color:#f5cf83;background:#62471c9e}
.echo-touch-stick i {
  width:42%;aspect-ratio:1;border:1px solid #fff9;border-radius:50%;
  background:#fffdf8de;pointer-events:none;
}
.echo-touch-actions {
  right:var(--safe-right);bottom:var(--safe-bottom);display:flex;gap:5px;
}
.echo-touch-actions button {
  min-width:40px;min-height:42px;display:grid;place-items:center;
  border:1px solid var(--rule);border-radius:10px;background:var(--hud);color:var(--paper);
  font:inherit;font-size:.78rem;touch-action:none;user-select:none;
}
.touch-campus #echo-touch-jump:has(svg:not([hidden])) {
  width:60px;height:60px;border-radius:50%;transform:translateY(-10px);
  color:#263e55;background:var(--hud-button);box-shadow:0 2px 8px #17233145;
  place-content:center;gap:2px;font-weight:750;line-height:1;
}
.touch-campus #echo-touch-jump svg {width:25px;height:25px}
.echo-touch-vertical {position:relative;display:grid;align-items:end}
.touch-campus #echo-touch-fish {position:absolute;left:50%;bottom:calc(100% + 14px);transform:translateX(-50%)}
.touch-campus :is(#echo-attack,#echo-touch-fish) {
  align-self:center;min-width:42px;min-height:42px;border-radius:50%;font-size:.67rem;line-height:1;
  display:grid;place-content:center;gap:3px;
}
.touch-campus :is(#echo-attack,#echo-touch-fish) svg {width:16px;height:16px;margin:auto}
.touch-campus #echo-attack {
  position:absolute;right:9px;bottom:calc(100% + clamp(12px,7dvh,28px));
}
@media (max-height:280px) {
  .touch-campus #echo-attack {right:65px;bottom:12px}
}
.echo-touch-actions button:active {background:#f7dadd}
.echo-touch-actions button:disabled {opacity:.55}
.echo-touch-actions svg {width:20px;height:20px}
.touch-campus .echo-dialog {
  --dialog-height:min(78dvh,calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px));
  inset:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  width:min(440px,84vw);max-width:calc(100% - var(--safe-left) - var(--safe-right));
  max-height:var(--dialog-height);margin:auto;border-radius:12px;
  box-shadow:0 12px 34px #17233150;
}
.touch-campus .echo-dialog.echo-dialog-pages {width:min(560px,86vw);height:var(--dialog-height)}
.touch-campus .echo-dialog>header {padding:3px 10px;gap:8px;background:var(--panel)}
.touch-campus .echo-dialog>header h2 {font-size:1rem;overflow-wrap:anywhere}
.touch-campus .echo-dialog-label {display:none}
.touch-campus .echo-tabs {
  padding:3px 6px;gap:2px;overflow-x:auto;overscroll-behavior-x:contain;
}
.touch-campus .echo-dialog .echo-tabs button {min-height:34px;padding:3px 6px;gap:4px}
.touch-campus .echo-tabs svg {width:14px;height:14px}
.touch-campus .echo-content {padding:8px 10px;scrollbar-gutter:auto}
.touch-campus .echo-pane {gap:8px}
.touch-campus .echo-page-columns {
  grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start;gap:0;
}
.touch-campus .echo-page-column {
  min-width:0;display:grid;align-content:start;justify-items:start;gap:7px;padding-right:8px;
}
.touch-campus .echo-page-column + .echo-page-column {
  border-inline-start:1px solid var(--rule);padding-inline:8px 0;
}
.touch-campus .echo-page-column > :is(.echo-row,.echo-field,.echo-chat,.echo-story-side,.echo-task-card,.echo-stats,.echo-timeline,.echo-challenge-card) {
  width:100%;min-width:0;
}
.touch-campus .echo-page-column .echo-row {gap:5px}
.touch-campus .echo-page-column .echo-task-card,.touch-campus .echo-page-column .echo-challenge-card {padding:8px}
.touch-campus .echo-page-column .echo-task-card h3,.touch-campus .echo-page-column .echo-challenge-card h3 {margin:0}
.touch-campus .echo-page-column .echo-story-side {grid-template-columns:minmax(0,1fr)}
.touch-campus .echo-pane .echo-title {font-size:1.18rem}
.touch-campus .echo-pane h3 {font-size:.95rem}
.touch-campus .echo-content :is(button,a):not(.echo-building-pin) {min-height:36px;padding:4px 8px}
.touch-campus .echo-content :is(input:not([type="checkbox"]),textarea,select) {min-height:38px;font-size:16px}
.touch-campus .echo-dialog[data-view="pause"] {width:min(650px,90vw);max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 12px)}
.touch-campus .echo-dialog[data-view="pause"] > .echo-content {padding-block:8px}
.touch-campus .echo-pause-layout {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.touch-campus .echo-pause-layout section {gap:5px}
.touch-campus .echo-pause-fields {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.65fr);gap:8px}
.touch-campus .echo-pause-fields label {align-content:start;min-width:0}
.touch-campus .echo-pause-fields .echo-range {min-height:38px;gap:4px}
.touch-campus .echo-pause-fields .echo-range input {min-width:0}
.touch-campus .echo-pause-layout section + section {padding:0 0 0 10px;border:0;border-inline-start:1px solid var(--rule)}
.touch-campus .echo-pause-actions {grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.touch-campus .echo-pause-actions > :is(button,a) {justify-content:center;min-width:0}
.touch-campus .echo-controls {gap:6px 8px}
.touch-campus .echo-pause-footer {padding-top:5px}

.touch-campus .echo-dialog[data-view="explore"] {
  --map-height:min(204px,calc(var(--dialog-height) - 97px));
}
.touch-campus .echo-dialog[data-view="explore"] #echo-close {border-radius:7px}
.touch-campus .echo-dialog[data-view="explore"] #echo-close:focus-visible {outline-offset:-3px}
.touch-campus .echo-dialog[data-view="explore"]>.echo-content {padding:5px 7px 6px}
.touch-campus .echo-mobile-atlas+.echo-form-status:empty,
.touch-campus .echo-location-list>[role="status"]:empty {display:none}
.touch-campus .echo-map-layout {
  grid-template-columns:minmax(0,calc(var(--map-height) * 9 / 7 + 2px)) minmax(120px,1fr);
  align-items:start;gap:8px;
}
.touch-campus .echo-atlas {padding:0;border:0;border-radius:8px;box-shadow:none}
.touch-campus .echo-map-viewport {
  --atlas-width:calc(var(--map-height) * 9 / 7 - 2px);
  height:var(--map-height);max-height:none;padding:0;border-radius:8px;
}
.touch-campus .echo-location-list {
  max-height:var(--map-height);
  overflow-y:auto;overscroll-behavior-y:contain;gap:6px;padding-inline-end:2px;
}
.touch-campus .echo-map-destination {padding:7px;gap:4px}
.touch-campus .echo-map-legend {gap:4px 7px;padding:1px 0}
.touch-campus .echo-map-tools {padding-top:4px;border-top:1px solid var(--rule)}
.touch-campus .echo-map-tools summary {min-height:32px;color:var(--blue);cursor:pointer}
.touch-campus .echo-map-tools-body {display:grid;gap:6px}
.touch-campus .echo-dialog .echo-building-pin {width:22px;height:22px}
.touch-campus .echo-building-pin::before {inset:6px}
@media (max-width:470px) {
  .touch-campus .echo-map-layout {grid-template-columns:minmax(0,1fr)}
  .touch-campus .echo-location-list {max-height:none;overflow:visible}
}

.touch-campus .echo-dialog:is([data-view="placement"],[data-view="fish"],[data-view="quiz"]) {
  inset:auto var(--safe-right) var(--safe-bottom) auto;
  width:min(390px,75vw);margin:0;
}
.touch-campus .echo-dialog:is([data-view="scene"],[data-view="broadcast"],[data-view="choice"],[data-view="npc"]) {
  inset:auto var(--safe-right) var(--safe-bottom) auto;
  width:min(355px,76vw);max-height:min(72dvh,var(--dialog-height));margin:0;
}
.touch-campus .echo-dialog:is([data-view="scene"],[data-view="broadcast"],[data-view="choice"],[data-view="npc"],[data-view="partner"]) .echo-content {
  padding:8px 10px;
}
.touch-campus .echo-dialogue-footer {flex-wrap:wrap;gap:4px 8px}
.touch-campus .echo-dialogue-footer .echo-row {gap:4px}
.touch-campus .echo-dialog[data-view="scene"] .echo-scene-text {margin:0;font-size:.88rem;line-height:1.5}
.touch-campus .echo-speaker-mark {display:none}
.touch-campus .echo-dialog:is([data-view="npc"],[data-view="partner"]) .echo-chat {
  max-height:min(120px,28dvh);padding:6px;gap:5px;overflow-wrap:anywhere;
}
.echo-dialog[data-view="partner"] .echo-chat:empty {display:none}
.touch-campus .echo-dialog[data-view="npc"] .echo-chat:has(>.echo-caption:only-child) {
  padding:0;border:0;background:none;
}
.touch-campus .echo-dialog:is([data-view="npc"],[data-view="partner"]) textarea {min-height:44px;max-height:24dvh}
.touch-campus .echo-dialog[data-view="partner"] .echo-check {min-height:36px;gap:4px}
.touch-campus .echo-npc-composer {align-items:end}
.touch-campus .echo-npc-composer .echo-field {min-width:0}
.touch-campus .echo-content button:disabled {opacity:.55}
.touch-campus .echo-film-tools {
  top:var(--safe-top);right:var(--safe-right);bottom:auto;width:192px;
  max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 59px);
  overflow:auto;padding:7px 8px;border-radius:9px;
}
.touch-campus .echo-film-tools button {min-height:40px;justify-content:center;text-align:center}
.touch-campus .echo-film-tools [data-film="close"] {display:inline-flex}
.touch-campus :is(.echo-film-keyboard,.echo-film-tools [data-film="hide"]) {display:none}
.touch-campus.echo-filming .echo-touch-actions {bottom:var(--safe-bottom)}
.touch-campus .echo-camera-hud {bottom:calc(var(--safe-bottom) + 49px);max-width:54vw}
.touch-campus .echo-camera-hud button {min-height:40px}
.touch-campus .echo-phone {padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left)}
.touch-campus .echo-phone-layout {
  --finder-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 81px);
  --photo-tools-width:162px;
  --finder-width:calc(100vw - var(--safe-left) - var(--safe-right) - var(--photo-tools-width) - 12px);
  display:grid;grid-template-columns:auto var(--photo-tools-width);grid-template-areas:"head head" "frame tools" "status status";
  align-items:center;gap:5px 12px;
}
.touch-campus .echo-phone-layout:has([data-phone="free"]:not([hidden])) {--photo-tools-width:218px}
.touch-campus .echo-phone-head {grid-area:head}
.touch-campus .echo-phone-head button {width:42px;height:42px}
.touch-campus .echo-phone-view {
  grid-area:frame;width:min(420px,calc(var(--finder-height) * 9 / 16),var(--finder-width));
}
.touch-campus .echo-phone[data-format="landscape"] .echo-phone-view {
  width:min(1000px,calc(var(--finder-height) * 16 / 9),var(--finder-width));
}
.touch-campus .echo-photo-toolbar {
  grid-area:tools;display:grid;width:100%;gap:7px;padding:7px;
  border:1px solid #fff3;border-radius:10px;background:#151f2ee8;
}
.touch-campus .echo-photo-group {justify-content:center;flex-wrap:wrap}
.touch-campus .echo-photo-group button {padding-inline:5px}
.touch-campus .echo-photo-zoom {justify-content:center}
.touch-campus .echo-phone button {min-height:40px}
.touch-campus .echo-phone .echo-shutter {width:46px;height:46px;justify-self:center}
.touch-campus .echo-phone output {grid-area:status}
.touch-campus .echo-photo-movement {
  position:absolute;z-index:1;left:5px;bottom:5px;display:grid;
  grid-template-columns:repeat(3,34px);gap:2px;
}
.touch-campus .echo-phone-view [data-photo-move] {padding:0;min-height:34px;touch-action:none}
.touch-campus .echo-photo-movement [data-photo-move="ArrowUp"] {grid-area:1 / 2}
.touch-campus .echo-photo-movement [data-photo-move="ArrowLeft"] {grid-area:2 / 1}
.touch-campus .echo-photo-movement [data-photo-move="ArrowDown"] {grid-area:2 / 2}
.touch-campus .echo-photo-movement [data-photo-move="ArrowRight"] {grid-area:2 / 3}
@media(max-height:340px) {
  .touch-campus .echo-phone-layout {--finder-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 74px)}
  .touch-campus .echo-photo-toolbar {gap:4px;padding:5px}
  .touch-campus .echo-photo-movement {grid-template-columns:repeat(3,30px)}
  .touch-campus .echo-phone-view [data-photo-move] {min-height:30px}
}
.touch-campus .echo-notice-stack {top:calc(var(--safe-top) + 47px);width:min(310px,44vw);gap:6px}
.touch-campus:has(.echo-dialog[open]) :is(.echo-toast,.echo-chapter-card,.echo-control-tip) {display:none}
.touch-campus .echo-dialog>header button {min-height:38px;min-width:38px;justify-content:center}
.touch-campus .echo-dialog>header kbd {display:none}
.touch-campus .echo-chapter-card {padding:8px 12px}
.touch-campus .echo-chapter-card h2 {font-size:1.2rem}
.touch-campus .echo-chapter-card .sub {font-size:.68rem}

.touch-campus .echo-dialog[data-view="photo-preview"] .echo-photo-preview {
  object-fit:contain;max-height:calc(var(--dialog-height) - 78px);
  -webkit-touch-callout:default;
}
.touch-campus .echo-album-shot {width:100%;display:grid;gap:6px;margin:0}
.touch-campus .echo-album-shot img,.touch-campus .echo-photo-preview {display:block;width:100%;border-radius:5px}
.touch-campus .echo-album-shot figcaption {font-size:.8rem;color:var(--quiet)}

/* ---- 明信片墙 ---- */

/* ---- 此刻 ---- */
.echo-now {border:1px solid var(--rule);border-radius:9px;padding:6px 9px;background:#fffdf8}
.echo-now summary {min-height:28px;align-content:center;cursor:pointer;font-size:.83rem;font-weight:700}
.touch-campus .echo-now summary {min-height:32px}
.echo-now[open] summary {margin-bottom:4px}
.echo-map-plans {display:grid;gap:5px}
.echo-now h3 {margin-top:0}
.echo-now-clock {margin:0 0 8px;font-size:.78rem;color:var(--quiet);font-variant-numeric:tabular-nums}
.echo-now-list {list-style:none;margin:0;padding:0;display:grid;gap:4px}
.echo-now-away li,.echo-dialog .echo-now-list button {
  display:flex;gap:8px;align-items:baseline;font-size:.8rem;padding:4px 6px;
}
.echo-dialog .echo-now-list button,.echo-dialog .echo-map-plans button {width:100%;min-height:32px;background:transparent}
.echo-dialog .echo-map-plans button {display:grid;gap:2px}
.echo-now-list strong {font-weight:600;color:var(--paper);flex:none;min-width:4.6em}
.echo-now-list span {color:var(--quiet);line-height:1.5}
.echo-plan {display:grid;gap:2px;font-size:.83rem;padding:5px 6px;border-radius:6px;cursor:pointer}
.echo-plan p {margin:0}
.echo-plan:hover {background:#fbe4e6}
.echo-now-warn {margin:8px 0 0;font-size:.8rem;color:var(--gold);font-weight:600}

.echo-now-away li {cursor:default;opacity:.78}
.echo-now-away li:hover {background:none}

/* ---------- 社交层（学生证 / 公屏 / 好友 / 留言板 / 公告） ---------- */
.social-me {
  display:flex;align-items:center;gap:8px;margin-left:8px;padding:3px 8px 3px 10px;
  border:0;border-left:1px solid var(--rule);background:transparent;color:var(--paper);
  cursor:pointer;text-align:left;pointer-events:auto;border-radius:0 8px 8px 0;
}
.social-me:hover {background:#f1f6fb}
.social-me i {
  width:30px;height:30px;flex:none;border-radius:50%;display:grid;place-items:center;
  background:#315e9b;color:#fff;font-style:normal;font-weight:700;font-size:.82rem;
}
.social-me i svg {width:17px;height:17px}
.social-me span {display:block;line-height:1.15}
.social-me b {display:block;font-size:.82rem;font-weight:700}
.social-me small {display:block;color:var(--quiet);font-size:.62rem;margin-top:2px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.social-links {
  display:flex;flex:none;gap:5px;padding:4px 8px;border-top:1px solid var(--rule);
  background:#f1f6fa80;
}
.social-links button {
  position:relative;display:flex;align-items:center;justify-content:center;flex:1;
  min-height:31px;padding:3px 5px;color:var(--paper);background:#fffdf870;
  border:1px solid #9bb0c660;border-radius:6px;font:650 .72rem/1 var(--display);
  cursor:pointer;white-space:nowrap;
}
.social-links button:hover {border-color:var(--gold);color:var(--gold)}
.social-links em {
  position:absolute;right:3px;top:3px;min-width:12px;padding:0 2px;
  border-radius:20px;background:var(--gold);color:#fff;
  font:700 .54rem/1.4 var(--display);font-style:normal;text-align:center;
}
.social-chat-dot {width:6px;height:6px;border-radius:50%;background:var(--gold)}

.social-chat {
  position:fixed;right:var(--margin);bottom:calc(var(--margin) + 54px);z-index:4;
  width:min(322px,calc(100vw - 24px));display:flex;flex-direction:column;overflow:hidden;
  background:var(--hud);border:1px solid var(--rule);border-radius:12px;
  box-shadow:0 5px 18px #1f2b3d26;font-size:.74rem;color:var(--paper);
}
.social-chat-body {order:-1;min-height:0;overflow:auto}
.social-fold {
  display:flex;align-items:center;gap:8px;width:100%;flex:none;padding:7px 9px 7px 11px;
  border:0;background:transparent;color:var(--paper);font:750 .8rem/1 var(--display);cursor:pointer;
}
.social-chat[data-open="1"] .social-fold {border-top:1px solid var(--rule);padding-top:6px}
.social-fold:hover {background:#f1f6fb}
.social-fold:focus-visible {outline:2px solid var(--blue);outline-offset:-3px}
.social-fold-arrow {
  display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--rule);
  border-radius:6px;background:#fff;color:var(--quiet);
}
.social-online {display:flex;align-items:center;gap:5px;margin-left:auto;color:var(--quiet);font-size:.64rem}
.social-online i {width:6px;height:6px;border-radius:50%;background:#3f9c6b;box-shadow:0 0 0 2px #3f9c6b26}
.social-tabs {display:flex;gap:4px;padding:6px 8px 0}
.social-tabs button {
  border:1px solid var(--rule);border-bottom:0;background:#f1f6fb;color:var(--quiet);
  border-radius:7px 7px 0 0;padding:5px 11px;font:650 .7rem/1 var(--display);cursor:pointer;
}
.social-tabs button.on {background:#fffdf8;color:var(--paper);box-shadow:inset 0 2px 0 var(--gold)}
.social-tabs.in-card {padding:0 0 8px;gap:6px;flex-wrap:wrap}
.social-tabs.in-card button {border:1px solid var(--rule);border-radius:7px;padding:5px 9px}
.social-tabs.in-card button.on {background:#fbe4e6;color:var(--gold)}
.social-log {height:190px;overflow:auto;padding:6px 10px 8px;line-height:1.5;scrollbar-width:thin}
.social-chat[data-open="0"] .social-chat-body,
.social-mobile-fold,.social-chat-preview,.social-mobile-online {display:none}
.social-line {display:flex;align-items:baseline;gap:5px;margin:3px 0;word-break:break-word}
.social-line time {flex:none;color:#93a1b2;font-size:.6rem;font-variant-numeric:tabular-nums}
.social-line .who {border:0;background:none;padding:0;color:var(--blue);font:650 .72rem/1.4 var(--display);cursor:pointer}
.social-line .who::after {content:"："}
.social-line span {color:#3c4a5e}
.social-line.self span {color:var(--gold)}
.social-empty {margin:8px 0;color:#94a1b1;font-size:.7rem;text-align:center}
.social-say {display:flex;gap:6px;padding:7px 8px;border-top:1px solid var(--rule);background:#fffdf8}
.social-say input {
  flex:1;min-width:0;border:1px solid var(--rule);background:#fff;border-radius:7px;
  padding:6px 8px;font:400 .72rem/1.4 var(--display);color:var(--paper);
}
.social-say input:focus {outline:2px solid #9db8d8;outline-offset:-1px}
.social-say button {
  border:1px solid #ca8e96;background:#fbe4e6;color:#752837;border-radius:7px;
  padding:0 11px;font:700 .72rem/1 var(--display);cursor:pointer;
}
.social-say button:disabled {opacity:.5;cursor:default}

.social-sheet {
  position:fixed;inset:0;z-index:75;display:flex;align-items:center;justify-content:center;
  padding:18px;background:#0f182590;backdrop-filter:blur(3px);
}
.social-sheet[hidden] {display:none}
.social-card {
  width:min(400px,92vw);max-height:86vh;overflow:auto;background:var(--panel);
  border:1px solid var(--rule);border-radius:14px;box-shadow:0 16px 48px #0d162094;
  color:var(--paper);font-size:.8rem;
}
.social-card.wide {width:min(520px,94vw)}
.social-card-head {display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--rule)}
.social-card-head h2 {margin:0;font:800 1rem/1.2 var(--display)}
.social-x {margin-left:auto;border:0;background:#f1f6fb;color:var(--quiet);width:26px;height:26px;border-radius:50%;font-size:1rem;line-height:1;cursor:pointer}
.social-x:hover {background:#fbe4e6;color:var(--gold)}

/* 学生证 */
.social-card.student {border-radius:12px;overflow:hidden}
.sc-band {
  display:flex;align-items:baseline;gap:8px;padding:11px 15px;background:#2f6b46;color:#f4fbf3;
}
.sc-band span {font-size:.68rem;letter-spacing:.1em;opacity:.85}
.sc-band strong {font:800 1.05rem/1 var(--display);letter-spacing:.06em}
.sc-band em {margin-left:auto;font-style:normal;font-size:.66rem;background:#ffffff26;padding:2px 7px;border-radius:99px}
.sc-main {display:flex;gap:14px;padding:14px 15px 6px}
.sc-photo {
  width:104px;height:128px;flex:none;border:1px solid #9fbfa9;border-radius:4px;
  background:linear-gradient(#eef7ee,#dfeee2);overflow:hidden;
}
.sc-photo canvas {width:100%;height:100%;display:block}
.sc-main dl {flex:1;margin:2px 0 0;display:grid;grid-template-columns:auto 1fr;gap:8px 10px;align-content:start}
.sc-main dt {color:var(--quiet);font-size:.66rem;letter-spacing:.08em}
.sc-main dd {margin:0;font:700 .88rem/1.3 var(--display);border-bottom:1px dashed #b9c9d8;padding-bottom:3px}
.sc-quote {margin:6px 15px 0;color:#4c5a6d;font-size:.76rem;line-height:1.5}
.sc-foot {display:flex;justify-content:space-between;margin:10px 15px 0;padding-top:8px;border-top:1px solid var(--rule);color:var(--quiet);font-size:.64rem}
.sc-actions {display:flex;gap:8px;justify-content:flex-end;padding:12px 15px 14px;flex-wrap:wrap}
.sc-actions button, .friend-row button, .social-add button {
  border:1px solid var(--rule);background:#fff;color:var(--paper);border-radius:7px;
  padding:6px 11px;font:650 .72rem/1 var(--display);cursor:pointer;
}
.sc-actions button:hover, .friend-row button:hover {border-color:var(--gold);color:var(--gold)}
.sc-actions .primary {background:#315e9b;border-color:#315e9b;color:#fff}
.sc-actions .primary:hover {background:#274d80;color:#fff}
.sc-actions .ghost, .friend-row .ghost {color:var(--quiet)}

.social-form {display:grid;gap:10px;padding:14px 15px}
.social-form label {display:grid;gap:4px;color:var(--quiet);font-size:.66rem;letter-spacing:.06em}
.social-form input {
  border:1px solid var(--rule);border-radius:7px;padding:7px 9px;background:#fff;
  font:400 .82rem/1.4 var(--display);color:var(--paper);
}
.social-form input:focus {outline:2px solid #9db8d8;outline-offset:-1px}

/* 好友 / 私聊 */
.friend-list, .board-list, .notice-list {list-style:none;margin:0;padding:6px 0;max-height:46vh;overflow:auto}
.friend-row {display:flex;align-items:center;gap:6px;padding:7px 14px;border-bottom:1px solid #edf1f6}
.friend-row:last-child {border-bottom:0}
.friend-row .dot {width:7px;height:7px;flex:none;border-radius:50%;background:#c3ccd8}
.friend-row .dot.on {background:#3f9c6b;box-shadow:0 0 0 2px #3f9c6b26}
.friend-row .friend-name {flex:1;min-width:0;border:0;background:none;padding:0;text-align:left;cursor:pointer;color:var(--paper);font:650 .78rem/1.4 var(--display)}
.friend-name small {display:block;color:var(--quiet);font-size:.62rem;margin-top:2px;font-weight:400}
.friend-row .wait {color:var(--quiet);font-size:.64rem}
.social-add {display:flex;gap:6px;padding:10px 14px 13px;border-top:1px solid var(--rule)}
.social-add input {flex:1;border:1px solid var(--rule);border-radius:7px;padding:6px 9px;font-size:.76rem}
.dm-log {height:250px;overflow:auto;padding:10px 14px;display:flex;flex-direction:column;gap:6px}
.dm-log p {margin:0;display:flex;gap:6px;align-items:baseline}
.dm-log time {color:#93a1b2;font-size:.6rem;flex:none}
.dm-log span {background:#f1f6fb;border-radius:9px;padding:5px 9px;max-width:78%;line-height:1.45}
.dm-log p.self {justify-content:flex-end}
.dm-log p.self span {background:#e4f0fb;color:#22456f}
.dm-say {border-top:1px solid var(--rule)}

/* 留言板 / 公告 */
.board-list li, .notice-list li {padding:9px 14px;border-bottom:1px solid #edf1f6}
.board-list li:last-child, .notice-list li:last-child {border-bottom:0}
.board-list div, .notice-list div {display:flex;align-items:baseline;gap:8px}
.board-list b, .notice-list b {font:700 .8rem/1.3 var(--display)}
.board-list time, .notice-list time {margin-left:auto;color:#93a1b2;font-size:.62rem}
.board-list p, .notice-list p {margin:4px 0 0;line-height:1.55;color:#415066;white-space:pre-wrap;font-size:.76rem}
.notice-list li:first-child {background:#fbf6e8}

.social-toast {
  position:fixed;left:50%;top:calc(var(--margin) + 64px);transform:translate(-50%,-6px);z-index:80;
  max-width:min(420px,80vw);padding:7px 14px;border:1px solid var(--rule);border-radius:8px;
  background:var(--hud);color:var(--paper);font-size:.76rem;text-align:center;
  opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;
}
.social-toast.on {opacity:1;transform:translate(-50%,0)}

@media (max-width:1000px), (pointer:coarse) {
  .social-me small {display:none}
  .social-chat {width:min(300px,calc(100vw - 24px));max-height:calc(100dvh - 128px)}
  .social-log {height:min(150px,34dvh)}
}

/* 手机社交窗口 */
.touch-campus .social-sheet {background:#0f18254a;backdrop-filter:none}
.touch-campus .social-card.wide {
  width:min(350px,84vw);max-height:min(74dvh,calc(100dvh - var(--safe-top) - var(--safe-bottom)));
  border-radius:11px;overscroll-behavior:contain;box-shadow:0 10px 32px #0d162050;
}
.touch-campus .social-card.wide .social-card-head {
  position:sticky;top:0;z-index:1;padding:4px 9px;background:var(--panel);
}
.touch-campus .social-card.wide .social-card-head h2 {font-size:.91rem}
.touch-campus .social-card.wide .social-x {width:34px;height:34px}
.touch-campus .social-card.wide .social-tabs.in-card {padding:5px 8px 0;gap:4px}
.touch-campus .social-card.wide .social-tabs.in-card button {min-height:32px;padding:3px 7px}
.touch-campus .social-card.wide :is(.friend-list,.board-list,.notice-list) {
  padding:3px 0;max-height:none;overflow:visible;
}
.touch-campus .social-card.wide :is(.friend-row,.board-list li,.notice-list li) {padding:6px 9px}
.touch-campus .social-card.wide .social-empty {margin:0;padding:7px 9px;color:var(--quiet)}
.touch-campus .social-card.wide :is(.social-add,.social-say) {padding:5px 8px;gap:5px}
.touch-campus .social-card.wide :is(.social-add,.social-say) input {min-width:0;min-height:36px;font-size:16px}
.touch-campus .social-card.wide :is(.social-add,.social-say,.friend-row) button {min-height:34px}
.touch-campus .social-card.wide .dm-log {height:auto;max-height:34dvh;padding:6px 9px}

/* 世界切换与场景人物交流 */
#live-toggle {
  display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;min-width:48px;min-height:34px;margin-top:5px;
  padding:0 8px;border:1px solid var(--rule);border-radius:9px;
  background:var(--hud);color:var(--paper);font:700 .75rem/1 var(--display);
  cursor:pointer;white-space:nowrap;pointer-events:auto;
}
#live-toggle[aria-pressed="true"] {background:#eaf3fa;color:#254f74;border-color:#a8c1d5}
#live-toggle:disabled {opacity:.65;cursor:wait}
#live-toggle svg {display:block;width:15px;height:15px}
.touch-campus #live-toggle {justify-content:center;gap:3px;padding:0 4px;font-size:.68rem}
.touch-campus #live-toggle svg {width:12px;height:12px}
.echo-dialog.echo-world-confirm {width:min(430px,calc(100vw - 32px));overflow:auto}
.echo-world-confirm form {display:grid;gap:11px;padding:20px 22px}
.echo-world-confirm h2 {margin:0 0 3px;font:800 1.3rem/1.2 var(--display)}
.echo-world-confirm p {margin:0;color:var(--quiet);font-size:.88rem;line-height:1.55}
.echo-world-confirm footer {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:6px}
.touch-campus .echo-dialog.echo-world-confirm {width:min(410px,86vw)}
.touch-campus .echo-world-confirm form {gap:8px;padding:13px 16px}
.touch-campus .echo-world-confirm h2 {font-size:1rem}
.touch-campus .echo-world-confirm p {font-size:.8rem}
/* 世界开关：个人世界只有你自己，不报人数；公共世界才显示人数 */
#live-toggle[data-world="personal"] {color:var(--paper)}
#live-toggle[data-world="personal"] svg {opacity:.85}
#live-toggle[data-world="public"] {background:#eaf3fa;color:#254f74;border-color:#a8c1d5}
#social-ui[data-world="personal"] .social-online {display:none}
.live-toast {
  position:fixed;left:50%;bottom:112px;transform:translateX(-50%);z-index:61;
  background:#121a22d1;color:#eef3f6;font:13px/1.4 system-ui,sans-serif;
  padding:7px 12px;border-radius:99px;pointer-events:none;text-align:center;
  max-width:min(80vw,380px);transition:opacity .2s;
}
.live-toast.out {opacity:0}
.touch-campus .live-toast {top:calc(var(--safe-top) + 44px);bottom:auto}
.social-card.social-player,.touch-campus .social-card.social-player {width:min(300px,84vw)}
.social-player-info {padding:8px 10px}
.social-player-info p {margin:0 0 5px;color:var(--quiet);overflow-wrap:anywhere}
.social-player-info .sc-actions {justify-content:flex-start;padding:0;gap:5px}
.social-player-info .sc-actions button {min-height:34px}
.social-player-more {margin-top:5px}
.social-player-more summary {padding:4px 0;color:var(--blue);cursor:pointer}

.touch-campus:is(.echo-filming,.echo-camera-photo) #echo-mobile-social {display:none}
.touch-campus #echo-mobile-social .echo-world-controls {
  position:fixed;z-index:4;inset:calc(var(--safe-top) + 49px) var(--safe-right) auto auto;display:grid;gap:4px;margin:0;
}
.touch-campus #echo-mobile-social :is(#live-toggle,.social-mobile-fold,#story-fab) {
  box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;
  width:94px;min-height:30px;height:30px;margin:0;padding:0 7px;gap:5px;
  border:1px solid var(--rule);border-radius:8px;background:var(--hud-button);
  box-shadow:0 2px 6px #17233124;font:700 .67rem/1 var(--display);color:var(--paper);white-space:nowrap;
}
.touch-campus #echo-mobile-social #story-fab[hidden] {display:none}
.touch-campus #echo-mobile-social #live-toggle[aria-pressed="true"] {color:#254f74;background:color-mix(in srgb,#eaf3fa var(--button-alpha),transparent)}
.echo-world-transfer {
  position:fixed;z-index:65;inset:0;display:grid;place-content:start center;
  padding:max(28px,calc(env(safe-area-inset-top) + 20px)) 12px 0;
  background:linear-gradient(#102027ad,transparent 31%);
  color:#fffdf4;font:700 .94rem/1.4 var(--display);text-align:center;
  text-shadow:0 1px 4px #101b20;
}
.echo-transferring :is(.echo-top,.echo-minimap,.echo-mission,.echo-dock,.echo-control-tip,.echo-touch-controls,.echo-drive,.social-chat,#echo-mobile-social) {visibility:hidden}
.touch-campus .social-chat {
  position:relative;inset:auto;
  width:max-content;max-height:none;overflow:visible;align-items:flex-start;gap:5px;
  border:0;background:none;box-shadow:none;pointer-events:none;
}
.touch-campus .social-fold {display:none}
.touch-campus :is(.social-mobile-fold,.social-chat-body) {
  pointer-events:auto;background:var(--hud);color:var(--paper);
  border:1px solid var(--rule);box-shadow:0 3px 12px #1f2b3d26;
}
.touch-campus .social-mobile-fold {
  display:flex;align-items:center;min-height:36px;padding:0 9px;gap:5px;
  border-radius:99px;font:700 .75rem/1 var(--display);cursor:pointer;white-space:nowrap;
}
.social-mobile-icon svg {display:block;width:14px;height:14px}
.touch-campus .social-chat-preview {
  position:absolute;right:calc(100% + 5px);top:0;height:100%;
  display:flex;align-items:center;gap:5px;min-width:0;max-width:0;
  overflow:hidden;opacity:0;transition:max-width .2s ease,opacity .16s ease;
}
.touch-campus .social-mobile-fold[data-preview="1"] .social-chat-preview {
  max-width:min(220px,42vw);opacity:1;background:var(--hud);padding:0 7px;border-radius:8px;
}
.touch-campus .social-chat-preview :is(strong,span) {
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.touch-campus .social-chat-preview strong {
  flex:0 1 auto;max-width:7em;padding-left:6px;border-left:1px solid var(--rule);
  font-size:.65rem;color:var(--quiet);
}
.touch-campus .social-chat-preview span {font-size:.73rem;font-weight:500}
.touch-campus .social-chat-body {
  position:absolute;right:calc(100% + 5px);top:0;
  display:flex;flex-direction:column;width:min(295px,76vw);overflow:hidden;border-radius:11px;
  max-height:max(92px,calc(100dvh - var(--safe-top) - var(--safe-bottom) - 94px));
}
.touch-campus .social-mobile-online {display:flex;margin-right:4px}
.touch-campus .social-log {min-height:0;height:min(100px,24dvh)}
.touch-campus .social-say {flex-shrink:0}
.touch-campus .social-say input {min-width:0}
@media (prefers-reduced-motion:reduce) {
  .touch-campus .social-chat-preview {transition:none}
}

/* ---------- 微信登录 ---------- */
.wx-gate {
  position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:20px;
  background:#0f1825a8;backdrop-filter:blur(3px);
}
.wx-card {
  position:relative;width:min(560px,94vw);max-height:92%;overflow:auto;
  background:#fffdf8;border:1px solid #d7e0ea;border-radius:16px;
  box-shadow:0 20px 60px #0b14218c;color:#28374c;padding:20px 22px 18px;
  font-size:.82rem;
}
.wx-x {
  position:absolute;right:12px;top:12px;width:28px;height:28px;border:0;border-radius:50%;
  background:#f1f6fb;color:#53647c;font-size:1.05rem;line-height:1;cursor:pointer;
}
.wx-x:hover {background:#e8eff7;color:#28374c}
.wx-brand {display:flex;align-items:center;gap:10px;margin-bottom:16px}
.wx-logo {
  width:34px;height:34px;border-radius:9px;background:#07c160;color:#fff;
  display:grid;place-items:center;font:700 .95rem/1 var(--display);font-style:normal;
}
.wx-brand b {display:block;font:800 1.02rem/1.2 var(--display)}
.wx-brand span {display:block;color:#7b8899;font-size:.68rem;margin-top:3px}
.wx-body {display:flex;gap:18px;align-items:flex-start}
.wx-qr {
  width:230px;height:230px;flex:none;border:1px solid #dfe7f0;border-radius:12px;padding:14px;box-sizing:border-box;
  background:#fff;display:grid;place-items:center;overflow:hidden;
}
.wx-qr img,.wx-qr canvas {width:100%!important;height:100%!important;object-fit:contain;display:block}
.wx-qr-empty {padding:12px;color:#8b98a9;font-size:.72rem;text-align:center;line-height:1.6}
.wx-side strong {display:block;font:750 .9rem/1.3 var(--display);margin-bottom:6px}
.wx-side p {margin:0 0 8px;color:#53647c;line-height:1.65}
.wx-side ul {margin:0;padding-left:16px;color:#6d7b8d;line-height:1.8;font-size:.72rem}
.wx-state {
  margin:14px 0 0;padding:7px 10px;border-radius:8px;background:#f2f7ee;
  color:#2f6b46;font-size:.72rem;text-align:center;
}
.wx-state[data-tone="bad"] {background:#fbecec;color:#a74352}
.wx-actions {display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.wx-actions button, .wx-actions a {
  border:1px solid #d7e0ea;background:#fff;color:#28374c;border-radius:8px;
  padding:8px 14px;font:650 .74rem/1 var(--display);cursor:pointer;text-decoration:none;
  display:inline-flex;align-items:center;justify-content:center;
}
.wx-actions button:hover, .wx-actions a:hover {border-color:#07c160;color:#07864a}
.wx-actions .wx-wechat {background:#07c160;border-color:#07c160;color:#fff}
.wx-actions .wx-wechat:hover {background:#06ad56;color:#fff}
.wx-actions .wx-primary {background:#315e9b;border-color:#315e9b;color:#fff;margin-left:auto;padding:9px 22px}
.wx-actions .wx-primary:hover {background:#274d80;color:#fff}
.wx-note {margin:10px 0 0;color:#93a1b2;font-size:.64rem;line-height:1.6}

/* 首次资料 */
.wx-profile {width:min(620px,95vw)}
.wx-head {margin:2px 0 14px}
.wx-head b {display:block;font:800 1.1rem/1.2 var(--display)}
.wx-head span {display:block;color:#7b8899;font-size:.7rem;margin-top:4px}
.wx-form-body {display:flex;gap:18px}
.wx-avatar {
  width:132px;height:172px;flex:none;border:1px solid #cfdce8;border-radius:8px;
  background:#eef4ee;overflow:hidden;display:flex;flex-direction:column;
}
.wx-avatar canvas {width:100%;height:150px;display:block}
.wx-avatar small {display:block;text-align:center;color:#7b8899;font-size:.62rem;padding:3px 0 5px;background:#fffdf8}
.wx-fields {flex:1;display:grid;gap:9px;align-content:start}
.wx-fields label {display:grid;gap:4px;color:#7b8899;font-size:.64rem;letter-spacing:.05em}
.wx-fields input {
  border:1px solid #d7e0ea;border-radius:7px;padding:7px 9px;background:#fff;
  font:400 .82rem/1.4 var(--display);color:#28374c;
}
.wx-fields input:focus {outline:2px solid #9db8d8;outline-offset:-1px}
.wx-models {display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:12px}
.wx-model {
  border:1px solid #d7e0ea;background:#fff;color:#53647c;border-radius:7px;
  padding:7px 6px;font:600 .68rem/1.3 var(--display);cursor:pointer;text-align:center;
}
.wx-model:hover {border-color:#9db8d8}
.wx-model.on {border-color:#315e9b;background:#eef4fc;color:#22456f;box-shadow:inset 0 0 0 1px #315e9b}
@media (max-width:640px) {
  .wx-card {padding:16px}
  .wx-body {flex-direction:column;align-items:center;text-align:left}
  .wx-side {width:100%}
  .wx-form-body {flex-direction:column;align-items:center}
  .wx-fields {width:100%}
  .wx-models {grid-template-columns:repeat(2,1fr)}
}

/* ---- 右手转视角灵敏度滑块 ---- */
.echo-range {display:flex;gap:10px;align-items:center}
.echo-range input[type="range"] {flex:1;min-height:26px;padding:0;border:0;background:transparent;accent-color:var(--blue);cursor:pointer}
.echo-range-value {min-width:44px;text-align:right;color:var(--quiet);font-variant-numeric:tabular-nums;font-size:.82rem}


/* HUD 按钮只降低底色不透明度，保留文字与图标的对比度。 */
.echo-play :is(.echo-top-actions button,.echo-prompt button,.echo-drive button,.echo-touch-actions button,
  .echo-dock button:not([data-tab="explore"]),.social-mobile-fold,.social-fold,#live-toggle) {
  background-color:var(--hud-button);
}
.echo-play :is(.echo-dock button:not([data-tab="explore"]),.echo-touch-actions button,.social-mobile-fold,#live-toggle):active {
  background-color:color-mix(in srgb,#f7dadd var(--button-alpha),transparent);
}
.echo-play #live-toggle[aria-pressed="true"] {background-color:#eaf3fac7}
.echo-play :is(.echo-dialog:not([data-view="explore"]),.social-card) button:not(.echo-primary,.primary,[aria-current],[aria-pressed="true"]) {
  background-color:var(--hud-button);
}

.echo-mine-profile,.echo-mine-records {display:grid;gap:7px}
.echo-mine-identity {display:flex;align-items:center;gap:14px}
.echo-mine-identity>:last-child {min-width:0;overflow-wrap:anywhere}
.echo-mine-portrait {display:block;flex:none;width:92px;height:124px;border:1px solid var(--rule);border-radius:10px;background:#e7eee7}
.echo-mine-pet {border:1px solid var(--rule);border-radius:10px;padding:8px 12px}
.echo-mine-pet>summary {cursor:pointer;font-weight:650}
.echo-mine-pet>div {display:grid;gap:7px;padding-top:8px}
.echo-mine-records {border-top:1px solid var(--rule);padding-top:8px}
.echo-mine-achievements {padding-inline-start:18px;margin:0;color:var(--quiet);font-size:.82rem}
.wx-fields select {width:100%;min-height:38px;border:1px solid var(--rule);border-radius:7px;background:#fff;color:var(--paper);font:inherit;padding:5px 8px}

/* ── 校园故事点：地上的金色呼吸光点 + 移动优先读/写面板 ───────────────── */
#story-fab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px 0 9px;
  border: 1px solid rgba(228, 190, 126, .75);
  border-radius: 999px;
  background: rgba(253, 248, 239, .92);
  color: #8a5f24;
  font: 600 12px/1 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  box-shadow: 0 2px 10px rgba(20, 24, 33, .16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#story-fab:hover { background: #fff; border-color: #d8a95c; color: #7a4f14; }
#story-fab:active { transform: translateY(1px); }
#story-fab i {
  width: 9px; height: 9px; border-radius: 2px;
  background: linear-gradient(140deg, #ffd99a, #d79a3f);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(240, 185, 95, .85);
}
#story-fab[hidden] { display: none; }
.echo-world-controls,.story-tools {display:flex;align-items:center;gap:4px;width:max-content;pointer-events:auto}
.echo-world-controls {margin-top:5px}
.echo-world-controls #live-toggle {margin:0}
#story-actions {
  position:fixed;inset:auto auto calc(var(--margin) + 40px) var(--margin);margin:0;
  padding:4px;border:1px solid var(--rule);border-radius:10px;background:var(--panel);
  color:var(--paper);box-shadow:0 5px 20px #11201535;
}
#story-actions button {
  display:flex;align-items:center;gap:6px;width:100%;min-height:36px;padding:4px 10px;
  border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;font-size:.8rem;cursor:pointer;
}
#story-actions button:hover {background:#e8f0e5}
.touch-campus #story-actions {inset:calc(var(--safe-top) + 112px) calc(var(--safe-right) + 99px) auto auto}
.story-visibility svg {width:16px;height:16px}
.touch-campus #story-fab {padding:0 6px;gap:4px;font-size:.68rem;white-space:nowrap}

#story-ui {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  /* 左右留边：微信小窗胶囊、刘海都在侧边，卡片贴边就会被挡住 */
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
#story-ui[hidden] { display: none; }
.story-scrim {
  position: absolute; inset: 0;
  background: rgba(12, 16, 22, .44);
  opacity: 0; transition: opacity .22s ease;
}
#story-ui[data-open="1"] .story-scrim { opacity: 1; }

/* 用百分比而不是 dvh 限高：微信内置浏览器和旧内核拿不到 dvh，会直接塌成溢出屏幕 */
.story-sheet {
  position: relative; z-index: 1;
  width: min(600px, 100%); max-height: 100%; flex: 0 1 auto;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px 18px;
  border-radius: 18px;
  background: #fdf8ef;
  border: 1px solid #ecdfc8;
  box-shadow: 0 16px 44px rgba(12, 16, 22, .3);
  transform: translateY(10px) scale(.99); opacity: 0;
  transition: transform .24s cubic-bezier(.22, .9, .3, 1), opacity .2s ease;
}
#story-ui[data-open="1"] .story-sheet { transform: none; opacity: 1; }
.story-sheet::before { display: none; }

.story-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.story-kicker {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  font: 600 12px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .08em; color: #a87b37;
}
.story-kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: #d9a459;
}
.story-x {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #e3d6bf; background: transparent;
  color: #6b6154; font: 500 12px/1 "PingFang SC", sans-serif; cursor: pointer;
}
.story-x:hover { background: #f5ecdd; color: #463f34; }

.story-figure {
  margin: 0 0 12px; border-radius: 14px; overflow: hidden;
  position: relative; width: 100%; max-height: 44vh;
  aspect-ratio: var(--story-photo-ratio, 4 / 3);
  background: #efe6d6;
}
.story-figure[data-shape="tall"] { max-height: min(50vh, 420px); }
.story-figure img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover;
}

.story-title {
  margin: 0 0 6px;
  font: 700 21px/1.35 "Songti SC", "Noto Serif SC", "SimSun", serif;
  color: #2c2518; letter-spacing: -.01em;
}
.story-meta { margin: 0 0 12px; font: 400 12px/1.5 "PingFang SC", sans-serif; color: #968872; }
.story-text {
  font: 400 15px/1.85 "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #3a332a; white-space: pre-wrap; word-break: break-word;
}
.story-loading, .story-empty { color: #a1937d; font-size: 13px; }

.story-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.story-like, .story-flag {
  height: 40px; padding: 0 16px; border-radius: 999px;
  font: 600 13px/1 "PingFang SC", sans-serif; cursor: pointer;
}
.story-like { border: 0; background: #f6e3c2; color: #8a5f24; }
.story-like:hover { background: #f2d9ae; }
.story-like[data-done="1"] { background: #efdcbd; color: #a8854b; cursor: default; }
.story-like b { font-weight: 700; }
.story-flag {
  border: 1px solid #e3d6bf; background: transparent; color: #8b7f6c;
}
.story-flag:hover { border-color: #d8b48a; color: #805f33; }

.story-pick {
  position: relative; display: grid; place-items: center;
  min-height: 140px; margin: 10px 0 14px;
  border: 1px dashed #ddc8a4; border-radius: 14px;
  background: #fffaf1; color: #9b8b71;
  font: 500 13px/1.5 "PingFang SC", sans-serif; cursor: pointer;
  overflow: hidden;
}
.story-pick:hover { border-color: #d0ae78; }
.story-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
/* 原比例：铺满可用宽度，高度跟着走，不裁切 */
.story-pick img {
  position: relative; z-index: 1;
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 36vh; object-fit: contain;
}
.story-pick[data-filled="1"] {
  min-height: 0; padding: 0; border-style: solid;
  border-color: #e6d7bd; background: #f4ecdf;
}
.story-pick[data-filled="1"] .story-pick-empty { display: none; }
.story-pick img[hidden] + .story-pick-empty, .story-pick-empty[hidden] { display: none; }

.story-field { display: grid; gap: 6px; margin-bottom: 14px; }
.story-field > span { font: 600 12px/1 "PingFang SC", sans-serif; color: #7d6f58; letter-spacing: .04em; }
.story-field input, .story-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid #e4d8c3; border-radius: 12px;
  background: #fffdf8; color: #2f2a22;
  font: 400 15px/1.6 "PingFang SC", "Microsoft YaHei", sans-serif;
  resize: vertical;
}
.story-field input:focus, .story-field textarea:focus {
  outline: 0; border-color: #d3a85f; box-shadow: 0 0 0 3px rgba(211, 168, 95, .16);
}
.story-field em { justify-self: end; font: 400 11px/1 "PingFang SC", sans-serif; color: #a9a08f; font-style: normal; }

.story-hint { margin: 0 0 14px; font: 400 12px/1.65 "PingFang SC", sans-serif; color: #9d9078; }
.story-submit {
  position: sticky; bottom: 0; z-index: 2;
  width: 100%; height: 46px; border: 0; border-radius: 999px;
  background: #c08c3f; color: #fffaf0;
  box-shadow: 0 -16px 16px -10px #fdf8ef, 0 2px 10px rgba(146, 102, 39, .22);
  font: 700 15px/1 "PingFang SC", sans-serif; cursor: pointer;
  box-shadow: 0 2px 10px rgba(146, 102, 39, .22);
}
.story-submit:hover { background: #ad7c33; }
.story-submit:disabled { opacity: .55; cursor: default; box-shadow: none; }

.story-done { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 10px 0 4px; }
.story-done-mark {
  width: 14px; height: 14px; margin: 6px 0 2px; border-radius: 3px;
  transform: rotate(45deg);
  background: linear-gradient(140deg, #ffd99a, #cf9440);
  box-shadow: 0 0 16px rgba(240, 185, 95, .8);
}

@media (min-width: 768px) and (pointer: fine) {
  #story-ui { justify-content: center; align-items: center; }
  .story-sheet {
    width: min(460px, calc(100vw - 64px));
    max-height: 86%;
    border-radius: 18px; border: 1px solid #ecdfc8;
    transform: translateY(12px) scale(.99);
    box-shadow: 0 18px 48px rgba(12, 16, 22, .28);
  }
  #story-ui[data-open="1"] .story-sheet { transform: none; }
  .story-sheet::before { display: none; }
  .story-figure:not([data-shape="tall"]) { max-height: min(44vh, 300px); }
  .story-title { font-size: 23px; }
}

/* 矮屏（横屏手机、小笔记窗口）：先让人读到字，再给图留位置 */
@media (max-height: 520px) {
  #story-ui { padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); }
  .story-sheet {
    width: min(600px, 100%);
    max-height: 100%;
    padding: 10px 16px 12px;
    border-radius: 14px;
  }
  .story-head { margin-bottom: 6px; }
  .story-kicker { font-size: 11px; }
  .story-x { height: 28px; padding: 0 10px; }
  .story-figure { margin-bottom: 8px; border-radius: 10px; }
  .story-figure { max-height: 30vh; }
  .story-figure[data-shape="tall"] { max-height: 34vh; }
  .story-pick img { max-height: 26vh; }
  .story-pick { min-height: 64px; margin: 6px 0 8px; }
  .story-title { font-size: 17px; line-height: 1.3; margin-bottom: 4px; }
  .story-text { font-size: 14px; line-height: 1.6; }
  .story-meta { margin-bottom: 6px; font-size: 11px; }
  .story-field { margin-bottom: 8px; }
  .story-field span { font-size: 11px; }
  .story-field input, .story-field textarea { min-height: 40px; padding: 6px 8px; font-size: 13px; }
  .story-field textarea { min-height: 58px; height: 58px; }
  .story-field em { font-size: 10px; }
  .story-hint { display: none; }
  .story-submit { height: 38px; margin-top: 6px; }
}

/* 竖屏也限制照片高度，给正文和底部操作留空间。 */
@media (max-width: 640px) {
  .story-figure { max-height: 38vh; }
  .story-figure[data-shape="tall"] { max-height: min(46vh, 380px); }
  .story-pick img { max-height: 30vh; }
}

.touch-campus #story-ui[data-pane="read"] .story-sheet {
  box-sizing:border-box;width:min(300px,100%);padding:8px 10px 10px;border:0;border-radius:12px;
}
.touch-campus #story-ui[data-pane="read"] .story-figure {
  width:100%;max-height:48vh;margin:0 auto 8px;border-radius:8px;
}
.touch-campus #story-ui[data-pane="read"] .story-figure[data-shape="tall"] {
  width:min(100%, 36vh);
}
.touch-campus #story-ui[data-pane="read"] .story-foot {margin-top:8px}
.touch-campus #story-ui[data-pane="read"] :is(.story-like,.story-flag) {height:32px;padding-inline:11px}

/* 横屏手机：登录卡先保住二维码和按钮，别整块顶出屏幕 */
@media (max-height: 520px) {
  .wx-card { width: min(620px, 96vw); max-height: 98%; padding: 12px 14px 12px; font-size: .76rem; }
  .wx-brand { margin-bottom: 8px; }
  .wx-qr { width: 148px; height: 148px; padding: 8px; }
  .wx-state { margin-top: 8px; padding: 5px 8px; }
  .wx-actions { margin-top: 8px; }
  .wx-note { display: none; }
  .wx-profile .wx-avatar { width: 92px; height: 120px; }
  .wx-avatar canvas { height: 100px; }
}

@media (min-width: 900px) and (pointer: fine) {
  .echo-play:not(.touch-campus) {
    --margin: clamp(16px, 1.55vw, 28px);
    --hud: #fffdf5ed;
    --rule: #b9c7c4;
    --paper: #24362e;
    --quiet: #495e54;
  }
  .echo-play:not(.touch-campus) :is(.echo-mark, .echo-calendar, .echo-compass, .echo-mission, .social-chat) {
    box-shadow: 0 5px 18px #10221924;
  }
  .echo-play:not(.touch-campus) .echo-mission {width: min(264px, 29vw);padding: 12px 14px}
  .echo-play:not(.touch-campus) .echo-mission h2 {font-size: 1.08rem;overflow-wrap: anywhere}
  .echo-play:not(.touch-campus) .echo-minimap {width: clamp(104px, 23dvh, 180px)}
  .echo-play:not(.touch-campus) .echo-dock button {
    min-height: 36px;gap: 6px;padding: 5px 8px;border-radius: 8px;box-shadow: none;
  }
  .echo-play:not(.touch-campus) .echo-control-tip {
    padding: 5px 10px;border-radius: 7px;background: #172a23e0;text-shadow: none;
  }
  .echo-play:not(.touch-campus) .social-log {height: min(185px, 28dvh)}
  .echo-play:not(.touch-campus) .echo-drive:has(button:not([hidden])) {right: auto;left: calc(var(--margin) + clamp(104px, 23dvh, 180px) + 12px)}
  .echo-play:not(.touch-campus) .echo-dialog {max-height: min(84dvh, 840px)}
  .echo-play:not(.touch-campus) .echo-dialog.echo-dialog-pages {width:min(1000px,90vw)}
  .echo-play:not(.touch-campus) .echo-dialog>header {background: #f3f3e9;padding-block: 12px}
  .echo-play:not(.touch-campus) .echo-dialog>header h2 {font-size: 1.35rem}
  .echo-play:not(.touch-campus) .echo-tabs {padding-block: 5px}
  .echo-play:not(.touch-campus) .echo-map-layout {grid-template-columns: minmax(0, 1fr) minmax(220px, 29%)}
}

@media (900px <= width < 1120px) and (pointer: fine) {
  .echo-play:not(.touch-campus) .echo-control-tip {bottom: calc(var(--margin) + 55px)}
}

/* Keep the mobile authorization card compact while retaining space for QR scanning. */
.touch-campus .wx-login-card {width:clamp(192px,31vw,238px);margin:auto}
.touch-campus .wx-login-card .wx-body {flex-direction:column;align-items:center;text-align:center;gap:6px}
.touch-campus .wx-login-card .wx-side ul {display:none}
.touch-campus .wx-login-card .wx-actions {justify-content:center}
.wx-login-wechat .wx-body[hidden] {display:none}

.echo-dialog[data-view="animal"] {
  width:min(370px,calc(100% - 24px));
  max-height:calc(100dvh - 24px);
  margin:auto 14px 14px auto;
}
.echo-dialog[data-view="animal"]::backdrop {background:#16273b33;backdrop-filter:none}
.echo-dialog[data-view="animal"] > header {padding:5px 12px}
.echo-dialog[data-view="animal"] .echo-content {padding:8px 11px 10px}
.echo-dialog[data-view="animal"] :is(.echo-caption,.echo-row) {margin-block:5px}
.echo-dialog[data-view="animal"] :is(button,select,input) {min-height:34px;font-size:.82rem}
.echo-dialog[data-view="animal"] button {padding:4px 7px}
.echo-cat-bond {display:flex;align-items:center;gap:8px;font-size:.82rem}
.echo-cat-bond progress {min-width:5rem;flex:1;height:.65rem;accent-color:#377051}
.echo-cat-details {margin-top:6px;font-size:.8rem}
.echo-cat-details summary {cursor:pointer;padding-block:4px}
.echo-cat-details .echo-field {flex:1;min-width:0}
.echo-cat-details select {max-width:min(190px,100%)}
.echo-cat-record {padding:7px 0;border-bottom:1px solid #879c8e44}
.echo-cat-record :is(h3,p) {margin-block:3px}
.touch-campus .echo-dialog[data-view="animal"] {
  width:min(350px,51vw);
  max-height:calc(100dvh - 18px);
  margin:auto max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) auto;
}

/* Short contextual dialogs */
.echo-play .echo-dialog:is([data-view="fish"],[data-view="quiz"]) {
  width:min(350px,calc(100% - 24px));border-radius:11px;
}
.echo-play .echo-dialog:is([data-view="fish"],[data-view="placement"],[data-view="quiz"]) > header {
  padding:5px 10px 5px 12px;gap:6px;background:var(--panel);
}
.echo-play .echo-dialog:is([data-view="fish"],[data-view="placement"],[data-view="quiz"]) > header h2 {
  font-size:1rem;line-height:1.2;
}
.echo-dialog:is([data-view="fish"],[data-view="placement"],[data-view="quiz"]) .echo-dialog-label {display:none}
.echo-play .echo-dialog:is([data-view="fish"],[data-view="placement"],[data-view="quiz"]) > .echo-content {
  padding:9px 12px 11px;
}
.echo-dialog:is([data-view="fish"],[data-view="placement"],[data-view="quiz"]) .echo-pane {gap:7px}
.echo-play .echo-dialog:is([data-view="fish"],[data-view="placement"],[data-view="quiz"]) button {
  min-height:34px;padding:4px 8px;font-size:.78rem;
}
.touch-campus .echo-dialog:is([data-view="fish"],[data-view="quiz"]) {
  width:min(320px,75vw);
}


/* Menu heading and game controls */
.echo-dialog-pages .echo-dialog-label {display:none}
.echo-calendar {
  gap:8px;padding:6px 10px;
  background:var(--panel);border-color:var(--rule);
  box-shadow:0 2px 7px #202b3d22;
}
.echo-calendar > svg {width:17px;height:17px}
.echo-calendar-readout {min-width:0;display:grid;gap:3px;text-align:left}
.echo-calendar-readout strong {line-height:1.1;flex-wrap:wrap;gap:2px 6px}
.echo-calendar-meta {display:flex;align-items:center;gap:5px;color:var(--quiet)}
#echo-season {white-space:nowrap}
.echo-calendar-readout #echo-clock {font-size:1.02em}
.echo-play:not(.touch-campus) .echo-dock button {
  min-height:40px;gap:6px;border-radius:9px;background:var(--hud);box-shadow:0 2px 7px #202b3d22;
}
.echo-play:not(.touch-campus) .social-fold {min-height:36px;padding:5px 8px;gap:7px}
.social-fold > svg {width:15px;height:15px;flex:none}
.social-fold strong {margin-inline-end:auto}
.social-fold .social-online {margin-inline-start:0}
.social-fold-arrow {order:1;border:0;background:transparent}


/* Share the background opacity while keeping text and icons solid. */
.echo-play :is(.echo-dock button,.echo-calendar,.echo-menu button,#echo-hud-restore,
  .echo-world-controls button,#echo-wallet,.social-mobile-fold,.social-fold,
  .echo-dialog .echo-tabs button:not([aria-current])) {background:var(--hud-button)}
.echo-play:not(.touch-campus) .social-chat[data-open="0"] {
  background-color:transparent;
}
.echo-play :is(.echo-menu button,.echo-icon-button,.echo-touch-actions button,.echo-drive button):hover {
  background-color:color-mix(in srgb,#f4f7fa var(--button-alpha),transparent);
}
.echo-play :is(.echo-dialog .echo-primary,.echo-dialog .echo-tabs button[aria-current],
  #echo-mobile-menu[aria-expanded="true"]) {
  background-color:color-mix(in srgb,#f9d9dc var(--button-alpha),transparent);
}
.echo-play #live-toggle[aria-pressed="true"] {
  background-color:color-mix(in srgb,#eaf3fa var(--button-alpha),transparent);
}
#echo-hud-restore:not([hidden]) {animation:echo-restore-fade .2s ease 1.8s both}
@keyframes echo-restore-fade {to {opacity:0}}
@media (prefers-reduced-motion:reduce) {
  #echo-hud-restore:not([hidden]) {animation:none}
}
