@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600&family=Crimson+Pro:ital,wght@1,300;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #050304;
  --surface-1: #0E0F13;
  --surface-2: #181A21;
  --cream: #FFF6D5;
  --cream-dim: #C5BAA5;
  --muted: #A8A597;
  --tertiary: #8A7B72;
  --quaternary: #54534B;
  --lime: #C5F244;
  --lime-soft: rgba(197,242,68,.08);
  --ember: #C75A3F;
  --ember-soft: rgba(199,90,63,.12);
  --warning: #FAC775;
  --danger: #F87171;
  --glass-bg: rgba(255,246,213,.04);
  --glass-bg-strong: rgba(5,3,4,.55);
  --glass-border: rgba(255,246,213,.12);
  --glass-border-strong: rgba(255,246,213,.18);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;
}

@property --ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior: none;
  min-height: 100vh;
  min-height: 100dvh;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.font-serif { font-family: 'Crimson Pro', Georgia, serif; font-style: italic; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

@keyframes ar-kb { 0%,100% { transform: scale(1.06) translate(0,0); } 50% { transform: scale(1.12) translate(-1.5%,-0.8%); } }
@keyframes ar-mood { 0%,100% { opacity:.55; } 50% { opacity:.8; } }
@keyframes ar-volumetric { 0%,100% { opacity:.7; transform: translateX(-50%) scaleY(1); } 50% { opacity:1; transform: translateX(-50%) scaleY(1.05); } }
@keyframes ar-pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.45; transform:scale(.7); } }
@keyframes ar-rise { 0% { opacity:0; transform: translateY(20px); } 100% { opacity:1; transform: translateY(0); } }
@keyframes ar-rise-r { 0% { opacity:0; transform: translateX(20px); } 100% { opacity:1; transform: translateX(0); } }
@keyframes ar-rise-l { 0% { opacity:0; transform: translateX(-20px); } 100% { opacity:1; transform: translateX(0); } }
@keyframes ar-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.015); } }
@keyframes ar-breathe-2 { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes ar-float-1 { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-5px) translateX(2px); } }
@keyframes ar-float-2 { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-7px) translateX(-3px); } }
@keyframes ar-float-3 { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(4px) translateX(2px); } }
@keyframes ar-dust-1 { 0% { transform: translate(0,0); opacity:0; } 25% { opacity:.5; } 100% { transform: translate(20px,-180px); opacity:0; } }
@keyframes ar-dust-2 { 0% { transform: translate(0,0); opacity:0; } 25% { opacity:.4; } 100% { transform: translate(-15px,-220px); opacity:0; } }
@keyframes ar-dust-3 { 0% { transform: translate(0,0); opacity:0; } 30% { opacity:.55; } 100% { transform: translate(8px,-200px); opacity:0; } }
@keyframes ar-scan { 0% { left:-30%; } 100% { left:130%; } }
@keyframes ar-irides { 0%,100% { opacity:.4; } 50% { opacity:.85; } }
@keyframes ar-shimmer { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }
@keyframes ar-beam { to { --ang: 360deg; } }
@keyframes ar-spin { to { transform: rotate(360deg); } }
@keyframes ar-line-grow { 0% { width:0; } 100% { width:28px; } }
@keyframes ar-cue { 0%,100% { transform: translateY(0); opacity:.55; } 50% { transform: translateY(3px); opacity:.85; } }
@keyframes ar-w1 { 0%,100% { height:5px; } 50% { height:22px; } }
@keyframes ar-w2 { 0%,100% { height:14px; } 50% { height:32px; } }
@keyframes ar-w3 { 0%,100% { height:8px; } 50% { height:18px; } }
@keyframes ar-w4 { 0%,100% { height:20px; } 50% { height:6px; } }

.frame { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; }

