/* Tytory UI: shared visual language for the mobile web app and native prototype. */
:root {
  --ink:#203e35; --muted:#66746d; --paper:#f7f8f3; --mist:#eaf0e5;
  --coral:#b94729; --lime:#e3edc9; --line:#dce3d8;
  --surface:#fff; --accent-soft:#fff0e7; --danger:#bb3444;
  --shadow:0 18px 60px #203e3517; --radius:24px;
}
body { background:var(--paper); padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
button,input,select,textarea { font-family:inherit; }
button,a,input,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; }
button,a { transition:background-color .16s,color .16s,border-color .16s; }
:focus-visible { outline:3px solid #b94729; outline-offset:4px; }
.topbar { padding:16px max(20px,calc((100vw - 1040px)/2)); background:#f7f8f3f2; border-bottom:1px solid #dce3d880; }
.brand { font-size:32px; letter-spacing:-1.8px; }
.round-button { background:white; border:1px solid var(--line); padding:10px 14px; font-size:12px; }
.language { font-variant-numeric:tabular-nums; }
.sheet { padding:32px 24px 48px; }
.view { max-width:960px; }
.view h1,.view h2,.story-panel h2,.city-dialog h2,.place-peek h2,.place-card h3,.preset strong {
  font-family:Manrope,system-ui,sans-serif; font-weight:800; letter-spacing:-.045em;
}
.view h1 { font-size:clamp(34px,5vw,54px); line-height:1.1; max-width:720px; }
.view h2 { font-size:27px; line-height:1.2; }
.eyebrow { color:var(--coral); font-size:10px; letter-spacing:.15em; margin-bottom:12px; }
.lead { font-size:15px; line-height:1.7; margin:16px 0 24px; max-width:640px; }
.primary-button { background:var(--ink); min-height:54px; border-radius:16px; font-size:14px; padding:16px 20px; justify-content:center; gap:16px; }
.primary-button:hover { background:#30594b; }
#build-route,#start-walk { background:var(--coral); box-shadow:0 5px 15px #b947291a; }
#build-route:hover,#start-walk:hover { background:#9d3a20; }
.secondary-button { border:1px solid var(--line); background:var(--surface); border-radius:12px; min-height:44px; font-size:13px; padding:10px 15px; }
.secondary-button:hover { background:var(--mist); }
.text-button { color:var(--ink); font-size:12px; font-weight:700; }
.microcopy { font-size:11px; line-height:1.6; color:var(--muted); }
input,select,textarea { border:1px solid var(--line); border-radius:14px; min-height:50px; font-size:16px; background:var(--surface); }
select { padding:12px 36px 12px 14px; }
.field-group { padding:20px; margin:12px 0; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); max-width:none; }
.field-group label { font-size:13px; font-weight:800; }
.choice-row { gap:10px; margin-top:14px; }
.choice-row .choice { background:var(--paper); padding:14px 8px; min-height:82px; border-radius:14px; font-size:12px; color:var(--ink); }
.choice-icon { margin-bottom:7px; color:var(--muted); }
.choice-icon svg { width:22px; height:22px; display:block; margin:auto; }
.choice.selected { background:var(--lime); border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.choice.selected .choice-icon { color:var(--ink); }
.duration-picker { max-width:none; gap:10px; margin-top:14px; }
.duration-picker button { padding:14px 8px; border-radius:14px; background:var(--paper); }
.duration-picker strong { font-size:25px; font-weight:800; }
.duration-picker span { font-size:11px; font-weight:600; }
.duration-picker button.active { background:var(--ink); }
.route-settings { max-width:none; padding:18px 20px; border-radius:20px; margin:12px 0 20px; }
.route-settings summary { font-size:13px; }
.route-settings label { font-size:12px; }
.route-settings select { font-size:16px; }
.city-cover { margin:6px 0 12px; }
.city-cover img { height:240px; border-radius:var(--radius); }
.city-cover figcaption,.city-cover .photo-credit { font-size:9px; margin:6px 3px; color:var(--muted); }
.walk-promise { display:block; margin:12px 0; max-width:none; font-size:12px; line-height:1.65; padding:14px 18px; border-radius:16px; background:var(--lime); }
#planner-view .primary-button { max-width:none; }
.presets { margin:32px 0 0; }
.presets h2 { font-size:23px; margin:0 0 16px; }
.preset { position:relative; min-height:158px; padding:22px; border:1px solid transparent; border-radius:22px; background:#e7eddf; }
.preset:nth-child(2) { background:#f3e8dd; }
.preset:nth-child(3) { background:#dfece5; }
.preset strong { font-size:19px; margin:8px 0; letter-spacing:-.03em; }
.preset small { display:block; font-size:12px; line-height:1.6; }
.preset[aria-pressed=true] { outline:0; border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.preset[aria-pressed=true]::after { content:'\2713'; position:absolute; right:14px; top:12px; color:var(--ink); font-size:13px; }
.bottom-nav { bottom:12px; left:50%; right:auto; transform:translateX(-50%); width:min(600px,calc(100% - 24px)); border:1px solid var(--line); border-radius:24px; background:#fffffff5; padding:7px; box-shadow:0 8px 35px #203e3512; }
.bottom-nav a { border-radius:17px; padding:9px 4px 8px; min-height:61px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; }
.bottom-nav a span { margin:0; line-height:1; }
.bottom-nav a svg { width:22px; height:22px; display:block; }
.bottom-nav a.active { background:var(--lime); color:var(--ink); }
.bottom-nav b { font-size:10px; font-weight:700; }
body[data-tab=places] .sheet { padding-top:20px; }
body[data-tab=places].map-visible .map-area,#places-view .map-area { border:1px solid var(--line); border-radius:24px; height:36dvh; min-height:250px; margin-bottom:20px; }
#map-resize { background:var(--paper); }
#map-resize span { width:34px; height:4px; background:#a7b3a5; }
.map-location,.map-close,.recenter { color:var(--ink); box-shadow:0 3px 14px #203e351a; }
.catalog-tools { padding:0; }
#place-search { padding-left:18px; background:var(--surface); min-height:52px; }
.chips { gap:7px; margin:14px 0; }
.chips button { min-height:44px; padding:8px 14px; font-size:12px; font-weight:600; background:var(--surface); border-color:var(--line); }
.chips button.active { background:var(--ink); color:white; }
.catalog-layout-tools select { min-height:44px; font-size:12px; border-radius:12px; }
.layout-buttons { padding:3px; border-radius:13px; background:#e9eee4; gap:3px; }
.layout-buttons button { border:0; background:transparent; min-height:44px; padding:8px 10px; border-radius:10px; }
.layout-buttons svg { width:18px; height:18px; display:block; }
.layout-buttons button[aria-pressed=true] { background:white; color:var(--ink); box-shadow:0 2px 5px #203e3512; }
#places-count { margin:16px 2px; font-size:11px; }
.place-list { gap:18px; margin:16px 0 28px; }
.place-card { border-radius:24px; padding:18px; box-shadow:0 3px 10px #203e3505; }
.place-card.selected { padding:18px; border:1px solid var(--coral); background:var(--accent-soft); box-shadow:0 0 0 2px #b9472930; }
.place-art.has-photo,.place-card.selected .place-art.has-photo { height:200px; margin:-18px -18px 16px; border-radius:23px 23px 0 0; }
.place-card h3 { font-size:20px; line-height:1.3; margin:0 0 8px; }
.place-card p { margin:6px 0; font-size:12px; line-height:1.65; }
.place-card p:empty { display:none; }
.place-card .mode-row { display:flex; gap:8px; margin-top:14px; }
.place-card .mode-row .secondary-button:first-child { flex:1; }
.place-card .added { background:var(--ink); color:white; }
.place-card .mode-row .secondary-button:last-child { width:44px; font-size:20px; padding:6px; }
.place-card .mode-row .secondary-button:last-child[aria-pressed=true] { color:var(--coral); background:var(--accent-soft); border-color:#e2bba9; }
.place-card .text-button { padding:0; margin:4px 0 0; }
.photo-credit { font-size:9px; line-height:1.5; opacity:.85; }
.compact-list .place-card { padding:14px; grid-template-columns:88px minmax(0,1fr); gap:0 14px; }
.compact-list .place-art,.compact-list .place-art.has-photo,.compact-list .place-card.selected .place-art.has-photo { margin:0; height:94px; border-radius:14px; }
.compact-list .place-card h3 { font-size:16px; line-height:1.35; }
#favorites-view>h2 { padding-top:18px; margin:12px 0 18px; font-size:24px; }
#favorite-list:has(>.text-button:only-child) { padding:34px 24px; background:var(--surface); border:1px dashed #b9c8b3; border-radius:24px; min-height:128px; display:flex; align-items:center; }
#favorite-list>.text-button { text-align:center; }
#saved-walks>p { padding:26px; background:var(--mist); border-radius:20px; color:var(--muted); font-size:13px; }
.saved-walk { background:white; border-radius:20px; padding:22px; }
.saved-walk strong { font-size:17px; }
.saved-walk p { font-size:12px; color:var(--muted); line-height:1.6; }
#empty-walk-view { min-height:55dvh; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; max-width:650px; }
#empty-walk-view::before { content:'\219D'; font:400 48px/1 Manrope,sans-serif; color:var(--coral); padding:20px; border-radius:24px; background:var(--accent-soft); margin-bottom:24px; }
#empty-walk-view h1 { font-size:36px; }
#settings-view { max-width:620px; padding:28px; border:1px solid var(--line); border-radius:28px; background:var(--surface); }
#settings-view .dialog-head { margin:0 0 16px; }
#settings-view #language-title { font-size:30px; }
#language-description { color:var(--muted); font-size:14px; line-height:1.7; margin:0 0 26px; }
#settings-view label { font-size:12px; margin:22px 0 10px; }
#settings-view select { background:var(--paper); }
#apply-language { margin-top:28px; }
.route-facts { background:white; border:1px solid var(--line); border-radius:20px; padding:18px; margin:20px 0; }
.route-facts div { padding:0 18px; }
.view .route-facts strong { font-size:23px; font-weight:800; }
.view .route-facts span { font-size:11px; }
#preview-view .route-intro { font-size:13px; line-height:1.7; }
#preview-view #save-route { width:100%; max-width:none; }
#start-walk { max-width:none; }
#stops li { padding:12px; margin:8px 0; border-radius:18px; background:var(--surface); }
#stops .stop-open { font-size:13px; font-weight:700; }
#stops .stop-open img,#stops .stop-photo-placeholder { width:56px; height:56px; border-radius:12px; }
body[data-tab=walk] .map-area { border-radius:0 0 24px 24px; }
#walk-view { max-width:650px; }
.walk-progress { padding:0 2px; }
.progress-bar { height:6px; background:#dce3d8; }
.progress-bar span { background:var(--ink); }
#progress-text { color:var(--ink); font-size:10px; }
.carousel-card { border-radius:16px; background:white; }
.carousel-card.selected { border-color:var(--coral); background:var(--accent-soft); }
#walk-view #next-title { font-size:24px; line-height:1.25; letter-spacing:-.035em; }
.next-meta { font-size:12px; }
#walk-story-text,.story-text { font-size:15px; line-height:1.85; color:#43554b; }
.player,#walk-audio-slot .player { background:white; color:var(--ink); border:1px solid var(--line); border-radius:22px; padding:14px; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.player .rewind,#walk-audio-slot .rewind { color:var(--ink); }
.player #listen,#walk-audio-slot #listen { background:var(--ink); color:white; width:54px; height:54px; order:3; flex-shrink:0; }
.player #restart-audio { order:1; }
.player #back-audio { order:2; }
.player #forward-audio { order:4; }
.player #end-audio { order:5; }
.player #finish-walk-audio { order:6; color:var(--danger); }
.player .player-copy { order:7; flex:0 0 100%; text-align:center; }
.player #player-label { display:none; }
.player #audio-state { color:var(--muted); font-size:11px; }
.audio-timeline { gap:9px; font-size:10px; color:var(--muted); }
.audio-timeline input { min-height:28px; accent-color:var(--coral); }
.story-panel,.place-peek { background:var(--paper); border-radius:28px; box-shadow:var(--shadow); }
.story-panel h2,.place-peek h2 { font-size:28px; line-height:1.2; }
.story-top { margin-bottom:14px; }
.story-number { background:var(--lime); color:var(--ink); }
.close-button { width:44px; height:44px; border-radius:50%; background:#edf0e8; color:var(--ink); }
.object-photo img { border-radius:18px; }
.city-dialog { border-radius:26px; padding:26px; }
.city-dialog h2 { font-size:26px; line-height:1.2; }
.city-dialog::backdrop { background:#142b2366; backdrop-filter:blur(4px); }
.city-dialog label { font-size:12px; font-weight:700; }
.selection-bar { bottom:calc(95px + env(safe-area-inset-bottom)); border-radius:20px; background:white; }
.has-audio .selection-bar { bottom:calc(95px + env(safe-area-inset-bottom)); }
@media(min-width:800px) {
  #planner-view { column-gap:28px; }
  #planner-view>.city-cover { grid-row:4/7; margin:12px 0; }
  #planner-view>.city-cover img { min-height:390px; height:calc(100% - 30px); }
  #planner-view>.field-group { margin:8px 0; }
}
@media(max-width:620px) {
  .topbar { padding:12px 18px; }
  .brand { font-size:29px; }
  .round-button { padding:8px 11px; font-size:11px; }
  .sheet { padding:24px 18px 40px; }
  .view h1 { font-size:34px; }
  .lead { font-size:13px; margin:14px 0 20px; }
  .city-cover img { height:190px; }
  .field-group { padding:18px; margin:12px 0; border-radius:22px; }
  .walk-promise { margin:14px 0; }
  .presets #presets { grid-template-columns:1fr; gap:10px; }
  .preset { min-height:104px; padding:18px 22px; }
  .preset strong { font-size:18px; margin:0 0 7px; }
  .bottom-nav { bottom:calc(8px + env(safe-area-inset-bottom)); }
  .bottom-nav a { min-height:56px; gap:5px; }
  .bottom-nav b { font-size:9px; }
  body[data-tab=places].map-visible .map-area,#places-view .map-area { height:32dvh; min-height:230px; }
  .place-art.has-photo,.place-card.selected .place-art.has-photo { height:200px; }
  .place-card h3 { font-size:20px; }
  .compact-list .place-card h3 { font-size:15px; }
  .compact-list .place-card { grid-template-columns:72px minmax(0,1fr); }
  .compact-list .place-art,.compact-list .place-art.has-photo { height:82px; }
  #settings-view { padding:22px; border-radius:24px; }
  #settings-view #language-title { font-size:27px; }
  #language-description { font-size:13px; }
  .story-panel { padding:20px; bottom:calc(88px + env(safe-area-inset-bottom)); }
  #walk-audio-slot .player { padding:10px; gap:4px; }
  #walk-audio-slot #listen { width:50px; height:50px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; } }

/* A single fixed control row: beginning, -15, play, +15, end, finish. */
.player,#walk-audio-slot .player {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 50px minmax(0,1fr) minmax(0,1fr);
  align-items:center; gap:6px 2px; padding:12px 10px;
}
.player #audio-language-status { grid-column:1/5; grid-row:1; margin:0; text-align:left; }
.player .audio-timeline { grid-column:1/-1; grid-row:2; width:100%; margin:0 0 4px; }
.player .player-copy,#walk-audio-slot .player-copy { grid-column:1/-1; grid-row:4; min-width:0; margin:0; }
.player .rewind,#walk-audio-slot .player .rewind {
  position:relative; display:grid; place-items:center; justify-self:center; align-self:center;
  width:100%; max-width:44px; min-width:0; height:50px; min-height:44px;
  padding:0; margin:0; border:0; border-radius:12px; background:transparent;
}
.player #restart-audio { grid-column:1; grid-row:3; }
.player #back-audio { grid-column:2; grid-row:3; }
.player #listen,#walk-audio-slot #listen {
  grid-column:3; grid-row:3; justify-self:center; align-self:center;
  display:grid; place-items:center; width:50px; height:50px; min-height:50px; padding:0; margin:0;
}
.player #listen::after { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:18px; height:20px; margin:0; clip-path:polygon(0 0,100% 50%,0 100%); }
.player #listen:not(.is-playing)::after { transform:translate(calc(-50% + 3px),-50%); }
.player #listen.is-playing::after { margin:0; }
.player #forward-audio { grid-column:4; grid-row:3; }
.player #end-audio { grid-column:5; grid-row:3; }
.player #finish-walk-audio,#walk-audio-slot #finish-walk-audio { grid-column:5; grid-row:1; margin:0; height:44px; color:var(--danger); }
.player .rewind svg,#walk-audio-slot .player .rewind svg {
  display:block; width:28px; height:28px; margin:0; stroke-width:2; overflow:visible;
}
.player .rewind svg.circular-arrow { width:34px; height:34px; transform:none; }
.player #finish-walk-audio svg { width:24px; height:24px; }
.player .rewind:hover { background:var(--mist); }

.map-location,.recenter { display:grid; place-items:center; padding:0; }
.map-location svg,.recenter svg { width:24px; height:24px; pointer-events:none; }
