/* FRAME / Rose atmosphere. Visual layer over the preserved Claude r3 UI.
   The viewport owns the rose-to-paper gradient; decorative SVGs stay behind
   content and cannot receive pointer input. No routing or data changes. */
:root, :root[data-v="a"] {
  --bg: oklch(96% .025 350);
  --bg-2: oklch(98% .012 350);
  --raised: oklch(99.6% .003 350);
  --raised-2: oklch(95% .031 350);
  --ink: oklch(22% .025 340);
  --ink-2: oklch(37% .036 340);
  --muted: oklch(40% .038 340);
  --line: oklch(86% .037 350);
  --line-2: oklch(73% .065 350);
  --accent: oklch(28% .046 340);
  --accent-soft: oklch(94% .043 350);
  --money: oklch(91% .12 135);
  --money-deep: oklch(49% .11 148);
  --money-soft: oklch(96% .038 140);
  --money-ink: oklch(24% .038 145);
  --up: oklch(43% .095 150);
  --down: oklch(44% .15 8);
  --night: oklch(19% .024 310);
  --night-2: oklch(29% .043 320);
  --night-muted: oklch(82% .018 335);
  --bar-bg: oklch(97% .022 350 / .94);
  --tab-bg: oklch(99% .008 350 / .97);
  --shadow: 0 2px 7px oklch(32% .07 340 / .07);
  --tab-h: 72px;
  --display-glass: linear-gradient(135deg, oklch(100% 0 0 / .48), oklch(99% .012 350 / .27));
}

html, body, [data-v="a"] body {
  background: oklch(93% .034 350);
}

.app {
  isolation: isolate;
  background: none;
}

.app::before, .app::after {
  content: "";
  position: fixed;
  inset: 0;
  width: min(100%, var(--appw));
  margin-inline: auto;
  pointer-events: none;
}

.app::before {
  z-index: -2;
  background:
    radial-gradient(ellipse 105% 53% at 112% 4%, oklch(99% .008 350 / .94), transparent 72%),
    radial-gradient(ellipse 115% 49% at -32% 38%, oklch(79% .148 350 / .58), transparent 72%),
    radial-gradient(ellipse 115% 50% at 114% 110%, oklch(85% .105 350 / .82), transparent 73%),
    linear-gradient(168deg, oklch(80% .135 350) 0%, oklch(88% .079 350) 27%, oklch(97% .019 350) 63%, oklch(99% .005 350) 84%, oklch(94% .042 350) 100%);
}

.app::after {
  z-index: -1;
  content: none;
  background: none;
}

