/* Same look as ck-wedding: neutral greys, one blue accent, white rounded cards. */
:root {
  --page: #eeeeef;
  --card: #ffffff;
  --chip: #f1f1f3;
  --ink: #141416;
  --soft: #5f6168;
  --line: #e7e7ea;
  --accent: #2f5bea;
  --accent-soft: #e8eeff;
  --err-ink: #b4321a;
  --err-bg: #fbecea;
}
* { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto; max-width: 600px; min-height: 100dvh;
  font: 16px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--page);
  padding: 0 env(safe-area-inset-right) calc(100px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
}
button {
  font: inherit; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  background: var(--ink); color: #fff; min-height: 44px;
}
button.ghost { background: var(--chip); color: var(--ink); }
button.danger { background: var(--err-bg); color: var(--err-ink); }
button.wide { width: 100%; margin-top: 10px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero: picture with the title over it, like ck-wedding. Swap in a photo at /img/hero.jpg to change it. */
.hero {
  position: relative; height: calc(300px + env(safe-area-inset-top)); margin-bottom: -24px;
  background: #3a4170 url("/img/hero.svg") center / cover no-repeat;
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 20, 40, .1) 0%, rgba(20, 20, 40, .1) 45%, rgba(20, 20, 40, .6) 100%); }
.hero-text { position: absolute; left: 22px; right: 22px; bottom: 44px; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
.hero h1 { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.hero .sub { margin-top: 8px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .95); }
.hero .countdown { margin-top: 2px; font-size: 15px; color: rgba(255, 255, 255, .9); }
.hero .countdown:empty { display: none; }
.hero-btn {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 2;
  background: rgba(255, 255, 255, .9); color: var(--ink); min-height: 44px; padding: 6px 18px; font-size: 16px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
body.editing .hero-btn { background: var(--accent); color: #fff; }
@media (min-width: 600px) { .hero { border-radius: 0 0 28px 28px; } }
.hero + .status, .hero ~ main { position: relative; }

.status { position: sticky; top: calc(88px + env(safe-area-inset-top)); z-index: 6; margin: 0 12px 10px; padding: 10px 14px; border-radius: 14px; background: var(--err-bg); color: var(--err-ink); font-size: 15px; }

/* Date tabs: sticky strip of days; also drop targets while dragging. */
.days {
  position: sticky; top: 0; z-index: 6; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; margin: 0 0 8px;
  background: rgba(238, 238, 239, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.days::-webkit-scrollbar { display: none; }
.daytab {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 0; width: 56px; min-height: 64px;
  padding: 6px 0; border-radius: 16px; background: #fff; color: var(--ink);
}
.daytab .wd { font-size: 13px; color: var(--soft); }
.daytab .dn { font-size: 20px; font-weight: 700; line-height: 1.2; }
.daytab .ct { font-size: 12px; color: var(--soft); min-height: 1em; }
.daytab[aria-current] { background: var(--ink); color: #fff; }
.daytab[aria-current] .wd, .daytab[aria-current] .ct { color: rgba(255, 255, 255, .75); }
.daytab.drop { background: var(--accent); color: #fff; transform: scale(1.06); }

main {
  position: relative; background: var(--card); margin: 0 12px; border-radius: 24px; padding: 16px 12px 14px;
  box-shadow: 0 10px 40px rgba(20, 20, 30, .06);
}
.day-title { margin: 0 4px 12px; font-size: 20px; }
.day-title .label { display: block; color: var(--soft); font-weight: 500; font-size: 16px; }
.ideas-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 4px 8px; }
.ideas-head h2 { margin: 0; font-size: 20px; }
.ideas-head select { font: inherit; font-size: 16px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 10px; color: var(--ink); max-width: 55%; }
.hint { color: var(--soft); font-size: 15px; margin: 8px 4px 0; }
.hint:empty { display: none; }
.group { margin: 14px 4px 2px; font-size: 15px; color: var(--soft); font-weight: 600; }
.group:first-child { margin-top: 0; }

.list { min-height: 52px; display: flex; flex-direction: column; gap: 6px; }
.empty { color: var(--soft); font-size: 16px; padding: 18px 10px; text-align: center; border: 1.5px dashed var(--line); border-radius: 16px; }

/* Timeline: time column, rail with dots, then the place. */
.timeline { gap: 0; }
.timeline .card { background: none; border-radius: 0; position: relative; }
.timeline .time { flex: none; width: 62px; padding: 12px 0 0 2px; font-size: 14px; font-weight: 600; color: var(--soft); text-align: right; }
.timeline .dot { flex: none; width: 28px; position: relative; }
.timeline .dot::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline .card:first-child .dot::before { top: 18px; }
.timeline .card:last-child .dot::before { bottom: calc(100% - 18px); }
.timeline .dot::after { content: ""; position: absolute; left: 8px; top: 13px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); background: #fff; }
.timeline .card-body { padding: 8px 6px 12px; }
.add { flex: none; align-self: center; min-height: 36px; padding: 4px 14px; margin-right: 2px; font-size: 15px; background: var(--accent-soft); color: var(--accent); }

/* Bottom tab bar */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; justify-content: center; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.tabs button {
  flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; color: var(--soft); border-radius: 14px; padding: 6px; font-size: 13px; font-weight: 600;
}
.tabs button[aria-current] { color: var(--accent); background: var(--accent-soft); }
.link { background: none; color: inherit; text-decoration: underline; padding: 0 4px; min-height: 0; font-weight: 600; }
.card { display: flex; align-items: stretch; background: var(--chip); border-radius: 16px; }
.card-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  background: none; color: var(--ink); border-radius: 16px; padding: 10px 14px; min-height: 52px;
}
.card .name { font-weight: 600; }
.card .meta { color: var(--soft); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grip {
  display: flex; align-items: center; justify-content: center; width: 48px; flex: none;
  color: var(--soft); fill: currentColor; touch-action: none; -webkit-touch-callout: none; cursor: grab; -webkit-user-select: none; user-select: none;
}
.card.placeholder { opacity: .35; outline: 2px dashed var(--accent); outline-offset: -2px; }
.ghost-card {
  position: fixed; z-index: 20; pointer-events: none; background: #fff;
  box-shadow: 0 12px 30px rgba(20, 20, 30, .22); transform: scale(1.03);
}
body.dragging { -webkit-user-select: none; user-select: none; overflow-anchor: none; }

dialog {
  border: 0; border-radius: 24px; padding: 20px; width: min(92vw, 520px); max-height: calc(100dvh - 32px); overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink);
}
dialog::backdrop { background: rgba(20, 20, 22, .35); }
dialog h3 { margin: 0 0 4px; font-size: 22px; }
dialog .area { margin: 0; color: var(--soft); }
dialog .note { white-space: pre-wrap; }
dialog .map { display: inline-block; margin: 4px 0 12px; color: var(--accent); font-weight: 600; }
dialog label { display: block; font-size: 15px; color: var(--soft); margin-top: 10px; }
dialog input, dialog textarea, dialog select {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
}
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
dialog .row .danger { margin-right: auto; }
.err { color: var(--err-ink); min-height: 1.2em; }

/* Photos, maps, directions, hotel */
.card.has-thumb { align-items: center; }
.thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; margin-left: 8px; background: var(--line); }
.timeline .thumb { order: 3; margin: 6px 0 6px 6px; width: 52px; height: 52px; }
.timeline .card-body { order: 2; flex: 1; }
.timeline .grip { order: 4; }
.photo { margin: -20px -20px 12px; }
.photo img { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 24px 24px 0 0; background: var(--line); }
.photo figcaption { font-size: 12px; color: var(--soft); padding: 4px 20px 0; }
.mapframe { display: block; width: 100%; height: 220px; border: 0; border-radius: 16px; margin: 8px 0 4px; background: var(--chip); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.btnlink {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px;
}
.btnlink.ghostlink { background: var(--accent-soft); color: var(--accent); }
.btnlink.small, button.small { min-height: 36px; padding: 4px 14px; font-size: 15px; }
.hotel { display: flex; align-items: center; gap: 8px; margin: -4px 4px 14px; padding: 10px 12px; border-radius: 16px; background: var(--chip); color: var(--soft); }
.hotel[hidden] { display: none; }
.hotel-name { flex: 1; min-width: 0; color: var(--ink); font-weight: 600; }
.links[hidden], .btnlink[hidden] { display: none; }

/* Schedule dialog */
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.slot-head { margin: 14px 0 4px; font-size: 15px; color: var(--soft); }
.slot-preview { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.slot-preview li { display: flex; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 15px; }
.slot-preview li:first-child { border-top: 0; }
.slot-preview .t { flex: none; width: 64px; color: var(--soft); text-align: right; }
.slot-preview li.new { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- Discover (Ideas) ---------- */
.discover { margin: 2px 4px 14px; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.search { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; padding: 0 14px; border-radius: 16px; background: var(--chip); color: var(--soft); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; padding: 13px 0; color: var(--ink); outline: none; }
.areatabs { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin: 0 2px 14px; padding-bottom: 2px; }
.areatabs::-webkit-scrollbar { display: none; }
.areatabs button { flex: none; background: none; color: var(--soft); padding: 4px 0; min-height: 36px; border-radius: 0; font-size: 16px; font-weight: 500; border-bottom: 2px solid transparent; }
.areatabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: #e0453a; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .empty { grid-column: 1 / -1; }
.pcard { position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 8px; background: #fff; }
.pcard-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; padding: 0; background: none; color: var(--ink); text-align: left; border-radius: 12px; }
.pcard .pbox { aspect-ratio: 1 / 1; border-radius: 12px; margin-bottom: 6px; }
.pcard .name { font-weight: 600; font-size: 15px; line-height: 1.25; padding: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .where { font-size: 14px; color: var(--soft); padding: 0 2px 2px 18px; position: relative; }
.pcard .where::before { content: ""; position: absolute; left: 2px; top: 5px; width: 9px; height: 9px; border: 2px solid var(--soft); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.fab { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--ink); font-size: 22px; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

/* Photo box with a colour fallback */
.pbox { position: relative; display: block; overflow: hidden; background: linear-gradient(135deg, #3a4170, #e59a8c); }
.pbox img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pbox.none::after { content: attr(data-label); position: absolute; left: 10px; bottom: 8px; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 6px rgba(0, 0, 0, .3); }
.thumb.pbox { flex: none; width: 52px; height: 52px; border-radius: 12px; }
.thumb.pbox.none::after { content: none; }

/* ---------- Details page ---------- */
dialog.page { width: 100%; max-width: 600px; height: 100dvh; max-height: 100dvh; margin: 0 auto; border-radius: 0; padding: calc(12px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { dialog.page { height: calc(100dvh - 40px); margin: 20px auto; border-radius: 28px; } }
.page-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-top h3 { flex: 1; min-width: 0; margin: 0; font-size: 22px; line-height: 1.2; }
.back { display: inline-flex; align-items: center; gap: 4px; flex: none; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 6px 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
dialog.page .photo { margin: 0 0 14px; }
dialog.page .photo .pbox { width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; }
dialog.page .photo .pbox.none::after { font-size: 20px; left: 16px; bottom: 14px; }
dialog.page .photo figcaption { font-size: 12px; color: var(--soft); padding: 6px 4px 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.tile { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tile .ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.tile small { display: block; font-size: 12px; color: var(--soft); }
.tile b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec { margin: 18px 2px 6px; font-size: 17px; }
dialog.page .note { margin: 0 2px; font-size: 16px; line-height: 1.55; color: #33353b; }
dialog.page .mapframe { height: 240px; border-radius: 20px; }
dialog.page .links { margin-top: 12px; }
dialog.page .btnlink:first-child { background: var(--ink); }

/* ---------- Floating dark tab bar ---------- */
.tabs { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(calc(100% - 48px), 360px); padding: 8px; border: 0; border-radius: 999px; background: #1d1e22; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.tabs button { flex-direction: row; justify-content: center; gap: 8px; color: rgba(255, 255, 255, .6); border-radius: 999px; padding: 10px; font-size: 15px; }
.tabs button[aria-current] { color: #fff; background: rgba(255, 255, 255, .14); }

/* ---------- Trip overview ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 2px 6px; }
.stat { background: var(--chip); border-radius: 16px; padding: 12px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 14px; color: var(--soft); }
.blist { display: flex; flex-direction: column; gap: 8px; }
.brow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; }
.brow input[type=checkbox] { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.btxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.btxt b { font-size: 16px; }
.bsub { font-size: 15px; color: var(--accent); font-weight: 600; }
.bdet { font-size: 15px; color: var(--soft); }
.days[hidden] { display: none; }
.tabs button span { font-size: 14px; }

/* ---------- Flight cards ---------- */
.flight { background: #1d1e22; color: #fff; border-radius: 24px; padding: 14px; }
.fhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 15px; color: rgba(255, 255, 255, .7); }
.fpill { background: #fff; color: #1d1e22; font-weight: 700; border-radius: 999px; padding: 4px 14px; }
.fbody { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: 18px; overflow: hidden; }
.fside { background: #2a2b31; padding: 14px; display: flex; flex-direction: column; }
.fside:last-of-type { text-align: right; }
.fside > b { font-size: 34px; font-weight: 500; letter-spacing: .02em; line-height: 1; }
.fcity { font-size: 14px; color: rgba(255, 255, 255, .75); margin-top: 4px; min-height: 1.2em; }
.ftime { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: rgba(255, 255, 255, .6); }
.ftime strong { color: #fff; font-weight: 600; }
.fside:last-of-type .ftime { flex-direction: row-reverse; }
.fplane { position: absolute; left: 50%; top: 28px; transform: translate(-50%, 0) rotate(90deg); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #1d1e22; color: #fff; }
.fnote { margin: 10px 4px 0; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* ---------- Place types ---------- */
:root { --k-see: #2f5bea; --k-food: #e0453a; --k-shop: #b0590f; --k-trip: #2e7d4f; --k-move: #5f6168; --k-stay: #7a3fb0; }
.kindtabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 2px 12px; }
.kindtabs::-webkit-scrollbar { display: none; }
.kindtabs button { flex: none; min-height: 40px; padding: 6px 16px; border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 15px; font-weight: 600; }
.kindtabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.ktag { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 12px; font-weight: 700; color: var(--k-see); }
.ktag.k-food { color: var(--k-food); } .ktag.k-shop { color: var(--k-shop); } .ktag.k-trip { color: var(--k-trip); }
.pbox.none .ktag + * { display: none; }
.timeline .dot.k-food::after { border-color: var(--k-food); background: var(--k-food); }
.timeline .dot.k-shop::after { border-color: var(--k-shop); background: var(--k-shop); }
.timeline .dot.k-trip::after { border-color: var(--k-trip); background: var(--k-trip); }
.timeline .dot.k-move::after { border-color: var(--k-move); background: #fff; border-style: dashed; }
.timeline .dot.k-stay::after { border-color: var(--k-stay); background: var(--k-stay); }
.timeline .dot.k-see::after { background: var(--k-see); }

/* ---------- White mode: light flight cards and tab bar ---------- */
.flight { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(20, 20, 30, .06); }
.fhead { color: var(--soft); }
.fpill { background: var(--ink); color: #fff; }
.fbody { gap: 0; border: 1px solid var(--line); }
.fside { background: #fafafb; }
.fside:first-of-type { border-right: 1px solid var(--line); }
.fcity { color: var(--soft); }
.ftime { color: var(--soft); border-top-color: var(--line); }
.ftime strong { color: var(--ink); }
.fplane { background: #fff; color: var(--accent); border: 1px solid var(--line); }
.fnote { color: var(--soft); }
.tabs { background: rgba(255, 255, 255, .96); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(20, 20, 30, .12); }
.tabs button { color: var(--soft); }
.tabs button[aria-current] { color: #fff; background: var(--ink); }
dialog.page .btnlink:first-child { background: var(--accent); }

/* ---------- Add to plan + calendar pop-up ---------- */
.planbtn { width: 100%; margin: 14px 0 2px; min-height: 52px; font-size: 17px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 16px; }
dialog.cal { width: 100%; max-width: 600px; height: 100dvh; max-height: 100dvh; margin: 0 auto; border-radius: 0; padding: calc(12px + env(safe-area-inset-top)) 16px 0; display: none; }
dialog.cal[open] { display: flex; flex-direction: column; }
dialog.cal form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
@media (min-width: 640px) { dialog.cal { height: calc(100dvh - 40px); margin: 20px auto; border-radius: 28px; } }
.cal-place { margin: -4px 2px 10px; font-size: 18px; font-weight: 700; }
.cal-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.cal-days::-webkit-scrollbar { display: none; }
.cal-days .daytab { background: var(--chip); }
.cal-days .daytab[aria-current] { background: var(--ink); }
.cal-day { margin: 10px 2px 6px; font-weight: 600; color: var(--soft); }
.cal-hours { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--line); }
.cal-hours li { display: flex; gap: 10px; border-bottom: 1px solid var(--line); min-height: 52px; }
.cal-hours .h { flex: none; width: 58px; padding-top: 8px; font-size: 14px; color: var(--soft); text-align: right; }
.cal-hours .cell { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px 0; }
.cal-hours .ev { padding: 6px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--accent-soft); color: var(--k-see); border-left: 4px solid currentColor; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hours .ev.k-food { background: #fdeceb; color: var(--k-food); }
.cal-hours .ev.k-shop { background: #fbf0e4; color: var(--k-shop); }
.cal-hours .ev.k-trip { background: #e7f4ec; color: var(--k-trip); }
.cal-hours .ev.k-move { background: var(--chip); color: var(--k-move); }
.cal-hours .ev.k-stay { background: #f2eafa; color: var(--k-stay); }
.cal-hours .ev.new { background: var(--ink); color: #fff; border-left-color: var(--ink); }
.cal-hours .free { width: 100%; min-height: 38px; padding: 6px 10px; border-radius: 10px; background: none; border: 1.5px dashed var(--line); color: var(--soft); font-size: 14px; text-align: left; }
.cal-hours .free:hover, .cal-hours .free:focus-visible { border-color: var(--accent); color: var(--accent); }
.cal-hours li.picked { background: #f6f7fb; }
.cal-exact { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 2px; font-size: 15px; color: var(--soft); }
.cal-exact input { font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.cal-bar { display: flex; align-items: center; gap: 12px; padding: 12px 2px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.cal-bar span { flex: 1; font-weight: 600; }
.cal-bar button { min-width: 120px; min-height: 50px; font-size: 17px; font-weight: 700; background: var(--accent); }

/* ---------- Live data ---------- */
.live { font-size: 12px; font-weight: 700; color: #2e7d4f; background: #e7f4ec; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.wx { margin: -6px 4px 12px; font-size: 15px; color: var(--soft); }
.wx:empty { display: none; }
.wxstrip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.wxstrip::-webkit-scrollbar { display: none; }
.wxday { flex: none; width: 92px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--soft); }
.wxday b { font-size: 14px; color: var(--ink); }
.wxday .wxt { font-size: 18px; font-weight: 700; color: var(--ink); }
.fx { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.fx-rate { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.fx-conv { display: flex; align-items: flex-end; gap: 8px; }
.fx-conv label { flex: 1; font-size: 14px; color: var(--soft); }
.fx-conv input { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 18px; font-weight: 600; border: 1px solid var(--line); border-radius: 12px; padding: 10px; color: var(--ink); }
.fx-conv span { padding-bottom: 12px; font-weight: 700; color: var(--soft); }
.ftrack { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--soft); }

/* ---------- Normal-app layout: app bar, Trip rows, bottom sheet ---------- */
.hero[hidden], .appbar[hidden] { display: none; }
.hero { height: calc(230px + env(safe-area-inset-top)); }
.appbar {
  position: sticky; top: 0; z-index: 7; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 6px; background: rgba(238, 238, 239, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.appbar h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.appbar + .days { top: calc(56px + env(safe-area-inset-top)); padding-top: 4px; }
body:has(.appbar:not([hidden])) main { margin-top: 0; }
.sec.first { margin-top: 2px; }
.nextcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 20px; background: var(--ink); color: #fff; text-align: left; }
.nextcard .nthumb { flex: none; width: 64px; height: 64px; border-radius: 14px; }
.nextcard .nthumb .ktag, .nextcard .nthumb.none::after { display: none; }
.ntxt { display: flex; flex-direction: column; min-width: 0; }
.ntxt small { font-size: 14px; color: rgba(255, 255, 255, .7); }
.ntxt b { font-size: 17px; line-height: 1.25; }
.ntxt span { font-size: 14px; color: #9db4ff; margin-top: 2px; }
.qtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.qtile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 18px; background: var(--chip); color: var(--ink); text-align: left; }
.qtile small { font-size: 14px; color: var(--soft); }
.qtile b { font-size: 20px; }
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.rrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; background: #fff; color: var(--ink); text-align: left; border-radius: 0; border-top: 1px solid var(--line); font-weight: 400; }
.rrow:first-child { border-top: 0; }
.rtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rtxt b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtxt span { font-size: 14px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--soft); display: flex; }
.rcheck { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.rrow.done .rtxt b { text-decoration: line-through; color: var(--soft); }
.rows .empty { border: 0; }
dialog.bsheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 600px; max-height: 85dvh; margin: 0 auto;
  border-radius: 24px 24px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto;
}
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.bs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bs-head h3 { margin: 0; font-size: 19px; }
.bs-text { margin: 0 0 10px; font-size: 16px; line-height: 1.5; }
#infoBody .btnlink { margin: 6px 6px 0 0; }
#infoBody .wxday { width: 96px; }

/* Hero photo: Tokyo skyline (Wikimedia Commons, Skyscrapers of Shinjuku), drawing as fallback */
.hero {
  background-image: url("https://thumb.wikimedia.org/wikipedia/commons/thumb/b/b2/Skyscrapers_of_Shinjuku_2009_January.jpg/1280px-Skyscrapers_of_Shinjuku_2009_January.jpg"), url("/img/hero.svg");
  background-position: center 40%, center; background-size: cover, cover;
}
.hero-credit { position: absolute; right: 10px; bottom: 30px; z-index: 1; font-size: 10px; color: rgba(255, 255, 255, .7); }

/* ---------- Explore (Ideas) ---------- */
.lead { margin: 0 4px 14px; font-size: 16px; color: var(--soft); }
.cattiles { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 4px; padding: 2px; }
.cattiles::-webkit-scrollbar { display: none; }
.cat {
  flex: none; width: 112px; min-height: 96px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  gap: 6px; padding: 12px; border-radius: 18px; text-align: left; color: #20232b; border: 2px solid transparent;
}
.cat b { font-size: 15px; } .cat small { font-size: 12px; opacity: .75; margin-top: -6px; }
.cat.c-all { background: #dfe7f7; } .cat.c-see { background: #dbe6ff; } .cat.c-food { background: #fde3df; }
.cat.c-shop { background: #f8e9d6; } .cat.c-trip { background: #dcefe3; }
.cat[aria-selected="true"] { border-color: #20232b; }
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -2px; padding: 2px 2px 6px; }
.carousel::-webkit-scrollbar { display: none; }
.rec { flex: none; width: 240px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; background: none; color: var(--ink); text-align: left; border-radius: 0; }
.rec .pbox { width: 240px; height: 170px; border-radius: 20px; margin-bottom: 6px; box-shadow: 0 8px 20px rgba(20, 20, 30, .12); }
.rec .ktag { display: none; }
.rec b { font-size: 16px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.rec .where { font-size: 14px; color: var(--soft); padding-left: 16px; position: relative; }
.rec .where::before { content: ""; position: absolute; left: 1px; top: 5px; width: 8px; height: 8px; border: 2px solid var(--soft); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.kindtabs { display: none; }

/* ---------- Details page: full-bleed photo, back button over it ---------- */
dialog.page { padding-top: 0; }
dialog.page form { position: relative; }
dialog.page .page-top { position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); left: 0; margin: 0; }
dialog.page .back { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 0; }
dialog.page .back svg { width: 22px; height: 22px; }
dialog.page .photo { margin: 0 -18px 14px; }
dialog.page .photo .pbox { aspect-ratio: auto; height: calc(320px + env(safe-area-inset-top)); border-radius: 0 0 28px 28px; }
@media (min-width: 640px) { dialog.page .photo .pbox { border-radius: 28px 28px 28px 28px; } }
.ploc { margin: 0 2px; font-size: 14px; color: var(--soft); padding-left: 16px; position: relative; }
.ploc::before { content: ""; position: absolute; left: 1px; top: 5px; width: 8px; height: 8px; border: 2px solid var(--soft); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.ptitle { margin: 2px 2px 14px; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
dialog.page .photo img { max-height: none; height: 100%; border-radius: 0; }

/* ---------- Fewer words on the place page ---------- */
.psum { margin: 0 2px 14px; font-size: 16px; line-height: 1.45; color: #3a3d45; }
.psum:empty { display: none; }
.pacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pacts[hidden] { display: none; }
.pact {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 72px;
  border-radius: 18px; background: var(--chip); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px;
}
#infoBody .mapframe { height: 300px; }
.timeline .thumb.pbox { width: 64px; height: 64px; border-radius: 14px; }

/* ---------- Animated trip header ---------- */
.hero { position: relative; overflow: hidden; height: calc(300px + env(safe-area-inset-top)); background: #2b3157; }
.hero-bg {
  position: absolute; inset: -4%;
  background: url("https://thumb.wikimedia.org/wikipedia/commons/thumb/b/b2/Skyscrapers_of_Shinjuku_2009_January.jpg/1280px-Skyscrapers_of_Shinjuku_2009_January.jpg") center 40% / cover no-repeat, url("/img/hero.svg") center / cover;
  animation: kenburns 24s ease-in-out infinite alternate;
}
.hero-shade { background: linear-gradient(180deg, rgba(12, 14, 30, .45) 0%, rgba(12, 14, 30, .05) 35%, rgba(12, 14, 30, .25) 60%, rgba(12, 14, 30, .78) 100%); }
.hero-top {
  position: absolute; z-index: 2; left: 18px; right: 18px; top: calc(14px + env(safe-area-inset-top));
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.hero-tag, .wxchip, .hpill, .hero .countdown {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.hero-tag { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.wxchip b { font-size: 16px; }
.wxchip span { font-weight: 500; opacity: .9; }
.wxchip[hidden] { display: none; }
.hero-text { z-index: 2; bottom: 46px; }
.hero h1 { font-size: 46px; letter-spacing: -.03em; }
.hero .sub { margin-top: 4px; font-size: 16px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero .countdown { margin-top: 0; }
.hero .countdown:empty { display: none; }
.hero-credit { z-index: 2; bottom: 32px; }
.hero h1, .hero .sub, .hero-pills, .hero-top { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero .sub { animation-delay: .1s; } .hero-pills { animation-delay: .2s; } .hero-top { animation-delay: .3s; }
.wxchip:not([hidden]) { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -1%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-bg, .hero h1, .hero .sub, .hero-pills, .hero-top, .wxchip { animation: none; } }

/* Inter everywhere (loaded from Google Fonts in index.html) */
body, button, input, select, textarea, dialog { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- No black fills: blue for main actions, soft blue for selected ---------- */
button { background: var(--accent); }
.daytab[aria-current], .cal-days .daytab[aria-current] { background: var(--accent); color: #fff; }
.daytab[aria-current] .wd, .daytab[aria-current] .ct { color: rgba(255, 255, 255, .85); }
.tabs button[aria-current] { background: var(--accent-soft); color: var(--accent); }
.planbtn, dialog.page .btnlink:first-child { background: var(--accent); color: #fff; }
.fpill { background: var(--accent-soft); color: var(--accent); }
.cal-hours .ev.new { background: var(--accent); color: #fff; border-left-color: var(--accent); }
.nextcard { background: linear-gradient(135deg, #2f5bea, #5b7ff0); color: #fff; }
.ntxt span { color: rgba(255, 255, 255, .9); text-decoration: underline; }
.cat[aria-selected="true"] { border-color: var(--accent); }
.kindtabs button[aria-selected="true"] { background: var(--accent); }

/* ---------- iOS theme: system font and iOS system colours (no web fonts) ---------- */
:root {
  --page: #f2f2f7; --card: #ffffff; --chip: #f2f2f7; --ink: #1c1c1e; --soft: #8e8e93; --line: #e5e5ea;
  --accent: #007aff; --accent-soft: #e5f1ff; --err-ink: #ff3b30; --err-bg: #ffeceb;
  --k-see: #007aff; --k-food: #ff3b30; --k-shop: #ff9500; --k-trip: #34c759; --k-move: #8e8e93; --k-stay: #af52de;
}
body, button, input, select, textarea, dialog {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html, body, .appbar, .days { background-color: var(--page); }
.appbar, .days { background: rgba(242, 242, 247, .92); }
.appbar h1 { font-size: 34px; font-weight: 700; letter-spacing: .01em; }
.sec { font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; color: var(--soft); margin: 22px 16px 6px; }
.rows { border: 0; border-radius: 12px; background: #fff; }
.rrow { min-height: 54px; padding: 8px 14px; border-top: 0; position: relative; }
.rrow + .rrow::before { content: ""; position: absolute; top: 0; right: 0; left: 58px; border-top: .5px solid #c6c6c8; }
.rrow .rtxt b { font-size: 17px; font-weight: 400; }
.rrow .rtxt span { font-size: 15px; }
.chev { color: #c4c4c7; }
.qtile, .cat, .pact { border-radius: 14px; }
main { border-radius: 0; box-shadow: none; background: transparent; padding: 12px 12px 14px; margin: 0; }
.nextcard { background: linear-gradient(135deg, #007aff, #5ac8fa); }
.planbtn { border-radius: 14px; }
.daytab { border-radius: 14px; }
.tabs { border-radius: 22px; }

/* iOS Settings-style icon tiles on rows */
.ricon { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.ricon svg { width: 19px; height: 19px; }
.ricon.flight { background: #ff9500; } .ricon.bus { background: #34c759; } .ricon.train { background: #5856d6; }
.ricon.stay { background: #af52de; } .ricon.walk { background: #007aff; }

/* ---------- Trip tab: sideways scrolling cards ---------- */
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px 6px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .empty { flex: 1; }
.tcard {
  flex: none; width: 168px; min-height: 128px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 12px; border-radius: 16px; background: #fff; color: var(--ink); text-align: left; font-weight: 400;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
}
.tc-top { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 6px; }
.tc-top small { font-size: 13px; font-weight: 600; color: var(--soft); }
.tcard b { font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard > span { font-size: 14px; color: var(--soft); margin-top: auto; }
.tcard.done b { text-decoration: line-through; color: var(--soft); }
.tcard .rcheck { width: 24px; height: 24px; }

/* ---------- Near you ---------- */
.locbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 16px; font-weight: 600; }
.ncard { flex: none; width: 150px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; background: none; color: var(--ink); text-align: left; border-radius: 0; font-weight: 400; }
.ncard .pbox { width: 150px; height: 112px; border-radius: 14px; margin-bottom: 6px; }
.ncard .ktag { display: none; }
.ncard b { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ncard span { font-size: 13px; color: var(--accent); font-weight: 600; }
.cat.c-near { background: #dff3ff; }

/* ---------- Minimal dashboard ---------- */
.hero .hpill, .hero .wxchip { cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; min-height: 34px; }
.hero .wxchip { padding: 6px 12px; }
#tripView .sec.first { margin-top: 6px; }
#tripView .hscroll { margin-bottom: 4px; }
.flight-row .tcard { width: 200px; }

/* ---------- Flight summary card (both flights in one card) ---------- */
.fsum { background: #fff; border-radius: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .06); overflow: hidden; }
.fleg { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 16px; background: #fff; color: var(--ink); text-align: left; border-radius: 0; font-weight: 400; }
.fleg + .fleg { border-top: 1px solid var(--line); }
.fend { display: flex; flex-direction: column; min-width: 0; }
.fend.right { text-align: right; align-items: flex-end; }
.fend b { font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fcity2 { font-size: 15px; font-weight: 600; margin-top: 4px; }
.fend small { font-size: 13px; color: var(--soft); }
.fmid { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0 2px; }
.fmid-top { display: flex; align-items: center; justify-content: space-between; color: var(--soft); }
.fmid-top small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fline { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 0 30%, #d6e6ff 30% 70%, var(--accent) 70% 100%); }
.fcodes { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--soft); letter-spacing: .04em; }
.fhead2 { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.alogo { height: 22px; width: auto; max-width: 70px; object-fit: contain; }
.fnum { flex: 1; min-width: 0; font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdir { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- Spacing system: 20px gutters, 28px between sections ---------- */
:root { --gutter: 20px; }
main { padding: 8px var(--gutter) 24px; }
.sec { margin: 28px 2px 12px; }
.sec.first, #tripView .sec.first { margin-top: 20px; }
.hscroll { margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; gap: 12px; scroll-padding: 0 var(--gutter); }
.appbar { padding-left: var(--gutter); padding-right: var(--gutter); }
.days { padding-left: var(--gutter); padding-right: var(--gutter); gap: 8px; }
.hero-text { left: var(--gutter); right: var(--gutter); }
.hero-top { left: var(--gutter); right: var(--gutter); }
.fleg { padding: 18px; }
.grid { gap: 14px; }
.cattiles { gap: 12px; }
.carousel { gap: 14px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scroll-padding: 0 var(--gutter); }
#tripView .hscroll { margin-bottom: 0; }

/* ---------- Upgraded cards ---------- */
.xcard, .scard, .bcard {
  flex: none; scroll-snap-align: start; background: #fff; color: var(--ink); text-align: left; font-weight: 400;
  border-radius: 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 18px rgba(0, 0, 0, .06);
}
/* bus / train */
.xcard { width: 220px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.xc-top { display: flex; align-items: center; gap: 8px; }
.xc-top small { font-size: 13px; font-weight: 600; color: var(--soft); }
.xc-times { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.xc-route { font-size: 15px; color: var(--soft); }
/* hotels */
.scard { width: 250px; overflow: hidden; display: flex; flex-direction: column; }
.sc-band { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: linear-gradient(135deg, #e9e4ff, #dbe8ff); }
.sc-band.lake { background: linear-gradient(135deg, #dff5ea, #dcecff); }
.sc-band .ricon { width: 36px; height: 36px; border-radius: 10px; }
.sc-badge { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink); }
.sc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px 16px; }
.sc-body b { font-size: 17px; line-height: 1.25; }
.sc-body span { font-size: 14px; color: var(--soft); }
.sc-body .btnlink { margin-top: 8px; min-height: 36px; padding: 6px 14px; font-size: 14px; }
/* to book */
.bcard { width: 200px; padding: 14px; display: flex; align-items: flex-start; gap: 12px; }
.bc-check { flex: none; appearance: none; -webkit-appearance: none; width: 26px; height: 26px; margin: 2px 0 0; border-radius: 50%; border: 2px solid #c7c7cc; display: grid; place-items: center; cursor: pointer; }
.bc-check:checked { background: #34c759; border-color: #34c759; }
.bc-check:checked::after { content: ""; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.bc-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; background: none; color: var(--ink); text-align: left; border-radius: 0; font-weight: 400; min-height: 0; }
.bc-open b { font-size: 16px; line-height: 1.25; }
.bc-open span { font-size: 14px; color: var(--soft); }
.bc-status { margin-top: 6px; font-size: 12px; font-weight: 700; color: #ff9500; }
.bcard.done .bc-status { color: #34c759; }
.bcard.done b { color: var(--soft); text-decoration: line-through; }

/* Hotel card photo header + exact left alignment of section titles with cards */
.sc-band.photo { position: relative; height: 128px; align-items: flex-start; background: #dfe7f3; }
.sc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-band.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 55%); }
.sc-band.photo .ricon, .sc-band.photo .sc-badge { position: relative; z-index: 1; }
.sc-band.photo .ricon { display: none; }
.sc-band.photo { justify-content: flex-end; }
.sec, .sec.first, #tripView .sec.first { margin-left: 0; margin-right: 0; }
.hscroll > :last-child { margin-right: 0; }
.hscroll::after { content: ""; flex: none; width: 1px; }

/* ---------- Date wheel ---------- */
.wheel-head { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 6; display: flex; align-items: center; justify-content: space-between; padding: 2px var(--gutter) 0; background: rgba(242, 242, 247, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.wheel-head[hidden] { display: none; }
#wheelMonth { font-size: 15px; font-weight: 600; color: var(--soft); }
.wheel-head + .days { top: calc(92px + env(safe-area-inset-top)); }
.days.wheel { scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-left: calc(50% - 32px); padding-right: calc(50% - 32px); }
.days.wheel .daytab { scroll-snap-align: center; width: 64px; min-height: 76px; border-radius: 18px; background: #fff; transition: transform .25s cubic-bezier(.2, .7, .2, 1), background .2s, box-shadow .2s; }
.days.wheel .daytab[aria-current] { transform: scale(1.1); background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(0, 122, 255, .3); }
.days.wheel .daytab .dn { font-size: 22px; }
.days.wheel.mini { position: static; padding: 6px calc(50% - 30px) 10px; margin: 6px -18px 0; background: none; }
.days.wheel.mini .daytab { width: 60px; min-height: 60px; background: var(--chip); }

/* ---------- Live status card ---------- */
.live { background: #fff; border-radius: 22px; padding: 16px; margin: 4px 0 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .07); }
.live h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.live-head { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 0 rgba(52, 199, 89, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }
.live-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 0; background: none; color: var(--ink); text-align: left; font-weight: 400; border-radius: 0; min-height: 0; }
.live-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.live-txt b { font-size: 17px; }
.live-txt span { font-size: 14px; color: var(--soft); }
.live-go { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 6px 14px rgba(0, 122, 255, .35); }
.live-up { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.live-up small { font-size: 13px; color: var(--soft); }
.live-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.live-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 0 0 10px; border-left: 3px solid; background: none; color: var(--ink); text-align: left; border-radius: 0; font-weight: 400; min-height: 0; }
.live-col b { font-size: 15px; line-height: 1.25; }
.live-col span { font-size: 13px; color: var(--soft); }
.ev-av.big { width: 52px; height: 52px; font-size: 20px; }

/* ---------- Day time grid ---------- */
.untimed { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.untimed:empty { display: none; }
.ut { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 14px; font-weight: 600; min-height: 36px; }
.ut .ev-av { width: 28px; height: 28px; font-size: 12px; }
.dgrid { position: relative; margin: 4px 0 8px; }
.hr { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.hr span { position: absolute; left: 0; top: -9px; width: 50px; font-size: 12px; color: var(--soft); background: var(--page); padding-right: 6px; text-align: right; }
.hr-add { position: absolute; left: 58px; right: 0; top: 0; height: 66px; background: none; border-radius: 12px; min-height: 0; padding: 0; }
.hr-add:hover, .hr-add:focus-visible { background: rgba(0, 122, 255, .06); }
.ev {
  position: absolute; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 18px; overflow: hidden;
  text-align: left; font-weight: 400; min-height: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: transform .15s;
}
.ev:active { transform: scale(.98); }
.ev-av { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; background: #ccc; }
.ev-av img { width: 100%; height: 100%; object-fit: cover; }
.ev-txt { min-width: 0; display: flex; flex-direction: column; }
.ev-txt b { font-size: 15px; line-height: 1.2; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-txt small { font-size: 12px; font-weight: 600; margin-top: 2px; }
.nowline { position: absolute; left: 52px; right: 0; height: 2px; background: #ff3b30; z-index: 3; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; }
.nowline[hidden] { display: none; }

/* ---------- Edit stop sheet ---------- */
.editform label { display: block; font-size: 14px; color: var(--soft); margin-top: 12px; }
.editform input, .editform select, .editform textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; }
.editform input[type=time] { font-size: 20px; font-weight: 600; }
.editform .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.editform .row .danger { margin-right: auto; }
.ev.est { opacity: .92; border: 1.5px dashed rgba(0, 0, 0, .12); }

/* Date wheel: solid sticky header with a soft divider, days fade out at both edges instead of being cut */
.wheel-head, .days.wheel:not(.mini) { background: var(--page); -webkit-backdrop-filter: none; backdrop-filter: none; }
.days.wheel:not(.mini) {
  padding-top: 10px; padding-bottom: 12px; box-shadow: 0 1px 0 var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}
.days.wheel.mini { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 85%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 15%, #000 85%, transparent 100%); }
.appbar { background: var(--page); -webkit-backdrop-filter: none; backdrop-filter: none; }
#planView { padding-top: 6px; }
.wheel-wrap { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 6; background: var(--page); box-shadow: 0 1px 0 var(--line), 0 6px 12px -8px rgba(0, 0, 0, .12); }
.wheel-wrap[hidden] { display: none; }
.wheel-wrap .wheel-head, .wheel-wrap .days.wheel { position: static; box-shadow: none; background: none; }

/* ---------- Section headers: bold iOS-style titles ---------- */
.sec, #tripView .sec, #ideasView .sec, dialog .sec {
  font-size: 21px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--ink);
  margin: 30px 0 12px; line-height: 1.2;
}
.sec.first, #tripView .sec.first { margin-top: 22px; }
dialog .sec { font-size: 18px; margin: 20px 0 8px; }
.day-title { font-size: 22px; letter-spacing: -.01em; }
.day-title .label { font-size: 16px; margin-top: 2px; }
@media (max-width: 360px) {
  .fleg { gap: 6px; padding: 14px; }
  .fend b { font-size: 24px; }
  .fmid-top small { display: none; }
  .fnum { font-size: 12px; }
}

/* ---------- Motion pass (emil-design-eng review) ---------- */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
* { -webkit-tap-highlight-color: transparent; }

/* Press feedback on everything tappable */
button, .btnlink, .pact, a.live-go {
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
button:active, .btnlink:active, .pact:active, a.live-go:active { transform: scale(0.97); }
.ev { transition: transform 160ms var(--ease-out); }
.ev:active { transform: scale(0.98); }
.days.wheel .daytab[aria-current]:active { transform: scale(1.06); }

/* Sheets slide up from the bottom; pages rise slightly; backdrop fades. Exit is instant (fast). */
dialog.bsheet[open] {
  transition: transform 320ms var(--ease-drawer), opacity 200ms ease;
  @starting-style { transform: translateY(100%); opacity: 1; }
}
dialog.page[open], dialog.cal[open], #slotDlg[open], #sheet[open] {
  transition: transform 280ms var(--ease-out), opacity 220ms ease;
  @starting-style { transform: translateY(24px); opacity: 0; }
}
dialog[open]::backdrop {
  transition: opacity 240ms ease;
  @starting-style { opacity: 0; }
}

/* Hero: tighter, first-view only */
.hero h1, .hero .sub, .hero-pills, .hero-top { animation: rise 480ms var(--ease-out) both; }
.hero .sub { animation-delay: 60ms; } .hero-pills { animation-delay: 120ms; } .hero-top { animation-delay: 180ms; }
.wxchip:not([hidden]) { animation: rise 360ms var(--ease-out) both; }

/* Date wheel: one curve, exact properties */
.days.wheel .daytab { transition: transform 220ms var(--ease-out), background-color 160ms ease, color 160ms ease, box-shadow 220ms var(--ease-out); }

/* Live dot: ring pulse on transform + opacity only */
.live-dot { position: relative; animation: none; box-shadow: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34c759; animation: ring 1.8s var(--ease-out) infinite; }
@keyframes ring { from { transform: scale(1); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }

/* Hover only where a real pointer exists */
.cal-hours .free:hover, .hr-add:hover { border-color: inherit; color: inherit; background: none; }
@media (hover: hover) and (pointer: fine) {
  .cal-hours .free:hover { border-color: var(--accent); color: var(--accent); }
  .hr-add:hover { background: rgba(0, 122, 255, .06); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg, .live-dot::after { animation: none; }
  dialog.bsheet[open], dialog.page[open], dialog.cal[open], #slotDlg[open], #sheet[open] { transition: opacity 200ms ease; @starting-style { transform: none; opacity: 0; } }
  .days.wheel .daytab[aria-current] { transform: none; }
  button:active, .btnlink:active, .pact:active { transform: none; }
}
/* Leave a strip of dimmed background around full-height pop-ups so there is somewhere to tap out */
dialog.page, dialog.cal { height: calc(100dvh - 48px - env(safe-area-inset-top)); max-height: calc(100dvh - 48px - env(safe-area-inset-top)); margin: calc(48px + env(safe-area-inset-top)) auto 0; border-radius: 24px 24px 0 0; }
dialog::backdrop { background: rgba(20, 20, 22, .4); }

/* ---------- Apple Maps / Google Maps buttons ---------- */
.maprow, #sheetLinks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dirblock { margin-bottom: 16px; }
.dirblock small { display: block; font-size: 14px; color: var(--soft); margin: 0 2px 8px; }
.mapapp {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 12px;
  border-radius: 14px; text-decoration: none; font-size: 16px; font-weight: 600;
  transition: transform 160ms var(--ease-out);
}
.mapapp:active { transform: scale(0.97); }
.mapapp.apple { background: #f2f2f7; color: #1c1c1e; border: 1px solid var(--line); }
.mapapp.google { background: #fff; color: #1f1f1f; border: 1px solid var(--line); }
.mapapp-ic { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.mapapp.apple .mapapp-ic { background: linear-gradient(135deg, #5ac8fa 0 45%, #34c759 45% 70%, #ffcc00 70%); }
.mapapp.google .mapapp-ic { background: conic-gradient(#ea4335 0 25%, #fbbc04 0 50%, #34a853 0 75%, #4285f4 0); border-radius: 50%; }

/* ---------- Apple-style bottom sheet ---------- */
dialog.bsheet {
  background: #f2f2f7; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0;
  max-height: 88dvh; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); overscroll-behavior: contain;
}
.bs-drag { position: sticky; top: 0; z-index: 2; margin: 0 -16px 8px; padding: 6px 16px 4px; background: #f2f2f7; touch-action: none; cursor: grab; }
.bs-drag .grab { width: 36px; height: 5px; border-radius: 3px; background: #c7c7cc; margin: 0 auto 6px; }
.bs-head { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; min-height: 40px; margin: 0; }
.bs-head h3 { margin: 0; font-size: 17px; font-weight: 600; text-align: center; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-done { justify-self: end; background: none; color: var(--accent); font-size: 17px; font-weight: 600; padding: 8px 0 8px 8px; min-height: 44px; border-radius: 0; }

/* Content: white rounded groups like iOS Settings */
#infoBody > .bs-text, #infoBody > .note { background: #fff; border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--ink); }
#infoBody > .bs-text + .bs-text { margin-top: -6px; }
.bs-group, #sheetLinks { background: #fff; border-radius: 12px; overflow: hidden; margin: 0 0 12px; display: block; }
.dirblock small { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: #6d6d72; margin: 6px 16px 6px; }
.maprowlink { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; color: var(--ink); text-decoration: none; transition: background-color 120ms ease; }
.maprowlink + .maprowlink::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; border-top: .5px solid #c6c6c8; }
.maprowlink:active { background: #e5e5ea; transform: none; }
.appicon { width: 30px; height: 30px; border-radius: 7px; flex: none; object-fit: cover; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); }
.appicon.google { padding: 3px; }
.ml-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ml-txt b { font-size: 17px; font-weight: 400; }
.ml-txt small { font-size: 13px; color: var(--soft); }
.maprowlink .chev { color: #c4c4c7; }
#infoBody .mapframe { border-radius: 12px; margin: 0 0 12px; height: 280px; }
#infoBody .wxstrip { margin: 0 -16px 12px; padding: 0 16px 4px; }
#infoBody .wxday { background: #fff; border: 0; }
#infoBody .fx { background: #fff; border: 0; border-radius: 12px; }
#infoBody .flight { box-shadow: none; border: 0; }
#infoBody > .btnlink { display: flex; justify-content: center; width: 100%; margin: 0 0 10px; min-height: 50px; border-radius: 12px; font-size: 17px; }

/* Edit form as grouped rows */
.editform { background: none; }
.editform label { background: #fff; margin: 0; padding: 10px 16px; font-size: 13px; color: var(--soft); border-radius: 0; position: relative; }
.editform label:first-of-type { border-radius: 12px 12px 0 0; }
.editform label:nth-last-of-type(1) { border-radius: 0 0 12px 12px; }
.editform label + label::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid #c6c6c8; }
.editform input, .editform select, .editform textarea { border: 0; padding: 4px 0 2px; margin-top: 2px; font-size: 17px; background: none; border-radius: 0; }
.editform input:focus, .editform select:focus, .editform textarea:focus { outline: none; }
.editform .days.wheel.mini { margin: 4px -16px -4px; }
.editform .row { margin-top: 16px; }
.editform .row button { min-height: 50px; border-radius: 12px; font-size: 17px; font-weight: 600; flex: 1; }
.editform .row .danger { flex: 0 0 auto; margin-right: 0; background: #fff; color: #ff3b30; }
.editform .row .ghost { background: #fff; color: var(--accent); }

@media (prefers-reduced-motion: reduce) { .maprowlink { transition: none; } }

/* Directions on the place page */
.dirblock > small { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: #6d6d72; margin: 6px 16px 6px; }
.ml-txt small { text-transform: none; letter-spacing: 0; margin: 0; font-size: 13px; color: var(--soft); }
.pacts { grid-template-columns: repeat(2, 1fr); }
.pdist { margin: 12px 2px 0; font-size: 15px; font-weight: 600; color: var(--accent); }
.pdist[hidden] { display: none; }
.pbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pbtns .planbtn { margin: 0; background: #e5f1ff; color: var(--accent); }
.dirbtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; font-size: 17px; font-weight: 700; background: var(--accent); color: #fff; }

/* ---------- Add to plan sheet ---------- */
.ap-place { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.ap-thumb { flex: none; width: 52px; height: 52px; border-radius: 10px; }
.ap-thumb .ktag, .ap-thumb.none::after { display: none; }
.ap-txt { min-width: 0; display: flex; flex-direction: column; }
.ap-txt b { font-size: 17px; line-height: 1.25; }
.ap-txt span { font-size: 14px; color: var(--soft); }
.addplan .days.wheel.mini { margin: 0 -16px 4px; padding-top: 8px; padding-bottom: 12px; }
.addplan .days.wheel.mini .daytab { background: #fff; }
.addplan .days.wheel.mini .daytab[aria-current] { background: var(--accent); color: #fff; }
.ap-label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: #6d6d72; margin: 4px 16px 6px; }
.ap-hours { max-height: 300px; overflow-y: auto; }
.ap-hour { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 16px; background: #fff; color: var(--ink); text-align: left; border-radius: 0; font-weight: 400; }
.ap-hour + .ap-hour::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: .5px solid #c6c6c8; }
.ap-hour:active { background: #e5e5ea; transform: none; }
.ap-h { flex: none; width: 48px; font-size: 15px; color: var(--soft); font-variant-numeric: tabular-nums; }
.ap-busy { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-busy.free { color: #8e8e93; }
.ap-tick { flex: none; width: 20px; height: 20px; }
.ap-hour.on .ap-busy { color: var(--accent); font-weight: 600; }
.ap-hour.on .ap-tick { background: no-repeat center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.ap-exact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; min-height: 52px; font-size: 17px; color: var(--ink); }
.ap-exact input { font: inherit; font-size: 17px; border: 0; background: #f2f2f7; border-radius: 8px; padding: 6px 10px; color: var(--ink); }
.ap-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ap-go { min-height: 52px; border-radius: 14px; font-size: 17px; font-weight: 700; background: var(--accent); color: #fff; }
.ap-remove { min-height: 50px; border-radius: 14px; font-size: 17px; font-weight: 600; background: #fff; color: #ff3b30; }

/* ---------- Place card bottom: Apple Maps-style ---------- */
dialog.page .photo { position: relative; }
dialog.page .photo figcaption { position: absolute; right: 12px; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .85); font-size: 10px; }
.ptitle { margin: 2px 0 4px; }
.psub { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 15px; color: var(--soft); }
.psub .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.actbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.actbar[hidden] { display: none; }
.act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; padding: 8px 4px;
  border-radius: 14px; background: #f2f2f7; color: var(--accent); font-size: 13px; font-weight: 600; line-height: 1.1;
}
.act span { white-space: nowrap; }
.act.primary { background: var(--accent); color: #fff; }
.act.tint { background: #e5f1ff; }
.act[hidden] { display: none; }
.pdist { margin: 14px 0 0; }
.psum { margin: 14px 0 0; font-size: 16px; line-height: 1.5; color: #3a3d45; }
.pinfo { margin: 16px 0 4px; border-radius: 12px; background: #f2f2f7; overflow: hidden; }
.pinfo[hidden] { display: none; }
.pi-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 10px 16px; font-size: 16px; }
.pi-row + .pi-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid #c6c6c8; }
.pi-row span { color: var(--soft); }
.pi-row b { font-weight: 500; color: var(--ink); }
.pacts, .pbtns, .tiles { display: none; }

/* No visible scroll bars anywhere (iOS style); scrolling still works */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* PIN sheet */
.pinform input { width: 100%; font: inherit; font-size: 22px; letter-spacing: .3em; text-align: center; padding: 14px; border: 0; border-radius: 12px; background: #fff; margin: 0 0 8px; }
.pinerr { color: #d1332a; min-height: 1.2em; margin: 0 0 8px; font-size: 15px; text-align: center; }
.pinform .ap-go { width: 100%; }