.volumetric { position:absolute; top:-100px; left:50%; transform: translateX(-50%); width: 100%; max-width: 460px; height: 600px; background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(199,90,63,.4) 0%, rgba(199,90,63,.12) 30%, rgba(5,3,4,0) 65%); pointer-events:none; animation: ar-volumetric 9s ease-in-out infinite; transform-origin: top center; z-index: 1; }
.mood-bottom { position:absolute; bottom:-80px; left:50%; transform: translateX(-50%); width: 100%; max-width: 420px; height: 360px; background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(199,90,63,.16) 0%, rgba(5,3,4,0) 60%); pointer-events:none; animation: ar-mood 11s ease-in-out infinite; z-index: 1; }
.grain { position:absolute; inset:0; opacity:.025; background-image: radial-gradient(circle at 25% 35%, var(--cream) 1px, transparent 1px), radial-gradient(circle at 65% 55%, var(--cream) 1px, transparent 1px), radial-gradient(circle at 35% 75%, var(--cream) 1px, transparent 1px); background-size: 90px 90px, 110px 110px, 70px 70px; pointer-events:none; z-index: 1; }
.dust { position:absolute; width:2px; height:2px; border-radius:50%; background:var(--cream); pointer-events:none; z-index: 1; }

.content { position: relative; z-index: 2; }

.statusbar { display:flex; justify-content:space-between; align-items:center; padding: 14px 28px 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: var(--cream); }
.sb-right { display:flex; gap:6px; align-items:center; }
.sb-signal { display:flex; gap:2px; align-items:flex-end; height:10px; }
.sb-signal i { width:3px; background: var(--cream); border-radius:1px; display: block; }
.sb-bar { width:14px; height:9px; border:1px solid var(--cream); border-radius:2px; position:relative; }
.sb-bar::after { content:''; position:absolute; inset:1px; background: var(--cream); border-radius:1px; }

.glass { background: var(--glass-bg); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 0.5px solid var(--glass-border); position: relative; }
.glass-edge::before { content:''; position:absolute; top:0; left:8%; right:8%; height:0.5px; background: linear-gradient(90deg, transparent, rgba(255,246,213,.55), transparent); animation: ar-irides 5s ease-in-out infinite; pointer-events: none; }

.orb { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s; flex-shrink: 0; }
.orb:hover { background: rgba(255,246,213,.08); }
.orb svg { display: block; }

.tag { padding: 5px 10px; background: rgba(255,246,213,.05); backdrop-filter: blur(12px); border: 0.5px solid rgba(255,246,213,.14); border-radius: 7px; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); font-weight: 500; }
.tag-line { height: 0.5px; background: linear-gradient(90deg, rgba(255,246,213,.18), transparent); flex: 1; animation: ar-line-grow .8s ease-out .5s both; }

.pill-glass { padding: 7px 12px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px; background: rgba(255,246,213,.04); backdrop-filter: blur(16px); border: 0.5px solid var(--glass-border); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .04em; color: var(--muted); }

.pill-live { background: var(--lime-soft); border-color: rgba(197,242,68,.25); color: var(--lime); position: relative; overflow: hidden; }
.pill-live::before { content:''; position:absolute; top:0; bottom:0; left:-30%; width:50%; background: linear-gradient(90deg, transparent, rgba(197,242,68,.18), transparent); animation: ar-scan 3s ease-in-out infinite; }
.pill-live > * { position: relative; z-index: 1; }

.live-dot { width:5px; height:5px; border-radius:50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); animation: ar-pulse 1.6s ease-in-out infinite; flex-shrink: 0; }

.btn-primary { position: relative; padding: 1px; border-radius: var(--r-lg); background: conic-gradient(from var(--ang), var(--lime) 0deg, transparent 80deg, transparent 280deg, var(--lime) 360deg); cursor: pointer; animation: ar-beam 4s linear infinite; border: none; display: block; }
.btn-primary-inner { position: relative; height: 100%; width: 100%; border-radius: calc(var(--r-lg) - 1px); background: var(--cream); color: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: transform .15s; padding: 14px 20px; }
.btn-primary:active .btn-primary-inner { transform: scale(.98); }

