:root {
  --bg: #0b0b0d;
  --panel: rgba(24, 24, 28, .72);
  --panel-strong: #151518;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --text: #f4f1eb;
  --muted: #96959d;
  --red: #ff3b30;
  --red-2: #ff604f;
  --lime: #c8ff62;
  --radius: 24px;
  --shadow: 0 30px 80px rgba(0,0,0,.30);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 560px at 83% 5%, rgba(255,59,48,.12), transparent 58%),
    radial-gradient(700px 480px at 0% 45%, rgba(255,255,255,.035), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .024;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.glass {
  background: linear-gradient(145deg, rgba(30,30,34,.86), rgba(18,18,21,.66));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px rgba(255,255,255,.04), var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.app { width: min(1520px, calc(100% - 44px)); margin: 0 auto; }
.topbar {
  height: 86px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.brand, .brand-mark { font-size: 18px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.brand span, .brand-mark span { color: var(--red); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.private-pill {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 11px; font-size: 10px; letter-spacing: .13em; color: #bbb9bf;
}
.private-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(200,255,98,.7); }
.icon-btn, .ghost, .period-chip, .save-btn {
  border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; transition: .2s ease;
}
.icon-btn:hover, .ghost:hover, .period-chip:hover, .save-btn:hover { background: rgba(255,255,255,.075); border-color: var(--line-strong); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.ghost { border-radius: 99px; padding: 10px 14px; color: #c9c7cc; font-size: 12px; }
.ghost.compact { padding: 8px 11px; }

.search-stage { min-height: 720px; padding: 110px 0 90px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: center; }
.stage-copy { padding-left: 3vw; }
.eyebrow, .mini-label { margin: 0; font-size: 10px; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; color: #787780; }
.stage-copy h1, .section-heading h2 { font-size: clamp(52px, 7vw, 112px); line-height: .88; letter-spacing: -.075em; margin: 24px 0 28px; font-weight: 760; }
em { color: #77767d; font-style: normal; font-weight: 550; }
.lead { max-width: 530px; color: var(--muted); line-height: 1.65; font-size: 15px; }

.search-panel { border-radius: 30px; padding: 14px; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.location-field { height: 74px; border-radius: 20px; background: rgba(0,0,0,.22); border: 1px solid var(--line); display: flex; align-items: center; padding: 0 18px; gap: 13px; }
.search-icon { font-size: 28px; font-weight: 200; color: #65646c; transform: rotate(-15deg); }
.location-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: clamp(16px, 2vw, 24px); letter-spacing: -.03em; }
.location-field input::placeholder { color: #5d5c63; }
.primary { border: 0; background: var(--red); color: white; border-radius: 18px; padding: 0 24px; font-weight: 800; font-size: 12px; letter-spacing: .06em; cursor: pointer; box-shadow: 0 12px 32px rgba(255,59,48,.18); transition: .2s ease; }
.primary:hover { background: var(--red-2); transform: translateY(-1px); }
.primary span { margin-left: 12px; }
.explore-btn { min-width: 148px; }
.wide { width: 100%; height: 56px; }

.period-block { padding: 19px 10px 7px; }
.quick-periods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.period-chip { color: #95949b; border-radius: 99px; padding: 9px 13px; font-size: 11px; }
.period-chip.active { color: white; background: rgba(255,59,48,.11); border-color: rgba(255,59,48,.45); }
.custom-dates { margin-top: 13px; display: flex; align-items: center; gap: 10px; }
.custom-dates label { flex: 1; display: flex; align-items: center; gap: 9px; color: #77767d; font-size: 11px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.custom-dates input { width: 100%; background: transparent; color: var(--text); border: 0; outline: 0; color-scheme: dark; }
.custom-dates > span { color: #5b5a61; }
.recents-wrap { border-top: 1px solid var(--line); margin: 10px; padding-top: 16px; }
.recents { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.recent-chip { background: transparent; border: 0; color: #8c8b92; font-size: 11px; cursor: pointer; padding: 4px 0; margin-right: 13px; }
.recent-chip:hover { color: white; }

.login-shell { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(430px, 100%); border-radius: 30px; padding: 34px; }
.login-card h1 { font-size: 46px; letter-spacing: -.06em; margin: 38px 0 5px; }
.muted { color: var(--muted); }
.login-form { margin-top: 30px; }
.field { display: grid; gap: 8px; color: #8a8991; font-size: 11px; margin-bottom: 12px; }
.field input { height: 56px; border-radius: 15px; border: 1px solid var(--line); outline: none; background: rgba(0,0,0,.22); color: white; padding: 0 16px; }
.field input:focus { border-color: rgba(255,59,48,.45); }
.error { color: #ff766d; font-size: 12px; min-height: 18px; }

.loading-shell { min-height: 620px; display: grid; place-items: center; grid-template-columns: auto minmax(280px, 560px); gap: 70px; justify-content: center; }
.radar-wrap { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.radar { width: 190px; height: 190px; border-radius: 50%; border: 1px solid var(--line); position: relative; overflow: hidden; background: repeating-radial-gradient(circle, transparent 0 29px, rgba(255,255,255,.06) 30px 31px); }
.radar::before, .radar::after { content: ''; position: absolute; background: var(--line); }
.radar::before { width: 1px; height: 100%; left: 50%; }
.radar::after { height: 1px; width: 100%; top: 50%; }
.radar i { position: absolute; inset: 50% 50% 0 0; transform-origin: bottom right; background: linear-gradient(45deg, rgba(255,59,48,.33), transparent 70%); animation: sweep 2s linear infinite; }
.radar-wrap > span { position: absolute; font-size: 38px; font-weight: 700; letter-spacing: -.05em; }
@keyframes sweep { to { transform: rotate(360deg); } }
.loading-copy h2 { font-size: clamp(34px, 5vw, 72px); letter-spacing: -.06em; line-height: .95; margin: 18px 0; }

.results { padding-bottom: 70px; }
.result-hero { border-radius: 30px; min-height: 400px; padding: clamp(28px, 5vw, 70px); display: grid; grid-template-columns: 1fr 300px; gap: 80px; align-items: end; position: relative; overflow: hidden; }
.result-hero::after { content: ''; position: absolute; width: 520px; height: 520px; right: -170px; top: -210px; border-radius: 50%; background: rgba(255,59,48,.08); filter: blur(30px); pointer-events: none; }
.result-title-wrap h2 { font-size: clamp(64px, 10vw, 150px); line-height: .84; letter-spacing: -.08em; margin: 22px 0 28px; }
.result-brief { max-width: 780px; line-height: 1.65; color: #a8a7ad; font-size: 15px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-tags span { border: 1px solid var(--line); border-radius: 99px; padding: 9px 12px; font-size: 11px; color: #99989f; }
.match-box { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; }
.match-ring { width: 166px; height: 166px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--red) calc(var(--score) * 1%), rgba(255,255,255,.07) 0); position: relative; margin-bottom: 16px; }
.match-ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #141417; }
.match-ring > div { position: relative; z-index: 2; }
.match-ring strong { font-size: 54px; letter-spacing: -.07em; }
.match-ring small { color: #67666d; }
.match-reason { color: #8d8c93; line-height: 1.45; font-size: 12px; max-width: 240px; }

.mission { margin-top: 14px; border-radius: 24px; padding: 28px; display: grid; grid-template-columns: 70px 1fr; gap: 20px; align-items: center; }
.mission-index { color: var(--red); font-size: 13px; font-weight: 700; }
.mission h3 { margin: 8px 0 0; font-size: clamp(19px, 2.5vw, 32px); letter-spacing: -.035em; font-weight: 550; }

.result-toolbar { margin: 58px 0 28px; display: flex; justify-content: space-between; gap: 20px; align-items: center; position: sticky; top: 10px; z-index: 10; padding: 9px; background: rgba(11,11,13,.78); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 18px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.category-tab { background: transparent; border: 0; border-radius: 12px; color: #77767d; padding: 10px 12px; font-size: 11px; cursor: pointer; }
.category-tab.active { background: #232328; color: white; }
.toolbar-actions { display: flex; gap: 6px; }

.sections { display: grid; gap: 72px; }
.data-section { scroll-margin-top: 90px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; }
.section-heading h3 { margin: 8px 0 0; font-size: clamp(34px, 5vw, 66px); letter-spacing: -.06em; line-height: .94; }
.count { color: #58575e; font-size: 11px; }
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.card { grid-column: span 4; min-height: 240px; border-radius: 22px; border: 1px solid var(--line); background: #111114; padding: 22px; display: flex; flex-direction: column; position: relative; transition: .22s ease; overflow: hidden; }
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: #151519; }
.card.wide-card { grid-column: span 6; }
.card-index { color: #525158; font-size: 10px; letter-spacing: .1em; }
.card h4 { font-size: 24px; letter-spacing: -.045em; margin: 26px 40px 12px 0; line-height: 1.03; }
.card .meta { color: var(--red-2); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 11px; }
.card p { color: #929198; font-size: 12px; line-height: 1.55; margin: 0 0 18px; }
.card .secondary { color: #69686f; font-size: 11px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.card-actions { display: flex; gap: 7px; margin-top: 14px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; border: 1px solid var(--line); padding: 8px 10px; font-size: 10px; text-decoration: none; color: #aaa9af; }
.card-link:hover { border-color: rgba(255,59,48,.45); color: white; }
.save-btn { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; color: #89888f; }
.save-btn.saved { color: var(--red); border-color: rgba(255,59,48,.4); background: rgba(255,59,48,.08); }
.empty-card { grid-column: 1 / -1; padding: 28px; color: #6e6d74; border: 1px dashed var(--line); border-radius: 20px; }

.day-plan-wrap { margin-top: 110px; border-top: 1px solid var(--line); padding-top: 70px; }
.day-plan-wrap .section-heading h2 { font-size: clamp(52px, 7vw, 95px); margin-bottom: 0; }
.day-plan { margin-top: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { padding: 26px; border-top: 1px solid var(--line-strong); min-height: 200px; }
.plan-card strong { display: block; font-size: 11px; color: var(--red); margin-bottom: 34px; }
.plan-card h4 { font-size: 25px; letter-spacing: -.04em; margin: 0 0 12px; }
.plan-card p { color: #89888f; line-height: 1.6; font-size: 12px; }
.generated-note { margin: 70px 0 20px; color: #55545a; font-size: 10px; text-align: center; }

footer { border-top: 1px solid var(--line); min-height: 100px; display: flex; justify-content: space-between; align-items: center; color: #535259; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(440px, 92vw); background: #101013; border-left: 1px solid var(--line); z-index: 90; padding: 26px; transform: translateX(100%); transition: transform .28s ease; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.drawer h2 { font-size: 44px; letter-spacing: -.06em; margin: 7px 0; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.58); backdrop-filter: blur(4px); }
.saved-list { display: grid; gap: 8px; padding: 18px 0; }
.saved-item { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.saved-item small { color: var(--red); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.saved-item h4 { margin: 7px 0 8px; font-size: 18px; }
.saved-item p { margin: 0; color: #78777e; font-size: 11px; line-height: 1.5; }
.saved-item-row { display: flex; justify-content: space-between; gap: 10px; align-items: end; }
.remove-saved { border: 0; background: transparent; color: #616067; cursor: pointer; }
.remove-saved:hover { color: white; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #f1eee7; color: #111; border-radius: 99px; padding: 11px 16px; font-size: 11px; opacity: 0; pointer-events: none; z-index: 120; transition: .2s ease; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .search-stage { grid-template-columns: 1fr; gap: 42px; padding-top: 70px; min-height: auto; }
  .stage-copy { padding-left: 0; }
  .stage-copy h1 { max-width: 760px; }
  .result-hero { grid-template-columns: 1fr 220px; gap: 30px; }
  .card { grid-column: span 6; }
}

@media (max-width: 720px) {
  .app { width: min(100% - 24px, 1520px); }
  .topbar { height: 70px; }
  .private-pill { display: none; }
  .search-stage { padding: 56px 0 62px; }
  .stage-copy h1 { font-size: clamp(52px, 18vw, 82px); }
  .search-panel { padding: 9px; border-radius: 22px; }
  .search-row { grid-template-columns: 1fr; }
  .location-field { height: 64px; }
  .explore-btn { height: 54px; width: 100%; }
  .custom-dates { flex-direction: column; align-items: stretch; }
  .custom-dates > span { display: none; }
  .loading-shell { min-height: 560px; grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .radar-wrap { margin: 0 auto; }
  .result-hero { grid-template-columns: 1fr; padding: 28px; min-height: 0; }
  .match-box { align-items: flex-start; text-align: left; }
  .match-ring { width: 126px; height: 126px; }
  .match-ring strong { font-size: 42px; }
  .mission { grid-template-columns: 34px 1fr; padding: 22px; }
  .result-toolbar { position: relative; top: auto; align-items: stretch; flex-direction: column; overflow: hidden; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .category-tab { flex: 0 0 auto; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cards { display: grid; grid-template-columns: 1fr; }
  .card, .card.wide-card { grid-column: 1; min-height: 220px; }
  .day-plan { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
}
