/* Concept 03: a web interpretation of liquid glass. Content stays on quiet surfaces;
   floating controls use stronger translucency, edge light and optical depth. */
:root {
  /* Light tinted glass for navigation; richer mauve only for actions and checked days. */
  --selected-fill: linear-gradient(145deg,#ede5f1 0%,#e0d4e8 48%,#d7cadf 100%);
  --selected-solid: #e0d4e8;
  --selected-text: #543c65;
  --selected-edge: #b9a2c6a6;
  --selected-shadow: inset 0 0 12px #ffffff66,0 3px 12px #4e365b10;
  --day-fill: linear-gradient(145deg,#7b6986 0%,#706079 48%,#62526f 100%);
  --day-solid: #706079;
  --day-text: #fff;
  --day-edge: #cbb8d58c;
  --day-shadow: inset 0 0 10px #f4eaff24,0 3px 10px #4932571c;
  --bg: #edf0f5;
  --surface: #fafbfe;
  --text: #20232d;
  --muted: #606776;
  --line: #cdd1de;
  --accent: #6b468c;
  --tint: #e8e2f0;
  --hero: #363344;
  --heroText: #fff;
  --glass: rgba(248,250,255,.62);
  --glass-edge: rgba(255,255,255,.58);
  --glass-shadow: 0 10px 32px #34334d0e, 0 3px 14px #34334d08;
  --inner-light: rgba(255,255,255,.34);
  --card-wash: linear-gradient(135deg,#ffffff70 0%,#ffffff5e 25%,#ffffff45 50%,#f0f3ff36 75%,#e6ecfa30 100%);
  --card-color: rgba(247,249,253,.76);
  --orb: #dfc7ec;
}
body {
  background: radial-gradient(ellipse at 75% 4%,#e0e5f6 0,transparent 45%),
    radial-gradient(ellipse at 8% 65%,#dfd5e9 0,transparent 50%),#edf0f5;
  -webkit-font-smoothing: antialiased;
}
body.dark {
  --selected-fill: linear-gradient(145deg,#595268 0%,#50485f 48%,#453e54 100%);
  --selected-solid: #50485f;
  --selected-text: #f5eff9;
  --selected-edge: #b5a2c575;
  --selected-shadow: inset 0 0 12px #eee6ff18,0 3px 12px #0000001c;
  --day-fill: linear-gradient(145deg,#7a6887 0%,#70617e 48%,#63546f 100%);
  --day-solid: #70617e;
  --bg: #11131b;
  --surface: #20232e;
  --text: #f2f3f9;
  --muted: #b6bccd;
  --line: #414755;
  --accent: #ddc3f1;
  --tint: #393343;
  --hero: #e4d8ec;
  --heroText: #262230;
  --glass: rgba(34,39,53,.72);
  --glass-edge: rgba(225,232,255,.16);
  --glass-shadow: 0 12px 36px #00000024, 0 3px 14px #00000016;
  --inner-light: rgba(225,232,255,.10);
  --card-wash: linear-gradient(135deg,#aebde118 0%,#adb8dc12 25%,#c2bee10c 50%,#b4a1cf0b 75%,#9f7dca0c 100%);
  --card-color: rgba(32,36,49,.84);
  --orb: #705379;
  background: radial-gradient(ellipse at 70% 8%,#2d334c 0,transparent 50%),
    radial-gradient(ellipse at 8% 70%,#32283f 0,transparent 48%),#11131b;
}
.intro h1 { font-size:62px; font-weight:550; letter-spacing:-3.2px; }
.wordmark { letter-spacing:-1px; }
.wordmark i, .brand i { background:#9771af; box-shadow:0 0 14px #b58ec26b; }
.intro .pill { border:1px solid var(--glass-edge); background:var(--glass); padding:10px 15px; }
.demo-controls { padding:0 4px; }
.demo-controls label { font-size:12px; }
select { appearance:none; padding:12px 34px 12px 14px; min-height:44px; border-radius:18px; background:var(--card-wash),var(--card-color); box-shadow:inset 0 0 9px var(--inner-light); }
.demo-controls { position:relative; }
.demo-controls::after { content:''; pointer-events:none; position:absolute; right:74px; top:17px; width:6px; height:6px; border-right:1.5px solid var(--muted); border-bottom:1.5px solid var(--muted); transform:rotate(45deg); }
.phone {
  border:1px solid var(--glass-edge); border-radius:38px; overflow:clip;
  background:radial-gradient(ellipse at 100% 0%,#d1d8ee88,transparent 42%),
    radial-gradient(ellipse at 0% 40%,#e2d6e96b,transparent 45%),var(--bg);
  box-shadow:0 30px 90px #29263820,inset 0 0 0 1px #ffffff38;
}
.dark .phone { background:radial-gradient(ellipse at 100% 0%,#44476c66,transparent 45%),radial-gradient(ellipse at 0% 42%,#4c325333,transparent 40%),var(--bg); box-shadow:0 30px 90px #0006; }
.glass, .icon-btn, .avatar, .back {
  background:linear-gradient(130deg,#ffffff22,#ffffff04 45%,#ffffff15),var(--glass);
  border:1px solid var(--glass-edge);
  backdrop-filter:blur(24px) saturate(165%);
  -webkit-backdrop-filter:blur(24px) saturate(165%);
  box-shadow:inset 0 0 12px var(--inner-light),var(--glass-shadow);
}
.topbar {
  height:62px; border-radius:25px; margin:14px 14px 0; padding:0 14px;
  top:12px; z-index:8; gap:9px;
}
.brand { font-size:19px; letter-spacing:-.7px; }
#scope { font-size:12px; }
.avatar { width:44px; height:44px; background-color:var(--tint); }
main { padding:23px 20px 116px; }
.page-title { font-size:32px; font-weight:650; letter-spacing:-1.3px; margin:12px 0 8px; }
.subtitle { margin-bottom:18px; font-size:14px; }
.date { font-size:11px; letter-spacing:.6px; }
.date .tag { letter-spacing:0; font-size:11px; background:transparent; color:var(--muted); padding-right:0; }
.hero, .card {
  position:relative; isolation:isolate; border-radius:28px;
  border:1px solid var(--glass-edge);
  background:var(--card-wash),var(--card-color);
  box-shadow:inset 0 0 16px var(--inner-light),0 8px 28px #30394f0b;
}
.hero {
  color:var(--text); padding:22px; margin:18px 0;
  background:radial-gradient(ellipse at 10% 5%,#ffffff80 0%,#ffffff40 30%,#ffffff12 60%,#ffffff00 100%),
    linear-gradient(130deg,#e1e7f3 0%,#dfe2f0 28%,#dfdaee 56%,#ddd7ea 78%,#d9deed 100%);
  box-shadow:inset 0 0 18px var(--inner-light),0 12px 32px #69718c12;
}
.dark .hero { background:radial-gradient(ellipse at 10% 5%,#8492b626 0%,#8492b612 40%,#8492b600 100%),linear-gradient(130deg,#30384c 0%,#34384e 28%,#3b384e 56%,#3b364c 78%,#30394d 100%); box-shadow:inset 0 0 18px var(--inner-light),0 12px 32px #00000020; }
.hero::after { inset:0; width:auto; height:auto; border:0; border-radius:inherit; box-shadow:none; background:radial-gradient(ellipse at 88% 12%,#ffffff12 0%,#ffffff08 35%,#ffffff00 75%); }
.hero > * { position:relative; z-index:1; }
.hero .big { font-size:42px; letter-spacing:-2px; line-height:1.15; margin:16px 0 8px; font-weight:650; }
.hero .big small { font-size:26px; font-weight:500; }
.hero .muted { color:var(--muted); opacity:1; }
.hero .tag { background:#edf6e3; color:#3e5b35; box-shadow:inset 0 1px 0 #fff; font-size:12px; padding:6px 9px; }
.dark .hero .tag { background:#3c4d3b; color:#d5edbe; box-shadow:inset 0 1px 0 #ffffff20; }
.hero-foot { border-color:#70789330; font-size:12px; padding-top:14px; margin-top:16px; }
.dark .hero-foot { border-color:#ffffff20; }
.hero-meter { height:6px; border-radius:30px; background:#fff6; margin-top:20px; box-shadow:inset 0 1px 2px #5e526623; overflow:hidden; }
.hero-meter span { display:block; height:100%; width:92.3077%; background:linear-gradient(90deg,#6e5e8a,#a18aaf); border-radius:inherit; }
.dark .hero-meter { background:#fff1; }
.dark .hero-meter span { background:linear-gradient(90deg,#b296d2,#e3c9ef); }
.section-head { margin:22px 0 10px; }
h2 { font-size:18px; font-weight:650; }
h3 { font-weight:600; }
.card { padding:18px; margin:12px 0; }
.card:hover { border-color:var(--glass-edge); }
.card .track { height:5px; background:#b0aec429; }
.track span { background:linear-gradient(90deg,#827095,#ba9ccb); }
.dark .track span { background:linear-gradient(90deg,#9d80b4,#dfc1ee); }
.small { font-size:14px; }
.card-icon { border-radius:16px; background:linear-gradient(145deg,#fff7,#fff0),var(--tint); box-shadow:inset 0 0 10px var(--inner-light),0 4px 12px #2b254609; width:46px; height:46px; }
.chevron { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:#a7a9bf12; box-shadow:inset 0 0 9px var(--inner-light); }
.ai-card { background:linear-gradient(110deg,#e1d4ef55,#d9e9f733),var(--card-color); padding:16px 18px; }
.ai-card .card-icon { border-radius:50%; background:radial-gradient(circle at 30% 20%,#fff5,transparent 65%),linear-gradient(150deg,#706384,#41394f); color:#fff; box-shadow:inset 0 0 12px #ffffff25,0 5px 16px #7f64851a; }
.ai-card h3 { font-size:16px; }
.ai-card p { font-size:13px; }
.bottom-nav { display:grid; grid-template-columns:repeat(var(--tab-count,5),minmax(0,1fr)); border-radius:30px; padding:7px; bottom:22px; }
.bottom-nav::before {
  box-sizing:border-box;
  content:''; position:absolute; pointer-events:none; width:calc((100% - 14px)/var(--tab-count,5)); height:calc(100% - 14px);
  left:7px; top:7px; border-radius:23px;
  background:var(--selected-fill);
  border:1px solid var(--selected-edge); box-shadow:var(--selected-shadow);
  transform:translateX(calc(var(--tab-index,0)*100%));
  transition:transform 300ms cubic-bezier(.22,.8,.25,1);
}
.bottom-nav a { position:relative; z-index:1; min-width:0; min-height:52px; border-radius:23px; font-size:13px; gap:4px; color:var(--muted); }
.bottom-nav a.active { background:transparent; color:var(--selected-text); font-weight:650; }
.bottom-nav a[href='#chat/app'] svg { color:var(--accent); filter:drop-shadow(0 1px 4px #b995c257); }
.filters { border-radius:23px; padding:5px; }
.filters button { border-radius:18px; min-height:44px; font-size:14px; }
.filters button.active { color:var(--selected-text); background:var(--selected-fill); border:1px solid var(--selected-edge); box-shadow:var(--selected-shadow); }
.bottom-nav a.active svg { color:inherit; filter:none; }
/* One control geometry for native buttons and links, including wrapped labels. */
.primary, .secondary {
  border-radius:22px; min-height:44px; font-size:14px;
  border:1px solid var(--glass-edge);
  backdrop-filter:blur(20px) saturate(150%);
  -webkit-backdrop-filter:blur(20px) saturate(150%);
  box-shadow:inset 0 0 10px var(--inner-light),0 3px 12px #302c440a;
  transition:background-color 180ms ease,box-shadow 180ms ease,transform 160ms ease;
}
.primary, .hero .secondary {
  color:#fff;
  background:linear-gradient(145deg,#756486d9 0%,#655471e8 45%,#51465ef0 100%);
  border-color:#c7b5d46b;
  box-shadow:inset 0 0 10px #f4eaff20,0 3px 12px #302c4412;
}
.secondary { color:var(--accent); background:linear-gradient(135deg,#ffffff80 0%,#f8f5ff45 50%,#e9dff02e 100%),var(--glass); }
.dark .secondary { background:linear-gradient(135deg,#eee6ff18 0%,#e9dcff0c 50%,#d1b3e008 100%),var(--glass); }
.dark .primary, .dark .hero .secondary {
  background:linear-gradient(145deg,#ded9e3ed 0%,#cfc7d6ed 50%,#bdb5c8ed 100%);
  color:#282630; border-color:#f1eaf766;
}
.back { justify-content:center; border-radius:22px; padding:0 14px; min-height:44px; margin:0 0 12px; color:var(--text); font-size:14px; }
.text-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:8px; line-height:20px; text-align:center; }
.message { border-radius:23px 23px 23px 6px; background:var(--card-color); border-color:var(--glass-edge); box-shadow:inset 0 0 10px var(--inner-light); font-size:16px; }
.message.user { background:var(--tint); border-radius:23px 23px 6px 23px; }
.message small { font-size:12px; }
.channel-notice { background:var(--tint); font-size:13px; line-height:1.5; border-radius:17px; }
.suggestions button { display:flex; align-items:center; justify-content:center; min-height:44px; border-radius:18px; padding:10px 12px; font-size:14px; line-height:20px; text-align:center; background:var(--card-wash),var(--glass); border-color:var(--glass-edge); }
.composer { border-radius:25px; padding:14px; border:1px solid var(--glass-edge); background:var(--card-wash),var(--card-color); box-shadow:var(--glass-shadow); }
.composer .field { margin-top:0; }
.composer-row { display:grid; grid-template-columns:1fr 1fr; }
.composer-row button { padding:10px 12px; font-size:14px; }
textarea { border-radius:17px; }
.receipt { border:1px solid var(--glass-edge); border-radius:23px; padding:18px; }
.photo-preview { border-radius:20px; }
.demo-footer { font-size:12px; }
.demo-footer button { min-height:44px; font-size:12px; }
button, a.card, .bottom-nav a { transition:transform 160ms ease,box-shadow 180ms ease; }
button:active:not(:disabled), a.card:active { transform:scale(.985); }
:focus-visible { scroll-margin-block:100px; }
@media (hover:hover) { a.card:hover, button:hover:not(:disabled) { box-shadow:inset 0 0 14px var(--inner-light),0 9px 28px #6a597a14; } }
@media (max-width:760px) {
  .workspace { max-width:520px; }
  .phone, .dark .phone { border:0; border-radius:0; background:transparent; box-shadow:none; }
  .demo-controls { padding:8px 16px; border:0; }
  .demo-controls::after { right:82px; top:25px; }
  .demo-controls .icon-btn { width:44px; height:44px; }
  .topbar { margin-top:5px; }
  main { padding-top:22px; }
  .bottom-nav { bottom:max(12px,env(safe-area-inset-bottom)); width:calc(100% - 28px); max-width:492px; margin-left:14px; }
  .demo-footer { margin-bottom:90px; }
}
@media (max-width:360px) {
  main { padding-left:15px; padding-right:15px; }
  .topbar { margin-left:10px; margin-right:10px; padding-left:12px; padding-right:8px; }
  .brand { font-size:17px; }
  .page-title { font-size:29px; }
  .hero { padding:18px; }
  .hero .big { font-size:36px; }
  .hero-foot { flex-wrap:wrap; }
  .card { padding:16px; }
  .card .row { gap:8px; }
  .bottom-nav a { font-size:12px; }
  .composer-row { grid-template-columns:1fr; }
}
/* A complete opaque fallback, including decorative cards and buttons. */
.reduce .glass, .reduce .card, .reduce .hero, .reduce .icon-btn, .reduce .avatar,
.reduce .back, .reduce .composer, .reduce .filters button.active {
  backdrop-filter:none; -webkit-backdrop-filter:none;
  background:var(--surface); box-shadow:none; border:1px solid var(--line);
}
.reduce .hero::after { display:none; }
.reduce .bottom-nav::before,.reduce .filters button.active { background:var(--selected-solid); box-shadow:none; border-color:var(--selected-edge); transition:none; }
.reduce *, .reduce *::before { transition:none!important; animation:none!important; }
@media (prefers-reduced-motion:reduce) { *, *::before { transition:none!important; animation:none!important; } }
@media (prefers-reduced-transparency:reduce) {
  .glass, .card, .hero, .icon-btn, .avatar, .back, .composer { backdrop-filter:none; -webkit-backdrop-filter:none; background:var(--surface); box-shadow:none; }
  .hero::after { display:none; }
}

/* Keep the control hierarchy readable when transparency is disabled. */
.reduce .primary,.reduce .secondary { backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; }
.reduce .secondary { background:var(--surface); border-color:var(--line); }
.reduce .primary,.reduce .hero .secondary { background:var(--hero); color:var(--heroText); border-color:var(--line); }
@media (prefers-reduced-transparency:reduce) {
  .primary,.secondary { backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; }
  .secondary,.dark .secondary { background:var(--surface); border-color:var(--line); }
  .primary,.dark .primary,.hero .secondary,.dark .hero .secondary { background:var(--hero); color:var(--heroText); }
}

.bottom-nav.no-active-tab::before {opacity:0;}