.dish-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #0A0506; }
.dish-photo.kb { animation: ar-kb 16s ease-in-out infinite; transform-origin: center; }
.dish-photo.kb-tv { animation: ar-kb 14s ease-in-out infinite; transform-origin: center; }
.dish-thumb-w { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; overflow: hidden; position: relative; background: #1A0F0A; border: 0.5px solid rgba(255,246,213,.06); }
.dish-thumb-w img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-thumb-w::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.2)); pointer-events: none; }

.home-indicator { display:flex; justify-content:center; padding: 6px 0 8px; }
.home-indicator::after { content:''; width:120px; height:5px; border-radius:3px; background: var(--cream); opacity:.35; }

@media (max-width: 360px) {
  .statusbar { padding: 12px 20px 6px; }
}

/* === APP-WIDE COMPONENTS === */

/* App bar (top nav with back button) */
.app-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; gap: 10px; }
.app-bar-orb { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .25s; flex-shrink: 0; background: var(--glass-bg); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 0.5px solid var(--glass-border); position: relative; }
.app-bar-orb:active { transform: scale(.94); }
.app-bar-title { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; flex: 1; text-align: center; }

/* Bottom navigation */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; padding: 8px 12px 22px; background: linear-gradient(to top, var(--bg) 50%, rgba(5,3,4,.8) 90%, transparent); z-index: 50; }
.bottom-nav-bar { display: flex; gap: 0; padding: 5px; background: rgba(14,15,19,.85); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 0.5px solid var(--glass-border); border-radius: var(--r-pill); box-shadow: 0 8px 32px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,246,213,.1); position: relative; overflow: hidden; }
.bottom-nav-bar::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,246,213,.4), transparent); }
.bn-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 6px; border-radius: var(--r-pill); cursor: pointer; color: var(--tertiary); transition: all .25s; text-decoration: none; }
.bn-tab.active { background: rgba(255,246,213,.06); color: var(--cream); }
.bn-tab svg { display: block; }
.bn-tab-lab { font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.bn-tab.cta { background: var(--cream); color: var(--bg); padding: 9px; max-width: 60px; }
.bn-tab.cta svg { stroke: var(--bg); }

/* Generic list item */
.li-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 14px; transition: background .25s; cursor: pointer; text-decoration: none; color: inherit; }
.li-row:active { background: rgba(14,15,19,.6); }
.li-icon { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,246,213,.04); border: 0.5px solid var(--glass-border); }
.li-icon.coral { background: rgba(199,90,63,.1); border-color: rgba(199,90,63,.18); }
.li-icon.lime { background: rgba(197,242,68,.08); border-color: rgba(197,242,68,.2); }
.li-icon.amber { background: rgba(250,199,117,.1); border-color: rgba(250,199,117,.2); }
.li-info { flex: 1; min-width: 0; }
.li-title { font-size: 15px; font-weight: 500; letter-spacing: -.02em; color: var(--cream); line-height: 1.2; }
.li-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: .04em; text-transform: uppercase; }
.li-arrow { color: var(--tertiary); flex-shrink: 0; }
.li-value { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--cream); flex-shrink: 0; }

