@font-face {
  font-family: "Ubuntu";
  src: url("assets/fonts/ubuntu-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu";
  src: url("assets/fonts/ubuntu-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu";
  src: url("assets/fonts/ubuntu-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #24211d;
  --muted: #706b64;
  --line: #d8dfda;
  --accent: #1f7566;
  --accent-strong: #15584d;
  --accent-soft: #dceee9;
  --rose: #a34252;
  --gold: #8a6716;
  --blue: #33658a;
  --shadow: 0 18px 40px rgb(42 33 24 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Ubuntu", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-strong);
  font-weight: 500;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-main {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.2rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4rem);
  line-height: 0.95;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

p {
  margin: 0;
}

.trip-dates {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.status-pill,
.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
}

.status-pill {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.status-pill[data-tone="warn"] {
  color: var(--gold);
  background: #fff2ca;
}

.status-pill[data-tone="error"] {
  color: var(--rose);
  background: #f7dce1;
}

.tag {
  color: var(--blue);
  background: #e2edf3;
}

.status {
  color: var(--accent-strong);
  background: var(--accent-soft);
  text-transform: capitalize;
}

.status.to-confirm,
.status.optional {
  color: var(--gold);
  background: #fff2ca;
}

.status.done,
.status.booked {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.edit-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button,
.icon-button {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}

.danger-button {
  color: var(--rose);
  background: #fff5f7;
  border-color: #ecc9d0;
}

.edit-toggle {
  gap: 0.45rem;
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line);
}

.edit-toggle input {
  inline-size: 1.05rem;
  block-size: 1.05rem;
  accent-color: var(--accent);
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.7rem 1.25rem;
  background: rgb(244 246 245 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.section-nav a {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.86rem;
  text-decoration: none;
  border: 1px solid var(--line);
}

main {
  inline-size: min(1120px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

.notice {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  background: #fff7db;
  color: #634803;
  border: 1px solid #ecd076;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

.section-block {
  padding: 1.35rem 0;
  scroll-margin-top: 5rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-heading > div {
  min-width: 0;
}

.overview-grid,
.card-grid,
.place-grid {
  display: grid;
  gap: 0.85rem;
}

.overview-grid {
  grid-template-columns: 1fr;
}

.info-tile,
.card,
.timeline-body,
.place-card,
.checklist-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.info-tile {
  padding: 1rem;
}

.info-tile span,
.mini-block strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card,
.timeline-body {
  padding: 1rem;
}

.card > * + *,
.timeline-body > * + *,
.place-body > * + * {
  margin-top: 0.65rem;
}

.card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.muted {
  color: var(--muted);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
}

.doc-id {
  padding: 0.15rem 0.35rem;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline-list {
  display: grid;
  gap: 0.85rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.timeline-date {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  color: var(--muted);
}

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

.place-card {
  overflow: hidden;
}

.place-card img,
.image-placeholder {
  display: block;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dbe9e5;
}

.image-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 700;
}

.place-body {
  padding: 1rem;
}

.mini-block {
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.checklist {
  display: grid;
  gap: 0.65rem;
}

.checklist-item {
  display: grid;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem 1rem;
}

.checklist-item label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-weight: 700;
}

.checklist-item input {
  flex: 0 0 auto;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  accent-color: var(--accent);
}

.checklist-item.is-done label span {
  color: var(--muted);
  text-decoration: line-through;
}

.edit-only {
  display: none;
}

.is-editing .edit-only {
  display: inline-flex;
}

.edit-actions {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.empty-state {
  padding: 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.dialog {
  inline-size: min(720px, calc(100vw - 1.5rem));
  max-block-size: min(840px, calc(100vh - 1.5rem));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgb(31 24 16 / 45%);
}

.dialog form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 0.82rem;
}

.field input,
.field select,
.field textarea {
  inline-size: 100%;
  min-height: 2.7rem;
  padding: 0.6rem 0.7rem;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field textarea {
  min-block-size: 6.5rem;
  resize: vertical;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checkbox-field input {
  inline-size: 1.2rem;
  min-height: 1.2rem;
  accent-color: var(--accent);
}

@media (min-width: 720px) {
  .site-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.6rem 2rem;
  }

  main {
    padding: 1.5rem 2rem 4rem;
  }

  .overview-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid,
  .place-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-item {
    grid-template-columns: minmax(9rem, 0.22fr) minmax(0, 1fr);
    align-items: start;
  }

  .timeline-date {
    display: grid;
    gap: 0.1rem;
    padding-top: 0.85rem;
  }

  .checklist-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .is-editing .checklist-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-wide,
  .checkbox-field {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .place-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@page {
  size: A4;
  margin: 14mm;
}

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-soft: #fff;
    --ink: #000;
    --muted: #444;
    --line: #c7c7c7;
    --shadow: none;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    font-size: 10.5pt;
    background: #fff;
  }

  .site-header {
    display: block;
    padding: 0 0 8mm;
    border-bottom: 1px solid #000;
  }

  h1 {
    font-size: 28pt;
  }

  h2 {
    font-size: 16pt;
  }

  h3 {
    font-size: 12pt;
  }

  .header-actions,
  .section-nav,
  .edit-only,
  .notice,
  .dialog {
    display: none !important;
  }

  main {
    inline-size: 100%;
    padding: 0;
  }

  .section-block {
    padding: 7mm 0 0;
    break-inside: auto;
  }

  .section-heading {
    margin-bottom: 3mm;
  }

  .overview-grid,
  .card-grid,
  .place-grid,
  .timeline-list {
    display: block;
  }

  .info-tile,
  .card,
  .timeline-body,
  .place-card,
  .checklist-item {
    margin-bottom: 3mm;
    padding: 3mm;
    border: 1px solid #bbb;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 35mm 1fr;
    gap: 3mm;
    break-inside: avoid;
  }

  .place-card img,
  .image-placeholder {
    display: none;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  a[href^="http"]::after,
  a[href^="assets"]::after {
    content: " (" attr(href) ")";
    color: #444;
    font-weight: 400;
  }

  .tag,
  .status {
    border: 1px solid #aaa;
    background: #fff;
    color: #000;
  }
}
