/* Base Reset & Accessibility */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--tabs-height) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  transition: background-color var(--transition-base), color var(--transition-base);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2.5px solid var(--accent-maple);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

/* Sticky Top Chrome (Header + Date Tabs) */
.app-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: env(safe-area-inset-top, 0px);
}

.app-header {
  max-width: 1040px;
  margin: 0 auto;
  height: var(--header-height);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
  min-height: 44px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-maple);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.25;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-pill-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.btn-pill-action:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-muted);
}

.btn-icon-only {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.btn-icon-only:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-muted);
}

/* Sticky Horizontal Date Tab Bar */
.tabs-wrap {
  border-top: 1px solid var(--border-subtle);
}

.date-tabs {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.date-tabs::-webkit-scrollbar {
  display: none;
}

.date-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--bg-surface-muted);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.date-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.date-tab.is-active {
  background: var(--text-primary);
  color: var(--bg-canvas);
  border-color: var(--text-primary);
}

.date-tab.is-theme-live:not(.is-active) {
  background: var(--live-bg);
  color: var(--live-accent);
  border-color: rgba(129, 140, 248, 0.35);
}

.date-tab.is-theme-live.is-active {
  background: var(--live-badge-bg);
  color: var(--live-badge-text);
  border-color: var(--live-badge-bg);
}

.date-tab.is-theme-usj:not(.is-active) {
  background: var(--usj-bg);
  color: var(--usj-accent);
  border-color: rgba(59, 130, 246, 0.35);
}

.date-tab.is-theme-usj.is-active {
  background: var(--usj-badge-bg);
  color: var(--usj-badge-text);
  border-color: var(--usj-badge-bg);
}

.tab-sub {
  font-size: 11px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.tab-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.22);
}

.date-tab:not(.is-active) .tab-badge {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .date-tab:not(.is-active) .tab-badge {
  background: rgba(255, 255, 255, 0.12);
}

.today-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-maple);
  box-shadow: 0 0 0 2px var(--bg-surface);
}

/* Main Layout Container */
.main-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 14px 36px;
}

@media (min-width: 720px) {
  .app-header,
  .date-tabs,
  .main-container {
    padding-left: 24px;
    padding-right: 24px;
  }
  .main-container {
    padding-top: 22px;
  }
}

/* Search Bar */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 44px 10px 42px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 14.5px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-maple);
  box-shadow: 0 0 0 3px var(--accent-maple-soft);
}

.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.search-clear:hover {
  background: var(--bg-surface-muted);
  color: var(--text-primary);
}

.search-results-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.search-results-header {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.search-result-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.search-result-item:hover {
  background: var(--bg-surface-muted);
  border-color: var(--border-subtle);
}

.search-result-day {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-maple);
  background: var(--accent-maple-soft);
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: 3px;
}

.search-result-title {
  font-weight: 700;
  font-size: 14px;
}

.search-result-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Compact Countdown / Today Quick-Jump Strip */
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  margin-bottom: 12px;
}

.status-strip.is-today {
  border-color: var(--accent-maple-border);
  background: var(--accent-maple-soft);
}

.status-strip-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.status-strip-text .icon {
  color: var(--accent-maple);
}

.status-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-maple);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.status-jump-btn:hover {
  opacity: 0.9;
}

/* Overview 9-Day Grid */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 12px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.section-heading span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

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

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

.day-summary-card {
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.day-summary-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.day-summary-card.is-today {
  border-color: var(--accent-maple);
  box-shadow: 0 0 0 1px var(--accent-maple);
}

.day-summary-card.theme-live {
  background: linear-gradient(150deg, var(--live-surface) 45%, var(--live-bg) 100%);
  border-color: var(--live-border);
  box-shadow: var(--live-glow);
}

.day-summary-card.theme-usj {
  background: linear-gradient(150deg, var(--usj-surface) 45%, var(--usj-bg) 100%);
  border-color: var(--usj-border);
  box-shadow: var(--usj-glow);
}

.summary-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-day-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.theme-pill.live {
  background: var(--live-badge-bg);
  color: var(--live-badge-text);
}

.theme-pill.usj {
  background: var(--usj-badge-bg);
  color: var(--usj-badge-text);
}

.theme-pill.today {
  background: var(--accent-maple);
  color: #FFFFFF;
}

.summary-card-title {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.summary-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-surface-muted);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
}