/* Toggle switch */
.toggle { width: 40px; height: 24px; border-radius: var(--r-pill); background: rgba(255,246,213,.08); flex-shrink: 0; position: relative; cursor: pointer; transition: all .25s; border: 0.5px solid rgba(255,246,213,.1); }
.toggle::after { content: ''; position: absolute; left: 2px; top: 1px; width: 19px; height: 19px; border-radius: 50%; background: var(--cream); transition: all .25s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.toggle.on { background: var(--lime); border-color: rgba(197,242,68,.4); }
.toggle.on::after { left: 18px; background: var(--bg); }

/* Sections */
.sec-row { display: flex; align-items: center; gap: 10px; padding: 6px 28px 10px; }
.sec-lab { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--quaternary); letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.sec-line { flex: 1; height: 0.5px; background: rgba(255,246,213,.06); }

/* Card */
.card { background: rgba(14,15,19,.6); backdrop-filter: blur(20px); border: 0.5px solid rgba(255,246,213,.06); border-radius: var(--r-lg); padding: 16px 18px; }
.card-tt { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--quaternary); font-weight: 500; }
.card-val { font-size: 22px; font-weight: 300; letter-spacing: -.04em; color: var(--cream); margin-top: 6px; line-height: 1; }

/* Buttons */
.btn-ghost { padding: 12px 18px; background: rgba(255,246,213,.04); backdrop-filter: blur(16px); border: 0.5px solid var(--glass-border); border-radius: var(--r-md); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cream); font-weight: 500; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; transition: transform .15s; }
.btn-ghost:active { transform: scale(.97); }
.btn-cream { padding: 14px 22px; background: var(--cream); color: var(--bg); border: none; border-radius: var(--r-md); font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; letter-spacing: -.02em; cursor: pointer; transition: transform .15s; text-align: center; text-decoration: none; display: block; }
.btn-cream:active { transform: scale(.97); }
.btn-row { display: flex; gap: 10px; }

/* Form input */
.input-w { padding: 0 24px 14px; }
.input-lab { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.input { width: 100%; padding: 14px 16px; background: rgba(255,246,213,.04); border: 0.5px solid var(--glass-border); border-radius: var(--r-md); font-family: 'Inter', sans-serif; font-size: 15px; color: var(--cream); outline: none; transition: border .25s; }
.input:focus { border-color: var(--cream); background: rgba(255,246,213,.06); }
.input::placeholder { color: var(--quaternary); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); padding: 12px 18px; background: rgba(14,15,19,.92); backdrop-filter: blur(28px); border: 0.5px solid var(--glass-border-strong); border-radius: var(--r-pill); display: flex; align-items: center; gap: 10px; z-index: 100; box-shadow: 0 12px 40px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; max-width: 90%; }
.toast.show { opacity: 1; transform: translate(-50%, -8px); }
.toast-ic { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-tx { font-size: 13px; color: var(--cream); letter-spacing: -.01em; }

/* Bottom sheet */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(8px); }
.sheet-overlay.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 80vh; background: var(--surface-1); border-radius: 24px 24px 0 0; border-top: 0.5px solid var(--glass-border-strong); z-index: 95; transform: translateY(100%); transition: transform .35s cubic-bezier(.16,1,.3,1); padding: 8px 0 28px; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.6); }
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; background: rgba(255,246,213,.2); border-radius: 2px; margin: 8px auto 14px; }

/* Empty state */
.empty { padding: 60px 32px; text-align: center; }
.empty-ic { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: rgba(255,246,213,.04); border: 0.5px solid var(--glass-border); display: flex; align-items: center; justify-content: center; }
.empty-h { font-family: 'Crimson Pro', Georgia, serif; font-style: italic; font-size: 26px; font-weight: 400; letter-spacing: -.03em; color: var(--cream); margin: 0 0 10px; }
.empty-p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Page padding for bottom nav */
.has-bn { padding-bottom: 100px; }

/* View transitions */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .25s ease; }
::view-transition-new(root) { animation: vt-in .35s ease; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-3%); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(3%); } }

/* Filter chips */
.chip-row { display: flex; gap: 6px; padding: 0 24px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { padding: 8px 14px; background: rgba(255,246,213,.04); backdrop-filter: blur(12px); border: 0.5px solid var(--glass-border); border-radius: var(--r-pill); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; cursor: pointer; flex-shrink: 0; transition: all .25s; }
.chip.active { background: var(--cream); color: var(--bg); border-color: var(--cream); }
