:root {
  --bg-page: #f3f7fb;
  --bg-card: #ffffff;
  --bg-subtle: #e8f1f8;
  --bg-accent-soft: #eef7ff;
  --text-main: #0f2537;
  --text-secondary: #415a77;
  --text-muted: #6c8299;
  --border-color: #d6e4f0;
  --ocean-primary: #0f4c81;
  --ocean-mid: #1b6ca8;
  --ocean-light: #3aa6b9;
  --sunset-coral: #e76f51;
  --sunset-amber: #f4a261;
  --capsule-red: #e63946;
  --success: #1b998b;
  --warning: #d97706;
  --danger: #d62828;
  --shadow-sm: 0 2px 8px rgba(15, 37, 55, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 37, 55, 0.09);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

[data-theme='dark'] {
  --bg-page: #0a1422;
  --bg-card: #122238;
  --bg-subtle: #19304d;
  --bg-accent-soft: #162b46;
  --text-main: #f0f6fc;
  --text-secondary: #b4c7dc;
  --text-muted: #7f97b2;
  --border-color: #243b58;
  --ocean-primary: #3895d3;
  --ocean-mid: #58a6ff;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang HK', 'Noto Sans TC', 'Microsoft JhengHei',
    'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  padding-bottom: 92px;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

/* HERO & COUNTDOWN HEADER */
.hero-header {
  position: relative;
  background: linear-gradient(140deg, #071e3d 0%, #0f4c81 48%, #1e81b0 78%, #e76f51 100%);
  color: #ffffff;
  padding: 18px 16px 26px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(7, 30, 61, 0.25);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(255, 209, 102, 0.22), transparent 45%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  z-index: 1;
}

.top-utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-pill:active {
  transform: scale(0.97);
}

.btn-danger-glow {
  background: linear-gradient(135deg, #e63946, #d62828);
  color: #fff;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.48);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.hero-title-block h1 {
  font-size: clamp(1.38rem, 3.2vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.dot-sep {
  opacity: 0.6;
}

/* COUNTDOWN GRID */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.countdown-card {
  background: rgba(11, 25, 44, 0.56);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.milestone-countdown {
  background: linear-gradient(135deg, rgba(18, 35, 62, 0.72), rgba(145, 42, 42, 0.58));
  border-color: rgba(255, 183, 77, 0.42);
}

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

.cd-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #bae6fd;
  letter-spacing: 0.3px;
}

.urgent-tag {
  color: #fde047;
}

.cd-sub-pill {
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 9px;
  border-radius: 999px;
}

.cd-digits {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  margin: 4px 0 10px;
}

.cd-unit {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
}

.cd-num {
  display: block;
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #ffffff;
}

.cd-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.8;
  margin-top: 2px;
}

.cd-colon {
  font-size: 1.3rem;
  font-weight: 800;
  opacity: 0.65;
}

.ms-title-text {
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.ms-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ms-countdown-inline {
  font-size: 1.18rem;
  font-weight: 800;
  color: #fde047;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.28);
  padding: 5px 12px;
  border-radius: 10px;
}

.cd-footer {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

/* SMART REMINDER BANNER */
.smart-reminder-banner {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.reminder-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.reminder-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pulse-badge {
  background: #fde047;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
}

.reminder-current-date {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.date-sim-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.sim-select {
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

.reminder-items-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}

.reminder-item-chip {
  background: rgba(11, 25, 44, 0.65);
  border-left: 4px solid #fde047;
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.reminder-item-chip.done {
  border-left-color: #4ade80;
  opacity: 0.75;
}

.reminder-item-chip h4 {
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: #fff;
}

.reminder-item-chip p {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.82);
}

/* MAIN LAYOUT & STICKY TABS */
.app-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 14px;
}

.main-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--ocean-primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 76, 129, 0.25);
}

.tab-badge {
  background: var(--sunset-coral);
  color: #fff;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 800;
}

.tab-panel {
  display: none;
}

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

/* CARDS & CONTROLS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.plan-b-card {
  border-top: 4px solid var(--ocean-primary);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.section-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.plan-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.control-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 0.86rem;
  font-family: inherit;
}

.inline-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checkbox-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: var(--bg-subtle);
  padding: 8px 11px;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
  margin-bottom: 0 !important;
}

.plan-toggles-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}

.active-plan-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-chip {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ocean-primary);
}

/* DAY SELECTOR BAR */
.day-selector-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.day-pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.day-pill.active {
  background: linear-gradient(135deg, var(--ocean-primary), var(--ocean-mid));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25);
}

/* TIMELINE & SCHEDULE CARDS */
.day-banner-card {
  background: linear-gradient(135deg, var(--ocean-primary), #165b8c);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
}

.day-banner-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.day-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}

.day-meta-pill {
  background: rgba(255, 255, 255, 0.16);
  padding: 4px 11px;
  border-radius: 999px;
}

.cut-priority-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

[data-theme='dark'] .cut-priority-box {
  background: #2c2010;
  border-color: #78350f;
  color: #fde68a;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--ocean-mid);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease;
}

.timeline-item.cat-food {
  border-left-color: var(--sunset-coral);
}

.timeline-item.cat-hotel {
  border-left-color: #8b5cf6;
}

.timeline-item.cat-sight {
  border-left-color: var(--ocean-light);
}

.timeline-item.cat-shopping {
  border-left-color: #ec4899;
}

.timeline-item.cat-flight,
.timeline-item.cat-Airport {
  border-left-color: #0ea5e9;
}

.timeline-item.highlight-active-slot {
  border: 2px solid var(--success);
  border-left-width: 6px;
  background: var(--bg-accent-soft);
}

.timeline-item.dimmed-slot {
  opacity: 0.65;
}

.tl-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.tl-time {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ocean-primary);
  background: var(--bg-subtle);
  padding: 3px 10px;
  border-radius: 8px;
}

.tl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}

.tl-title {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tl-address-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 7px 10px;
  border-radius: 9px;
  margin-bottom: 8px;
}

.kr-addr-code {
  font-weight: 700;
  color: var(--text-main);
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

.tl-transport {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.tl-notes {
  font-size: 0.83rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 8px 11px;
  border-radius: 9px;
  margin-bottom: 10px;
}

.tl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* BUTTONS */
.btn-primary,
.btn-secondary,
.btn-danger-lg,
.btn-sm,
.btn-action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--ocean-primary);
  color: #fff;
  padding: 9px 15px;
  font-size: 0.86rem;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-danger-lg {
  background: var(--danger);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(214, 40, 40, 0.3);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.78rem;
}

.btn-action-chip {
  background: var(--bg-page);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-action-chip:hover {
  background: var(--bg-subtle);
}

.btn-action-chip.chip-nobeef {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* KOREAN SHOW CARDS TAB */
.no-beef-hero-card {
  border: 2px solid #ef4444;
  background: linear-gradient(180deg, var(--bg-card), rgba(254, 226, 226, 0.25));
}

.no-beef-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.no-beef-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 6px;
}

.korean-display-box {
  background: #111827;
  color: #ffffff;
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 16px;
  cursor: pointer;
  border: 2px solid #f87171;
}

.kr-huge {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.4;
  color: #fef08a;
  margin-bottom: 8px;
  word-break: keep-all;
}

.kr-meaning {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-top: 8px;
}

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

.dietary-mini-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
}

.dietary-mini-card h4 {
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.dietary-mini-card .kr-line {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ocean-primary);
  margin-bottom: 4px;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
}

.loc-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

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

.loc-kr-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ocean-primary);
}

.loc-kr-addr {
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--bg-card);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

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

.filter-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--ocean-primary);
  color: #fff;
  border-color: transparent;
}