.summary-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.summary-hotel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item-count {
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

/* Excel-Style Horizontal Schedule Matrix */
.sheet-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  overflow: hidden;
}

.sheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: var(--bg-surface);
}

.sheet-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sheet-heading-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-maple-soft);
  color: var(--accent-maple);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sheet-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.25;
}

.sheet-heading p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.sheet-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-surface-muted);
  padding: 2px;
}

.zoom-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.zoom-btn:hover:not(:disabled) {
  background: var(--bg-surface);
}

.zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zoom-readout {
  min-width: 48px;
}

.sheet-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.sheet-expand-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-muted);
}

.sheet-viewport {
  overflow: auto;
  max-height: 540px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sheet-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.excel-table {
  --sheet-zoom: 1;
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  font-size: calc(12.5px * var(--sheet-zoom));
  line-height: 1.38;
  background: var(--bg-surface);
}

.excel-table th,
.excel-table td {
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  padding: calc(7px * var(--sheet-zoom)) calc(8px * var(--sheet-zoom));
}

.excel-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-surface-muted);
  text-align: left;
  width: calc(164px * var(--sheet-zoom));
  min-width: calc(164px * var(--sheet-zoom));
  max-width: calc(164px * var(--sheet-zoom));
  border-bottom: 2px solid var(--border-strong);
}

.excel-table thead th.col-time {
  left: 0;
  z-index: 6;
  width: calc(92px * var(--sheet-zoom));
  min-width: calc(92px * var(--sheet-zoom));
  max-width: calc(92px * var(--sheet-zoom));
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  color: var(--text-secondary);
  border-right: 2px solid var(--border-strong);
}

.excel-table tbody th.col-time {
  position: sticky;
  left: 0;
  z-index: 3;
  width: calc(92px * var(--sheet-zoom));
  min-width: calc(92px * var(--sheet-zoom));
  max-width: calc(92px * var(--sheet-zoom));
  background: var(--bg-surface-muted);
  border-right: 2px solid var(--border-strong);
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  color: var(--text-primary);
}

