* { box-sizing: border-box; }
:root { --accent: #8a4b5c; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #efe6d8 url("img/landing/background.webp") center / cover fixed;
  color: #1f2330;
}
a { color: var(--accent); }
.muted { color: #7a6a64; }
.hidden { display: none !important; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; background: rgba(255, 250, 243, .9); border-bottom: 1px solid rgba(120, 90, 70, .15);
}
.brand { font-weight: 700; font-size: 1.3rem; text-decoration: none; color: var(--accent); font-family: "Playfair Display", Georgia, serif; }
.brand img { display: block; height: 44px; width: auto; }
.inline { display: flex; gap: 12px; align-items: center; margin: 0; }
.topbar nav a { text-decoration: none; font-weight: 500; }
.inline input[type=text] { margin: 0; width: auto; }

.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
/* Soft panel so content stays readable over the floral background. */
body:not(.landing) .container {
  background: rgba(255, 250, 243, .88); border-radius: 20px; padding: 24px; box-shadow: 0 8px 30px rgba(90, 60, 50, .12);
}
body:not(.landing) h1, body:not(.landing) h2 { font-family: "Playfair Display", Georgia, serif; color: var(--accent); }
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.05); margin-bottom: 24px; }
.auth { max-width: 400px; margin: 48px auto; }
.hero { text-align: center; margin: 48px auto 0; max-width: 560px; }
.hero h1 { font-size: 2.6rem; margin: 0 0 8px; color: var(--accent); }
.hero p { font-size: 1.15rem; color: #6b7080; margin: 0; }
.hero + .auth { margin-top: 24px; }

/* ---------- First page (before login) ---------- */
.landing .container { max-width: 1200px; }
.landing-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; margin: 24px 0 48px;
}
.landing-intro {
  background: rgba(255, 250, 243, .82); border-radius: 20px; padding: 32px; box-shadow: 0 8px 30px rgba(90, 60, 50, .12);
}
.landing-title {
  font-family: "Playfair Display", Georgia, serif; font-size: 3.4rem; color: #8a4b5c; margin: 0; line-height: 1.1;
}
.landing-logo { display: block; width: 100%; max-width: 440px; height: auto; }
.landing-script {
  font-family: "Dancing Script", "Brush Script MT", cursive; font-size: 2rem; color: #6b7b5a; margin: 4px 0 12px;
}
.landing-tagline { font-size: 1.1rem; color: #5a4a44; max-width: 520px; margin: 0 0 16px; }
.landing-art { position: relative; max-width: 470px; margin: 8px auto 12px; }
.landing-book { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 20px rgba(80, 50, 40, .25)); }
.landing-sticker {
  position: absolute; width: 26%; height: auto; filter: drop-shadow(0 6px 10px rgba(80, 50, 40, .3));
  animation: float 6s ease-in-out infinite;
}
.landing-sticker-1 { top: -6%; right: -4%; --tilt: 8deg; }
.landing-sticker-2 { bottom: -8%; left: -4%; --tilt: -9deg; animation-delay: -3s; }
@keyframes float {
  0%, 100% { transform: rotate(var(--tilt)) translateY(0); }
  50% { transform: rotate(var(--tilt)) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) { .landing-sticker { animation: none; transform: rotate(var(--tilt)); } }
.landing-card { background: rgba(255, 252, 247, .95); margin: 0 auto; box-shadow: 0 8px 30px rgba(90, 60, 50, .15); }
.landing-card h1, .landing-card h2 { font-family: "Playfair Display", Georgia, serif; color: var(--accent); }
@media (max-width: 900px) {
  .landing-grid { grid-template-columns: 1fr; }
  .landing-title { font-size: 2.6rem; }
  .landing-intro { padding: 20px; }
}

label { display: block; margin-bottom: 16px; font-weight: 500; }
input[type=email], input[type=password], input[type=file], input[type=text], input[type=tel], textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px;
  border: 1px solid #d0d3de; border-radius: 8px; font: inherit;
}
.password-field { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.password-field input { margin-top: 0; }
.checkbox { display: flex; gap: 8px; align-items: center; font-weight: 400; }

.btn {
  display: inline-block; padding: 10px 18px; border: 1px solid #d0d3de; border-radius: 8px;
  background: #fff; cursor: pointer; font: inherit; text-decoration: none; color: inherit;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger { background: #fff; border-color: #e5484d; color: #e5484d; }
.btn-link { border: none; background: none; color: var(--accent); padding: 0; }
.btn-small { padding: 6px 12px; font-size: .9rem; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-error { background: #fde8e8; color: #9b1c1c; }
.flash-success { background: #e6f6ec; color: #1c6b3a; }
.flash-info { background: #f3ece2; color: #5a4a44; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.thumbs img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid #e3e5ee; }

.checker {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.tile, .sticker-preview {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px; border-radius: 12px; text-decoration: none; color: inherit;
  border: 1px solid #e3e5ee;
}
.tile img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.badge { background: #ffe8a3; padding: 2px 10px; border-radius: 999px; font-size: .85rem; }
.status-printed { background: #dbe7ff; }
.status-shipped { background: #d3f5df; }

.usage { margin-top: 0; }
.notice { background: #f8eef0; border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; }
.notice-warning { background: #fff4e0; border-left-color: #f59e0b; }
.suggestion { background: #f3f8ee; border: 1px solid #b9d3a5; border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.suggestion h3 { margin-top: 0; }
.checklist li { margin-bottom: 10px; }
.checklist li.done { color: #6b7b5a; }
.checklist li.done strong::before { content: "\2713  "; }
.inline-form { display: inline; }
select { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid #d0d3de; border-radius: 8px; font: inherit; background: #fff; }
input:disabled { background: #f3efe9; color: #7a6a64; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan { text-align: center; }
.plan-current { outline: 2px solid var(--accent); }
.price { font-size: 2rem; font-weight: 700; margin: 8px 0; }
.price span { font-size: 1rem; font-weight: 400; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 8px; text-decoration: none; background: #fff; border: 1px solid #e3e5ee; }
.tabs a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.bundle-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.bundle-head h2 { margin: 0 0 4px; }
.bundle-head .actions { align-items: flex-start; flex-wrap: wrap; margin: 0; }
.bundle .tile { border: 1px solid #e3e5ee; text-align: center; }
.order-img { display: block; width: 100%; padding: 8px; border-radius: 8px; }
.order-img img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.bundle .notice { padding: 4px 8px; font-size: .8rem; }
address { font-style: normal; margin-bottom: 12px; }

.review { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 16px; }
.sticker-preview img { width: 100%; max-width: 400px; }
.actions { display: flex; gap: 12px; margin-bottom: 24px; }
.regen { border-top: 1px solid #e3e5ee; padding-top: 16px; }
@media (max-width: 700px) { .review { grid-template-columns: 1fr; } }

.loading {
  position: fixed; inset: 0; background: rgba(255,255,255,.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10;
}
.spinner {
  width: 48px; height: 48px; border: 5px solid #ddd; border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
