@import url("./fonts.css");

:root {
  color-scheme: light;
  --paper: #f8f7f1;
  --white: #fffefb;
  --ink: #243730;
  --muted: #58645b;
  --forest: #25483c;
  --deep: #203c32;
  --green: #e9efe7;
  --gold: #e0b267;
  --line: #dedfd5;
  --display: Fraunces, Georgia, serif;
  --body: Figtree, system-ui, sans-serif;
  --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--body); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin-block-start: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.13; letter-spacing: -.025em; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: .35rem; }
h3 { font-size: 1.45rem; margin-bottom: .6rem; }
:focus-visible { outline: 2px solid #9b691d; outline-offset: 4px; }
.skip-link { position: fixed; left: 16px; top: 8px; z-index: 1000; transform: translateY(-150%); padding: 10px 16px; border-radius: 8px; background: var(--white); }
.skip-link:focus { transform: none; }
[data-icon] { display: inline-grid; place-items: center; flex: none; }
[data-icon] svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.shell, .header-inner { width: min(100% - 80px, 1192px); margin-inline: auto; }
.header { position: sticky; top: 0; z-index: 500; border-bottom: 1px solid #e5e5db; background: var(--paper); }
.header-inner { height: 77px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.brand { display: inline-flex; justify-self: start; gap: 10px; align-items: center; text-decoration: none; color: var(--forest); font: 600 1.18rem/1.2 var(--display); white-space: nowrap; }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--forest); color: #fff3d4; }
.brand-icon svg { width: 22px; height: 22px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .92rem; font-weight: 650; white-space: nowrap; }
.main-nav a:hover, .main-nav [aria-current="page"] { background: var(--green); color: var(--forest); }
.main-nav a svg { height: 16px; width: 16px; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--forest); background: var(--white); font-weight: 700; font-size: .92rem; line-height: 1.3; }
.button:hover { border-color: #a4b2a4; background: var(--green); }
.button svg { width: 17px; height: 17px; }
.button-icon { position: relative; width: 43px; padding: 0; }
.primary { background: var(--forest); color: white; border-color: var(--forest); }
.primary:hover { background: #305749; color: white; border-color: #305749; }
.alert-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: #b16b20; }
.page { padding-top: 24px; }
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 314px;
  border-radius: 18px;
  color: #fffdf5;
  background-color: #28463b;
  background-image: linear-gradient(90deg, #132c23e8 0%, #183329c9 29%, #213d2d47 63%, #273d1f10 100%), url("./nilgiris.webp");
  background-size: cover;
  background-position: center, center 53%;
}
.hero-content { padding: 35px clamp(24px, 4.4vw, 65px); }
.hero-location { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 700; color: #f2dfb6; margin-bottom: 16px; }
.hero-location svg { height: 17px; width: 17px; }
.hero h1 { max-width: 720px; margin-bottom: 12px; font-weight: 550; letter-spacing: -.05em; }
.hero h1 em { font-weight: 550; color: #f8d998; }
.hero p:last-child { margin: 0; color: #fff8e6; font-size: clamp(1rem, 1.65vw, 1.15rem); }
.plan-toolbar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 13px 0; border-bottom: 1px solid var(--line); }
.plan-toolbar a, .text-button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--forest); text-decoration: none; font-weight: 700; font-size: .92rem; }
.plan-toolbar a:hover, .text-button:hover { text-decoration: underline; text-underline-offset: .22em; }
.plan-toolbar a, .plan-toolbar button { padding: 5px 0; }
.plan-toolbar svg, .footer svg { width: 17px; height: 17px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 34px 0 17px; }
.section-heading p, .page-intro p { color: var(--muted); margin: 0; }
.status-label { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--muted); white-space: nowrap; font-size: .875rem; font-weight: 650; }
.status-label svg { width: 15px; height: 15px; }
.day-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.day-tabs button { display: grid; gap: 3px; min-height: 76px; padding: 11px 16px; text-align: left; border: 1px solid var(--line); border-radius: 10px; color: var(--forest); background: var(--white); }
.day-tabs button > span { font-size: .875rem; color: var(--muted); font-weight: 650; }
.day-tabs button > strong { font-size: 1rem; font-weight: 750; line-height: 1.25; }
.day-tabs button:hover { border-color: #91aa97; }
.day-tabs button[aria-selected="true"] { color: #fffdf5; background: var(--forest); border-color: var(--forest); }
.day-tabs button[aria-selected="true"] > span { color: #f2dca5; }
.day-layout { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 16px; align-items: start; grid-template-areas: "overview route" "schedule route"; grid-template-rows: auto 1fr; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.day-overview, .timeline-panel, .route-panel, .info-panel { padding: 23px; }
.panel-kicker { color: var(--forest); font-weight: 750; margin-bottom: 7px; font-size: .88rem; }
.panel-title { font-size: clamp(1.55rem, 2.4vw, 2rem); }
.panel-description { color: var(--muted); margin-bottom: 17px; }
.timeline-label { margin: 0 0 8px; font-size: 1.35rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 76px 18px minmax(0, 1fr); align-items: start; gap: 8px; position: relative; }
.timeline li + li .event { border-top: 1px solid var(--line); }
.timeline time { font-size: .86rem; line-height: 1.4; font-weight: 750; color: var(--forest); padding-top: 13px; }
.timeline-mark { position: relative; min-height: 100%; display: flex; justify-content: center; }
.timeline-mark::before { content: ""; position: absolute; top: 18px; bottom: -19px; width: 1px; background: #cbd9cb; }
.timeline-mark b { position: relative; z-index: 1; margin-top: 16px; width: 8px; height: 8px; border: 2px solid #768e74; border-radius: 50%; background: #fffefb; }
.timeline li:last-child .timeline-mark::before { content: none; }
.event { padding: 10px 0 12px; }
.event h4 { margin: 0 0 3px; line-height: 1.35; font-size: 1rem; }
.event p { color: var(--muted); margin: 0; font-size: .92rem; }
.event a { display: inline-flex; gap: 4px; align-items: center; margin-top: 5px; color: var(--forest); font-size: .875rem; text-underline-offset: .18em; font-weight: 700; }
.event a svg { width: 14px; height: 14px; }
.route-meta { color: var(--muted); font-size: .88rem; margin-bottom: 13px; }
.route-select { display: grid; gap: 5px; margin-bottom: 12px; }
.route-select select { width: 100%; }
.map-frame { height: 286px; position: relative; z-index: 0; overflow: hidden; border-radius: 11px; border: 1px solid #d5ddce; background: #e6eddf; }
.map-frame .leaflet-container { background: #e6eddf; }
.map-frame:empty::before { content: "Loading the route map"; display: grid; height: 100%; place-items: center; color: var(--muted); font-size: .9rem; }
.map-marker { width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: #2c5948; color: #fff; box-shadow: 0 1px 5px #182e2478; font: 700 13px/1 var(--body); }
.route-panel .map-action { margin: 13px 0 0; width: 100%; }
.route-panel details { margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; color: var(--forest); }
.route-panel details p { color: var(--muted); font-size: .92rem; margin: 7px 0 0; }
.route-stops { color: var(--muted); margin-bottom: 1px; padding-left: 24px; font-size: .92rem; }
.route-stops li + li { margin-top: 3px; }
.route-stops a { text-underline-offset: .17em; }
.map-source, .footnote { font-size: .875rem; color: var(--muted); }
.map-source { margin: 7px 0 0; }
.rest-panel { background: var(--green); }
.route-choice { margin: 0 0 16px; padding: 13px 15px; border: 1px solid #d8e2d5; border-radius: 10px; background: var(--green); }
.route-choice label { display: grid; gap: 6px; }
.route-choice p { margin: 8px 0 0; font-size: .93rem; color: var(--forest); }
.planning-section { margin-top: 40px; }
.explorer { padding: 22px; }
.explorer-controls { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
label { color: var(--forest); font-weight: 700; font-size: .92rem; }
.explorer-controls label, #alert-form label { display: grid; gap: 5px; }
input, select, textarea { min-width: 0; width: 100%; min-height: 43px; border: 1px solid #ced5c9; border-radius: 8px; padding: 8px 11px; background: var(--white); color: var(--ink); }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%2325483c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input[type="checkbox"] { accent-color: var(--forest); width: 19px; min-height: 19px; margin: 2px 0; flex: none; }
.result-count { color: var(--muted); font-size: .9rem; margin: 13px 0 8px; }
.place-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.checkbox-label { display: flex; align-items: start; gap: 8px; font-weight: 600; }
.data-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.data-list dd { margin: 0; text-align: right; font-weight: 700; }
.footnote { margin: 9px 0 0; }
.page-intro { padding: 25px 0 20px; }
.page-intro h1 { font-size: clamp(2.65rem, 5.8vw, 4.25rem); margin: 0 0 .22em; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.info-panel .data-list { margin: 0; }
.data-list div { border-color: var(--line); }
.data-list dt, .muted { color: var(--muted); }
.info-panel ul { margin: 0; padding-left: 21px; }
.info-panel li + li { margin-top: 7px; }
.info-panel .route-choice + .route-choice { margin-bottom: 0; }
.checklist { display: grid; gap: 8px; margin: 8px 0 0; }
.checklist .checkbox-label { padding: 6px 0; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.rule { margin: 0; padding: 11px 0; border-top: 1px solid var(--line); }
.rule p { margin: 0; }
.rule p + p { margin-top: 2px; color: var(--muted); }
.rule a { text-underline-offset: .16em; }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 36px; padding: 20px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-name { color: var(--forest); font-weight: 750; }
.footer button { padding: 5px 0; }
.offline-updates-option { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
#offline-status:empty { display: none; }
dialog { padding: 0; width: min(100% - 34px, 490px); max-height: min(88vh, 700px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--white); }
dialog::backdrop { background: #14251cc2; }
.dialog-inner { padding: 23px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.dialog-heading h2 { font-size: 1.85rem; }
.alerts-list article { padding: 10px 0; border-top: 1px solid var(--line); }
.alerts-list article time { color: var(--muted); font-size: .86rem; }
.alerts-list article p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#alert-editor { padding-top: 10px; border-top: 1px solid var(--line); }
#alert-form { display: grid; justify-items: start; gap: 9px; margin-top: 9px; }
#alert-form label { width: 100%; }
#alert-form p { margin: 0; font-size: .9rem; }
.share-options { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; z-index: 600; bottom: 23px; left: 50%; width: max-content; max-width: calc(100% - 30px); transform: translateX(-50%); border-radius: 8px; padding: 9px 13px; background: var(--forest); color: #fff; box-shadow: 0 2px 8px #22392d45; font-size: .9rem; }
.print-only { display: none; }
@media (max-width: 940px) {
  .shell, .header-inner { width: calc(100% - 48px); }
  .header-inner { gap: 10px; }
  .main-nav a { padding: 8px; gap: 4px; }
  .day-overview, .timeline-panel, .route-panel, .info-panel { padding: 18px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 76px; }
  body { padding-bottom: calc(63px + env(safe-area-inset-bottom)); }
  .shell, .header-inner { width: calc(100% - 30px); }
  .header-inner { height: 60px; grid-template-columns: 1fr auto; }
  .header-actions { gap: 6px; }
  .button-icon, .share-button { min-height: 38px; width: 38px; padding: 0; }
  .share-label { display: none; }
  .main-nav { position: fixed; inset: auto 0 0; justify-content: space-evenly; gap: 2px; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
  .main-nav a { flex: 1; min-height: 52px; max-width: 133px; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; font-size: .875rem; }
  .main-nav a svg { width: 19px; height: 19px; }
  .page { padding-top: 14px; }
  .hero { min-height: 256px; border-radius: 13px; background-position: center, 57% center; }
  .hero-content { padding: 24px 20px; }
  .hero h1 { max-width: 390px; margin-bottom: 9px; }
  .hero-location { margin-bottom: 11px; }
  .plan-toolbar { gap: 5px 15px; padding: 9px 0; }
  .plan-toolbar a, .plan-toolbar button { min-height: 39px; }
  .section-heading { align-items: start; margin: 24px 0 13px; flex-wrap: wrap; gap: 7px; }
  .status-label { padding: 4px 7px; }
  .day-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .day-tabs button { min-height: 62px; padding: 8px 10px; }
  .day-layout, .page-grid, .place-list { grid-template-columns: 1fr; gap: 11px; }
  .day-layout { grid-template-areas: "overview" "route" "schedule"; grid-template-rows: auto; }
  .map-frame { height: 224px; }
  .explorer { padding: 16px; }
  .explorer-controls { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; }
  .timeline li { grid-template-columns: 65px 14px minmax(0, 1fr); gap: 5px; }
  .toast { bottom: calc(75px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { color: black; background: white; padding: 0; font-size: 10pt; }
  .header, main, .footer, .skip-link, dialog, .toast { display: none !important; }
  .print-only { display: block; }
  .print-only h1 { font-size: 24pt; }
  .print-only h2 { margin-top: 14pt; font-size: 15pt; }
  .print-only li { break-inside: avoid; }
}
/* Daily entry and interactive place guides */
.day-overview { grid-area: overview; }
.timeline-panel { grid-area: schedule; }
.route-panel { grid-area: route; }
.day-overview > :last-child { margin-bottom: 0; }
.day-entry {
  margin: 0 0 17px;
  border: 1px solid #d1ded1;
  border-radius: 10px;
  background: var(--green);
}
.entry-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  list-style: none;
}
.entry-bar::-webkit-details-marker { display: none; }
.entry-heading { display: flex; flex: 1; align-items: center; gap: 9px; color: var(--forest); }
.entry-heading strong, .entry-heading small { display: block; line-height: 1.35; }
.entry-heading small { margin-top: 3px; color: var(--muted); font-size: .875rem; font-weight: 600; }
.entry-total { color: var(--deep); font: 650 1.52rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-total small { font: 650 .875rem/1.2 var(--body); }
.entry-bar > [data-icon] { transition: transform .15s ease; }
.day-entry[open] .entry-bar > [data-icon] { transform: rotate(180deg); }
.entry-breakdown { margin: 0; padding: 0 13px; }
.entry-breakdown div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; border-top: 1px solid #d2dfd1; font-size: .9rem; }
.entry-breakdown dd { margin: 0; font-weight: 700; color: var(--forest); }
.day-entry p { margin: 0; padding: 3px 13px 11px; color: var(--muted); font-size: .86rem; }
.event-spots { display: grid; gap: 7px; margin: 0 0 7px; }
.spot-preview {
  display: grid;
  grid-template-columns: minmax(100px, 32%) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 85px;
  padding: 0;
  text-align: left;
  background: var(--white);
  color: var(--forest);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.spot-preview:hover, .place-card-hit:hover { border-color: #809a87; background: var(--green); }
.spot-image { display: block; position: relative; min-width: 0; overflow: hidden; background: #dfe7db; }
.spot-image img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; }
.spot-preview .spot-image { height: 100%; min-height: 85px; }
.spot-preview .spot-image img { height: 100%; position: absolute; inset: 0; }
.image-label { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px; background: #203c32f2; color: #fffdf5; font-size: .75rem; font-weight: 700; line-height: 1.2; }
.spot-preview-copy, .place-card-copy { display: grid; gap: 3px; padding: 9px 11px; min-width: 0; line-height: 1.32; }
.spot-preview-copy strong, .place-card-copy strong { color: var(--forest); }
.spot-preview-copy small, .place-card-copy small { color: var(--muted); font-size: .875rem; }
.spot-action { display: block; color: var(--forest); font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.place-card { display: flex; min-width: 0; }
.place-card-hit { width: 100%; display: grid; align-content: start; gap: 2px; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.place-card-hit .spot-image { max-height: 186px; }
.place-card-hit .spot-image img { height: clamp(100px, 20vw, 186px); }
.place-card-copy { padding: 10px 12px 12px; }
#place-dialog { width: min(100% - 34px, 620px); }
#place-dialog .spot-image { border-radius: 9px; }
#place-dialog .spot-image img { width: 100%; max-height: 350px; object-fit: contain; }
#place-dialog .dialog-heading h2 { margin-bottom: 0; }
.image-credit { margin: 5px 0 0; color: var(--muted); font-size: .81rem; }
.place-description { margin: 13px 0; color: var(--muted); }
.spot-activities { margin: 0 0 13px; padding-left: 20px; }
.spot-activities li + li { margin-top: 4px; }
.place-facts { display: grid; gap: 7px; padding: 9px 0; margin: 0 0 11px; border-block: 1px solid var(--line); }
.place-facts div { display: grid; grid-template-columns: minmax(62px, 22%) minmax(0, 1fr); gap: 6px; font-size: .92rem; }
.place-facts dt { font-weight: 750; color: var(--forest); }
.place-facts dd { margin: 0; color: var(--muted); }
@media (min-width: 850px) { .place-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .place-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .spot-preview { grid-template-columns: minmax(70px, 31%) minmax(0, 1fr); }
  .spot-preview-copy { padding: 8px; }
}
@media (max-width: 350px) {
  .place-list { grid-template-columns: minmax(0, 1fr); }
  .spot-preview-copy small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .entry-bar > [data-icon] { transition: none; } }

/* Appearance and schedule layout */
:root {
  --primary: #25483c;
  --primary-hover: #305749;
  --field-border: #ced5c9;
  --panel-border: #d1ded1;
  --focus: #9b691d;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #172620;
  --white: #1d2f28;
  --ink: #f0f4ec;
  --muted: #b7c8be;
  --forest: #c0e4d0;
  --deep: #daeee2;
  --green: #284338;
  --line: #39554a;
  --primary: #315c4b;
  --primary-hover: #3d6a57;
  --field-border: #526e61;
  --panel-border: #47675a;
  --focus: #e6bc78;
}
:focus-visible { outline-color: var(--focus); }
.header { border-bottom-color: var(--line); }
.brand-icon, .toast { background: var(--primary); }
.primary, .day-tabs button[aria-selected="true"] { background: var(--primary); border-color: var(--primary); }
.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
input, select, textarea { border-color: var(--field-border); }
.timeline-mark::before, .timeline-mark b { background: var(--line); }
.timeline-mark b { background: var(--white); }
.route-choice, .day-entry, .entry-breakdown div { border-color: var(--panel-border); }
:root[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23c0e4d0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .spot-image { background: var(--paper); }
.theme-field { display: grid; gap: 6px; margin-top: 12px; }
.timeline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.timeline-toolbar .timeline-label { margin: 0; }
.view-switch { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.view-switch button { border: 0; border-radius: 6px; padding: 5px 9px; min-height: 34px; color: var(--forest); background: transparent; font-size: .875rem; font-weight: 700; }
.view-switch button[aria-pressed="true"] { background: var(--green); }
[data-layout="list"] .spot-preview { display: block; min-height: 0; }
[data-layout="list"] .spot-preview .spot-image,
[data-layout="list"] .spot-preview-copy small { display: none; }
[data-layout="list"] .spot-preview-copy { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
[data-layout="list"] .event { padding-block: 8px; }

/* Shared trip photos */
.gallery-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 13px; }
.gallery-message { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: var(--muted); }
.gallery-message > [data-icon] { color: var(--forest); }
.gallery-message p { margin: 0; }
.gallery-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.gallery-list:has(.drive-album) { display: block !important; width: 100%; max-width: 100%; }
.gallery-card { min-width: 0; display: grid; align-content: start; padding: 0; overflow: hidden; text-align: left; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.gallery-card:hover { border-color: var(--focus); }
.gallery-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--green); }
.gallery-card-copy { display: grid; gap: 2px; padding: 9px 10px 12px; overflow-wrap: anywhere; }
.gallery-card-copy small { color: var(--muted); font-size: .875rem; }
#gallery-more { margin-top: 13px; }
.photo-upload-form { display: grid; gap: 11px; }
.photo-upload-form p { margin: 0; }
.photo-upload-form label input, .photo-upload-form label select { margin-top: 5px; }
.photo-picker input { cursor: pointer; }
#photo-submit { justify-self: start; }
#photo-submit:disabled { opacity: .64; cursor: default; }
#photo-upload-status:empty, #gallery-photo-caption:empty, #gallery-photo-status:empty { display: none; }
.gallery-photo-dialog { width: min(100% - 30px, 720px); }
#gallery-photo-image { width: 100%; max-height: 56vh; display: block; object-fit: contain; background: var(--paper); border-radius: 9px; }
#gallery-photo-caption { margin: 8px 0 0; overflow-wrap: anywhere; }
#gallery-photo-meta { margin: 5px 0; font-size: .88rem; }
.remove-photo { padding: 4px 0; }
#gallery-photo-status { margin: 5px 0 0; }
@media (max-width: 880px) { .gallery-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gallery-list:has(.drive-album) { display: block; } }
@media (min-width: 701px) and (max-width: 820px) {
  .main-nav a > [data-icon], .share-label { display: none; }
  .share-button { padding-inline: 10px; }
}
@media (max-width: 700px) { .gallery-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .gallery-list:has(.drive-album) { display: block; } }
@media (max-width: 360px) { .brand { gap: 6px; font-size: 1.04rem; } }

/* Meetups and shared announcements */
.trip-update-banner { margin-top: 10px; }
.trip-update-open {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  background: var(--green);
  color: var(--forest);
  text-align: left;
}
.trip-update-open:hover { border-color: var(--focus); }
.trip-update-open [data-icon] svg { width: 17px; height: 17px; }
#trip-update-headline { flex: 1; font-weight: 700; overflow-wrap: anywhere; }
.trip-update-action { flex-shrink: 0; text-decoration: underline; text-underline-offset: .17em; font-size: .875rem; }
.day-meetup { margin-bottom: 15px; padding: 10px 12px; border: 1px solid var(--panel-border); border-inline-start: 3px solid var(--focus); border-radius: 9px; }
.meetup-header { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
.meetup-header h4 { margin: 0; color: var(--forest); font-size: .95rem; }
.edit-meetup { padding: 3px 0; }
.meetup-details { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-top: 5px; }
.meetup-point { min-width: 0; overflow-wrap: anywhere; }
.meetup-time { color: var(--forest); font-weight: 750; white-space: nowrap; }
.meetup-note, .notice-status { margin: 5px 0 0; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.meetup-map { margin-top: 8px; }
.meetup-form { display: grid; gap: 11px; }
.meetup-form label { display: grid; gap: 4px; }
.meetup-form .button { justify-self: start; }
#meetup-status { margin: 0; }
#meetup-status:empty { display: none; }
.shared-alert .shared-alert-title { margin: 5px 0 0; font-size: 1.04rem; overflow-wrap: anywhere; }
.shared-alert-remove { margin-top: 6px; padding: 0; }
.shared-alert p { overflow-wrap: anywhere; }
@media (max-width: 480px) { .trip-update-action { display: none; } }
@media print { .trip-update-banner { display: none !important; } }

/* Shared Drive album */
.gallery-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.drive-album { display: block; width: 100%; max-width: 100%; margin: 0; padding: 18px; box-sizing: border-box; grid-column: 1 / -1; }
.drive-album-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 14px; }
.drive-album-copy { margin: 6px 0 0; max-width: 62ch; }
.drive-album-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drive-frame-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.drive-frame { display: block; width: 100%; min-height: 72vh; border: 0; background: #fff; }
.drive-album-foot { margin: 10px 0 0; font-size: .875rem; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.danger-button { background: #8b2e2e; border-color: #8b2e2e; color: #fff; }
.danger-button:hover { filter: brightness(1.03); }
@media (max-width: 700px) {
  .drive-album { padding: 14px; }
  .drive-frame { min-height: 62vh; }
  .confirm-actions { justify-content: stretch; }
  .confirm-actions .button { flex: 1; }
}