.band-sub {
  display: block;
  margin-top: 2px;
  font-size: calc(10.5px * var(--sheet-zoom));
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.excel-table thead th.is-theme-live {
  background: var(--live-bg);
}

.excel-table thead th.is-theme-usj {
  background: var(--usj-bg);
}

.excel-table thead th.is-today {
  box-shadow: inset 0 3px 0 var(--accent-maple);
}

.sheet-day-btn {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
}

.sheet-day-btn:hover .sheet-day-name {
  color: var(--accent-maple);
}

.sheet-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sheet-day-name {
  font-weight: 800;
  font-size: calc(12.5px * var(--sheet-zoom));
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.sheet-day-theme {
  font-size: calc(13px * var(--sheet-zoom));
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-cell-list {
  display: flex;
  flex-direction: column;
  gap: calc(5px * var(--sheet-zoom));
}

.sheet-cell-empty {
  color: var(--text-muted);
  opacity: 0.45;
  text-align: center;
  padding: calc(6px * var(--sheet-zoom)) 0;
  font-size: calc(12px * var(--sheet-zoom));
}

.sheet-entry {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: calc(5px * var(--sheet-zoom)) calc(7px * var(--sheet-zoom));
  border-radius: calc(7px * var(--sheet-zoom));
  border: 1px solid var(--border-subtle);
  border-left-width: 3px;
  background: var(--bg-canvas);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.sheet-entry.cat-flight {
  border-left-color: #0284C7;
}

.sheet-entry.cat-sight {
  border-left-color: var(--accent-maple);
}

.sheet-entry.cat-food,
.sheet-entry.cat-hangout {
  border-left-color: var(--accent-ginkgo);
}

.sheet-entry.cat-shopping {
  border-left-color: var(--accent-pine);
}

.sheet-entry:hover {
  border-color: var(--accent-maple);
  background: var(--bg-surface);
}

.sheet-entry.is-live {
  background: var(--live-bg);
  border-color: var(--live-border);
  border-left-color: var(--live-accent);
}

.sheet-entry.is-usj {
  background: var(--usj-bg);
  border-color: var(--usj-border);
  border-left-color: var(--usj-accent);
}

.sheet-entry-time {
  font-size: calc(10.5px * var(--sheet-zoom));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-maple);
}

.sheet-entry.is-live .sheet-entry-time {
  color: var(--live-accent);
}

.sheet-entry.is-usj .sheet-entry-time {
  color: var(--usj-accent);
}

.sheet-entry-title {
  font-size: calc(12px * var(--sheet-zoom));
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sheet-entry-emoji {
  display: inline-block;
  margin-right: 4px;
  font-size: calc(12.5px * var(--sheet-zoom));
}

.sheet-row-hotel th.col-time,
.sheet-row-hotel td {
  background: var(--bg-surface-muted);
  font-size: calc(11.5px * var(--sheet-zoom));
  color: var(--text-secondary);
}

.sheet-hotel-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

/* Fullscreen Sheet Modal */
.sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: var(--bg-canvas);
  display: none;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sheet-modal.is-open {
  display: flex;
}

.sheet-modal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.sheet-modal-title-group {
  display: flex;
  flex-direction: column;
}

.sheet-modal-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
}

.sheet-modal-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.sheet-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.sheet-modal-body .sheet-viewport {
  flex: 1;
  max-height: none;
  height: 100%;
  border-top: none;
}

/* Day View Header & Controls */
.day-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.day-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 42%;
  opacity: 0;
  transition: opacity 380ms ease;
  z-index: 0;
}

.day-hero-bg.is-loaded {
  opacity: 1;
}

.day-hero-content {
  position: relative;
  z-index: 2;
}

.day-hero.has-hero-bg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 152px;
  border-color: transparent;
}

@media (min-width: 640px) {
  .day-hero.has-hero-bg {
    min-height: 176px;
    padding: 22px 24px;
  }
}

.day-hero.has-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(108deg, rgba(16, 15, 14, 0.80) 0%, rgba(16, 15, 14, 0.54) 52%, rgba(16, 15, 14, 0.22) 100%);
}

.day-hero.theme-live {
  background: linear-gradient(145deg, var(--live-surface) 40%, var(--live-bg) 100%);
  border: 1.5px solid var(--live-border);
  box-shadow: var(--live-glow);
}

.day-hero.theme-live.has-hero-bg::before {
  background: linear-gradient(108deg, rgba(22, 18, 64, 0.86) 0%, rgba(49, 36, 118, 0.58) 54%, rgba(125, 24, 68, 0.26) 100%);
}

.day-hero.theme-usj {
  background: linear-gradient(145deg, var(--usj-surface) 40%, var(--usj-bg) 100%);
  border: 1.5px solid var(--usj-border);
  box-shadow: var(--usj-glow);
}

.day-hero.theme-usj.has-hero-bg::before {
  background: linear-gradient(108deg, rgba(14, 34, 82, 0.84) 0%, rgba(24, 62, 142, 0.56) 54%, rgba(24, 62, 142, 0.22) 100%);
}

.day-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.day-kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-maple);
  font-variant-numeric: tabular-nums;
}

.day-hero.theme-live .day-kicker {
  color: var(--live-accent);
}

.day-hero.theme-usj .day-kicker {
  color: var(--usj-accent);
}

.day-hero.has-hero-bg .day-kicker {
  color: #FDE68A;
}

.day-hero.theme-live.has-hero-bg .day-kicker {
  color: #C7D2FE;
}

