@charset "UTF-8";
:root { color-scheme: dark; --bg: #0b0e0f; --panel: #101516; --ink: #ece8de; --muted: #90958f; --gold: #cfb378; --gold-bright: #f0ddac; --line: rgba(192,166,110,.22); --sans: "Segoe UI", Arial, sans-serif; --serif: "Palatino Linotype", "Book Antiqua", Georgia, serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 5px; }
button:disabled { opacity: .38; cursor: wait; }
[hidden] { display: none !important; }
::selection { color: #fff8e6; background: #655435; }
.world-backdrop { position: fixed; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9,14,15,.15), rgba(9,14,15,.58) 42%, #0b0e0f 92%), linear-gradient(90deg, rgba(8,13,14,.72), rgba(8,13,14,.18)), url("assets/realm-background.png") 50% 15% / cover no-repeat; }
.page-shell { max-width: 1480px; margin: auto; padding: 0 56px; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px 18px; background: var(--gold); color: #141816; font-weight: 600; }
.skip-link:focus { top: 12px; }
.site-header { height: 100px; display: flex; align-items: center; border-bottom: 1px solid rgba(230,218,186,.1); gap: 44px; }
.brand { display: inline-flex; gap: 12px; align-items: center; flex-shrink: 0; }
.brand-crest { display: block; width: 36px; height: 44px; }
.brand-type { font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.1; letter-spacing: 2.6px; }
.brand-type > span { display: block; font: 9px/1.4 var(--sans); color: var(--gold); letter-spacing: 4.2px; margin-top: 6px; }
.main-nav { display: flex; align-self: stretch; gap: 32px; align-items: center; margin-left: 35px; }
.main-nav > * { border: 0; background: none; padding: 8px 0; font: 600 10px var(--sans); letter-spacing: 2px; color: #a4a79e; position: relative; }
.main-nav > *:hover { color: var(--gold-bright); }
.main-nav .active { color: var(--gold-bright); }
.main-nav .active::after { content: ""; position: absolute; width: 18px; height: 2px; background: var(--gold); bottom: -32px; left: calc(50% - 9px); }
.connection-pill { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 11px; color: #b8bcb1; }
.status-dot { height: 5px; width: 5px; border-radius: 50%; background: #b99e66; box-shadow: 0 0 12px #b99e6630; flex-shrink: 0; }
.connection-pill.is-online .status-dot { background: #83b696; box-shadow: 0 0 12px #83b69655; }
.connection-pill.is-offline .status-dot { background: #d89984; }
.introduction { min-height: 162px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 0 28px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--gold); font-size: 9px; letter-spacing: 2.5px; font-weight: 600; margin: 0 0 12px; }
.eyebrow > span { width: 26px; height: 1px; background: var(--gold); }
h1 { font: 400 clamp(32px, 3.5vw, 49px)/1.15 var(--serif); letter-spacing: -.9px; margin: 0; text-shadow: 0 2px 28px #0008; }
h1 em { font-style: normal; color: #e2c894; }
.introduction-copy { color: #aeb2a9; margin: 10px 0 0; font-size: 12px; font-weight: 300; }
.chapter-mark { border-left: 1px solid var(--line); padding-left: 26px; margin-right: 6px; text-align: left; }
.chapter-mark > * { display: block; }
.chapter-mark > span { font-size: 8px; color: #a9aa9d; letter-spacing: 2.7px; margin-bottom: 5px; }
.chapter-mark > strong { font: 400 16px var(--serif); letter-spacing: 1px; color: #dac69c; }
.chapter-mark > i { font-size: 8px; letter-spacing: 2px; font-style: normal; color: #777d76; margin-top: 7px; }
.game-frame { background: rgba(13,18,19,.94); border: 1px solid #75624277; box-shadow: 0 24px 100px #0007, 0 0 0 6px #0a0e0f66; position: relative; }
.game-frame::before, .game-frame::after { content: ""; position: absolute; pointer-events: none; z-index: 2; width: 13px; height: 13px; border-color: #d1b379; border-style: solid; }
.game-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.game-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.game-toolbar { height: 61px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid #75624255; background: linear-gradient(110deg, #192020dd, #111718dd); }
.game-identity { display: flex; align-items: center; gap: 14px; font: 400 13px var(--serif); letter-spacing: 1.7px; }
.game-identity small { display: block; color: #8a9289; font: 8px var(--sans); letter-spacing: 2px; margin-top: 4px; }
.game-sigil { font-size: 26px; color: #c3a56c; }
.game-actions { display: flex; align-items: center; gap: 19px; height: 100%; }
.tool-button { display: inline-flex; gap: 8px; align-items: center; border: 0; background: transparent; color: #b0b7ae; padding: 8px 0; font-size: 11px; transition: color .15s; }
.tool-button:hover, .tool-button[aria-pressed="true"] { color: var(--gold-bright); }
.tool-button svg { height: 15px; width: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.fullscreen-button { color: #d4bd8c; }
.toolbar-divider { height: 15px; width: 1px; background: var(--line); }
.game-stage { position: relative; width: 100%; height: clamp(360px, 58svh, 720px); background: #060909; isolation: isolate; overflow: hidden; }
#unity-canvas { display: block; border: none; width: 100%; height: 100%; background: #050808; touch-action: none; outline-offset: -3px; }
.loading-screen { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; background: #0b1213; z-index: 2; opacity: 1; transition: opacity .6s, visibility .6s; }
.loading-screen.is-loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-art { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,11,12,.15), rgba(6,12,13,.1)), linear-gradient(0deg, #071011f0, #0710110a 55%, #07101144), url("assets/realm-background.png") center 45% / cover; opacity: .8; }
.loading-content { position: relative; z-index: 1; text-align: center; width: min(420px, calc(100% - 56px)); padding: 24px 0 42px; filter: drop-shadow(0 3px 20px #000); }
.loading-ornament { display: flex; justify-content: center; align-items: center; gap: 13px; color: #d6b77b; font-size: 12px; margin: 0 0 28px; }
.loading-ornament > i { width: 50px; height: 1px; background: linear-gradient(90deg, transparent, #b9a174); }
.loading-ornament > i:last-child { transform: rotate(180deg); }
.loading-overline { font: 10px var(--sans); letter-spacing: 7px; color: #dfc68f; margin: 0 0 10px 7px; }
.loading-content h2 { font: 400 clamp(33px, 4vw, 55px)/.95 var(--serif); margin: 0; color: #f0e6ca; letter-spacing: 3px; text-shadow: 0 3px 1px #110e09, 0 0 30px #0e0805; }
.loading-content h2 > span { display: block; color: #c0a36a; font-size: .53em; letter-spacing: 14px; margin: 11px 0 0 13px; }
.loading-caption { color: #c0c0ae; font-size: 12px; margin: 24px 0 32px; }
.load-progress { height: 3px; background: #ede0b626; position: relative; margin: 0 14px; }
#load-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #967744, #e7d29b); box-shadow: 0 0 12px #d2ad5f77; transition: width .2s ease; }
.loading-details { display: flex; justify-content: space-between; margin: 11px 14px 0; font-size: 10px; color: #9fa89d; }
.loading-details > strong { color: #d7c18e; font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; }
.loading-note { position: absolute; bottom: 16px; left: 20px; right: 20px; text-align: center; font-size: 9px; color: #8e978a; letter-spacing: .4px; margin: 0; }
.retry-button { margin-top: 22px; color: #171b17; background: var(--gold); border: 1px solid #dfc891; padding: 10px 18px; font-weight: 600; font-size: 12px; }
.retry-button > span { margin-left: 10px; }
.game-message { position: absolute; top: 18px; left: 18px; right: 18px; z-index: 3; color: #edd4bf; background: #241a16ed; border: 1px solid #b37d5555; padding: 12px 16px; font-size: 12px; }
.noscript-message { position: absolute; inset: 0; background: #101617; display: grid; place-items: center; padding: 30px; }
.game-statusbar { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 10px 24px; border-top: 1px solid #75624255; gap: 10px; }
.game-status { display: inline-flex; align-items: center; gap: 8px; color: #8f998e; font-size: 8px; font-weight: 600; letter-spacing: 1.3px; }
.game-status i { display: block; width: 4px; height: 4px; border-radius: 50%; background: #bfa36c; }
.game-status i.is-ready { background: #8bb996; }
.text-button { font-size: 10px; color: #7f8a80; padding: 2px 0; border: 0; background: none; }
.text-button > span { color: #baa87e; margin-left: 8px; }
.text-button:hover > span { color: var(--gold-bright); }
.quick-guide { display: flex; align-items: center; min-height: 85px; gap: 28px; border-bottom: 1px solid rgba(230,218,186,.1); }
.mobile-tip { display: none; }
.guide-label { font-size: 8px; letter-spacing: 1.5px; color: #b6a279; margin-right: 8px; white-space: nowrap; }
.key-hint { display: inline-flex; align-items: center; gap: 9px; font-size: 10px; color: #929a91; white-space: nowrap; }
.key-hint > span { display: inline-flex; gap: 4px; }
kbd { display: inline-grid; place-items: center; min-width: 23px; height: 23px; padding: 0 5px; background: #182020; border: 1px solid #4a514144; border-bottom: 2px solid #5c655144; color: #c8c9b5; border-radius: 3px; font: 10px var(--sans); }
.guide-note { margin-left: auto; font: italic 12px var(--serif); color: #717b6e; white-space: nowrap; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 76px; color: #6f786d; }
.site-footer > span:first-child { font: 600 10px var(--serif); letter-spacing: 1.1px; color: #b9b7a4; }
.site-footer b { font-size: 8px; font-family: var(--sans); font-weight: 400; letter-spacing: 1.3px; color: #6f786d; padding-left: 10px; }
.site-footer p { font: 11px var(--serif); margin: 0; }
.footer-note { font-size: 7px; letter-spacing: 1.7px; }
.help-dialog { background: #11191a; color: var(--ink); border: 1px solid #a0875366; max-width: 490px; width: calc(100% - 32px); padding: 30px; box-shadow: 0 20px 120px #000b; }
.help-dialog::backdrop { background: #050909d9; backdrop-filter: blur(6px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-heading .eyebrow { font-size: 8px; letter-spacing: 2px; }
.dialog-heading h2 { font: 400 30px var(--serif); margin: 0; color: #e1cb9d; }
#help-close { background: transparent; color: #aaa992; border: 0; font-size: 27px; line-height: 1; padding: 0 4px 5px; }
.dialog-intro { font-size: 12px; color: #9da99b; margin: 18px 0 20px; }
.control-list { margin: 0; }
.control-list > div { display: flex; align-items: center; gap: 18px; min-height: 47px; border-bottom: 1px solid #a087531f; }
.control-list dt { display: flex; gap: 5px; width: 58px; flex-shrink: 0; }
.control-list dd { margin: 0; font-size: 12px; color: #b5bdae; }
.dialog-footnote { font-size: 10px; color: #869180; margin: 20px 0; }
.return-button { width: 100%; background: #c4a568; color: #151b18; border: 1px solid #dfc68e; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
.return-button:hover { background: #dbc18b; }
body.is-focused { overflow: hidden; }
.is-focused .game-frame { position: fixed; inset: 14px; z-index: 30; display: flex; flex-direction: column; background: #0b1010; }
.is-focused .game-stage { height: auto; min-height: 0; flex: 1; }
.is-focused .game-toolbar, .is-focused .game-statusbar { flex-shrink: 0; }
.game-stage:fullscreen { width: 100vw; height: 100dvh; }
.game-stage:-webkit-full-screen { width: 100vw; height: 100vh; }
@media (min-width: 1550px) { .game-stage { height: min(61svh, 780px); } .introduction { min-height: 175px; } }
@media (max-width: 1150px) {
  .page-shell { padding: 0 32px; }
  .site-header { height: 82px; gap: 20px; }
  .main-nav { margin-left: 15px; gap: 24px; }
  .main-nav .active::after { bottom: -23px; }
  .introduction { min-height: 145px; padding: 25px 0; }
  .chapter-mark { display: none; }
  .quick-guide { gap: 21px; min-height: 78px; }
  .guide-note { display: none; }
  .site-footer { min-height: 65px; }
  .footer-note { display: none; }
}
@media (max-width: 720px) {
  .page-shell { padding: 0 18px; }
  .site-header { height: 80px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-crest { width: 27px; height: 36px; }
  .brand-type { font-size: 18px; letter-spacing: 1.6px; }
  .brand-type > span { font-size: 7px; letter-spacing: 3px; margin-top: 5px; }
  .main-nav { display: none; }
  .connection-pill { font-size: 9px; gap: 6px; max-width: 124px; }
  .introduction { min-height: 137px; padding: 24px 0; }
  .eyebrow { font-size: 7px; letter-spacing: 1.6px; margin-bottom: 10px; }
  .eyebrow > span { width: 18px; }
  h1 { font-size: clamp(25px, 5.7vw, 37px); letter-spacing: -.7px; }
  .introduction-copy { font-size: 10px; margin-top: 9px; }
  .game-toolbar { height: 53px; padding: 0 13px; }
  .game-identity { gap: 8px; font-size: 10px; letter-spacing: 1.2px; }
  .game-sigil { font-size: 21px; }
  .game-identity small { font-size: 6px; letter-spacing: 1.1px; }
  .game-actions { gap: 13px; }
  .tool-button { padding: 10px 2px; }
  .tool-button > span { display: none; }
  .tool-button svg { height: 17px; width: 17px; }
  .game-stage { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .game-statusbar { padding: 10px 13px; min-height: 42px; }
  .game-status { font-size: 6px; letter-spacing: 1px; }
  .text-button { font-size: 0; }
  .text-button > span { font-size: 9px; margin-left: 0; }
  .quick-guide { flex-wrap: wrap; gap: 14px 18px; min-height: 100px; padding: 18px 0; }
  .guide-label { width: 100%; font-size: 7px; margin: 0; }
  .key-hint { font-size: 9px; gap: 6px; }
  kbd { min-width: 21px; height: 22px; font-size: 9px; }
  .site-footer { padding: 22px 0; min-height: auto; flex-direction: column; gap: 8px; }
  .site-footer p { font-size: 10px; }
  .loading-content { width: calc(100% - 42px); padding: 12px 0; }
  .loading-ornament { display: none; }
  .loading-overline { font-size: 8px; letter-spacing: 5px; margin-bottom: 7px; }
  .loading-content h2 { font-size: 29px; }
  .loading-content h2 > span { margin-top: 7px; }
  .loading-caption { font-size: 10px; margin: 13px 0 18px; }
  .loading-note { display: none; }
  .is-focused .game-frame { inset: 5px; }
  .help-dialog { padding: 23px; }
}
@media (max-width: 720px) and (orientation: portrait) {
  .mobile-tip { display: flex; align-items: center; gap: 9px; color: #a99c7b; font-size: 9px; margin: 17px 0 0; }
  .mobile-tip > span { font-size: 17px; }
  .is-focused .game-stage { flex: 0 0 auto; width: 100%; margin: auto 0; }
}
@media (max-height: 580px) and (orientation: landscape) {
  .site-header { height: 64px; }
  .introduction { min-height: 105px; padding: 17px 0; }
  .game-stage { height: 72svh; min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
