/* ============================================================
   polish.css — "Quiet editorial" design layer
   Loads last; refines typography, colour, spacing, components.
   Display: Fraunces (serif).  Body/UI: Hanken Grotesk.
   ============================================================ */

:root {
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;

  /* refined washi-paper palette */
  --cream: #f6f2e8;
  --paper: #fffdf8;
  --ink: #221f1a;
  --ink-soft: #57514a;
  --ink-muted: #968d7e;
  --border: #e4ddcc;
  --indigo: #21384f;
  --indigo-dark: #16273a;
  --vermilion: #bb3a22;
  --gold: #b08a3e;
  --green: #4a7256;
  --amber: #c08431;
  --red: #ab3526;

  --tokyo: #21384f;
  --kyoto: #6f4a78;
  --osaka: #bb3a22;
  --hiroshima: #2d6b8c;

  --r-card: 4px;
  --r-chip: 3px;
}

/* ---- Base typography ---- */
body {
  font-family: var(--sans);
  font-size: 15.5px;
  letter-spacing: -0.003em;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--serif); font-optical-sizing: auto; }

a { color: var(--indigo); }
a:hover { color: var(--vermilion); }

/* small-caps label utility used throughout */
.kicker, .overline {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 10.5px;
}

/* ============================================================
   Hero masthead
   ============================================================ */
.hero {
  background: var(--indigo);
  background-image: linear-gradient(178deg, #25405a 0%, var(--indigo-dark) 100%);
  padding: 30px 22px 26px;
  text-align: left;
}
.hero::before, .hero::after { display: none !important; }

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.hero-kicker {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.52);
  margin-bottom: 8px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 16vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  color: #fff;
}
.hero h1 a { color: inherit; text-decoration: none; }
.hero .sub {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.68);
  opacity: 1;
}
.hero-inner::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--vermilion);
  margin-top: 16px;
}

/* Settings button — tracked tiny-caps, not a pill */
.settings-btn {
  top: 18px; right: 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  padding: 7px 12px 6px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.82);
}
.settings-btn:hover { background: rgba(255, 255, 255, 0.1); }
.sync-status {
  top: 46px; right: 18px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}

/* ============================================================
   Day-nav strip
   ============================================================ */
nav.day-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  padding: 6px 0;
}
nav.day-nav a {
  border-radius: 2px;
  font-family: var(--sans);
  color: var(--ink-muted);
  padding: 7px 11px;
}
nav.day-nav a strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
nav.day-nav a.active { background: var(--indigo); border-radius: 2px; }
nav.day-nav a.overview { background: transparent; border: 1px solid var(--border); }
nav.day-nav a.overview strong { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ============================================================
   Editorial note (the "alert" / Monday closures box)
   ============================================================ */
.alert {
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 3px solid var(--vermilion);
  border-radius: var(--r-card);
  padding: 16px 20px;
}
.alert h3 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--vermilion);
}
.alert h3::before { content: "Note —"; font-size: 10.5px; }

/* ============================================================
   Overview — leg headings
   ============================================================ */
.leg-heading {
  border-bottom: 1px solid var(--border);
  margin: 44px 0 18px;
  padding-bottom: 12px;
}
.leg-heading h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 5vw, 34px);
  letter-spacing: -0.02em;
}
.leg-heading .badge {
  font-family: var(--sans);
  background: transparent !important;
  color: var(--ink-muted) !important;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
}
.leg-heading.tokyo .badge { color: var(--tokyo) !important; border-color: var(--tokyo); }
.leg-heading.kyoto .badge { color: var(--kyoto) !important; border-color: var(--kyoto); }
.leg-heading.osaka .badge { color: var(--osaka) !important; border-color: var(--osaka); }
.leg-heading .hotel-info { font-size: 11px; }
.leg-heading .hotel-info strong { font-weight: 600; }

/* ============================================================
   Day cards (overview)
   ============================================================ */
