/* Owner area: phone first. Colours and fonts come from style.css (docs/brand.md). */

body.ow { background: var(--paper); color: var(--ink); min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.ow a { color: inherit; }
.ow :focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }

/* header */
.ow-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(244, 238, 226, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(23, 19, 14, .08); }
.ow-logo img { height: 13px; display: block; }
.ow-ed { font: 700 10px var(--f-mono); letter-spacing: .12em; padding: 6px 9px; border-radius: 999px; background: var(--ink); color: var(--snow); }
.ow-topnav { display: none; }
.ow-icon { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--snow); box-shadow: inset 0 0 0 1px rgba(23, 19, 14, .1); text-decoration: none; }
.ow-out-form { margin: 0; }
.ow-out { margin-left: 0; border: 0; padding: 0; cursor: pointer; color: inherit; }

/* bottom tabs */
.ow-tabs { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); background: var(--snow); border-top: 1px solid rgba(23, 19, 14, .1); }
.ow-tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px; min-height: 48px; justify-content: center; font-size: 11px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.ow-tabs a[aria-current="page"] { color: var(--red); font-weight: 800; }

@media (min-width: 900px) {
  body.ow { padding-bottom: 0; }
  .ow-tabs { display: none; }
  .ow-bar { padding: 14px 4vw; }
  .ow-topnav { display: flex; gap: 4px; margin-left: 24px; }
  .ow-topnav a { padding: 10px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; }
  .ow-topnav a:hover { background: var(--paper-2); }
  .ow-topnav a[aria-current="page"] { background: var(--ink); color: var(--snow); }
}

