:root{--ink:#e9e9dd;--muted:#9daab0;--gold:#eecf91;--bg:#0d1722;--glass:rgba(15,27,36,.86);--line:rgba(255,255,255,.14)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif;background:#0d1722;color:var(--ink)}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid #eac78b;outline-offset:3px}.game{position:relative;width:100%;height:100%;height:100dvh;overflow:hidden;background:linear-gradient(#1e3d4a,#0d242d)}#world,#weatherFx,.vignette{position:absolute;inset:0;width:100%;height:100%}#world{display:block;touch-action:none}#weatherFx{pointer-events:none}.vignette{pointer-events:none;background:radial-gradient(ellipse 73% 63% at 50% 48%,transparent 40%,rgba(5,13,23,.16) 75%,rgba(5,12,18,.48) 110%),linear-gradient(to bottom,rgba(4,15,24,.26),transparent 31%,transparent 73%,rgba(4,15,24,.5))}
.hud{position:absolute;z-index:3}.top-hud{left:0;right:0;top:0;display:flex;align-items:flex-start;justify-content:space-between;gap:25px;padding:27px 35px;pointer-events:none}.brand{display:flex;align-items:center;gap:12px;min-width:200px}.brand>b{}.brand b{letter-spacing:.28em;font-family:Georgia,serif;font-size:22px;font-weight:500;display:block;line-height:1.2}.brand small{font-size:9px;color:var(--muted);letter-spacing:.12em;display:block;margin-top:3px}.brand-mark{width:35px;height:34px;border:2px solid #e8d9bb;transform:rotate(-8deg);display:flex;align-items:center;justify-content:space-evenly;position:relative}.brand-mark span{width:4px;height:4px;background:#e7d9be;border-radius:50%}.brand-mark:after{content:'';position:absolute;width:7px;height:3px;bottom:7px;border-radius:50%;background:#e7d9be}.hud-stats{display:flex;gap:31px;padding-top:2px}.hud-stat{display:flex;flex-direction:column;align-items:center;gap:4px}.hud-stat span{font-size:10px;color:#a9b9be;letter-spacing:.12em}.hud-stat strong{font-family:Georgia,serif;font-size:24px;font-weight:400;font-variant-numeric:tabular-nums}.clock-wrap{min-width:140px;text-align:right}.weather-label{font-size:11px;color:#d3ded9;letter-spacing:.08em}.clock{display:block;font:normal 32px/1.2 Georgia,serif;letter-spacing:.045em;font-variant-numeric:tabular-nums;margin:4px 0 8px}.timer-progress{height:2px;background:#6d8489;width:130px;margin-left:auto}.timer-progress>div{height:100%;width:100%;background:#e8cb93;transition:width .2s linear}
.bottom-left{position:absolute;z-index:3;bottom:30px;left:35px;max-width:min(480px,60vw);pointer-events:none}.status-pill{border:1px solid rgba(255,255,255,.17);background:rgba(8,22,30,.53);backdrop-filter:blur(15px);border-radius:20px;padding:10px 14px;display:inline-flex;gap:8px;align-items:center;font-size:11px;letter-spacing:.05em}.live-dot{width:6px;height:6px;background:#bdd69d;border-radius:50%;box-shadow:0 0 9px #bfe29c}.status-divider{color:#6b858c}.helper{font-size:11px;color:rgba(228,240,232,.74);letter-spacing:.06em;margin-top:13px;margin-left:1px;text-shadow:0 2px 7px rgba(0,0,0,.5)}.bottom-right{position:absolute;right:35px;bottom:32px;display:flex;gap:8px;z-index:4}.icon-button{color:#d9e3dd;background:rgba(7,25,34,.66);border:1px solid rgba(255,255,255,.13);border-radius:11px;width:64px;height:54px;backdrop-filter:blur(20px);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;font-size:20px}.icon-button span{font-size:9px;color:#b4c6cc}.icon-button:hover{background:rgba(30,53,62,.86)}.toast{position:absolute;z-index:15;bottom:98px;left:50%;transform:translateX(-50%) translateY(8px);opacity:0;pointer-events:none;background:#152936;border:1px solid #60777b;padding:11px 17px;border-radius:9px;box-shadow:0 10px 40px #0004;font-size:12px;transition:.2s;max-width:min(440px,90vw);text-align:center}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.hover-label{position:absolute;z-index:3;pointer-events:none;font-size:11px;white-space:nowrap;border-radius:18px;color:#fff;background:rgba(10,25,34,.88);padding:7px 11px;opacity:0;transition:opacity .14s}.hover-label.show{opacity:1}
.panel{position:absolute;z-index:8;top:105px;right:28px;bottom:104px;width:350px;max-width:calc(100vw - 30px);overflow-y:auto;background:rgba(12,29,37,.91);border:1px solid rgba(230,238,225,.19);box-shadow:0 25px 80px rgba(0,0,0,.32);backdrop-filter:blur(25px);border-radius:18px;padding:29px 25px 25px;transition:opacity .23s,transform .23s}.is-hidden{display:none!important}.panel .close-button{position:absolute;right:15px;top:13px}.close-button{background:transparent;border:0;color:#d6e0df;font-size:28px;line-height:1;cursor:pointer;width:35px;height:35px}.eyebrow{text-transform:uppercase;letter-spacing:.23em;color:#dfc38b;font-size:10px;font-weight:600}.profile-top{text-align:center}.profile-icon{width:80px;height:80px;border-radius:21px;margin:12px auto 10px;display:flex;align-items:center;justify-content:center;position:relative;transform:rotate(-6deg);box-shadow:inset 0 -10px 13px #0002,0 13px 30px #0004}.profile-icon .eyes{display:flex;gap:22px;position:absolute;top:30px}.profile-icon .eyes i{height:5px;width:5px;background:#24303d;border-radius:50%}.profile-icon .mouth{height:4px;width:8px;border-bottom:2px solid #24303d;border-radius:50%;position:absolute;top:43px}.profile-top h2{font-size:24px;letter-spacing:.09em;margin:5px 0 4px;font-weight:600}.profile-sub{font-size:11px;color:#afc1c2}.profile-status{display:inline-flex;border-radius:40px;border:1px solid #67867b;padding:4px 9px;font-size:10px;letter-spacing:.08em;margin-top:10px;color:#dae7d9}.profile-status.gone{border-color:#707b84;color:#9faeb5}.profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:15px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:22px 0;padding:18px 4px}.profile-stats span{display:block;font-size:10px;color:#9aacb3}.profile-stats b{font-size:15px;font-weight:500;margin-top:4px;display:block}.trait-tag{font-size:11px;background:#274551;color:#d7e8e3;border:1px solid #57717a;border-radius:20px;padding:5px 10px;display:inline-flex;margin:2px}.panel h3{font-size:12px;color:#dfc38b;letter-spacing:.14em;margin:27px 0 12px;font-weight:500}.memory-timeline{border-left:1px solid rgba(223,201,158,.42);margin-left:8px}.memory-entry{padding:0 0 17px 16px;position:relative;font-size:12px;line-height:1.75;color:#d1dfda}.memory-entry:before{content:'';position:absolute;left:-4px;top:7px;width:7px;height:7px;border-radius:50%;background:#e3c991}.memory-entry time{display:block;font:11px Georgia,serif;color:#aabfc2;margin-bottom:2px}.archive{right:28px}.panel-topline{display:flex;justify-content:space-between}.panel-topline .close-button{position:relative;top:-11px;right:-10px}.archive h2{font-size:22px;margin:7px 0}.archive-intro{font-size:11px;line-height:1.75;color:#a6baba;margin:9px 0 17px}.archive-filters{display:flex;gap:5px;margin-bottom:15px}.archive-filters button{border:1px solid #55717a;background:transparent;color:#9cb5b8;padding:7px 12px;font-size:10px;border-radius:20px}.archive-filters button.active{background:#d9c294;color:#152b32;border-color:#d9c294}.archive-items{display:flex;flex-direction:column;gap:6px}.archive-row{width:100%;text-align:left;display:flex;align-items:center;gap:11px;border:1px solid transparent;border-bottom-color:#334c55;background:transparent;color:#e6e7df;padding:10px 5px}.archive-row:hover{background:#223d45}.archive-swatch{width:27px;height:27px;border-radius:7px;flex:none}.archive-row div{flex:1}.archive-row b{display:block;font-size:12px}.archive-row small{display:block;font-size:10px;color:#93b1b6;margin-top:4px}.archive-row em{font-style:normal;color:#dac79d;font-size:13px}
.start-overlay,.end-overlay,.event-overlay,.error-overlay{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;background:rgba(5,18,27,.58);backdrop-filter:blur(10px);padding:22px;overflow-y:auto}.start-overlay{background:radial-gradient(ellipse at 50% 50%,rgba(12,30,40,.76),rgba(5,17,26,.91)),linear-gradient(#132d3a,#101c28)}.start-content{display:flex;align-items:center;flex-direction:column;text-align:center;max-width:550px;padding:30px 0}.mini-cube{width:67px;height:69px;background:#e3bd83;box-shadow:inset -12px -10px #d6a96b,0 15px 50px #dcad8133;transform:rotate(-9deg);border-radius:10px;margin-bottom:30px;position:relative}.mini-cube-face{height:100%;position:relative}.mini-cube-face i{width:5px;height:5px;border-radius:50%;background:#29333a;position:absolute;top:32px;left:21px}.mini-cube-face i:nth-child(2){left:43px}.mini-cube-face em{position:absolute;top:42px;left:31px;width:7px;height:3px;border-bottom:2px solid #29333a;border-radius:50%}.start-content h1{font:normal 58px Georgia,serif;letter-spacing:.17em;margin:14px 0 21px}.start-content h1 span{color:#988e80;font-size:23px}.start-content h1 small{font-family:-apple-system,BlinkMacSystemFont,'Yu Gothic',sans-serif;font-size:17px;font-weight:500;letter-spacing:.2em;vertical-align:middle}.start-lead{font-size:22px;line-height:1.7;letter-spacing:.12em;margin:3px 0 15px;font-weight:500}.start-copy{font-size:12px;line-height:2.15;color:#b5c5c8;max-width:410px;letter-spacing:.04em;margin:0 0 29px}.rules{display:flex;justify-content:center;gap:0;width:100%;max-width:390px;border-top:1px solid #44606a;border-bottom:1px solid #44606a;padding:17px 0;margin:0 0 26px}.rules>div{flex:1;border-right:1px solid #38535e}.rules>div:last-child{border:0}.rules b{display:block;font:normal 32px Georgia,serif;color:#e7d2ac}.rules b span{font:12px sans-serif;margin-left:3px}.rules small{display:block;font-size:10px;color:#9fb6be;margin-top:5px}.primary-button{border:0;background:#e7d1a5;color:#1c2d32;font-size:13px;font-weight:700;letter-spacing:.08em;padding:16px 28px;border-radius:8px;min-width:245px;transition:.18s;box-shadow:0 5px 20px #0003}.primary-button:hover{background:#f6e3ba;transform:translateY(-2px)}.primary-button span{margin-left:15px}.start-tip{font-size:10px;color:#859ca6;margin-top:15px}.event-overlay{background:rgba(3,17,24,.47);z-index:10}.event-card{background:linear-gradient(145deg,#203844,#152b36);width:min(470px,95vw);text-align:center;border:1px solid #71817c;border-radius:16px;box-shadow:0 30px 90px rgba(0,0,0,.48);padding:33px 34px 27px}.event-icon{font-size:32px;color:#e6ce9b;margin:20px 0 9px}.event-card h2{font-size:24px;font-weight:500;line-height:1.5;margin:0 0 14px}.event-card>p{font-size:12px;line-height:1.95;color:#bfcfd1;margin:0 0 22px}.event-choices{display:flex;flex-direction:column;gap:9px}.event-choices button{text-align:left;border:1px solid #506a71;border-radius:8px;padding:13px 15px;background:#233b46;color:#e6edec;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.event-choices button:hover{border-color:#e2c995;background:#324f59}.choice-effect{color:#d6bd8a;font-size:10px;white-space:nowrap}.event-footnote{font-size:10px;color:#86a5ad;display:block;margin-top:18px}.end-overlay{background:rgba(5,17,27,.84);backdrop-filter:blur(10px);z-index:15}.end-card{padding:32px 34px;text-align:center;border:1px solid #526b72;background:linear-gradient(160deg,#192f3c,#10212e);border-radius:15px;box-shadow:0 25px 85px #0008;width:min(525px,98vw);max-height:calc(100dvh - 30px);overflow:auto}.ending-ornament{font-size:36px;color:#d4c091;padding-top:8px}.end-label{display:block;font-size:11px;color:#aabcc0;letter-spacing:.17em;margin:3px 0 4px}.end-card h2{font-weight:500;font-size:30px;letter-spacing:.12em;margin:10px 0}.end-card>p{line-height:1.9;font-size:12px;color:#bed0cd;margin:8px auto 20px;max-width:375px}.end-metrics{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #3e5860;border-bottom:1px solid #3e5860;padding:15px 0;margin:15px 0}.end-metrics strong{font:normal 22px Georgia,serif;color:#e9d3aa;display:block}.end-metrics span{font-size:9px;color:#a1b6bd}.end-memory{font-size:12px;font-style:italic;line-height:1.8;color:#e6dec7;margin:13px 0 19px;padding:0 12px}.end-actions{display:flex;flex-direction:column;align-items:center;gap:9px}.end-actions .primary-button,.end-actions .secondary-button{width:100%;max-width:300px}.secondary-button{background:transparent;border:1px solid #7f8e8e;border-radius:8px;color:#e5ddd0;font-size:12px;padding:12px}.text-button{border:0;background:transparent;color:#c2d5d5;font-size:11px;padding:10px 16px}.share-note{font-size:9px;color:#8199a0;line-height:1.6;display:block;margin-top:7px}.error-overlay{z-index:99;background:#172c37}.error-overlay p{max-width:500px;line-height:2}.profile-family{font-size:11px;color:#a4bdc2;line-height:1.8}
@media(max-width:760px){.top-hud{padding:18px 16px;gap:4px}.brand{min-width:0;gap:6px}.brand-mark{height:28px;width:28px}.brand b{font-size:17px}.brand small{font-size:7px;letter-spacing:0}.hud-stats{position:absolute;top:66px;left:16px;gap:15px}.hud-stat{flex-direction:row;align-items:baseline;gap:5px}.hud-stat span{font-size:8px}.hud-stat strong{font-size:16px}.clock-wrap{min-width:90px}.clock{font-size:24px}.weather-label{font-size:10px}.timer-progress{width:85px}.bottom-left{bottom:22px;left:14px;max-width:calc(100vw - 150px)}.status-pill{font-size:10px;padding:9px 10px;white-space:nowrap}.helper{font-size:10px;line-height:1.5;margin-top:9px}.bottom-right{right:13px;bottom:17px;gap:5px}.icon-button{width:52px;height:46px;font-size:17px}.icon-button span{font-size:8px}.panel{top:auto;right:0;left:0;bottom:0;width:auto;max-width:none;height:min(67dvh,660px);border-radius:20px 20px 0 0;padding:24px 25px 45px}.start-overlay,.end-overlay,.event-overlay{padding:12px}.start-content{padding:14px 0;max-width:440px}.mini-cube{width:50px;height:52px;margin-bottom:17px}.mini-cube-face i{top:24px;left:15px}.mini-cube-face i:nth-child(2){left:33px}.mini-cube-face em{top:32px;left:22px}.start-content h1{font-size:37px;margin:10px 0 17px}.start-content h1 small{font-size:11px;letter-spacing:.07em}.start-lead{font-size:18px;margin:0 0 12px}.start-copy{font-size:11px;padding:0 19px;line-height:1.9;margin-bottom:17px}.rules{max-width:315px;margin-bottom:20px;padding:10px 0}.rules b{font-size:25px}.primary-button{padding:14px}.event-card{padding:29px 22px 23px}.event-card h2{font-size:20px}.end-card{padding:24px 20px}.end-card h2{font-size:25px}.end-metrics strong{font-size:19px}.end-metrics span{font-size:9px}}
@media(max-height:690px){.start-content{padding:0}.mini-cube{margin-bottom:14px}.start-content h1{margin:7px 0 9px}.start-copy{margin-bottom:14px}.rules{padding:9px;margin-bottom:14px}.end-card{padding-top:16px;padding-bottom:16px}}

/* HAKO 2 — contextual storytelling and touch-first panels. */
.story-ticker{pointer-events:auto;border:1px solid rgba(225,209,172,.25);background:rgba(13,35,44,.79);backdrop-filter:blur(14px);color:#edf1e8;display:flex;align-items:center;gap:10px;width:min(448px,60vw);max-width:100%;min-height:39px;padding:9px 12px;border-radius:12px;margin-top:8px;text-align:left;box-shadow:0 5px 25px rgba(3,16,23,.14)}
.story-ticker:hover,.story-ticker:focus-visible{background:rgba(28,60,70,.94);border-color:#a5ae9a}
.story-sparkle{color:#e9cc94;font-size:18px;line-height:1;flex:none}
#storyTicker{font-size:11px;line-height:1.5;letter-spacing:.015em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0}
.story-arrow{font-size:20px;color:#d3c39f;flex:none}
.panel-backdrop{display:none;position:absolute;inset:0;z-index:7;background:rgba(4,15,23,.12)}
.watch-zone{margin-top:16px}
.watch-button{background:rgba(226,201,144,.075);border:1px solid rgba(226,201,144,.56);border-radius:22px;color:#e7d1ac;padding:9px 16px;min-height:42px;font-size:11px;letter-spacing:.045em}
.watch-button.active{background:#e7d1ac;color:#1d3540}
.relationship-list{display:flex;flex-direction:column;gap:5px}
.relative-card{display:flex;align-items:center;width:100%;min-height:53px;padding:7px 9px;border-radius:10px;border:1px solid rgba(141,172,176,.18);background:rgba(56,79,88,.19);color:#e6efe9;text-align:left;gap:10px}
.relative-card:hover{border-color:rgba(228,206,160,.56);background:rgba(64,88,95,.34)}
.relative-swatch{height:28px;width:28px;border-radius:7px;flex:none;box-shadow:inset 0 -4px 5px #0002}
.relative-card>span:nth-child(2){min-width:0;flex:1}
.relative-card b,.relative-card small{display:block}
.relative-card b{font-size:12px;font-weight:600;line-height:1.45}
.relative-card small{font-size:10px;color:#abc0c4;margin-top:2px;line-height:1.4}
.relative-arrow{font-size:22px;color:#dbc899}
.panel h3 small{font-weight:400;color:#829da4;font-size:10px;letter-spacing:0;margin-left:6px}
.empty-relations{margin:0;padding:10px 0;color:#89a2ac;font-size:11px}
.memory-entry.inherited{color:#f3deb4}
.memory-entry.inherited:before{background:#a7c4e5}
.memory-entry time span{font:10px sans-serif;color:#afbdc1;margin-left:8px}
.trait-tag.rare{background:#514761;color:#f2dda8;border-color:#8c7793}
.chronicle-items{display:flex;flex-direction:column;gap:0}
.chronicle-entry{display:grid;grid-template-columns:25px 1fr;gap:9px;align-items:start;border-bottom:1px solid rgba(207,223,218,.1);padding:14px 0}
.chronicle-icon{font-size:18px;line-height:1.1;color:#e4cc96;text-align:center}
.chronicle-entry time{font:11px Georgia,serif;color:#a9b7bd;display:block;line-height:1.4}
.chronicle-entry p{margin:6px 0 0;font-size:12px;line-height:1.75;color:#d6e3df}
.chronicle-label{font:10px sans-serif;color:#e6d3a4;border:1px solid rgba(226,205,159,.48);padding:2px 5px;border-radius:4px;margin-left:7px}
.chronicle-participants{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.chronicle-participants button{font-size:10px;color:#d6e5db;border:1px solid rgba(156,181,180,.32);background:rgba(92,124,128,.17);border-radius:20px;padding:5px 9px;min-height:29px}
.end-extra{font-size:11px;color:#ddc89f;line-height:1.6;margin:-7px auto 14px;max-width:350px}
.icon-button{touch-action:manipulation}
.close-button{min-height:44px;min-width:44px;touch-action:manipulation}
.primary-button,.secondary-button,.text-button,.archive-filters button,.event-choices button{touch-action:manipulation}
.panel{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#54727a transparent}
@media(max-width:760px){
  .top-hud{padding:calc(env(safe-area-inset-top,0px) + 11px) 15px 0;gap:6px}
  .brand{gap:9px}.brand-mark{width:30px;height:30px;flex:none}.brand b{font-size:18px;letter-spacing:.24em}
  .brand small{font-size:7px;letter-spacing:.02em}
  .clock-wrap{min-width:100px}.clock{font-size:25px;margin:3px 0 5px}.timer-progress{width:100px}
  .hud-stats{top:calc(env(safe-area-inset-top,0px) + 60px);left:15px;gap:11px}
  .hud-stat span{font-size:9px;letter-spacing:0}.hud-stat strong{font-size:17px}
  .bottom-left{left:14px;right:14px;bottom:calc(env(safe-area-inset-bottom,0px) + 83px);max-width:none;width:auto}
  .bottom-left .helper{display:none}
  .status-pill{padding:8px 12px;font-size:10px;max-width:100%;line-height:1.4}
  .story-ticker{margin-top:7px;width:min(380px,100%);height:40px;min-height:40px;padding:8px 12px;border-radius:11px}
  #storyTicker{font-size:11px}
  .bottom-right{right:14px;bottom:calc(env(safe-area-inset-bottom,0px) + 13px);gap:7px}
  .icon-button{height:54px;min-height:54px;width:57px;border-radius:13px;font-size:21px;background:rgba(9,30,39,.77);border-color:rgba(213,229,224,.22)}
  .icon-button span{font-size:9px}
  .toast{bottom:calc(env(safe-area-inset-bottom,0px) + 151px);width:max-content;max-width:calc(100vw - 30px);font-size:11px}
  .panel-backdrop{display:block;background:rgba(7,18,26,.35);backdrop-filter:blur(2px)}
  .panel{height:min(76dvh,720px);max-height:calc(100dvh - env(safe-area-inset-top,0px) - 36px);width:100%;max-width:none;left:0;right:0;bottom:0;top:auto;z-index:9;padding:calc(31px + 4px) 22px calc(env(safe-area-inset-bottom,0px) + 34px);border-radius:23px 23px 0 0;border-bottom:0;background:rgba(15,33,42,.98);box-shadow:0 -18px 55px rgba(1,11,18,.38);-webkit-overflow-scrolling:touch}
  .panel:before{content:'';position:absolute;top:10px;left:calc(50% - 17px);width:34px;height:4px;border-radius:10px;background:rgba(221,229,218,.29)}
  .panel .close-button{top:23px;right:14px}.panel-topline .close-button{top:-12px;right:-6px}
  .relative-card{min-height:55px}.relative-card b{font-size:13px}.relative-card small{font-size:11px}
  .profile-stats b{font-size:16px}.memory-entry{font-size:13px}
  .chronicle-entry p{font-size:13px}
  .start-overlay,.event-overlay,.end-overlay{padding:calc(env(safe-area-inset-top,0px) + 12px) 13px calc(env(safe-area-inset-bottom,0px) + 12px)}
  .start-content{width:100%;max-width:420px;margin:auto 0}
  .start-content h1{font-size:38px}
  .start-content h1 small{font-size:11px}
  .start-lead{font-size:18px;line-height:1.6}
  .start-copy{font-size:11.5px;line-height:1.9;padding:0 12px}
  .start-content .primary-button{width:min(310px,100%);min-height:51px}
  .event-card{max-width:465px;width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 30px);overflow:auto;padding:23px 19px 20px}
  .event-icon{margin:13px 0 4px;font-size:28px}
  .event-card h2{font-size:20px;margin-bottom:8px}
  .event-card>p{font-size:12.5px;line-height:1.7;margin-bottom:15px}
  .event-choices button{min-height:61px;flex-direction:column;align-items:flex-start;gap:5px;font-size:13px;line-height:1.4;padding:11px 13px}
  .choice-effect{font-size:11px;white-space:normal}
  .event-footnote{margin-top:13px}
  .end-card{width:100%;max-width:465px;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);padding:22px 18px 24px}
  .end-card h2{font-size:25px}.end-card>p{font-size:12.5px}
  .end-actions .primary-button,.end-actions .secondary-button{max-width:none;min-height:47px}
}
@media(max-width:760px) and (max-height:720px){
 .brand small{display:none}.brand-mark{width:27px;height:27px}.brand b{font-size:17px}
 .top-hud{padding-top:calc(env(safe-area-inset-top,0px) + 8px)}
 .hud-stats{top:calc(env(safe-area-inset-top,0px) + 43px)}
 .bottom-left{bottom:calc(env(safe-area-inset-bottom,0px) + 71px)}
 .status-pill{font-size:9px;padding:7px 9px}
 .story-ticker{min-height:34px;height:34px;padding:6px 9px}
 .bottom-right{bottom:calc(env(safe-area-inset-bottom,0px) + 9px)}
 .icon-button{height:48px;min-height:48px;width:51px}
 .start-overlay{align-items:flex-start}
 .start-content{padding:4px 0 12px;margin:auto}
 .mini-cube{width:45px;height:47px;margin-bottom:12px}.mini-cube-face i{top:21px;left:13px}.mini-cube-face i:nth-child(2){left:31px}.mini-cube-face em{top:29px;left:20px}
 .start-content h1{font-size:32px;margin:9px 0 10px}.start-lead{font-size:16px;margin-bottom:9px}.start-copy{font-size:11px;line-height:1.7;margin-bottom:11px}
 .rules{padding:7px 0;margin-bottom:12px}.rules b{font-size:22px}.start-tip{margin-top:8px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.end-extra .afterword{display:block;margin:7px 0 0;color:#9fb8bd;font-size:10px;line-height:1.6}

/* HAKO v3: evolving civilizations, not a building editor. */
#eraButton{appearance:none;-webkit-appearance:none;color:#eaf0df;cursor:pointer;pointer-events:auto;transition:border-color .15s,background .15s;min-height:35px;max-width:100%}
#eraButton:hover,#eraButton:focus-visible{border-color:#dec890;background:rgba(30,61,69,.86)}
#eraButton .era-chevron{color:#e8d4a5;font-size:15px;margin-left:3px;line-height:1}
#eraButton #era{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:145px}
.era-history{padding:6px 0 9px;border-bottom:1px solid rgba(192,214,209,.18)}
.era-history h3{font-size:12px;color:#e6cb99;font-weight:600;margin:19px 0 9px}
.era-overview{border-radius:12px;background:linear-gradient(115deg,rgba(92,124,119,.20),rgba(129,106,75,.17));border:1px solid rgba(224,203,161,.30);padding:14px 15px;display:flex;flex-direction:column;gap:5px}
.era-overview span{font-size:10px;color:#b6c7c7;letter-spacing:.1em}
.era-overview strong{font-size:19px;font-weight:500;color:#f1dfb8;letter-spacing:.04em}
.era-overview small{font-size:11px;color:#c1d0cb;line-height:1.55}
.era-steps{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding:5px 0 9px;scrollbar-width:thin}
.era-steps>div{border:1px solid rgba(183,207,205,.25);background:rgba(52,83,91,.24);padding:10px 11px;min-width:152px;max-width:170px;border-radius:10px;scroll-snap-align:start;flex-shrink:0}
.era-steps time{color:#b6cecb;font-size:10px;display:block}
.era-steps b{display:block;font-size:12px;color:#f1dfb6;margin:4px 0}
.era-steps p{font-size:10px;color:#c1ced0;line-height:1.6;margin:0}
.era-sites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.era-sites button{appearance:none;min-width:0;background:rgba(49,73,83,.42);color:#e6eade;border:1px solid rgba(171,191,190,.26);border-radius:10px;display:flex;align-items:center;gap:7px;text-align:left;min-height:47px;padding:8px 9px;font-size:10px}
.era-sites button>span{height:19px;width:19px;flex:none;border-radius:5px}
.era-sites b{font-size:11px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;min-width:0}
.era-sites small{white-space:nowrap;color:#d7c696;font-size:9px}
.era-sites button:hover{border-color:#e0c99c;background:rgba(70,103,111,.5)}
.place-icon{height:52px;width:52px;border-radius:12px;background:var(--place-color,#a6c6b7);color:#263945;display:flex;align-items:center;justify-content:center;font-size:32px;box-shadow:inset -7px -7px 0 rgba(0,0,0,.12);margin:16px auto}
.end-civilization{border:1px solid rgba(226,205,167,.32);border-radius:10px;padding:10px 13px;margin:0 auto 13px;max-width:345px;display:flex;flex-direction:column;gap:5px;background:rgba(170,144,97,.07)}
.end-civilization b{color:#e9d3a6;font-size:12px;font-weight:600}
.end-civilization span{font-size:10px;color:#bacbc5;line-height:1.5}
@media(max-width:760px){
 #eraButton{min-height:38px;max-width:calc(100% - 8px);gap:6px}
 #eraButton #era{max-width:133px}
 .era-history h3{margin-top:17px}
 .era-steps>div{min-width:143px}
 .era-sites{grid-template-columns:minmax(0,1fr)}
 .era-sites button{min-height:47px}
 .end-civilization{max-width:100%}
}
@media(max-width:390px){#eraButton #era{max-width:119px}.era-history{padding-top:1px}}