/* The header leaves the background visible until content scrolls under it. */
.bar {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.scrolled .bar {
  background: var(--bar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bar .demo { background: oklch(99% .008 350 / .42); color: var(--ink-2); }
.desk-note, .desk-muted { color: var(--ink-2); }
.desk-brand { color: var(--ink); }

/* Paper-like foregrounds stay legible over the decorative background. */
.pcard, .hm-project, .hm-board, .hm-teaser, .dc-project,
.rd-board, .ac-miles, .account-settings, .account-project,
.en-spot > a, .en-pos, .en-funding {
  background: linear-gradient(145deg, oklch(100% 0 0), oklch(98.4% .008 350));
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.hm-carousel {
  box-shadow: 0 16px 30px -19px oklch(30% .075 340 / .56);
}
.hm-feature { margin-top: 29px; }
.hm-funding { margin-top: 34px; }
.hm-section-head { margin-bottom: 18px; }
.hm-eyebrow, .hm-cadence, .hm-more,
.hm-slide-counter, .hm-demo-note { color: var(--ink-2); }
.hm-dots button span { background: oklch(72% .07 350); }
.hm-dots button[aria-pressed="true"] span { background: var(--accent); }
.hm-perf .pending { color: var(--muted); }
.hm-project-meta, .hm-project-foot { color: var(--muted); }

/* Public display surfaces let the rose field continue through the content. */
.hm-teaser, .rd-board, .hm-project, .pcard, .dc-project, .rd-entries a {
  background: var(--display-glass);
  border: 1px solid oklch(100% 0 0 / .62);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / .44), 0 8px 22px -19px oklch(30% .07 340 / .25);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.home-page, .radar-page { --hm-muted: var(--muted); }
.hm-teaser { padding: 0 13px; border-radius: 13px; }
.hm-platform-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 9px; }
.hm-platform-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 16px/1.25 var(--sans); letter-spacing: -.25px; }
.hm-platform-head > a { display: flex; align-items: center; gap: 2px; min-height: 32px; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.hm-platform-head > a svg { width: 13px; height: 13px; }
.hm-platform-head .hm-platform-mark { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; }
.hm-teaser .hm-ranking li > a { min-height: 91px; padding: 12px 0; }
.hm-ranking li + li { border-top-color: oklch(38% .05 340 / .10); }
.hm-preview-stamp { margin: 0; padding: 8px 0 13px; font-size: 10px; color: var(--muted); }
.hm-chart-note { margin: 14px 0 0; font-size: 10px; color: var(--muted); line-height: 1.8; }
.hm-rank-info small, .hm-count small, .hm-source-note, .hm-board-heading small { color: var(--muted); }
.hm-count { font-size: 13px; letter-spacing: 0; }
.hm-board-heading { border-bottom-color: oklch(38% .05 340 / .12); }
.hm-source-note { border-top-color: oklch(38% .05 340 / .12); }
.hm-rank-info strong { font-size: 13px; }

/* New puts the six sources directly within reach, in exactly two rows. */
.page-en { font: 500 12px/1 var(--sans); color: var(--ink-2); margin-left: 4px; letter-spacing: .1px; }
.rd-head { padding: 18px 18px 14px; border-radius: 20px; }
.rd-head h2 { font: 600 23px/1.35 var(--sans); letter-spacing: -.5px; margin: 11px 0 0; }
.rd-head p { font-size: 11px; line-height: 1.7; max-width: 31em; }
.rd-live-label { display: flex; align-items: center; gap: 6px; color: oklch(91% .06 350); font-size: 10px; }
.rd-live-label i { width: 5px; height: 5px; border-radius: 50%; background: oklch(89% .12 135); }
.rd-update-line { display: flex; justify-content: space-between; gap: 8px; margin-top: 15px; padding-top: 11px; border-top: 1px solid oklch(100% 0 0 / .14); color: var(--night-muted); font-size: 9px; }
.rd-ranking-section { margin-top: 23px; }
.rd-ranking-section .sec-head h2 { font: 650 20px/1.3 var(--sans); letter-spacing: -.45px; }
.rd-ranking-section .sec-head .note { font-size: 10px; color: var(--ink-2); }
/* One compact source selector across Home, Discover and New. */
.platform-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; overflow: visible; }
.rd-plats.platform-picker { margin-top: 14px; }
.hm-platforms { margin: 0 0 14px; }
.platform-picker button { display: flex; align-items: center; justify-content: flex-start; gap: 7px; height: 54px; min-height: 54px; min-width: 0; padding: 7px; border: 1px solid oklch(100% 0 0 / .75); border-radius: 9px; background: oklch(100% 0 0 / .37); box-shadow: none; color: var(--ink); text-align: left; }
.platform-picker .hm-platform-mark { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 6px; font: 700 12px/1 var(--sans); }
.platform-picker .platform-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.platform-picker .platform-copy b { font: 650 11.5px/1.15 var(--sans); white-space: nowrap; letter-spacing: -.2px; }
.platform-picker .platform-copy small { display: block; margin: 0; font: 400 10px/1.2 var(--sans); color: var(--muted); white-space: nowrap; }
.platform-picker button[aria-pressed="true"] { background: oklch(99% .012 350 / .78); border-color: oklch(43% .06 340); box-shadow: none; color: var(--ink); }
.platform-picker button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd-tabs { border-bottom-color: oklch(38% .05 340 / .18); margin-top: 18px; }
.rd-tabs button { min-height: 42px; }
.rd-board { border-radius: 13px; padding: 0 14px; margin-top: 16px; }
.rd-board .hm-ranking li > a { grid-template-columns: 17px 44px minmax(0,1fr) auto; gap: 9px; min-height: 94px; }
.rd-board .hm-rank-poster { width: 44px; height: 62px; border-radius: 6px; }
.rd-board .hm-count { min-width: 53px; }
.rd-board svg, .rd-data-notes svg { width: 12px; height: 12px; }
.rd-data-notes { margin: 20px 16px 8px; }
.radar-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Rose light ties dark panels to the page. */
.night, .account-wallet {
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 105% 92% at 114% 112%, oklch(49% .105 345 / .65), transparent 72%),
    radial-gradient(ellipse 100% 75% at -30% -32%, oklch(45% .064 325 / .68), transparent 80%),
    linear-gradient(145deg, oklch(25% .03 310), oklch(16% .023 295));
  background-repeat: no-repeat;
  background-size: cover;
  border: 0;
  box-shadow: inset 0 1px 0 oklch(93% .025 350 / .24), 0 18px 30px -21px oklch(28% .06 340 / .8);
  color: var(--night-ink);
}
.night .muted, .night .note, .night .lab, .night small,
.account-wallet-top, .account-balance-label,
.account-wallet-meta, .account-wallet-note { color: var(--night-muted); }
.account-demo { border-color: oklch(71% .035 335 / .48); color: oklch(88% .016 335); }
.account-wallet-meta button { color: oklch(91% .045 350); }
.account-balance-label span { color: var(--night-muted); }
.account-withdraw { border-color: oklch(75% .027 335 / .55); background: oklch(99% .005 350 / .035); }
.account-deposit, body.bare .btn.primary {
  background: linear-gradient(140deg, oklch(97% .055 135), var(--money) 60%, oklch(84% .15 140));
  color: var(--money-ink);
  border-color: transparent;
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / .55), 0 3px 7px oklch(8% 0 0 / .18);
}

