/* Lost Communications — component styles, v2. Every value is a token or a step of a token scale. */
html, body { margin: 0; }
body { background: var(--lc-surface); color: var(--lc-text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
:lang(zh-Hant) { font-family: var(--font-cjk); }
.lc-stack { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }
.lc-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-6); }
.lc-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lc-icon.is-filled { fill: currentColor; stroke: none; }
.lc-icon.is-sm { width: 16px; height: 16px; }

/* One focus treatment for everything. */
:focus-visible { outline: 2px solid var(--lc-focus); outline-offset: 2px; }

/* ---------- Button: one component, three sizes, fixed variants ---------- */
.lc-button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); min-height: var(--control-md); padding: 0 var(--space-5); border: 1px solid var(--lc-border); border-radius: var(--radius-lg); background: var(--lc-surface-control); color: var(--lc-text); font: 500 14px/20px var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s cubic-bezier(.2, 0, 0, 1), border-color .15s cubic-bezier(.2, 0, 0, 1); }
.lc-button:hover { background: var(--lc-surface-control-hover); }
.lc-button:active { background: var(--lc-surface-control); }
.lc-button:disabled, .lc-button[aria-disabled=true] { background: var(--lc-surface-control); border-color: var(--lc-hairline); color: var(--lc-text-disabled); cursor: default; }
.lc-button[aria-busy=true] { cursor: progress; }
.lc-button[aria-busy=true]::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: var(--radius-full); animation: lc-spin .8s linear infinite; }
@keyframes lc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lc-button[aria-busy=true]::before { animation: none; } }
.lc-button.is-sm { min-height: var(--control-sm); padding: 0 var(--space-4); font-size: 12px; line-height: 16px; }
.lc-button.is-lg { min-height: var(--control-lg); padding: 0 var(--space-6); font-size: 16px; line-height: 24px; }
.lc-button.is-block { display: flex; width: 100%; }
.lc-button.is-start { justify-content: flex-start; }

.lc-button.is-primary { background: var(--lc-action); border-color: var(--lc-action); color: var(--lc-on-action); }
.lc-button.is-primary:hover { background: var(--lc-action-hover); border-color: var(--lc-action-hover); }
.lc-button.is-primary:active { background: var(--lc-action-pressed); border-color: var(--lc-action-pressed); }
.lc-button.is-ghost { border-color: transparent; background: transparent; color: var(--lc-text-secondary); padding: 0 var(--space-2); }
.lc-button.is-ghost:hover { background: transparent; color: var(--lc-text); text-decoration: underline; text-underline-offset: 4px; }
.lc-button.is-discord { background: var(--lc-discord); border-color: var(--lc-discord); color: var(--lc-on-action); }
.lc-button.is-discord:hover { background: var(--lc-discord-hover); border-color: var(--lc-discord-hover); }
.lc-button.is-steam { background: linear-gradient(110deg, var(--lc-steam), var(--lc-steam-light)); border-color: var(--lc-steam-light); color: var(--lc-on-action); }
.lc-button.is-steam:hover { background: var(--lc-steam-light); }
.lc-button.is-google { background: #ffffff; border-color: #ffffff; color: #1f1f1f; }
.lc-button.is-google:hover { background: #f3f4f6; }
.lc-button img { width: 20px; height: 20px; }

/* ---------- Field ---------- */
.lc-field { display: block; }
.lc-field > span { display: block; margin-bottom: var(--space-2); font-size: 14px; line-height: 20px; color: var(--lc-text-secondary); }
.lc-input { box-sizing: border-box; width: 100%; min-height: var(--control-md); padding: 0 var(--space-4); border: 1px solid var(--lc-border); border-radius: var(--radius-md); background: var(--lc-surface-control); color: var(--lc-text); font: 400 16px/24px var(--font-body); }
.lc-input::placeholder { color: var(--lc-text-tertiary); }
.lc-input:hover { border-color: var(--lc-text-tertiary); }
.lc-input:focus-visible, .lc-input.is-focus { outline: 2px solid var(--lc-focus); outline-offset: 2px; }
.lc-input[aria-invalid=true] { border-color: var(--lc-error); }
.lc-input.is-code { font-size: 24px; letter-spacing: .3em; text-align: center; }
.lc-hint { margin: var(--space-2) 0 0; font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); }
.lc-error { margin: var(--space-2) 0 0; font-size: 12px; line-height: 16px; color: var(--lc-error); }

/* ---------- Site header ---------- */
.lc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-6); padding: var(--space-10) var(--space-6) var(--space-10) 96px; }
.lc-brand { position: relative; display: block; }
.lc-brand .seal { position: absolute; left: -72px; top: 0; width: 60px; }
.lc-brand .word { display: block; width: 350px; }
.lc-nav { display: flex; align-items: center; gap: var(--space-6); padding-top: var(--space-3); }
.lc-nav a, .lc-nav button { color: var(--lc-text); font: 500 20px/28px var(--font-body); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.lc-nav a:hover, .lc-nav button:hover { color: var(--lc-text); text-decoration: underline; text-decoration-color: var(--lc-action); text-underline-offset: 6px; }
.lc-nav .has-menu { position: relative; }
.lc-menu { position: absolute; left: 0; top: 100%; display: none; padding-top: var(--space-2); }
.lc-nav .has-menu:hover .lc-menu, .lc-nav .has-menu:focus-within .lc-menu, .lc-nav .has-menu.is-open .lc-menu { display: block; }
.lc-menu div { min-width: 140px; padding: var(--space-2) 0; border-radius: var(--radius-sm); background: var(--lc-overlay); box-shadow: var(--shadow-menu); }
.lc-nav .lc-menu a { display: block; padding: var(--space-2) var(--space-4); font: 400 14px/20px var(--font-body); color: var(--lc-text-secondary); }
.lc-nav .lc-menu a:hover { color: var(--lc-text); }

/* ---------- Site footer ---------- */
.lc-footer { display: flex; flex-direction: column; align-items: center; padding: var(--space-8) var(--space-4); }
.lc-social { display: flex; gap: var(--space-4); margin-bottom: var(--space-3); }
.lc-social a { color: var(--lc-text); }
.lc-social a:hover { color: var(--lc-action); }
.lc-social svg { width: 24px; height: 24px; fill: currentColor; display: block; }
.lc-credits { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1) var(--space-2); font-size: 14px; line-height: 20px; color: var(--lc-text-tertiary); }
.lc-credits a { color: inherit; text-decoration: none; }
.lc-credits a:hover { color: var(--lc-text); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Work card ---------- */
.lc-works { display: flex; gap: var(--space-10); padding: var(--space-6); }
.lc-work { flex: 1; display: block; color: inherit; text-decoration: none; }
.lc-work figure { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 5; }
.lc-work img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2, 0, 0, 1); }
.lc-work:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .lc-work img { transition: none; } .lc-work:hover img { transform: none; } }
.lc-work figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #030712d9, #03071200 55%); }
.lc-work figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: var(--space-6); }
.lc-work .kicker { margin: 0 0 var(--space-2); font-size: 12px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--lc-text-secondary); }
.lc-work h2 { margin: 0; font: 800 36px/40px var(--font-body); letter-spacing: .025em; text-transform: uppercase; color: var(--lc-text); }

