:root {
  color-scheme: dark;
  --ink: #101923;
  --ink-soft: #182431;
  --parchment: #eee6d5;
  --paper: #f7f2e7;
  --gold: #d2aa5d;
  --gold-bright: #efd59a;
  --copper: #a96237;
  --forest: #355b3d;
  --danger: #c94a32;
  --light-path: #8ed8e8;
  --dragon-path: #d16748;
  --glass: rgb(11 18 25 / 78%);
  --glass-strong: rgb(11 18 25 / 92%);
  --line: rgb(239 213 154 / 22%);
  --muted: #aeb7bd;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --ui-scale: 1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; overflow: hidden; background: var(--ink); }
body { color: #f8f5ed; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.boot {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center;
  background: radial-gradient(circle at 50% 42%, #26394a 0, #101923 48%, #090e13 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-mark { position: relative; width: 68px; height: 76px; margin-bottom: 22px; }
.boot-mark::before { content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0, 92% 18%, 89% 66%, 50% 100%, 11% 66%, 8% 18%); background: linear-gradient(145deg, #efd59a, #986029); }
.boot-mark::after { content: ""; position: absolute; inset: 4px; clip-path: inherit; background: var(--ink); }
.boot-mark span, .boot-mark i { position: absolute; z-index: 1; display: block; background: var(--gold); }
.boot-mark span { width: 7px; height: 33px; top: 19px; left: 24px; }
.boot-mark i { width: 24px; height: 7px; top: 45px; left: 24px; }
.boot p { margin: 0 0 7px; font: 600 17px Georgia, serif; letter-spacing: .08em; }
.boot small { color: var(--muted); }

.entry { position: fixed; inset: 0; min-height: 100dvh; overflow: auto; isolation: isolate; }
#entry-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; }
.entry-scrim { position: fixed; inset: 0; z-index: -2; background: linear-gradient(90deg, rgb(6 11 15 / 86%) 0%, rgb(8 14 19 / 55%) 50%, rgb(5 9 13 / 70%) 100%), linear-gradient(0deg, rgb(4 8 11 / 75%), transparent 48%); }
.entry-scrim::after { content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none; background-image: radial-gradient(#e6cf9b 0.55px, transparent .65px); background-size: 5px 5px; mix-blend-mode: soft-light; }
.entry-header { position: relative; z-index: 3; min-height: 90px; display: flex; align-items: center; justify-content: space-between; padding: calc(18px + var(--safe-top)) max(4vw, calc(20px + var(--safe-right))) 18px max(4vw, calc(20px + var(--safe-left))); border-bottom: 1px solid rgb(255 255 255 / 10%); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand-sigil { position: relative; width: 40px; height: 46px; display: grid; place-items: center; clip-path: polygon(50% 0, 93% 18%, 88% 68%, 50% 100%, 12% 68%, 7% 18%); background: linear-gradient(145deg, var(--gold-bright), #9b612b); }
.brand-sigil::before { content: ""; position: absolute; inset: 3px; clip-path: inherit; background: #101923; }
.brand-sigil i { position: relative; z-index: 1; width: 15px; height: 20px; border-left: 4px solid var(--gold); border-bottom: 4px solid var(--gold); }
.brand strong { display: block; font: 700 21px/1 Georgia, serif; letter-spacing: .06em; text-transform: uppercase; }
.brand small { display: block; margin-top: 3px; color: var(--gold-bright); font: 600 9px/1 system-ui; letter-spacing: .34em; text-transform: uppercase; }
.entry-actions { display: flex; align-items: center; gap: 10px; }
.connection-chip { min-height: 36px; display: inline-flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 99px; color: #c7d1d5; background: rgb(5 10 14 / 45%); font-size: 12px; backdrop-filter: blur(12px); }
.connection-chip i { width: 7px; height: 7px; border-radius: 50%; background: #d4a345; box-shadow: 0 0 0 4px rgb(212 163 69 / 15%); }
.connection-chip.is-online i { background: #6ac28a; box-shadow: 0 0 0 4px rgb(106 194 138 / 15%); }
.connection-chip.is-offline i { background: #d66755; box-shadow: 0 0 0 4px rgb(214 103 85 / 15%); }
.connection-chip.is-checking i { animation: pulse 1.4s infinite; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid rgb(255 255 255 / 14%); border-radius: 50%; background: rgb(5 10 14 / 48%); }
.icon-button:hover { border-color: var(--gold); background: rgb(20 31 39 / 75%); }
.icon-button svg { width: 20px; height: 20px; }

.entry-layout { position: relative; z-index: 2; min-height: calc(100dvh - 145px); width: min(1450px, 92vw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(350px, 450px); align-items: center; gap: clamp(55px, 9vw, 160px); padding: 45px 0 60px; }
.hero-copy { max-width: 760px; text-shadow: 0 2px 24px #000; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--gold-bright); font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { width: 42px; height: 1px; background: var(--gold); }
.hero-copy h1 { margin: 0; font: 500 clamp(48px, 6.2vw, 94px)/.94 Georgia, "Times New Roman", serif; letter-spacing: -.055em; text-wrap: balance; }
.hero-copy h1 em { color: var(--gold-bright); font-style: normal; }
.hero-lead { max-width: 670px; margin: 28px 0 0; color: #d7dde0; font-size: clamp(16px, 1.35vw, 21px); line-height: 1.65; text-wrap: balance; }
.world-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; max-width: 650px; margin-top: 36px; border: 1px solid rgb(255 255 255 / 13%); background: rgb(255 255 255 / 13%); box-shadow: 0 14px 50px rgb(0 0 0 / 24%); }
.world-pillars article { position: relative; min-height: 86px; padding: 18px 18px 15px 43px; background: rgb(9 15 20 / 69%); backdrop-filter: blur(10px); }
.world-pillars b { position: absolute; left: 13px; top: 20px; color: var(--gold); font: 500 10px Georgia, serif; }
.world-pillars span, .world-pillars small { display: block; }
.world-pillars span { font: 600 15px Georgia, serif; }
.world-pillars small { margin-top: 7px; color: #9faeb4; font-size: 11px; }
.text-action { margin-top: 24px; padding: 6px 0; border: 0; border-bottom: 1px solid rgb(239 213 154 / 36%); color: #ece5d5; background: none; font-size: 13px; }
.text-action span { margin-left: 10px; color: var(--gold-bright); }

.auth-card { border: 1px solid rgb(239 213 154 / 20%); border-radius: 3px; background: linear-gradient(145deg, rgb(18 28 36 / 95%), rgb(8 14 19 / 95%)); box-shadow: 0 36px 90px rgb(0 0 0 / 45%); backdrop-filter: blur(22px); }
.auth-card::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.auth-heading { padding: 30px 34px 22px; }
.overline { display: block; margin-bottom: 7px; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.auth-heading h2 { margin: 0; font: 600 25px/1.2 Georgia, serif; }
.auth-heading p { margin: 9px 0 0; color: #9eabb1; font-size: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 0 34px; border-bottom: 1px solid var(--line); }
.auth-tabs button { position: relative; padding: 12px 5px 13px; border: 0; color: #85939a; background: none; font-size: 12px; font-weight: 700; }
.auth-tabs button::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; transform: scaleX(0); background: var(--gold); transition: transform .18s; }
.auth-tabs button.is-active { color: #fff; }
.auth-tabs button.is-active::after { transform: scaleX(1); }
.auth-form { display: none; gap: 15px; padding: 24px 34px 28px; }
.auth-form.is-active { display: grid; }
.auth-form label > span:first-child, .captcha-row label > span { display: block; margin-bottom: 7px; color: #cbd2d4; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.auth-form input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 3px; color: #fff; background: rgb(255 255 255 / 5%); transition: border .15s, background .15s; }
.auth-form input::placeholder { color: #68777e; }
.auth-form input:focus { border-color: var(--gold); background: rgb(255 255 255 / 8%); outline: 0; }
.password-field { position: relative; display: block; }
.password-field button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; color: #849198; background: transparent; }
.captcha-row { display: grid; grid-template-columns: 1fr 1.06fr; align-items: end; gap: 10px; }
.captcha-challenge { height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-left: 14px; border: 1px dashed rgb(239 213 154 / 35%); border-radius: 3px; color: var(--gold-bright); background: rgb(210 170 93 / 7%); font: 600 13px Georgia, serif; }
.captcha-challenge button { width: 38px; align-self: stretch; border: 0; border-left: 1px solid rgb(239 213 154 / 15%); color: var(--gold); background: transparent; }
.privacy-note { margin: -2px 0 0; color: #78868c; font-size: 10px; line-height: 1.45; }
.form-error { min-height: 14px; margin: -3px 0; color: #f08a78; font-size: 11px; }
.primary-button { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; border: 1px solid #e1bb6f; border-radius: 3px; color: #151b20; background: linear-gradient(110deg, #e7c47e, #c89449); box-shadow: 0 8px 24px rgb(201 148 73 / 18%); font-weight: 800; }
.primary-button:hover { filter: brightness(1.08); }
.primary-button:disabled { filter: grayscale(.8); opacity: .55; cursor: wait; }
.primary-button i { font-style: normal; font-size: 18px; }
.auth-card > footer { display: flex; justify-content: center; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); color: #65757c; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.entry-foot { position: relative; z-index: 2; min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(4vw, 20px) max(var(--safe-bottom), 0px); border-top: 1px solid rgb(255 255 255 / 8%); color: #8a989e; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.game { position: fixed; inset: 0; overflow: hidden; background: #101923; user-select: none; }
#world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: 0; touch-action: none; }
.game::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(5 10 16 / 25%) 0, transparent 18%, transparent 72%, rgb(2 5 9 / 25%) 100%); }
.glass-panel { border: 1px solid var(--line); background: var(--glass); box-shadow: 0 10px 28px rgb(0 0 0 / 18%); backdrop-filter: blur(9px); }
.hud-top { position: absolute; z-index: 8; top: calc(14px + var(--safe-top)); right: calc(16px + var(--safe-right)); left: calc(16px + var(--safe-left)); display: grid; grid-template-columns: minmax(275px, 340px) minmax(320px, 450px) minmax(250px, 340px); justify-content: space-between; align-items: start; gap: 16px; pointer-events: none; transform: scale(var(--ui-scale)); transform-origin: top center; }
.hud-top > * { pointer-events: auto; }
.identity-panel { min-height: 70px; display: grid; grid-template-columns: 45px minmax(100px, 1fr); grid-template-rows: 35px 19px; column-gap: 11px; padding: 10px 12px; border-radius: 4px; }
.mini-sigil { grid-row: 1 / 3; width: 43px; height: 49px; display: grid; place-items: center; clip-path: polygon(50% 0, 92% 19%, 87% 70%, 50% 100%, 13% 70%, 8% 19%); color: var(--gold-bright); background: linear-gradient(145deg, #4a3828, #17222b); font: 700 17px Georgia, serif; }
.identity-copy { min-width: 0; align-self: end; }
.identity-copy strong, .identity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-copy strong { font: 600 14px Georgia, serif; }
.identity-copy small { margin-top: 3px; color: #8f9ca2; font-size: 9px; }
.vitals { display: grid; grid-template-columns: 1fr 35px; align-items: center; gap: 7px; }
.vital { position: relative; height: 5px; overflow: visible; border-radius: 9px; background: rgb(255 255 255 / 10%); }
.vital i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: inherit; transition: width .2s; }
.vital.health i { background: linear-gradient(90deg, #8d352e, #d45c4e); }
.vital.stamina i { background: linear-gradient(90deg, #866b2e, #ddbc61); }
.vital b { position: absolute; right: -33px; top: -5px; width: 28px; color: #c3c9cb; font-size: 9px; text-align: right; }
.world-panel { justify-self: center; min-height: 66px; width: min(100%, 450px); display: grid; grid-template-columns: 115px 1fr 86px; align-items: center; padding: 7px 11px; border-radius: 4px; }
.compass { display: flex; align-items: center; justify-content: center; gap: 6px; color: #849199; font-size: 8px; }
.compass i { width: 19px; height: 1px; background: rgb(255 255 255 / 22%); }
.compass strong { min-width: 21px; color: var(--gold-bright); font: 700 15px Georgia, serif; text-align: center; }
.domain-line { min-width: 0; padding: 0 12px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; }
.domain-line strong, .domain-line span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-line strong { font: 600 13px Georgia, serif; }
.domain-line span { margin-top: 5px; color: #91a0a6; font-size: 9px; }
.day-clock { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding-left: 9px; }
.day-clock svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.day-clock svg circle:first-child { fill: rgb(255 255 255 / 4%); stroke: rgb(255 255 255 / 10%); }
#clock-progress { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-dasharray: 113; stroke-dashoffset: 80; transition: stroke .5s; }
#clock-icon { stroke: var(--gold-bright); transform-origin: center; transform: rotate(90deg); }
.day-clock b, .day-clock small { display: block; }
.day-clock b { font: 600 10px Georgia, serif; }
.day-clock small { margin-top: 3px; color: #87949a; font-size: 8px; }
.wealth-panel { justify-self: end; min-height: 66px; display: flex; align-items: stretch; padding: 6px; border-radius: 4px; }
.wealth-panel > div { min-width: 78px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border-right: 1px solid var(--line); }
.resource-icon.coin { color: var(--gold-bright); }
.wealth-panel p { margin: 0; }
.wealth-panel p b, .wealth-panel p small { display: block; }
.wealth-panel p b { font-size: 12px; }
.wealth-panel p small { margin-top: 3px; color: #849198; font-size: 8px; }
.path-chip { display: flex; align-items: center; gap: 8px; min-width: 146px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); text-align: left; background: transparent; }
.path-chip > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #64727a; border-radius: 50%; color: #a7b1b6; }
.path-chip p b { font-size: 10px; }
.path-chip.is-light > span { color: var(--light-path); border-color: var(--light-path); box-shadow: 0 0 15px rgb(142 216 232 / 30%); }
.path-chip.is-dragon > span { color: var(--dragon-path); border-color: var(--dragon-path); box-shadow: 0 0 15px rgb(209 103 72 / 30%); }
.hud-menu-button { margin: 8px 1px 8px 7px; border: 0; border-radius: 3px; background: transparent; }

.objective-card { position: absolute; z-index: 7; top: calc(104px + var(--safe-top)); left: calc(16px + var(--safe-left)); width: min(305px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 4px; transform: scale(var(--ui-scale)); transform-origin: top left; }
.objective-card > div { display: flex; justify-content: space-between; align-items: start; }
.objective-card > div button { width: 24px; height: 20px; border: 0; color: #88959a; background: transparent; }
.objective-card > strong { display: block; margin-top: 4px; font: 600 14px/1.25 Georgia, serif; }
.objective-card > p { margin: 7px 0 10px; color: #a5b0b4; font-size: 10px; line-height: 1.45; }
.objective-progress { height: 3px; display: block; overflow: hidden; border-radius: 4px; background: rgb(255 255 255 / 10%); }
.objective-progress i { display: block; width: 0%; height: 100%; background: var(--gold); transition: width .35s; }
.objective-card > small { display: block; margin-top: 6px; color: #76858c; font-size: 8px; text-align: right; }
.objective-card.is-collapsed { width: auto; padding: 9px 12px; }
.objective-card.is-collapsed > strong { margin: 0; font-size: 11px; }
.objective-card.is-collapsed > p, .objective-card.is-collapsed > span, .objective-card.is-collapsed > small, .objective-card.is-collapsed .overline { display: none; }

.event-banner { position: absolute; z-index: 12; top: calc(102px + var(--safe-top)); left: 50%; width: min(480px, calc(100vw - 32px)); display: grid; grid-template-columns: 47px 1fr 26px; gap: 12px; align-items: center; padding: 13px; border: 1px solid rgb(239 213 154 / 34%); border-radius: 3px; background: var(--glass-strong); box-shadow: 0 18px 50px #0006; transform: translateX(-50%); animation: banner-in .35s ease both; }
.event-glyph { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-bright); font-size: 18px; }
.event-banner small, .event-banner strong, .event-banner p { display: block; }
.event-banner small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.event-banner strong { margin-top: 2px; font: 600 14px Georgia, serif; }
.event-banner p { margin: 3px 0 0; color: #9eaaaf; font-size: 9px; }
.event-banner button { align-self: start; border: 0; color: #87959a; background: transparent; font-size: 20px; }

.reticle { position: absolute; z-index: 5; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); pointer-events: none; }
.reticle i, .reticle span { position: absolute; left: 50%; top: 50%; background: rgb(255 255 255 / 80%); box-shadow: 0 1px 2px #000; }
.reticle i:first-child { width: 14px; height: 1px; transform: translate(-50%, -50%); }
.reticle i:nth-child(2) { width: 1px; height: 14px; transform: translate(-50%, -50%); }
.reticle span { width: 3px; height: 3px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--gold-bright); }
.reticle.can-act i { background: var(--gold-bright); }
.interaction-prompt { position: absolute; z-index: 9; left: 50%; bottom: calc(118px + var(--safe-bottom)); display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--glass-strong); box-shadow: 0 8px 25px #0005; transform: translateX(-50%); }
kbd { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 5px; border: 1px solid rgb(255 255 255 / 22%); border-bottom-width: 2px; border-radius: 3px; color: #dce1e3; background: rgb(255 255 255 / 8%); font: 700 9px system-ui; }
.interaction-prompt > span { text-align: left; }
.interaction-prompt small, .interaction-prompt b { display: block; }
.interaction-prompt small { color: var(--gold); font-size: 8px; text-transform: uppercase; }
.interaction-prompt b { margin-top: 2px; font: 600 11px Georgia, serif; }
.build-readout { position: absolute; z-index: 9; left: 50%; bottom: calc(119px + var(--safe-bottom)); min-width: 300px; padding: 9px 13px; border-color: rgb(91 197 127 / 36%); text-align: center; transform: translateX(-50%); }
.build-readout span { display: block; color: #77d197; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.build-readout b { display: block; margin: 3px 0 5px; font: 600 12px Georgia, serif; }
.build-readout small { color: #85939a; font-size: 8px; }
.build-readout kbd { min-width: 17px; height: 17px; }

.hotbar { position: absolute; z-index: 9; left: 50%; bottom: calc(18px + var(--safe-bottom)); display: flex; gap: 4px; transform: translateX(-50%) scale(var(--ui-scale)); transform-origin: bottom center; }
.hotbar-slot { position: relative; width: 64px; height: 72px; display: grid; place-content: center; justify-items: center; gap: 3px; padding: 7px 3px 4px; border: 1px solid rgb(239 213 154 / 17%); border-radius: 3px; color: #a8b2b6; background: var(--glass); backdrop-filter: blur(7px); }
.hotbar-slot:hover, .hotbar-slot.is-active { color: #fff; border-color: var(--gold); background: rgb(32 39 40 / 90%); }
.hotbar-slot:disabled { opacity: .34; cursor: not-allowed; filter: grayscale(.7); }
.hotbar-slot.is-active::before { content: ""; position: absolute; top: -1px; right: 8px; left: 8px; height: 2px; background: var(--gold-bright); }
.hotbar-slot kbd { position: absolute; top: 4px; left: 4px; min-width: 14px; height: 14px; padding: 0; border: 0; color: #66747a; background: none; }
.slot-icon { color: var(--gold-bright); font: 600 22px/1 Georgia, serif; }
.hotbar-slot small { max-width: 55px; overflow: hidden; text-overflow: ellipsis; color: inherit; font-size: 8px; white-space: nowrap; }
.hotbar-slot > b { position: absolute; right: 5px; bottom: 15px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; color: #172028; background: var(--gold-bright); font-size: 8px; line-height: 15px; }
.hotbar-slot.utility { margin-left: 6px; }

.chat-panel { position: absolute; z-index: 10; left: calc(16px + var(--safe-left)); bottom: calc(18px + var(--safe-bottom)); width: min(360px, calc(100vw - 32px)); }
.chat-messages { max-height: 150px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; margin-bottom: 8px; pointer-events: none; mask-image: linear-gradient(transparent, #000 30%); }
.chat-message { padding: 5px 8px; border-radius: 3px; color: #d9dfe0; background: rgb(5 10 14 / 42%); font-size: 10px; text-shadow: 0 1px 2px #000; animation: fade-up .2s ease; }
.chat-message b { color: var(--gold-bright); }
.chat-message.system { color: #9bc8d0; font-style: italic; }
.chat-panel form { display: grid; grid-template-columns: 1fr auto; padding: 6px; border: 1px solid var(--line); background: var(--glass-strong); }
.chat-panel form label { position: absolute; clip: rect(0 0 0 0); }
.chat-panel input { min-width: 0; height: 32px; padding: 0 8px; border: 0; color: #fff; background: transparent; outline: 0; }
.chat-panel form button { padding: 0 12px; border: 1px solid var(--gold); color: var(--gold-bright); background: rgb(210 170 93 / 8%); font-size: 9px; }
.chat-toggle { padding: 7px 10px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 3px; color: #aab4b8; background: rgb(5 10 14 / 52%); font-size: 9px; }
.chat-toggle span { color: var(--gold); margin-right: 4px; }
.chat-toggle kbd { height: 15px; min-width: auto; margin-left: 4px; border: 0; background: none; }
.pointer-hint { position: absolute; z-index: 12; left: 50%; top: calc(50% + 50px); padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; color: #d9dedf; background: var(--glass-strong); transform: translateX(-50%); font-size: 10px; }
.pointer-hint span { margin-right: 5px; color: var(--gold); }
.toast-stack { position: absolute; z-index: 60; right: calc(16px + var(--safe-right)); bottom: calc(104px + var(--safe-bottom)); width: min(335px, calc(100vw - 32px)); display: grid; gap: 7px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--glass-strong); box-shadow: 0 12px 30px #0005; animation: toast-in .25s ease both; }
.toast > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: var(--gold-bright); background: rgb(210 170 93 / 12%); }
.toast b, .toast small { display: block; }
.toast b { font: 600 11px Georgia, serif; }
.toast small { margin-top: 2px; color: #93a0a5; font-size: 8px; }
.toast.success { border-color: rgb(96 191 127 / 35%); }
.toast.error { border-color: rgb(201 74 50 / 45%); }
.damage-vignette { position: absolute; z-index: 6; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(transparent 45%, rgb(131 19 11 / 58%)); transition: opacity .18s; }

.game-dialog { width: min(760px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); padding: 0; overflow: visible; border: 1px solid rgb(239 213 154 / 30%); border-radius: 4px; color: #f7f2e7; background: transparent; box-shadow: 0 35px 100px #000b; }
.game-dialog::backdrop { background: rgb(4 8 12 / 70%); backdrop-filter: blur(4px); }
.dialog-shell { max-height: calc(100dvh - 30px); overflow: auto; padding: 25px; background: linear-gradient(145deg, #17232d, #0b1218); }
.dialog-shell > header { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-shell h2 { margin: 0; font: 600 24px/1.15 Georgia, serif; }
.close-dialog { width: 34px; height: 34px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 50%; color: #9aa6ab; background: transparent; font-size: 20px; }
.close-dialog:hover { border-color: var(--gold); color: #fff; }
.inventory-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; padding: 22px 0; }
.dialog-shell h3 { margin: 0 0 12px; color: #b9c1c4; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.resource-grid article { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid rgb(255 255 255 / 9%); background: rgb(255 255 255 / 3%); }
.material { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 3px; font: 600 19px Georgia, serif; }
.material.wood { color: #d3a66c; background: #5d3b27; }
.material.stone { color: #c3c4bb; background: #4a5154; }
.material.iron { color: #c2d0d4; background: #35434a; }
.material.food { color: #cf6f55; background: #4f3028; }
.resource-grid b, .resource-grid small { display: block; }
.resource-grid b { font-size: 16px; }
.resource-grid small { margin-top: 2px; color: #829097; font-size: 8px; }
.build-catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.build-catalog h3 { grid-column: 1 / -1; }
.build-catalog button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 1fr 1fr; column-gap: 9px; padding: 9px; border: 1px solid rgb(255 255 255 / 9%); color: #eee; text-align: left; background: rgb(255 255 255 / 3%); }
.build-catalog button:hover { border-color: var(--gold); }
.build-catalog button:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.5); }
.build-catalog button > span { grid-row: 1 / 3; align-self: center; color: var(--gold-bright); font-size: 22px; text-align: center; }
.build-catalog button b { font-size: 10px; }
.build-catalog button small { color: #7f8d93; font-size: 8px; }
.inventory-dialog footer { display: flex; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); color: #839096; font-size: 9px; }
.inventory-dialog footer b { color: #d6dddf; }

.dialog-intro { max-width: 630px; margin: 18px 0; color: #a9b3b7; font-size: 12px; line-height: 1.6; }
.path-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.path-options > button { padding: 0 0 18px; overflow: hidden; border: 1px solid rgb(255 255 255 / 11%); color: #f5f0e6; text-align: left; background: rgb(255 255 255 / 3%); }
.path-options > button:hover { border-color: var(--gold); transform: translateY(-2px); }
.path-options > button:disabled { opacity: .5; cursor: wait; transform: none; }
.path-art { position: relative; height: 145px; display: grid; place-items: center; overflow: hidden; }
.path-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 25%) .5px, transparent .7px); background-size: 7px 7px; opacity: .25; }
.light-art { color: #dff9ff; background: radial-gradient(circle, rgb(142 216 232 / 50%), rgb(36 75 84 / 15%) 45%, #101b22 74%); }
.dragon-art { color: #ed9b77; background: radial-gradient(circle, rgb(209 103 72 / 45%), rgb(84 37 28 / 20%) 43%, #1d1312 74%); }
.path-art i { position: absolute; width: 88px; height: 88px; border: 1px solid currentColor; border-radius: 50%; opacity: .45; box-shadow: 0 0 45px currentColor; }
.path-art b { position: relative; z-index: 1; font-size: 42px; }
.path-options small, .path-options strong, .path-options p { display: block; margin-right: 18px; margin-left: 18px; }
.path-options small { margin-top: 16px; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.path-options strong { margin-top: 5px; font: 600 15px/1.3 Georgia, serif; }
.path-options p { min-height: 45px; margin-bottom: 0; color: #8f9ca1; font-size: 9px; line-height: 1.55; }
.path-warning { margin: 14px 0 0; color: #bd886f; font-size: 9px; text-align: center; }

.claim-dialog { width: min(470px, calc(100vw - 30px)); }
.claim-map { position: relative; height: 145px; display: grid; place-content: center; justify-items: center; margin: 18px 0; overflow: hidden; border: 1px solid rgb(255 255 255 / 9%); color: var(--gold-bright); background-color: #1c2a2b; background-image: linear-gradient(rgb(239 213 154 / 8%) 1px, transparent 1px), linear-gradient(90deg, rgb(239 213 154 / 8%) 1px, transparent 1px); background-size: 20px 20px; }
.claim-map span { position: absolute; inset: 17px 44px; border: 2px solid var(--gold); background: rgb(210 170 93 / 8%); box-shadow: 0 0 25px rgb(210 170 93 / 12%); }
.claim-map b, .claim-map small { position: relative; z-index: 1; display: block; }
.claim-map b { font: 600 20px Georgia, serif; }
.claim-map small { margin-top: 4px; color: #9ca9ad; font-size: 9px; }
.claim-dialog ul { margin: 0 0 18px; padding: 0; list-style: none; color: #a8b2b6; font-size: 10px; }
.claim-dialog li { padding: 7px 0; border-bottom: 1px solid rgb(255 255 255 / 6%); }
.claim-dialog li::before { content: "◇"; margin-right: 9px; color: var(--gold); }
.claim-price { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); background: rgb(210 170 93 / 5%); }
.claim-price span { color: #88969c; font-size: 9px; }
.claim-price strong { color: var(--gold-bright); font: 600 14px Georgia, serif; }
.claim-dialog .primary-button { width: 100%; }

.settings-dialog { width: min(560px, calc(100vw - 30px)); }
.settings-dialog section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid rgb(255 255 255 / 10%); background: rgb(0 0 0 / 15%); }
.segmented button { height: 37px; border: 0; color: #89969c; background: transparent; font-size: 9px; }
.segmented button.is-active { color: #1c2327; background: var(--gold-bright); font-weight: 800; }
.setting-list label { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; }
.setting-list b, .setting-list small { display: block; }
.setting-list b { font-size: 10px; }
.setting-list small { margin-top: 3px; color: #7f8d93; font-size: 8px; }
input[role="switch"] { appearance: none; width: 37px; height: 20px; padding: 2px; border-radius: 12px; background: #344149; transition: background .2s; }
input[role="switch"]::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: #c5cccf; transition: transform .2s; }
input[role="switch"]:checked { background: var(--gold); }
input[role="switch"]:checked::before { transform: translateX(17px); background: #172028; }
.range-setting { display: grid; grid-template-columns: 145px 1fr 38px; align-items: center; gap: 12px; color: #bac2c5; font-size: 10px; }
.range-setting input { accent-color: var(--gold); }
.range-setting output { color: var(--gold-bright); text-align: right; }
.menu-dialog { width: min(410px, calc(100vw - 30px)); }
.menu-dialog .dialog-shell > button { width: 100%; min-height: 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border: 0; border-bottom: 1px solid rgb(255 255 255 / 7%); color: #cdd3d5; text-align: left; background: transparent; }
.menu-dialog .dialog-shell > button:hover { color: var(--gold-bright); background: rgb(255 255 255 / 3%); }
.menu-dialog .dialog-shell > button:disabled { color: #59666c; }
.menu-dialog .dialog-shell > button small { font-size: 8px; }
.menu-dialog .dialog-shell > button.danger { color: #db7b69; }
.menu-dialog footer { display: flex; justify-content: space-between; padding-top: 17px; color: #64737a; font-size: 8px; }

.mobile-controls { display: none; }
.high-contrast { --glass: rgb(3 7 10 / 94%); --line: rgb(255 227 168 / 55%); --muted: #d5dcde; }
.large-ui { --ui-scale: 1.14; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(5px); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } }

@media (max-width: 1050px) {
  .entry-layout { grid-template-columns: minmax(0, 1fr) 390px; gap: 45px; }
  .hero-copy h1 { font-size: clamp(45px, 6vw, 68px); }
  .hud-top { grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.2fr); }
  .wealth-panel { position: absolute; right: 0; top: 78px; }
  .objective-card { top: calc(102px + var(--safe-top)); }
}

@media (max-width: 900px), (pointer: coarse) {
  .entry { overflow-y: auto; }
  .entry-header { min-height: 72px; padding-top: calc(12px + var(--safe-top)); padding-bottom: 12px; }
  .brand strong { font-size: 17px; }
  .brand-sigil { width: 32px; height: 38px; }
  .connection-chip span { display: none; }
  .connection-chip { min-width: 36px; justify-content: center; padding: 0; }
  .entry-layout { width: min(92vw, 500px); min-height: auto; grid-template-columns: 1fr; gap: 30px; padding: 50px 0; }
  .hero-copy h1 { font-size: clamp(43px, 12.5vw, 64px); }
  .hero-lead { font-size: 15px; }
  .world-pillars { display: none; }
  .auth-card { width: 100%; }
  .entry-foot { display: none; }

  .hud-top { top: calc(7px + var(--safe-top)); right: calc(7px + var(--safe-right)); left: calc(7px + var(--safe-left)); grid-template-columns: minmax(160px, 1fr) auto; gap: 6px; }
  .identity-panel { min-height: 52px; grid-template-columns: 34px minmax(90px, 1fr); grid-template-rows: 27px 13px; padding: 6px 8px; }
  .mini-sigil { width: 32px; height: 38px; font-size: 12px; }
  .identity-copy strong { font-size: 11px; }
  .identity-copy small { font-size: 8px; }
  .vitals { grid-template-columns: 1fr 25px; }
  .world-panel { min-height: 52px; width: 148px; grid-template-columns: 1fr 47px; padding: 4px 6px; }
  .world-panel .compass { display: none; }
  .domain-line { padding: 0 5px; border-left: 0; }
  .domain-line strong { font-size: 9px; }
  .domain-line span { font-size: 8px; }
  .day-clock { padding-left: 5px; gap: 3px; }
  .day-clock svg { width: 27px; height: 27px; }
  .day-clock span { display: none; }
  .wealth-panel { top: 58px; min-height: 40px; padding: 3px; }
  .wealth-panel > div { min-width: 57px; padding: 0 6px; }
  .wealth-panel p small { display: none; }
  .path-chip { min-width: auto; padding: 0 7px; }
  .path-chip p { display: none; }
  .hud-menu-button { width: 32px; height: 32px; margin: 1px 0 1px 3px; }
  .objective-card { top: calc(112px + var(--safe-top)); left: calc(7px + var(--safe-left)); width: 235px; padding: 10px 12px; }
  .objective-card > strong { font-size: 11px; }
  .objective-card > p { font-size: 8px; }
  .event-banner { top: calc(110px + var(--safe-top)); grid-template-columns: 36px 1fr 22px; padding: 9px; }
  .event-glyph { width: 34px; height: 34px; }
  .event-banner p { display: none; }
  .pointer-hint { display: none; }
  .chat-panel { right: calc(8px + var(--safe-right)); bottom: calc(76px + var(--safe-bottom)); left: calc(8px + var(--safe-left)); width: auto; pointer-events: none; }
  .chat-panel .chat-messages, .chat-panel .chat-toggle { display: none; }
  .chat-panel form { width: 100%; pointer-events: auto; }
  .hotbar { bottom: calc(8px + var(--safe-bottom)); gap: 2px; }
  .hotbar-slot { width: 49px; height: 55px; padding: 5px 2px 3px; }
  .hotbar-slot:nth-child(4), .hotbar-slot:nth-child(5) { display: none; }
  .slot-icon { font-size: 17px; }
  .hotbar-slot small { font-size: 8px; }
  .interaction-prompt, .build-readout { bottom: calc(74px + var(--safe-bottom)); }
  .interaction-prompt kbd { display: none; }
  .build-readout { min-width: 230px; }
  .build-readout small { display: none; }
  .toast-stack { right: calc(8px + var(--safe-right)); bottom: calc(75px + var(--safe-bottom)); }
  .mobile-controls { position: absolute; z-index: 10; inset: 0; display: block; pointer-events: none; }
  .move-zone { position: absolute; left: calc(22px + var(--safe-left)); bottom: calc(86px + var(--safe-bottom)); width: 116px; height: 116px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 50%; background: rgb(7 13 18 / 25%); pointer-events: auto; touch-action: none; }
  .move-stick { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border: 1px solid rgb(239 213 154 / 42%); border-radius: 50%; background: rgb(15 24 31 / 62%); box-shadow: 0 5px 18px #0004; transform: translate(-50%, -50%); }
  .look-zone { position: absolute; top: 105px; right: 0; bottom: 72px; left: 42%; pointer-events: auto; touch-action: none; }
  .mobile-action { position: absolute; display: grid; place-content: center; justify-items: center; border: 1px solid rgb(239 213 154 / 25%); border-radius: 50%; color: #f3ead7; background: rgb(8 15 20 / 57%); backdrop-filter: blur(5px); pointer-events: auto; touch-action: manipulation; }
  .mobile-action span { color: var(--gold-bright); font-size: 18px; }
  .mobile-action small { font-size: 8px; }
  .mobile-action.interact { right: calc(24px + var(--safe-right)); bottom: calc(102px + var(--safe-bottom)); width: 67px; height: 67px; }
  .mobile-action.build { right: calc(98px + var(--safe-right)); bottom: calc(86px + var(--safe-bottom)); width: 51px; height: 51px; }
  .mobile-action.place { right: calc(24px + var(--safe-right)); bottom: calc(102px + var(--safe-bottom)); width: 67px; height: 67px; border-color: rgb(97 201 134 / 48%); background: rgb(25 82 52 / 72%); }
  .mobile-action.rotate { right: calc(101px + var(--safe-right)); bottom: calc(145px + var(--safe-bottom)); width: 48px; height: 48px; }
  .mobile-action.run { left: calc(105px + var(--safe-left)); bottom: calc(177px + var(--safe-bottom)); width: 42px; height: 42px; }
  .mobile-action.chat { left: calc(26px + var(--safe-left)); bottom: calc(218px + var(--safe-bottom)); width: 44px; height: 44px; }
  .dialog-shell { padding: 19px; }
  .inventory-layout, .path-options { grid-template-columns: 1fr; }
  .path-art { height: 105px; }
}

@media (max-width: 480px) {
  .entry-layout { width: calc(100vw - 24px); padding-top: 28px; }
  .hero-copy h1 { max-width: 100%; font-size: clamp(32px, 9.2vw, 36px); line-height: .98; letter-spacing: -.035em; }
  .hero-lead { margin-top: 18px; }
  .eyebrow { margin-bottom: 13px; font-size: 9px; }
  .auth-heading { padding: 24px 22px 18px; }
  .auth-tabs { padding: 0 22px; }
  .auth-form { padding: 20px 22px 24px; }
  .captcha-row { grid-template-columns: 1fr; }
  .captcha-challenge { order: -1; }
  .resource-grid, .build-catalog { grid-template-columns: 1fr 1fr; }
}

@media (orientation: portrait) and (pointer: coarse) {
  .game::before { content: "Para explorar melhor, gire o aparelho"; position: absolute; z-index: 40; top: calc(113px + var(--safe-top)); left: 50%; padding: 7px 11px; border-radius: 99px; color: #d9dfe0; background: rgb(8 15 20 / 78%); transform: translateX(-50%); font-size: 8px; pointer-events: none; }
  .game.has-event-banner::before, .game.has-event-banner .objective-card { visibility: hidden; opacity: 0; pointer-events: none; }
}

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