/* Matcha Map. Cream paper, matcha foam, sakura blush, azuki ink.
   Motion: every keyframe here is switched off by html.rm (prefers-reduced-motion, or ?motion=reduce),
   except the opacity fades listed at the end. */
@property --iris { syntax: "<length>"; inherits: false; initial-value: 0px; }
:root {
  color-scheme: light;
  --canvas: #FBF6EA; --panel: #FFFDF7; --ink: #3B2E27; --muted: #6B5A4F; --deep: #3E6B33;
  --accent: #8CBF7A; --accent-ink: #1F2E1B; --edge: #6E9A5E; --line: #DCE7D0; --foam: #E6F2DC;
  --pink: #F6B7C7; --pink-edge: #D98CA2; --peach: #F8D3B5; --peach-edge: #C98A5E; --btnfill: #FFFDF7;
  --brandpin: #B5D39F; --brandpin-edge: #5E8A4E; --focus: #D9667F;
  --mo: #4B3426; --mc: #FFFBF0; --mf: #DCEBC9; --ms: #A8C996; --mb: #F6B7C7;
  --shadow: 0 1px 2px rgba(75,52,38,.12), 0 8px 24px rgba(75,52,38,.10);
  --wash: radial-gradient(120% 70% at 15% 0%, #EEF6E4 0, transparent 60%), radial-gradient(90% 60% at 100% 100%, #FBE7EC 0, transparent 60%);
  --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='%23F6A3B8' fill-opacity='.22'%3E%3Cellipse cx='12' cy='14' rx='4' ry='2.2' transform='rotate(-35 12 14)'/%3E%3Cellipse cx='58' cy='52' rx='4' ry='2.2' transform='rotate(40 58 52)'/%3E%3C/g%3E%3Cg fill='%238CBF7A' fill-opacity='.22'%3E%3Ccircle cx='46' cy='14' r='1.6'/%3E%3Ccircle cx='22' cy='58' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
  --r: 20px; --pill: 999px; --spring: cubic-bezier(.34, 1.56, .64, 1); --soft: cubic-bezier(.34, 1.3, .64, 1);
  --font: "M PLUS Rounded 1c", ui-rounded, "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --canvas: #17211A; --panel: #1F2B22; --ink: #F3EADB; --muted: #C9BDAA; --deep: #B8DFA8;
    --accent: #A9D59A; --accent-ink: #142016; --edge: #86B077; --line: #33473A; --foam: #2B3D2F;
    --pink: #F1C6D2; --pink-edge: #F1C6D2; --peach: #E9C09E; --peach-edge: #E9C09E; --btnfill: #1F2B22;
    --brandpin: #8DB57E; --brandpin-edge: #DCEBC9; --focus: #F1A7BA;
    --mf: #CFE3BC;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
    --wash: radial-gradient(120% 70% at 15% 0%, #223527 0, transparent 60%), radial-gradient(90% 60% at 100% 100%, #2E2328 0, transparent 60%);
    --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='%23F1C6D2' fill-opacity='.12'%3E%3Cellipse cx='12' cy='14' rx='4' ry='2.2' transform='rotate(-35 12 14)'/%3E%3Cellipse cx='58' cy='52' rx='4' ry='2.2' transform='rotate(40 58 52)'/%3E%3C/g%3E%3Cg fill='%23A9D59A' fill-opacity='.12'%3E%3Ccircle cx='46' cy='14' r='1.6'/%3E%3Ccircle cx='22' cy='58' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 500 16px/1.45 var(--font); background: var(--canvas); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--deep); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; animation: ring .45s ease-out; }
@keyframes ring { from { outline-offset: 8px; outline-color: transparent; } to { outline-offset: 2px; } }
[hidden] { display: none !important; }

/* theme toggle: moon in light, sun in dark */
.icon-btn { width: 44px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .sun { display: block; }
[data-theme="dark"] .icon-btn .moon { display: none; }

/* press: 120ms squeeze on everything tappable */
.btn, .chip, .geo, .linkbtn, .close, .card .links a, .row, .skip { transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:active, .chip:active, .geo:active, .linkbtn:active, .close:active, .card .links a:active, .skip:active { transform: scale(.94); }
.row:active { transform: scale(.98); }

/* ---------- characters ---------- */
.ch { display: block; width: 100%; height: 100%; overflow: visible; }
.m-o { stroke: var(--mo); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.m-c { fill: var(--mc); } .m-f { fill: var(--mf); }
.m-s { fill: none; stroke: var(--ms); stroke-width: 1.6; stroke-linecap: round; }
.m-ink { fill: var(--mo); } .m-hi { fill: var(--mc); } .m-in { fill: #B4535F; }
.m-l { fill: none; stroke: var(--mo); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-blush { fill: var(--mb); } .m-sweat { fill: #BFE3E8; stroke-width: 1.4; }
.m-tine { fill: #F3E3BC; } .m-bam { fill: #E3C98F; }
.m-stick { stroke: #8A6248; stroke-width: 3; stroke-linecap: round; fill: none; }
.m-d1 { fill: #F6B7C7; } .m-d2 { fill: #FFF6E6; } .m-d3 { fill: #C5DFAE; }
.m-petal { fill: #F7C6D3; } .m-petal-v { stroke: #EFA6BA; stroke-width: 1; stroke-linecap: round; fill: none; }
.m-look { transition: transform .25s ease-out; }
.m-eyes { transform-origin: 32px 38.5px; }
.ch-m-peek .m-eyes { transform-origin: 32px 27px; }
.m-arm-r, .m-whiskarm { transform-origin: 52px 38px; }
.m-arm-l { transform-origin: 12px 38px; }
.m-foamg { transform-origin: 32px 25px; }
.ch.blink .m-eyes { animation: blink .18s ease-in-out; }
@keyframes blink { 50% { transform: scaleY(.1); } }
.ch.wave .m-arm-r { animation: wave .55s ease-in-out 2; }
@keyframes wave { 0%, 100% { transform: none; } 35% { transform: rotate(-125deg); } 60% { transform: rotate(-95deg); } 82% { transform: rotate(-125deg); } }
@keyframes whisk { from { transform: rotate(-14deg); } to { transform: rotate(12deg); } }
@keyframes ripple { from { transform: none; } to { transform: scale(1.05, .93); } }
@keyframes breathe { from { transform: scale(1, 1); } to { transform: scale(1.015, 1.035); } }
.ch-c-chasen.twirl { animation: twirl .7s cubic-bezier(.5, 0, .3, 1); transform-origin: 50% 55%; }
@keyframes twirl { 40% { transform: rotate(200deg) scale(1.1); } 100% { transform: rotate(360deg); } }

/* ---------- opening moment ---------- */
.intro { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
  background: var(--pat), var(--wash), var(--canvas); animation: failsafe 0s 6s forwards; }
@keyframes failsafe { to { opacity: 0; visibility: hidden; } }
.intro.gone { opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.intro.quick.gone { transition-duration: .3s; }
.skip { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; min-height: 44px; padding: 0 18px; border-radius: var(--pill);
  border: 1.5px solid var(--edge); background: var(--panel); color: var(--deep); font-weight: 800; cursor: pointer; z-index: 2; }
.intro-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; margin-top: 8vh; }
.play .intro-stage { opacity: 1; }
.intro-mattie { display: block; width: 128px; height: 128px; }
.play .intro-mattie { animation: rise .42s var(--spring) both; }
@keyframes rise { from { transform: translateY(55vh) scale(.85); } to { transform: none; } }
.play .intro-mattie .m-whiskarm { animation: whisk .15s ease-in-out .36s 6 alternate; }
.play .intro-mattie .m-foamg { animation: ripple .3s ease-in-out .36s 3 alternate; }
.intro-title { margin: 0; font-size: 34px; font-weight: 800; color: var(--deep); letter-spacing: .01em; white-space: nowrap; }
.intro-title span { display: inline-block; }
.intro-title .sp { width: .3em; }
.play .intro-title span { animation: letter .44s var(--spring) both; }
.play .intro-title span:nth-child(1) { animation-delay: .34s; } .play .intro-title span:nth-child(2) { animation-delay: .38s; }
.play .intro-title span:nth-child(3) { animation-delay: .42s; } .play .intro-title span:nth-child(4) { animation-delay: .46s; }
.play .intro-title span:nth-child(5) { animation-delay: .50s; } .play .intro-title span:nth-child(6) { animation-delay: .54s; }
.play .intro-title span:nth-child(8) { animation-delay: .60s; } .play .intro-title span:nth-child(9) { animation-delay: .64s; }
.play .intro-title span:nth-child(10) { animation-delay: .68s; }
@keyframes letter { from { transform: translateY(28px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.intro.iris { -webkit-mask-image: radial-gradient(circle at var(--ix) var(--iy), transparent var(--iris), #000 calc(var(--iris) + 1px));
  mask-image: radial-gradient(circle at var(--ix) var(--iy), transparent var(--iris), #000 calc(var(--iris) + 1px));
  animation: iris .5s cubic-bezier(.55, 0, .35, 1) forwards; }
@keyframes iris { from { --iris: 0px; } to { --iris: 150vmax; } }
.iris .intro-stage { animation: stage-out .26s ease-in forwards; }
@keyframes stage-out { 40% { transform: translateY(-10px) scale(1.06); } to { transform: scale(.6); opacity: 0; } }
.petals { position: fixed; left: 0; right: 0; top: 0; height: 44vh; z-index: 3100; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -24px; width: 18px; height: 18px; opacity: 0; animation: fall 2s linear forwards; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(calc(var(--sway) * -1), 20vh) rotate(calc(var(--spin) / 2)); }
  100% { transform: translate(var(--sway), 44vh) rotate(var(--spin)); opacity: 0; }
}

/* ---------- header ---------- */
.bar { flex: none; display: flex; align-items: center; gap: 8px; min-height: 68px; padding: 6px 10px 6px 12px; position: relative;
  background: var(--pat), var(--wash), var(--panel); border-bottom: 1.5px solid var(--line); }
.brand { min-width: 0; flex: 1 1 auto; }
.brand h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--deep); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.mark { flex: none; display: block; width: 40px; height: 40px; }
.mark .ch { transform-origin: 50% 100%; animation: breathe 1.8s ease-in-out infinite alternate; }
.brand p { margin: 1px 0 0 48px; font-size: 14px; color: var(--muted); line-height: 1.25; white-space: nowrap; }
.sidekick { flex: none; display: block; width: 18px; height: 27px; margin: 0 2px; align-self: center; }
.bar-actions { display: flex; gap: 4px; flex: none; }
.btn { min-height: 44px; padding: 0 20px; border-radius: var(--pill); border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; cursor: pointer; }
.btn:hover { background: var(--deep); border-color: var(--deep); color: var(--canvas); }
.btn.quiet { background: var(--btnfill); color: var(--deep); border-color: var(--edge); padding: 0 14px; }
.btn.quiet:hover { background: var(--foam); color: var(--deep); }
.btn.quiet[aria-pressed="true"] { background: var(--foam); }

/* ---------- filters ---------- */
.filters { flex: none; position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; overflow-x: auto; white-space: nowrap;
  background: var(--panel); border-bottom: 1.5px solid var(--line); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip-ink { position: absolute; left: 0; top: 0; width: 0; height: 44px; border-radius: var(--pill); background: var(--accent); z-index: 0; pointer-events: none;
  transition: transform .34s var(--soft), width .34s var(--soft), background-color .2s ease, opacity .2s ease; }
.chip-ink.pink { background: var(--pink); }
.chip-ink.off { opacity: 0; }
.chip { position: relative; z-index: 1; flex: none; min-height: 44px; padding: 0 17px; border-radius: var(--pill); border: 1.5px solid var(--edge);
  background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; }
.chip:hover { background: color-mix(in srgb, var(--foam) 70%, transparent); }
.chip[data-chip][aria-pressed="true"] { background: transparent; border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.chip[data-chip="today"][aria-pressed="true"] { border-color: var(--pink-edge); color: #3B2E27; }
#recent[aria-pressed="true"] { background: var(--peach); border-color: var(--peach-edge); color: #3B2E27; font-weight: 800; }
.chip.near { background: var(--btnfill); font-weight: 800; color: var(--deep); }
.chip.show { font-weight: 800; }
.chip.show[aria-expanded="true"] { background: var(--foam); border-color: var(--accent); }
.show-n { font-weight: 800; color: var(--deep); }
.zipbox { position: relative; z-index: 1; flex: none; display: flex; align-items: center; gap: 4px; }
.zip { width: 140px; min-height: 44px; border: 1.5px solid var(--edge); border-radius: var(--pill); background: var(--btnfill); padding: 0 14px; font-weight: 800; font-size: 16px; letter-spacing: .02em; color: var(--ink); }
.zip::placeholder { color: var(--muted); font-weight: 700; letter-spacing: 0; }
.chip.go { min-width: 44px; padding: 0 14px; font-weight: 800; color: var(--deep); background: var(--btnfill); }
.zip.shake { animation: shake .36s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.zip-err { position: fixed; z-index: 900; margin: 0; padding: 6px 12px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--pink-edge); color: var(--ink); font-size: 15px; font-weight: 700; box-shadow: var(--shadow); }
.nearrow { justify-content: flex-start; }
.show-pop { position: fixed; z-index: 900; width: 260px; max-width: calc(100vw - 16px); padding: 8px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.show-pop label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer; }
.show-pop label:hover { background: var(--foam); }
.show-pop input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--deep); }
.show-pop hr { border: 0; border-top: 1.5px solid var(--line); margin: 6px 4px; }
.show-pop.pop-in { animation: popin .18s var(--soft) both; transform-origin: 30px 0; }
@keyframes popin { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
.kindword { display: block; font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.2; margin: -2px 0 3px; }
.you-zip { width: 28px; height: 28px; }
.you-chasen { position: absolute; left: 50%; bottom: 14px; width: 28px; height: 42px; transform: translateX(-50%); filter: drop-shadow(0 2px 2px rgba(75,52,38,.25)); }
.frow1, .frow2 { display: contents; }
.show-pop label.off { opacity: .5; cursor: default; }
.show-pop label.sw { font-weight: 800; }
@media (max-width: 640px) {
  .filters { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: visible; }
  .frow1 { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px 4px; overflow-x: auto; scrollbar-width: none; }
  .frow1::-webkit-scrollbar { display: none; }
  .frow2 { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; }
  .frow2 .zipbox { flex: 1; min-width: 0; }
  .frow2 .zip { flex: 1; min-width: 0; width: auto; }
  .frow2 .chip { padding: 0 14px; }
}
.chip.clear { min-width: 44px; padding: 0; font-size: 22px; margin-left: -4px; }
.day { position: relative; z-index: 1; flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 700; color: var(--muted); }
.day input { min-height: 44px; border: 1.5px solid var(--edge); border-radius: var(--pill); background: transparent; padding: 0 14px; font-weight: 700; }
.day input.set { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.note { margin: 0; padding: 8px 12px; font-size: 15px; color: var(--ink); background: var(--panel); border-bottom: 1.5px solid var(--line); display: flex; align-items: center; gap: 8px; }
.note .oops { flex: none; display: block; width: 32px; height: 32px; }
.note .oops .m-sweat { animation: sweat 1.1s ease-in 2; }
@keyframes sweat { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(3px); } }

/* ---------- layout ---------- */
.main { flex: 1; min-height: 0; position: relative; display: flex; }
.map-panel { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--canvas); }
.mapfade { position: absolute; inset: 0; z-index: 4; background: var(--canvas); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.mapfade.on { opacity: 1; }
.list-panel { position: absolute; inset: 0; z-index: 5; overflow-y: auto; background: var(--pat), var(--canvas); display: none; }
body.show-list .list-panel { display: block; }

/* ---------- list ---------- */
.list { list-style: none; margin: 0; padding: 8px 12px 28px; }
.list li { margin: 0 0 10px; }
.row-in { animation: row-in .36s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes row-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.row { width: 100%; text-align: left; min-height: 76px; padding: 10px 14px 10px 10px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--panel); cursor: pointer;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.row:hover { border-color: var(--edge); }
.row .rt { flex: 1; min-width: 0; display: block; }
.row strong { display: block; font-size: 17px; font-weight: 800; color: var(--deep); line-height: 1.25; }
.row .rt > span { display: block; font-size: 15px; color: var(--muted); line-height: 1.35; }
.row .rt > span.when { color: var(--ink); font-weight: 700; }
.row .menu-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .dist { font-weight: 700; color: var(--deep) !important; }
.row:not(.past):not(.brandrow) { border-left: 4px solid var(--peach); }
.row.brandrow { background: color-mix(in srgb, var(--panel) 70%, transparent); box-shadow: none; border-left: 4px solid var(--brandpin); min-height: 72px; }
.row.past { opacity: .72; }
.row .th { flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--foam); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; }
.row .th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th-char { display: block; width: 40px; height: 40px; }
.th-mochi { background: transparent !important; border-style: dashed !important; }
.th-mochi .mochi { transform: scale(1.5); }
.list li.head { margin: 16px 2px 8px; font-size: 16px; font-weight: 800; letter-spacing: .02em; color: var(--deep); display: flex; align-items: center; gap: 8px; }
.list li.head::before { content: ""; width: 10px; height: 10px; border-radius: 50% 0 50% 0; background: var(--accent); transform: rotate(-10deg); flex: none; }
.tag { display: inline-block; font-size: 13px; font-style: normal; color: var(--deep); background: var(--panel); border: 1.5px solid var(--edge); border-radius: var(--pill); padding: 0 8px; margin-left: 6px; font-weight: 700; vertical-align: 2px; line-height: 20px; }

/* empty state: sleepy Mattie, yawning, with floating z */
.empty { margin: 12px 12px 0; padding: 18px 16px 12px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); text-align: center; box-shadow: var(--shadow); }
.sleepy-wrap { position: relative; width: 88px; height: 88px; margin: 0 auto 6px; }
.sleepy { display: block; width: 88px; height: 88px; }
.sleepy .ch { transform-origin: 50% 100%; animation: doze 3.2s ease-in-out infinite; }
.sleepy .m-yawn { transform-origin: 32px 44.5px; animation: yawn 3.2s ease-in-out infinite; }
@keyframes doze { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes yawn { 0%, 55%, 100% { transform: none; } 70%, 80% { transform: scale(1.9, 2.3); } }
.zz { position: absolute; right: 0; top: 8px; font-weight: 800; font-size: 18px; color: var(--muted); opacity: 0; animation: zfloat 2.6s ease-out infinite; }
.zz.z2 { animation-delay: 1.3s; font-size: 14px; right: 8px; }
@keyframes zfloat { 0% { transform: translate(0, 10px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(12px, -26px); opacity: 0; } }
.empty p { margin: 0 0 4px; font-size: 16px; }
.linkbtn { min-height: 44px; padding: 0 6px; background: none; border: 0; color: var(--deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* loading: Mattie whisking */
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 600; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 24px 12px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); box-shadow: var(--shadow); pointer-events: none; }
.load-mattie { display: block; width: 64px; height: 64px; }
.loading .m-whiskarm { animation: whisk .18s ease-in-out infinite alternate; }
.loading .m-foamg { animation: ripple .36s ease-in-out infinite alternate; }
.loading p { margin: 0; font-weight: 800; color: var(--deep); font-size: 15px; }

/* ---------- pins ---------- */
.mk { position: absolute; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mk-in { position: relative; display: block; width: 100%; height: 100%; }
.mk-ev { width: 40px; height: 46px; }
.mk-ev .mk-in { height: 40px; transform-origin: 50% 100%; transition: transform .18s var(--soft); filter: drop-shadow(0 2px 2px rgba(75,52,38,.22)); }
.mk-ev::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 6px; border-radius: 50%; background: rgba(75,52,38,.2); }
.mk-ev:hover .mk-in, .mk-ev:focus-visible .mk-in { transform: translateY(-5px) scale(1.06, .96); }
.mk-ev.sel .mk-in { transform: scale(1.15); }
.mk-ev.sel { z-index: 5 !important; }
.mk-ev.past .mk-in { opacity: .55; filter: grayscale(.45); }
.mk-new { position: absolute; top: 1px; right: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); border: 2px solid var(--mc); box-shadow: 0 0 0 1px var(--mo); }
.mk:active .mk-in { animation: press .32s var(--spring); }
@keyframes press { 0% { transform: scale(1); } 35% { transform: scale(1.12, .86); } 70% { transform: scale(.95, 1.06); } 100% { transform: none; } }
.mk-in.drop { animation: drop .64s cubic-bezier(.3, 0, .4, 1) both; }
@keyframes drop {
  0% { transform: translateY(-140px) scale(.9, 1.12); opacity: 0; }
  20% { opacity: 1; }
  55% { transform: translateY(0) scale(1.2, .78); }
  72% { transform: translateY(-10px) scale(.94, 1.06); }
  88% { transform: translateY(0) scale(1.04, .97); }
  100% { transform: none; opacity: 1; }
}
.mk-in.pop { animation: pop .4s var(--spring) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.mk-in.jiggle { animation: jiggle .44s ease-out both; }
@keyframes jiggle { 0% { transform: scale(.5); opacity: 0; } 40% { transform: scale(1.18, .84); opacity: 1; } 70% { transform: scale(.92, 1.08); } 100% { transform: none; } }

/* brand mochi */
.mk-br { width: 22px; height: 22px; }
.mk-br::before { content: ""; position: absolute; inset: -9px; }
.mochi { position: relative; display: block; width: 20px; height: 17px; margin: 3px 1px 0; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: var(--brandpin);
  border: 1.5px solid var(--brandpin-edge); box-shadow: 0 2px 4px rgba(75,52,38,.22); transition: transform .18s var(--soft); }
.mochi::after { content: ""; position: absolute; top: 3px; left: 4px; width: 5px; height: 3px; border-radius: 50%; background: var(--mc); opacity: .85; transform: rotate(-25deg); }
.z9 .mochi::after, .th-mochi .mochi::after { top: 9px; left: 2px; width: 4px; height: 2.4px; background: var(--mb); opacity: 1; transform: none; box-shadow: 10px 0 0 var(--mb); }
.z9 .mochi::before, .th-mochi .mochi::before { content: ""; position: absolute; top: 5px; left: 5px; width: 2.4px; height: 2.6px; border-radius: 50%; background: var(--mo); box-shadow: 6px 0 0 var(--mo); }
.mk-br:hover .mochi, .mk-br:focus-visible .mochi { transform: translateY(-3px) scale(1.12, .92); }
.mk-br.sel .mochi { transform: scale(1.35); box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--edge); }
/* the brand's picture inside its mochi (2026-11-23): the same frame and size, the picture cropped round to fill it */
.mochi.has-pic { overflow: hidden; background: var(--panel); }
.mochi.has-pic::before, .mochi.has-pic::after { display: none; }
.mochi > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
/* a brand stack and a city's brands: the mochi with its count; a spread stack dims its badge while its pins are out */
.mk-cl.cl-br.cl-bc, .mk-cl.cl-br.cl-fan, .mk-cl.cl-br.cl-cell { width: 22px; height: 22px; }
.mk-cl.cl-bc .cl-n, .mk-cl.cl-br.cl-fan .cl-n, .mk-cl.cl-br.cl-cell .cl-n { right: -14px; bottom: -8px; }
.mk-cl.fan-open .mk-in { opacity: .45; }
/* name labels from zoom 13 (layoutLabels in app.js), the mock's way: bold small text on a cream halo, coloured by kind;
   hidden while a zoom runs */
.mk-lbl { position: absolute; left: 0; top: 0; z-index: 1; max-width: 170px; font-size: 12.5px; font-weight: 800; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; color: var(--ink);
  text-shadow: 0 0 2px var(--canvas), 0 0 2px var(--canvas), 0 0 3px var(--canvas), 0 0 4px var(--canvas), 1px 1px 0 var(--canvas), -1px -1px 0 var(--canvas), 1px -1px 0 var(--canvas), -1px 1px 0 var(--canvas); }
.mk-lbl.lb-s { color: var(--deep); } .mk-lbl.lb-e { color: var(--pu-ink); } .mk-lbl.lb-b { color: var(--sage-ink); font-weight: 700; }
.mk-lbl[hidden], .zooming .mk-lbl { display: none; }

/* ---- the pin look (site/pins.js, the 2026-11-23 mock) ---- */
:root { --pu-ink: #9A4B33; --sage: #C9D8BC; --sage-edge: #9CB58E; --sage-ink: #5B7150; --open: #4FA548; }
:root[data-theme="dark"] { --pu-ink: #F4C3A6; --sage: #6F8A63; --sage-edge: #B7CCA9; --sage-ink: #C9D8BC; --open: #7BD072; }
.pn-bob, .pn, .pn .pn-ph, .pn-ground { display: block; }
.pn { position: relative; }
.pn .pn-ph { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.pn .pn-ph > img, .pn .pn-ph > svg, .pn .pn-ph .pn-draw, .pn .pn-ph .pn-draw svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.pn-ground { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -26px 0 0 -32px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(140,191,122,.36), rgba(140,191,122,0)); }
/* colour by kind (2026-11-23 mock): pop-ups warm, shops matcha green, brands muted sage; the ground under each pin tints the
   basemap a touch in its kind's colour, softer in the dark theme */
.mk-ev .pn-ground { background: radial-gradient(closest-side, rgba(246,183,199,.42), rgba(248,211,181,0)); }
.mk-br .pn-ground { width: 52px; height: 52px; margin: -22px 0 0 -26px; background: radial-gradient(closest-side, rgba(156,181,142,.34), rgba(156,181,142,0)); }
:root[data-theme="dark"] .pn-ground { opacity: .6; }
:root[data-theme="dark"] .pn-sh, :root[data-theme="dark"] .pn-stack .pn-st { box-shadow: 0 0 0 2px var(--panel), 0 3px 8px rgba(0,0,0,.45); }
:root[data-theme="dark"] .pn-pu { box-shadow: 0 3px 10px rgba(0,0,0,.45); }
/* shop: a round photo in a matcha ring, the cup as a mark, the open dot */
.mk-sh { width: 40px; height: 40px; }
.mk-sh::before { inset: -4px; }
.pn-sh { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent); box-shadow: 0 0 0 2px var(--panel), 0 3px 8px rgba(62,107,51,.35); box-sizing: border-box; }
.pn-sh .pn-ph { inset: 1px; border-radius: 50%; background: var(--foam); }
.pn-sh.sv { border-color: var(--shmint-edge); }
.pn-sh .pn-draw { padding: 4px; box-sizing: border-box; }
.pn-cup { position: absolute; right: -7px; bottom: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); border: 1.5px solid var(--edge); display: grid; place-items: center; }
.pn-cup svg { width: 13px; height: 13px; display: block; }
.pn-open { position: absolute; right: -2px; top: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--open); border: 2px solid var(--panel); }
/* pop-up: the drawn card or the photo in a warm rounded card with a tail, the day pill, a going badge, today's pulse */
.mk-ev:not(.mk-ap) { width: 46px; height: 56px; }
.mk-ev:not(.mk-ap)::after { display: none; }
.mk-ev:not(.mk-ap) .mk-in { height: 56px; filter: none; }
.pn-pu { width: 46px; height: 46px; border-radius: 14px; background: var(--peach); border: 3px solid var(--peach-edge); box-shadow: 0 3px 10px rgba(201,138,94,.35); box-sizing: border-box; }
.pn-pu::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; margin-left: -6px; background: var(--peach-edge); transform: rotate(45deg); border-radius: 2px; z-index: -1; }
.pn-pu .pn-ph { border-radius: 11px; }
.pn-pu.today { background: var(--pink); border-color: var(--pink-edge); box-shadow: 0 0 0 5px rgba(246,183,199,.45), 0 3px 12px rgba(217,140,162,.45); }
.pn-pu.today::after { background: var(--pink-edge); }
.pn-pill { position: absolute; left: 50%; top: -15px; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 16px; white-space: nowrap; background: var(--panel); color: var(--pu-ink); border: 1.5px solid var(--peach-edge); }
.pn-pu.today .pn-pill { background: #D9667F; color: #fff; border-color: #D9667F; }
.pn-going { position: absolute; right: calc(100% - 6px); bottom: 4px; font-size: 10px; font-weight: 800; background: var(--deep); color: var(--panel); border: 1.5px solid var(--panel); border-radius: 999px; padding: 0 5px; line-height: 15px; white-space: nowrap; }
.pn-pulse { position: absolute; inset: -3px; border-radius: 16px; border: 3px solid var(--pink-edge); pointer-events: none; opacity: 0; }
.mk.past .pn-pu { opacity: .6; filter: grayscale(.4); }
/* brand: the picture in a sage mochi frame, or the drawn card art with the initial */
.mk-br, .mk-cl.cl-br.cl-bc { width: 34px; height: 30px; }
.mk-br::before { inset: -6px; }
.pn-br { width: 34px; height: 30px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: var(--sage); border: 2.5px solid var(--sage-edge); box-shadow: 0 2px 5px rgba(94,138,78,.25); box-sizing: border-box; }
.pn-br .pn-ph > img, .pn-br .pn-ph > svg { filter: saturate(.85); }
.mk-br.sel .pn-br { transform: scale(1.3); }
/* life (2026-11-23 mock): an idle bob on a slow random phase (--ph from pins.js), a hop on hover or tap, today's pulse,
   the selected pin bigger with a halo; Mattie at the card's foot turns toward the pin. Off under html.rm. */
.pn-bob { animation: pn-bob 3.6s ease-in-out infinite alternate; animation-delay: var(--ph, 0s); }
@keyframes pn-bob { from { transform: translateY(0) rotate(0); } to { transform: translateY(-3px) rotate(1deg); } }
/* frame time (tools/frame-time.js, 2026-11-23): the idle bob on every pin cost most of the frame once a view held a few dozen;
   past PN_BUSY pins in view (app.js) the map rests still and only today's pulse and the hop on a touched pin move */
.pn-busy .pn-bob { animation: none; }
.pn-busy .mk:hover .pn-bob, .pn-busy .mk:active .pn-bob { animation: pn-hop .45s var(--spring); }
.mk:hover .pn-bob, .mk:focus-visible .pn-bob, .mk:active .pn-bob { animation: pn-hop .45s var(--spring); }
@keyframes pn-hop { 40% { transform: translateY(-8px) scale(1.08); } }
.pn-pulse { animation: pn-pulse 2.2s ease-out infinite; }
.pn-pulse.b { animation-delay: 1.1s; }
@keyframes pn-pulse { from { transform: scale(1); opacity: .75; } to { transform: scale(1.7); opacity: 0; } }
.mk.sel { z-index: 30 !important; }
.mk.sel .pn { transform: scale(1.32); transition: transform .3s var(--spring); }
.mk.sel .pn-ground { width: 92px; height: 92px; margin: -40px 0 0 -46px; background: radial-gradient(closest-side, rgba(255,253,247,.95) 55%, rgba(246,183,199,.55) 75%, rgba(246,183,199,0)); }
.mk.sel.mk-ev .pn-ground { margin-top: -66px; }
.pop-mattie { position: absolute; left: -30px; bottom: -14px; width: 46px; height: 46px; pointer-events: none; transform: scaleX(-1) rotate(-8deg); transform-origin: 50% 90%; animation: mattie-turn .5s var(--spring) .1s both; }
@keyframes mattie-turn { from { transform: scaleX(1) rotate(6deg); opacity: 0; } 60% { opacity: 1; } to { transform: scaleX(-1) rotate(-8deg); } }
.card-open .sheet-peek .ch { transition: transform .4s var(--spring); transform: rotate(-10deg) translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .pn-bob, .pn-pulse, .pop-mattie { animation: none !important; } }
.rm .pn-pulse { display: none; }
/* the national tier (below zoom 10): one small round pin per city, 20 px to zoom 5, 24 to 7, 28 to 10 */
.mk-cl.cl-nt, .mk-cl.cl-nt.cl-m, .mk-cl.cl-nt.cl-l { width: 20px; height: 20px; }
.nz1 .mk-cl.cl-nt { width: 24px; height: 24px; } .nz2 .mk-cl.cl-nt { width: 28px; height: 28px; }
.pn-city { width: 100%; height: 100%; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--accent); background: var(--foam); box-shadow: 0 0 0 1.5px var(--panel), 0 2px 5px rgba(62,107,51,.3); }
.pn-city.k-e { border-color: var(--peach-edge); background: var(--peach); box-shadow: 0 0 0 1.5px var(--panel), 0 2px 5px rgba(201,138,94,.35); }
.pn-city.k-b { border-color: var(--sage-edge); background: var(--sage); }
.pn-city .pn-ph { border-radius: 50%; }
.pn-city .pn-draw { padding: 1px; box-sizing: border-box; }
.pn-ini { display: grid; place-items: center; width: 100%; height: 100%; font-size: 11px; font-weight: 800; color: var(--sage-ink); }
.nz2 .pn-ini { font-size: 14px; }
.pn-cn { position: absolute; right: -9px; bottom: -6px; min-width: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; font-size: 10.5px; font-weight: 800; line-height: 14px; text-align: center; color: var(--ink); background: var(--panel); border: 1.5px solid var(--edge); pointer-events: none; }
.cl-nt:hover .pn-city, .cl-nt:focus-visible .pn-city { transform: scale(1.15); transition: transform .15s var(--soft); }
.mk-lbl.lb-c { color: var(--ink); font-size: 12px; }
/* a stack (zoom 12 up): the first two pins fanned, the count */
.mk-cl.cl-stack, .mk-cl.cl-stack.cl-m, .mk-cl.cl-stack.cl-l { width: 50px; height: 40px; }
.pn-stack { width: 50px; height: 40px; }
.pn-stack .pn-st { position: absolute; top: 0; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--accent); background: var(--panel); box-shadow: 0 0 0 2px var(--panel), 0 2px 6px rgba(62,107,51,.3); box-sizing: border-box; overflow: hidden; }
.pn-stack .pn-st.k-e { border-radius: 12px; border-color: var(--peach-edge); }
.pn-stack .pn-st.k-b { border-color: var(--sage-edge); }
.pn-stack .pn-st1 { left: 0; transform: rotate(-8deg); } .pn-stack .pn-st2 { left: 14px; transform: rotate(7deg); }
.pn-fan { position: absolute; right: -6px; bottom: -6px; font-size: 11px; font-weight: 800; color: var(--deep); background: var(--panel); border: 1.5px solid var(--edge); border-radius: 999px; padding: 0 5px; line-height: 15px; }
/* a neighbourhood (zoom 10 to 12): up to three faces, the count, a pink count of pop-ups */
.mk-cl.cl-hood, .mk-cl.cl-hood.cl-m, .mk-cl.cl-hood.cl-l { width: auto; height: auto; }
.pn-hood { display: flex; align-items: center; padding: 4px 9px 4px 4px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 96%, transparent); border: 2px solid var(--edge); box-shadow: var(--shadow); }
.pn-hood .pn-av { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 2px solid var(--panel); margin-right: -10px; background: var(--foam); box-sizing: border-box; }
.pn-hood .pn-av.k-e { border-radius: 9px; border-color: var(--peach-edge); }
.pn-hood .pn-av.k-b { border-color: var(--sage-edge); }
.hd-n { margin-left: 16px; font-weight: 800; font-size: 15px; color: var(--deep); line-height: 1; }
.hd-p { position: absolute; right: -7px; top: -9px; font-size: 11px; line-height: 18px; min-width: 18px; text-align: center; color: #fff; background: #D9667F; border: 2px solid var(--panel); border-radius: 999px; padding: 0 3px; box-sizing: border-box; font-weight: 800; }

/* clusters: dango */
.mk-cl { width: 28px; height: 54px; }
.mk-cl.cl-m { width: 32px; height: 62px; }
.mk-cl.cl-l { width: 36px; height: 70px; }
.mk-cl .ch { transform: rotate(16deg); filter: drop-shadow(0 3px 3px rgba(75,52,38,.22)); }
.cl-n { position: absolute; left: auto; right: -12px; top: auto; bottom: -5px; transform: none; box-sizing: border-box; min-width: 21px; padding: 2px 5px; border-radius: 999px; text-align: center; font-size: 13px; font-weight: 800; line-height: 1; color: var(--ink, #3B2E27); background: var(--panel, #FFFDF7); border: 2px solid var(--edge, #3B2E27); box-shadow: 0 1px 3px rgba(75,52,38,.25); pointer-events: none; z-index: 2; }
.cl-m .cl-n, .cl-l .cl-n { font-size: 14px; }
.cl-n.morph { animation: morph .32s var(--spring); }
@keyframes morph { from { transform: scale(.4); opacity: .2; } to { transform: none; opacity: 1; } }
.mk-cl.cl-br { width: 22px; height: 42px; }
.mk-cl.cl-br.cl-m { width: 25px; height: 48px; }
.mk-cl.cl-br.cl-l { width: 28px; height: 54px; }
.cl-br .cl-n { font-size: 12.5px; right: -11px; }
.cl-br .m-d1 { fill: #CFE3BE; } .cl-br .m-d2 { fill: #EEF5E4; } .cl-br .m-d3 { fill: #B2D19C; }
.mk-cl:hover .mk-in, .mk-cl:focus-visible .mk-in { transform: translateY(-3px); transition: transform .16s var(--soft); }

/* you are here */
.you { position: relative; display: block; width: 20px; height: 20px; pointer-events: none; }
.you-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--deep); border: 3px solid var(--mc); box-shadow: 0 0 0 1.5px var(--mo), var(--shadow); }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid var(--deep); opacity: 0; }
.you.ping .ring { animation: radar 1.1s ease-out 2; }
.you.ping .ring.r2 { animation-delay: .35s; }
@keyframes radar { from { transform: scale(.6); opacity: .9; } to { transform: scale(4.2); opacity: 0; } }

/* Hawaii jump: a small Mattie hops off the button */
.geo { position: absolute; top: 12px; right: 12px; z-index: 500; min-height: 44px; padding: 0 16px; border-radius: var(--pill); border: 1.5px solid var(--edge); background: var(--btnfill); color: var(--deep); font-weight: 800; font-size: 15px; box-shadow: var(--shadow); cursor: pointer; }
.geo:hover { background: var(--foam); }
.hop { position: absolute; top: 60px; right: 40px; width: 30px; height: 30px; z-index: 501; pointer-events: none; }
.hop-y { display: block; width: 100%; height: 100%; }
.hop.go { animation: hop-x .8s cubic-bezier(.45, 0, .55, 1) forwards; }
.hop.go .hop-y { animation: hop-y .8s linear forwards; }
@keyframes hop-x { from { transform: none; } to { transform: translateX(-38vw); } }
@keyframes hop-y {
  0% { transform: none; animation-timing-function: ease-out; }
  25% { transform: translateY(-46px) rotate(-14deg); animation-timing-function: ease-in; }
  50% { transform: scale(1.15, .85); animation-timing-function: ease-out; }
  75% { transform: translateY(-34px) rotate(-10deg); animation-timing-function: ease-in; opacity: 1; }
  100% { transform: translateY(6px); opacity: 0; }
}

/* ---------- cards ---------- */
.card h3 { margin: 0 44px 4px 0; font-size: 18px; font-weight: 800; color: var(--deep); line-height: 1.25; display: flex; align-items: center; gap: 8px; }
.card-face { flex: none; display: block; width: 28px; height: 28px; }
.card-mochi { flex: none; display: block; width: 20px; height: 17px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: var(--brandpin); border: 1.5px solid var(--brandpin-edge); }
.card p { margin: 3px 0; font-size: 16px; color: var(--ink); }
.card p.when { font-weight: 700; }
.card .muted { color: var(--muted); }
.card .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--pill); border: 1.5px solid var(--edge); background: var(--panel); color: var(--deep); font-size: 15px; font-weight: 800; text-decoration: none; }
.card .links a:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card .links a:hover { background: var(--foam); }
.card .links a:first-child:hover { background: var(--deep); border-color: var(--deep); color: var(--canvas); }
.ph { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--foam); margin: 0 0 12px; border: 1.5px solid var(--line); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-empty { aspect-ratio: 16 / 5; display: flex; align-items: center; justify-content: center; }
.ph-face { display: block; width: 56px; height: 56px; }
.ph-credit { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 22px; padding: 0 10px; border-radius: var(--pill); color: #fff; background: rgba(59,46,39,.78); }
.card .menu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 2px; }
.card .menu-label { font-size: 14px; font-weight: 800; color: var(--muted); margin-right: 2px; }
.card .pill { font-size: 14px; font-weight: 700; line-height: 22px; padding: 2px 12px; border-radius: var(--pill); background: var(--panel); border: 1.5px solid var(--edge); color: var(--ink); }
.card .pill.more { color: var(--muted); }
.card .price { margin-left: auto; font-size: 16px; font-weight: 800; color: var(--deep); }
.card .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 15px; }

/* phone sheet: springs up, Mattie peeks over the edge */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; flex-direction: column; max-height: 74%;
  background: var(--pat), var(--panel); border-radius: 28px 28px 0 0; border: 1.5px solid var(--line); border-bottom: 0; box-shadow: 0 -6px 28px rgba(75,52,38,.16); }
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: var(--pill); background: color-mix(in srgb, var(--muted) 40%, transparent); }
#sheet-body { overflow-y: auto; overflow-x: hidden; padding: 24px 18px calc(14px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet-peek { position: absolute; top: -31px; left: 26px; width: 54px; height: 32px; pointer-events: none; }
.sheet.in { animation: sheet-in .32s var(--spring) both; }
.sheet.in .ph img { animation: ph-in .32s ease-out both; }
.sheet.in .sheet-peek { animation: peek-in .5s var(--spring) .12s both; }
.sheet.out { animation: sheet-out .2s ease-in forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes ph-in { from { transform: scale(.96); } to { transform: none; } }
@keyframes peek-in { from { transform: translateY(26px); } to { transform: none; } }
.close { position: absolute; top: 14px; right: 12px; z-index: 2; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--panel); color: var(--deep); font-size: 26px; line-height: 1; cursor: pointer; }
.close:hover { background: var(--foam); }

/* desktop popup: grows out of the pin */
.mm-pop { z-index: 900; }
.mm-pop .maplibregl-popup-content { position: relative; padding: 16px 18px; border-radius: var(--r); background: var(--pat), var(--panel); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow); font-family: var(--font); width: 320px; max-width: 100%;
  transform-origin: 50% 100%; animation: pop-in .28s var(--soft) both; }
/* the card never outgrows the window: past this height it scrolls inside (the close button stays put, it is positioned on the content box) */
.mm-pop .maplibregl-popup-content > div { max-height: calc(100vh - 190px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.mm-pop.maplibregl-popup-anchor-top .maplibregl-popup-content, .mm-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-content, .mm-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-content { transform-origin: 50% 0; }
.mm-pop.maplibregl-popup-anchor-left .maplibregl-popup-content { transform-origin: 0 50%; }
.mm-pop.maplibregl-popup-anchor-right .maplibregl-popup-content { transform-origin: 100% 50%; }
.mm-pop.out .maplibregl-popup-content { animation: pop-out .2s ease-in forwards; }
.mm-pop.out .maplibregl-popup-tip { opacity: 0; transition: opacity .12s; }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop-out { to { transform: scale(.7); opacity: 0; } }
.mm-pop .close { top: 10px; right: 10px; }
.mm-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .mm-pop.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .mm-pop.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--panel); }
.mm-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip, .mm-pop.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .mm-pop.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--panel); }
.mm-pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--panel); }
.mm-pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--panel); }

/* map chrome */
.maplibregl-map { font-family: var(--font); }
.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--panel) 88%, transparent) !important; color: var(--muted); font-size: 12px; }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib.maplibregl-compact { min-height: 24px; }
.maplibregl-ctrl-group { background: var(--panel); border-radius: 16px; border: 1.5px solid var(--edge); box-shadow: var(--shadow) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px; height: 40px; }
.maplibregl-ctrl-group button + button { border-top: 1.5px solid var(--line); }
.maplibregl-canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ---------- About ---------- */
dialog { max-width: 440px; width: calc(100% - 32px); max-height: calc(100% - 32px); border: 1.5px solid var(--line); border-radius: 28px; background: var(--pat), var(--wash), var(--panel); color: var(--ink); box-shadow: var(--shadow); padding: 20px 24px; }
dialog[open] { animation: dlg-in .3s var(--soft); }
@keyframes dlg-in { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
dialog::backdrop { background: rgba(59,46,39,.42); }
dialog h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: var(--deep); }
dialog p { margin: 0 0 10px; font-size: 16px; }
dialog .credit { font-size: 14px; color: var(--muted); }
.about-cast { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 4px; }
.about-mascot { display: block; width: 68px; height: 68px; }
.about-chasen { display: block; width: 24px; height: 36px; }
.about-mascot .m-arm-r { animation: wave .6s ease-in-out .3s 2; }