/* ---------- Spec table ---------- */
.lc-spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--space-8); margin: 0; padding: var(--space-6); font-size: 12px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; }
.lc-spec div { display: flex; flex-direction: column; }
.lc-spec dt { padding-bottom: var(--space-2); border-bottom: 1px solid var(--lc-border-subtle); color: var(--lc-text-tertiary); }
.lc-spec dd { margin: 0; padding-top: var(--space-2); color: var(--lc-text); letter-spacing: .04em; text-transform: none; font-size: 14px; line-height: 20px; }

/* ===== Player — the online performance surfaces. The work's photograph is the ground. ===== */
.player-scene { padding: var(--space-10) var(--space-6); background: linear-gradient(180deg, #03071226 0%, #03071266 55%, #030712ed 100%), none center top / cover no-repeat, var(--lc-surface); }
.player-panel { box-sizing: border-box; width: min(var(--panel-width), 100%); margin: 0 auto; padding: var(--space-8); border: 1px solid var(--lc-border-subtle); border-radius: var(--radius-2xl); background: var(--lc-surface-raised); box-shadow: var(--shadow-panel); text-align: left; }
.player-title { margin: 0 0 var(--space-2); font: 800 24px/32px var(--font-body); letter-spacing: -.02em; color: var(--lc-text); }
.player-status { margin: 0; font-size: 16px; line-height: 28px; color: var(--lc-text-secondary); }
.player-detail { margin: var(--space-4) 0 0; font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); font-variant-numeric: tabular-nums; }
.player-panel a { color: inherit; }

/* Header: the Lost Communications wordmark turned 90° beside the seal, then the work's mark. */
.player-header { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 64px; margin: 0 auto; padding: var(--space-8) var(--space-6) var(--space-8) 110px; }
.player-brand { position: absolute; left: 24px; top: var(--space-8); display: flex; align-items: flex-start; gap: 6px; text-decoration: none; }
.player-brand .rotated { position: relative; display: block; width: 20px; height: 148px; flex-shrink: 0; }
.player-brand .rotated img { position: absolute; left: 20px; top: 0; width: 148px; max-width: none; transform: rotate(90deg); transform-origin: top left; }
.player-brand .seal { display: block; width: 36px; }
.player-logo { display: block; width: 280px; max-width: 100%; }
.player-header .lc-button { margin-left: auto; }

.player-providers { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-6); }
.player-form { margin-top: var(--space-6); }
.player-form .lc-button.is-primary { margin-top: var(--space-6); }
.player-form .actions { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-3); }

