:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #292b28;
  --cream: #fff9e9;
  --teal: #24e0d0;
  --amber: #ffba52;
  --purple: #c994ed;
  --edge: clamp(12px, 1.65vw, 26px);
  --top: max(14px, env(safe-area-inset-top));
  --left: max(var(--edge), env(safe-area-inset-left));
  --right: max(var(--edge), env(safe-area-inset-right));
  --bottom: max(16px, env(safe-area-inset-bottom));
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: pan-y; }
body { background: #151a1a; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 5px #0e837b; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
#game { position: relative; width: 100%; height: 100%; height: 100dvh; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; isolation: isolate; }
#map, #ground, #route, #markers { position: absolute; inset: 0; width: 100%; height: 100%; }
#map { background: #eeeade; touch-action: none; cursor: crosshair; }
#ground, #route, #markers { pointer-events: none; }
.glass, .round { color: var(--cream); background: rgba(37, 39, 36, .96); border: 1px solid #6c6e63; box-shadow: 0 3px 8px #2b2a1e45, inset 0 1px #ffffff12; }
.top { position: absolute; z-index: 4; left: var(--left); right: var(--right); top: var(--top); display: flex; align-items: flex-start; gap: 7px; pointer-events: none; }
.top > * { pointer-events: auto; }
.profile { min-width: 188px; width: clamp(190px, 18vw, 258px); height: 91px; border-radius: 14px; padding: 5px; display: flex; align-items: center; gap: 13px; text-align: left; }
.profile-detail { padding-right: 12px; min-width: 0; flex: 1; display: grid; gap: 3px; }
.profile-detail strong { font-size: 19px; line-height: 1.15; }
.profile-name { color: #d3d5ca; display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { display: block; height: 7px; border: 1px solid #8a8e7f; border-radius: 10px; padding: 1px; margin-top: 3px; }
.progress span { display: block; width: 20%; height: 100%; background: #29cbbd; border-radius: inherit; }
.art { display: inline-block; flex: 0 0 auto; overflow: hidden; background-image: url("hud-art.png"); background-repeat: no-repeat; }
.portrait { width: 78px; height: 78px; border-radius: 9px; background-size: 1280px auto; background-position: -16px -16px; }
.stats { display: flex; min-height: 76px; border-radius: 14px; align-items: stretch; padding: 8px 0; }
.stat { display: flex; align-items: center; gap: clamp(5px, .75vw, 12px); padding: 0 clamp(10px, 1.2vw, 20px); }
.stat + .stat { border-left: 1px solid #ffffff3a; }
.stat strong { font-size: clamp(23px, 2.3vw, 32px); line-height: 1.02; display: block; font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: .22em; font-size: clamp(10px, 1.13vw, 14px); white-space: nowrap; color: #f0eddf; }
.icon-money { width: 35px; height: 35px; border-radius: 50%; background-size: 1080px auto; background-position: -240px -21px; }
.icon-beer { width: 32px; height: 40px; border-radius: 6px; background-size: 1040px auto; background-position: -366px -19px; }
.icon-crystal { width: 37px; height: 40px; border-radius: 7px; background-size: 1040px auto; background-position: -535px -20px; }
.round { display: inline-grid; place-content: center; justify-items: center; border-radius: 50%; }
.gear { width: 49px; height: 49px; margin-left: auto; flex: 0 0 auto; font-size: 28px; line-height: 1; }
.round:hover:not(:disabled), .profile:hover { filter: brightness(1.13); }
.quest-area { position: absolute; left: var(--left); top: calc(var(--top) + 99px); z-index: 2; display: grid; gap: 8px; pointer-events: none; }
.quest { display: flex; align-items: center; gap: 12px; width: max-content; min-width: 250px; max-width: min(390px, calc(100vw - 33px)); padding: 12px 15px; border-radius: 13px; }
.quest strong, .quest span span { display: block; }
.quest strong { color: var(--amber); font-size: 17px; line-height: 1.2; margin-bottom: 4px; }
.quest span span { font-size: 14px; line-height: 1.3; }
#quest-icon { color: var(--amber); font-weight: 850; font-size: 21px; width: 24px; height: 27px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 5px 5px 8px 8px; line-height: 1; flex: 0 0 auto; }
.quest[data-kind="side"] strong, .quest[data-kind="side"] #quest-icon { color: var(--purple); }
.quest[data-kind="calendar"] strong, .quest[data-kind="calendar"] #quest-icon { color: #8aeee3; }
.quest-journal { pointer-events: auto; justify-self: start; min-height: 34px; padding: 5px 13px; border-radius: 9px; font-size: 13px; font-weight: 720; }
.quest-journal:hover:not(:disabled) { background: #394038; }
.quest-journal:disabled { opacity: .7; }
.quest-entry { display: grid; gap: 7px; padding: 11px; border: 1px solid #5b6156; border-radius: 11px; background: #2e312c; }
.quest-entry h2 { margin: 0; font-size: 17px; line-height: 1.15; }
.quest-entry .cadence { color: #a4f5ea; font-size: 13px; }
.quest-entry .quest-controls { display: flex; gap: 7px; flex-wrap: wrap; }
.quest-entry .cta { min-height: 35px; padding: 5px 9px; font-size: 13px; }
.marker[data-id="calendar"] { --pin: #087c71; }
.marker[data-id="calendar"] .marker-label { max-width: 175px; overflow: hidden; text-overflow: ellipsis; }
.interact.calendar-action { padding-inline: 8px; font-size: clamp(11px, 1.35vw, 15px); }

.perk-status { justify-self: start; padding: 6px 11px; font-size: 12px; border-radius: 9px; color: #90fff1; }
.map-tools { display: grid; justify-items: center; gap: 13px; position: absolute; right: var(--right); top: calc(var(--top) + 76px); z-index: 2; }
.compass, .zoom { background: #fff8e6; border: 1px solid #716e62; box-shadow: 0 2px 6px #38352645; color: #272622; }
.compass { width: 45px; height: 45px; border-radius: 50%; display: grid; place-content: center; justify-items: center; line-height: 1; padding: 2px 0 4px; gap: 2px; }
.compass span { font-size: 10px; font-weight: 800; }
.compass i { width: 13px; height: 17px; clip-path: polygon(50% 0, 100% 100%, 50% 75%, 0 100%); background: #ae4c43; }
.zoom { border-radius: 10px; overflow: hidden; display: grid; }
.zoom button { border: 0; background: transparent; color: inherit; font-size: 23px; width: 38px; height: 36px; line-height: 1; padding: 0 0 2px; }
.zoom button + button { border-top: 1px solid #c7bfad; }
.zoom button:hover:not(:disabled) { background: #ece5d2; }
.zoom button:disabled { color: #8f8a7b; }
.controls { position: absolute; z-index: 3; left: var(--left); right: var(--right); bottom: calc(var(--bottom) + 20px); display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.controls > * { pointer-events: auto; }
.joystick { width: clamp(106px, 12vw, 164px); aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff9e179; background: #37383180; position: relative; touch-action: none; cursor: grab; }
.joystick:active { cursor: grabbing; }
.stick { position: absolute; width: 41%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%,-50%); border-radius: 50%; border: 2px solid #fffbebaa; background: #b6b49b9c; box-shadow: inset 0 0 15px #fff4d51a, 0 2px 5px #24261e60; pointer-events: none; }
.direction { position: absolute; width: 11px; height: 9px; left: 50%; top: 8%; translate: -50% 0; background: #fff9e36e; clip-path: polygon(50% 0, 100% 100%, 0 100%); pointer-events: none; }
.direction.east { left: 92%; top: 50%; translate: -50% -50%; rotate: 90deg; }
.direction.south { top: 92%; translate: -50% -100%; rotate: 180deg; }
.direction.west { left: 8%; top: 50%; translate: -50% -50%; rotate: -90deg; }
.actions { display: flex; gap: 13px; align-items: end; }
.interact { width: clamp(92px, 11vw, 131px); aspect-ratio: 1; border: 2px solid var(--teal); box-shadow: 0 3px 8px #22242075, inset 0 0 13px #2bead429; gap: 6px; font-size: clamp(13px, 1.4vw, 17px); font-weight: 700; }
.interact:disabled { border-color: #b8b9a2; opacity: .76; }
.door { position: relative; display: block; width: 28px; height: 34px; border: 2px solid currentColor; border-bottom: 0; border-radius: 1px; }
.door::before { content: ""; position: absolute; width: 70%; height: 113%; inset: 0 auto auto 0; background: currentColor; clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 89%); }
.door::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #292b28; left: 47%; top: 52%; }
.inventory { width: clamp(53px, 7vw, 77px); aspect-ratio: 1; border-color: #d7cead; }
.bag { position: relative; width: 26px; height: 22px; background: #f8ebcd; border-radius: 4px 4px 6px 6px; box-shadow: inset 0 8px #dac598, 0 1px 3px #0005; }
.bag::before { content: ""; position: absolute; width: 11px; height: 8px; left: 7px; top: -6px; border: 2px solid #f8ebcd; border-radius: 5px 5px 0 0; }
.bag::after { content: ""; position: absolute; width: 5px; height: 8px; top: 4px; left: 10px; background: #79664a; border: 1px solid #fff1ca; border-radius: 2px; }
footer { position: absolute; z-index: 1; bottom: max(5px, env(safe-area-inset-bottom)); left: var(--left); right: var(--right); display: flex; justify-content: space-between; align-items: center; pointer-events: none; gap: 8px; }
footer a, .location { font-size: 11px; background: #fffcefdf; color: #434538; padding: 2px 6px; border-radius: 3px; }
footer a { pointer-events: auto; text-decoration: none; }
.map-sources { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1px; }
footer a:hover { text-decoration: underline; }
.marker { position: absolute; pointer-events: auto; display: flex; align-items: center; width: max-content; min-height: 36px; padding: 0; color: #27271e; background: transparent; border: none; text-align: left; transform: translate(-12px,-38px); }
.marker .pin { position: relative; display: grid; place-content: center; width: 27px; height: 27px; border: 1.5px solid #ffffffbd; border-radius: 50% 50% 50% 4px; rotate: -45deg; background: var(--pin, #daaa51); color: var(--pin-ink, #fff); box-shadow: -2px 2px 5px #28241948; flex: 0 0 auto; z-index: 1; }
.marker .pin i { rotate: 45deg; font: 800 14px/1 system-ui; }
.marker-label { border: 1px solid #958b71; border-radius: 4px 7px 7px 4px; background: #fff8e5f2; font-size: 13px; line-height: 1.1; font-weight: 750; padding: 5px 8px 6px 11px; margin-left: -6px; box-shadow: 0 1px 3px #28241926; white-space: nowrap; }
.marker:hover .marker-label, .marker:focus-visible .marker-label { background: #fffdf6; }
.marker[data-id="pub"] { --pin: #ecac37; --pin-ink: #342610; }
.marker[data-id="boutique"] { --pin: #16978c; }
.marker[data-id="side"], .marker[data-id="hidden"] { --pin: #924ab0; }
.marker[data-id="kiosk"] { --pin: #367da7; }
.marker[data-id="pharmacy"] { --pin: #b64b49; }
.marker.active { z-index: 2; }
.marker.active .marker-label { border-color: #8f611b; }
.marker.active .pin { box-shadow: -2px 2px 5px #28241972, 0 0 0 3px #f4a42a36; }
#player { --jacket: #236d69; --hair: #30221d; position: absolute; inset: 0 auto auto 0; width: 35px; height: 37px; margin: -29px 0 0 -17.5px; pointer-events: none; }
#player::before { content: ""; position: absolute; width: 34px; height: 23px; bottom: -3px; left: .5px; border-radius: 50%; border: 2px solid #12a99f; box-shadow: 0 0 0 2px #edfffbd9, inset 0 0 8px #13887d58; background: #22d7c34d; }
.sprite { position: absolute; left: 5px; top: 4px; width: 25px; height: 33px; rotate: var(--direction, 0deg); transform-origin: 50% 70%; filter: drop-shadow(0 1px 1px #241d17b0); }
.sprite i, .sprite b, .sprite em { position: absolute; display: block; }
.sprite b { left: 3px; top: 11px; width: 19px; height: 19px; border-radius: 7px 7px 6px 6px; border: 1.5px solid #1e2826; background: var(--jacket); box-shadow: inset 3px 0 #ffffff31, inset -3px -4px #172f3270; }
.sprite i { left: 6px; top: 2px; width: 13px; height: 14px; border: 1px solid #33251b; box-shadow: inset 2px 1px #ffffff2b, inset 0 -3px #b37f5a; border-radius: 47%; background: var(--hair); z-index: 1; }
.sprite em { top: 25px; left: 7px; width: 4px; height: 8px; border-radius: 2px; background: #24292c; box-shadow: 7px 1px #24292c; }
#player[data-chain="true"] .sprite b::after { content: ""; position: absolute; top: 2px; left: 4px; right: 4px; height: 5px; border-bottom: 2px solid #ffca69; border-radius: 50%; }
#player[data-moving="true"] .sprite em { animation: step .32s ease-in-out infinite alternate; }
@keyframes step { to { translate: 0 2px; box-shadow: 7px -2px #24292c; } }
.toast { z-index: 7; position: absolute; bottom: calc(var(--bottom) + 26px); left: 50%; max-width: min(420px, 55vw); transform: translateX(-50%); border-radius: 10px; padding: 8px 13px; width: max-content; font-size: 14px; text-align: center; pointer-events: none; }
.toast:empty { display: none; }
.loading { display: grid; justify-items: center; gap: 10px; text-align: center; position: absolute; z-index: 6; left: 50%; top: 49%; translate: -50% -50%; border-radius: 10px; width: max-content; max-width: 85%; background: #fff6db; color: #302c25; padding: 12px 18px; box-shadow: 0 2px 12px #29261755; }
.loading p { margin: 0; }
dialog { position: absolute; inset: calc(var(--top) + 93px) var(--right) auto auto; margin: 0; padding: 15px; width: min(446px, calc(100% - var(--left) - var(--right))); max-height: calc(100% - var(--top) - 109px - var(--bottom)); overflow: auto; color: var(--cream); background: #242824; border: 1px solid #37b9ae; border-radius: 17px; box-shadow: 0 6px 22px #14191169, inset 0 1px #ffffff18; }
dialog::backdrop { background: #242b1f26; }
dialog h1 { margin: 0; font-size: clamp(23px, 2.1vw, 30px); line-height: 1.1; }
.panel-top { display: flex; align-items: center; justify-content: space-between; padding: 0 0 10px; margin-bottom: 12px; gap: 12px; border-bottom: 1px solid #ffffff36; }
.close { background: transparent; border: none; color: var(--cream); width: 36px; height: 36px; border-radius: 8px; line-height: .8; font-size: 34px; padding: 0 0 4px; }
.close:hover { background: #ffffff19; }
#panel-content { display: grid; gap: 10px; }
#panel-content p { margin: 0; font-size: 15px; line-height: 1.43; }
#panel-content .muted, .muted { color: #ccd0be; font-size: 13px; }
.item { display: grid; grid-template-columns: 58px minmax(0, 1fr) max-content; align-items: center; gap: 11px; border: 1px solid #5b6156; padding: 8px; border-radius: 11px; background: #2e312c; }
.item strong { font-size: 17px; display: block; line-height: 1.14; }
.item small { color: #dddacc; font-size: 13px; }
.item .art { width: 58px; height: 58px; border-radius: 8px; }
.item-jacket { background-size: 1000px auto; background-position: -713px -127px; }
.item-chain { background-size: 1000px auto; background-position: -715px -207px; }
.item-perk { background-size: 1000px auto; background-position: -714px -288px; }
.cta { padding: 9px 13px; min-height: 40px; border: 1px solid #32d7c6; border-radius: 9px; color: #fff9eb; background: #193b36; font-weight: 700; }
.cta:hover:not(:disabled) { background: #235a50; }
.cta:disabled { opacity: .59; border-color: #8a8e82; }
.cta-bad { border-color: #d07e6a; background: #432b24; }
.item .cta { padding: 6px 9px; font-size: 13px; }
.field { display: grid; gap: 6px; }
.field input { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; min-width: 0; min-height: 40px; border-radius: 8px; border: 1px solid #82887e; background: #171d19; color: var(--cream); padding: 6px 10px; }
.swatches { display: flex; gap: 10px; margin: 3px 0; }
.swatch { width: 39px; height: 39px; border: 2px solid #ffffff68; border-radius: 50%; }
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--teal); }
@media (max-width: 680px) {
  .top { gap: 5px; }
  .profile { width: 99px; height: 58px; min-width: 0; gap: 5px; border-radius: 10px; padding: 3px; flex: 0 0 auto; }
  .portrait { width: 42px; height: 48px; background-size: 761px auto; background-position: -9px -10px; border-radius: 6px; }
  .profile-detail { padding-right: 4px; gap: 2px; }
  .profile-name { font-size: 9px; }
  .profile-detail strong { font-size: 13px; white-space: nowrap; }
  .progress { height: 5px; margin-top: 2px; }
  .stats { min-height: 58px; border-radius: 10px; padding: 6px 0; }
  .stat { gap: 4px; padding: 0 clamp(4px, 1.2vw, 8px); }
  .stat strong { font-size: 17px; }
  .stat small { font-size: 9px; }
  .stat .art { scale: .58; margin-inline: -7px; }
  .gear { width: 36px; height: 36px; font-size: 21px; }
  .quest-area { top: calc(var(--top) + 66px); }
  .quest { min-width: 0; padding: 9px 11px; gap: 8px; }
  .quest strong { font-size: 14px; }
  .quest span span { font-size: 12px; }
  #quest-icon { font-size: 16px; width: 20px; height: 23px; }
  .map-tools { top: calc(var(--top) + 62px); gap: 10px; }
  .compass { width: 35px; height: 35px; }
  .compass i { height: 12px; }
  .zoom button { width: 32px; height: 32px; font-size: 20px; }
  dialog { inset: auto var(--right) calc(var(--bottom) + 16px) auto; max-height: calc(100% - var(--top) - 80px - var(--bottom)); }
  .toast { bottom: calc(var(--bottom) + 123px); max-width: 80vw; }
}
@media (max-width: 390px) { .wide { display: none; } }
@media (max-width: 340px) { .profile { width: 83px; } .profile-name { display: none; } .stat { padding-inline: 3px; } .stat .art { margin-inline: -9px; } }
@media (max-height: 500px) and (min-width: 681px) {
  .profile, .stats { height: 62px; min-height: 62px; }
  .portrait { width: 49px; height: 49px; background-size: 800px auto; background-position: -10px -10px; }
  .quest-area { top: calc(var(--top) + 69px); }
  .quest { padding-block: 8px; }
  .joystick { width: 102px; }
  .interact { width: 86px; }
  .inventory { width: 50px; }
  dialog { inset-block-start: calc(var(--top) + 68px); max-height: calc(100% - var(--top) - 71px - var(--bottom)); }
}
@media (prefers-reduced-motion: reduce) { #player[data-moving="true"] .sprite em { animation: none; } }

#intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #151a1a;
  color: #fff9e9;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.intro-shell {
  width: min(940px, 100%, 93dvh);
  max-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 2dvh, 17px);
}
.intro-header, .intro-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.intro-header h1 {
  margin: 0;
  font-size: clamp(16px, 2.4vw, 23px);
  font-weight: 760;
  letter-spacing: -.025em;
}
.intro-header h1:focus { outline: none; }
#intro-count {
  color: #bac8c5;
  white-space: nowrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.intro-panel {
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1.8dvh, 16px);
  min-height: 0;
}
.intro-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #202827;
  min-height: 0;
  border: 1px solid #53615b;
}
.intro-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62dvh;
  min-height: 0;
  object-fit: contain;
}
#intro-caption {
  text-align: center;
  margin: 0 auto;
  max-width: 39ch;
  min-height: 2.6em;
  display: grid;
  place-content: center;
  color: #f7ecdb;
  font: 520 clamp(17px, 3.2vw, 25px)/1.28 Georgia, "Times New Roman", serif;
  text-wrap: balance;
}
.intro-controls button {
  min-height: 44px;
  padding: 8px 17px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 740;
}
.intro-back { border: 1px solid #687773; background: #232d2a; color: #f9f0e2; }
.intro-back:disabled { opacity: .43; }
.intro-next { border: 1px solid #78e4d4; color: #112722; background: #78e4d4; }
.intro-next:hover { background: #a7f2e7; }
@media (max-height: 500px) and (min-width: 500px) {
  .intro-shell { width: min(460px, 100%, max(340px, 88dvh)); }
  .intro-image img { max-height: 54dvh; }
  #intro-caption { min-height: 1.35em; font-size: clamp(16px, 4.7dvh, 20px); }
  .intro-controls button { min-height: 40px; }
}
@media (max-height: 360px) {
  .intro-image img { max-height: 47dvh; }
  .intro-header h1 { font-size: 15px; }
}

.lighting {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  border: 1px solid #716e62;
  color: #333041;
  background: #fff8e6;
  box-shadow: 0 2px 6px #38352645;
  line-height: 1;
  font: 24px/1 system-ui, sans-serif;
}
.lighting:hover { background: #ece5d2; }
#game[data-lighting="night"] .lighting,
#game[data-lighting="night"] .compass,
#game[data-lighting="night"] .zoom {
  border-color: #687889;
  background: #202b40;
  color: #ffe0a2;
}
#game[data-lighting="night"] .zoom button:hover:not(:disabled) { background: #34425b; }
#game[data-lighting="night"] .zoom button + button { border-color: #4a5873; }
#game[data-lighting="night"] .location,
#game[data-lighting="night"] footer a { background: #182238eb; color: #d7dded; }
#game[data-lighting="night"] #player::before { box-shadow: 0 0 0 2px #adffee, 0 0 18px 5px #63e9c793, inset 0 0 8px #13887d58; }
@media (max-width: 680px) { .lighting { width: 36px; height: 36px; font-size: 22px; } }

@media (max-height: 500px) and (min-width: 681px) {
  .map-tools { top: calc(var(--top) + 60px); gap: 7px; }
  .lighting, .compass { width: 35px; height: 35px; }
  .zoom button { width: 31px; height: 30px; }
}

.road-access {
  width: min(295px, calc(100vw - 83px));
  padding: 9px 11px;
  pointer-events: auto;
  border-radius: 10px;
}
.road-access p { margin: 0 0 6px; font-size: 13px; line-height: 1.4; }
.road-access button { min-height: 34px; padding: 4px 8px; font-size: 12px; }

#account {
  position: fixed;
  inset: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  background: #151a1a;
  color: #fff9e9;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.account-card {
  width: min(410px, 100%);
  border: 1px solid #53615b;
  background: #202827;
  border-radius: 17px;
  padding: clamp(17px, 4vw, 29px);
  display: grid;
  gap: 14px;
}
.account-card h1 {
  margin: 0;
  font-size: clamp(20px, 4.7vw, 27px);
  letter-spacing: -.025em;
}
.account-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  background: #151e1c;
  border-radius: 9px;
  padding: 3px;
}
.account-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d3ddda;
  font-weight: 680;
}
.account-tabs button[aria-pressed="true"] { background: #384741; color: #fff9e9; }
#account-form { display: grid; gap: 7px; }
#account-form h2 { margin: 0 0 5px; font-size: 19px; }
#account-form label { font-size: 14px; }
#account-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  color: #fff9e9;
  background: #151d1c;
  border: 1px solid #65756c;
  border-radius: 8px;
  font-size: 16px;
  color-scheme: dark;
}
#account-form small { color: #bdc9c4; }
.account-import { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.account-import input { accent-color: #78e4d4; }
#account-form .intro-next, .account-passkey {
  margin-top: 5px;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 720;
}
.account-passkey { color: #f7efe0; background: #283734; border: 1px solid #6d8078; }
#account-status { color: #f9d79e; font-size: 14px; line-height: 1.4; margin: 0; }
#account-status:empty { display: none; }
#account-sync {
  position: fixed;
  z-index: 20;
  top: max(7px, env(safe-area-inset-top));
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100vw - 20px);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 13px;
}
#account-sync button { min-height: 30px; padding: 3px 7px; white-space: nowrap; }
