/* 四个视窗共享斜边，画面本身保持直立。外侧两块延伸到屏幕边缘。 */
html:has(.station-login) {
  color-scheme: dark;
  background: #10151b;
}
.station-login {
  --gutter: clamp(22px, 4.3vw, 104px);
  --base: var(--model-accent, #7ec8ff);
  --night: var(--model-night, #101b2b);
  --ink: #f5f2ed;
  --quiet: color-mix(in srgb, var(--base) 18%, #a4a5a8);
  --rule: color-mix(in srgb, var(--base) 15%, #25282b);
  --line: var(--rule);
  --mono: "Cascadia Mono", Consolas, monospace;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: Baskervville, Georgia, "Times New Roman", serif;
  box-sizing: border-box;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: linear-gradient(106deg, color-mix(in srgb, var(--night) 50%, #161719), #101216 58%, color-mix(in srgb, var(--night) 58%, #131518));
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.station-login *, .station-login *::before, .station-login *::after { box-sizing: border-box; }
.station-login [hidden] { display: none !important; }
.station-login button, .station-login input { font: inherit; }
.station-login button { cursor: pointer; }
.station-login a { color: inherit; }
.station-login :is(button, a, summary, input):focus-visible { outline: 2px solid var(--base); outline-offset: 4px; }
.station-login ::selection { background: var(--base); color: #12202a; }
.station-login .skip-link { position: fixed; z-index: 20; left: 12px; top: 12px; padding: 8px 15px; background: var(--base); color: #10151b; transform: translateY(-180%); }
.station-login .skip-link:focus { transform: none; }

.station-mast {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 5;
  min-height: clamp(60px, 8vh, 88px);
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--night) 37%, #0b0e12);
  border-bottom: 1px solid var(--rule);
}
.station-brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.station-brand > span:last-child { font: 650 clamp(15px, 1.32vw, 23px)/1.2 var(--sans); letter-spacing: .15em; }
.station-mark { display: flex; align-items: end; gap: 3px; width: 26px; height: 25px; transform: skewX(-13deg); }
.station-mark i { display: block; width: 5px; height: 10px; background: var(--base); }
.station-mark i:nth-child(2) { height: 17px; opacity: .8; }
.station-mark i:last-child { height: 24px; background: var(--model-secondary, #b9e8f5); }
.station-portal { border-left: 1px solid var(--rule); padding-left: 19px; color: var(--quiet); font: 10px/1.3 var(--mono); letter-spacing: .17em; }
.station-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.station-login :is(.fx-toggle,.music-player summary) {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px;
  padding: 5px 11px; border: 1px solid var(--rule); border-radius: 3px;
  background: transparent; color: var(--ink); font: 11px var(--sans);
}
.station-login :is(.fx-toggle,.music-player summary):hover { border-color: var(--base); }
.station-login .fx-toggle { font-family: var(--mono); }
.station-login .fx-toggle kbd { font: 9px var(--mono); opacity: .48; }
.fx-glyph { width: 6px; height: 6px; border-radius: 50%; background: var(--base); }
.fx-toggle[aria-pressed="false"] .fx-glyph { background: transparent; border: 1px solid currentColor; }
.station-login .music-symbol, .station-login .music-player[data-playing="true"] .music-symbol { color: var(--base); text-shadow: none; }
.station-login .music-popover { color: var(--ink); background: color-mix(in srgb, var(--night) 62%, #101115); border-color: var(--rule); }
.station-login .music-player[open] summary, .station-login .music-play { border-color: color-mix(in srgb, var(--base) 40%, transparent); }
.station-login .music-play { color: var(--ink); background: color-mix(in srgb, var(--base) 13%, transparent); }
.station-login .music-links :is(a,button) { color: var(--base); }
.station-login #music-volume { accent-color: var(--base); }

.station-login main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gallery { flex: 1 0 auto; display: flex; flex-direction: column; }
.gallery-heading {
  display: flex; align-items: center; gap: 16px; min-height: 50px; padding: 2px var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.gallery-heading h2 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: .08em; }
.gallery-help { border-left: 1px solid var(--rule); padding-left: 15px; color: var(--quiet); font-size: 12px; }
.replay { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0; background: none; border: 0; color: var(--quiet); font-size: 12px; white-space: nowrap; }
.replay > span { font: 20px/1 Georgia, serif; }
.replay:hover { color: var(--base); }
.replay:disabled { opacity: .43; cursor: default; }
.role-gallery {
  --slant: clamp(46px, 6.4vw, 156px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  flex: 1;
  min-height: clamp(340px, calc(100svh - 332px), 1000px);
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  background: #161b25;
}
.role-panel {
  --top-left: var(--slant); --bottom-right: calc(100% - var(--slant));
  position: relative; display: block; align-self: stretch;
  margin: 0 0 0 calc(var(--slant) * -.5); padding: 0; width: calc(100% + var(--slant)); min-width: 0;
  overflow: hidden; isolation: isolate; border: 0; border-radius: 0; text-align: left; color: #faf6f0;
  background: var(--tone); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  clip-path: polygon(var(--top-left) 0, 100% 0, var(--bottom-right) 100%, 0 100%);
}
.role-panel:first-child { --top-left: 0px; }
.role-panel:last-child { --bottom-right: 100%; }
.role-deepseek { --stage-light: #385e7d; --tone: #16283b; --color: #7ec8ff; --pose-peak: 1.076; --pose-tilt: -.9deg; }
.role-gemini { --stage-light: #705483; --tone: #33283f; --color: #c9a8ff; --pose-peak: 1.082; --pose-tilt: 1.25deg; }
.role-claude { --stage-light: #84583f; --tone: #382923; --color: #ffb27a; --pose-peak: 1.064; --pose-tilt: -.65deg; }
.role-gpt { --stage-light: #717383; --tone: #31323e; --color: #f4f5f8; --pose-peak: 1.086; --pose-tilt: .5deg; }
.role-panel[aria-disabled="true"] { cursor: default; }
.role-plate, .role-actor, .role-plate picture, .role-plate img, .role-plate canvas, .role-frame {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none;
}
.role-plate { background: radial-gradient(ellipse at 51% 30%, var(--stage-light), var(--tone) 82%); }
.role-plate img, .role-plate canvas { object-fit: cover; object-position: 50% 22%; }
.role-actor { transform-origin: 50% 43%; }
.role-plate canvas { visibility: hidden; }
.role-gallery:is([data-phase="playing"],[data-phase="finished"]) .role-plate canvas { visibility: visible; }
.role-gallery:is([data-phase="playing"],[data-phase="finished"]) picture { visibility: hidden; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  html:not([data-effects="off"]) .role-gallery[data-phase="loading"] :is(.role-identity,.role-state,.role-frame),
  .role-gallery[data-phase="playing"] .role-panel:not(.name-revealed) .role-identity,
  .role-gallery[data-phase="playing"] .role-panel[aria-disabled="true"] :is(.role-state,.role-frame) { visibility: hidden; }
  .role-gallery[data-phase="playing"] .role-panel .role-selected-label { visibility: hidden; opacity: 0; transition: none; }
  .role-panel[aria-disabled="true"] .seal-ring { stroke-dashoffset: 1; transition: none; }
  .role-gallery[data-phase="playing"] .role-panel.name-revealed .role-name,
  .role-gallery[data-phase="finished"] .choice-signed .role-identity::after { animation: sign-name .66s cubic-bezier(.16,.7,.27,1) both; }
  .role-gallery[data-phase="playing"] .role-panel.name-revealed .role-title { animation: sign-caption .50s .16s ease-out both; }
}
@keyframes sign-name {
  from { opacity: 0; transform: translateY(.16em); clip-path: inset(0 -.2em 100% -.2em); }
  to { opacity: 1; transform: none; clip-path: inset(-.25em -.2em -.3em -.2em); }
}
@keyframes sign-caption {
  from { opacity: 0; transform: translateX(-7px); }
  to { opacity: 1; transform: none; }
}
.role-panel::before {
  content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, #090c131f, transparent 23%, transparent 51%, #080b113b 68%, #080b11df 100%);
}
.role-panel::after {
  content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 3;
  clip-path: polygon(var(--top-left) 0, calc(var(--top-left) + 1.5px) 0, 1.5px 100%, 0 100%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color) 65%, #fbf4e8), #e9ece66b 56%, var(--color));
}
.role-panel:focus-visible { outline: none !important; }
.role-panel:focus-visible::before { outline: 2px solid var(--color); outline-offset: -4px; }
.role-panel:focus-visible .role-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .13em; }
.role-frame { z-index: 1; color: var(--color); }
.role-frame path, .seal-outline, .seal-ring, .seal-check { stroke-dasharray: 1; stroke-linejoin: round; stroke-linecap: round; }
.role-frame path { fill-opacity: 0; stroke: #e6e4df; stroke-width: 1.3; stroke-dashoffset: 1; opacity: 0; }
.choice-marked .role-frame path { fill-opacity: 1; stroke: var(--color); stroke-dashoffset: 0; opacity: .88; }
.role-identity, .role-state { position: absolute; z-index: 2; }
.role-identity { left: calc(var(--slant)*.42 + clamp(18px,2.1vw,50px)); bottom: clamp(19px,4.1vh,62px); }
.role-panel:first-child .role-identity { left: calc(var(--slant)*.5 + var(--gutter)); }
.role-name { display: block; color: #fcf5ed; font: italic 400 clamp(36px,4.45vw,108px)/.98 var(--display); letter-spacing: -.055em; text-shadow: 0 2px 20px #080a126b; }
.role-title { margin-top: 9px; display: flex; align-items: center; gap: 9px; color: var(--color); font: 500 clamp(12px,1.04vw,20px)/1.4 var(--sans); letter-spacing: .16em; }
.role-title::before { content: ""; width: 23px; height: 1px; background: currentColor; }
.role-state { top: clamp(12px,2.8vh,36px); right: calc(var(--slant)*.50 + 14px); width: 68px; aspect-ratio: 68/28; color: #fbf7f4; pointer-events: none; font: 600 11px/1 var(--sans); }
.role-state svg { display: block; width: 100%; height: 100%; overflow: visible; }
.seal-outline { fill: #10161c; fill-opacity: 0; stroke: var(--color); stroke-width: 1; stroke-dashoffset: 1; opacity: 0; }
.seal-ring { fill: #111720; fill-opacity: .42; stroke: #e6e5edaa; stroke-width: 1.35; stroke-dashoffset: 0; }
.seal-check { fill: none; stroke: #15202a; stroke-width: 1.8; stroke-dashoffset: 1; opacity: 0; }
.role-selected-label { position: absolute; left: 18%; top: 50%; transform: translate(-2px,-50%); visibility: hidden; opacity: 0; }
.choice-marked .seal-ring { fill: var(--color); fill-opacity: 1; stroke: var(--color); }
.choice-marked .seal-check { stroke-dashoffset: 0; opacity: 1; }
.choice-signed .seal-outline { stroke-dashoffset: 0; fill-opacity: .86; opacity: 1; }
.choice-signed .role-selected-label { visibility: visible; opacity: 1; transform: translate(0,-50%); }
.choice-signed .role-identity::after { content:""; position:absolute; top:calc(100% + 13px); left:0; height:2px; width:28px; background:var(--color); }
@media (scripting:enabled) and (prefers-reduced-motion:no-preference) {
  html:not([data-effects="off"]) .role-frame path { transition: opacity .15s, fill-opacity .15s; }
  html:not([data-effects="off"]) .choice-marked .role-frame path {
    transition: opacity .12s, stroke-dashoffset .52s cubic-bezier(.32,.1,.28,1), stroke .3s .25s, fill-opacity .32s .33s;
  }
  html:not([data-effects="off"]) .seal-ring { transition: stroke-dashoffset .38s ease-out, fill .28s, fill-opacity .28s, stroke .28s; }
  html:not([data-effects="off"]) .seal-outline,
  html:not([data-effects="off"]) .seal-check { transition: opacity .14s, stroke-dashoffset .18s ease-in, fill-opacity .14s; }
  html:not([data-effects="off"]) .role-selected-label { transition: opacity .14s, transform .14s, visibility 0s .14s; }
  html:not([data-effects="off"]) .choice-marked .seal-ring { transition-delay: 0s,.16s,.16s,.12s; }
  html:not([data-effects="off"]) .choice-marked .seal-check { transition: stroke-dashoffset .23s .25s ease-out, opacity .16s .20s; }
  html:not([data-effects="off"]) .choice-signed .seal-outline { transition: stroke-dashoffset .44s ease-out, fill-opacity .32s .24s, opacity .12s; }
  html:not([data-effects="off"]) .choice-signed .role-selected-label { transition: opacity .27s .34s, transform .27s .34s ease-out, visibility 0s; }
}
@media (hover:hover) {
  .role-panel[aria-disabled="false"]:hover .seal-ring { stroke: var(--color); }
}

.access-deck {
  display: grid; grid-template-columns: minmax(210px,.78fr) minmax(0,2.2fr); align-items: start;
  gap: clamp(24px,4vw,95px);
  padding: clamp(25px,4.7vh,68px) var(--gutter) clamp(24px,3.5vh,54px);
  border-top: 1px solid var(--rule);
  background: radial-gradient(ellipse 62% 135% at 0% 120%,color-mix(in srgb,var(--base) 9%,transparent),transparent 100%);
}
.access-intro { padding-top: 4px; }
html[data-model-theme="gpt"] .access-deck { background: linear-gradient(108deg, #373741, #24252f 56%, #191b23); }
.access-intro h1 { margin: 0; font: 600 clamp(24px,2.4vw,52px)/1.24 var(--sans); letter-spacing: -.035em; }
.access-intro p { margin: 10px 0 0; color: var(--quiet); font-size: clamp(12px,.9vw,16px); }
#access-form, .field { min-width: 0; }
#access-fieldset {
  margin: 0; padding: 0; border: 0; min-width: 0; display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) minmax(105px,.55fr);
  align-items: end; gap: clamp(10px,1.4vw,28px);
}
.field label { display: block; margin-bottom: 7px; font-size: 12px; color: #e1dedb; }
.input-wrap { display: flex; min-height: 47px; border: 1px solid var(--rule); border-radius: 4px; background: #0b10157d; }
.input-wrap:focus-within { border-color: var(--base); box-shadow: 0 0 0 1px var(--base); }
.input-wrap input { min-width: 0; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: var(--ink); outline: none !important; }
.input-wrap input::placeholder { opacity: 1; color: #93999f; font-size: 13px; }
.password-toggle { border: 0; padding: 4px 11px; background: transparent; color: var(--quiet); font-size: 11px !important; white-space: nowrap; }
.primary-action {
  display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 47px;
  border: 1px solid transparent; border-radius: 4px; padding: 10px clamp(14px,1.4vw,26px);
  background: var(--base); color: #111a20; font-weight: 650 !important;
}
.primary-action span:last-child { font: 21px/1 Georgia,serif; }
.primary-action:hover { background: color-mix(in srgb, var(--base) 80%, white); }
.primary-action:disabled { opacity: .65; cursor: wait; }
.field-error:empty, .login-status:empty { display: none; }
.field-error, .flash { color: #ffb4ae; font-size: 12px; }
.flash { margin-bottom: 14px; border-left: 2px solid currentColor; padding: 8px 10px; background: #ff958611; }
.flash.ok { color: #aadfbd; }
.access-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 11px; color: var(--quiet); font-size: 12px; }
.access-links > span { color: #6c7279; }
.access-links a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--quiet) 35%, transparent); }
.access-links a:hover { color: var(--base); }

@media (min-width:1800px) {
  .station-login { font-size: 16px; }
  .gallery-heading { min-height: 58px; }
  .gallery-heading h2 { font-size: 16px; }
  .gallery-help, .access-links, .field label { font-size: 14px; }
  .input-wrap, .primary-action { min-height: 54px; }
}
@media (max-width:980px) {
  .role-gallery { min-height: clamp(270px,calc(100svh - 356px),650px); }
  .access-deck { grid-template-columns: minmax(175px,.8fr) minmax(0,2.4fr); gap: 18px; }
  #access-fieldset { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 89px; }
  .role-name { font-size: clamp(30px,4.4vw,48px); }
  .role-title { margin-top: 7px; }
}
@media (max-width:720px), (min-width:721px) and (max-width:980px) and (orientation:portrait) {
  .station-login { --gutter: clamp(16px,4.5vw,28px); }
  .station-mast { min-height: 53px; gap: 12px; padding-block: 5px; }
  .station-brand { gap: 8px; }
  .station-mark { transform: skewX(-13deg) scale(.82); }
  .station-brand > span:last-child { font-size: 13px; letter-spacing: .12em; }
  .station-portal { display:none; }
  .station-tools { gap: 7px; }
  .station-login :is(.fx-toggle,.music-player summary) { min-height: 40px; min-width: 40px; padding: 5px 8px; }
  .fx-toggle kbd { display:none; }
  .gallery-heading { gap: 9px; min-height: 43px; }
  .gallery-heading h2 { font-size: 12px; letter-spacing: .03em; }
  .gallery-help { font-size: 10px; padding-left: 9px; }
  .replay { font-size: 11px !important; gap: 3px; }
  .gallery { flex: 0 0 auto; }
  .role-gallery { --slant: clamp(22px,8.2vw,50px); flex: none; min-height: 0; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: clamp(154px,calc((100svh - 332px) / 2),330px); row-gap: 1px; background: var(--rule); }
  .role-panel:nth-child(odd) { --top-left: 0px; }
  .role-panel:nth-child(even) { --bottom-right: 100%; }
  .role-plate img, .role-plate canvas { object-position: 50% 23%; }
  .role-identity, .role-panel:first-child .role-identity { left: calc(var(--slant)*.5 + 13px); bottom: 13px; }
  .role-name { font-size: clamp(27px,6.5vw,38px); }
  .role-title { margin-top: 3px; font-size: 10px; gap: 5px; }
  .role-title::before { width: 13px; }
  .role-state { right: calc(var(--slant)*.33 + 10px); top: 7px; width: 58px; font-size: 10px; }
  .role-panel:nth-child(even) .role-state { right: calc(var(--slant)*.5 + 10px); }
  .choice-signed .role-identity::after { display: none; }
  .access-deck { flex: 1; align-content:start; grid-template-columns: minmax(0,1fr); padding: 21px var(--gutter) max(24px,env(safe-area-inset-bottom)); gap: 15px; }
  .access-intro { padding:0; display:flex; align-items: baseline; flex-wrap:wrap; gap: 5px 12px; }
  .access-intro h1 { font-size: 23px; }
  .access-intro p { font-size: 11px; margin: 0; }
  #access-fieldset { grid-template-columns: 1fr 1fr; gap: 10px; }
  .primary-action { grid-column: 1/-1; min-height: 43px; }
  .input-wrap { min-height: 43px; }
  .field label { margin-bottom: 5px; }
  .input-wrap input { font-size: 16px; padding-inline: 9px; }
  .access-links { margin-top: 11px; }
}
@media (max-width:360px) {
  .gallery-help { display:none; }
  .role-gallery { grid-auto-rows: 142px; }
  .access-intro p { flex-basis:100%; }
}
@media (prefers-reduced-motion:reduce) {
  .station-login *, .station-login *::after, .station-login *::before { animation:none !important; transition:none !important; }
  .role-actor { transform:none !important; }
}
@media (forced-colors:active) {
  .primary-action, .input-wrap { border:1px solid ButtonText; }
  .role-state, .role-frame { forced-color-adjust: none; }
  .role-state { color: CanvasText; }
  .seal-outline { fill: Canvas; stroke: Highlight; }
  .seal-ring { fill: Canvas; stroke: ButtonText; }
  .choice-marked .seal-ring { fill: Highlight; stroke: Highlight; }
  .seal-check { stroke: HighlightText; }
  .choice-marked .role-frame path { stroke: Highlight; }
  .role-name, .role-title { background:Canvas; color:CanvasText; text-shadow:none; }
}
