/* ==========================================================================
   Tokyo Field Guide
   Editorial, photo-forward, phone-first. Light paper ground, one accent per
   card (its theme colour), everything else in ink and rule lines.
   ========================================================================== */

:root {
  /* Theme colours, as supplied. */
  --theme-capybara: #a9701f;
  --theme-animals: #b85c38;
  --theme-drums: #c23b28;
  --theme-photography: #1f7c90;
  --theme-drawing: #6a49b0;
  --theme-vr: #b23286;
  --theme-ramen: #bf8a12;
  --theme-sampling: #2f8f4d;
  --theme-soundgear: #3b6ea5;
  --theme-menswear: #8a5a3c;
  --theme-stay: #7b8a6e;
  --theme-arts: #9c4d6e;
  --theme-design: #5a7d9a;
  --theme-nature: #4a9a6e;
  --theme-onsen: #c27a5a;
  --theme-rock: #e91e63;
  --theme-crafts: #d4a574;
  --theme-sports: #e87722;
  --theme-lodging: #6b7b8a;
  --theme-view: #4a90d9;
  --theme-core: #726b60;

  --paper: #f7f4ed;
  --paper-raised: #fffdf8;
  --ink: #1a1815;
  --ink-muted: #6b6357;
  --ink-faint: #8d8578;
  --rule: rgba(26, 24, 21, 0.12);
  --rule-strong: rgba(26, 24, 21, 0.28);

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --measure: 78rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26, 24, 21, 0.05), 0 8px 24px -16px rgba(26, 24, 21, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
}
.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem 1rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.masthead__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 5.5vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.masthead__meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  align-self: flex-end;
}

.tab,
.tab-link {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
}

.tab[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
}

/* A link out to a standalone page (Photos), dressed like a tab. */
.tab-link {
  display: inline-block;
  text-decoration: none;
}

.tab-link:hover {
  color: var(--ink);
}

/* ----------------------------------------------------------------- layout */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.2rem;
}

.section-note {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  max-width: 46ch;
}

/* ---------------------------------------------------------------- filters */

.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  padding: 0.85rem 0 0.7rem;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.filters__search input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
}

.filters__search input::placeholder {
  color: var(--ink-faint);
}

.filters__accordion {
  margin-top: 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.filters__accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  cursor: pointer;
  list-style: none;
}

.filters__accordion-toggle::-webkit-details-marker {
  display: none;
}

.filters__accordion-toggle::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
}

.filters__accordion[open] .filters__accordion-toggle::after {
  transform: rotate(-135deg);
}

.filters__accordion-content {
  padding: 0 0.85rem 0.7rem;
}

.filters__accordion .filters__group {
  margin-top: 0.5rem;
}

.filters__accordion .filters__group:first-child {
  margin-top: 0;
}

.filters__group {
  border: 0;
  padding: 0;
  margin: 0.7rem 0 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.filters__legend {
  float: left; /* legend + flex needs this to sit inline */
  padding: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  width: 3.6rem;
  flex: none;
  padding-top: 0.3rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 1;
}

.chip {
  --chip: var(--ink-muted);
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.chip::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--chip);
  margin-right: 0.4rem;
  vertical-align: 0.02rem;
}

.chips[data-filter='type'] .chip::before {
  display: none;
}

.chip[aria-pressed='true'] {
  background: var(--chip);
  border-color: var(--chip);
  color: #fff;
}

.chips[data-filter='type'] .chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
}

.chip[aria-pressed='true']::before {
  background: rgba(255, 255, 255, 0.85);
}

/* Day filter above the map: one swipeable row, no colour dots, count badges. */
.map__days {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.map__days-label {
  flex: none;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.chips--days {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 0.15rem;
}

.chips--days .chip {
  flex: none;
  scroll-snap-align: start;
}

.chips--days .chip::before {
  display: none;
}

.chips--days .chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
}

.chip__count {
  margin-left: 0.4rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: var(--rule);
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.chip[aria-pressed='true'] .chip__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.filters__status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.7rem;
  min-height: 1.6rem;
  flex-wrap: wrap;
}

.show-hidden {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
}

.show-hidden input {
  margin: 0;
  cursor: pointer;
}

.show-hidden [data-hidden-count] {
  color: var(--ink-faint);
}

.count {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.count strong {
  color: var(--ink);
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

.reset,
.linkish {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ------------------------------------------------------------------ cards */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 34rem) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60rem) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  --accent: var(--theme-core);
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  scroll-margin-top: 8rem;
}

.card[hidden] {
  display: none;
}

.card--focus {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent), var(--shadow);
}

.card__photo {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--accent);
  overflow: hidden;
}

.card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sits underneath the photo and shows through if the image is missing. */
.card__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.22));
}

