/* ====================================================
   わくわく たびのしおり スタイルシート (style.css)
   対象: 7歳・3歳のお子様向け 絵本風ポップ・パステルデザイン
   レスポンシブ（スマホ・PC・タブレット対応）＆ A4印刷対応
   Cloudflare Pages 最適化
   ==================================================== */

:root {
  --font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
  
  /* パステルカラーパレット */
  --bg-main: #FFFDF8;
  --bg-card: #FFFFFF;
  --text-main: #3D352E;
  --text-sub: #6E6259;
  --text-muted: #9E9186;
  
  /* アクセントカラー */
  --primary-blue: #4EA8DE;
  --primary-blue-light: #E7F5FC;
  --primary-blue-border: #BEE3F8;
  
  --primary-green: #52B788;
  --primary-green-light: #EBF8F2;
  --primary-green-border: #C2EDD8;
  
  --primary-orange: #F77F00;
  --primary-orange-light: #FFF0E0;
  --primary-orange-border: #FFD8B3;
  
  --primary-pink: #F72585;
  --primary-pink-light: #FDE8F3;
  --primary-pink-border: #F8BBD0;
  
  --primary-yellow: #FFD166;
  --primary-yellow-light: #FFF9E6;

  --wedding-rose: #E05780;
  --wedding-rose-light: #FFF0F5;
  --wedding-rose-border: #FBCFE8;
  
  --stamp-red: #E63946;
  --border-radius-sm: 12px;
  --border-radius-md: 20px;
  --border-radius-lg: 28px;
  
  --shadow-soft: 0 4px 16px rgba(120, 100, 80, 0.08);
  --shadow-hover: 0 8px 24px rgba(120, 100, 80, 0.15);
}

/* リセット＆ベース */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* ルビの装飾（お子様が見やすいフォントサイズと間隔） */
ruby {
  ruby-align: center;
}
rt {
  font-size: 0.65em;
  color: #7B6858;
  font-weight: 700;
  letter-spacing: -0.02em;
  transform: translateY(-1px);
}

/* 紙吹雪キャンバス */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* ====================================================
   操作バー（印刷時は非表示）
   ==================================================== */
