:root {
  color-scheme: light;
  --ink: #172139;
  --muted: #667085;
  --line: #e4e0d8;
  --paper: #fff;
  --canvas: #f7f4ee;
  --accent: #a77928;
  --accent-dark: #755018;
  --navy: #17244a;
  --success: #27704c;
  --danger: #a73535;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 3px solid #2877d4; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; inset-inline-start: 12px; top: -60px; padding: 12px; color: white; background: var(--navy); }
.skip-link:focus { top: 12px; }
.eyebrow { margin: 0 0 6px; color: var(--accent-dark); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.08; }
h2 { margin-bottom: 8px; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 600px); align-items: center; gap: 8vw; padding: clamp(24px, 6vw, 96px); background: radial-gradient(circle at 15% 20%, #eee0bf 0 8%, transparent 29%), linear-gradient(135deg, #f8f5ef 0 58%, #eee7db 58%); }
.login-brand { display: grid; place-items: center; gap: 18px; color: var(--navy); font-family: Georgia, serif; font-size: 1.25rem; }
.brand-orbit { width: min(28vw, 260px); aspect-ratio: 1; border: 1px solid #ccb984; border-radius: 50%; box-shadow: inset 34px 22px 0 -24px #c2963e, 60px -16px 0 -58px var(--navy); transform: rotate(-18deg); }
.login-card, .dialog-card { background: rgba(255,255,255,.94); border: 1px solid rgba(23,33,57,.1); border-radius: 28px; padding: clamp(24px, 5vw, 52px); box-shadow: 0 24px 80px rgba(35,31,24,.1); }
.title-row, .page-heading, .editor-title, .panel-heading, .dialog-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
label { display: grid; gap: 8px; margin: 18px 0; color: var(--ink); font-size: .9rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #cfc9bf; border-radius: 11px; }
textarea { min-height: 130px; resize: vertical; }
.primary-button, .secondary-button, .text-button, .icon-button, .language-button { min-height: 44px; border-radius: 11px; cursor: pointer; }
.primary-button { padding: 11px 18px; border: 1px solid var(--navy); color: #fff; background: var(--navy); font-weight: 800; }
.primary-button:disabled { cursor: default; color: #8a8f98; border-color: #dedede; background: #ececec; }
.secondary-button { padding: 10px 16px; border: 1px solid #b7b0a5; color: var(--ink); background: white; font-weight: 700; }
.danger-button { min-height: 44px; padding: 10px 16px; color: #fff; background: var(--danger); border: 1px solid var(--danger); border-radius: 11px; cursor: pointer; font-weight: 800; }
.text-button, .language-button, .icon-button { padding: 8px 10px; color: var(--ink); background: transparent; border: 1px solid transparent; font-weight: 700; }
.icon-button { min-width: 44px; font-size: 1.2rem; }
.form-message { min-height: 1.4em; color: var(--danger); font-size: .9rem; }
.app-shell { min-height: 100vh; display: grid; grid-template: 68px 1fr / 250px 1fr; }
.app-header { position: sticky; top: 0; z-index: 20; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.wordmark { color: var(--navy); font-family: Georgia, serif; font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 5px; }
.sidebar { position: sticky; top: 68px; height: calc(100vh - 68px); display: flex; flex-direction: column; padding: 24px 18px; background: #fff; border-inline-end: 1px solid var(--line); }
.account-card { display: flex; align-items: center; gap: 11px; padding: 10px; margin-bottom: 24px; }
.account-card > span { display: grid; place-items: center; width: 42px; aspect-ratio: 1; color: #fff; background: var(--navy); border-radius: 50%; font-weight: 800; }
.account-card strong, .account-card small { display: block; }
.account-card small { margin-top: 2px; color: var(--muted); }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { min-height: 44px; display: flex; align-items: center; padding: 10px 13px; color: var(--ink); border-radius: 10px; text-decoration: none; font-weight: 700; }
.sidebar nav a.active { color: var(--navy); background: #f2eee4; }
.sidebar-note { margin-top: auto; padding: 14px; color: var(--muted); background: var(--canvas); border-radius: 12px; font-size: .84rem; line-height: 1.5; }
.workspace { min-width: 0; padding: clamp(24px, 4vw, 56px); }
.page-heading { align-items: end; margin-bottom: 28px; }
.trip-list { display: grid; gap: 14px; }
.trip-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 22px; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-align: start; cursor: pointer; }
.trip-card:hover { border-color: #bfa46c; }
.trip-card h2 { margin-bottom: 5px; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .9rem; }
.status-pill { align-self: start; display: inline-flex; padding: 6px 9px; color: var(--success); background: #eaf4ee; border-radius: 999px; font-size: .76rem; font-weight: 800; text-transform: capitalize; }
.empty-state { padding: 44px 24px; text-align: center; background: #fff; border: 1px dashed #beb7aa; border-radius: var(--radius); }
.notification-list { display: grid; gap: 12px; }
.notification-card { display: flex; justify-content: space-between; gap: 20px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.notification-card.unread { border-inline-start: 4px solid var(--accent); }
.notification-card h2 { margin: 8px 0 4px; font-size: 1.1rem; }
.notification-card p { margin-bottom: 8px; color: var(--muted); }
.notification-card small { color: var(--muted); }
.system-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.system-status article { display: grid; gap: 8px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.system-status span { color: var(--muted); font-size: .85rem; }
.system-status strong { font-size: 1.4rem; }
.editor-heading { margin-bottom: 20px; }
.editor-heading > button { margin-bottom: 16px; padding-inline-start: 0; }
.super-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.editor-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.section-nav { position: sticky; top: 88px; display: grid; gap: 3px; max-height: calc(100vh - 110px); overflow: auto; }
.section-nav button { min-height: 44px; padding: 10px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; text-align: start; cursor: pointer; }
.section-nav button.active { color: var(--navy); background: #eee7d8; font-weight: 800; }
.editor-panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.panel-heading { padding: 24px; border-bottom: 1px solid var(--line); }
.panel-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.view-toggle { display: flex; padding: 3px; background: var(--canvas); border-radius: 10px; }
.view-toggle button { min-height: 44px; min-width: 44px; padding: 8px 12px; color: var(--muted); border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.view-toggle button.active { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.section-form { padding: 24px; }
.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.collection-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.editor-collection { display: grid; gap: 16px; margin-top: 18px; }
.editor-item { padding: 18px; background: #fcfbf8; border: 1px solid var(--line); border-radius: 15px; }
.editor-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.editor-item-heading > label { flex: 1; margin-top: 0; }
.danger-text-button { min-height: 44px; padding: 8px 10px; color: var(--danger); background: transparent; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 800; }
.form-grid.compact label { margin: 8px 0; }
.place-editor-list { display: grid; gap: 12px; margin: 14px 0; }
.place-editor { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.nearby-editor { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.nearby-editor .editor-item-heading { align-items: center; }
.nearby-editor p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.nearby-rows { display: grid; gap: 8px; }
.nearby-row { display: grid; grid-template-columns: minmax(160px, 1fr) 130px auto; gap: 9px; align-items: end; padding: 9px; background: var(--canvas); border-radius: 10px; }
.nearby-row label { margin: 0; }
.nearby-linked-place { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.nearby-linked-place > span, .nearby-linked-place small { color: var(--muted); font-size: .78rem; }
.nearby-linked-place strong { overflow-wrap: anywhere; }
.provider-reference { display: grid; gap: 5px; margin-bottom: 12px; padding: 11px 12px; border: 1px solid #d9d2c5; border-radius: 10px; background: #f8f6f1; }
.provider-reference > span, .provider-reference small, .provider-attribution { color: var(--muted); font-size: .78rem; }
.provider-reference address { font-style: normal; color: var(--muted); }
.empty-inline { color: var(--muted); font-size: .9rem; }
.lookup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.lookup-message { margin: 10px 0 0; padding: 10px 12px; color: var(--muted); background: #f1eee7; border-radius: 9px; font-size: .86rem; }
.lookup-results { display: grid; gap: 7px; margin-top: 12px; }
.lookup-results > p { margin: 0; color: var(--muted); font-size: .85rem; }
.lookup-candidate { min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #bfb7aa; border-radius: 10px; text-align: start; cursor: pointer; }
.lookup-candidate span { color: var(--muted); font-size: .82rem; }
.lookup-candidate small { color: var(--muted); font-size: .74rem; text-transform: capitalize; }
.day-stops-editor { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.day-stops-editor .editor-item-heading p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.day-stop-rows { display: grid; gap: 10px; }
.day-stop-row { display: grid; grid-template-columns: 36px minmax(180px, 1.4fr) minmax(130px, .8fr) 100px minmax(180px, 1.2fr) auto; gap: 10px; align-items: end; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.day-stop-row:first-child { grid-template-columns: 36px minmax(180px, 1fr) auto; }
.day-stop-row label { margin: 0; }
.day-stop-number { align-self: center; display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--navy); border-radius: 50%; font-size: .82rem; font-weight: 900; }
.route-note { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.inline-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.preview-frame { min-height: 560px; padding: 24px; background: #ebe8e0; }
.phone-preview { width: min(100%, 430px); min-height: 640px; margin: auto; background: white; border: 8px solid #202638; border-radius: 30px; overflow: hidden; box-shadow: 0 16px 50px rgba(20,25,35,.18); }
.exact-preview-shell { position: relative; min-height: 760px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.exact-trip-preview { display: block; width: 100%; min-height: 760px; border: 0; background: #fff; }
.exact-preview-shell .trip-draft-ribbon { position: sticky; top: 0; z-index: 4; margin: 0; border-radius: 0; text-align: center; }
.exact-content-fields { margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fbfaf7; }
.exact-content-fields > summary { cursor: pointer; min-height: 44px; font-weight: 800; }
.exact-content-fields > summary span { margin-inline-start: 8px; color: var(--muted); font-weight: 600; }
.exact-field-list { display: grid; gap: 12px; }
.exact-field { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.exact-field > strong { display: block; margin-bottom: 10px; overflow-wrap: anywhere; }
.exact-timeline-row { grid-template-columns: auto minmax(110px, .6fr) minmax(220px, 1.4fr) minmax(220px, 1.4fr) minmax(120px, .5fr) auto; }
.preview-hero { min-height: 260px; display: flex; align-items: end; padding: 24px; color: #fff; background: linear-gradient(15deg, rgba(15,27,52,.92), rgba(15,27,52,.15)), linear-gradient(135deg, #b78c42, #34466d); }
.preview-hero h2 { font-family: Georgia, serif; font-size: 2rem; }
.preview-content { padding: 22px; }
.preview-content article { padding: 15px 0; border-bottom: 1px solid var(--line); }
.public-trip-page { background: #fff; }
.trip-renderer { min-height: 100%; color: var(--ink); background: #fff; }
.trip-draft-ribbon { position: sticky; z-index: 8; top: 0; padding: 7px 14px; color: #fff; background: #9c651a; text-align: center; font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.trip-public-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.trip-public-header strong { color: var(--navy); font-family: Georgia, serif; font-size: 1.15rem; }
.trip-public-header button { min-width: 44px; min-height: 44px; color: var(--navy); background: transparent; border: 0; font-weight: 800; cursor: pointer; }
.trip-header-actions { display: flex; align-items: center; gap: 3px; }
.trip-public-nav { position: sticky; z-index: 7; top: 0; display: flex; gap: 4px; padding: 7px 12px; overflow-x: auto; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.trip-draft-ribbon + .trip-public-header + .trip-public-nav { top: 29px; }
.trip-public-nav::-webkit-scrollbar { display: none; }
.trip-public-nav a { min-height: 44px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 8px 10px; color: var(--ink); text-decoration: none; font-size: .84rem; font-weight: 800; }
.trip-public-hero { position: relative; min-height: 330px; display: flex; align-items: flex-end; isolation: isolate; overflow: hidden; color: #fff; background: linear-gradient(140deg, #af8237, #182a50); }
.trip-public-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(10deg, rgba(10,21,45,.9), rgba(10,21,45,.08)); }
.trip-public-hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trip-public-hero > div { padding: clamp(24px, 7vw, 70px); max-width: 850px; }
.trip-public-hero h1 { margin: 5px 0 10px; color: #fff; font-family: Georgia, serif; font-size: clamp(2rem, 7vw, 4.6rem); }
.trip-public-hero p:first-child { margin: 0; color: #f5d795; font-size: .78rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.trip-public-hero p { max-width: 650px; line-height: 1.55; }
.trip-section { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: clamp(35px, 7vw, 74px) 0; }
.trip-section + .trip-section { border-top: 1px solid var(--line); }
.trip-section > h2 { margin-bottom: 24px; color: var(--navy); font-family: Georgia, serif; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.trip-city + .trip-city { margin-top: 40px; }
.trip-place-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trip-place-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.trip-place-card > img, .trip-image-placeholder { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; background: linear-gradient(135deg, #e6d7b8, #9ba5bb); }
.trip-place-card > div { padding: 18px; }
.trip-place-card h4 { margin: 7px 0; font-size: 1.15rem; }
.trip-place-card p, .trip-place-card address { color: var(--muted); line-height: 1.5; }
.trip-place-card address { font-style: normal; font-size: .88rem; }
.trip-local-identity { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.trip-local-identity summary { min-height: 44px; display: flex; align-items: center; color: var(--navy); cursor: pointer; font-size: .84rem; font-weight: 900; }
.trip-local-identity strong, .trip-local-identity address { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.trip-place-actions { display: flex; gap: 8px; margin-top: 14px; }
.trip-place-actions a { min-width: 64px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; color: #fff; background: var(--navy); border-radius: 9px; text-decoration: none; font-size: .78rem; font-weight: 900; }
.trip-nearby { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.trip-nearby summary { min-height: 44px; display: flex; align-items: center; color: var(--navy); cursor: pointer; font-size: .86rem; font-weight: 900; }
.trip-nearby ul { display: grid; gap: 8px; padding: 0; margin: 8px 0 0; list-style: none; }
.trip-nearby li { display: flex; justify-content: space-between; gap: 10px; padding: 9px; background: var(--canvas); border-radius: 8px; }
.trip-nearby small { color: var(--muted); }
.trip-tag { display: inline-flex; padding: 4px 8px; color: var(--accent-dark); background: #f5edda; border-radius: 999px; font-size: .7rem; font-weight: 900; text-transform: capitalize; }
.trip-listing, .trip-days { display: grid; gap: 12px; }
.trip-listing article, .trip-days article { padding: 18px; background: var(--canvas); border-radius: 14px; }
.trip-listing h3, .trip-days h3 { margin: 4px 0 8px; }
.trip-item-date, .trip-days article > span { color: var(--accent-dark); font-size: .78rem; font-weight: 900; }
.trip-item-selector { display: flex; gap: 8px; margin: 0 0 16px; padding-bottom: 4px; overflow-x: auto; }
.trip-item-selector a { min-height: 44px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 8px 12px; color: var(--navy); background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 900; }
.trip-route-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0 0; }
.trip-route-facts div { padding: 10px; background: #fff; border-radius: 9px; }
.trip-route-facts dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.trip-route-facts dd { margin: 4px 0 0; font-weight: 900; overflow-wrap: anywhere; }
.trip-days ol { display: grid; gap: 8px; padding: 0; color: var(--muted); list-style: none; }
.trip-days li { display: grid; gap: 6px; }
.trip-day-route { display: flex; flex-wrap: wrap; gap: 5px 10px; padding: 8px 10px; color: var(--muted); background: #fff; border-inline-start: 3px solid var(--accent); border-radius: 8px; font-size: .82rem; }
.trip-day-route strong { color: var(--navy); }
.trip-day-stop { display: block; padding: 8px 10px; color: var(--ink); font-weight: 800; }
.trip-emergency { margin-top: 24px; }
.trip-emergency > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.trip-emergency article { display: grid; gap: 5px; padding: 12px; background: var(--canvas); border-radius: 10px; }
.trip-emergency span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.trip-emergency a { min-height: 44px; display: flex; align-items: center; color: var(--navy); font-weight: 900; overflow-wrap: anywhere; }
.trip-loading { padding: 40px; text-align: center; }
.trip-profile > p { color: var(--muted); }
.trip-checklist { display: grid; gap: 8px; margin: 18px 0; }
.trip-checklist label { min-height: 48px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; background: var(--canvas); border-radius: 9px; }
.trip-checklist input { width: 22px; min-height: 22px; }
.trip-checklist button { min-width: 44px; min-height: 44px; color: var(--danger); background: transparent; border: 0; cursor: pointer; font-size: 1.2rem; }
[data-add-check] { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
[data-add-check] button { min-height: 48px; padding: 10px 15px; color: #fff; background: var(--navy); border: 0; border-radius: 10px; font-weight: 800; }
.trip-private-details { margin-top: 12px; padding: 10px 12px; background: #fff5da; border: 1px solid #d9bd76; border-radius: 9px; }
.trip-private-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 900; }
.traveler-dialog-card { width: min(92vw, 460px); padding: 26px; background: #fff; border-radius: 20px; }
.traveler-dialog-card > div { display: flex; justify-content: flex-end; gap: 8px; }
.traveler-dialog-card button { min-height: 44px; padding: 9px 14px; border: 1px solid var(--navy); border-radius: 9px; background: #fff; cursor: pointer; font-weight: 800; }
.traveler-dialog-card button[type="submit"] { color: #fff; background: var(--navy); }
.traveler-dialog-card [role="alert"] { min-height: 1.4em; color: var(--danger); }
.traveler-admin-card { width: min(94vw, 680px); }
.traveler-admin-list { display: grid; gap: 8px; max-height: 310px; margin: 18px 0; overflow: auto; }
.traveler-admin-list article { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.traveler-admin-list article div { display: grid; gap: 2px; min-width: 0; }
.traveler-admin-list article span, .traveler-admin-list article small { overflow-wrap: anywhere; color: var(--muted); }
.phone-preview .trip-public-header { font-size: .8rem; }
.phone-preview .trip-public-nav { top: 29px; }
.phone-preview .trip-public-hero { min-height: 260px; }
.phone-preview .trip-public-hero > div { padding: 22px; }
.phone-preview .trip-public-hero h1 { font-size: 2rem; }
.phone-preview .trip-section { width: calc(100% - 32px); padding: 30px 0; }
.phone-preview .trip-place-grid { grid-template-columns: 1fr; }
.publish-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.publish-bar > div { display: flex; gap: 8px; }
#save-state { color: var(--muted); font-size: .88rem; }
dialog { width: min(92vw, 680px); max-height: 90vh; padding: 0; border: 0; border-radius: 28px; background: transparent; }
dialog::backdrop { background: rgba(17,24,39,.55); backdrop-filter: blur(3px); }
.dialog-card { overflow: auto; }
.dialog-actions { align-items: center; justify-content: flex-end; margin-top: 24px; }
.mobile-only { display: none; }
[dir="rtl"] .section-nav button, [dir="rtl"] .trip-card { text-align: right; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar { position: fixed; z-index: 30; top: 68px; bottom: 0; inset-inline-start: 0; width: min(82vw, 280px); height: auto; transform: translateX(-110%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.12); }
  [dir="rtl"] .sidebar { transform: translateX(110%); }
  .sidebar.open { transform: translateX(0); }
  .workspace { grid-column: 1; }
  .editor-layout { grid-template-columns: 1fr; }
  .section-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .day-stop-row, .day-stop-row:first-child { grid-template-columns: 36px minmax(170px, 1fr) minmax(130px, .7fr); }
  .day-stop-row .route-note { grid-column: 2 / -1; }
  .day-stop-row .danger-text-button { grid-column: -2 / -1; }
}

@media (max-width: 560px) {
  .app-header { padding: 0 10px; }
  .header-actions .text-button { display: none; }
  .workspace { padding: 18px 12px 90px; }
  .page-heading, .editor-title, .panel-heading { align-items: flex-start; }
  .page-heading { flex-direction: column; }
  .page-heading .primary-button { width: 100%; }
  .editor-title { flex-direction: column; gap: 8px; }
  .super-controls { display: grid; grid-template-columns: 1fr; }
  .panel-heading { display: grid; }
  .form-grid, .inline-fields { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .section-form, .panel-heading { padding: 18px; }
  .publish-bar { padding: 12px; align-items: stretch; flex-direction: column; }
  .publish-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .publish-bar button { width: 100%; }
  .trip-card { grid-template-columns: 1fr; }
  .collection-toolbar { align-items: stretch; flex-direction: column; }
  .collection-toolbar button { width: 100%; }
  .editor-item { padding: 14px; }
  .nearby-row { grid-template-columns: 1fr; }
  .day-stops-editor .editor-item-heading { display: grid; }
  .day-stops-editor .editor-item-heading .secondary-button { width: 100%; }
  .day-stop-row, .day-stop-row:first-child { grid-template-columns: 32px minmax(0, 1fr); align-items: start; }
  .day-stop-row > :not(.day-stop-number) { grid-column: 2; width: 100%; }
  .day-stop-row .danger-text-button { grid-column: 2; justify-self: start; }
  .trip-place-grid { grid-template-columns: 1fr; }
  .exact-preview-shell, .exact-trip-preview { min-height: 700px; }
  .exact-timeline-row, .exact-timeline-row:first-child { grid-template-columns: 32px minmax(0, 1fr); }
  .exact-timeline-row > :not(.day-stop-number) { grid-column: 2; }
  [data-add-check] { grid-template-columns: 1fr; }
}

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