/* ---------- wide ---------- */
@media (min-width: 900px) {
  body { font-size: 17px; }
  .main { display: grid; grid-template-columns: 400px 1fr; }
  .list-panel { position: static; display: block; border-right: 1.5px solid var(--line); }
  .map-panel { position: relative; }
  #view-toggle { display: none; }
  .sheet { display: none !important; }
  .bar { padding: 8px 20px; min-height: 76px; }
  .brand { flex: 0 1 auto; }
  .brand h1 { font-size: 27px; }
  .mark { width: 48px; height: 48px; }
  .brand p { margin-left: 56px; font-size: 15px; }
  .sidekick { width: 22px; height: 33px; margin-left: 10px; }
  .bar-actions { margin-left: auto; }
  .filters { padding: 8px 20px; }
  .row strong { font-size: 18px; }
  .intro-title { font-size: 44px; }
  .intro-mattie { width: 150px; height: 150px; }
}
@media (max-width: 899px) { .maplibregl-ctrl-group { display: none; } }
@media (max-width: 380px) { .brand h1 { font-size: 20px; } .btn.quiet { padding: 0 11px; } .sidekick { display: none; } }

/* ---------- calm mode ---------- */
.rm *, .rm *::before, .rm *::after { animation: none !important; transition: none !important; }
.rm .m-look { transform: none !important; }
/* opacity fades stay */
.rm .intro.gone { transition: opacity .3s ease !important; }
.rm .mapfade { transition: opacity .25s ease !important; }
.rm .mm-pop .maplibregl-popup-content { animation: fade .2s ease both !important; }
.rm dialog[open] { animation: fade .2s ease both !important; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.maplibregl-ctrl-attrib-inner { color: var(--muted); }
[data-theme="dark"] .maplibregl-ctrl-attrib-button, [data-theme="dark"] .maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1) hue-rotate(180deg) brightness(1.4); }
[data-theme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact-show, [data-theme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--panel) !important; }
/* phone header: tagline runs under the name so it never truncates; Chasen rests until there is room */
@media (max-width: 599px) {
  .bar { gap: 6px; padding: 6px 8px 6px 10px; }
  .mark { width: 34px; height: 34px; }
  .brand h1 { font-size: 21px; gap: 6px; }
  .brand p { margin-left: 2px; font-size: 14px; }
  .sidekick { display: none; }
  .btn.quiet { padding: 0 11px; }
  .bar-actions { gap: 4px; }
}