.day-grid { gap: 14px; }
.day-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.day-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--indigo);
}
.day-card.today { border: 1px solid var(--vermilion); box-shadow: none; }
.day-card .day-date {
  background: transparent;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 2px 12px 2px 0;
  min-width: 52px;
}
.day-card .day-date .num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
}
.day-card .day-date .dow,
.day-card .day-date .mon { font-size: 9px; letter-spacing: 0.12em; }
.day-card .day-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.day-card .day-tagline { font-size: 12.5px; line-height: 1.5; }
.day-card .stop-chip {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-chip);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 2px 7px;
}
.today-badge {
  background: var(--vermilion);
  border-radius: 2px;
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

/* ============================================================
   Day detail header
   ============================================================ */
.day-detail-header { border-bottom: 1px solid var(--border); }
.day-detail-header .big-date {
  background: var(--indigo);
  border-radius: var(--r-card);
}
.day-detail-header .big-date .num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
}
.day-detail-header h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: -0.022em;
  line-height: 1.1;
}
.day-detail-header .tagline {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.day-detail-header .hotel {
  font-family: var(--sans);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

/* ============================================================
   Day-at-a-glance dropdown
   ============================================================ */
.day-overview { border-radius: var(--r-card); }
.day-overview summary {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.overview-time { font-family: var(--serif); font-size: 13px; }
.overview-title { font-family: var(--sans); }
.overview-warn {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9.5px;
}
.overview-warn::before { content: ""; }

/* ============================================================
   Schedule items
   ============================================================ */
.schedule-item {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px;
}
.schedule-item:hover { box-shadow: none; border-color: #d5cdb8; }
.schedule-item .marker-num {
  background: transparent;
  color: var(--indigo);
  border: 1px solid var(--indigo);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
}
.schedule-item.transit { background: var(--paper); border-color: var(--border); }
.schedule-item.transit .marker-num { color: #5d7790; border-color: #5d7790; background: transparent; }
.schedule-item .schedule-time {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--vermilion);
  font-weight: 700;
}
.schedule-item h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 7px;
}
.schedule-item h4 a.title-maps-link {
  border-bottom: 1px solid var(--border);
}
.schedule-item h4 a.title-maps-link::after { content: "" !important; }
body.edit-mode .schedule-item h4 a.title-maps-link::after { content: "" !important; }
.schedule-item p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.schedule-item .timing-tip {
  background: transparent;
  border: none;
  border-left: 2px solid var(--amber);
  border-radius: 0;
  padding: 4px 0 4px 12px;
  font-size: 12px;
  color: var(--ink-soft);
}
.schedule-item .timing-tip strong {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9.5px;
  color: var(--amber);
}

/* ============================================================
   Tags — flat, tracked, hairline
   ============================================================ */
.tag {
  border-radius: var(--r-chip);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  background: transparent;
  border: 1px solid var(--border);
}
.tag.price { color: var(--green); border-color: #cdddd0; background: transparent; }
.tag.book { color: #a8631a; border-color: #ecd6b8; background: transparent; }
.tag.kid { color: #a8474a; border-color: #eccccd; background: transparent; }
.tag.food { color: #8a6418; border-color: #e6dabb; background: transparent; }
.tag.transit { color: #355e8c; border-color: #c9d6e4; background: transparent; }
.tag.cultural { color: #6f4a78; border-color: #ddd0e0; background: transparent; }
.tag.warning { color: var(--red); border-color: #eccac6; background: transparent; }

/* ============================================================
   Map handoff buttons — de-iconed, refined
   ============================================================ */
.schedule-item .map-actions { gap: 10px; margin-top: 12px; }
.directions-btn, .view-maps-btn {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 2px;
  padding: 9px 14px;
  box-shadow: none;
  min-height: 0;
}
.directions-btn { background: var(--indigo); }
.directions-btn:hover { background: var(--indigo-dark); box-shadow: none; }
.directions-btn::before { content: "" !important; margin: 0; }
.directions-btn::after { content: " \2197"; }
.directions-btn.transit { background: #4a647e; }
.view-maps-btn {
  background: transparent;
  color: var(--indigo);
  border: 1px solid var(--indigo);
}
.view-maps-btn::after { content: " \2197"; }

/* Day-jump pills */
.day-jump a {
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.day-jump .back { font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }

/* ============================================================
   Map chrome
   ============================================================ */
.map-container { border-radius: var(--r-card); box-shadow: none; }
.map-container .map-title {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.map-legend { font-size: 10.5px; }
.locate-btn, .map-fullscreen-btn {
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   Info section + footer
   ============================================================ */
.info-section { border-radius: var(--r-card); }
.info-section h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.02em; }
.info-grid h4 { font-family: var(--sans); letter-spacing: 0.1em; }
footer { font-size: 11px; letter-spacing: 0.03em; }
footer { border-top: 1px solid var(--border); }

/* Bottom bar (mobile) */
.bottom-bar { border-top: 1px solid var(--border); box-shadow: 0 -1px 0 var(--border); }
.bottom-bar .icon { display: none; }
.bottom-bar button, .bottom-bar a {
  font-size: 10px;
  letter-spacing: 0.12em;
  padding-top: 14px;
}

/* ============================================================
   Edit-mode UI — align to the editorial system
   ============================================================ */
.edit-action {
  border-radius: 2px;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.add-btn, .add-day-card {
  border-radius: var(--r-card);
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}
.btn {
  border-radius: 2px;
  font-family: var(--sans);
  letter-spacing: 0.02em;
}
.modal-panel { border-radius: var(--r-card); }
.modal-header h2 { font-family: var(--serif); font-weight: 500; }
.field label {
  font-family: var(--sans);
  letter-spacing: 0.1em;
}
.review-bar { border-radius: var(--r-card); }
.review-title { font-family: var(--serif); font-weight: 500; font-size: 15px; }
.unscheduled-section { border-radius: var(--r-card); }
.unscheduled-header { font-family: var(--sans); }
.day-overview summary::before { content: "\203A"; }

/* title-link maps icon in edit mode → quiet, no emoji */
body.edit-mode .schedule-item h4 a.title-maps-link {
  border-bottom: 1px dashed var(--vermilion);
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 760px) {
  .hero { padding: 26px 18px 22px; }
  .hero h1 { font-size: clamp(52px, 19vw, 80px); }
  .schedule-item h4 { font-size: 17px; }
  .schedule-item { padding: 15px; }
  body { font-size: 16px; }
}