.account-page { --account-muted: var(--muted); }
.account-avatar {
  background: linear-gradient(140deg, oklch(100% 0 0), oklch(91% .062 350));
  border-color: var(--line-2);
  color: var(--ink);
}
.account-tier { background: var(--raised); color: var(--ink-2); box-shadow: var(--shadow); }
.account-shortcuts a, .account-shortcut-top svg,
.account-section-head > a, .account-section-head > button,
.account-project-title > span, .account-project-progress > b,
.account-setting-icon { color: var(--ink-2); }
.account-project-progress > span { background: var(--raised-2); }
.account-project-progress i { background: var(--money-deep); }
.account-record-icon { background: var(--raised-2); color: var(--ink-2); }
.account-record-icon.pending { background: oklch(95% .04 80); color: oklch(39% .08 80); }
.account-record-amount.positive { color: var(--up); }
.ac-miles span, .ac-group { color: var(--muted); }

.search,
.earn-tabs, .en-tabs, .seg { box-shadow: var(--shadow); }
.search input::placeholder, .field input::placeholder { color: var(--muted); opacity: 1; }
.rd-tabs button { color: var(--muted); }
.rd-tabs button[aria-pressed="true"] { color: var(--ink); }

/* Familiar objects and a raised clapperboard give New a clear focal point. */
.tabbar {
  grid-template-columns: 1fr 1fr 1.12fr 1fr 1fr;
  background: linear-gradient(180deg, oklch(100% 0 0 / .68), oklch(98% .02 350 / .87));
  border-top: 1px solid oklch(100% 0 0 / .78);
  box-shadow: 0 -6px 25px oklch(35% .06 340 / .055);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: visible;
}
.tabbar a { color: var(--muted); justify-content: flex-end; gap: 5px; padding: 0 0 10px; font-size: 11px; font-weight: 500; }
.tabbar a > svg { width: 26px; height: 26px; stroke-width: 1.7; }
.tabbar .nav-tint { fill: currentColor; fill-opacity: .13; stroke: none; }
.tabbar .nav-solid { fill: currentColor; stroke: none; }
.tabbar .nav-lens { fill: oklch(98% .018 350); }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tabbar a[aria-current="page"] .nav-tint { fill-opacity: .26; }
.tabbar a[aria-current="page"]::before, .tabbar a[aria-current="page"]::after { display: none; }
.tabbar a.tab-new { color: var(--accent); }
.tab-new-icon { position: absolute; width: 60px; height: 60px; top: -19px; left: calc(50% - 30px); border-radius: 20px; display: grid; place-items: center; background: linear-gradient(145deg, oklch(40% .075 340), oklch(24% .045 320)); color: oklch(99% .012 350); border: 3px solid oklch(96% .025 350); box-shadow: inset 0 1px 0 oklch(100% 0 0 / .22), 0 5px 13px oklch(26% .07 340 / .2); transition: transform .18s ease-out; }
.tabbar .tab-new-icon svg { width: 33px; height: 33px; stroke: currentColor; stroke-width: 1.5; transform: rotate(-7deg); }
.tab-new-icon .new-board { fill: oklch(98% .02 350); stroke: none; }
.tab-new-icon .new-play { fill: oklch(35% .065 340); stroke: none; }
.tab-new-icon b { position: absolute; top: -6px; right: -8px; padding: 3px 5px; border-radius: 5px; border: 2px solid oklch(97% .02 350); background: oklch(89% .12 135); color: oklch(27% .05 145); font: 750 8px/1 var(--sans); letter-spacing: .4px; }
.tab-new .tab-label { font-size: 12px; font-weight: 750; }
.tabbar .tab-new[aria-current="page"] .tab-new-icon { background: linear-gradient(145deg, oklch(47% .12 345), oklch(29% .065 330)); box-shadow: inset 0 1px 0 oklch(100% 0 0 / .3), 0 5px 17px oklch(40% .12 340 / .3); }
.tabbar a:active .tab-new-icon { transform: translateY(2px); }
.tabbar a:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 10px; }