.player-progress { margin-top: var(--space-6); }
.player-progress .track { height: 4px; border-radius: var(--radius-full); background: var(--lc-hairline); overflow: hidden; }
.player-progress .fill { height: 100%; background: var(--lc-action); }
.player-progress .steps { display: flex; justify-content: space-between; margin-top: var(--space-3); font-size: 12px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--lc-text-tertiary); }
.player-progress [data-state=done] { color: var(--lc-text-secondary); }
.player-progress [data-state=current] { color: var(--lc-text); }

.player-wait { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--lc-hairline); }
.player-wait h3 { margin: 0 0 var(--space-1); font: 800 18px/28px var(--font-body); color: var(--lc-text); }
.player-wait p { margin: 0; font-size: 14px; line-height: 20px; color: var(--lc-text-secondary); }
.player-wait p + p { margin-top: var(--space-4); }
.player-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-6) 0 0; padding: 0; }
.player-countdown div { display: flex; flex-direction: column; min-width: 0; }
.player-countdown dt { order: 2; margin-top: var(--space-2); font-size: 12px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--lc-text-tertiary); }
.player-countdown dd { order: 1; margin: 0; font-size: 36px; line-height: 40px; font-weight: 400; letter-spacing: -.02em; color: var(--lc-text); font-variant-numeric: tabular-nums; }

.player-download { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.download-meta { margin: 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); }
.install-guide { margin: var(--space-6) 0 0; padding: 0; list-style: none; counter-reset: install; }
.install-guide li { position: relative; margin: 0 0 var(--space-4); padding-left: var(--space-8); font-size: 14px; line-height: 20px; color: var(--lc-text-secondary); counter-increment: install; }
.install-guide li::before { content: counter(install, decimal-leading-zero); position: absolute; left: 0; top: 0; font-size: 12px; line-height: 20px; color: var(--lc-text-tertiary); font-variant-numeric: tabular-nums; }
.install-guide strong { display: block; font-weight: 800; color: var(--lc-text); }
.download-help { margin: var(--space-6) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--lc-hairline); font-size: 12px; line-height: 20px; color: var(--lc-text-tertiary); }
.download-help summary { cursor: pointer; color: var(--lc-text-secondary); }
.download-help a, .stream-fallback a { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--lc-text-secondary); text-underline-offset: 4px; }
.download-help a:hover, .stream-fallback a:hover { color: var(--lc-text); }
.stream-fallback { margin: var(--space-4) 0 0; font-size: 12px; line-height: 20px; color: var(--lc-text-tertiary); }

.player-postshow { display: grid; gap: var(--space-3); margin-top: var(--space-6); }

.player-shell { padding: var(--space-6); }
.player-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-xl); background: #000000; box-shadow: var(--shadow-stage); outline: 1px solid var(--lc-hairline); }
.player-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-shield { position: absolute; inset: 0; display: grid; place-items: center; background: #00000080; }
.player-shield .lc-button { box-shadow: var(--shadow-cta); min-width: 180px; }
.player-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-4); font-size: 12px; line-height: 16px; color: var(--lc-text-secondary); }
.player-live { display: flex; align-items: center; gap: var(--space-2); color: var(--lc-text-secondary); }
.player-live::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--lc-action); }
.player-quality { display: flex; align-items: center; gap: var(--space-3); }
.player-quality select { min-height: var(--control-sm); font: inherit; color: var(--lc-text); border: 1px solid var(--lc-border); border-radius: var(--radius-md); background: var(--lc-surface-control); padding: 0 var(--space-8) 0 var(--space-3); }
.stream-metrics { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); margin: var(--space-4) 0 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--lc-hairline); font-variant-numeric: tabular-nums; }
.stream-metrics div { min-width: 0; }
.stream-metrics dt { margin-bottom: var(--space-2); font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); }
.stream-metrics dd { margin: 0; font-size: 14px; line-height: 20px; color: var(--lc-text); white-space: nowrap; }
.player-stream-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-6); }
.player-shortcuts { display: flex; gap: var(--space-4); font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); }
.player-shortcuts kbd { font: inherit; color: var(--lc-text); padding: 0 var(--space-1); border: 1px solid var(--lc-border-subtle); border-radius: var(--radius-sm); }
.player-recovery { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--lc-hairline); }
.player-recovery p { margin: 0; font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); }