/* TABLES & GRIDS */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.table-responsive {
  overflow-x: auto;
  margin-top: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--bg-subtle);
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

/* CHECKLISTS */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-color);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--ocean-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checklist-item.completed .chk-title {
  text-decoration: line-through;
  opacity: 0.65;
}

.chk-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.chk-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* CONVERTER & EXPENSE TRACKER */
.converter-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: var(--bg-subtle);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 12px 14px;
}

.stat-box .stat-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.stat-box .stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ocean-primary);
  margin-top: 2px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 18, 34, 0.78);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none;
}

.showcard-modal-content {
  background: #0b1320;
  color: #ffffff;
  border: 3px solid #fde047;
  border-radius: 24px;
  width: 100%;
  max-width: 760px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.showcard-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.showcard-badge {
  background: #fde047;
  color: #0f172a;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.btn-close-lg {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.showcard-body {
  text-align: center;
  padding: 12px 4px;
}

.showcard-kr-main {
  font-size: clamp(1.7rem, 5vw, 2.75rem);
  font-weight: 900;
  color: #fef08a;
  line-height: 1.38;
  margin-bottom: 16px;
  word-break: keep-all;
}

.showcard-kr-sub {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 16px;
}

.showcard-zh-note {
  font-size: 1rem;
  color: #d1d5db;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 14px;
}

.modal-card {
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.modal-card.modal-xl {
  max-width: 880px;
}

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

.modal-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-form .form-row {
  margin-bottom: 12px;
}

.modal-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

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

.notion-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.notion-section-box {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg-page);
}

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 84px;
  right: 16px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-left: 4px solid #38bdf8;
}

/* MOBILE STICKY BOTTOM BAR */
@media (max-width: 768px) {
  .main-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-bottom: 0;
    border-radius: 18px 18px 0 0;
    z-index: 900;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  }

  .tab-btn {
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    font-size: 0.7rem;
  }

  .tab-icon {
    font-size: 1.15rem;
  }
}
