/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #f7f5f2;
  --color-surface: #ffffff;
  --color-surface-alt: #faf9f7;
  --color-text: #2c2a27;
  --color-text-secondary: #5c5854;
  --color-text-muted: #8a8580;
  --color-accent: #2a7f62;
  --color-accent-light: #e4f2ed;
  --color-accent-hover: #1f634c;
  --color-border: #e0ddd8;
  --color-border-light: #eeece8;
  --color-warning: #c47f17;
  --color-error: #c0392b;
  --color-success: #2a7f62;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  --max-width: 1120px;
  --header-height: 60px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 20px;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
}
.logo:hover { text-decoration: none; color: var(--color-accent); }

.logo-icon { flex-shrink: 0; }

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

.site-nav a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* Main */
main {
  flex: 1;
  padding: 40px 0 60px;
}

/* Intro */
.intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.intro h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--color-text);
}

.intro p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
}

/* Planner layout */
.planner-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  margin-bottom: 64px;
  align-items: start;
}

@media (max-width: 860px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }
}

/* Trip setup */
.trip-setup {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.trip-setup h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
  border: none;
  padding: 0;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(42, 127, 98, 0.12);
}

select.input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%235c5854' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.input-sm {
  width: 80px;
  text-align: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.trip-length {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-suffix {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.activities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.custom-weather {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.btn-full { width: 100%; }

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

/* Packing output */
.packing-output {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.output-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.output-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Progress bar */
.progress-bar {
  position: relative;
  height: 28px;
  background: var(--color-border-light);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 14px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* Packing list */
.packing-list { margin-bottom: 20px; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
}

.empty-state .empty-icon { margin-bottom: 16px; opacity: 0.5; }

.packing-category {
  margin-bottom: 20px;
}

.category-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 8px;
}

.packing-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.packing-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  cursor: pointer;
}

.packing-item:hover { background: var(--color-surface-alt); }

.packing-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.packing-item label {
  font-size: 0.92rem;
  line-height: 1.4;
  cursor: pointer;
  flex: 1;
}

.packing-item.checked label {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.item-qty {
  font-size: 0.78rem;
  color: var(--color-accent);
  font-weight: 600;
  background: var(--color-accent-light);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Notes */
.list-notes h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.list-notes textarea {
  resize: vertical;
  font-family: var(--font-sans);
}

/* Content sections */
.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-accent);
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Mistakes list */
.mistakes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mistakes-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-sm);
}

.mistakes-list li strong {
  color: var(--color-text);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.faq-item dt {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.faq-item dd {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
  margin-top: auto;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-meta {
  margin-top: 4px;
  font-size: 0.78rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: toast-in 0.3s ease;
}

.toast-hide {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

/* Print */
@media print {
  .site-header, .site-footer, .trip-setup, .output-actions, .progress-bar, .list-notes, .site-nav {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .packing-output { border: none; box-shadow: none; padding: 0; }
  .packing-item.checked label { text-decoration: line-through; color: #888; }
}

/* Responsive */
@media (max-width: 600px) {
  .site-header .container { padding: 0 16px; }
  main { padding: 24px 0 40px; }
  .container { padding: 0 16px; }
  .trip-setup, .packing-output { padding: 20px; }
  .activities-grid { grid-template-columns: 1fr; }
  .output-header { flex-direction: column; align-items: flex-start; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