/* drawn cards (drawn.js): a card in the house style for pop-ups with no photo */
.dcv0 { --dc-bg: #F4F8EA; --dc-blob: #DCEBC9; --dc-edge: #8CBF7A; }
.dcv1 { --dc-bg: #FFF1F4; --dc-blob: #F9D5DF; --dc-edge: #D98CA2; }
.dcv2 { --dc-bg: #FFF3E6; --dc-blob: #F8D3B5; --dc-edge: #C98A5E; }
:root[data-theme="dark"] .dc { --dc-ink: #F3EADB; --dc-mut: #C9BDAA; --dc-pill: #17211A; --dc-line: #CBB89F; }
:root[data-theme="dark"] .dcv0 { --dc-bg: #1F2B22; --dc-blob: #34503A; --dc-edge: #A9D59A; }
:root[data-theme="dark"] .dcv1 { --dc-bg: #2B2227; --dc-blob: #55384A; --dc-edge: #F1C6D2; }
:root[data-theme="dark"] .dcv2 { --dc-bg: #2B261F; --dc-blob: #55422E; --dc-edge: #E9C09E; }
.dc-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.dc-wrap .ph { width: 100%; }
.ph-drawn { background: transparent; border: 0; border-radius: 16px; }
.ph-drawn-brand { aspect-ratio: 640 / 240; }
.ph-drawn svg { display: block; width: 100%; height: 100%; }
.dc-save { min-height: 44px; margin: -6px 0 6px; padding: 0 18px; border-radius: var(--pill); border: 1.5px solid var(--edge); background: var(--panel); color: var(--deep); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.dc-save:hover { background: var(--foam); }
.row .th.th-drawn { background: transparent; border: 0; }
.row .th.th-drawn svg { display: block; width: 100%; height: 100%; }
.dc.blink .m-eyes { animation: blink .18s ease-in-out; }
.sheet.in .ph-drawn svg { animation: ph-in .32s ease-out both; }
.dc-bg { fill: var(--dc-bg); } .dc-blob, .dc-price { fill: var(--dc-blob); }
.dc-ink { fill: var(--dc-ink, #3B2E27); } .dc-mut { fill: var(--dc-mut, #6B5A4F); }
.dc-pillr { fill: var(--dc-pill, #FFFBF0); stroke: var(--dc-edge); } .dc-price { fill: var(--dc-blob); }
.dc-line { stroke: var(--dc-line, #4B3426); }

/* ---------- storefronts (rung 21): permanent matcha shops ---------- */
:root { --shmint: #BFE3D6; --shmint-edge: #6FA896; --shmint-pale: #E8F6F0; }
:root[data-theme="dark"] { --shmint: #7FBFA9; --shmint-edge: #BFE3D6; --shmint-pale: #2B4A3F; }
.mk-sh { width: 28px; height: 28px; }
.mk-sh::before { content: ""; position: absolute; inset: -8px; }
.mk-sh .mk-in { transform-origin: 50% 100%; transition: transform .18s var(--soft); filter: drop-shadow(0 2px 2px rgba(75,52,38,.25)); }
.mk-sh .ch { display: block; width: 100%; height: 100%; }
.mk-sh:hover .mk-in, .mk-sh:focus-visible .mk-in { transform: translateY(-3px) scale(1.1, .94); }
.mk-sh.sel .mk-in { transform: scale(1.25); }
.mk-sh.sel { z-index: 5 !important; }
.mk-cl.cl-sh { width: 38px; height: 44px; }
.mk-cl.cl-sh.cl-m { width: 42px; height: 48px; }
.mk-cl.cl-sh.cl-l { width: 46px; height: 52px; }
.mk-cl.cl-sh .ch { transform: none; display: block; width: 100%; height: 100%; }
.cl-sh .m-c, .cl-sh .sh-s1 { fill: #E8F6F0; }
.cl-sh .m-f, .cl-sh .sh-s2, .cl-sh .sh-door { fill: var(--shmint); }
.cl-sh .cl-n { top: auto; bottom: -3px; transform: none; left: 50%; right: auto; min-width: 22px; padding: 0 6px; margin-left: -11px; width: auto; box-sizing: border-box;
  font-size: 13px; line-height: 20px; border-radius: var(--pill); background: var(--shmint); border: 1.5px solid var(--mo); color: #3B2E27; text-shadow: none; }
.cl-sh .cl-n.morph { animation: morph-sh .32s var(--spring); }
@keyframes morph-sh { from { transform: scale(.4); opacity: .2; } to { transform: none; opacity: 1; } }
.row.shoprow { border-left: 4px solid var(--shmint); min-height: 72px; }
/* "Matcha on the menu" (tier serves: coffee and tea shops that serve matcha): the same shop pin, lighter. Paler fills, a
   thinner and softer outline, a lighter shadow, so it reads as the same family and steps back beside a matcha shop. */
:root { --sv-c: #FFFEFA; --sv-f: #EEF6E6; --sv-win: #E2F1F3; --sv-o: #8A7566; }
:root[data-theme="dark"] { --sv-c: #E9E4D6; --sv-f: #C9DDB8; --sv-win: #C9E0E3; --sv-o: #4B3426; }
.mk-sh.mk-sv { width: 26px; height: 26px; }
.mk-sh.mk-sv .mk-in { filter: drop-shadow(0 1px 1.5px rgba(75,52,38,.18)); }
.mk-sv .m-o, .mk-sv .m-l { stroke: var(--sv-o); stroke-width: 1.4; }
.mk-sv .m-c { fill: var(--sv-c); }
.mk-sv .m-f { fill: var(--sv-f); }
.mk-sv .sh-win { fill: var(--sv-win); }
.row.shoprow.shoprow-sv { border-left-color: var(--shmint-pale); border-left-style: dashed; }
.row.shoprow-sv .th.th-shop { background: transparent; }
.row.shoprow-sv .th-shop .m-o, .row.shoprow-sv .th-shop .m-l { stroke: var(--sv-o); stroke-width: 1.4; }
.row.shoprow-sv .th-shop .m-c { fill: var(--sv-c); }
.row.shoprow-sv .th-shop .m-f { fill: var(--sv-f); }
.row.shoprow-sv .th-shop .sh-win { fill: var(--sv-win); }
.row .th.th-shop { background: var(--shmint-pale); border-color: var(--shmint-edge); }
.th-shop .ch { display: block; width: 40px; height: 40px; }
.list li.brmore { margin: 0; }
.list .brall { width: 100%; min-height: 48px; padding: 10px 16px; border-radius: var(--r); border: 1.5px dashed var(--line); background: transparent; color: var(--deep); font: inherit; font-size: 15px; font-weight: 800; text-align: left; cursor: pointer; }
.list .brall:hover { background: var(--foam); }
.list li.nopops { margin: 0 2px 6px; padding: 8px 14px; color: var(--muted); font-size: 14px; font-weight: 700; }
.list li.shopnote { margin: 0 2px; padding: 10px 14px; border-radius: var(--r); border: 1.5px dashed var(--shmint-edge); color: var(--muted); font-weight: 700; font-size: 15px; }
.card-shop { flex: none; display: block; width: 30px; height: 30px; }
.card-shop .ch { display: block; width: 100%; height: 100%; }
.card .hours { margin: 3px 0; font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .credit-line { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.card .credit-line a { color: var(--muted); }

/* ---------- approximate pins: a pop-up whose place is not posted yet (city-only). A dashed ring, lower opacity, no shadow:
   "around here", not "right here". ---------- */
.mk-ap, .mk-cl.cl-ap { width: 46px; height: 46px; }
.mk-ap::after { display: none; }
.mk-ap .mk-in, .mk-cl.cl-ap .mk-in { height: 46px; filter: none; }
.mk-ap .ch, .mk-cl.cl-ap .ch { position: absolute; left: 7px; top: 7px; width: 32px; height: 32px; filter: none; transform: none; opacity: .72; }
.mk-ring { position: absolute; inset: 1px; border-radius: 50%; border: 2px dashed var(--edge); background: color-mix(in srgb, var(--panel) 55%, transparent); opacity: .85; }
.mk-ap:hover .mk-in, .mk-ap:focus-visible .mk-in, .mk-cl.cl-ap:hover .mk-in, .mk-cl.cl-ap:focus-visible .mk-in { transform: scale(1.06); }
.mk-ap.sel .mk-in { transform: scale(1.12); }
.mk-ap.sel .mk-ring { border-style: solid; opacity: 1; }
.mk-cl.cl-ap .cl-n { top: auto; bottom: -4px; left: 50%; right: auto; transform: translateX(-50%); width: auto; min-width: 20px; padding: 1px 6px; box-sizing: border-box; border-radius: 999px; font-size: 13px; background: var(--panel); border: 2px dashed var(--edge); text-shadow: none; color: var(--ink); }
.mk-cl.cl-ap.cl-m, .mk-cl.cl-ap.cl-l { width: 46px; height: 46px; }
.list li.apnote { margin: -4px 2px 8px; font-size: 14px; }
.aplink { background: none; border: 0; padding: 0; color: var(--deep); font-weight: 700; text-decoration: underline; cursor: pointer; }
.mk-cl.cl-ap .cl-n.morph { animation: none; }
/* Calmer rings zoomed out (rung 34): the map container carries zl (zoom under 6) or zm (6 up to 9); full size from 9. The count badge keeps its size. */
.zm .mk-ring { inset: 5px; border-width: 2px; }
.zm .mk-ap .ch, .zm .mk-cl.cl-ap .ch { left: 10px; top: 10px; width: 26px; height: 26px; }
.zl .mk-ring { inset: 9px; border-width: 1.5px; opacity: .6; }
.zl .mk-ap .ch, .zl .mk-cl.cl-ap .ch { left: 13px; top: 13px; width: 20px; height: 20px; }
.zl .mk-ap.sel .mk-ring, .zm .mk-ap.sel .mk-ring { opacity: 1; }

/* ---------- fuller card: brand facts and Yelp ---------- */
.card .brow { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; min-width: 0; }
.card .bpic { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--foam); border: 1.5px solid var(--line); }
.card .bpic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .bpic .card-face { width: 30px; height: 30px; }
.card .btxt { display: flex; flex-direction: column; min-width: 0; }
.card .bname { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.card .bmeta { font-size: 14px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.card .bmeta a, .card .ycredit a, .card .yphone a { color: var(--deep); font-weight: 700; }
.card p.bio { margin: 4px 0 0; font-size: 14px; line-height: 1.4; }
.card .recent { margin-top: 10px; }
.card p.rlabel { margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--muted); }
.card .rgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.card .rc { display: block; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--foam); border: 1.5px solid var(--line); }
.card .rc img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .rc svg { display: block; width: 100%; height: 100%; }
.card .rc-face { display: flex; align-items: center; justify-content: center; }
.card .yelp { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--line); }
.card .ytxt { flex: 1; min-width: 0; }
.card .ytxt p { margin: 2px 0; font-size: 15px; }
.card .yphoto { order: 2; flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--foam); }
.card .yphoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .yprice { font-weight: 800; color: var(--deep); }
.card p.ycredit { font-size: 13px; }
.stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 1px; color: var(--line); vertical-align: -1px; }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars-on { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #E0A024; width: 0; }
.stars.s1 .stars-on { width: 10%; } .stars.s2 .stars-on { width: 20%; } .stars.s3 .stars-on { width: 30%; } .stars.s4 .stars-on { width: 40%; }
.stars.s5 .stars-on { width: 50%; } .stars.s6 .stars-on { width: 60%; } .stars.s7 .stars-on { width: 70%; } .stars.s8 .stars-on { width: 80%; }
.stars.s9 .stars-on { width: 90%; } .stars.s10 .stars-on { width: 100%; }

/* ---------- rung 35: the design review (docs/DESIGN-REVIEW-2026-11-22.md) ---------- */
:root { --stk: #4B3426; }
:root[data-theme="dark"] { --stk: #0B120D; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.ph-only { display: none; }
@media (max-width: 640px) { .ph-only { display: revert; } .lg-only { display: none; } }

/* filters: the flyers' sticker accent on the active chip only (an ink edge and a hard offset shadow) */
.chip[data-chip][aria-pressed="true"] { border-color: var(--stk); }
.chip-ink { box-shadow: 2px 3px 0 var(--stk); }
.chip.day { display: inline-flex; align-items: center; color: var(--ink); cursor: pointer; }
.chip.day input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.chip.day:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip.day.set { background: var(--accent); border-color: var(--stk); color: var(--accent-ink); box-shadow: 2px 3px 0 var(--stk); }
.chip.near[aria-pressed="true"] { background: var(--foam); border-color: var(--accent); }
.zip-clear { position: relative; z-index: 2; flex: none; width: 36px; height: 36px; margin: 0 4px 0 -44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.zip-clear:hover { background: var(--foam); color: var(--deep); }
.zipbox:has(.zip-clear:not([hidden])) .zip { padding-right: 40px; }
@media (min-width: 641px) {
  #show-btn { margin-left: auto; }
  .zip { width: 230px; }
}

/* phone: dates in a bar at the bottom, in thumb reach; the top keeps Show, Near me and the place box on one row */
@media (max-width: 640px) {
  .frow1 { position: fixed; left: 0; right: 0; bottom: 0; z-index: 700; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 92%, transparent); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(75,52,38,.08);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  body.card-open .frow1 { transform: translateY(110%); opacity: 0; pointer-events: none; }
  .frow2 { padding: 8px 12px; }
  .list { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .map-panel .maplibregl-ctrl-bottom-right, .map-panel .maplibregl-ctrl-bottom-left { bottom: calc(60px + env(safe-area-inset-bottom)); }
  .mapempty { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  .pwa-bar, .pwa-update { bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
  .chip.day { padding: 0 14px; }
}

/* Show: three labelled groups and a Reset */
.show-pop { width: 290px; max-height: calc(100vh - 140px); overflow-y: auto; }
.show-pop .sp-h { margin: 10px 10px 2px; font-size: 13px; font-weight: 800; letter-spacing: .03em; color: var(--muted); }
.show-pop .sp-h:first-child { margin-top: 4px; }
.show-pop .sp-cats { display: grid; grid-template-columns: 1fr 1fr; }
.show-pop .sp-foot { margin: 6px 0 0; padding-top: 4px; border-top: 1px solid var(--line); text-align: right; }
/* a phone the height of a 390x844 one fits the whole list, Reset included, with the "Matcha on the menu" switch added */
@media (max-height: 900px) { .show-pop label { min-height: 40px; } .show-pop .sp-h { margin-top: 8px; } }

/* list: counts on the headings, city-only pop-ups gathered under one dashed heading per city */
.list li.head .n { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.apl::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; border: 1.5px dashed var(--edge); border-radius: 50%; vertical-align: -1px; }
.list li.head.ap-head { font-size: 15px; }
.list li.head.ap-head::before { display: none; }
.row.erow.ap:not(.past) { border-left: 4px dashed color-mix(in srgb, var(--edge) 55%, var(--line)); }
.row .unc { color: var(--muted); font-weight: 500; }
.empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.empty .linkbtn.second, .mapempty .linkbtn.second { background: transparent; color: var(--deep); box-shadow: inset 0 0 0 1.5px var(--edge); }
.mapempty .me-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mapempty .me-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mapempty .me-acts .linkbtn { min-height: 40px; padding: 0 14px; }
.mapempty p { max-width: 17em; }

/* card: facts, one primary action and Share, then a single quiet row of links */
.card .place { margin-top: 2px; }
.card .acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.card .act { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 18px; border-radius: var(--pill); border: 1.5px solid var(--edge);
  background: var(--panel); color: var(--deep); font: inherit; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease; }
.card .act.pri { background: var(--accent); border-color: var(--stk); color: var(--accent-ink); box-shadow: 2px 3px 0 var(--stk); }
.card .act.pri:hover { background: var(--deep); color: var(--canvas); }
.card .act.pri:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--stk); }
.card .act.share:hover, .card .act.share.done { background: var(--foam); }
.card .act:active { transform: scale(.96); }
.card .act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.card .qlinks { margin: 10px 0 0; font-size: 15px; line-height: 1.3; color: var(--muted); }
.card .qlinks a, .card .qbtn { display: inline-block; padding: 9px 0; color: var(--deep); font: inherit; font-weight: 700; background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--deep) 35%, transparent); }
.card .qlinks a:hover, .card .qbtn:hover { text-decoration-color: currentColor; }
.card .share-url { display: block; width: 100%; margin-top: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--edge); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.card .kline .tag { font-weight: 700; }
.card .hours { white-space: normal; }
/* phone sheet: the facts and actions come first, the photo after them, so the half-open sheet answers what, when and where */
.sheet .card { display: flex; flex-direction: column; }
.sheet .card > * { order: 3; }
.sheet .card > h3, .sheet .card > .kline, .sheet .card > .when, .sheet .card > .place, .sheet .card > .hours, .sheet .card > .acts { order: 1; }
.sheet .card > .ph, .sheet .card > .dc-wrap { order: 2; margin: 14px 0 2px; }
.sheet .card > .acts { margin-bottom: 0; }

/* the region line and the weekend tour, top centre of the map */
.region-hint, .tour-bar { position: absolute; left: 50%; top: 12px; z-index: 520; transform: translateX(-50%); display: flex; align-items: center; gap: 4px;
  max-width: calc(100% - 24px); border-radius: var(--pill); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.region-hint { padding: 6px 6px 6px 16px; font-size: 14px; font-weight: 700; color: var(--ink); width: max-content; }
.region-hint span { min-width: 0; }
.rh-x, .tour-bar button { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--deep); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.rh-x:hover, .tour-bar button:hover { background: var(--foam); }
.tour-bar { padding: 4px; }
.tour-bar .tb-at { padding: 0 6px; font-size: 15px; font-weight: 800; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tour-bar .tb-x { color: var(--muted); font-size: 22px; }
.tour-btn { top: 12px; left: 12px; right: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px 0 12px; }
.tour-btn svg { width: 16px; height: 16px; fill: currentColor; }
.tour-btn .tn { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .region-hint { width: calc(100% - 24px); font-size: 13.5px; } }

/* dark: the dashed ring and its badge keep their edge on the dark map */
:root[data-theme="dark"] .mk-ring { border-color: #CFE3BC; background: color-mix(in srgb, var(--panel) 72%, transparent); }
:root[data-theme="dark"] .mk-cl.cl-ap .cl-n { border-color: #CFE3BC; }
:root[data-theme="dark"] .apl::before { border-color: #CFE3BC; }

/* About: credits fold under one line */
dialog details.credit summary { cursor: pointer; font-weight: 700; color: var(--deep); min-height: 32px; }
dialog details.credit p { margin: 6px 0 10px; font-size: 14px; color: var(--muted); }
/* phone: the line sits over the list peek, clear of the map's attribution toggle at the right (N7c) */
@media (max-width: 640px) { .region-hint { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 76px); left: calc(50% - 26px); } }
@media (max-width: 640px) { .region-hint:not([hidden]) { animation-name: rise-in; } }
@keyframes rise-in { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.row .unc { display: inline-block; white-space: nowrap; margin-left: .3em; }
.row .unc::before { content: "\00b7\00a0"; }
body.card-open .frow1 { visibility: hidden; }
.chip.near .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; vertical-align: -4px; }
@media (max-width: 640px) { .frow2 .chip.near { padding: 0 12px; } }

/* Weekend tour bar (social wave): on wide screens it sits at the bottom of the map, clear of the card that opens above the pin; the Share button carries a stroked icon */
@media (min-width: 900px) { .tour-bar { top: auto; bottom: 18px; } }
.tour-bar .tb-share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