/* layout */
.ow-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 18px 48px; }
.ow-full .ow-main { width: 100%; max-width: none; padding: 0; }
.ow-sec { margin-top: 28px; }
.ow-label { margin: 0 0 10px; font: 700 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #6b6156; }
.ow-label.red { color: var(--red-deep); }
.ow-h1 { margin: 22px 0 0; font-size: clamp(34px, 7vw, 56px); font-weight: 900; font-stretch: 115%; letter-spacing: -.045em; line-height: .95; }
.ow-h1 em, .ow-h2 em { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }
.ow-h2 { margin: 0; font-size: 26px; font-weight: 900; font-stretch: 112%; letter-spacing: -.035em; line-height: 1; }
.ow-lead { font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.ow-muted { color: #6b6156; font-size: 13px; }
.ow-card { background: var(--snow); border-radius: 20px; padding: 16px; box-shadow: 0 20px 40px -34px rgba(23, 19, 14, .6); }

/* search box */
.ow-search { display: flex; align-items: center; gap: 10px; background: var(--snow); border-radius: 999px; padding: 0 16px; height: 52px; box-shadow: inset 0 0 0 1px rgba(23, 19, 14, .12); }
.ow-search input { border: 0; outline: 0; background: none; font: 500 16px var(--f-sans); width: 100%; color: var(--ink); }
.ow-search svg { flex-shrink: 0; color: #6b6156; }
.ow-results { display: grid; gap: 6px; margin-top: 10px; }
.ow-results:empty { display: none; }
.ow-result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--snow); text-decoration: none; }
.ow-result b { font-size: 15px; }
.ow-result span { font: 500 11px var(--f-mono); color: #6b6156; }

/* buttons and chips */
.ow-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; font: 700 15px var(--f-sans); text-decoration: none; cursor: pointer; background: var(--ink); color: var(--snow) !important; }
.ow-btn.red { background: var(--red); color: #fff !important; }
.ow-btn.ghost { background: var(--snow); color: var(--ink) !important; box-shadow: inset 0 0 0 1px rgba(23, 19, 14, .15); }
.ow-btn:hover { filter: brightness(1.08); }
.ow-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ow-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.ow-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--snow); font-size: 13px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; color: var(--ink); }
.ow-chip[aria-pressed="true"], .ow-chip[aria-current="page"] { background: var(--ink); color: var(--snow); }
.ow-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* home */
.ow-recent { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.ow-recent[hidden] { display: none; }
.ow-journeys { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ow-journey { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 120px; padding: 12px; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff !important; background: var(--night); isolation: isolate; }
.ow-journey img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.ow-journey::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 21, 34, 0) 30%, rgba(12, 21, 34, .8)); }
.ow-journey:hover img { transform: scale(1.06); }
.ow-journey b { font-size: 16px; letter-spacing: -.01em; line-height: 1.1; }
.ow-journey span { font: 500 11px var(--f-mono); opacity: .9; }
.ow-feature { position: relative; display: block; border-radius: 24px; overflow: hidden; background: var(--night); color: var(--snow) !important; padding: 22px; min-height: 200px; text-decoration: none; isolation: isolate; }
.ow-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; z-index: -1; }
.ow-feature b { display: block; font-size: 26px; font-stretch: 112%; letter-spacing: -.035em; line-height: 1; margin: 8px 0; max-width: 18ch; }
.ow-time { display: inline-block; font: 700 15px var(--f-mono); background: #111; color: var(--gold); padding: 6px 8px; border-radius: 6px; }

/* lists of places and scripts */
.ow-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ow-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 18px; background: var(--snow); text-decoration: none; min-width: 0; }
.ow-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex-shrink: 0; background: var(--paper-2); }
.ow-item div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ow-item small { font: 700 10px var(--f-mono); letter-spacing: .1em; color: var(--red-deep); }
.ow-item b { font-size: 16px; letter-spacing: -.01em; line-height: 1.2; }
.ow-item span { font-size: 13px; color: #6b6156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-item .no { width: 60px; height: 60px; border-radius: 12px; display: grid; place-items: center; font: 700 17px var(--f-mono); background: #111; color: var(--gold); flex-shrink: 0; }

/* place page */
.pl-hero { position: relative; margin: 0 -18px; height: min(48vh, 520px); min-height: 300px; color: #fff; isolation: isolate; display: flex; align-items: flex-end; }
.pl-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.pl-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 21, 34, .15), rgba(12, 21, 34, 0) 35%, rgba(12, 21, 34, .78)); }
.pl-hero-in { padding: 22px 18px; display: grid; gap: 6px; width: min(1080px, 100%); margin: 0 auto; }
.pl-hero small { font: 700 11px var(--f-mono); letter-spacing: .12em; color: var(--gold); }
.pl-hero h1 { margin: 0; font-size: clamp(36px, 8vw, 68px); font-weight: 900; font-stretch: 115%; letter-spacing: -.045em; line-height: .95; }
.pl-hero p { margin: 0; font-family: var(--f-serif); font-style: italic; font-size: 22px; }
@media (min-width: 1116px) { .pl-hero { margin: 0 calc((100vw - 1080px) / -2 - 0px); } }
.pl-facts { display: grid; gap: 0; padding: 4px 16px; }
.pl-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed rgba(23, 19, 14, .18); font-size: 15px; }
.pl-facts div:last-child { border: 0; }
.pl-facts dt { font: 700 11px var(--f-mono); letter-spacing: .08em; color: #6b6156; padding-top: 3px; }
.pl-facts dd { margin: 0; }
.pl-box { border-radius: 20px; background: var(--night); color: var(--snow); padding: 18px; }
.pl-box p { margin: 6px 0 0; line-height: 1.5; }
.pl-sec { background: var(--snow); border-radius: 18px; overflow: hidden; }
.pl-sec + .pl-sec { margin-top: 8px; }
.pl-sec summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 0 16px; cursor: pointer; font-weight: 700; font-size: 17px; }
.pl-sec summary::-webkit-details-marker { display: none; }
.pl-sec summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); flex-shrink: 0; }
.pl-sec[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.pl-sec .body { padding: 0 16px 16px; }
.pl-sec p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
.pl-sec p:last-child { margin-bottom: 0; }
.pl-readall { background: none; border: 0; padding: 8px 0; font: 700 14px var(--f-sans); color: var(--red-deep); cursor: pointer; }

/* script page */
.sc-head { margin: 0 -18px; padding: 24px 18px 26px; background: var(--night); color: var(--snow); }
.sc-head-in { width: min(1080px, 100%); margin: 0 auto; display: grid; gap: 10px; }
.sc-head small { font: 700 11px var(--f-mono); letter-spacing: .12em; color: var(--gold); }
.sc-head h1 { margin: 0; font-size: clamp(34px, 7vw, 60px); font-weight: 900; font-stretch: 115%; letter-spacing: -.045em; line-height: .95; }
.sc-head p { margin: 0; color: #ebe3d3; line-height: 1.55; max-width: 66ch; }
@media (min-width: 1116px) { .sc-head { margin: 0 calc((100vw - 1080px) / -2); } }
.sc-board { background: #0d0d0d; color: #f5f0e6; border-radius: 20px; padding: 6px 14px; }
.sc-board .day { font: 700 11px var(--f-mono); letter-spacing: .14em; color: #8b8378; padding: 14px 0 4px; }
.sc-row { display: grid; grid-template-columns: 66px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #1f1f1f; }
.sc-row:last-child { border: 0; }
.sc-row time { font: 700 17px var(--f-mono); color: var(--gold); }
.sc-row span { font-size: 15px; line-height: 1.45; }
.sc-planb { border-radius: 20px; padding: 16px; background: #fbe3e1; }
.sc-planb b { font: 700 11px var(--f-mono); letter-spacing: .12em; color: var(--red-deep); }
.sc-planb p { margin: 6px 0 0; line-height: 1.55; }
.sc-stop { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.sc-stop + .sc-stop { margin-top: 18px; }
.sc-stop .n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--snow); font: 700 14px var(--f-mono); }
.sc-stop h3 { margin: 8px 0 8px; font-size: 20px; letter-spacing: -.02em; }
.sc-stop p { margin: 0 0 10px; line-height: 1.6; color: var(--ink-2); }
.sc-stop .note { font-size: 14px; line-height: 1.5; margin: 6px 0 0; }
.sc-stop .note b { font: 700 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #6b6156; margin-right: 6px; }
.sc-stop .then { margin-top: 12px; font-family: var(--f-serif); font-style: italic; font-size: 18px; color: var(--ink-2); }
.sc-stop .pic { display: flex; gap: 10px; align-items: center; margin: 4px 0 10px; text-decoration: none; background: var(--snow); border-radius: 14px; padding: 6px; max-width: 420px; }
.sc-stop .pic img { width: 64px; height: 48px; object-fit: cover; border-radius: 9px; }
.sc-stop .pic span { font-size: 13px; font-weight: 700; }
.sc-dayhead { margin: 26px 0 14px; font: 700 12px var(--f-mono); letter-spacing: .12em; color: var(--red-deep); text-transform: uppercase; }
.cx { color: var(--red-deep) !important; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ow-text p { margin: 0 0 12px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }

/* map */
.mp { position: relative; height: calc(100vh - 66px - 84px); height: calc(100dvh - 66px - 84px - env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .mp { height: calc(100dvh - 72px); } }
.mp #map { position: absolute; inset: 0; }
.mp-top { position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px; display: grid; gap: 8px; pointer-events: none; }
.mp-top > * { pointer-events: auto; }
.mp-top .ow-search { box-shadow: 0 10px 30px -14px rgba(23, 19, 14, .5); height: 48px; max-width: 520px; }
.mp-top .ow-results { max-width: 520px; max-height: 50vh; overflow: auto; }
.mp-top .ow-chip { box-shadow: 0 6px 16px -10px rgba(23, 19, 14, .5); }
.mp-sheet { position: absolute; z-index: 6; left: 10px; right: 10px; bottom: 10px; max-width: 460px; background: var(--snow); border-radius: 24px; padding: 14px; box-shadow: 0 -10px 40px -16px rgba(23, 19, 14, .5); display: grid; gap: 12px; }
.mp-sheet[hidden] { display: none; }
.mp-sheet .top { display: flex; gap: 12px; align-items: center; }
.mp-sheet img { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; flex-shrink: 0; background: var(--paper-2); }
.mp-sheet small { font: 700 10px var(--f-mono); letter-spacing: .1em; color: var(--red-deep); }
.mp-sheet b { display: block; font-size: 19px; letter-spacing: -.02em; line-height: 1.15; }
.mp-sheet em { font-family: var(--f-serif); font-size: 16px; color: var(--ink-2); }
.mp-sheet .close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 20px; line-height: 1; }
.maplibregl-ctrl-bottom-right { bottom: 0; }

/* login */
.lg { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.lg-card { width: min(440px, 100%); background: var(--snow); border-radius: 28px; padding: 30px 26px; box-shadow: 0 40px 80px -50px rgba(23, 19, 14, .6); display: grid; gap: 16px; }
.lg-card img { height: 14px; justify-self: start; }
.lg-card h1 { margin: 6px 0 0; font-size: 34px; font-weight: 900; font-stretch: 112%; letter-spacing: -.04em; line-height: 1; }
.lg-card h1 em { font-family: var(--f-serif); font-weight: 400; }
.lg-card p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.lg-card label { font: 700 11px var(--f-mono); letter-spacing: .12em; color: #6b6156; }
.lg-card input[type="email"] { width: 100%; height: 52px; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1px rgba(23, 19, 14, .2); padding: 0 14px; font: 500 16px var(--f-sans); background: #fff; margin-top: 6px; }
.lg-note { font-size: 13px; color: #6b6156; }
.lg-ok { background: #e7f0e1; border-radius: 14px; padding: 14px; color: #2b4a1f; }
.lg-err { background: #fbe3e1; border-radius: 14px; padding: 14px; color: var(--red-deep); }
.lg-card .lg-code { width: 100%; height: 60px; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1px rgba(23, 19, 14, .2); padding: 0 14px; background: #fff; margin-top: 6px; font: 800 28px var(--f-sans); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
