:root {
  color-scheme: dark;
  --ink: #172b28;
  --ink-soft: #39534e;
  --jade-900: #102924;
  --jade-800: #173a33;
  --jade-700: #245149;
  --jade-500: #5e8f7c;
  --jade-300: #a9cbbb;
  --paper: #f2ead8;
  --paper-bright: #fffaf0;
  --paper-muted: #d7cdb8;
  --gold: #c9a85c;
  --gold-light: #ead7a5;
  --cinnabar: #b75d4b;
  --blue: #5790a3;
  --purple: #8a75a8;
  --shadow: 0 24px 70px rgba(3, 16, 13, 0.34);
  --border: rgba(226, 205, 157, 0.22);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--jade-900); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--paper); background: var(--jade-900); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, label:has(input:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: -80px; left: 16px; padding: 10px 16px; color: var(--ink); background: white; border-radius: 8px; }
.skip-link:focus { top: 16px; }
.button { min-height: 46px; padding: 0 22px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button--primary { color: #fffdf5; background: linear-gradient(135deg, #90713a, #c19b54); border-color: #d7b871; box-shadow: 0 10px 28px rgba(85, 57, 11, .24); }
.button--ghost { background: rgba(12, 32, 27, .36); backdrop-filter: blur(12px); }
.button--large { min-width: 154px; min-height: 54px; font-weight: 700; letter-spacing: .12em; }
.icon-button { display: inline-grid; width: 42px; height: 42px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: rgba(15, 44, 37, .6); cursor: pointer; }
.icon-button--small { width: 30px; height: 30px; font-size: 11px; }

/* Landing */
.landing { position: relative; display: grid; min-height: 100vh; min-height: 100svh; place-items: center; overflow: hidden; isolation: isolate; background: linear-gradient(90deg, rgba(8, 25, 22, .9), rgba(8, 25, 22, .12)), url("./assets/images/style-baseline.png") center / cover no-repeat, radial-gradient(circle at 75% 30%, #91b3a0, #193c34 46%, #0b201c); }
.landing::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 17, .08) 55%, rgba(8, 20, 17, .86)); }
.landing__veil { position: absolute; z-index: -1; width: 54vw; height: 54vw; left: -16vw; bottom: -24vw; border: 1px solid rgba(215, 193, 145, .09); border-radius: 50%; box-shadow: 0 0 0 8vw rgba(215, 193, 145, .025), 0 0 0 16vw rgba(215, 193, 145, .02); }
.landing__content { width: min(920px, calc(100% - 40px)); margin-left: clamp(0px, -28vw, -420px); text-align: left; }
.seal { display: inline-block; margin: 0 0 22px; padding: 7px 11px; color: var(--gold-light); border: 1px solid rgba(234, 215, 165, .54); font-size: 12px; letter-spacing: .35em; writing-mode: horizontal-tb; }
.landing h1 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(72px, 11vw, 158px); font-weight: 400; letter-spacing: -.08em; line-height: .92; text-shadow: 0 8px 32px rgba(0, 0, 0, .4); }
.landing h1 span { color: var(--gold-light); }
.landing__subtitle { margin: 28px 0 34px 5px; color: rgba(248, 239, 219, .78); font-family: "STKaiti", "KaiTi", serif; font-size: clamp(18px, 2vw, 28px); letter-spacing: .16em; }
.landing__actions { display: flex; gap: 14px; margin-left: 4px; }
.feature-row { display: flex; gap: 0; margin: 56px 0 0; padding: 0; color: rgba(239, 229, 205, .54); list-style: none; font-size: 12px; letter-spacing: .12em; }
.feature-row li + li::before { content: "·"; margin: 0 13px; color: var(--gold); }
.landing__version { position: absolute; right: 28px; bottom: 22px; margin: 0; color: rgba(239, 229, 205, .42); font-size: 11px; letter-spacing: .08em; }