.action-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px dashed #E2D9CE;
  padding: 10px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.action-bar-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.action-bar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #E76F51;
}
.brand-icon {
  font-size: 1.4rem;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 表示切り替えトグル */
.view-toggle-group {
  display: inline-flex;
  background: #F0E9DF;
  padding: 3px;
  border-radius: 999px;
  gap: 2px;
}
.btn-toggle {
  background: transparent;
  color: #6C5D53;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}
.btn-toggle.active {
  background: #FFFFFF;
  color: #E76F51;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ボタン汎用 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #FF7E5F, #FEB47B);
  color: #FFFFFF;
}
.btn-secondary {
  background: linear-gradient(135deg, #2A9D8F, #48CAE4);
  color: #FFFFFF;
}
.btn-ghost {
  background: #F4EFEA;
  color: var(--text-main);
}
.btn-danger-ghost:hover {
  background: #FFE3E3;
  color: #D90429;
}

/* ====================================================
   メインコンテナ
   ==================================================== */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* ====================================================
   表紙風ヒーローカード
   ==================================================== */
.hero-card {
  position: relative;
  background: linear-gradient(180deg, #FFF9E6 0%, #FFFFFF 100%);
  border: 4px solid #FFE082;
  border-radius: var(--border-radius-lg);
  padding: 32px 24px 28px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  overflow: hidden;
}

.hero-decorations span {
  position: absolute;
  pointer-events: none;
  animation: float 4s ease-in-out infinite;
}
.s1 { top: 15px; left: 20px; font-size: 1.4rem; animation-delay: 0s; }
.s2 { top: 20px; right: 25px; font-size: 1.6rem; animation-delay: 1.5s; }
.c1 { top: 45px; left: 8%; font-size: 1.8rem; animation-delay: 0.8s; opacity: 0.8; }
.c2 { top: 50px; right: 10%; font-size: 1.9rem; animation-delay: 2.2s; opacity: 0.8; }
.deco-plane { top: 12px; right: 20%; font-size: 2rem; animation: fly 6s linear infinite; }
.deco-train { bottom: 12px; left: 16px; font-size: 2rem; animation: bounce 3s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes fly {
  0% { transform: translateX(30px) translateY(5px); }
  50% { transform: translateX(-15px) translateY(-5px); }
  100% { transform: translateX(30px) translateY(5px); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-badge {
  display: inline-block;
  background: #FFF;
  border: 2px solid #FFB703;
  color: #D48B00;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.hero-title {
  margin-bottom: 12px;
}
.title-sub {
  display: block;
  font-size: 1.1rem;
  color: #FB8500;
  letter-spacing: 0.1em;
  font-weight: 900;
  margin-bottom: 4px;
}
.title-main {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.3;
  color: #E76F51;
  text-shadow: 2px 2px 0px #FFF3D6;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 600px;
  margin: 0 auto 20px;
  font-weight: 500;
}

/* なまえ記入エリア */
.name-badge-card {
  background: #FFFFFF;
  border: 2px dashed #FFB4A2;
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  max-width: 580px;
  margin: 0 auto;
}
.name-label {
  font-weight: 700;
  font-size: 1rem;
  color: #B56576;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.name-inputs {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.name-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}
.child-tag {
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-block;
  align-self: flex-start;
}
.child-tag.age-7 {
  background: #E0F2FE;
  color: #0369A1;
}
.child-tag.age-3 {
  background: #FCE7F3;
  color: #BE185D;
}

.name-field {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #E5D5C5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  background: #FFFDF8;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
}
.name-field:focus {
  border-color: #FB8500;
  background: #FFF;
}

/* ====================================================
   クイックナビ
   ==================================================== */
.quick-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}
.nav-chip {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.nav-chip:hover {
  transform: translateY(-2px);
}
.chip-d1 { background: #E3F2FD; color: #1565C0; border-color: #BBDEFB; }
.chip-d2 { background: #FCE7F3; color: #BE185D; border-color: #FBCFE8; }
.chip-d3 { background: #FFF9C4; color: #F57F17; border-color: #FFF176; }
.chip-d4 { background: #FCE4EC; color: #C2185B; border-color: #F8BBD0; }
.chip-v  { background: #EDE7F6; color: #512DA8; border-color: #D1C4E9; }
.chip-m  { background: #FFF3E0; color: #E65100; border-color: #FFE0B2; }
.chip-p  { background: #E0F7FA; color: #00838F; border-color: #B2EBF2; }

/* ====================================================
   お約束カード
   ==================================================== */
.rules-card {
  background: #FFFFFF;
  border: 3px solid #FFD166;
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}
.rules-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rules-icon {
  font-size: 1.6rem;
}
.rules-header h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #D48B00;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.rule-item {
  background: #FFFDF8;
  border: 2px solid #FFE8A1;
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rule-num {
  background: #FFD166;
  color: #795548;
  font-weight: 900;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.rule-body h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #4A3E3D;
  margin-bottom: 2px;
}
.rule-body p {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.45;
}

/* ====================================================
   日程セクション（カード型タイムライン表示）
   ==================================================== */
.day-section {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-soft);
  position: relative;
  border: 3px solid transparent;
}

/* 1日目: 空と新幹線のブルー */
.day-1-theme {
  border-color: var(--primary-blue-border);
  background: linear-gradient(180deg, #F0F8FF 0%, #FFFFFF 15%);
}
.day-1-theme .day-badge {
  background: linear-gradient(135deg, #4EA8DE, #0077B6);
}
.day-1-theme .day-title {
  color: #023E8A;
}

/* 2日目: 結婚式＆自然のパステルローズ・ミント */
.day-2-theme {
  border-color: var(--wedding-rose-border);
  background: linear-gradient(180deg, #FFF5F8 0%, #FFFFFF 15%);
}
.day-2-theme .day-badge.wedding-badge {
  background: linear-gradient(135deg, #E05780, #B83280);
}
.day-2-theme .day-title {
  color: #9D174D;
}

/* 3日目: パーティー・ごちそうのイエロー */
.day-3-theme {
  border-color: var(--primary-orange-border);
  background: linear-gradient(180deg, #FFF9EB 0%, #FFFFFF 15%);
}
.day-3-theme .day-badge {
  background: linear-gradient(135deg, #F39C12, #E67E22);
}
.day-3-theme .day-title {
  color: #B9770E;
}

/* 4日目: ピーチ航空のピンク */
.day-4-theme {
  border-color: var(--primary-pink-border);
  background: linear-gradient(180deg, #FDF2F8 0%, #FFFFFF 15%);
}
.day-4-theme .day-badge {
  background: linear-gradient(135deg, #F72585, #B5179E);
}
.day-4-theme .day-title {
  color: #7209B7;
}

/* ヘッダー共通 */
.day-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px dashed #EADECE;
}
.day-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.day-title {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.day-icon {
  font-size: 1.4rem;
}
.day-subinfo {
  font-size: 0.92rem;
  color: var(--text-sub);
  font-weight: 500;
}

/* タイムラインアイテム */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 95px 36px 1fr;
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 600px) {
  .timeline-item {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "dot time"
      "dot card";
    gap: 8px 10px;
  }
  .timeline-time {
    grid-area: time;
    text-align: left;
    margin-bottom: 2px;
  }
  .timeline-dot-wrapper {
    grid-area: dot;
  }
  .timeline-card {
    grid-area: card;
  }
}

.timeline-time {
  text-align: right;
  padding-top: 6px;
}
.time-badge {
  display: inline-block;
  background: #EFE9E0;
  color: #635343;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.time-badge.wedding-time {
  background: #FCE7F3;
  color: #BE185D;
  border: 1px solid #FBCFE8;
}
.time-badge.special-time {
  background: #FFE2C8;
  color: #D35400;
}
.time-badge.shinkansen-time {
  background: #D4EDDA;
  color: #155724;
}
.time-badge.party-time {
  background: #FFF3CD;
  color: #856404;
}
.time-badge.peach-time {
  background: #F8D7DA;
  color: #721C24;
}

.timeline-dot-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.timeline-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #E2D7CC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 2;
  flex-shrink: 0;
}
.timeline-dot.wedding-dot {
  border-color: #FBCFE8;
  background: #FFF0F5;
}
.timeline-line {
  flex-grow: 1;
  width: 3px;
  background: repeating-linear-gradient(to bottom, #D8CCC0, #D8CCC0 4px, transparent 4px, transparent 8px);
  margin-top: 4px;
}

.timeline-card {
  background: #FFFDFB;
  border: 2px solid #EFE4D6;
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
.timeline-card:hover {
  border-color: #E2CEB9;
  background: #FFFFFF;
}

.highlight-item .timeline-card {
  border-width: 2.5px;
}
.wedding-card {
  border-color: #FBCFE8;
  background: #FFF9FB;
}
.special-card {
  border-color: #FFCC80;
  background: #FFFAF0;
}
.shinkansen-card {
  border-color: #A5D6A7;
  background: #F4FAF5;
}
.party-card {
  border-color: #FFE082;
  background: #FFFDF4;
}
.peach-card {
  border-color: #F48FB1;
  background: #FFF5F8;
}

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

.transport-tag {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}
.wedding-tag { background: #FCE7F3; color: #BE185D; }
.plane-tag { background: #E1F5FE; color: #0288D1; }
.monorail-tag { background: #E0F2F1; color: #00796B; }
.train-tag { background: #E8F5E9; color: #388E3C; }
.local-train-tag { background: #F1F8E9; color: #558B2F; }
.shinkansen-tag { background: #E8EAF6; color: #303F9F; }
.snack-tag { background: #FFF3E0; color: #E65100; }
.taxi-tag { background: #FFFDE7; color: #F57F17; }
.party-tag { background: #FFF8E1; color: #FFA000; }
.peach-tag { background: #FCE4EC; color: #C2185B; }

/* チェックボックス */
.check-box-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.task-check {
  display: none;
}
.custom-check {
  width: 22px;
  height: 22px;
  border: 2px solid #C4B2A0;
  border-radius: 6px;
  background: #FFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.custom-check::after {
  content: "✔";
  font-size: 15px;
  font-weight: 900;
  color: #FFF;
  display: none;
}

.task-check:checked + .custom-check {
  background: #4EA8DE;
  border-color: #0288D1;
  transform: scale(1.1);
}
.task-check:checked + .custom-check::after {
  display: block;
}
.check-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-sub);
}
.task-check:checked ~ .check-label {
  color: #0288D1;
}

/* スポット情報 */
.spot-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #2F2A26;
  margin-bottom: 6px;
  line-height: 1.4;
}
.spot-desc {
  font-size: 0.95rem;
  color: #554A42;
  margin-bottom: 8px;
}
.spot-point {
  font-size: 0.85rem;
  font-weight: 700;
  background: #F6EFE6;
  padding: 6px 10px;
  border-radius: 8px;
  color: #7A5F44;
  line-height: 1.4;
}
.wedding-point { background: #FFF0F5; color: #BE185D; }
.snack-point { background: #FFF0E0; color: #D35400; }
.party-point { background: #FFF9E6; color: #B9770E; }
.peach-point { background: #FCE7F3; color: #9D174D; }

/* ====================================================
   スケジュール一覧表形式（テーブル表示）
   ==================================================== */
.schedule-table-section {
  margin-bottom: 32px;
}
.table-card {
  background: #FFFFFF;
  border: 3px solid #E2D7CC;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.table-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.table-icon {
  font-size: 1.6rem;
}
.table-card-header h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #3D352E;
}
.table-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.trip-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 2px solid #E5D8CC;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  font-size: 0.92rem;
}

.trip-table th,
.trip-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #EFE6DC;
  border-right: 1px solid #EFE6DC;
  vertical-align: middle;
}
.trip-table th:last-child,
.trip-table td:last-child {
  border-right: none;
}

.trip-table th {
  background: #F8F3EC;
  color: #5D4D40;
  font-weight: 900;
  text-align: left;
}

/* テーブルヘッダー行 */
.row-day1-header td { background: #EAF4FC; color: #005F9E; font-weight: 800; border-top: 2px solid #BEE3F8; }
.row-day2-header td { background: #FDF2F8; color: #9D174D; font-weight: 800; border-top: 2px solid #FBCFE8; }
.row-day3-header td { background: #FFF9E6; color: #B25E00; font-weight: 800; border-top: 2px solid #FFE082; }
.row-day4-header td { background: #FDEEF4; color: #9C155E; font-weight: 800; border-top: 2px solid #F8BBD0; }

.row-highlight {
  background: #FFFAF4;
}
.row-wedding {
  background: #FFF8FA;
}

.tbl-time {
  display: inline-block;
  background: #F0ECE4;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 6px;
}

.tbl-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}
.tbl-tag.wedding { background: #FCE7F3; color: #BE185D; }
.tbl-tag.plane { background: #E1F5FE; color: #0288D1; }
.tbl-tag.monorail { background: #E0F2F1; color: #00796B; }
.tbl-tag.train { background: #E8F5E9; color: #388E3C; }
.tbl-tag.local-train { background: #F1F8E9; color: #558B2F; }
.tbl-tag.shinkansen { background: #E8EAF6; color: #303F9F; }
.tbl-tag.snack { background: #FFF3E0; color: #E65100; }
.tbl-tag.taxi { background: #FFFDE7; color: #F57F17; }
.tbl-tag.party { background: #FFF8E1; color: #FFA000; }
.tbl-tag.peach { background: #FCE4EC; color: #C2185B; }

/* ====================================================
   インタラクティブブロック（スタンプ・ミッション・持ち物）
   ==================================================== */
.interactive-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 10px;
}

.card-box {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 3px solid #EFE4D6;
}
.box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.box-icon {
  font-size: 1.6rem;
}
.box-header h2 {
  font-size: 1.35rem;
  font-weight: 900;
}
.box-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 16px;
}

/* スタンプラリー */
.vehicle-box {
  border-color: #D1C4E9;
  background: linear-gradient(180deg, #FBF8FF 0%, #FFFFFF 15%);
}
.vehicle-box h2 {
  color: #512DA8;
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.stamp-item {
  background: #FFFDF8;
  border: 2px dashed #D6C8E6;
  border-radius: var(--border-radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.stamp-item:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #7C4DFF;
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.15);
}

.stamp-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #F3EEFB;
  border: 2px solid #E2D4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.stamp-emoji {
  font-size: 2rem;
  transition: opacity 0.2s;
}
.stamp-mark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 235, 238, 0.92);
  color: var(--stamp-red);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  border: 2.5px solid var(--stamp-red);
  border-radius: 50%;
  transform: rotate(-12deg) scale(0);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stamp-item.stamped {
  border-color: #FF8A80;
  background: #FFF8F8;
}
.stamp-item.stamped .stamp-mark {
  transform: rotate(-12deg) scale(1);
  opacity: 1;
}
.stamp-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

/* ミッション */
.mission-box {
  border-color: #FFE0B2;
  background: linear-gradient(180deg, #FFFCF7 0%, #FFFFFF 15%);
}
.mission-box h2 {
  color: #E65100;
}
.mission-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mission-item {
  background: #FFFDF9;
  border: 2px solid #F6E6D3;
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  transition: all 0.2s;
}
.mission-item:hover {
  border-color: #FFA726;
  background: #FFFFFF;
}
.highlight-mission {
  border-color: #FBCFE8;
  background: #FFF9FB;
}
.highlight-mission:hover {
  border-color: #F472B6;
}
.mission-item .check-box-wrapper {
  width: 100%;
}
.mission-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-left: 6px;
}

/* 持ち物 */
.packing-box {
  border-color: #B2EBF2;
  background: linear-gradient(180deg, #F3FDFF 0%, #FFFFFF 15%);
}
.packing-box h2 {
  color: #00838F;
}
.packing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.packing-item {
  background: #FFFDF9;
  border: 2px solid #DDF4F8;
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.packing-item:hover {
  border-color: #4DD0E1;
  background: #FFFFFF;
}
.item-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

/* メモ・お絵描き */
.memo-box {
  border-color: #FFE082;
  background: linear-gradient(180deg, #FFFDF5 0%, #FFFFFF 15%);
}
.memo-box h2 {
  color: #F57F17;
}
.drawing-area {
  background: #FFFFFF;
  border: 2px dashed #E0CFB8;
  border-radius: var(--border-radius-md);
  padding: 16px;
  min-height: 180px;
  position: relative;
}
.drawing-placeholder {
  font-size: 0.85rem;
  color: #A08C79;
  margin-bottom: 8px;
  font-weight: 700;
}
.notes-textarea {
  width: 100%;
  min-height: 130px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
  resize: vertical;
  outline: none;
}

/* ====================================================
   フッター
   ==================================================== */
.trip-footer {
  text-align: center;
  margin-top: 40px;
  padding: 24px;
  color: var(--text-muted);
}
.footer-balloons {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.footer-msg {
  font-size: 1.05rem;
  font-weight: 800;
  color: #E76F51;
  margin-bottom: 4px;
}
.footer-meta {
  font-size: 0.82rem;
}

/* ====================================================
   印刷用スタイル (@media print)
   A4用紙に美しく収まるように最適化
   ==================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  /* 印刷時に不要なUIを完全非表示 */
  .no-print,
  .action-bar,
  .quick-nav,
  #confetti-canvas {
    display: none !important;
  }

  body {
    background-color: #FFFFFF !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    color: #1A1A1A !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 表紙のコンパクト化 */
  .hero-card {
    border-width: 2px !important;
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .title-main {
    font-size: 1.5rem !important;
  }
  .hero-subtitle {
    font-size: 0.82rem !important;
    margin-bottom: 8px !important;
  }
  .name-badge-card {
    padding: 6px 12px !important;
    border-width: 1.5px !important;
  }
  .name-field {
    border: none !important;
    border-bottom: 1.5px solid #888 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 0.95rem !important;
    padding: 2px 4px !important;
  }

  /* お約束カード */
  .rules-card {
    padding: 8px 12px !important;
    margin-bottom: 10px !important;
    border-width: 2px !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .rules-header h2 {
    font-size: 1rem !important;
  }
  .rules-grid {
    gap: 6px !important;
  }
  .rule-item {
    padding: 5px 8px !important;
  }
  .rule-body h3 {
    font-size: 0.88rem !important;
  }
  .rule-body p {
    font-size: 0.78rem !important;
  }

  /* 日程カード */
  .day-section {
    border-width: 1.5px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .day-header {
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
  }
  .day-title {
    font-size: 1.15rem !important;
  }
  .day-badge {
    padding: 2px 8px !important;
    font-size: 0.78rem !important;
  }

  /* タイムライン */
  .timeline-list {
    gap: 6px !important;
  }
  .timeline-item {
    grid-template-columns: 85px 22px 1fr !important;
    gap: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .time-badge {
    font-size: 0.75rem !important;
    padding: 1px 5px !important;
  }
  .timeline-dot {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.8rem !important;
  }
  .timeline-card {
    padding: 6px 10px !important;
    border-width: 1px !important;
    box-shadow: none !important;
  }
  .spot-title {
    font-size: 0.95rem !important;
    margin-bottom: 2px !important;
  }
  .spot-desc {
    font-size: 0.8rem !important;
    margin-bottom: 3px !important;
  }
  .spot-point {
    font-size: 0.74rem !important;
    padding: 3px 6px !important;
  }

  /* テーブル表示の印刷対応 */
  .schedule-table-section {
    display: block !important;
    margin-bottom: 12px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .table-card {
    border-width: 1.5px !important;
    padding: 10px !important;
    box-shadow: none !important;
  }
  .trip-table {
    font-size: 0.8rem !important;
  }
  .trip-table th,
  .trip-table td {
    padding: 6px 8px !important;
  }
  .trip-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* チェックボックス（印刷時は綺麗に枠を表示） */
  .custom-check {
    width: 15px !important;
    height: 15px !important;
    border-color: #444 !important;
  }
  .check-label {
    font-size: 0.72rem !important;
  }

  /* インタラクティブセクション */
  .interactive-grid {
    gap: 10px !important;
    margin-top: 10px !important;
    break-before: auto;
  }
  .card-box {
    padding: 10px 12px !important;
    border-width: 1.5px !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .box-header h2 {
    font-size: 1.05rem !important;
  }
  .box-desc {
    font-size: 0.78rem !important;
    margin-bottom: 8px !important;
  }

  /* スタンプラリー印刷 */
  .stamp-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  .stamp-circle {
    width: 44px !important;
    height: 44px !important;
  }
  .stamp-emoji {
    font-size: 1.2rem !important;
  }
  .stamp-title {
    font-size: 0.7rem !important;
  }

  /* ミッション・持ち物 */
  .mission-list {
    gap: 5px !important;
  }
  .mission-item {
    padding: 5px 8px !important;
  }
  .mission-text {
    font-size: 0.8rem !important;
  }

  .packing-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }
  .packing-item {
    padding: 5px 8px !important;
  }
  .item-text {
    font-size: 0.8rem !important;
  }

  /* お絵描き・メモ枠 */
  .drawing-area {
    min-height: 130px !important;
    border-width: 1.5px !important;
  }

  .trip-footer {
    margin-top: 10px !important;
    padding: 8px !important;
  }
}

/* ====================================================
   PWA & インストール機能スタイル
   ==================================================== */

/* インストールボタン */
.btn-install {
  background: linear-gradient(135deg, #FF6F00 0%, #FF9E80 100%);
  color: #FFFFFF !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(247, 127, 0, 0.35);
  border: 2px solid #FFF3E0;
  animation: pulse-soft 2.5s infinite;
}

.btn-install:hover {
  background: linear-gradient(135deg, #E65100 0%, #FF8A65 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(247, 127, 0, 0.45);
}

@keyframes pulse-soft {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(247, 127, 0, 0.35);
  }
  50% {
    box-shadow: 0 4px 18px rgba(247, 127, 0, 0.6);
  }
}

/* オフラインバッジ */
.offline-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #795548;
  background-color: #EFEBE9;
  border: 1px solid #D7CCC8;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
  animation: fadeIn 0.3s ease-out;
}

/* iOS Safari用 ホーム画面追加モーダル */
.pwa-dialog {
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 0;
  max-width: 440px;
  width: 90%;
  background: #FFFFFF;
  box-shadow: 0 20px 40px rgba(61, 53, 46, 0.25);
  margin: auto;
  overflow: hidden;
}

.pwa-dialog::backdrop {
  background: rgba(45, 35, 25, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pwa-dialog-content {
  padding: 24px;
}

.pwa-dialog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px dashed #FFE0B2;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.pwa-dialog-icon {
  font-size: 1.8rem;
}

.pwa-dialog-header h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  flex-grow: 1;
}

.pwa-dialog-close {
  background: #F5F5F5;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: #757575;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pwa-dialog-close:hover {
  background: #EEEEEE;
  color: #212121;
}

.pwa-dialog-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 16px;
}

.pwa-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.pwa-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FFF9F2;
  border: 1.5px solid #FFE0B2;
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-main);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary-orange);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 0.8rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}

.share-icon, .plus-icon {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid #CCC;
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.95rem;
  font-weight: bold;
}

.pwa-dialog-footer {
  display: flex;
  justify-content: center;
}

.pwa-dialog-footer .btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

/* トースト通知 */
.pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #3D352E;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

.pwa-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* 印刷時はPWA UIを確実に非表示 */
@media print {
  .btn-install,
  .offline-badge,
  .pwa-dialog,
  .pwa-toast {
    display: none !important;
  }
}