.card__star {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  appearance: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0;
  background: rgba(26, 24, 21, 0.45);
  color: #fff;
  font-size: 0.95rem;
  line-height: 2rem;
  padding: 0;
  backdrop-filter: blur(3px);
}

.card__star[aria-pressed='true'] {
  background: #fff;
  color: #e0a900;
}

.card__hide {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  appearance: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0;
  background: rgba(26, 24, 21, 0.45);
  color: #fff;
  font-size: 1.1rem;
  line-height: 2rem;
  padding: 0;
  backdrop-filter: blur(3px);
}

.card__hide:hover {
  background: rgba(180, 50, 50, 0.8);
}

.card__hide[aria-pressed='true'] {
  background: rgba(180, 50, 50, 0.9);
}

.card--hidden-place {
  opacity: 0.5;
}

.card--hidden-place .card__photo::after {
  content: 'HIDDEN';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.card__body {
  padding: 0.85rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card__tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag--home {
  background: #1a1815;
  color: #f4e4b3;
}

.card--home {
  border-color: #1a1815;
  box-shadow: 0 1px 2px rgba(26, 24, 21, 0.08), 0 10px 28px -14px rgba(26, 24, 21, 0.45);
}

.card__area {
  font-size: 0.74rem;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.card__area svg {
  width: 0.72rem;
  height: 0.72rem;
  fill: currentColor;
  flex: none;
}

.card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

.card__what {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
}

.card__why {
  margin: 0.1rem 0 0;
  padding-left: 0.65rem;
  border-left: 2px solid var(--accent);
  font-size: 0.83rem;
  color: var(--ink-muted);
}

.card__related {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  align-items: baseline;
}

.card__related-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.card__related-link:hover {
  text-decoration: underline;
}

.card__actions {
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.button {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.button--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button--ghost[aria-disabled='true'] {
  opacity: 0.35;
  pointer-events: none;
}

.empty {
  text-align: center;
  color: var(--ink-muted);
  padding: 3rem 0;
}

/* -------------------------------------------------------------------- map */

.map__frame {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

#map {
  height: min(72vh, 640px);
  background: #e8e4da;
}

.map__note {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0.6rem 0 0;
}

.map__english {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.map__english:hover {
  text-decoration: underline;
}

.pin {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.pin--area {
  background: transparent !important;
  border-color: currentColor;
  box-shadow: none;
}

.pin--home {
  width: 1.4rem;
  height: 1.4rem;
  border-width: 3px;
  border-color: #f4e4b3;
  box-shadow: 0 0 0 2px #1a1815, 0 0 0 6px rgba(26, 24, 21, 0.18);
}

.leaflet-popup-content {
  margin: 0.7rem 0.85rem;
  font-family: var(--font-body);
  width: 15rem !important;
}

.popup__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  margin: 0.3rem 0 0.15rem;
}

.popup__what {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
}

.popup__why {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.popup__related-row {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.popup__related {
  color: #1f5f8a;
  font-weight: 650;
  text-decoration: none;
}

.popup__related:hover {
  text-decoration: underline;
}

.popup__actions {
  display: flex;
  gap: 0.35rem;
}

.popup__actions .button {
  min-height: 2rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
}

/* ------------------------------------------------------------------- plan */

.flight-banner {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.flight-banner__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.flight-banner__flights {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.flight-banner__leg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem 0.75rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.flight-banner__date {
  font-weight: 600;
  grid-column: 1;
}

.flight-banner__route {
  font-weight: 700;
  font-size: 1rem;
  grid-column: 2;
}

.flight-banner__flight {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  grid-column: 3;
}

.flight-banner__time {
  grid-column: 1 / 3;
  color: rgba(255, 255, 255, 0.85);
}

.flight-banner__seats {
  grid-column: 3;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.flight-banner__duration {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.flight-banner__note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.stay-banner {
  background: linear-gradient(135deg, #3d4a56 0%, #6b7b8a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.stay-banner__kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4e4b3;
}

.stay-banner__name {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stay-banner__meta {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.stay-banner__link {
  display: inline-block;
  margin-top: 0.65rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.slot--home {
  background: rgba(107, 123, 138, 0.1);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.35rem;
  border-bottom: 0;
}

.slot--home .slot__swatch {
  background: var(--theme-lodging);
}

@media (min-width: 600px) {
  .flight-banner__flights {
    flex-direction: row;
    gap: 1rem;
  }
  .flight-banner__leg {
    flex: 1;
  }
}

.plan__intro,
.plan__export,
.plan__sync {
  margin-top: 1.5rem;
}

.plan__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}

.stat {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.stat strong {
  color: var(--ink);
}

.stat--alert {
  color: #c23b28;
}

.stat--alert strong {
  color: #c23b28;
}

.plan__empty-prompt {
  background: var(--paper-raised);
  border: 2px dashed var(--rule-strong);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.plan__empty-text {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.plan__empty-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.day {
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.day--travel {
  border-left: 4px solid var(--ink-faint);
}

.day--unassigned {
  background: #fff8e6;
  border-left: 4px solid #e0a900;
  margin-bottom: 1.5rem;
}

.day__head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.day__number {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  background: var(--rule);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.day--travel .day__number {
  background: var(--ink-faint);
  color: #fff;
}

.day--unassigned .day__number {
  display: none;
}

/* The unassigned bucket folds away: its own chevron, no native marker. */
.day__head--toggle {
  align-items: center;
  flex-wrap: nowrap;
  cursor: pointer;
  list-style: none;
}

/* Keep the label, the count and the chevron on one line at phone width. */
.day__head--toggle .day__name {
  flex: 0 1 auto;
}

.day__head--toggle::-webkit-details-marker {
  display: none;
}

.day__head--toggle::after {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.day--unassigned[open] .day__head--toggle::after {
  transform: rotate(-135deg);
}

.day--unassigned:not([open]) .day__head--toggle {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .day__head--toggle::after {
    transition: none;
  }
}

.day__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin: 0;
  flex: 1;
}

.day__note {
  font-size: 0.74rem;
  color: var(--ink-faint);
  width: 100%;
}

.day--travel .day__note {
  color: var(--ink-muted);
  font-weight: 500;
}

.day__content {
  min-height: 2rem;
}

.day__empty {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin: 0;
  padding: 0.5rem 0;
  font-style: italic;
}

.slot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--rule);
}

.slot:last-child {
  border-bottom: 0;
}

.slot__swatch {
  width: 0.55rem;
  height: 2.1rem;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.slot__text {
  flex: 1;
  min-width: 0;
}

/* The name and meta line open the place's Browse card. */
.slot__link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}

.slot__link:hover .slot__name,
.slot__link:focus-visible .slot__name {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.slot__name {
  font-weight: 600;
  font-size: 0.9rem;
}

.slot__meta {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* Ordering control, sitting under the Plan stats row. */
.plan__sort {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.plan__sort-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.plan__sort select {
  appearance: auto;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
}

.slot__related {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.slot__related-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.slot__related-link:hover {
  text-decoration: underline;
}

.slot select {
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 0.35rem 0.4rem;
  background: var(--paper-raised);
  font-size: 0.78rem;
  max-width: 9rem;
}

.slot__remove {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.3rem;
}

.plan__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.plan__import-label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.plan__import {
  width: 100%;
  min-height: 8rem;
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  resize: vertical;
}

.plan__flash {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--ink);
}

.plan__flash--error {
  color: #9b2c2c;
}

/* -------------------------------------------------------------- colophon */

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}

.colophon p {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem 1rem 2.5rem;
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

.colophon code {
  font-size: 0.95em;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Book view — the pre-trip checklist
   ========================================================================== */

.checklist {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.check-group__head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule-strong);
}

.check-group__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin: 0;
  flex: 1;
}

.check-group__count {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.check-group__note {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 0.25rem;
  max-width: 46rem;
}

.check {
  border-bottom: 1px dashed var(--rule);
}

.check:last-child {
  border-bottom: 0;
}

.check__summary {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0;
  cursor: pointer;
  list-style: none;
}

.check__summary::-webkit-details-marker {
  display: none;
}

.check__box {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--paper-raised);
  cursor: pointer;
  position: relative;
}

.check__box[aria-checked='true'] {
  background: var(--ink);
  border-color: var(--ink);
}

.check__box[aria-checked='true']::after {
  content: '';
  position: absolute;
  left: 0.33rem;
  top: 0.11rem;
  width: 0.28rem;
  height: 0.58rem;
  border-right: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(42deg);
}

.check__box--fixed {
  cursor: default;
  opacity: 0.75;
}

.check__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.check__title {
  font-weight: 600;
  font-size: 0.92rem;
}

.check__meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.check--done .check__title,
.check--done .check__meta {
  color: var(--ink-faint);
}

.check--done .check__title {
  text-decoration: line-through;
  text-decoration-color: var(--rule-strong);
}

.check__tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.02rem 0.34rem;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  vertical-align: 0.08rem;
}

.check__tag--urgent {
  border-color: var(--theme-drums);
  background: var(--theme-drums);
  color: #fff;
}

.check__body {
  padding: 0 0 0.75rem 1.75rem;
  max-width: 46rem;
}

.check__detail {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.check__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .check__box {
    transition: none;
  }
}
