:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: #23272a;
  background: #82aaab;
  font-synthesis: none;
  --glass: rgba(247, 248, 248, .78);
  --line: rgba(255, 255, 255, .5);
  --muted: #5b6265;
  --shadow: 0 8px 30px rgba(22, 43, 46, .12), inset 0 1px 0 var(--line);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid #303b3e; outline-offset: 3px; }
button:active { transform: scale(.96); }
button:disabled { opacity: .4; cursor: wait; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 24px; height: 24px; flex: none; }
.glass { background: var(--glass); backdrop-filter: blur(24px) saturate(1.15); -webkit-backdrop-filter: blur(24px) saturate(1.15); box-shadow: var(--shadow); }
#map { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
#map .openseadragon-canvas { outline: none; }
/* Cell scrims (pending dimming, backdrop scrim, comment selection) are painted
   on one viewport-sized canvas; see the cell layer in demo.js. */
.cell-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Generated art is never dimmed, flagged included — this is a small fixed
   corner badge over finished pixels, not a scrim. */
.flagged-marker { width: 9px; height: 9px; border-radius: 50%; background: #e8a23c; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 1px 3px rgba(35, 27, 10, .4); pointer-events: none; }
.comment-marker { width: 11px; height: 11px; border-radius: 3px; background: #3c78e8; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 1px 3px rgba(10, 27, 60, .4); pointer-events: none; }
.comment-bar { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(96px + env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 420px); padding: 12px 14px; border-radius: 22px; display: grid; gap: 8px; z-index: 3; }
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-head strong { flex: 1; font-size: 13px; font-weight: 650; line-height: 1.35; }
.comment-head .icon-button { width: 34px; height: 34px; background: rgba(90, 102, 106, .07); }
.comment-head .icon-button svg { width: 18px; height: 18px; }
.chip { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 14px; background: rgba(71, 83, 84, .08); }
.chip[aria-pressed="true"] { background: #e8a23c; color: #1f1a10; }
.comment-existing { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 120px; overflow: auto; }
.comment-existing li { font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 10px; background: rgba(60, 120, 232, .1); }
.comment-existing li small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.comment-bar textarea { font: inherit; font-size: 14px; line-height: 1.4; padding: 9px 11px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .85); resize: vertical; min-height: 44px; }
.comment-bar textarea:focus-visible { outline: 2px solid #303b3e; }
.comment-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.comment-status { font-size: 12px; color: var(--muted); }
.send { min-height: 36px; padding: 0 16px; border-radius: 18px; background: #23272a; color: #fff; font-size: 13px; font-weight: 650; }
.send:disabled { opacity: .35; cursor: default; }
.progress { position: fixed; top: calc(max(16px, env(safe-area-inset-top)) + 72px); left: max(16px, env(safe-area-inset-left)); padding: 10px 14px; border-radius: 20px; pointer-events: none; }
.progress strong, .progress span { display: block; }
.progress strong { font-size: 12px; font-weight: 650; }
.progress span { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 3px; }
.topbar { position: fixed; top: max(16px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); display: flex; align-items: start; justify-content: space-between; gap: 16px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.place { display: flex; align-items: center; gap: 10px; padding: 11px 17px 11px 13px; border-radius: 24px; }
.place svg { width: 29px; height: 29px; stroke-width: 1.5; }
.place strong { font-size: 16px; font-weight: 650; letter-spacing: -.3px; display: block; }
.place span { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); }
.icon-button { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.map-actions { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(122px + env(safe-area-inset-bottom)); display: grid; border-radius: 26px; padding: 4px; gap: 1px; }
.map-actions .icon-button:hover { background: rgba(255, 255, 255, .32); }
.dock-area { position: fixed; bottom: calc(11px + env(safe-area-inset-bottom)); left: 16px; right: 16px; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.dock { width: min(100%, 410px); padding: 7px; border-radius: 34px; display: flex; align-items: center; gap: 7px; pointer-events: auto; }
.segmented { background: rgba(71, 83, 84, .07); border-radius: 26px; display: flex; padding: 3px; flex: 1; min-width: 0; }
.segmented button { min-height: 44px; flex: 1; padding: 0 18px; border-radius: 23px; font-size: 15px; font-weight: 600; transition: background .18s, box-shadow .18s; }
.segmented button[aria-pressed="true"] { background: rgba(255, 255, 255, .9); box-shadow: 0 2px 7px rgba(28, 43, 45, .1); }
.looks-button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px 0 9px; min-height: 48px; min-width: 99px; font-size: 14px; font-weight: 600; border-radius: 25px; }
.looks-button svg { width: 21px; height: 21px; }
.hint { color: #344c4e; font-size: 11px; margin: 10px 0 0; text-shadow: 0 1px 4px rgba(240, 255, 255, .35); }
.notice { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 22px; padding: 15px 20px; text-align: center; font-size: 14px; max-width: min(90%, 380px); }
.notice[hidden] { display: none; }
.sheet { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(calc(100% - 20px), 480px); max-height: min(72dvh, 620px); padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); border: 0; border-radius: 32px 32px 0 0; overflow: auto; overscroll-behavior: contain; --glass: rgba(247, 248, 248, .91); }
.sheet::backdrop { background: rgba(23, 37, 39, .13); }
.sheet[open] { animation: rise .24s cubic-bezier(.2, .7, .2, 1); }
.sheet-handle { width: 34px; height: 4px; border-radius: 3px; background: rgba(35, 39, 42, .22); margin: 0 auto 15px; }
.sheet-heading { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 0 0 17px; padding-left: 5px; }
.sheet-heading h1 { font-size: 23px; font-weight: 700; letter-spacing: -.7px; margin: 0; }
.sheet-heading p { font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }
.close { background: rgba(90, 102, 106, .07); }
.close svg { width: 21px; height: 21px; }
.look-list { display: grid; gap: 6px; }
.look { display: grid; grid-template-columns: 72px 1fr 24px; gap: 13px; align-items: center; min-height: 88px; text-align: left; padding: 8px; border-radius: 21px; }
.look:hover { background: rgba(255, 255, 255, .5); }
.look[aria-pressed="true"] { background: rgba(255, 255, 255, .88); box-shadow: 0 2px 9px rgba(27, 41, 43, .06); }
.look img { width: 72px; height: 72px; object-fit: cover; border-radius: 15px; }
.look strong { display: block; font-size: 15px; font-weight: 650; margin-bottom: 5px; }
.look small { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); }
.look .check { width: 21px; height: 21px; visibility: hidden; }
.look[aria-pressed="true"] .check { visibility: visible; }
.information { padding: 0 5px; font-size: 15px; line-height: 1.55; }
.information p { margin: 0 0 15px; }
.credits { margin-top: 26px; font-size: 12px; color: var(--muted); }
.credits a { color: inherit; }
@keyframes rise { from { transform: translateY(25px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 720px) {
  .topbar { top: 24px; left: 24px; right: 24px; }
  .map-actions { right: 24px; bottom: 35px; }
  .dock-area { bottom: 24px; }
  .comment-bar { left: 24px; bottom: 100px; }
  .sheet { bottom: 20px; border-radius: 32px; padding-bottom: 22px; }
  .hint { font-size: 12px; }
  .progress { top: 96px; left: 24px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .place { padding: 8px 13px; }
  .map-actions { bottom: 15px; }
  .dock-area { bottom: max(10px, env(safe-area-inset-bottom)); }
  .hint { display: none; }
  .sheet { max-height: 92dvh; }
  .progress { top: 73px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .glass { background: #f1f4f4; backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Map animation controls; viewport-sized layer preserves touch gestures. */
.topbar-actions {display:flex;align-items:flex-start;gap:8px;pointer-events:auto;}
.life-controls {position:relative;z-index:12;border-radius:18px;padding:6px;display:flex;gap:4px;align-items:center;font-size:13px;}
.life-controls button {border:0;background:transparent;color:inherit;font:inherit;font-weight:650;padding:8px 10px;min-height:34px;white-space:nowrap;border-radius:12px;cursor:pointer;}
.life-settings {position:absolute;right:0;top:54px;width:min(250px,calc(100vw - 100px));max-height:calc(100dvh - 140px);overflow-y:auto;background:#eef0e9f5;backdrop-filter:blur(18px);border-radius:18px;padding:16px;box-shadow:0 8px 30px #182f3030;}
.life-settings[hidden] {display:none;}
.life-settings label {display:block;margin:0 0 12px;}
.life-settings input[type=range] {display:block;width:100%;accent-color:#3a7476;}
.life-settings small {display:block;color:#5d6968;line-height:1.4;}
