:root { color-scheme: dark; }
:focus-visible { outline: 2px solid #f5d8a7; outline-offset: 3px; }
.hero[data-city="pattaya"]::before { background-image: linear-gradient(90deg,#070b12 0%,rgba(7,11,18,.92) 28%,rgba(7,11,18,.49) 77%,rgba(7,11,18,.30)),linear-gradient(0deg,#070b12 0%,transparent 44%),url('01-hero/pattaya-night-desktop.webp'); }
.hero-copy h1 { text-wrap: balance; }
.section-head .draft-state { margin-top: .7rem; color: var(--gold); font-size: .88rem; }
.trip-actions { display: flex; justify-content: center; gap: .65rem; flex-wrap: wrap; margin-top: 1rem; }
.date-label { display: block; margin-bottom: .5rem; color: var(--sub); font-size: .88rem; }
.day-card { scroll-margin-top: 1rem; }
.day-actions { padding: 0 20px 20px; }
.slot-head { gap: 8px; }
.slot-card { min-height: 105px; }
.plan-row { display: grid; grid-template-columns: 3.2rem minmax(0,1fr) auto; gap: .6rem; align-items: start; padding: .75rem 0; border-top: 1px solid #2a3746; }
.plan-time { color: var(--gold2); font-size: .88rem; font-variant-numeric: tabular-nums; }
.plan-info { display: grid; gap: .25rem; overflow-wrap: anywhere; font-size: .94rem; }
.plan-info small { color: #aebac7; font-size: .81rem; white-space: pre-wrap; }
.plan-info small.gold { color: var(--gold); }
.plan-edit { min-height: 36px; padding: 0 .35rem; color: var(--gold2); font-size: .88rem; }
.btn, .add-btn, .choice, .category { min-height: 44px; }
.feedback { position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 30; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: .65rem 1rem; border-radius: 999px; color: var(--gold2); background: #101a25; border: 1px solid #544437; pointer-events: none; }
.feedback:empty { visibility: hidden; }
.modal { position: fixed; max-width: 100%; max-height: 100%; width: 100%; height: 100%; margin: 0; border: 0; color: var(--light); background: transparent; backdrop-filter: none; overflow: auto; }
.modal[open] { display: flex; }
.modal::backdrop { background: #050910c9; backdrop-filter: blur(5px); }
.modal-box { max-height: calc(100dvh - 48px); overflow: auto; }
.modal-box #inquiryText { min-height: 180px; height: min(35dvh, 340px); }
.entry-form { display: grid; gap: .75rem; }
.entry-form label { display: grid; gap: .35rem; color: #d6dee6; font-size: .9rem; min-width: 0; }
.entry-fields { display: flex; flex-wrap: wrap; gap: .6rem; }
.entry-fields > * { flex: 1 1 125px; }
.entry-form :is(input,select,textarea) { width: 100%; min-height: 44px; border: 1px solid #405165; border-radius: 10px; padding: .6rem; background: #0d1622; color: #f6f3ec; font: inherit; }
.entry-form textarea { min-height: 70px; margin: 0; }
.entry-form .form-error { color: #ffc4b0; margin: 0; }
.entry-form .form-error:empty { display: none; }
.entry-form .modal-actions { margin-top: .25rem; }
.print-sheet { display: none; }

@media (max-width: 820px) {
  .hero::before { background-image: linear-gradient(0deg,#070b12 7%,#070b1280 58%,#070b1255),url('01-hero/bangkok-night-mobile.webp'); }
  .hero[data-city="pattaya"]::before { background-image: linear-gradient(0deg,#070b12 7%,#070b1280 58%,#070b1255),url('01-hero/pattaya-night-mobile.webp'); }
  .hero-copy h1 { font-size: clamp(2rem,9vw,3.6rem); }
  .hero-inner { padding-top: 108px; gap: 24px; }
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-card { padding: 14px; }
  .overview-card .value { font-size: clamp(1.15rem,5vw,1.65rem); }
  .itinerary-shell,.library-shell { padding: 10px; }
  .day-hero { height: 170px; }
  .slots { padding: 10px; gap: 10px; }
  .slot-card { padding: 11px; }
  .day-actions { padding: 0 10px 12px; }
  .modal { padding: 12px; }
  .modal-box { padding: 16px; max-height: calc(100dvh - 24px); border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@page { size: A4; margin: 15mm 16mm; }
@media print {
  :root { color-scheme: light; }
  html,body { background: #fff !important; color: #202631 !important; margin: 0; }
  body > :not(#printSheet) { display: none !important; }
  .print-sheet { display: block; font: 10pt/1.36 -apple-system,BlinkMacSystemFont,'PingFang SC','Noto Sans CJK SC','Microsoft YaHei',sans-serif; overflow: visible; }
  .paper-mast { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 3mm; border-bottom: 1.5pt solid #8b6b37; color: #71552a; font-size: 9pt; font-weight: 700; }
  .paper-mast span:first-child { letter-spacing: .14em; }
  .print-sheet h1 { font-size: 25pt; margin: 3mm 0 1mm; }
  .paper-summary { margin: 0 0 4mm; color: #414954; font-size: 10.5pt; }
  .paper-day { margin-bottom: 3mm; }
  .paper-day h2,.paper-budget h2 { margin: 0 0 1mm; font-size: 12.5pt; color: #71552a; break-after: avoid; }
  .paper-day h2 span { margin-right: 2mm; }
  .paper-day h2 small { float: right; margin-left: 2mm; color: #505863; font-size: 9pt; }
  .paper-day ul { margin: 0; padding: 0; list-style: none; }
  .paper-day li { display: grid; grid-template-columns: 13mm minmax(0,1fr) auto; gap: 2.5mm; padding: .65mm 0; border-bottom: .45pt solid #d5d7dd; break-inside: avoid; overflow-wrap: anywhere; }
  .paper-day p { margin: 0; color: #505863; font-size: 8.8pt; white-space: pre-wrap; }
  .paper-cost,.paper-time { white-space: nowrap; color: #5c4725; }
  .paper-budget { border-top: 1.5pt solid #8b6b37; padding-top: 2mm; margin-top: 4mm; break-inside: avoid; }
  .paper-budget dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1mm 4mm; margin: 1mm 0 2mm; }
  .paper-budget dt { color: #505863; font-size: 8.8pt; }
  .paper-budget dd { margin: 0; }
  .paper-budget p { margin: 0; font-size: 8.8pt; color: #505863; }
}
