/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg:         #f5f5f4;
  --surface:    #ffffff;
  --surface2:   #f9f9f8;
  --border:     #e2e0dc;
  --accent:     #d97706;
  --accent-dim: rgba(217,119,6,0.09);
  --text:       #1c1917;
  --muted:      #78716c;
  --danger:     #dc2626;
  --success:    #16a34a;
  --radius:     8px;
}

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

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size:   14px;
  min-height:  100vh;
  padding:     0 0 80px;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
  background:    var(--surface);
  border-bottom: 1px solid var(--border);
  padding:       16px 20px;
  position:      sticky;
  top:           0;
  z-index:       100;
  box-shadow:    0 1px 4px rgba(0,0,0,0.06);
}
.header-inner {
  max-width:   600px;
  margin:      0 auto;
  display:     flex;
  align-items: center;
  gap:         12px;
}
.header-icon {
  width:           36px;
  height:          36px;
  background:      var(--accent);
  border-radius:   6px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       18px;
  flex-shrink:     0;
}
.header h1 { font-size: 16px; font-weight: 600; line-height: 1.2; }
.header p  { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Trip Meta ───────────────────────────────────────────────── */
.trip-meta { max-width: 600px; margin: 16px auto 0; padding: 0 20px; }
.meta-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-left:   3px solid var(--accent);
  border-radius: var(--radius);
  padding:       12px 14px;
  display:       flex;
  gap:           24px;
  flex-wrap:     wrap;
}
.meta-item   { display: flex; flex-direction: column; gap: 2px; }
.meta-label  {
  font-size:      10px;
  color:          var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family:    'IBM Plex Mono', monospace;
}
.meta-value  {
  font-size:   13px;
  font-weight: 500;
  font-family: 'IBM Plex Mono', monospace;
  color:       var(--accent);
}

/* ── Content ─────────────────────────────────────────────────── */
.content { max-width: 600px; margin: 0 auto; padding: 20px; }

.instruction {
  font-size:     13px;
  color:         var(--muted);
  margin-bottom: 20px;
  padding:       10px 14px;
  background:    var(--surface);
  border-radius: var(--radius);
  border:        1px solid var(--border);
  line-height:   1.5;
}
.instruction span { color: var(--accent); font-weight: 500; }

/* ── Category ────────────────────────────────────────────────── */
.category        { margin-bottom: 20px; }
.category-header {
  display:             flex;
  align-items:         center;
  gap:                 8px;
  margin-bottom:       10px;
  cursor:              pointer;
  user-select:         none;
  -webkit-tap-highlight-color: transparent;
}
.category-header:hover .cat-title { color: var(--accent); }
.cat-icon  { font-size: 16px; }
.cat-title {
  font-size:      13px;
  font-weight:    600;
  color:          var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition:     color 0.15s;
}
.cat-count {
  margin-left:   auto;
  font-size:     11px;
  background:    var(--accent-dim);
  color:         var(--accent);
  border-radius: 20px;
  padding:       2px 8px;
  font-family:   'IBM Plex Mono', monospace;
  display:       none;
}
.cat-count.visible { display: inline-block; }
.cat-toggle {
  font-size:  11px;
  color:      var(--muted);
  margin-left: 4px;
  transition: transform 0.2s;
  display:    inline-block;
}
.category.collapsed .cat-toggle { transform: rotate(-90deg); }

.options-grid {
  display:    flex;
  flex-direction: column;
  gap:        6px;
  overflow:   hidden;
  transition: max-height 0.3s ease;
}
.category.collapsed .options-grid { max-height: 0 !important; }

/* ── Option Row ──────────────────────────────────────────────── */
.option {
  display:     flex;
  align-items: center;
  gap:         12px;
  padding:     11px 14px;
  background:  var(--surface);
  border:      1.5px solid var(--border);
  border-radius: var(--radius);
  cursor:      pointer;
  transition:  border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.option:hover { border-color: #c0bbb4; background: var(--surface2); }

/* Custom checkbox */
.option input[type="checkbox"] {
  -webkit-appearance: none;
  appearance:  none;
  width:       22px;
  height:      22px;
  min-width:   22px;
  border:      2px solid #c0bbb4;
  border-radius: 6px;
  background:  #fff;
  cursor:      pointer;
  position:    relative;
  transition:  background 0.15s, border-color 0.15s, box-shadow 0.15s;
  margin:      0;
}
.option input[type="checkbox"]::after {
  content:      '';
  position:     absolute;
  display:      none;
  left:         6px;
  top:          2px;
  width:        6px;
  height:       11px;
  border:       2.5px solid #fff;
  border-top:   none;
  border-left:  none;
  transform:    rotate(45deg);
}
.option input[type="checkbox"]:checked {
  background:  var(--accent);
  border-color: var(--accent);
  box-shadow:  0 0 0 3px var(--accent-ring, rgba(217,119,6,0.18));
}
.option input[type="checkbox"]:checked::after { display: block; }

/* Highlight row when checked */
.option:has(input:checked) {
  border-color: var(--accent);
  background:   var(--accent-dim);
}

.option-label { font-size: 13px; line-height: 1.35; flex: 1; color: var(--text); }

/* ── Other Comment Box ───────────────────────────────────────── */
.other-comment         { margin-top: 6px; display: none; }
.other-comment.visible { display: block; }
.other-comment textarea {
  width:         100%;
  background:    var(--surface);
  border:        1.5px solid var(--border);
  border-radius: var(--radius);
  color:         var(--text);
  font-family:   'IBM Plex Sans', sans-serif;
  font-size:     13px;
  padding:       10px 14px;
  resize:        vertical;
  min-height:    80px;
  outline:       none;
  transition:    border-color 0.15s;
}
.other-comment textarea:focus       { border-color: var(--accent); }
.other-comment textarea::placeholder { color: var(--muted); }

.divider { height: 1px; background: var(--border); margin: 4px 0 16px; }

/* ── Summary Bar ─────────────────────────────────────────────── */
.summary-bar {
  position:   fixed;
  bottom:     0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding:    12px 20px;
  z-index:    100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.07);
}
.summary-inner {
  max-width:   600px;
  margin:      0 auto;
  display:     flex;
  align-items: center;
  gap:         12px;
}
.selected-count {
  font-size:   12px;
  color:       var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}
.selected-count span { color: var(--accent); font-weight: 600; }

.submit-btn {
  flex:        1;
  background:  var(--accent);
  color:       #fff;
  border:      none;
  border-radius: var(--radius);
  padding:     12px 20px;
  font-size:   14px;
  font-weight: 600;
  cursor:      pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  transition:  opacity 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}
.submit-btn:hover    { opacity: 0.9; }
.submit-btn:active   { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position:   fixed;
  top:        20px;
  left:       50%;
  transform:  translateX(-50%) translateY(-80px);
  background: var(--success);
  color:      #fff;
  padding:    10px 20px;
  border-radius: 20px;
  font-size:  13px;
  font-weight: 500;
  z-index:    999;
  transition: transform 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}
.toast.error { background: var(--danger); }
.toast.show  { transform: translateX(-50%) translateY(0); }

/* ── Loader ──────────────────────────────────────────────────── */
.loader {
  position:        fixed;
  inset:           0;
  background:      rgba(255,255,255,0.6);
  display:         flex;
  align-items:     center;
  justify-content: center;
  z-index:         999;
  display:         none;
}
.loader.visible { display: flex; }
.spinner {
  width:         28px;
  height:        28px;
  border:        3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation:     spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
