/* Sunshine Club Guidebook — guest app
   Apple-clean: system fonts, soft cards, one warm accent.
   Brand tokens are overridden at runtime from gb_settings/gb_listings.brand. */

:root {
  --accent: #E8A33D;
  --accent-dark: #C9862B;
  --ink: #1C1B18;
  --muted: #7C7669;
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --line: rgba(28, 27, 24, 0.08);
  --radius: 20px;
  --shadow: 0 1px 2px rgba(28,27,24,.04), 0 8px 24px rgba(28,27,24,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent-dark); text-decoration: none; }
button { font-family: inherit; }

.boot { min-height: 80vh; display: grid; place-items: center; text-align: center; color: var(--muted); }
.boot .sun { font-size: 56px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .75; } }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 96px; }

/* ---- hero ---- */
.hero {
  position: relative; border-radius: 0 0 28px 28px; overflow: hidden;
  min-height: 42vh; display: flex; align-items: flex-end;
  background: linear-gradient(140deg, #F6C97B, var(--accent));
}
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,4,.62) 0%, rgba(10,8,4,.05) 55%); }
.hero .inner { position: relative; width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 20px 22px; color: #fff; }
.hero .brandline { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.hero h1 { margin: 4px 0 6px; font-size: clamp(30px, 8vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(255,255,255,.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.28); color: #fff;
  border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 600;
}

/* ---- search ---- */
.searchbar {
  position: sticky; top: 10px; z-index: 40; margin: 14px 0 4px;
}
.searchbar .box {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow);
}
.searchbar input {
  flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); font-family: inherit;
}
.searchbar input::placeholder { color: var(--muted); }
.search-results { margin-top: 8px; }

/* ---- cards ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin: 14px 0;
}
.card h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card .sub { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.section-label {
  margin: 26px 4px 2px; font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

/* ---- check-in tasks ---- */
.progress-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ring { position: relative; width: 54px; height: 54px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.task {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 4px; border: 0; background: none; text-align: left; cursor: pointer;
  border-top: 1px solid var(--line); font-size: 16px; color: var(--ink);
}
.task:first-of-type { border-top: 0; }
.task .tick {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--line); color: #fff; font-size: 15px; font-weight: 700;
}
.task.done .tick { background: #34A853; border-color: #34A853; }
.task .t-label { flex: 1; font-weight: 600; }
.task .t-sub { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.task .chev { color: var(--muted); }

/* ---- door code ---- */
.door { text-align: center; padding: 26px 20px; }
.door .code {
  font-size: 44px; font-weight: 800; letter-spacing: .18em; margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
}
.door.locked .code { filter: blur(10px); user-select: none; }
.door .lockline { color: var(--muted); font-size: 14px; }
.door .why { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---- quick grid ---- */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick .q {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 16px; cursor: pointer; text-align: left; font-size: 15px; color: var(--ink);
}
.quick .q .ico { font-size: 22px; }
.quick .q .k { display: block; font-weight: 700; margin-top: 6px; }
.quick .q .v { display: block; color: var(--muted); font-size: 13.5px; word-break: break-word; }

/* ---- accordions ---- */
.acc { border-top: 1px solid var(--line); }
.acc:first-of-type { border-top: 0; }
.acc > button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 2px;
  background: none; border: 0; text-align: left; font-size: 16.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.acc .ico { font-size: 20px; width: 26px; text-align: center; }
.acc .chev { margin-left: auto; color: var(--muted); transition: transform .25s; }
.acc.open .chev { transform: rotate(90deg); }
.acc .body { display: none; padding: 0 6px 16px 40px; color: #3D3A33; font-size: 15.5px; }
.acc.open .body { display: block; animation: fadein .25s ease; }
.acc .body iframe { max-width: 100%; border-radius: 12px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }

/* ---- upsell / guide cards ---- */
.tilerow { display: grid; gap: 12px; }
.tile {
  display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; align-items: stretch;
}
.tile img { width: 104px; min-height: 104px; object-fit: cover; flex: none; }
.tile .tx { padding: 13px 14px 13px 0; flex: 1; }
.tile.noimg .tx { padding-left: 16px; }
.tile h3 { margin: 0 0 2px; font-size: 16.5px; }
.tile p { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.tile .buyrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price { font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: 12px;
  padding: 11px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: rgba(28,27,24,.06); color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: #fff; font-size: 18px; cursor: pointer; }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; }

.banner {
  background: linear-gradient(120deg, #FFF3DC, #FFE7BE); border: 1px solid #F3D9A4;
  border-radius: var(--radius); padding: 18px 20px; margin: 14px 0;
}
.banner h3 { margin: 0 0 4px; }
.banner p { margin: 0 0 10px; font-size: 14.5px; color: #6B5326; }

/* ---- sheet/modal ---- */
.sheet-scrim {
  position: fixed; inset: 0; background: rgba(20,17,12,.45); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; max-height: 88vh;
  background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.18);
  transform: translateY(105%); transition: transform .3s cubic-bezier(.32,.72,.28,1);
  display: flex; flex-direction: column;
}
body.sheet-open .sheet { transform: translateY(0); }
body.sheet-open .sheet-scrim { opacity: 1; pointer-events: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
.sheet header { padding: 12px 22px 10px; display: flex; align-items: center; }
.sheet header h3 { margin: 0; font-size: 19px; flex: 1; }
.sheet header .x { border: 0; background: rgba(28,27,24,.06); border-radius: 50%; width: 32px; height: 32px; font-size: 15px; cursor: pointer; }
.sheet .content { overflow-y: auto; padding: 4px 22px 20px; }
.sheet .agree-scroll {
  max-height: 38vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; font-size: 13.5px; color: #4A463E; background: #FCFAF6;
}
.sheet footer { padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet footer .btn { width: 100%; padding: 15px; font-size: 16px; }
.field { margin: 14px 0; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=tel] {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
}
.rulecheck { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: 15px; }
.rulecheck input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.choice {
  border: 2px solid var(--line); border-radius: 16px; padding: 16px; margin: 10px 0; cursor: pointer;
}
.choice.sel { border-color: var(--accent); background: #FFFBF2; }
.choice h4 { margin: 0 0 4px; font-size: 16px; }
.choice p { margin: 0; font-size: 13.5px; color: var(--muted); }
.uploadbox {
  border: 2px dashed var(--line); border-radius: 16px; padding: 26px; text-align: center;
  color: var(--muted); cursor: pointer; font-size: 14.5px;
}
.uploadbox.hasfile { border-color: #34A853; color: #1d7a35; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 20px; font-size: 14.5px;
  z-index: 200; opacity: 0; transition: all .3s; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 34px; }
.foot .logo { font-size: 22px; }

mark { background: #FFE7BE; border-radius: 3px; padding: 0 2px; }
.empty { color: var(--muted); text-align: center; padding: 12px; font-size: 14.5px; }

@media (min-width: 700px) {
  .hero { border-radius: 0 0 36px 36px; min-height: 380px; }
  .sheet { max-width: 560px; left: 50%; transform: translate(-50%, 105%); border-radius: 24px; bottom: 4vh; }
  body.sheet-open .sheet { transform: translate(-50%, 0); }
}
