html[data-theme="dark"] {
  --bg: #08131d;
  --bg-accent: radial-gradient(circle at top left, rgba(68, 169, 214, 0.18), transparent 32%), linear-gradient(180deg, #0a1520 0%, #071019 100%);
  --surface: rgba(19, 31, 44, 0.92);
  --surface-strong: rgba(26, 40, 56, 0.98);
  --surface-muted: rgba(255, 255, 255, 0.04);
  --border: rgba(138, 176, 204, 0.18);
  --text: #ecf3f8;
  --muted: #95a9b8;
  --accent: #72d4ff;
  --accent-strong: #26b8f3;
  --accent-soft: rgba(114, 212, 255, 0.14);
  --success: #74d191;
  --warning: #ffd27c;
  --danger: #ff8d8d;
  --gold: #f3d27b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-accent: radial-gradient(circle at top left, rgba(114, 212, 255, 0.28), transparent 30%), linear-gradient(180deg, #fbfdff 0%, #eef4fb 100%);
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --surface-muted: rgba(27, 51, 76, 0.045);
  --border: rgba(26, 64, 98, 0.12);
  --text: #16293a;
  --muted: #5b7283;
  --accent: #0d7fb6;
  --accent-strong: #0a6793;
  --accent-soft: rgba(13, 127, 182, 0.1);
  --success: #168c58;
  --warning: #a97000;
  --danger: #c13c3c;
  --gold: #9b6f05;
  --shadow: 0 18px 40px rgba(39, 73, 108, 0.14);
}

:root {
  color-scheme: dark;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-accent);
  color: var(--text);
  line-height: 1.6;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.site-shell {
  width: min(1520px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.hero {
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)), var(--surface);
  box-shadow: var(--shadow);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.eyebrow,
.section-kicker,
.panel-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.analysis-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-subtitle,
.analysis-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-button,
.action-button,
.ghost-button,
.filter-toggle,
.tab,
.tips-trigger,
.calendar-nav button,
.calendar-cruise,
.modal-chip,
.carousel-button,
.modal-close,
.favorite-btn {
  min-height: 44px;
}

.top-button,
.action-button,
.ghost-button,
.filter-toggle {
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.top-button:hover,
.action-button:hover,
.ghost-button:hover,
.filter-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.action-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #041019;
  font-weight: 700;
}

.action-button[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.ghost-button {
  background: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.stat-box .num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-box .label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.page {
  display: grid;
  gap: 18px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-panels {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.panel-block {
  display: grid;
  gap: 8px;
}

.tab-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #031018;
}

.filter-shell,
.chart-panel,
.tips-shell {
  padding: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head h2,
.analysis-hero h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.filter-panel.is-collapsed {
  display: none;
}

.filter-group {
  display: grid;
  gap: 8px;
}

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

.filter-group input,
.filter-group select,
.sort-group select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

.result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.toolbar-main,
.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-meta {
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.92rem;
}

.sort-group {
  display: grid;
  gap: 8px;
}

.chart-panel canvas {
  width: 100%;
  max-height: 260px;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cruise-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1300px;
}

.cruise-table th,
.cruise-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  font-size: 0.92rem;
}

.cruise-table th:nth-child(-n+3),
.cruise-table td:nth-child(-n+3) {
  position: sticky;
  background: var(--surface);
  z-index: 2;
}

.cruise-table th:nth-child(1),
.cruise-table td:nth-child(1) { left: 0; }
.cruise-table th:nth-child(2),
.cruise-table td:nth-child(2) { left: 40px; }
.cruise-table th:nth-child(3),
.cruise-table td:nth-child(3) { left: 72px; }

.cruise-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 0.85rem;
  user-select: none;
}

.cruise-table th[data-sort] {
  cursor: pointer;
}

.cruise-table th.sorted-asc::after {
  content: " ▲";
}

.cruise-table th.sorted-desc::after {
  content: " ▼";
}

.cruise-row {
  transition: background 0.18s ease;
}

.cruise-row:hover td {
  background: rgba(114, 212, 255, 0.08);
}

.row-link {
  color: inherit;
  text-decoration: none;
}

.table-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cell-primary {
  font-weight: 700;
}

.cell-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.favorite-btn {
  width: 44px;
  padding: 0;
  border-radius: 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
}

.favorite-btn.is-active {
  background: rgba(243, 210, 123, 0.14);
  border-color: var(--gold);
  color: var(--gold);
}

.compare-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.busan-tag,
.score,
.price-pill,
.calendar-pill,
.line-chip,
.empty-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.busan-tag {
  background: rgba(116, 209, 145, 0.18);
  color: var(--success);
}

.discount-text {
  color: var(--danger);
  font-weight: 800;
}

.price-text {
  color: var(--success);
  font-weight: 800;
}

.price-change {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.price-change-up {
  color: var(--danger);
}

.price-change-down {
  color: var(--success);
}

.per-night-text {
  color: var(--muted);
  font-size: 0.84rem;
}

.score.hot3 {
  background: rgba(255, 141, 141, 0.18);
  color: var(--danger);
}

.score.hot2 {
  background: rgba(243, 210, 123, 0.18);
  color: var(--gold);
}

.score.hot1 {
  background: rgba(114, 212, 255, 0.14);
  color: var(--accent);
}

.score.normal {
  background: var(--surface-muted);
  color: var(--muted);
}

.itinerary-cell {
  position: relative;
  max-width: 180px;
  overflow: hidden;
}

.itinerary-preview {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itinerary-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: none;
  width: min(420px, 72vw);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  white-space: normal;
  z-index: 12;
}

.itinerary-cell:hover .itinerary-tooltip {
  display: block;
}

.itinerary-tooltip h4 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.98rem;
}

.tooltip-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tooltip-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.tooltip-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tooltip-port {
  font-weight: 700;
}

.tooltip-date {
  color: var(--muted);
  text-align: right;
}

.sea-day {
  color: var(--muted);
  font-style: italic;
}

.cruise-card-grid {
  display: none;
  gap: 14px;
}

.cruise-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-head,
.card-actions,
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
}

.card-subtitle,
.muted-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-stat {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-muted);
}

.card-stat-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.card-stat-value {
  margin-top: 4px;
  font-weight: 700;
}

.card-actions {
  align-items: stretch;
}

.card-actions .ghost-button,
.card-actions .action-button {
  flex: 1;
}

.analysis-hero {
  margin-bottom: 18px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.line-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.line-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.line-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.line-stats {
  display: grid;
  gap: 10px;
}

.line-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.line-stat:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.calendar-shell {
  display: grid;
  gap: 16px;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calendar-nav {
  display: inline-flex;
  gap: 8px;
}

.calendar-nav button {
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.calendar-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-pill.low {
  background: rgba(116, 209, 145, 0.18);
  color: var(--success);
}

.calendar-pill.mid {
  background: rgba(243, 210, 123, 0.18);
  color: var(--warning);
}

.calendar-pill.high {
  background: rgba(255, 141, 141, 0.18);
  color: var(--danger);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-weekday {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.calendar-cell {
  min-height: 148px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calendar-cell.is-outside {
  opacity: 0.45;
}

.calendar-cell-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.calendar-cell-date {
  font-weight: 800;
}

.calendar-cruise-list {
  display: grid;
  gap: 8px;
}

.calendar-cruise {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--surface-muted);
  color: var(--text);
  text-align: left;
}

.calendar-cruise.low {
  border-color: rgba(116, 209, 145, 0.5);
}

.calendar-cruise.mid {
  border-color: rgba(243, 210, 123, 0.52);
}

.calendar-cruise.high {
  border-color: rgba(255, 141, 141, 0.52);
}

.calendar-more {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.calendar-empty,
.empty-state {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-muted);
  color: var(--muted);
}

.tips-accordion {
  display: grid;
  gap: 10px;
}

.tips-item {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  overflow: hidden;
}

.tips-trigger {
  width: 100%;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.tips-trigger[aria-expanded="true"] {
  color: var(--accent);
}

.tips-content {
  display: none;
  padding: 0 18px 18px;
  color: var(--muted);
}

.tips-item.is-open .tips-content {
  display: block;
}

.footer {
  padding: 24px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.footer p {
  margin: 4px 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 10, 16, 0.72);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.modal-overlay.show {
  display: flex;
}

.modal-frame {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  z-index: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
}

.modal-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 700;
}

.modal-chip.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #021019;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
}

.modal-column {
  display: grid;
  gap: 14px;
}

.modal-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.modal-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.modal-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.modal-row-label {
  color: var(--muted);
}

.modal-hero-image,
.modal-itinerary-image {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.carousel {
  display: grid;
  gap: 12px;
}

.carousel-stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.carousel-track {
  display: flex;
  transition: transform 0.28s ease;
}

.carousel-slide {
  min-width: 100%;
}

.carousel-slide img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.carousel-button {
  width: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1.15rem;
}

.carousel-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.history-chart-wrap {
  min-height: 240px;
}

.itinerary-table {
  width: 100%;
  border-collapse: collapse;
}

.itinerary-table th,
.itinerary-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.compare-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.compare-card h3 {
  margin: 0;
  font-size: 1rem;
}

.compare-price-list {
  display: grid;
  gap: 8px;
}

.compare-price-item,
.compare-meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.compare-price-item:last-child,
.compare-meta-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@media (max-width: 1200px) {
  .filter-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 900px) {
  .site-shell {
    width: min(100vw - 20px, 100%);
  }

  .hero {
    padding: 22px;
  }

  .hero-top,
  .result-toolbar,
  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions,
  .modal-actions,
  .toolbar-meta {
    justify-content: flex-start;
  }

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

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

  .calendar-weekday {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .site-shell {
    width: min(100vw - 14px, 100%);
    padding-top: 12px;
  }

  .hero,
  .filter-shell,
  .chart-panel,
  .tips-shell {
    border-radius: 22px;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    display: none;
  }

  .cruise-card-grid {
    display: grid;
  }

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

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

  .calendar-cell {
    min-height: auto;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal-frame {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    padding: 18px 16px 32px;
    border-radius: 0;
    border: 0;
  }

  .modal-header {
    flex-direction: column;
  }
}

.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
  vertical-align: middle;
  margin-left: 4px;
}

.badge-new {
  background: var(--accent);
  color: var(--bg);
}

.badge-drop {
  background: #c62828;
  color: #fff;
}

.badge-fire {
  background: #e65100;
  color: #fff;
}

.th-btn {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin: 0 1px;
}

.th-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.badge-warn {
  background: #f9a825;
  color: #000;
  cursor: help;
}

.badge-low {
  background: #2e7d32;
  color: #fff;
  cursor: help;
}

.badge-kids {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  cursor: help;
}

.badge-note {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  cursor: help;
}

.badge-watch {
  background: rgba(243, 210, 123, 0.18);
  border: 1px solid var(--gold);
  cursor: help;
}

.dday-chip {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 5px;
  vertical-align: middle;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--muted);
}

.dday-chip.dday-soon {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.dday-chip.dday-urgent {
  background: rgba(198, 40, 40, 0.16);
  border-color: var(--danger);
  color: var(--danger);
}

.dday-chip.dday-past {
  opacity: 0.65;
}

.filter-check .check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 0;
}

.busan-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.busan-strip-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.busan-strip-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.busan-strip-line {
  font-size: 0.74rem;
  color: var(--muted);
}

.busan-strip-ship {
  font-weight: 700;
  font-size: 0.95rem;
}

.busan-strip-meta {
  font-size: 0.76rem;
  color: var(--muted);
}

.busan-strip-price {
  margin-top: 4px;
  font-weight: 700;
  color: var(--accent);
}

.modal-note-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
}

.family-calc-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.family-calc-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.family-calc-controls select {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  padding: 4px 8px;
}


.group-toggle-row td {
  padding: 4px 10px !important;
  text-align: center;
}

.group-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.group-toggle-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.group-child-row.hidden,
.group-child.hidden {
  display: none;
}

.group-child-row {
  background: rgba(79, 195, 247, 0.06);
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.group-child-row.group-first {
  border-top: 2px solid var(--accent);
}

.group-child-row.group-last {
  border-bottom: 2px solid var(--accent);
}

.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.page-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