.day-hero.theme-usj.has-hero-bg .day-kicker {
  color: #BFDBFE;
}

.day-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.day-hero.has-hero-bg .day-title {
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.day-subtitle {
  margin: 5px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.day-hero.has-hero-bg .day-subtitle {
  color: rgba(255, 255, 255, 0.90);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 12px;
  font-weight: 600;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.mini-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

/* Day Toolbar */
.day-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.day-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.toolbar-btn.is-active {
  background: var(--text-primary);
  color: var(--bg-canvas);
  border-color: var(--text-primary);
}

/* Vertical Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
}

.timeline-node {
  position: absolute;
  left: -26px;
  top: 18px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  z-index: 2;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.timeline-item.is-featured-live .timeline-node {
  border-color: var(--live-accent);
  background: var(--live-badge-bg);
}

.timeline-item.is-featured-usj .timeline-node {
  border-color: var(--usj-accent);
  background: var(--usj-badge-bg);
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 15px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast);
}

.timeline-item.is-featured-live .timeline-card {
  border: 1.5px solid var(--live-border);
  background: linear-gradient(155deg, var(--live-surface) 55%, var(--live-bg) 100%);
  box-shadow: var(--live-glow);
}

.timeline-item.is-featured-usj .timeline-card {
  border: 1.5px solid var(--usj-border);
  background: linear-gradient(155deg, var(--usj-surface) 55%, var(--usj-bg) 100%);
  box-shadow: var(--usj-glow);
}

.card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.card-time {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-maple);
  background: var(--accent-maple-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.is-featured-live .card-time {
  color: var(--live-badge-text);
  background: var(--live-badge-bg);
}

.is-featured-usj .card-time {
  color: var(--usj-badge-text);
  background: var(--usj-badge-bg);
}

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-ginkgo-soft);
  border: 1px solid var(--accent-ginkgo-border);
  color: var(--accent-ginkgo);
}

.tag-pill.pass {
  background: var(--accent-maple-soft);
  border-color: var(--accent-maple-border);
  color: var(--accent-maple);
}

.tag-pill.live {
  background: var(--live-badge-bg);
  border-color: var(--live-border);
  color: var(--live-badge-text);
}

.tag-pill.usj {
  background: var(--usj-badge-bg);
  border-color: var(--usj-border);
  color: var(--usj-badge-text);
}

.card-title {
  margin: 8px 0 2px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.38;
}

.card-jp-title {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card-summary {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Card Action Row (Maps + Sub-places + Accordion Toggle) */
.card-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn-maps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-md);
  background: var(--text-primary);
  color: var(--bg-canvas);
  font-size: 13px;
  font-weight: 700;
  transition: opacity var(--transition-fast);
}

.btn-maps:hover {
  opacity: 0.9;
}

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-muted);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  margin-left: auto;
}

.btn-details .chevron {
  transition: transform var(--transition-fast);
}

.btn-details[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.sub-places {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sub-place-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-muted);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.sub-place-link:hover {
  border-color: var(--accent-maple);
  color: var(--accent-maple);
}

/* Accordion Details */
.card-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-details[hidden] {
  display: none;
}

.notes-block {
  background: var(--bg-surface-muted);
  border-radius: var(--radius-md);
  padding: 11px 13px;
}

.block-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.notes-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-primary);
}

.notes-list li + li {
  margin-top: 4px;
}

/* AI Supplement Callout */
.ai-block {
  background: var(--ai-bg);
  border: 1px solid var(--ai-border);
  border-left: 4px solid var(--ai-accent);
  border-radius: var(--radius-md);
  padding: 11px 13px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--ai-accent);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

[data-theme="dark"] .ai-badge {
  color: #0F1115;
}

.ai-subrow {
  font-size: 13px;
  color: var(--text-primary);
}

.ai-subrow + .ai-subrow {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--ai-border);
}

.ai-sublabel {
  font-weight: 700;
  color: var(--ai-text);
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}

