:root {
  --ink: #0b2230;
  --ink-2: #34515f;
  --muted: #62757e;
  --bg: #f4f1ea;
  --surface: #ffffff;
  --line: rgba(11, 34, 48, 0.09);
  --lagoon: #0fa3a0;
  --lagoon-deep: #08706d;
  --coral: #ff6b4a;
  --pink: #ff3d7f;
  --gold: #ffb627;
  --display: 'Syne', 'Trebuchet MS', sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* scene palette (day) */
  --sky1: #3fb7e8; --sky2: #8fd8f2; --sky3: #e9f8ff;
  --sea1: #13b3b0; --sea2: #0a8a9a; --sea3: #06607a;
  --far: #2f8f6f; --near: #1d6b52; --palm: #16503d;
  --sun: #fff6c9; --sunglow: rgba(255, 230, 140, .65);
  --wave-speed: 9s; --wave-amp: 1;
  color-scheme: light;
}
body[data-phase="dawn"] { --sky1: #6f8fd6; --sky2: #f6a8a0; --sky3: #ffe1b8; --sea1: #3d9fb6; --sea2: #2c7697; --sea3: #1c4f72; --far: #54708b; --near: #3a5670; --palm: #2b4257; --sun: #ffe3a3; --sunglow: rgba(255, 170, 120, .7); }
body[data-phase="golden"] { --sky1: #4aa3d8; --sky2: #f7c873; --sky3: #ffe7b0; --sea1: #1aa3a8; --sea2: #127f93; --sea3: #0b5a73; --far: #3b7a5c; --near: #285c45; --palm: #1c4636; --sun: #ffe08a; --sunglow: rgba(255, 190, 80, .75); }
body[data-phase="sunset"] { --sky1: #3b2a6b; --sky2: #e2527a; --sky3: #ffae5e; --sea1: #d4677a; --sea2: #7a3f78; --sea3: #33285e; --far: #4a2f5c; --near: #2e1f44; --palm: #1f1533; --sun: #ffd07a; --sunglow: rgba(255, 120, 90, .8); }
body[data-phase="night"] { --sky1: #070d24; --sky2: #14224a; --sky3: #2a3f6e; --sea1: #173a5e; --sea2: #0f2a47; --sea3: #081a30; --far: #0f1d33; --near: #0a1426; --palm: #050b17; --sun: #f3f0e0; --sunglow: rgba(220, 225, 255, .35); }
body[data-sea="choppy"] { --wave-speed: 5s; --wave-amp: 1.5; }
body[data-sea="rough"] { --wave-speed: 3s; --wave-amp: 2.2; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
.wrap { width: min(760px, 100% - 32px); margin-inline: auto; padding-bottom: 40px; position: relative; }

/* ---------- Live scene ---------- */
.scene { position: relative; height: min(78vh, 620px); min-height: 480px; overflow: hidden; color: #fff; isolation: isolate; }
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 52%, var(--sky3) 78%); transition: background 1.2s; z-index: -5; }
.stars { position: absolute; inset: 0 0 40% 0; z-index: -4; opacity: 0; transition: opacity 1.2s;
  background-image: radial-gradient(1.5px 1.5px at 10% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 26%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 86% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 18% 42%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 44%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 92% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 36%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 38%, #fff 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate; }
body[data-phase="night"] .stars { opacity: .9; }
body[data-phase="dawn"] .stars { opacity: .25; }
@keyframes twinkle { to { filter: brightness(.6); } }
.sun { position: absolute; width: 96px; height: 96px; border-radius: 50%; left: 70%; top: 18%; z-index: -3;
  background: radial-gradient(circle, #fff 0%, var(--sun) 45%, var(--sun) 60%, transparent 62%);
  box-shadow: 0 0 80px 30px var(--sunglow), 0 0 200px 80px var(--sunglow); transition: left 1.2s, top 1.2s; }
body[data-phase="night"] .sun { width: 58px; height: 58px; box-shadow: 0 0 40px 12px var(--sunglow); background: radial-gradient(circle at 35% 35%, #fffbe8 0%, #e8e4cf 55%, transparent 60%); }
.clouds span { position: absolute; z-index: -2; height: 28px; border-radius: 99px; background: rgba(255,255,255,.75); filter: blur(1px); animation: drift 70s linear infinite; }
.clouds span::before, .clouds span::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.clouds span::before { width: 44%; height: 170%; left: 16%; bottom: 20%; }
.clouds span::after { width: 32%; height: 130%; left: 52%; bottom: 25%; }
.clouds span:nth-child(1) { width: 150px; top: 14%; left: -20%; }
.clouds span:nth-child(2) { width: 110px; top: 26%; left: -40%; animation-duration: 95s; animation-delay: -30s; opacity: .8; }
.clouds span:nth-child(3) { width: 190px; top: 8%; left: -60%; animation-duration: 120s; animation-delay: -60s; opacity: .6; }
body[data-phase="night"] .clouds span { background: rgba(160,175,220,.18); }
body[data-phase="sunset"] .clouds span { background: rgba(255,190,190,.55); }
body[data-cloudy="1"] .clouds span { background: rgba(230,236,242,.9); }
@keyframes drift { to { transform: translateX(170vw); } }

.island { position: absolute; left: 0; right: 0; bottom: 118px; width: 100%; height: 150px; z-index: -1; }
.island .far { fill: var(--far); transition: fill 1.2s; }
.island .near { fill: var(--near); transition: fill 1.2s; }
.island .palms path { fill: none; stroke: var(--palm); stroke-width: 5; stroke-linecap: round; }
.sea { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; background: linear-gradient(180deg, var(--sea1), var(--sea2) 55%, var(--sea3)); z-index: 0; transition: background 1.2s; }
.sea::after { content: ''; position: absolute; left: 30%; right: 30%; top: 6px; height: 60%; background: linear-gradient(180deg, var(--sunglow), transparent); filter: blur(10px); opacity: .6; }
.wave { position: absolute; left: 0; width: 200%; height: 34px; transform-origin: bottom; }
.wave path { fill: rgba(255,255,255,.14); }
.w1 { top: -18px; animation: sway var(--wave-speed) linear infinite; transform: scaleY(var(--wave-amp)); }
.w1 path { fill: var(--sea1); }
.w2 { top: 14px; animation: sway calc(var(--wave-speed) * 1.5) linear infinite reverse; opacity: .7; }
.w3 { top: 48px; animation: sway calc(var(--wave-speed) * 2) linear infinite; opacity: .5; }
@keyframes sway { from { margin-left: 0; } to { margin-left: -100%; } }

.rain { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none;
  background-image: linear-gradient(105deg, transparent 0 48%, rgba(255,255,255,.55) 49% 51%, transparent 52% 100%);
  background-size: 14px 44px; animation: fall .5s linear infinite; transition: opacity .8s; }
body[data-rain="1"] .rain { opacity: .45; }
body[data-rain="1"] .sky { filter: saturate(.55) brightness(.85); }
@keyframes fall { to { background-position: -8px 44px; } }

.scene-top { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.brand { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.brand span { color: var(--gold); }
.clock { margin: 0; font-size: 13px; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.22); backdrop-filter: blur(8px); }
.scene-text { position: absolute; left: 0; right: 0; bottom: 150px; z-index: 2; width: min(760px, 100% - 32px); margin-inline: auto; }
.kicker { margin: 0 0 10px; font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.22); backdrop-filter: blur(8px); }
.kicker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3ef0b8; box-shadow: 0 0 0 0 rgba(62,240,184,.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(62,240,184,0); } 100% { box-shadow: 0 0 0 0 rgba(62,240,184,0); } }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 9.5vw, 78px); line-height: .95; letter-spacing: -0.045em; text-wrap: balance; text-shadow: 0 4px 30px rgba(0,0,0,.28); }
h1 em { font-style: normal; background: linear-gradient(95deg, var(--gold), #ffd9a0 40%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
body[data-phase="day"] h1, body[data-phase="golden"] h1 { color: #fff; }
.conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pill { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.2); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.3); }
.pill.calm::before { content: '● '; color: #58f5c4; }
.pill.choppy::before { content: '● '; color: #ffd166; }
.pill.rough::before { content: '● '; color: #ff8a70; }

/* ---------- Form ---------- */
.panel { position: relative; z-index: 3; margin-top: -48px; background: var(--surface); border-radius: 28px; padding: 22px; display: grid; gap: 20px;
  box-shadow: 0 30px 60px -30px rgba(11,34,48,.45), 0 2px 0 rgba(255,255,255,.8) inset; }
.field { display: grid; gap: 10px; }
label, .lab { font-weight: 800; font-size: 15px; }
select, textarea { width: 100%; font: 16px var(--body); color: var(--ink); background: #f6f4ef; border: 1.5px solid transparent; border-radius: 16px; padding: 13px 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
select:focus, textarea:focus { border-color: var(--lagoon); box-shadow: 0 0 0 4px rgba(15,163,160,.15); background: #fff; }
textarea { resize: vertical; min-height: 64px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --c: var(--lagoon); display: inline-flex; align-items: center; gap: 7px; font: 700 14px var(--body); color: var(--ink); background: #f6f4ef; border: 1.5px solid transparent; border-radius: 99px; padding: 8px 14px 8px 8px; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s, color .15s; }
.chip i { font-style: normal; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chip:hover { transform: translateY(-1px); }
.chip.on { background: var(--c); color: #fff; box-shadow: 0 8px 18px -8px var(--c); }
.c-beach { --c: #0fa3a0; } .c-temple { --c: #e08a00; } .c-nature { --c: #2f9e44; } .c-market { --c: #ef6c2b; } .c-sunset { --c: #e8456b; }
.c-night { --c: #7048e8; } .c-well { --c: #d6488f; } .c-boat { --c: #1c7ed6; } .c-rain { --c: #495b6b; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.toggle { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 15px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--lagoon); }
.seg { display: inline-flex; background: #f0ede6; border-radius: 99px; padding: 4px; }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.seg button { font: 700 14px var(--body); border: 0; background: transparent; color: var(--ink-2); padding: 9px 14px; border-radius: 99px; cursor: pointer; transition: background .15s, color .15s; }
.seg button.on { background: var(--ink); color: #fff; }
.go { position: relative; overflow: hidden; font: 800 18px var(--body); color: #fff; border: 0; border-radius: 20px; padding: 18px; cursor: pointer;
  background: linear-gradient(100deg, var(--coral), var(--pink) 55%, #b63cff); box-shadow: 0 16px 30px -14px rgba(255,61,127,.8); transition: transform .12s, filter .15s; }
.go::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3.5s ease-in-out infinite; }
@keyframes shine { 60%, 100% { left: 130%; } }
.go:hover { filter: brightness(1.06); transform: translateY(-1px); }
.go:disabled { cursor: wait; filter: saturate(.7); }
.go.loading #goTxt::after { content: ''; display: inline-block; width: 16px; height: 16px; margin-left: 10px; border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: #c43d20; margin: 0; font-size: 14px; min-height: 1em; font-weight: 600; }
button:focus-visible, .chip:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Results ---------- */
#out { margin-top: 30px; scroll-margin-top: 16px; }
.understood { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); margin-bottom: 16px; }
.understood b { font-family: var(--display); font-size: 22px; letter-spacing: -0.02em; color: var(--ink); width: 100%; }
.understood .sure { font: 600 12px var(--mono); background: #e7f6f5; color: var(--lagoon-deep); padding: 4px 10px; border-radius: 99px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: c; }
.card { --c1: #0fa3a0; --c2: #56d8c9; counter-increment: c; background: var(--surface); border-radius: 26px; overflow: hidden; box-shadow: 0 18px 40px -28px rgba(11,34,48,.5); animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.t-beach { --c1: #0fa3a0; --c2: #7be3d6; } .t-temple { --c1: #e08a00; --c2: #ffd166; } .t-nature, .t-viewpoint { --c1: #2f9e44; --c2: #a9e34b; }
.t-boat_trip { --c1: #1c7ed6; --c2: #74c0fc; } .t-market, .t-food { --c1: #ef6c2b; --c2: #ffc078; } .t-nightlife { --c1: #7048e8; --c2: #e599f7; }
.t-wellness { --c1: #d6488f; --c2: #fcc2d7; } .t-family, .t-activity { --c1: #f59f00; --c2: #ffe066; } .t-shopping { --c1: #495b6b; --c2: #a5b4c3; }
.band { position: relative; height: 112px; background: linear-gradient(120deg, var(--c1), var(--c2)); display: flex; align-items: flex-end; padding: 14px 18px; color: #fff; }
.band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.35), transparent 45%), repeating-linear-gradient(-45deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px); }
.band .emo { position: absolute; right: 16px; top: 8px; font-size: 64px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.2)); transform: rotate(-6deg); }
.band .rank { position: relative; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .8; opacity: .95; }
.band .rank::before { content: counter(c, decimal-leading-zero); }
.band .type { position: relative; margin-left: 10px; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(0,0,0,.18); padding: 4px 9px; border-radius: 99px; }
.card:first-child .band { height: 136px; }
.card:first-child:not(.featured) .band::after { content: '★ Best pick right now'; position: absolute; left: 18px; top: 14px; font: 800 12px var(--body); background: #fff; color: var(--c1); padding: 5px 11px; border-radius: 99px; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.body { padding: 16px 18px 18px; display: grid; gap: 12px; }
.c-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.c-title { font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
.c-sub { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.ring { --p: 50; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c1) calc(var(--p) * 1%), #eef0ee 0); }
.ring span { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 14px var(--display); color: var(--ink); line-height: 1; text-align: center; }
.ring small { display: block; font: 600 8px var(--mono); color: var(--muted); letter-spacing: .06em; }
.why { display: flex; flex-wrap: wrap; gap: 6px; }
.why span { font-size: 12.5px; font-weight: 700; background: #f1f5f4; color: var(--ink-2); padding: 5px 10px; border-radius: 99px; }
.why span.good { background: #e3f7ef; color: #0b7a55; }
.why span.warn { background: #ffe9e3; color: #b63a1d; }
.desc { margin: 0; color: var(--ink-2); font-size: 15px; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.acts a { font: 800 14px var(--body); color: #fff; text-decoration: none; background: var(--ink); padding: 11px 16px; border-radius: 14px; display: inline-flex; gap: 8px; align-items: center; }
.acts a:hover { background: var(--c1); }
.acts .hrs { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.meta { font-size: 12px; color: var(--muted); margin-top: 16px; text-align: center; }
.empty { background: var(--surface); border-radius: 22px; padding: 22px; border: 2px dashed var(--line); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.how div { background: var(--surface); border-radius: 20px; padding: 16px; display: grid; gap: 4px; }
.how b { font-family: var(--display); font-size: 16px; }
.how span { font-size: 13.5px; color: var(--muted); }
.foot { margin-top: 30px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 18px; }
.foot .mono { font-size: 11px; }

@media (max-width: 640px) {
  .how { grid-template-columns: 1fr; }
  .scene { min-height: 520px; }
  .scene-text { bottom: 140px; }
  .band { height: 96px; } .band .emo { font-size: 54px; }
  .card:first-child .band { height: 124px; }
  .panel { padding: 18px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* photos, featured */
.band.has-photo { height: 190px; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55)), var(--img) center/cover no-repeat, linear-gradient(120deg, var(--c1), var(--c2)); }
.band.has-photo::before { display: none; }
.card:first-child .band.has-photo { height: 220px; }
.band .credit { position: absolute; right: 10px; bottom: 8px; font-size: 10px; color: rgba(255,255,255,.85); text-decoration: none; background: rgba(0,0,0,.3); padding: 2px 7px; border-radius: 99px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band .feat { position: absolute; right: 12px; top: 12px; font: 800 12px var(--body); color: #5a3b00; background: linear-gradient(120deg, #ffd66b, #ffb627); padding: 6px 12px; border-radius: 99px; box-shadow: 0 6px 16px -6px rgba(255,170,0,.8); }
.card.featured { box-shadow: 0 0 0 3px #ffc53d, 0 22px 44px -26px rgba(255,170,0,.8); }
.acts a.ghost { background: #f1efe9; color: var(--ink); }
.acts a.ghost:hover { background: #e6e2d8; }
