/* GoutBye: seaside harbour, sea blue + white stripes against honey wood */
:root {
  --sea: #2e7fc1; --sea-deep: #1d5f99; --sea-soft: #d8ecfb; --sea-mist: #eef7fe;
  --foam: #ffffff; --cream: #fff8ec; --sand: #fbeed6;
  --wood: #e7b878; --wood-deep: #b9824a; --wood-soft: #f6e2c2;
  --navy: #1f2a44; --ink: #26324f; --muted: #66718a; --line: #e3e8f0;
  --coral: #f0806a; --cherry: #d9384a; --go: #2f9e6e; --easy: #d98a17; --stop: #d9534f;
  --card: #ffffff; --bg: #fff8ec; --bg2: #eef7fe; --shadow: 0 2px 0 rgba(31,42,68,.08), 0 8px 24px rgba(31,42,68,.08);
  --r: 18px; --r-sm: 12px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --tabh: 68px; --toph: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --card: #1c2740; --bg: #121a2c; --bg2: #16213a; --ink: #e9eef8; --navy: #e9eef8; --muted: #a3afc6; --line: #2a3756;
    --cream: #172036; --sand: #1f2a44; --sea-soft: #1d3355; --sea-mist: #182a47; --wood-soft: #3a2f22;
    --shadow: 0 2px 0 rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --card: #1c2740; --bg: #121a2c; --bg2: #16213a; --ink: #e9eef8; --navy: #e9eef8; --muted: #a3afc6; --line: #2a3756;
  --cream: #172036; --sand: #1f2a44; --sea-soft: #1d3355; --sea-mist: #182a47; --wood-soft: #3a2f22;
  --shadow: 0 2px 0 rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--sea); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .4em; color: var(--navy); }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 .7em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; background: var(--bg); }