/* Prev / Next Day Footer */
.day-pager {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pager-btn {
  min-height: 52px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.pager-btn.next {
  justify-content: flex-end;
  text-align: right;
}

.pager-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pager-dir {
  font-size: 11px;
  color: var(--text-muted);
}

.pager-label {
  font-size: 13.5px;
  font-weight: 700;
}

/* Utility Drawer (Bottom Sheet mobile / Slide-over desktop) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg-scrim);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.utility-drawer {
  position: fixed;
  z-index: 70;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), visibility var(--transition-base);
  visibility: hidden;
}

/* Mobile Bottom Sheet */
@media (max-width: 899px) {
  .utility-drawer {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 88dvh;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    border-top: 1px solid var(--border-subtle);
    transform: translateY(105%);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .utility-drawer.is-open {
    transform: translateY(0);
    visibility: visible;
  }
}

/* Desktop Slide-Over */
@media (min-width: 900px) {
  .utility-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: 460px;
    max-width: 92vw;
    border-left: 1px solid var(--border-subtle);
    transform: translateX(105%);
  }
  .utility-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
  }
}

.drawer-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--border-strong);
  margin: 10px auto 2px;
}

@media (min-width: 900px) {
  .drawer-handle {
    display: none;
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-surface-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-tab {
  min-height: 38px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.drawer-tab.is-active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.util-card {
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.util-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.util-card-title {
  font-weight: 700;
  font-size: 15px;
}

.flight-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  margin: 8px 0;
}

.flight-code {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.flight-time {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.hotel-jp-name {
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 8px 0;
  word-break: break-all;
}

.util-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pass-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.pass-item + .pass-item {
  margin-top: 8px;
}

.link-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.link-row + .link-row {
  margin-top: 8px;
}

.link-edit-row {
  display: flex;
  gap: 6px;
}

.link-input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  font-size: 13px;
}

/* Taxi Large-Text Modal */
.taxi-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #111318;
  color: #FFFFFF;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.taxi-modal.is-open {
  display: flex;
}

.taxi-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.taxi-close {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  display: grid;
  place-items: center;
}

.taxi-card-body {
  text-align: center;
  max-width: 680px;
  margin: auto;
}

.taxi-phrase {
  font-size: 18px;
  color: #FCD34D;
  font-weight: 700;
  margin-bottom: 18px;
}

.taxi-jp-huge {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 18px;
  word-break: break-word;
}

.taxi-hint {
  font-size: 15px;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  border-radius: 12px;
}

body.is-modal-open {
  overflow: hidden;
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 24px);
  z-index: 100;
  max-width: calc(100vw - 32px);
  background: var(--text-primary);
  color: var(--bg-canvas);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

/* Right-Side Landmark Thumbnail & Lightbox */
.card-body-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-main-col {
  flex: 1;
  min-width: 0;
}

.card-thumb-slot {
  flex-shrink: 0;
}

.card-thumb-btn {
  position: relative;
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-muted);
  box-shadow: var(--shadow-xs);
}

@media (min-width: 600px) {
  .card-thumb-btn {
    width: 128px;
    height: 96px;
  }
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-base);
}

.card-thumb-btn:hover .card-thumb {
  transform: scale(1.05);
}

.card-thumb-badge {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.7);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  opacity: 0.86;
}

.card-thumb-skeleton {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-subtle);
  animation: photo-pulse 1.4s ease-in-out infinite;
}

@media (min-width: 600px) {
  .card-thumb-skeleton {
    width: 128px;
    height: 96px;
  }
}

@keyframes photo-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-lightbox.is-open {
  display: flex;
}

.photo-lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: min(92vw, 860px);
  max-height: 90dvh;
}

.photo-lightbox-close {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  display: grid;
  place-items: center;
}

.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.photo-lightbox-img {
  max-width: 100%;
  max-height: 75dvh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.photo-lightbox-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #F3F1EC;
  font-size: 13.5px;
  font-weight: 600;
}

.photo-lightbox-link {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}