/* Touch controls: translucent white over live video. */
.player-touch { position: absolute; inset: 0; --edge: 16px; --edge-bottom: 24px; --stick: 128px; }
.player-touch button { margin: 0; padding: 0; min-width: 44px; min-height: 44px; border: 1px solid #ffffff4d; background: #08152252; color: #ffffff; box-shadow: 0 2px 12px #00000022; text-shadow: 0 1px 3px #00000088; font: 500 12px/16px var(--font-body); border-radius: var(--radius-full); display: grid; place-items: center; }
.player-touch button[data-held] { background: #ffffff38; border-color: #ffffffa6; }
.player-touch .touch-stick { position: absolute; bottom: var(--edge-bottom); width: var(--stick); height: var(--stick); background: #08152221; border-color: #ffffff40; }
.player-touch .touch-stick::before { content: ""; position: absolute; width: 38%; height: 38%; border: 1px solid #ffffff65; border-radius: var(--radius-full); background: #ffffff28; box-shadow: 0 2px 12px #00000022; }
.player-touch .touch-stick span { position: absolute; bottom: 12%; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.player-touch #touch-move { left: var(--edge); } .player-touch #touch-look { right: var(--edge); }
.player-touch .touch-top { position: absolute; top: var(--space-3); left: var(--edge); right: var(--edge); display: flex; gap: var(--space-2); }
.player-touch .touch-top button { min-width: 56px; padding: 0 var(--space-3); }
.player-touch .touch-top [data-touch-exit] { margin-left: auto; }
.player-touch .touch-actions { position: absolute; bottom: calc(var(--edge-bottom) + var(--stick) + var(--space-3)); display: grid; grid-template-columns: repeat(2, 56px); gap: var(--space-2); }
.player-touch .touch-actions.left { left: var(--edge); } .player-touch .touch-actions.right { right: var(--edge); }
.player-touch .touch-actions button { width: 56px; height: 48px; }

/* How to play */
.how-to-play { padding: var(--space-6); }
.guide-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.guide-heading h2 { margin: 0; font: 800 24px/32px var(--font-body); letter-spacing: -.02em; color: var(--lc-text); }
.guide-heading > span { font-size: 12px; line-height: 16px; color: var(--lc-text-tertiary); }
.guide-grid { display: grid; grid-template-columns: 1.06fr 1fr; gap: var(--space-8); }
.guide-controls table { border-collapse: collapse; table-layout: fixed; width: 100%; font-size: 14px; line-height: 20px; text-align: left; }
.guide-controls th, .guide-controls td { padding: var(--space-2) var(--space-2) var(--space-2) 0; vertical-align: middle; overflow-wrap: anywhere; }
.guide-controls thead th { padding-top: var(--space-3); padding-bottom: var(--space-3); font-size: 12px; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; color: var(--lc-text-tertiary); }
.guide-controls tbody tr { border-top: 1px solid var(--lc-hairline); }
.guide-controls tbody th { font-weight: 400; color: var(--lc-text-secondary); }
.guide-controls tbody td { color: var(--lc-text); }
.guide-controls .device-row td { height: 84px; padding: 0 var(--space-3) 0 0; vertical-align: bottom; }
.device-row img { display: block; width: 100%; height: 76px; object-fit: contain; object-position: left bottom; }
.device-row td:last-child img { max-width: 120px; }
.guide-note { margin: var(--space-3) 0 0; font-size: 12px; line-height: 20px; color: var(--lc-text-tertiary); }
.guide-note strong { font-weight: 500; color: var(--lc-text-secondary); }
.guide-concepts { display: grid; align-content: start; gap: var(--space-4); padding-top: var(--space-2); }
.guide-concept { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--space-3); align-items: center; }
.guide-concept img { display: block; width: 104px; height: auto; }
.guide-concept h3 { margin: 0 0 var(--space-1); font: 800 16px/24px var(--font-body); color: var(--lc-text); }
.guide-concept p { margin: 0; font-size: 14px; line-height: 20px; color: var(--lc-text-secondary); }

/* Numbered steps */
.lc-steps { list-style: none; margin: 0; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.lc-steps li { display: flex; gap: var(--space-3); align-items: flex-start; }
.lc-steps .n { display: flex; width: 28px; height: 28px; flex-shrink: 0; align-items: center; justify-content: center; border: 1px solid var(--lc-border); border-radius: var(--radius-full); background: var(--lc-surface-control); font-size: 14px; font-weight: 800; color: var(--lc-text); font-variant-numeric: tabular-nums; }
.lc-steps p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--lc-text-secondary); }
