/* Related tools — subtle internal links row inside footer (discovery + SEO) */
.related-tools {
    padding-bottom: 7px;
    margin-bottom: 7px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    line-height: 1.3;
}
.related-tools-label {
    color: var(--color-text-light, #718096);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.7rem;
    margin-right: 12px;
    vertical-align: middle;
}
.related-tools .footer-link {
    color: var(--color-text-medium, #4a5568);
    font-weight: 400;
    font-size: 0.85rem;
    border-bottom: none;
    vertical-align: middle;
}
.related-tools .footer-link:hover {
    color: var(--color-accent, #00a8e8);
    border-bottom: none;
}

/* ============================================================
   DAY TRIP PLANNER — Try Swiss Knife
   ── "Day path", in Trail colours (mockup E, agreed 19 Oct 2026) ──
   Stone paper with faint contour lines. Each colour has one job:
     signal yellow — the places (their discs), + Place, Track
     forest green  — Arrive / Leave and the action bar
     red           — Don't miss, nothing else
   The day's line runs morning gold → midday blue → evening rose by
   POSITION in the sequence, never by time: the order of places
   carries the design (tool doc, "Guiding rules").

   Overpass — the face of road and trail signs — sets the page;
   Overpass Mono the clock times and durations.

   Chrome — header, menu shape, footer — is the platform standard.
   ============================================================ */

:root {
    --bg:        #EEF0E8;
    --text:      #161A14;
    --mute:      #5E6658;   /* 5.6:1 on --bg */
    --edge:      #161A14;
    --accent:    #F5C400;
    --on-accent: #161A14;
    --gem:       #D52B1E;
    --gem-text:  #5a120b;
    --plate:     #24533A;
    --plate-text:#FFFFFF;
    --plate-link:#FFE27A;
    --soft:      rgba(255,255,255,.66);
    --contour:   #CDD4C1;
    --danger:    #c0392b;

    --font-body:   'Overpass', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-mono:   'Overpass Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --font-chrome: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --radius-md: 12px; --radius-lg: 16px;
    --shadow-lg: 0 18px 48px -16px rgba(22,26,20,0.4);

    /* The names the platform dialog, cloud panel and shared modules theme themselves from */
    --color-primary:      var(--plate);
    --color-accent:       var(--plate);
    --color-accent-hover: #1a3f2b;
    --color-error:        var(--danger);
    --color-text-dark:    var(--text);
    --color-text-medium:  var(--mute);
    --color-text-light:   #737b6d;
    --color-border:       #d5dbcb;
    --color-background:   #ffffff;

    /* Platform chrome — pinned to the shared TSK values */
    --chrome-white: #ffffff;
    --chrome-border: #e0e6ed;
    --chrome-bg: #f5f7fa;
    --chrome-text: #555f6d;
    --chrome-radius: 8px;
    --tsk-menu-z: 1400;
    --tsk-menu-scrim: rgba(22,26,20,0.4);
    --tsk-menu-bg: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg);
    background-image: var(--contour-img, none);
    background-size: 520px 520px;
    background-attachment: fixed;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.seo-h1, .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
button, input, select, textarea { font-family: inherit; color: inherit; font-size: inherit; }
button { cursor: pointer; }
.mono { font-family: var(--font-mono); }

/* ─────────────────────────────── HEADER (platform chrome) ─────────────────────────────── */
.header {
    width: 100%; background-color: #ffffff; border-bottom: 1px solid var(--chrome-border);
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 4px rgba(0,0,0,0.05); font-family: var(--font-chrome);
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0.5rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-logo-link { display: flex; align-items: center; text-decoration: none; transition: opacity 0.2s ease; }
.header-logo-link:hover { opacity: 0.85; }
.logo-image { height: 36px; width: auto; display: block; flex-shrink: 0; }
.tool-name-btn {
    font-size: 1.5rem; font-weight: 600; color: #1a2332; white-space: nowrap; line-height: 1.2; letter-spacing: -0.015em;
    background: none; border: none; padding: 0; cursor: pointer; transition: color 0.15s; font-family: var(--font-chrome);
    text-decoration: none;
}
.tool-name-btn:hover { color: var(--plate); }
.header-icons { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }
.header-icon-btn {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
    background: var(--chrome-white); border: 1px solid var(--chrome-border); border-radius: var(--chrome-radius);
    cursor: pointer; transition: all 0.2s ease; color: var(--chrome-text);
}
.header-icon-btn:hover { border-color: var(--plate); background: var(--chrome-bg); color: var(--plate); }
.header-icon-btn svg { width: 20px; height: 20px; }
.lang-short { font-size: 0.875rem; font-weight: 600; color: var(--chrome-text); letter-spacing: 0.02em; font-family: var(--font-chrome); }
.header-icon-btn:hover .lang-short { color: var(--plate); }

/* Language dropdown — in the menu; `.active` is the contract with i18n.js */
.language-selector { position: relative; }
.language-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px;
    background: var(--chrome-white); border: 1px solid var(--chrome-border);
    border-radius: var(--chrome-radius); box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 1100;
}
.language-dropdown.active { display: block; }
.lang-option {
    display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.6rem 1rem;
    background: none; border: none; font-size: 0.875rem; color: var(--text); text-align: left; cursor: pointer;
    font-family: var(--font-chrome);
}
.lang-option:hover { background: var(--bg); }
.lang-option.active { background: #e3ede6; color: var(--plate); }
.lang-check { font-size: 0.75rem; opacity: 0; }
.lang-option.active .lang-check { opacity: 1; }

/* ─────────────────────────────── MENU (look only — geometry is /shared/tsk-menu.css) ─────────────────────────────── */
.menu-header { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; gap: 8px; }
.menu-header h3 { margin: 0; color: var(--text); font-weight: 900; font-size: 1.2rem; }
.menu-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.close-menu {
    background: var(--chrome-bg); border: 1px solid var(--chrome-border); border-radius: var(--chrome-radius);
    font-size: 1.25rem; color: var(--chrome-text); cursor: pointer; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.close-menu:hover { background: var(--bg); color: var(--text); }
.menu-action {
    width: 100%; background: #f6f7f2; border: 1px solid #e1e5d9; padding: 11px 14px;
    border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 12px;
    font-size: 0.95rem; color: var(--text); font-weight: 700; text-align: left; text-decoration: none;
}
.menu-action:hover { background: #fff; border-color: var(--plate); transform: translateY(-1px); }
.menu-action.danger { color: var(--danger); border-color: #efcdc9; }
.menu-action.danger:hover { background: #fbeeec; border-color: var(--danger); }
.action-icon { font-size: 1.35rem; flex-shrink: 0; }
.action-content { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.action-hint { font-size: 0.75rem; color: var(--color-text-light); font-weight: 400; }
.menu-divider { height: 1px; background: #e1e5d9; margin: 2px 0 10px; }

/* ─────────────────────────────── BUTTONS ─────────────────────────────── */
.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 2px 20px 0; border-radius: 999px;
    font-size: 0.95rem; font-weight: 800; cursor: pointer; text-decoration: none; white-space: nowrap;
    border: 1.5px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--on-accent); }
.btn-primary:hover { background: #ffd21f; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--text); border-color: #c9cfbf; }
.btn-ghost:hover { border-color: var(--text); }

/* ─────────────────────────────── WELCOME ─────────────────────────────── */
.welcome {
    max-width: 1100px; margin: 0 auto; padding: 28px 16px 12px;
    display: grid; gap: 28px; align-items: center;
}
@media (min-width: 860px) { .welcome { grid-template-columns: 1.25fr 1fr; padding-top: 48px; gap: 48px; } }
.eyebrow { font-weight: 900; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--plate); }
.welcome-title { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 900; line-height: 1.02; letter-spacing: -0.02em; margin: 6px 0 12px; }
.welcome-sub { font-size: 1.05rem; color: var(--mute); max-width: 34em; margin-bottom: 22px; }
.continue-card {
    background: var(--plate); color: var(--plate-text); border-radius: var(--radius-lg);
    padding: 14px 16px 16px; margin-bottom: 18px; max-width: 30rem; position: relative;
    border-left: 6px solid var(--accent);
}
/* Delete the trip on the device from the first page, as every tool allows (Trip Planner's ×).
   Always visible: a hover-only button does not exist on a phone. */
.continue-card { padding-right: 58px; }
.continue-delete {
    position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff;
    font-size: 1.35rem; line-height: 1; display: grid; place-items: center; padding: 0;
}
.continue-delete:hover { background: var(--danger); border-color: var(--danger); }
.continue-eyebrow { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--plate-link); }
.continue-title { font-size: 1.35rem; font-weight: 900; line-height: 1.15; margin-top: 2px; overflow-wrap: anywhere; }
.continue-meta { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }
.continue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.continue-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.continue-card .btn-ghost:hover { border-color: #fff; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.welcome-samples { margin-top: 24px; }
.samples-label { font-size: 0.75rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.sample-row { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); max-width: 34rem; }
.sample-btn {
    display: grid; gap: 1px; text-align: left; padding: 10px 14px 9px; border-radius: 12px;
    background: var(--soft); border: 1.5px solid #d5dbcb; transition: border-color 0.15s, background 0.15s;
}
.sample-btn:hover { border-color: var(--text); background: #fff; }
.sample-name { font-weight: 900; font-size: 1rem; }
.sample-meta { font-size: 0.8rem; color: var(--mute); font-weight: 600; }
.welcome-ai { margin-top: 12px; font-size: 0.9rem; font-weight: 800; }
.ai-link { color: var(--plate); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ai-link:hover { color: var(--text); }
.welcome-demo { display: flex; justify-content: center; }
.demo-arc { width: min(420px, 100%); pointer-events: none; }
.demo-arc .arc-ends { display: none; }

/* ─────────────────────────────── THE PLANNER — LAYOUT ─────────────────────────────── */
/* Phone: one column — header, arc + start time, Why go, the path, and the bar stuck to
   the bottom. The sidebar's parts join the column through display: contents. */
.page { display: flex; flex-direction: column; }
.side, .main { display: contents; }
.hero   { order: 1; padding: 20px 16px 0; }
.arcbox { order: 2; margin: 10px 16px 0; }
.why    { order: 3; margin: 12px 16px 4px; }
.path   { order: 4; padding: 22px 0 26px; }
.acts   { order: 5; }

.hero-top { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.region { flex: 1; font-size: 13px; font-weight: 700; color: var(--mute); min-width: 0; overflow-wrap: anywhere; }
.trip-title { font-size: 31px; font-weight: 900; line-height: 1.04; margin: 0 0 10px; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.trip-title.is-empty { color: #8a9284; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { font-size: 12px; font-weight: 800; padding: 3px 8px 1px; background: var(--text); color: var(--bg); border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
.fact.theme { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.hint-btn {
    border: 1.5px dashed #9AA392; background: transparent; color: var(--mute); border-radius: 99px;
    padding: 6px 12px 4px; font-size: 13px; font-weight: 800; min-height: 36px;
}
.hint-btn:hover { border-color: var(--text); color: var(--text); }

.best-time { margin-top: 10px; font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.best-time b { font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-right: 4px; }

/* The day arc */
.arc-draw { position: relative; }
.arc-draw svg { display: block; width: 100%; height: auto; overflow: visible; }
.arc-disc {
    position: absolute; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: transparent; display: grid; place-items: center; font-size: 13px; line-height: 1;
    padding: 0;
}
.arc-disc span { transform: translateY(1px); }
.arc-disc.is-done span { font-weight: 900; color: var(--plate); font-size: 15px; }
.arc-disc:hover::before, .arc-disc:focus-visible::before {
    content: ""; position: absolute; inset: 3px; border-radius: 50%; box-shadow: 0 0 0 2px var(--text);
}
.arc-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; font-weight: 800; margin-top: -2px; }
.arc-ends span { min-width: 0; overflow-wrap: anywhere; }
.arc-ends span:last-child { text-align: right; }
.arc-ends small { display: block; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

.when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--mute); font-weight: 600; }
.when label { display: inline-flex; align-items: center; gap: 2px; }
.when input {
    font-family: var(--font-mono); font-weight: 700; color: var(--text); font-size: 14px;
    border: 1.5px solid #c9cec0; background: #fff; border-radius: 8px; padding: 4px 6px 2px; min-height: 36px;
}
.when .x { border: 0; background: none; color: var(--mute); text-decoration: underline; padding: 6px 2px; font-size: 12.5px; }
.when b { color: var(--text); font-family: var(--font-mono); }

/* Why go */
.why { background: var(--soft); border-radius: 12px; padding: 8px 10px 12px 14px; }
.why-hd { display: flex; align-items: center; gap: 6px; }
.why h3 { flex: 1; margin: 0; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.why ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 14.5px; }
.why li { padding-left: 18px; position: relative; overflow-wrap: anywhere; }
.why li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }

/* ─────────────────────────────── THE PATH — a block's edge IS the line ─────────────────────────────── */
.blk { position: relative; margin: 0 16px; padding: 11px 14px 12px 28px; background: var(--soft); border-left: 4px solid var(--c); border-radius: 3px 14px 14px 3px; }
.blk.right { padding: 11px 28px 12px 14px; border-left: 0; border-right: 4px solid var(--c); border-radius: 14px 3px 3px 14px; }
.disc { position: absolute; top: 9px; left: -16px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--edge); display: grid; place-items: center; font-size: 15px; line-height: 1; z-index: 2; }
.blk.right .disc { left: auto; right: -16px; }
.blk.end { background: var(--plate); color: var(--plate-text); }
.blk.end .disc { background: var(--plate); border-color: var(--accent); color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.blk.is-dragging { opacity: .45; }
.blk.drop-before { box-shadow: 0 -4px 0 0 var(--text); }
.blk.drop-after  { box-shadow: 0 4px 0 0 var(--text); }
.blk.place[draggable="true"] { cursor: grab; }

.ibtn {
    flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(22,26,20,.06);
    display: grid; place-items: center; cursor: pointer; font-size: 15px; text-decoration: none; padding: 0;
}
.ibtn:hover { background: rgba(22,26,20,.12); }
.blk.end .ibtn { background: rgba(255,255,255,.14); }
.blk.end .ibtn:hover { background: rgba(255,255,255,.24); }

.place-hd { display: flex; align-items: flex-start; gap: 6px; }
.place-hd .nm { flex: 1; font-weight: 900; font-size: 18px; line-height: 1.15; padding-top: 6px; min-width: 0; overflow-wrap: anywhere; }
.meta { display: block; font-size: 12.5px; color: var(--mute); margin-top: 1px; font-weight: 700; }
.meta .mono { font-weight: 700; color: var(--text); }
.meta .mono i { font-style: normal; opacity: .55; }
.sep { margin: 0 .4em; }
.todo { margin-top: 6px; font-size: 14px; line-height: 1.45; position: relative; overflow-wrap: anywhere; }
.todo.clamp { max-height: 4.35em; overflow: hidden; }
.todo.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5em; background: linear-gradient(rgba(248,249,245,0), #F8F9F5); }
.morebtn { border: 0; background: none; padding: 4px 0 0; font-size: 12.5px; font-weight: 800; text-decoration: underline; min-height: 28px; }
.gem { margin-top: 8px; font-size: 13.5px; color: var(--gem-text); padding-left: 12px; border-left: 3px solid var(--gem); line-height: 1.35; overflow-wrap: anywhere; }
.gem b { display: block; font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--gem); }
.fmt ul { margin: 2px 0; padding-left: 18px; }
.fmt p { margin: 0 0 3px; }
:root { --tsk-note-main: var(--text); --tsk-note-alt: #1f6a96; }   /* the samples in the shared hint */
.tag.tag-alt, .end .notes .tag.tag-alt, .tk-end .notes .tag.tag-alt { background: #1f6a96; color: #fff; }
.note-link { color: #006a98; text-decoration: underline; overflow-wrap: anywhere; }
.end .notes .note-link, .tk-end .notes .note-link { color: var(--plate-link); }
/* Note formatting help: a small circle, with a 44px tap area that stops short of the field. */
.fmt-hint { position: relative; display: inline-block; width: 16px; height: 16px; margin-left: 8px; padding: 0; border: 1px solid #737b6d; border-radius: 50%; background: transparent; color: #5E6658; font: italic 700 11px/14px Georgia, serif; letter-spacing: 0; text-transform: none; vertical-align: middle; cursor: pointer; }
.fmt-hint::before { content: ''; position: absolute; inset: -14px -14px -5px; }
.fmt-hint:hover { border-color: var(--text); color: var(--text); }
.tag { display: inline-block; font-size: .76em; font-weight: 800; padding: 1px 6px 0; border-radius: 3px; margin-right: 5px; background: var(--text); color: var(--bg); text-transform: uppercase; letter-spacing: .03em; vertical-align: 1px; }

.end-hd { display: flex; align-items: center; gap: 6px; }
.end .lbl { flex: 1; font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.end .lbl .mono { letter-spacing: 0; }
.end .ln { display: flex; gap: 8px; align-items: baseline; font-size: 15px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.end .maplink { color: var(--plate-link); font-size: 12px; text-decoration: none; font-weight: 800; white-space: nowrap; padding: 4px 0; }
.end .maplink:hover { text-decoration: underline; }
.end .ln.empty { border: 0; background: none; color: inherit; font-weight: 600; opacity: .8; font-size: 13.5px; padding: 4px 0; text-decoration: underline dotted; text-underline-offset: 3px; }
.notesbtn { border: 0; background: none; padding: 6px 0 2px; color: var(--plate-link); font-weight: 800; font-size: 13px; min-height: 32px; }
.end .notes { font-size: 14px; margin-top: 4px; opacity: .95; overflow-wrap: anywhere; }
.end .notes .tag { background: var(--accent); color: var(--on-accent); }

.gap { position: relative; min-height: 78px; display: grid; place-items: center; padding: 10px 16px; }
.gap > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gap .mid { position: relative; display: grid; justify-items: center; gap: 3px; max-width: 88%; }
.gap .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.travel { border: 1.5px solid var(--edge); background: var(--bg); border-radius: 99px; padding: 6px 12px 4px; font-weight: 800; font-size: 13px; white-space: nowrap; min-height: 36px; }
.travel.empty { border-style: dashed; border-color: #9AA392; color: var(--mute); font-weight: 700; }
.travel:hover { background: #fff; }
.alt { font-size: 12.5px; color: var(--mute); line-height: 1.3; text-align: center; background: var(--bg); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.addp { flex: none; border: 1.5px solid var(--on-accent); background: var(--accent); color: var(--on-accent); border-radius: 99px; padding: 6px 12px 4px; font-weight: 900; font-size: 13px; white-space: nowrap; min-height: 36px; }
.addp:hover { background: #ffd21f; }
.path-empty { font-size: 13px; font-weight: 700; color: var(--mute); background: var(--bg); padding: 0 6px; border-radius: 6px; }
.gap.editing { display: block; }

/* ─────────────────────────────── EDITORS — inline, on a draft ─────────────────────────────── */
.ed { position: relative; display: grid; gap: 12px; padding: 12px; border-radius: 14px; background: #fff; color: var(--text); box-shadow: 0 0 0 2px var(--edge), 0 8px 22px rgba(0,0,0,.14); }
.blk .ed { margin: -2px -6px 0 -10px; }
.blk.right .ed { margin: -2px -10px 0 -6px; }
.hero .ed, .why .ed { margin: 4px 0 0; }
.why:has(.ed) { background: transparent; padding: 0; }
.ed-title { font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ed .lbl { display: block; font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin-bottom: 4px; opacity: 1; flex: none; }
.ed .lbl .opt { font-weight: 600; text-transform: none; letter-spacing: 0; color: #737b6d; }
.ed .lbl .hint { font-weight: 700; text-transform: none; letter-spacing: 0; color: #7a5f00; margin-left: 6px; }
.ed-input { font-size: 16px; padding: 9px 10px 7px; border-radius: 8px; border: 1px solid #c4cbbc; width: 100%; background: #fff; color: var(--text); min-height: 44px; }
textarea.ed-input { resize: vertical; line-height: 1.45; }
.ed-input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px #e3e7dc; }
.ed-input.is-invalid { border-color: var(--gem); box-shadow: 0 0 0 3px #f7dcd9; }
.ed-expand { position: relative; float: right; width: 16px; height: 16px; padding: 0; border: 0; background: transparent; color: var(--mute); cursor: pointer; }
.ed-expand::before { content: ''; position: absolute; inset: -14px -14px -5px; }
.ed-expand svg { display: block; width: 100%; height: 100%; }
.ed-expand:hover { color: var(--text); }
.ed-expand[aria-expanded="true"] .ex-open, .ed-expand[aria-expanded="false"] .ex-close { display: none; }
.ed-wide-done { display: none; }
.ed-field.is-wide { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(22, 26, 20, .6); }
.ed-field.is-wide .ed-wide-card { display: flex; flex-direction: column; width: 100%; max-width: 760px; height: 85vh; padding: 14px; border-radius: 14px; background: #fff; }
.ed-field.is-wide textarea.ed-input { flex: 1 1 auto; min-height: 0; resize: none; transition: none; }
.ed-field.is-wide .ed-wide-done { display: block; flex: none; margin-top: 10px; min-height: 44px; }
@media (max-width: 600px) {
    .ed-field.is-wide { padding: 0; }
    .ed-field.is-wide .ed-wide-card { max-width: none; height: 100%; border-radius: 0; }
}
.ed .note { font-size: 12.5px; color: var(--mute); margin: -4px 0 0; }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tgrid button {
    border: 1px solid #d5dbe0; background: #fff; border-radius: 10px; padding: 7px 4px 5px; min-height: 56px;
    display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11.5px; font-weight: 700; line-height: 1.15; text-align: center;
    hyphens: auto; overflow-wrap: anywhere;
}
.tgrid button .e { font-size: 19px; line-height: 1.1; }
/* Ten types in a grid of three: Other takes the last row on its own, as the fallback */
.tgrid-types button[data-v="other"] { grid-column: 1 / -1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tgrid button[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); background: #FFF6CC; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid #d5dbe0; background: #fff; border-radius: 99px; padding: 6px 12px 4px; font-size: 13px; font-weight: 700; min-height: 36px; }
.chips.mono button { font-family: var(--font-mono); font-size: 12.5px; }
.chips button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.hl-list { display: grid; gap: 6px; }
.hl-row { display: flex; gap: 6px; align-items: center; }
.mini { flex: none; min-width: 40px; height: 40px; border-radius: 8px; border: 1px solid #d5dbe0; background: #fff; font-weight: 800; }
.mini.wide { padding: 0 12px; font-size: 13px; }
.mini:disabled { opacity: .35; cursor: default; }
.moves { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-btns button { border: 0; border-radius: 8px; padding: 9px 14px 7px; font-weight: 800; min-height: 44px; }
.row-btns .go { background: var(--text); color: #fff; }
.row-btns .go:hover { background: #000; }
.row-btns .no { background: var(--bg); }
.row-btns .del { background: none; color: var(--danger); margin-right: auto; padding-left: 2px; }
/* Phone: Cancel and Save side by side, Remove place on its own line below them */
@media (max-width: 899px) {
    .row-btns .del { order: 1; flex: 0 0 100%; margin-right: 0; text-align: left; }
}
.ed .hint-btn { justify-self: start; }

/* ─────────────────────────────── THE BAR — Track · Save · Share ─────────────────────────────── */
/* A documented divergence: on the phone these sit in a bar stuck to the bottom of the
   planner; on desktop the same element sits in the sidebar. */
.acts { position: sticky; bottom: 0; z-index: 900; display: flex; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--plate); }
.act-btn {
    position: relative; border: 0; border-radius: 12px; padding: 10px 6px 8px; flex: 1; min-height: 46px;
    display: flex; gap: 6px; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; background: rgba(255,255,255,.12); color: #fff;
}
.act-btn:hover { background: rgba(255,255,255,.2); }
.act-btn.primary { flex: 1.6; background: var(--accent); color: var(--on-accent); }
.act-btn.primary:hover { background: #ffd21f; }
/* The feedback button sits above the bar, not on it */
@media (max-width: 899px) { body.is-planner #tsk-fb-btn { bottom: 84px; } }

/* ─────────────────────────────── DESKTOP ─────────────────────────────── */
@media (min-width: 900px) {
    .page { display: grid; grid-template-columns: 360px minmax(0, 660px); justify-content: center; gap: 0 56px; padding: 28px 32px 60px; max-width: 1200px; margin: 0 auto; }
    /* Sticky, never its own scroller: app.js sets `top` so a sidebar taller than the window
       scrolls with the page until its bottom (the bar) is in view, then holds there. */
    .side { display: block; position: sticky; top: var(--side-top, 84px); align-self: start; }
    .main { display: block; }
    .hero { padding: 0; }
    .trip-title { font-size: 40px; }
    .arcbox { margin: 16px 0 0; }
    .why { margin: 16px 0 0; }
    .acts { position: static; margin-top: 16px; padding: 8px; border-radius: 16px; }
    .path { padding: 6px 0 0; }
    .blk { margin: 0 20px; padding-left: 32px; }
    .blk.right { padding-left: 16px; padding-right: 32px; }
    .place-hd .nm { font-size: 20px; }
    .gap { min-height: 92px; }
}

/* ─────────────────────────────── TOAST ─────────────────────────────── */
.toast {
    position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 16px); max-width: min(440px, 90vw);
    padding: 10px 16px 8px; background: var(--text); color: #fff; border-radius: 12px;
    box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 700; opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s; z-index: 1800;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
@media (max-width: 899px) { body.is-planner .toast, body.track-page .toast { bottom: 88px; } }

/* ─────────────────────────────── ABOUT SECTION ─────────────────────────────── */
.about-section { max-width: 1200px; margin: 40px auto 20px; padding: 0 16px; }
.about-toggle {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 9px 1.5rem;
    background: none; border: none; border-top: 1px dotted #b9c0ae;
    font-size: 0.8rem; font-weight: 600; color: #7d8676; text-align: left; cursor: pointer; transition: color 0.2s;
}
.about-toggle[aria-expanded="true"] { justify-content: flex-start; }
.about-toggle:not([aria-expanded="true"]) .about-title { flex: 0 1 auto; }
.about-toggle:hover { color: var(--text); }
.about-icon { font-size: 0.8rem; flex-shrink: 0; }
.about-title { flex: 1; }
.toggle-icon { font-size: 0.65rem; transition: transform 0.2s; flex-shrink: 0; }
.about-toggle[aria-expanded="true"] .toggle-icon { transform: rotate(180deg); }
.about-content { padding: 4px 20px 20px; margin-top: 4px; background: #fff; border: 1px solid #dde2d4; border-radius: var(--radius-lg); }
.about-content h2 { font-weight: 900; font-size: 1.4rem; margin: 20px 0 12px; line-height: 1.2; }
.about-content h3 { font-size: 1.05rem; font-weight: 800; margin: 20px 0 8px; }
.about-content p { font-size: 0.9rem; line-height: 1.55; color: var(--mute); margin-bottom: 8px; }
.about-content ul, .about-content ol { margin: 0 0 12px 18px; }
.about-content li { font-size: 0.9rem; line-height: 1.55; color: var(--mute); margin-bottom: 5px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.how-to-steps li { margin-bottom: 8px; }
.how-to-steps p { margin: 2px 0 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.feature-item { padding: 12px; background: var(--bg); border-radius: var(--radius-lg); }
.feature-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.feature-item p { font-size: 0.82rem; margin: 0; }
.keywords-section { margin-top: 20px; color: #737b6d; }

/* ─────────────────────────────── FOOTER (platform chrome) ─────────────────────────────── */
.app-footer { padding: 16px 16px 32px; text-align: center; font-size: 0.8125rem; color: #737b6d; font-family: var(--font-chrome); }
.app-footer p { margin-bottom: 3px; }
.footer-link { color: var(--mute); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-link:hover { color: var(--plate); border-bottom-color: var(--plate); }
.footer-separator { margin: 0 8px; color: #b9c0ae; }
.version-badge { background: none; border: none; padding: 0; font-size: 0.8125rem; color: var(--mute); cursor: pointer; border-bottom: 1px solid transparent; font-family: var(--font-chrome); }
.version-badge:hover { color: var(--plate); border-bottom-color: var(--plate); }

/* ─────────────────────────────── TRACKER (track.html) ─────────────────────────────── */
.track-wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }
.track-head { display: flex; align-items: flex-start; gap: 8px; }
.track-head .region { padding-top: 2px; }
.track-title { font-size: 26px; font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; margin: 2px 0 8px; overflow-wrap: anywhere; }
.track-progress { font-size: 13px; font-weight: 800; color: var(--mute); margin-top: 6px; }
.track-progress b { font-family: var(--font-mono); color: var(--text); }
.track-arc { margin-top: 8px; }
.track-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.tk-end { background: var(--plate); color: var(--plate-text); border-radius: 14px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; }
.tk-end .tk-disc { background: var(--plate); color: var(--accent); border-color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.tk-end-body { flex: 1; min-width: 0; }
.tk-end .lbl { font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.tk-end .lbl .mono { letter-spacing: 0; }
.tk-end .ln { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.tk-end .notes { font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.tk-end .notes .tag { background: var(--accent); color: var(--on-accent); }
.tk-body .tk-fold { color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding-top: 4px; }
.tk-end .maplink { color: var(--plate-link); font-weight: 800; font-size: 13px; text-decoration: none; padding: 6px 0; white-space: nowrap; }
.tk-step { position: relative; padding: 0 0 0 26px; margin-left: 20px; border-left: 4px solid var(--c, var(--accent)); }
.tk-step.is-done { border-left-color: #b9c0ae; }
.tk-travel { padding: 10px 0 10px; font-size: 13px; font-weight: 800; color: var(--mute); }
.tk-travel .alt { display: block; text-align: left; background: none; padding: 0; font-weight: 600; }
.tk-place { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 18px 14px 14px 18px; padding: 10px 10px 10px 0; margin-left: -46px; }
.tk-disc { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--edge); display: grid; place-items: center; font-size: 16px; line-height: 1; }
.tk-step.is-done .tk-disc { background: #CDD4C1; border-color: #9AA392; }
.tk-step.is-done .tk-name { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--mute); }
.tk-body { flex: 1; min-width: 0; }
.tk-name { font-size: 17px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.tk-step.is-current .tk-place { background: #fff; box-shadow: 0 0 0 2.5px var(--text), 0 10px 24px rgba(0,0,0,.12); }
.tk-step.is-current .tk-name { font-size: 20px; }
.tk-now { display: inline-block; font-size: 10.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); border-radius: 4px; padding: 2px 6px 0; margin-bottom: 3px; }
.tk-step .todo { font-size: 14px; }
.tk-step.is-current .gem { font-size: 15px; padding: 8px 10px 8px 12px; background: #fdecea; border-radius: 0 10px 10px 0; border-left-width: 4px; }
.tk-check {
    flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid var(--text); background: #fff;
    font-size: 20px; font-weight: 900; display: grid; place-items: center; color: transparent;
}
.tk-check:hover { background: #f3f5ee; }
.tk-step.is-done .tk-check { background: var(--plate); border-color: var(--plate); color: #fff; }
.tk-step.is-current .tk-check { color: #b9c0ae; }
.tk-map { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.track-bar { position: sticky; bottom: 0; z-index: 900; display: flex; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--plate); }
.track-bar .act-btn { text-decoration: none; }
.track-bar .act-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.track-next { max-width: 640px; margin: 0 auto; width: 100%; display: flex; gap: 8px; }
.track-empty { display: grid; gap: 14px; justify-items: start; padding: 24px 0; }
.track-done-note { margin: 18px 0 0; text-align: center; font-weight: 900; font-size: 15px; }
@media (max-width: 899px) { body.track-page #tsk-fb-btn { bottom: 84px; } }
@media (min-width: 900px) {
    .track-wrap { padding-top: 28px; }
    .track-title { font-size: 34px; }
    .track-bar { background: transparent; position: sticky; padding-bottom: 20px; }
    .track-next { background: var(--plate); padding: 8px; border-radius: 16px; }
}

/* ─────────────────────────────── SMALL SCREENS ─────────────────────────────── */
@media (max-width: 768px) {
    .tool-name-btn { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; white-space: normal; font-size: 1.5rem; }
    .tool-name-eyebrow { font-size: 0.85rem; font-weight: 600; color: #1a2332; line-height: 1.3; transition: color 0.15s; }
    .tool-name-btn:hover .tool-name-eyebrow { color: var(--plate); }
    .logo-image { height: 34px; }
    .header-icons { gap: 6px; }
}
@media (max-width: 480px) {
    .header-inner { padding: 0.4rem 0.75rem; }
    .logo-image { height: 30px; }
    .tool-name-btn { font-size: 1.2rem; }
    .header-icon-btn svg { width: 18px; height: 18px; }
    .trip-title { font-size: 28px; }
}
@media (max-width: 360px) {
    .tgrid { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────── ACCESSIBILITY ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