/* Character creation */
.creation-shell { min-height: 100vh; padding: 0 0 80px; color: var(--ink); background: radial-gradient(circle at 80% 0, rgba(104, 153, 133, .18), transparent 30%), linear-gradient(rgba(255, 250, 240, .96), rgba(239, 232, 215, .98)), repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(40, 66, 58, .025) 4px); }
.creation-header { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 18px; padding: 18px max(24px, calc((100vw - 1100px) / 2)); color: var(--paper); background: rgba(18, 50, 43, .96); border-bottom: 1px solid rgba(201, 168, 92, .32); backdrop-filter: blur(18px); }
.creation-header .icon-button { background: rgba(255,255,255,.05); }
.creation-header h1 { margin: 2px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 27px; font-weight: 500; letter-spacing: .12em; }
.eyebrow { margin: 0; color: var(--gold-light); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.stepper { display: flex; gap: 8px; }
.stepper span { width: 36px; height: 3px; background: rgba(255,255,255,.18); }
.stepper span.is-active { background: var(--gold); }
.creation-panel { width: min(1080px, calc(100% - 36px)); margin: 34px auto 0; }
.form-section { margin-bottom: 28px; padding: 30px; background: rgba(255, 252, 244, .78); border: 1px solid rgba(54, 88, 76, .16); border-radius: 14px; box-shadow: 0 14px 38px rgba(55, 68, 57, .07); }
.form-section--identity { display: grid; grid-template-columns: 1.2fr 1fr 160px; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.field input { min-height: 50px; padding: 0 14px; color: var(--ink); background: rgba(255,255,255,.7); border: 1px solid rgba(44, 87, 73, .25); border-radius: 6px; }
.field input:focus { border-color: var(--jade-500); }
.section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.section-heading > span { display: grid; width: 38px; height: 38px; color: white; background: var(--jade-700); border-radius: 50%; place-items: center; font-family: serif; }
.section-heading h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 24px; font-weight: 500; }
.section-heading p { margin: 3px 0 0; color: #6f7d76; font-size: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.choice-card { position: relative; display: flex; min-height: 136px; padding: 20px 18px; flex-direction: column; cursor: pointer; background: rgba(250, 247, 238, .9); border: 1px solid rgba(53, 91, 77, .16); border-radius: 8px; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.choice-card:hover { transform: translateY(-2px); border-color: rgba(45, 92, 76, .5); }
.choice-card.is-selected { background: linear-gradient(145deg, rgba(227, 242, 234, .92), rgba(250, 247, 238, .95)); border-color: var(--jade-500); box-shadow: inset 0 0 0 1px var(--jade-500), 0 8px 20px rgba(40, 86, 71, .1); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card__mark { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border: 1px solid rgba(42, 83, 69, .34); border-radius: 50%; }
.choice-card.is-selected .choice-card__mark { background: var(--jade-700); border: 4px solid #dcece4; outline: 1px solid var(--jade-700); }
.choice-card__title { color: var(--ink); font-family: "STKaiti", "KaiTi", serif; font-size: 20px; }
.choice-card__desc { margin-top: 9px; color: #66746e; font-size: 12px; line-height: 1.7; }
.choice-card__effect { margin-top: auto; padding-top: 12px; color: var(--jade-700); font-size: 11px; font-weight: 700; }
.form-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; color: #748078; font-size: 12px; }
.stats-editor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-editor { display: flex; min-height: 74px; padding: 14px 16px; align-items: center; justify-content: space-between; background: rgba(246, 243, 234, .8); border: 1px solid rgba(45, 82, 69, .14); border-radius: 8px; }
.stat-editor > span { display: grid; gap: 4px; }
.stat-editor small { color: #839089; font-size: 10px; }
.stat-editor > div { display: flex; align-items: center; }
.stat-editor button { width: 30px; height: 30px; padding: 0; color: var(--jade-700); background: white; border: 1px solid rgba(45, 82, 69, .24); border-radius: 50%; cursor: pointer; }
.stat-editor output { width: 38px; color: var(--ink); text-align: center; font-size: 18px; font-weight: 800; }
.points { color: var(--jade-700); }
.points.is-negative { color: var(--cinnabar); }

/* Main game */
.game-shell { min-height: 100vh; padding-bottom: 28px; background: #102721; }
.topbar { position: relative; z-index: 30; display: grid; height: 70px; padding: 0 22px; grid-template-columns: 220px 1fr 220px; align-items: center; background: rgba(13, 40, 34, .98); border-bottom: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.brand { width: max-content; padding: 0; color: var(--paper); background: none; border: 0; cursor: pointer; font-family: "STKaiti", "KaiTi", serif; font-size: 26px; letter-spacing: .12em; }
.brand span { color: var(--gold-light); }
.time { display: grid; text-align: center; }
.time small { color: rgba(241, 231, 207, .48); font-size: 9px; letter-spacing: .18em; }
.time b { margin-top: 3px; color: var(--paper-muted); font-family: "STKaiti", "KaiTi", serif; font-size: 15px; font-weight: 400; letter-spacing: .08em; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.top-actions > button:not(.icon-button) { padding: 10px; color: rgba(243, 234, 213, .65); background: none; border: 0; cursor: pointer; font-size: 12px; }
.game-layout { display: grid; width: min(1600px, 100%); min-height: calc(100vh - 190px); margin: 0 auto; grid-template-columns: 264px minmax(0, 1fr) 210px; }
.status-card { position: relative; z-index: 3; padding: 24px 20px; background: linear-gradient(180deg, #173830, #122e28); border-right: 1px solid var(--border); }
.status-card__head { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; margin-bottom: 24px; }
.avatar-sigil { display: grid; width: 48px; height: 48px; color: var(--gold-light); background: radial-gradient(circle, #3d6759, #1d463b); border: 1px solid rgba(223, 196, 130, .34); border-radius: 50%; place-items: center; font-family: "STKaiti", "KaiTi", serif; font-size: 22px; }
.status-card__head p { margin: 0; color: rgba(240, 231, 209, .5); font-size: 10px; }
.status-card__head h2 { margin: 2px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 20px; font-weight: 500; }
.realm-line { display: flex; margin: 0 0 20px; align-items: center; justify-content: space-between; }
.realm-line span { color: var(--gold-light); font-family: "STKaiti", "KaiTi", serif; font-size: 18px; }
.realm-line small { padding: 4px 7px; color: var(--jade-300); background: rgba(127, 178, 154, .08); border: 1px solid rgba(127, 178, 154, .2); }
.resource { margin: 14px 0; }
.resource > div:first-child { display: flex; margin-bottom: 6px; justify-content: space-between; color: rgba(245, 237, 218, .58); font-size: 10px; }
.resource b { color: rgba(245, 237, 218, .74); font-weight: 500; }
.meter { height: 5px; overflow: hidden; background: rgba(255,255,255,.08); border-radius: 10px; }
.meter__fill { display: block; height: 100%; border-radius: inherit; transition: width .5s ease; }
.meter__fill--hp { background: linear-gradient(90deg, #8d493f, #cf7461); }
.meter__fill--mana { background: linear-gradient(90deg, #356b7d, #69a9bd); }
.meter__fill--cultivation { background: linear-gradient(90deg, #8c6d31, #e0bd68); }
.meter__fill--enemy { background: linear-gradient(90deg, #7e302b, #cb5b4e); }
.currency-row { display: grid; margin: 22px 0; padding: 16px 0; grid-template-columns: repeat(3, 1fr); border-block: 1px solid rgba(230, 209, 163, .12); }
.currency-row span { display: grid; gap: 4px; text-align: center; }
.currency-row span + span { border-left: 1px solid rgba(230, 209, 163, .12); }
.currency-row small { color: rgba(240, 230, 207, .44); font-size: 9px; }
.currency-row b { color: var(--gold-light); font-size: 14px; }
.location-chip { display: grid; width: 100%; padding: 14px; grid-template-columns: auto 1fr; gap: 3px 10px; text-align: left; color: inherit; background: rgba(7, 25, 21, .25); border: 1px solid rgba(227, 207, 161, .15); border-radius: 6px; cursor: pointer; }
.location-chip span { color: rgba(240, 230, 207, .42); font-size: 9px; }
.location-chip b { font-family: "STKaiti", "KaiTi", serif; font-size: 16px; font-weight: 400; }
.location-chip i { grid-column: 2; color: var(--jade-300); font-size: 9px; font-style: normal; }
.world-stage { position: relative; min-height: calc(100vh - 190px); overflow: hidden; isolation: isolate; }
.world-stage__art { position: absolute; z-index: -3; inset: 0; background: url("./assets/images/style-baseline.png") center / cover no-repeat, radial-gradient(circle at 55% 20%, #8eb8a5, #365d51 42%, #142f29 84%); transform: scale(1.01); }
.world-stage__shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(180deg, rgba(10, 30, 25, .08) 15%, rgba(9, 25, 21, .42) 55%, rgba(8, 23, 19, .92) 100%), linear-gradient(90deg, rgba(12, 31, 26, .28), transparent 35%); }
.world-stage::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 50% 30%, transparent 25%, rgba(8, 22, 18, .24) 100%); pointer-events: none; }
.world-stage__location { position: absolute; top: 28px; left: 30px; display: grid; padding-left: 13px; border-left: 2px solid var(--gold); text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.world-stage__location span { color: rgba(255, 248, 230, .62); font-size: 9px; letter-spacing: .12em; }
.world-stage__location b { font-family: "STKaiti", "KaiTi", serif; font-size: 24px; font-weight: 400; }
.story-wrap { position: absolute; right: clamp(20px, 4vw, 64px); bottom: 28px; left: clamp(20px, 4vw, 64px); }
.scene-card, .combat-card { max-width: 760px; margin: 0 auto; padding: 26px 30px 24px; background: linear-gradient(135deg, rgba(14, 39, 33, .93), rgba(18, 45, 38, .86)); border: 1px solid rgba(235, 217, 177, .25); border-radius: 9px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.scene-card::before { content: ""; display: block; width: 42px; height: 2px; margin-bottom: 12px; background: var(--gold); }
.scene-card--danger { border-color: rgba(207, 105, 84, .48); }
.scene-card--mystery { border-color: rgba(160, 134, 190, .45); }
.scene-card--wealth { border-color: rgba(212, 177, 92, .5); }
.scene-card__kicker { margin: 0; color: var(--gold-light); font-size: 9px; letter-spacing: .2em; }
.scene-card h1 { margin: 7px 0 12px; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(25px, 3vw, 34px); font-weight: 400; letter-spacing: .06em; }
.scene-card__text { margin: 0; color: rgba(248, 240, 222, .76); font-family: "STKaiti", "KaiTi", serif; font-size: 16px; line-height: 1.9; }
.scene-choices { display: grid; margin-top: 20px; gap: 7px; }
.story-choice { display: grid; min-height: 48px; padding: 7px 12px; grid-template-columns: 28px 1fr auto; align-items: center; text-align: left; color: inherit; background: rgba(248, 238, 215, .055); border: 1px solid rgba(235, 217, 177, .13); border-radius: 5px; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.story-choice:hover { transform: translateX(3px); background: rgba(248, 238, 215, .1); border-color: rgba(235, 217, 177, .32); }
.story-choice > span { display: grid; width: 21px; height: 21px; color: var(--jade-900); background: var(--gold-light); border-radius: 50%; place-items: center; font-size: 10px; font-weight: 800; }
.story-choice b { font-size: 12px; font-weight: 600; }
.story-choice small { color: rgba(242, 232, 209, .42); font-size: 9px; }
.action-dock { position: relative; z-index: 3; padding: 22px 14px; background: linear-gradient(180deg, #173830, #122e28); border-left: 1px solid var(--border); }
.action-dock > p { margin: 0 10px 12px; color: rgba(240, 230, 207, .42); font-size: 9px; letter-spacing: .2em; }
.action-dock > button { display: grid; width: 100%; min-height: 62px; padding: 9px 10px; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; text-align: left; color: inherit; background: transparent; border: 0; border-radius: 6px; cursor: pointer; transition: background .18s; }
.action-dock > button:hover { background: rgba(235, 218, 179, .07); }
.action-dock i { display: grid; width: 34px; height: 34px; color: var(--gold-light); background: rgba(198, 165, 88, .09); border: 1px solid rgba(216, 188, 121, .18); border-radius: 50%; place-items: center; font-family: "STKaiti", "KaiTi", serif; font-size: 16px; font-style: normal; }
.action-dock span { display: grid; gap: 3px; }
.action-dock b { font-size: 12px; }
.action-dock small { color: rgba(242, 232, 209, .4); font-size: 9px; }
.free-action { display: grid; width: min(900px, calc(100% - 40px)); margin: 18px auto 0; gap: 7px; }
.free-action label { color: rgba(239, 230, 209, .47); font-size: 10px; letter-spacing: .08em; }
.free-action > div { display: grid; grid-template-columns: 1fr auto; }
.free-action input { min-height: 46px; padding: 0 15px; color: var(--paper); background: rgba(4, 18, 15, .38); border: 1px solid rgba(232, 214, 174, .15); border-right: 0; border-radius: 6px 0 0 6px; }
.free-action input::placeholder { color: rgba(240, 230, 208, .28); }
.free-action button { padding: 0 22px; color: var(--gold-light); background: rgba(189, 151, 75, .13); border: 1px solid rgba(221, 190, 121, .28); border-radius: 0 6px 6px 0; cursor: pointer; }
.free-action :disabled { opacity: .4; cursor: not-allowed; }
.mobile-tabs { display: none; }

/* Combat */
.combat-card { max-width: 680px; border-color: rgba(205, 96, 78, .45); }
.combat-card__head { display: flex; align-items: center; justify-content: space-between; }
.combat-card__head p { margin: 0; color: rgba(239, 217, 187, .5); font-size: 9px; letter-spacing: .14em; }
.combat-card__head h2 { margin: 4px 0 12px; font-family: "STKaiti", "KaiTi", serif; font-size: 30px; font-weight: 400; }
.combat-card__head > span { padding: 4px 8px; color: #f4c9bd; border: 1px solid rgba(207, 97, 79, .4); font-size: 9px; }
.combat-message { min-height: 54px; margin: 18px 0; color: rgba(247, 237, 218, .72); line-height: 1.75; }
.combat-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.combat-actions button { display: grid; min-height: 72px; padding: 8px; place-items: center; color: inherit; background: rgba(255,255,255,.04); border: 1px solid rgba(235, 216, 176, .14); border-radius: 5px; cursor: pointer; }
.combat-actions button:hover { background: rgba(187, 84, 68, .12); border-color: rgba(221, 126, 105, .4); }
.combat-actions b { font-family: "STKaiti", "KaiTi", serif; font-size: 21px; font-weight: 400; }
.combat-actions span { color: rgba(242,232,210,.45); font-size: 9px; }

/* Panels */
.panel-backdrop { position: fixed; z-index: 90; inset: 0; background: rgba(2, 15, 12, .62); backdrop-filter: blur(3px); }
.side-panel { position: fixed; z-index: 100; top: 0; right: 0; width: min(520px, 94vw); height: 100vh; height: 100dvh; color: var(--ink); background: linear-gradient(180deg, #fbf7ed, #e9e1cf); box-shadow: -30px 0 80px rgba(0,0,0,.36); animation: slide-in .22s ease-out; }
@keyframes slide-in { from { transform: translateX(35px); opacity: .6; } }
.side-panel > header { display: flex; min-height: 86px; padding: 16px 20px 14px 26px; align-items: center; justify-content: space-between; color: var(--paper); background: var(--jade-800); border-bottom: 2px solid var(--gold); }
.side-panel > header p { margin: 0; color: var(--gold-light); font-size: 9px; letter-spacing: .2em; }
.side-panel > header h2 { margin: 4px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; font-weight: 400; }
.side-panel__body { height: calc(100% - 86px); padding: 24px; overflow-y: auto; }
.detail-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 20px; color: var(--paper); background: linear-gradient(135deg, var(--jade-700), var(--jade-800)); border-radius: 8px; }
.detail-hero > span { display: grid; width: 58px; height: 58px; flex: 0 0 auto; color: var(--gold-light); border: 1px solid rgba(231,211,164,.4); border-radius: 50%; place-items: center; font-family: "STKaiti", "KaiTi", serif; font-size: 22px; }
.detail-hero h3 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; font-weight: 400; }
.detail-hero p { margin: 5px 0 0; color: rgba(242,231,208,.58); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail-grid > div { display: grid; min-height: 70px; padding: 12px; place-items: center; background: rgba(255,255,255,.48); border: 1px solid rgba(37,81,69,.11); }
.detail-grid small { color: #7f8b85; font-size: 9px; }
.detail-grid b { color: var(--jade-700); font-family: "STKaiti", "KaiTi", serif; font-size: 23px; }
.detail-list { margin: 18px 0 0; }
.detail-list > div { display: grid; padding: 13px 4px; grid-template-columns: 90px 1fr; border-bottom: 1px solid rgba(36,75,64,.11); }
.detail-list dt { color: #849089; font-size: 10px; }
.detail-list dd { margin: 0; font-size: 12px; }
.panel-intro, .save-note { color: #68756f; font-size: 11px; line-height: 1.7; }
.map-list { display: grid; gap: 9px; margin-top: 18px; }
.map-place { display: grid; padding: 15px; text-align: left; color: var(--ink); background: rgba(255,255,255,.42); border: 1px solid rgba(39,79,66,.13); border-radius: 7px; cursor: pointer; }
.map-place:hover, .map-place.is-current { border-color: var(--jade-500); background: rgba(231,243,235,.72); }
.map-place > span { display: grid; grid-template-columns: 22px 1fr; align-items: center; }
.map-place i { grid-row: 1 / 3; display: grid; width: 20px; height: 20px; color: white; background: var(--cinnabar); border-radius: 50%; place-items: center; font-size: 9px; font-style: normal; }
.map-place b { font-family: "STKaiti", "KaiTi", serif; font-size: 18px; font-weight: 500; }
.map-place small { color: #7f8b85; font-size: 9px; }
.map-place em { margin: -30px 0 0 auto; color: var(--jade-700); font-size: 9px; font-style: normal; }
.map-place p { margin: 12px 0 0 22px; color: #66726c; font-size: 10px; line-height: 1.6; }
.inventory-list, .people-list, .log-list { display: grid; gap: 10px; }
.inventory-list article { display: grid; padding: 14px; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; background: rgba(255,255,255,.4); border: 1px solid rgba(37,78,66,.12); border-radius: 6px; }
.inventory-list article > span, .npc-avatar { display: grid; width: 42px; height: 42px; color: var(--gold-light); background: var(--jade-700); border-radius: 50%; place-items: center; font-family: "STKaiti", "KaiTi", serif; font-size: 17px; }
.inventory-list h3 { margin: 0; font-size: 13px; }
.inventory-list h3 small { color: #869089; font-weight: 400; }
.inventory-list p { margin: 5px 0 0; color: #75817b; font-size: 10px; }
.inventory-list button { padding: 7px 10px; color: var(--jade-700); background: transparent; border: 1px solid rgba(34,83,68,.3); border-radius: 4px; cursor: pointer; }
.people-list article { display: grid; padding: 16px; grid-template-columns: 46px 1fr; gap: 13px; background: rgba(255,255,255,.4); border: 1px solid rgba(37,78,66,.12); }
.people-list p { margin: 0; color: #85918b; font-size: 9px; }
.people-list h3 { margin: 2px 0 5px; font-family: "STKaiti", "KaiTi", serif; font-size: 20px; font-weight: 500; }
.people-list span { color: #65716b; font-size: 10px; line-height: 1.6; }
.people-list small { color: var(--cinnabar); font-size: 9px; }
.affinity { width: 100%; height: 3px; margin: 10px 0 4px; background: rgba(38,78,66,.1); }
.affinity i { display: block; height: 100%; background: #cf8392; }
.log-list article { padding: 0 0 12px 14px; border-left: 1px solid rgba(39,78,66,.2); border-bottom: 1px solid rgba(39,78,66,.08); }
.log-list time { color: #8b958f; font-size: 9px; }
.log-list p { margin: 5px 0 0; font-size: 11px; line-height: 1.6; }
.save-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.save-grid button, .import-button { display: grid; min-height: 108px; padding: 16px; align-content: center; text-align: left; color: var(--ink); background: rgba(255,255,255,.46); border: 1px solid rgba(37,78,66,.14); border-radius: 7px; cursor: pointer; }
.save-grid b { font-family: "STKaiti", "KaiTi", serif; font-size: 18px; font-weight: 500; }
.save-grid span { margin-top: 5px; color: #748079; font-size: 10px; }
.save-grid .danger-button { color: #7b3a31; border-color: rgba(160,75,60,.22); }
.import-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.empty-state { display: grid; min-height: 180px; color: #7c8882; place-items: center; }
.toast { position: fixed; z-index: 200; bottom: 28px; left: 50%; padding: 10px 18px; color: var(--ink); background: var(--paper-bright); border: 1px solid var(--gold); border-radius: 5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .22s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .game-layout { grid-template-columns: 230px 1fr; }
  .action-dock { position: absolute; z-index: 10; right: 12px; top: 88px; display: flex; width: auto; padding: 8px; background: rgba(13, 40, 34, .74); border: 1px solid var(--border); border-radius: 8px; backdrop-filter: blur(14px); }
  .action-dock > p, .action-dock span { display: none; }
  .action-dock > button { width: 44px; min-height: 44px; padding: 5px; grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .landing { background-position: 64% center; }
  .landing__content { align-self: end; margin: 0 0 13vh; text-align: center; }
  .landing h1 { font-size: clamp(76px, 26vw, 120px); }
  .landing__subtitle { font-size: 17px; }
  .landing__actions { justify-content: center; }
  .feature-row { justify-content: center; flex-wrap: wrap; }
  .landing__version { right: 0; bottom: 12px; width: 100%; text-align: center; }
  .creation-header { padding: 14px 16px; grid-template-columns: 44px 1fr auto; }
  .creation-header h1 { font-size: 21px; }
  .creation-panel { width: min(100% - 20px, 600px); margin-top: 16px; }
  .form-section { padding: 20px 15px; }
  .form-section--identity { grid-template-columns: 1fr 1fr; }
  .field:first-child { grid-column: 1 / -1; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 112px; }
  .stats-editor { grid-template-columns: 1fr 1fr; }
  .form-footer { gap: 12px; flex-wrap: wrap; }
  .form-footer .button { flex: 1; }
  .topbar { height: 60px; padding: 0 14px; grid-template-columns: auto 1fr auto; }
  .brand { font-size: 21px; }
  .time { text-align: right; }
  .time small, .top-actions > button:not(.icon-button) { display: none; }
  .time b { font-size: 11px; }
  .game-layout { min-height: calc(100svh - 176px); grid-template-columns: 1fr; }
  .status-card, .action-dock { display: none; }
  .world-stage { min-height: calc(100svh - 176px); }
  .world-stage__location { top: 18px; left: 18px; }
  .story-wrap { right: 10px; bottom: 12px; left: 10px; }
  .scene-card, .combat-card { padding: 20px 17px 17px; }
  .scene-card__text { font-size: 14px; line-height: 1.75; }
  .story-choice { grid-template-columns: 27px 1fr; }
  .story-choice small { display: none; }
  .combat-actions { grid-template-columns: 1fr 1fr; }
  .free-action { width: calc(100% - 20px); margin: 10px auto 68px; }
  .free-action label { display: none; }
  .free-action input { font-size: 12px; }
  .free-action button { padding: 0 14px; }
  .mobile-tabs { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; height: 58px; padding-bottom: env(safe-area-inset-bottom); grid-template-columns: repeat(5, 1fr); background: rgba(12, 38, 32, .97); border-top: 1px solid var(--border); backdrop-filter: blur(16px); }
  .mobile-tabs button { color: rgba(242,232,210,.64); background: none; border: 0; font-size: 10px; }
  .side-panel { width: 100vw; }
  .save-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .landing__actions { flex-direction: column; align-items: stretch; margin-inline: 24px; }
  .feature-row { display: none; }
  .form-section--identity, .stats-editor { grid-template-columns: 1fr; }
  .field:first-child { grid-column: auto; }
  .stepper { display: none; }
  .scene-card h1 { font-size: 24px; }
  .scene-card__text { max-height: 118px; overflow-y: auto; }
  .scene-choices { max-height: 182px; overflow-x: hidden; overflow-y: auto; }
  .story-choice { min-width: 0; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
