/* Shared player palette. Game artwork and operator screens set their own colors. */
:root {
  --tcn-night: #101113;
  --tcn-deep: #0b0c0e;
  --tcn-surface: #1b1c1f;
  --tcn-raised: #292b2f;
  --tcn-field: #202226;
  --tcn-edge: #3e4146;
  --tcn-edge-active: #778ca7;
  --tcn-text: #f5f5f5;
  --tcn-muted: #bbbcc0;
  --tcn-accent: #c3d4e7;
  --tcn-on-accent: #172a42;
  --tcn-action: #1a304e;
  --tcn-action-fill: linear-gradient(115deg, #233f60, var(--tcn-action));
  --tcn-floor: #101113;
  --tcn-card: linear-gradient(145deg, #26282b, var(--tcn-surface) 78%);
  --tcn-good: #90e7b6;
  --tcn-warning: #ffdda4;
  --tcn-error: #ffadb9;
  --tcn-font: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.tcn-return {
  box-sizing: border-box; margin: 0; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; padding: 20px;
  color-scheme: dark; color: var(--tcn-text); background: var(--tcn-floor);
  font: 1rem/1.6 var(--tcn-font);
}
.tcn-return main {
  width: min(100%, 30rem); box-sizing: border-box; padding: clamp(22px, 5vw, 36px);
  background: var(--tcn-card); border: 1px solid var(--tcn-edge); border-radius: 20px;
}
.tcn-return h1 { margin: 0; font-size: clamp(1.65rem, 5vw, 2.2rem); line-height: 1.2; }
.tcn-return p { color: var(--tcn-muted); }
.tcn-return a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--tcn-edge-active); border-radius: 10px; color: white;
  background: var(--tcn-action-fill); font-weight: 650; text-decoration: none;
}
.tcn-return a:focus-visible { outline: 2px solid var(--tcn-accent); outline-offset: 3px; }

html:not(.operator-mode) :is(#app > .site-header:not(.pv-header), #app > .footer, #app > .group-box, #app > .wrap > .panel, #overlay .player-modal) {
  --bg: var(--tcn-night); --surface: var(--tcn-surface); --green: var(--tcn-raised);
  --cream: var(--tcn-text); --gold: var(--tcn-accent); --muted: var(--tcn-muted);
  --line: var(--tcn-edge); --red: var(--tcn-error);
  color: var(--tcn-text); background: var(--tcn-surface);
}
html:not(.operator-mode):has(#app > .group-box, #app > .wrap > .panel) { background: var(--tcn-night); }
#overlay .modal-cover:not(.pv-dialog-cover) .player-modal { background: var(--tcn-card); border-color: var(--tcn-edge); }
#overlay .modal-cover:not(.pv-dialog-cover) .player-modal :is(input, select, textarea) {
  background: var(--tcn-field); color: var(--tcn-text); border-color: var(--tcn-edge);
}
#overlay .modal-cover:not(.pv-dialog-cover) .player-modal .primary { color: white; background: var(--tcn-action-fill); }

.policy-brand .tcn-identity { display: block; width: clamp(120px, 22vw, 168px); height: auto; color: var(--tcn-text); }
html:not(.operator-mode) :is(.policy-brand,.wordmark,.brand) .tcn-identity path[fill="#3155eb"] { fill: var(--tcn-accent); }