@media (min-width: 520px) { body { background: linear-gradient(180deg, var(--sea-soft), var(--bg)); } .app { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(31,42,68,.15); } }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; height: calc(var(--toph) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: repeating-linear-gradient(90deg, var(--sea) 0 22px, var(--sea-deep) 22px 24px); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.brand { background: none; border: 0; display: flex; align-items: center; gap: 6px; padding: 4px 2px; color: #fff; }
.brand-wave { font-size: 1.3rem; transform: translateY(-2px); }
.brand-name { font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: .2px; }
.brand-name b { color: #ffd98a; font-weight: 800; }
.topbar-right { display: flex; gap: 6px; }
.pill { border: 0; border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: .86rem; background: rgba(255,255,255,.18); color: #fff; display: flex; align-items: center; gap: 4px; }
.tide-pill.ok { background: #e8f8ef; color: #1c6e49; } .tide-pill.high { background: #fff1e6; color: #a2470f; } .tide-pill.none { background: rgba(255,255,255,.18); }

.view { padding-top: 12px; padding-bottom: calc(var(--tabh) + 24px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); outline: none; }
/* Inside the Claude viewer the page root is already padded for the status bar: stick below it. */
html.in-claude .topbar { top: env(safe-area-inset-top, 0px); padding-top: 0; height: var(--toph); }
.view.flush { padding-left: 0; padding-right: 0; padding-top: 0; }

/* tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30;
  height: calc(var(--tabh) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: var(--card); border-top: 1px solid var(--line); }
.tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
.tabbar button .ti { font-size: 1.25rem; line-height: 1.2; }
.tabbar button.on { color: var(--sea); }
.tab-log .plus { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem !important; color: #fff;
  background: radial-gradient(circle at 35% 30%, #4fa3e3, var(--sea-deep)); box-shadow: 0 4px 0 #154a78, 0 8px 18px rgba(29,95,153,.35); transform: translateY(-14px); border: 3px solid var(--card); }

/* cards and layout */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); }
.card.wood { background: linear-gradient(180deg, var(--wood-soft), var(--card)); }
.card.sea { background: linear-gradient(180deg, var(--sea-soft), var(--card)); }
.card.warn { border: 2px solid #f3c27a; background: linear-gradient(180deg, #fff6e6, var(--card)); }
.card.danger { border: 2px solid #f0a3a0; background: linear-gradient(180deg, #fff0ef, var(--card)); }
:root[data-theme="dark"] .card.warn, :root[data-theme="dark"] .card.danger { background: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card.warn, :root:not([data-theme="light"]) .card.danger { background: var(--card); } }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stack > * + * { margin-top: 8px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .tiny { font-size: .76rem; }
.center { text-align: center; }
.hr { height: 1px; background: var(--line); margin: 12px 0; }
.kicker { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sea); margin-bottom: 4px; }
.hero-img { border-radius: var(--r); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); background: var(--sea-soft); }
.hero-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pagehead { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.pagehead .back { border: 0; background: var(--card); width: 38px; height: 38px; border-radius: 50%; box-shadow: var(--shadow); font-size: 1.1rem; flex: none; }
.pagehead h1 { margin: 0; font-size: 1.45rem; }

/* buttons */
.btn { border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 1rem; background: var(--sea); color: #fff;
  box-shadow: 0 3px 0 var(--sea-deep); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sea-deep); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--sea); box-shadow: 0 0 0 2px var(--sea-soft) inset, 0 2px 0 var(--line); }
.btn.wood { background: var(--wood); color: #4a2d0c; box-shadow: 0 3px 0 var(--wood-deep); }
.btn.go { background: var(--go); box-shadow: 0 3px 0 #1f7350; }
.btn.danger { background: var(--stop); box-shadow: 0 3px 0 #a83a37; }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: .88rem; border-radius: 11px; }
.btn[disabled] { opacity: .5; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .88rem; color: var(--ink); }
.chip.on { background: var(--sea); color: #fff; border-color: var(--sea); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .74rem; font-weight: 800; background: var(--sea-soft); color: var(--sea-deep); }
.tag.go { background: #e3f6ec; color: #1c6e49; } .tag.easy { background: #fdf0d9; color: #8a5208; } .tag.stop { background: #fde6e5; color: #a3302d; }

/* forms */
label.field { display: block; margin-bottom: 10px; font-weight: 700; font-size: .92rem; }
label.field > span { display: block; margin-bottom: 4px; }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sea); }
textarea { min-height: 90px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--sea); }
.seg { display: flex; background: var(--bg2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 10px; padding: 8px 6px; font-weight: 800; font-size: .88rem; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--sea); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--sea); flex: none; }

/* weekday picker */
.dayrow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 0; font-weight: 800; font-size: .8rem; color: var(--muted); min-height: 40px; }
.day.on { background: var(--sea); border-color: var(--sea); color: #fff; }
.day.dim { opacity: .45; }

/* town */
.town { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #8fd3ee; touch-action: manipulation; }
.town-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.spot { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; }
.spot .lbl { background: var(--card); color: var(--navy); font-weight: 800; font-size: .74rem; padding: 6px 10px; border-radius: 999px; box-shadow: 0 2px 0 rgba(0,0,0,.15); white-space: nowrap; border: 2px solid var(--sea); min-height: 32px; display: flex; align-items: center; }
.spot.due .lbl { border-color: var(--coral); animation: bob 1.4s ease-in-out infinite; }
.spot .badge { position: absolute; top: -6px; right: -8px; background: var(--coral); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 800; padding: 1px 6px; }
.kai { position: absolute; width: 12.5%; transform: translate(-50%, -92%); transition: left .7s ease-in-out, top .7s ease-in-out; pointer-events: none; z-index: 3; filter: drop-shadow(0 4px 2px rgba(0,0,0,.18)); }
.kai.flip img { transform: scaleX(-1); }
.kai.walking img { animation: walkbob .35s ease-in-out infinite; }
.nori-tip { display: flex; gap: 10px; align-items: flex-end; margin: 10px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.nori-tip img { width: 72px; flex: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.15)); }
.bubble { background: var(--card); border-radius: 16px 16px 16px 4px; padding: 10px 12px; box-shadow: var(--shadow); border: 1px solid var(--line); font-size: .93rem; flex: 1; }
.bubble b { color: var(--sea-deep); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes walkbob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5%) rotate(2deg); } }
.kai.flip.walking img { animation-name: walkbobflip; }
@keyframes walkbobflip { 0%, 100% { transform: scaleX(-1) translateY(0) rotate(-2deg); } 50% { transform: scaleX(-1) translateY(-5%) rotate(2deg); } }
.places { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.place { border: 0; background: var(--card); border-radius: 14px; padding: 9px 4px; box-shadow: var(--shadow); font-size: .72rem; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink); }
.place .pi { font-size: 1.35rem; }

/* today */
.dose { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.dose:last-child { border-bottom: 0; }
.dose .when { font-weight: 800; color: var(--sea-deep); min-width: 52px; }
.dose .what { flex: 1; }
.dose .what b { display: block; }
.tick { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--sea); background: var(--card); font-size: 1.2rem; color: var(--sea); flex: none; }
.tick.done { background: var(--go); border-color: var(--go); color: #fff; }
.tick.skip { background: var(--line); border-color: var(--line); color: var(--muted); }
.water { display: flex; gap: 4px; flex-wrap: wrap; }
.water button { width: 34px; height: 42px; border: 2px solid var(--sea-soft); border-radius: 6px 6px 10px 10px; background: var(--card); font-size: 1rem; }
.water button.full { background: linear-gradient(180deg, #bfe3fb, #58a9e6); border-color: #58a9e6; }
.meter { height: 12px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, #58a9e6, var(--sea)); border-radius: 999px; }
.stat { background: var(--bg2); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--navy); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: .76rem; color: var(--muted); font-weight: 700; }

/* lists */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; width: 100%; text-align: left; }
.list-item .em { font-size: 1.6rem; width: 40px; text-align: center; flex: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; }
.thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--sea-soft); }

/* food */
.food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.food { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 9px; text-align: left; display: flex; gap: 8px; align-items: center; min-height: 58px; }
.food .em { font-size: 1.5rem; }
.food .nm { font-weight: 700; font-size: .84rem; line-height: 1.2; }
.food.on { border-color: var(--sea); background: var(--sea-mist); }
.food .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-left: auto; align-self: flex-start; }
.shelf { border-radius: var(--r); padding: 12px; margin-bottom: 12px; border: 2px solid var(--line); background: var(--card); }
.shelf h3 { display: flex; align-items: center; gap: 8px; }
.shelf.enjoy { border-color: #bfe8d3; } .shelf.limit { border-color: #f6d9a6; } .shelf.avoid { border-color: #f4bdbb; }
.shelf-item { display: flex; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); align-items: flex-start; }
.shelf-item .em { font-size: 1.5rem; width: 34px; text-align: center; flex: none; }
.shelf-item .grow { flex: 1; } .shelf-item b { display: block; font-size: .95rem; }
.cartbtn { border: 0; background: var(--bg2); border-radius: 10px; padding: 6px 8px; font-size: .78rem; font-weight: 800; color: var(--sea-deep); flex: none; }
.cartbtn.on { background: var(--go); color: #fff; }

/* body map */
.bodymap { position: relative; width: 100%; max-width: 330px; margin: 0 auto; aspect-ratio: 3 / 5; }
.bodymap svg { width: 100%; height: 100%; }
.jt { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; border: 2px dashed rgba(46,127,193,.7); background: rgba(255,255,255,.55); padding: 0; }
.jt.p { border-style: solid; border-color: #fff; color: #fff; font-weight: 800; font-size: .8rem; box-shadow: 0 0 0 3px rgba(217,83,79,.25); }
.painbar { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.painbar button { border: 0; border-radius: 8px; padding: 8px 0; font-weight: 800; font-size: .82rem; color: #fff; opacity: .55; }
.painbar button.on { opacity: 1; outline: 3px solid var(--navy); outline-offset: 1px; }

/* charts */
.chart { width: 100%; overflow: visible; }
.chart text { font-family: var(--font); font-size: 10px; fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .78rem; color: var(--muted); font-weight: 700; margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(15,25,45,.45); animation: fade .18s ease-out; }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; overflow: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .24s ease-out; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { margin-top: 2px; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(40px); opacity: .6; } }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.action { border: 0; background: var(--card); border-radius: 16px; padding: 14px 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: .82rem; color: var(--ink); }
.action .ai { font-size: 1.7rem; }
.action.pro { background: linear-gradient(160deg, #fff4dc, var(--card)); }

/* toast + celebration */
#toastRoot { position: fixed; left: 50%; bottom: calc(var(--tabh) + 22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 14px; font-weight: 700; margin-top: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: up .2s ease-out; }
:root[data-theme="dark"] .toast { background: #f2f5fb; color: #1f2a44; }
.celebrate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(15,25,45,.55); padding: 20px; animation: fade .2s; }
.celebrate .box { background: var(--card); border-radius: 24px; padding: 18px; max-width: 360px; width: 100%; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.celebrate img.cel { width: 70%; margin: -60px auto 4px; filter: drop-shadow(0 6px 4px rgba(0,0,0,.2)); }
.celebrate .em { font-size: 2.4rem; }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 71; border-radius: 2px; animation: fall linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* explainer */
.lesson p { font-size: 1rem; }
.metaphor { background: var(--sea-mist); border-left: 5px solid var(--sea); border-radius: 0 14px 14px 0; padding: 10px 12px; margin-bottom: 12px; font-size: .98rem; }
ul.ticks, ul.flags { padding: 0; margin: 0; list-style: none; }
ul.ticks li, ul.flags li { padding: 6px 0 6px 28px; position: relative; }
ul.ticks li::before { content: "✓"; position: absolute; left: 4px; top: 5px; color: var(--go); font-weight: 900; }
ul.flags li::before { content: "!"; position: absolute; left: 2px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--stop); color: #fff; font-weight: 900; font-size: .75rem; display: grid; place-items: center; }
.src { font-size: .76rem; color: var(--muted); }
.src a { word-break: break-word; }
details.srcs summary { cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--sea); }
.anim { position: relative; height: 140px; background: linear-gradient(180deg, #bfe6fb 0%, #e8f6ff 60%, var(--wood-soft) 60%); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }

/* report */
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 700; } .kv dd { margin: 0; font-weight: 700; }
table.t { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.t th, table.t td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }

/* recipes */
.recipe-card { border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: var(--shadow); margin-bottom: 14px; border: 1px solid var(--line); text-align: left; padding: 0; width: 100%; display: block; }
.recipe-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.recipe-card .rc { padding: 10px 14px 14px; }
ol.steps { padding-left: 22px; } ol.steps li { margin-bottom: 6px; }

/* onboarding */
.onb { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, #cfeefe, var(--bg) 60%); }
.onb .art { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.onb .body { padding-top: 16px; padding-bottom: 28px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); flex: 1; }
.onb-hero { position: relative; }
.onb-hero .onb-kai { position: absolute; left: 30%; bottom: 4%; width: 26%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.onb-hero .onb-nori { position: absolute; left: 54%; bottom: 3%; width: 22%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--sea); width: 20px; border-radius: 4px; }
.hide-chrome .topbar, .hide-chrome .tabbar { display: none; }
.hide-chrome .view { padding: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Galley school: search, category chips, recipe grid (20 Oct 2026) */
.school-tools { position: sticky; top: calc(var(--toph) + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding: 6px 0 4px; margin: 0 -2px; }
.chiprow { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow .chip { flex: none; white-space: nowrap; min-height: 38px; }
.chip .n { font-size: .74rem; opacity: .7; }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rgrid .rempty { grid-column: 1 / -1; display: grid; gap: 10px; justify-items: start; }
.rcard { border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); text-align: left; padding: 0; width: 100%; display: flex; flex-direction: column; color: var(--ink); }
.rcard .rc { padding: 8px 10px 10px; display: grid; gap: 6px; }
.rcard h3 { font-size: .92rem; line-height: 1.25; margin: 0; }
.rmeta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: .76rem; color: var(--muted); font-weight: 700; }
.rimg { position: relative; aspect-ratio: 1 / 1; background: var(--wood-soft, #f3e3c8); overflow: hidden; }
.rimg::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; }
.rimg img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.rhero .rimg { aspect-ratio: 4 / 3; }
.rhero .rimg::before { font-size: 4.5rem; }
.rmore { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rmore::-webkit-scrollbar { display: none; }
.rmini { flex: none; width: 118px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); padding: 0; text-align: left; color: var(--ink); }
.rmini span { display: block; padding: 6px 8px 8px; font-size: .78rem; font-weight: 700; line-height: 1.25; }
.kitchen summary { cursor: pointer; list-style: none; }
.kitchen summary::-webkit-details-marker { display: none; }
.kitchen summary::after { content: " ▾"; color: var(--muted); }
.kitchen[open] summary::after { content: " ▴"; }
.kitchen ul { margin: 8px 0 0; }
.labelcheck { background: var(--sea-mist); }
.labelcheck ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* Eat-out map (20 Oct 2026) */
.ep-tools .seg { flex: 1; }
.ep-sort { width: auto; min-height: 40px; padding: 6px 10px; flex: 1 1 180px; }
.ep-prices { display: flex; gap: 6px; }
.ep-prices .chip { min-width: 52px; text-align: center; }
.ep-unlisted { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 2px; color: var(--muted); }
.ep-unlisted input { margin-top: 2px; }
.ep-map { position: relative; z-index: 0; isolation: isolate; height: 46vh; min-height: 280px; border-radius: var(--r); overflow: hidden; background: var(--sea-soft); box-shadow: var(--shadow); margin: 12px 0 4px; }
.ep-map-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; padding: 16px; text-align: center; }
.ep-map .leaflet-container { font: inherit; }
.ep-count { font-weight: 700; margin: 8px 0; }
.ep-list { display: grid; gap: 8px; }
.ep-row { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--ink); }
.ep-emoji { font-size: 1.5rem; line-height: 1.2; flex: none; }
.ep-main { display: grid; gap: 2px; min-width: 0; }
.ep-name { font-weight: 800; }
.ep-meta, .ep-picks { font-size: .82rem; color: var(--muted); }
.ep-picks { color: #1c6e49; }
.price b { letter-spacing: 1px; }
.price .dim { opacity: .3; letter-spacing: 1px; }
.ep-status { font-size: .82rem; font-weight: 800; }
.ep-status.open { color: #1c7a52; } .ep-status.soon { color: #8a5300; } .ep-status.shut { color: #b23b37; } .ep-status.unk { color: var(--muted); }
.price .est { font-size: .72rem; opacity: .75; font-weight: 600; }
.ep-legal a { color: inherit; }
div.ep-status { margin: 4px 0 8px; font-size: .95rem; }
.ep-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.ep-head h2 { margin: 0; }
.ep-hours ul { margin: 6px 0 8px; padding-left: 18px; }
.ep-tier { border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.ep-tier h4 { margin: 0 0 4px; }
.ep-tier ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.ep-tier span { color: var(--muted); }
.ep-tier.enjoy { background: #e3f6ec; } .ep-tier.limit { background: #fdf0d9; } .ep-tier.avoid { background: #fde6e5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ep-tier.enjoy { background: #173a2b; } :root:not([data-theme="light"]) .ep-tier.limit { background: #3a2e17; } :root:not([data-theme="light"]) .ep-tier.avoid { background: #3d1d1c; } :root:not([data-theme="light"]) .ep-picks { color: #7fd1a8; } :root:not([data-theme="light"]) .ep-status.open { color: #5fd39a; } :root:not([data-theme="light"]) .ep-status.soon { color: #f2b950; } :root:not([data-theme="light"]) .ep-status.shut { color: #ff8f8a; } }
:root[data-theme="dark"] .ep-tier.enjoy { background: #173a2b; } :root[data-theme="dark"] .ep-tier.limit { background: #3a2e17; } :root[data-theme="dark"] .ep-tier.avoid { background: #3d1d1c; } :root[data-theme="dark"] .ep-picks { color: #7fd1a8; } :root[data-theme="dark"] .ep-status.open { color: #5fd39a; } :root[data-theme="dark"] .ep-status.soon { color: #f2b950; } :root[data-theme="dark"] .ep-status.shut { color: #ff8f8a; }
.ep-map .leaflet-control-attribution { font-size: .62rem; line-height: 1.3; max-width: 78%; background: rgba(255,255,255,.85); }
.ep-map .marker-cluster-small, .ep-map .marker-cluster-medium, .ep-map .marker-cluster-large { background-color: rgba(46,127,193,.28); }
.ep-map .marker-cluster-small div, .ep-map .marker-cluster-medium div, .ep-map .marker-cluster-large div { background-color: rgba(46,127,193,.9); color: #fff; font-weight: 800; }

/* eat-out map banner (harbour + market) */
.eat-banner { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 10px auto 0; padding: 10px 12px; border: 2px solid var(--sea); border-radius: 16px;
  background: var(--card); color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.eat-banner.slim { width: 100%; margin: 0 0 10px; }
.eb-map { position: relative; flex: none; width: 52px; height: 44px; border-radius: 10px; border: 2px solid var(--navy); overflow: hidden;
  background: linear-gradient(135deg, transparent 46%, #f5d9a8 46% 54%, transparent 54%), linear-gradient(25deg, transparent 58%, #ffffff 58% 64%, transparent 64%), #bfe3c9; }
.eb-map::after { content: ""; position: absolute; right: -8px; top: -8px; width: 26px; height: 26px; border-radius: 50%; background: #9fd3f2; }
.eb-pin { position: absolute; left: 50%; top: 45%; width: 18px; height: 18px; transform: translate(-50%, -60%) rotate(-45deg); border-radius: 50% 50% 50% 0;
  background: var(--cherry); border: 2px solid var(--navy); z-index: 1; }
.eb-pin::after { content: ""; position: absolute; left: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.eb-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eb-txt b { font-size: 1rem; color: var(--navy); }
.eb-txt .small { color: var(--muted); line-height: 1.3; }
.eb-go { flex: none; font-size: 1.6rem; font-weight: 800; color: var(--sea); line-height: 1; }

/* water today: a strip under the top bar on every page */
:root { --waterh: 40px; }
.waterbar { position: sticky; top: calc(var(--toph) + env(safe-area-inset-top, 0px)); z-index: 19; height: var(--waterh); display: flex; align-items: center; gap: 8px;
  padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); background: var(--sea-mist); border-bottom: 1px solid var(--line); }
html.in-claude .waterbar { top: calc(env(safe-area-inset-top, 0px) + var(--toph)); }
.wb-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--ink); font-weight: 800; font-size: .84rem; height: 100%; }
.wb-ic { flex: none; width: 22px; height: 22px; display: block; }
.wb-ic .art, .art { display: block; width: 100%; height: 100%; }
.wb-text { flex: none; white-space: nowrap; }
.wb-track { flex: 1; min-width: 40px; height: 10px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--sea-soft); overflow: hidden; }
.wb-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7cc6f0, var(--sea)); transition: width .4s ease; }
.waterbar.done .wb-track i { background: linear-gradient(90deg, #6fd3a3, var(--go)); }
.wb-add { flex: none; border: 0; border-radius: 999px; padding: 6px 12px; min-height: 30px; background: var(--sea-deep); color: #fff; font-weight: 800; font-size: .8rem; }
.hide-chrome .waterbar { display: none; }
.school-tools { top: calc(var(--toph) + var(--waterh) + env(safe-area-inset-top, 0px)); }

/* medicine type: pill pictures */
div.field { margin-bottom: 10px; font-weight: 700; font-size: .92rem; }
div.field > span:first-child { display: block; margin-bottom: 6px; }
.pill-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 9px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); min-height: 98px; }
.pp .art { width: 52px; height: 52px; }
.pp-l { font-weight: 800; font-size: .8rem; line-height: 1.15; text-align: center; }
.pp-s { font-weight: 600; font-size: .68rem; color: var(--muted); }
.pp.on { border-color: var(--sea); background: var(--sea-mist); box-shadow: 0 0 0 3px rgba(46,127,193,.18); }
.pp:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.med-art { width: 36px; height: 36px; flex: none; display: block; }
.list-item .em.med-art { width: 36px; height: 36px; }

/* notice board research groups */
.rs-group { margin-bottom: 10px; }
.rs-item { padding: 10px 0; border-top: 1px solid var(--line); }
.rs-group .row + .rs-item { margin-top: 8px; }
.rs-item b { display: block; line-height: 1.4; margin-bottom: 3px; }
.rs-more { margin-top: 6px; width: 100%; }

/* house-style icons (assets/icons): sized by where they sit */
.ic { display: inline-block; width: 1.3em; height: 1.3em; object-fit: contain; vertical-align: -0.3em; flex: none; }
.btn .ic, .chip .ic, .tag .ic, .pill .ic { width: 1.35em; height: 1.35em; margin-right: 2px; }
.tabbar button .ti .ic { width: 28px; height: 28px; vertical-align: middle; }
.place .pi .ic { width: 36px; height: 36px; vertical-align: middle; }
.list-item .em .ic, .shelf-item .em .ic, .food .em .ic { width: 34px; height: 34px; vertical-align: middle; }
.ep-emoji .ic { width: 32px; height: 32px; vertical-align: middle; }
.action .ai .ic { width: 40px; height: 40px; vertical-align: middle; }
.celebrate .em .ic { width: 84px; height: 84px; }
.stat b .ic { width: 34px; height: 34px; vertical-align: middle; }
.ms-ic .ic { width: 44px; height: 44px; }
.water button .ic { width: 20px; height: 20px; vertical-align: middle; }
.water button.full .ic { filter: brightness(1.15); }
.eb-map:has(.ic) { background: var(--sea-mist); display: grid; place-items: center; }
.eb-map:has(.ic)::after { display: none; }
.eb-map .ic { width: 40px; height: 40px; }
.ua-dot { display: inline-block; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--navy); vertical-align: middle; }
.ua-dot.ok { background: #6fb7e9; } .ua-dot.high { background: #f2a65a; }

/* eat out near you: location card, map first, compact filters */
.ep-locate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 2px solid var(--sea); }
.ep-loc-ic .ic { width: 44px; height: 44px; vertical-align: middle; }
.ep-loc-txt { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; }
.ep-loc-txt b { font-size: 1.02rem; color: var(--navy); }
.ep-loc-txt .small { color: var(--muted); line-height: 1.35; }
.ep-locate-btn { flex: 1 1 100%; }
.ep-map { height: 52vh; min-height: 300px; margin: 4px -4px 8px; }
.ep-tools { margin-bottom: 4px; }
.ep-tools .seg { flex: 1; }
.ep-filter-btn { flex: none; white-space: nowrap; }
.ep-filters { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.ep-venues { margin-top: 8px; }
.ep-pin-wrap { background: none; border: 0; }
.ep-pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid #8a94a6; box-shadow: 0 2px 4px rgba(31,42,68,.3); }
.ep-pin img { width: 24px; height: 24px; object-fit: contain; }
.ep-pin.s-open { border-color: #2f9e6e; } .ep-pin.s-soon { border-color: #e39b2d; } .ep-pin.s-shut { border-color: #d9534f; opacity: .8; }
.ep-me-wrap { background: none; border: 0; }
.ep-me { display: block; width: 22px; height: 22px; border-radius: 50%; background: #2e7fc1; border: 4px solid #fff; box-shadow: 0 0 0 2px rgba(46,127,193,.45), 0 2px 6px rgba(0,0,0,.3); animation: epPulse 2s ease-out infinite; }
@keyframes epPulse { 0% { box-shadow: 0 0 0 2px rgba(46,127,193,.45), 0 0 0 0 rgba(46,127,193,.45); } 100% { box-shadow: 0 0 0 2px rgba(46,127,193,.45), 0 0 0 16px rgba(46,127,193,0); } }
@media (prefers-reduced-motion: reduce) { .ep-me { animation: none; } }
.ep-locctl { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer; padding: 0; }
.ep-locctl .ic { width: 28px; height: 28px; }
.ep-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ep-dist { flex: none; font-weight: 800; font-size: .85rem; color: var(--sea-deep); background: var(--sea-mist); border-radius: 999px; padding: 1px 8px; }
.ep-main { flex: 1; }
.ep-picks { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.ep-pl { font-size: .74rem; color: var(--muted); }
.ep-pchips { display: flex; flex-wrap: wrap; gap: 4px; }
.ep-pchip { font-size: .78rem; font-weight: 700; color: #1c6e49; background: #e3f6ec; border-radius: 999px; padding: 2px 9px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ep-pchip { background: #173a2b; color: #8fe0b8; } :root:not([data-theme="light"]) .ep-pin, :root:not([data-theme="light"]) .ep-locctl { background: #f4f7fb; } }
:root[data-theme="dark"] .ep-pchip { background: #173a2b; color: #8fe0b8; }
.ep-picks.unchecked { font-size: .78rem; color: var(--muted); font-style: italic; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ep-dist { color: #a9d6ff; }
}
:root[data-theme="dark"] .ep-dist { color: #a9d6ff; }