.photo-lightbox-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Gourmet Tab & Tabelog Recommendations */
.date-tab.is-theme-food:not(.is-active) {
  background: var(--accent-ginkgo-soft);
  color: var(--accent-ginkgo);
  border-color: var(--accent-ginkgo-border);
}

.date-tab.is-theme-food.is-active {
  background: var(--accent-ginkgo);
  color: #FFFFFF;
  border-color: var(--accent-ginkgo);
}

[data-theme="dark"] .date-tab.is-theme-food.is-active {
  color: #0F1115;
}

.tabelog-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #B45309;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.tabelog-badge.is-large {
  font-size: 12px;
  padding: 3px 10px;
}

[data-theme="dark"] .tabelog-badge {
  background: #F59E0B;
  color: #111827;
}

.food-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.food-tag.is-planned {
  background: var(--accent-pine-soft);
  border: 1px solid var(--accent-pine-border);
  color: var(--accent-pine);
}

.food-tag.is-award {
  background: var(--accent-maple-soft);
  border: 1px solid var(--accent-maple-border);
  color: var(--accent-maple);
}

.food-budget {
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* In-timeline Inline Gourmet Strip */
.food-rec-strip {
  margin-top: 10px;
  border-radius: var(--radius-md);
  background: var(--accent-ginkgo-soft);
  border: 1px solid var(--accent-ginkgo-border);
  overflow: hidden;
}

.food-rec-toggle {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.food-rec-toggle:hover {
  background: rgba(180, 83, 9, 0.08);
}

[data-theme="dark"] .food-rec-toggle:hover {
  background: rgba(251, 191, 36, 0.08);
}

.food-rec-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ginkgo);
  flex-shrink: 0;
}

.food-rec-preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.food-rec-strip.is-open .food-rec-preview {
  display: none;
}

.food-rec-toggle .chevron {
  margin-left: auto;
  color: var(--accent-ginkgo);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.food-rec-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.food-rec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 10px 10px;
  border-top: 1px dashed var(--accent-ginkgo-border);
}

.food-rec-list[hidden] {
  display: none;
}

.food-rec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.food-rec-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.food-rec-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.food-rec-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.food-rec-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.food-rec-why {
  color: var(--text-primary);
}

.food-rec-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.food-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-muted);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.food-mini-link:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.food-mini-link.is-tabelog {
  background: var(--accent-ginkgo-soft);
  border-color: var(--accent-ginkgo-border);
  color: var(--accent-ginkgo);
}

.food-mini-link.is-tabelog:hover {
  background: var(--bg-surface);
}

/* Dedicated Gourmet View */
.food-hero {
  background: linear-gradient(145deg, var(--bg-surface) 35%, var(--accent-ginkgo-soft) 100%);
  border: 1px solid var(--accent-ginkgo-border);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.food-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.food-hero-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.food-hero-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.food-filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.food-search-box {
  margin-bottom: 0;
}

.food-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.food-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-muted);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.food-filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.food-filter-chip.is-active {
  background: var(--text-primary);
  color: var(--bg-canvas);
  border-color: var(--text-primary);
}

.food-chip-count {
  font-size: 11px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.food-filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.food-reset-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-maple);
}

.food-reset-link:hover {
  text-decoration: underline;
}

.food-day-group {
  margin-bottom: 22px;
}

.food-day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.food-day-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  flex: 1;
  min-width: 220px;
  padding: 4px 6px;
  margin-left: -6px;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.food-day-toggle:hover {
  background: var(--bg-surface-muted);
}

.food-day-toggle .chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.food-day-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.food-day-heading-text {
  display: flex;
  flex-direction: column;
}

.food-day-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-maple);
  font-variant-numeric: tabular-nums;
}

.food-day-title {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
}

.food-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.food-grid[hidden] {
  display: none;
}

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

.food-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 15px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.food-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.food-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.food-card-name {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.food-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.food-card-detail {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.food-card-why {
  margin: 2px 0 4px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.food-card-actions {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.food-jump-btn {
  margin-left: auto;
}

.food-empty-state {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 18px;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
