/* =========================================================
   旅じたくチェッカー style.css
   パレット:
   --paper  #F2FAFB  淡い水色（空と海の間の背景）
   --ink    #17384A  濃紺（本文）
   --sea    #0E8FA3  ティール（メインカラー）
   --deep   #0A6E7E  濃いティール（ホバー等）
   --sun    #FFB547  サンイエロー（アクセント・進捗）
   --coral  #FF6B5E  コーラル（「忘れがち」タグ）
   ========================================================= */

:root {
  --paper: #F2FAFB;
  --ink: #17384A;
  --sea: #0E8FA3;
  --deep: #0A6E7E;
  --sun: #FFB547;
  --coral: #FF6B5E;
  --card: #FFFFFF;
  --line: #D6E9EC;
  --radius: 16px;
  --font-display: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #DFF3F6 0%, transparent 60%),
    var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ===== ヘッダー ===== */
.site-header {
  text-align: center;
  padding: 32px 16px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-mark { font-size: 1.6rem; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}
.brand-tag {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #4A6B7A;
}

/* ===== パネル共通 ===== */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 20px 28px;
  box-shadow: 0 4px 24px rgba(14, 143, 163, 0.10);
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-badge {
  background: var(--sea);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ===== 質問と選択チップ ===== */
.q {
  border: none;
  padding: 0;
  margin: 0 0 18px;
}
.q-label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  padding: 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.chip:active { transform: scale(0.96); }
.chip.is-active {
  background: var(--sea);
  border-color: var(--sea);
  color: #fff;
  font-weight: 700;
}
.chip:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ===== ボタン ===== */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--sea), var(--deep));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(14, 143, 163, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 3px 8px rgba(14,143,163,0.3); }

.btn-secondary {
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--deep);
  background: #fff;
  border: 2px solid var(--sea);
  border-radius: 999px;
  cursor: pointer;
}
.btn-ghost {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #4A6B7A;
  background: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== 結果パネル ===== */
.result-panel { padding-top: 0; overflow: hidden; }

/* 荷物タグ風サマリー */
.luggage-tag {
  position: relative;
  margin: 0 -20px 20px;
  padding: 22px 24px 20px 56px;
  background: linear-gradient(135deg, var(--sun), #FFC96B);
  color: #5C3A00;
  border-bottom: 2px dashed rgba(92, 58, 0, 0.35);
}
.tag-hole {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}
.tag-eyebrow {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.75;
}
.tag-title {
  margin: 2px 0 4px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
}
.tag-conditions {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
}

/* 進捗バー */
.progress-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.progress-bar {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--sun), var(--sea));
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* カテゴリと項目 */
.cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 22px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: #4A6B7A;
}
.item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
}
.item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--sea);
  flex-shrink: 0;
  cursor: pointer;
}
.item-name { font-size: 0.95rem; }
.item.is-checked .item-name {
  text-decoration: line-through;
  color: #8FA9B4;
}
.item-note {
  display: block;
  font-size: 0.75rem;
  color: #4A6B7A;
}
.badge-forget {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--coral);
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

/* ===== 保存したリスト（ホーム画面） ===== */
.saved-panel { margin-bottom: 20px; }
.saved-limit {
  font-size: 0.75rem;
  font-weight: 500;
  color: #4A6B7A;
}
.saved-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #F7FCFD;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s, background 0.15s;
}
.saved-card:hover { border-color: var(--sea); background: #EFF9FA; }
.saved-card-main { flex: 1; min-width: 0; }
.saved-card-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.saved-card-meta {
  display: block;
  font-size: 0.72rem;
  color: #4A6B7A;
}
.saved-card-progress {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--deep);
  background: #E3F3F5;
  padding: 4px 10px;
  border-radius: 999px;
}
.saved-card-delete {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  color: #8FA9B4;
}
.saved-card-delete:hover { background: #FFECEA; color: var(--coral); }
.saved-note {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: #4A6B7A;
}

/* ===== 編集中バナー ===== */
.editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #FFF6E5;
  border: 1.5px solid #FFDFA3;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
}
.btn-link {
  border: none;
  background: none;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 2px 4px;
}

/* ===== 保存バー（結果画面） ===== */
.save-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 4px;
  padding: 10px 12px;
  background: #F7FCFD;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  font-size: 0.85rem;
}
.save-bar input[type="text"] {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}
.save-bar input[type="text"]:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
}
.btn-save {
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--sea);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.btn-save:hover { background: var(--deep); }
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--deep);
}
.save-status small {
  font-weight: 500;
  color: #4A6B7A;
}
.save-error {
  width: 100%;
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--coral);
  font-weight: 700;
}
.save-hint {
  width: 100%;
  font-size: 0.75rem;
  color: #4A6B7A;
}

/* ===== その他の持ち物（自由記述） ===== */
.custom-add {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.custom-add input {
  flex: 1;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}
.custom-add input:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
}
.btn-add {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  background: var(--sea);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.btn-add:hover { background: var(--deep); }
.item-delete {
  flex-shrink: 0;
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: none;
  color: #8FA9B4;
  font-size: 0.95rem;
  cursor: pointer;
}
.item-delete:hover { background: #FFECEA; color: var(--coral); }
.custom-empty {
  margin: 4px 0;
  font-size: 0.8rem;
  color: #4A6B7A;
}

.btn-danger { color: var(--coral); }

/* ===== フッター ===== */
.app-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  font-size: 0.75rem;
  color: #4A6B7A;
  text-align: center;
}
.app-footer a { color: var(--deep); }

/* ===== アクセシビリティ ===== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ===== 印刷 ===== */
@media print {
  body { background: #fff; }
  .site-header .brand-tag,
  #form-panel,
  #saved-panel,
  .result-actions,
  .app-footer,
  .save-bar,
  .custom-add,
  .item-delete,
  .progress-wrap { display: none !important; }
  .panel { box-shadow: none; padding: 0; }
  .luggage-tag {
    background: none;
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    margin: 0 0 16px;
    padding: 12px 16px;
  }
  .tag-hole { display: none; }
  .item { break-inside: avoid; }
  .item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-radius: 3px;
  }
}