/* Existing wallet sheets inherit the same light surface and dark ink. */
.wallet-dialog { background: linear-gradient(155deg, var(--raised-2), var(--raised) 38%); color: var(--ink); }
.wallet-handle { background: var(--line-2); }
.wallet-header > button { border-color: var(--line); color: var(--ink-2); }
.wallet-amount-field input { color: var(--ink); }
.wallet-amount-field { border-color: var(--line-2); }
.wallet-amount-field:focus-within { border-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.wallet-amount-field input::placeholder { color: var(--muted); opacity: 1; }
.wallet-amount-field > span, .wallet-flow-note, .wallet-available,
.wallet-method > svg, .wallet-method small, .wallet-method > span,
.wallet-review > span, .wallet-review > small, .wallet-details dt,
.wallet-explanation, .wallet-history-note { color: var(--ink-2); }
.wallet-method, .wallet-method > span, .wallet-details { border-color: var(--line); }
.wallet-available > button, .wallet-cancel { color: var(--ink-2); }
.wallet-amounts button { background: var(--raised); color: var(--ink-2); border-color: var(--line); }
.wallet-amounts button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.wallet-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Login keeps a darker rose horizon. */
body.bare .app { background: none; }
body.bare .app::before {
  background:
    radial-gradient(ellipse 115% 60% at 110% 83%, oklch(43% .12 345 / .7), transparent 78%),
    linear-gradient(150deg, oklch(25% .037 315), oklch(15% .025 300));
}

body.bare .field input::placeholder { color: var(--night-muted); }

@media (hover: hover) {
  .account-deposit:hover { background: oklch(86% .13 140); color: var(--money-ink); }
  .wallet-primary:hover { background: oklch(36% .07 340); }
}
@media (min-width: 480px) {
  .app { border-color: oklch(85% .035 350); box-shadow: 0 0 45px oklch(35% .065 340 / .09); }
}
@media (max-width: 370px) {
  .platform-picker { gap: 6px; }
  .platform-picker button { gap: 5px; padding: 6px 5px; height: 52px; min-height: 52px; }
  .platform-picker .hm-platform-mark { flex-basis: 20px; width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
  .platform-picker .platform-copy b { font-size: 10.5px; letter-spacing: -.25px; }
  .platform-picker .platform-copy small { font-size: 9px; }
}
@media (max-width: 350px) {
  .rd-head h2 { font-size: 21px; }
  .rd-board { padding-inline: 11px; }
  .rd-board .hm-ranking li > a { grid-template-columns: 15px 38px minmax(0,1fr) auto; gap: 6px; }
  .rd-board .hm-rank-poster { width: 38px; height: 54px; }
  .hm-rank-info strong { font-size: 12px; }
  .hm-count { font-size: 12px; }
  .hm-platform-head h3 { font-size: 15px; }
  .hm-platform-head > a { font-size: 10px; }
  .rd-update-line { flex-wrap: wrap; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-new-icon { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .hm-teaser, .rd-board, .hm-project, .pcard, .dc-project, .rd-entries a, .tabbar { background: var(--raised); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (forced-colors: active) {
  .app::before, .app::after { display: none; }
  .app, .night, .account-wallet { background: Canvas; color: CanvasText; }
}

/* One uninterrupted starfield behind the page, including the partner logos. */
.app>.upfront-starfield{position:fixed;inset:0;width:min(100%,var(--appw));height:100vh;height:100lvh;margin-inline:auto;display:block;z-index:-1;pointer-events:none;border:0;border-radius:0;background:none;opacity:1}
@media(prefers-reduced-motion:reduce){.app>.upfront-starfield{will-change:auto}}

/* Immediate taps without double-tap zoom; pinch zoom remains available. */
html,body{touch-action:manipulation}
