* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color-scheme: light; }
body { margin: 0; color: var(--text, #191c22); background: var(--background, #faf8f5); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; min-width: 44px; min-height: 44px; border: 0; background: none; border-radius: var(--control, 10px); }
button:disabled { cursor: default; opacity: .6; }
button:hover:not(:disabled) { filter: brightness(.96); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }
svg.icon { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 1.55em; line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.12em; line-height: 1.4; letter-spacing: -.02em; }
h3 { font-size: 1em; line-height: 1.4; }
p { line-height: 1.55; }
.muted, small { color: var(--secondary); }
small { font-size: .8em; line-height: 1.5; }
.review-bar { padding: 8px 22px; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.tour-brand { font-size: 14px; display: grid; gap: 2px; }
.tour-brand a { font-weight: 700; color: var(--text); text-decoration: none; }
.review-bar span { font-weight: 400; color: var(--secondary); }
.review-controls { display: flex; flex-shrink: 0; }
.review-controls button { border: 1px solid var(--line); margin-left: 5px; }
.workspace { display: grid; grid-template-columns: 225px minmax(320px,430px) 240px; gap: 36px; justify-content: center; align-items: start; padding: 24px; }
#inventory { max-height: calc(100dvh - 110px); overflow: auto; padding-right: 8px; scrollbar-width: thin; }
#inventory h2 { margin: 8px 12px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--secondary); }
#inventory button { display: flex; align-items: center; width: 100%; text-align: left; gap: 12px; font-size: 13px; padding: 8px 12px; }
#inventory button.active { color: var(--onAccentContainer); background: var(--accentContainer); }
.review-note { font-size: 13px; line-height: 1.7; padding: 16px 0; }
.review-note h2 { margin-bottom: 12px; }
.review-note p { margin: 12px 0; }
.review-note a { overflow-wrap: anywhere; }
.review-note select { width: 100%; padding: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; }
.review-note label { display: block; margin: 24px 0 8px; font-weight: 600; }
#phone { position: relative; width: 100%; height: min(850px, calc(100dvh - 105px)); min-height: 550px; border: 1px solid var(--line); border-radius: 34px; overflow: hidden; background: var(--background); box-shadow: 0 15px 60px #00000014; font-size: 15px; }
body.large #phone, body.large dialog { font-size: 19px; }
#app { height: calc(100% - 76px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#app.map-route { overflow: hidden; height: 100%; }
#navigation { display: flex; justify-content: space-evenly; align-items: center; gap: 2px; height: 76px; padding: 5px 8px 10px; position: absolute; z-index: 15; inset: auto 0 0; background: var(--surface); border-top: 1px solid var(--line); }
#navigation button { min-width: 0; padding: 5px 0; flex: 1; display: flex; align-items: center; flex-direction: column; gap: 4px; font-size: .67em; color: var(--secondary); }
#navigation button.active { color: var(--accent); }
#navigation button.help-action { flex: 0 0 52px; color: var(--onAccent); background: var(--accent); height: 52px; border-radius: 50%; box-shadow: 0 3px 10px #0002; }
#navigation .help-action .icon { width: 28px; height: 28px; }
.screen-header { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; background: var(--background); }
.screen-header h1 { flex: 1; }
.page { padding: 12px 20px 24px; display: grid; gap: 20px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.end { text-align: right; }
.card { padding: 16px; border-radius: var(--card, 12px); background: var(--surface); border: 1px solid var(--line); }
.card + .card { margin-top: 0; }
.card p { margin-top: 7px; }
.list-link { display: flex; align-items: center; text-align: left; gap: 12px; padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); width: 100%; }
.list-link strong, .list-link small { display: block; }
.list-link:last-child { border-bottom: 0; }
.badge { font-size: .72em; color: var(--onAccentContainer); background: var(--accentContainer); padding: 5px 8px; border-radius: 7px; display: inline-block; }
.badge.urgent { color: var(--error); background: color-mix(in srgb, var(--error) 10%, var(--surface)); }
.badge.good { color: var(--categoryHealth); background: color-mix(in srgb, var(--categoryHealth) 12%, var(--surface)); }
.verified { color: var(--categoryHealth); display: inline-flex; vertical-align: middle; }
.verified .icon { width: 16px; height: 16px; }
.bubble { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex-shrink: 0; color: var(--categoryOther); background: color-mix(in srgb, var(--categoryOther) 10%, var(--surface)); border-radius: 14px; }
.bubble.food { color: var(--categoryCommunity); background: color-mix(in srgb, var(--categoryCommunity) 12%, var(--surface)); }
.bubble.health, .bubble.blood { color: var(--categoryHealth); background: color-mix(in srgb, var(--categoryHealth) 12%, var(--surface)); }
.primary, .secondary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 16px; min-height: 48px; font-weight: 600; }
.primary { background: var(--accent); color: var(--onAccent); }
.secondary { background: var(--surface); border: 1px solid var(--line); }
.danger { color: var(--error); }
.segments, .chips { display: flex; gap: 8px; overflow: auto; scrollbar-width: none; }
.chips button, .segments button { flex-shrink: 0; white-space: nowrap; padding: 10px 14px; font-size: .85em; background: var(--surface); border: 1px solid var(--line); }
.chips button.active, .segments button.active { color: var(--onAccentContainer); background: var(--accentContainer); border-color: transparent; }
.label { display: grid; gap: 7px; font-size: .9em; font-weight: 600; }
input:where(:not([type=checkbox]):not([type=radio])),select,textarea { min-height: 48px; width: 100%; max-width: 100%; padding: 12px; border: 1px solid var(--outline); border-radius: var(--control); background: var(--surface); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
textarea { resize: vertical; min-height: 90px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 48px; font-size: .9em; }
fieldset { border: 1px solid var(--line); padding: 12px; border-radius: 12px; min-width: 0; }
legend { font-size: .9em; font-weight: 600; padding: 0 6px; }
.notice { padding: 12px; border-radius: 12px; color: var(--onAccentContainer); background: var(--accentContainer); font-size: .85em; line-height: 1.5; }
.empty { text-align: center; padding: 28px 10px; }
.empty .icon { width: 36px; height: 36px; color: var(--secondary); margin-bottom: 12px; }
.map { position: relative; height: 100%; background: var(--surfaceVariant); overflow: hidden; }
.map-art { position: absolute; inset: 0; overflow: hidden; }
.map-art > svg { width: 100%; height: 100%; display: block; }
.map-art .park { fill: color-mix(in srgb, var(--categoryHealth) 18%, var(--surface)); }
.map-art .block { fill: color-mix(in srgb, var(--secondary) 7%, var(--surface)); stroke: var(--surface); stroke-width: 5px; }
.map-art .road { fill: none; stroke: var(--surface); stroke-width: 12px; }
.map-art .avenue { fill: none; stroke: color-mix(in srgb, var(--categoryCommunity) 18%, var(--surface)); stroke-width: 22px; }
.map-art .avenue-edge { fill: none; stroke: var(--surface); stroke-width: 29px; }
.map-art text { fill: var(--secondary); font-size: 11px; letter-spacing: 1px; }
.map-chrome { position: absolute; z-index: 4; top: 0; left: 0; right: 0; padding: 14px; display: grid; gap: 10px; pointer-events: none; }
.map-chrome > * { pointer-events: auto; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wordmark { width: 132px; max-width: 40%; height: 32px; }
.floating { background: var(--surface); box-shadow: 0 3px 14px #0002; border: 1px solid var(--line); }
.toolbar-group { display: flex; padding: 0 4px; border-radius: 99px; }
.toolbar-group button { min-width: 44px; }
.search-box { display: flex; align-items: center; padding: 2px 8px; border-radius: 99px; min-height: 52px; }
.search-box input { border: 0; background: transparent; padding: 10px 5px; min-width: 0; font-size: .9em; }
.search-box input:focus-visible { outline-offset: -3px; }
.search-box > .icon { margin: 0 6px; color: var(--secondary); }
.search-box button { color: var(--accent); flex-shrink: 0; }
.map-chrome .chips { margin: 0 -14px; padding: 0 14px 5px; }
.map-chrome .chips button { box-shadow: 0 2px 8px #0001; border-radius: 99px; }
.pin { position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50% 50% 50% 8px; transform: translate(-50%,-50%) rotate(-45deg); background: var(--categoryOther); color: var(--surface); border: 3px solid var(--surface); box-shadow: 0 3px 9px #0003; padding: 8px; }
.pin .icon { transform: rotate(45deg); }
.pin.food { background: var(--categoryCommunity); }
.pin.health,.pin.blood { background: var(--categoryHealth); }
.pin.selected { background: var(--accent); z-index: 3; outline: 6px solid color-mix(in srgb, var(--accent) 17%, transparent); }
.you { position: absolute; left: 50%; top: 58%; width: 18px; height: 18px; border-radius: 50%; background: #2d80e9; border: 3px solid #fff; box-shadow: 0 0 0 24px #2d80e920; }
.map-bottom { position: absolute; z-index: 5; bottom: 90px; left: 14px; right: 14px; display: grid; gap: 8px; }
.map-bottom .scope { justify-self: start; border-radius: 99px; font-size: .75em; padding: 7px 11px; max-width: 100%; }
.center-preview { padding: 13px; border-radius: 18px; }
.center-preview h2 { font-size: 1em; position: relative; padding-right: 20px; }
.center-preview h2 .verified { position: absolute; right: 0; top: 2px; }
.center-preview small { display: block; margin-top: 3px; }
.center-preview .primary { margin-top: 12px; min-height: 44px; padding: 9px; font-size: .87em; }
.map-caption { font-size: .65em; color: var(--secondary); justify-self: end; background: var(--surface); padding: 3px 6px; border-radius: 4px; }
.map-empty { position: absolute; z-index: 3; top: 38%; left: 18px; right: 18px; border-radius: 20px; }
dialog { color: var(--text); border: 1px solid var(--line); border-radius: 26px 26px 0 0; background: var(--background); padding: 0; width: min(430px, 100%); max-width: 100%; max-height: 82dvh; margin: auto auto 0; font-size: 15px; box-shadow: 0 -10px 60px #0003; }
dialog::backdrop { background: #0005; }
dialog .sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; background: var(--background); padding: 10px 20px; border-bottom: 1px solid var(--line); z-index: 1; }
dialog .sheet-body { padding: 16px 20px 28px; display: grid; gap: 16px; }
dialog.list-sheet { border-radius: 22px; margin-top: 105px; margin-bottom: auto; max-height: calc(100dvh - 195px); }
.summary-art { min-height: 138px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--categoryCommunity) 12%, var(--surface)); color: var(--categoryCommunity); }
.summary-art .icon { width: 58px; height: 58px; stroke-width: 1; }
.method-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.method-grid button { display: flex; align-items: center; flex-direction: column; gap: 8px; padding: 14px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: .75em; }
.hero { padding: 23px; border-radius: 22px; background: var(--accent); color: var(--onAccent); }
.hero small { color: inherit; opacity: .9; }
.hero .score { font-size: 2.8em; font-weight: 650; letter-spacing: -.05em; margin: 8px 0 12px; }
.hero .track { background: color-mix(in srgb, var(--onAccent) 20%, transparent); }
.hero .track span { background: var(--onAccent); }
.track { height: 7px; background: var(--surfaceVariant); border-radius: 10px; overflow: hidden; margin: 10px 0; }
.track span { height: 100%; width: 60%; display: block; background: var(--accent); border-radius: 10px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.metrics .card { padding: 12px 6px; text-align: center; }
.metrics strong { display: block; font-size: 1.4em; margin: 8px 0 4px; }
.metrics small { display: block; }
.awards { display: flex; justify-content: space-between; gap: 6px; }
.awards button { display: grid; justify-items: center; gap: 6px; font-size: .75em; padding: 8px 0; }
.awards .bubble { border-radius: 50%; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 2px solid var(--line); margin-left: 10px; padding: 0 0 22px 22px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 3px; border: 3px solid var(--background); width: 10px; height: 10px; background: var(--accent); border-radius: 50%; }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.avatar { display: grid; place-items: center; width: 54px; height: 54px; background: var(--accentContainer); color: var(--onAccentContainer); border-radius: 50%; font-weight: 600; }
.welcome { min-height: 100%; display: flex; flex-direction: column; padding: 45px 26px 30px; gap: 18px; justify-content: center; text-align: center; }
.welcome .symbol { width: 105px; height: 140px; margin: 0 auto; }
.welcome .wordmark { width: 210px; max-width: 100%; height: 45px; margin: 0 auto 14px; }
.slots { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.slots button { border: 1px solid var(--line); background: var(--surface); padding: 12px 4px; }
.slots button.active { background: var(--accentContainer); color: var(--onAccentContainer); }
.coverage { position: relative; height: 230px; border-radius: 20px; background: var(--surfaceVariant); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 20px; transform: none; }
.coverage button { border-radius: 18px; background: color-mix(in srgb, var(--categoryHealth) 20%, var(--surface)); padding: 12px; font-size: .8em; }
.coverage button:nth-child(2) { background: var(--accentContainer); }
.coverage button:nth-child(3) { background: var(--surface); border: 1px dashed var(--outline); }
.ranking { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
#toast { position: absolute; z-index: 40; bottom: 90px; left: 18px; right: 18px; padding: 14px; border-radius: 14px; background: var(--text); color: var(--background); font-size: .85em; box-shadow: 0 4px 20px #0003; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.visible { opacity: 1; }
.certificate { padding: 30px 20px; border: 2px solid var(--categoryCommunity); text-align: center; display: grid; gap: 14px; background: var(--surface); }
.certificate .icon { width: 40px; height: 40px; margin: auto; color: var(--categoryCommunity); }
@media(min-width: 941px) { #screens-button { display: none; } dialog { margin-bottom: max(40px, calc((100dvh - 850px) / 2)); border-radius: 24px; } }
@media(max-width: 1100px) { .workspace { gap: 20px; grid-template-columns: 190px minmax(320px,430px); } .review-note { display: none; } }
@media(max-width: 940px) { .workspace { display: flex; padding: 16px; } #inventory { display: none; } #phone { max-width: 430px; } }
@media(max-width: 500px) {
  .review-bar { min-height: 52px; padding: 2px 6px; gap: 4px; }
  .tour-brand { font-size: 12px; line-height: 1.3; }
  .review-bar span { display: block; }
  .review-controls button { min-width: 44px; min-height: 44px; margin-left: 2px; }
  .workspace { padding: 0; }
  #phone { height: calc(100dvh - 52px); min-height: 0; max-width: none; border: 0; border-radius: 0; box-shadow: none; }
  #navigation { height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  #app { height: calc(100% - 72px - env(safe-area-inset-bottom)); }
  #app.map-route { height: 100%; }
  .map-bottom { bottom: calc(85px + env(safe-area-inset-bottom)); }
  .page { padding: 10px 16px 24px; }
}
@media(prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
