:root {
  --navy: #071526;
  --navy-soft: #0d2034;
  --surface: #112b42;
  --surface-2: #173a56;
  --ink: #eaf3ff;
  --muted: #9fc0dd;
  --orange: #ff7a2b;
  --orange-soft: #ff9e58;
  --teal: #0eb5ad;
  --white: #ffffff;
  --danger: #ff8d91;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 22px 55px rgba(1, 5, 10, 0.36);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--navy);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body {
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(900px 520px at 100% 0, rgba(14,181,173,.18), transparent 62%),
    var(--navy);
  background-size: 44px 44px, 44px 44px, auto, auto;
}
button, input, textarea { font: inherit; }
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .68rem 1rem;
  background: rgba(255,255,255,.055);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
button:hover { border-color: rgba(255,122,43,.65); background: rgba(255,122,43,.11); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.primary { border-color: var(--orange); background: linear-gradient(145deg, var(--orange), var(--orange-soft)); color: var(--navy); }
.primary:hover { background: linear-gradient(145deg, #ff8d43, #ffad71); color: var(--navy); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1300; border-radius: .7rem; padding: .7rem 1rem; background: var(--white); color: var(--navy); }
.skip-link:focus { top: 1rem; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 360px minmax(0, 1fr); }
.shelf-panel { min-height: 100dvh; padding: 1.55rem; border-right: 1px solid var(--line); background: rgba(4, 14, 25, .88); backdrop-filter: blur(16px); }
.brand-row, .main-heading, .shelf-heading, .shelf-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.boop-brand, .kiosk-brand { display: inline-flex; align-items: center; gap: .72rem; color: inherit; text-decoration: none; }
.boop-brand img, .kiosk-brand img { border-radius: 12px; filter: drop-shadow(0 3px 9px rgba(255,122,43,.35)); }
.boop-brand span, .kiosk-brand span { display: grid; line-height: 1; }
.boop-brand b, .kiosk-brand b { margin-top: .3rem; font-size: 1.35rem; letter-spacing: -.02em; }
.boop-brand small, .kiosk-brand small { color: var(--muted); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.round-button { width: 44px; padding: 0; border: 0; border-radius: 999px; background: var(--orange); color: var(--navy); font-size: 1.55rem; }
.shelf-heading { align-items: end; margin-top: 2.2rem; color: var(--muted); }
.shelf-heading strong { color: var(--ink); font-size: 1.9rem; }
.shelf-actions { margin-top: .5rem; }
.shelf-actions button { border: 0; padding: .35rem .2rem; background: transparent; color: var(--muted); }
.bot-list { display: grid; gap: .7rem; margin-top: 1rem; }
.bot-item { display: grid; grid-template-columns: 44px 1fr; gap: .75rem; width: 100%; padding: .8rem; border-color: var(--line); background: rgba(17,43,66,.72); color: var(--ink); text-align: left; }
.bot-item[aria-current=true] { border-color: var(--orange); background: linear-gradient(145deg, rgba(255,122,43,.17), rgba(14,181,173,.08)); box-shadow: inset 3px 0 var(--orange); }
.bot-item .badge { display: grid; place-items: center; border-radius: 12px; color: var(--white); font-weight: 900; }
.bot-item span:last-child { display: grid; min-width: 0; }
.bot-item b, .bot-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-item small { margin-top: .2rem; color: var(--muted); }
.privacy-note { margin-top: 1.2rem; padding: 1rem; border: 1px solid rgba(14,181,173,.28); border-radius: 18px; background: rgba(14,181,173,.07); }
.privacy-note b { color: var(--teal); }
.privacy-note p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.ecosystem-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.ecosystem-links a { color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: none; }
.ecosystem-links a:hover { color: var(--orange); }

.main-panel { min-width: 0; padding: 2.25rem clamp(1rem, 4vw, 3.5rem); }
.eyebrow { margin: 0; color: var(--teal); font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; }
.main-heading { align-items: flex-start; }
.main-heading h1 { margin: .42rem 0 0; color: var(--ink); font-size: clamp(2rem, 5vw, 3.6rem); line-height: .98; letter-spacing: -.055em; }
.main-tagline { margin: .55rem 0 0; color: var(--muted); font-weight: 650; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.danger { color: var(--danger); }
.detail-grid { display: grid; grid-template-columns: minmax(340px, 620px) minmax(300px, 1fr); gap: 1.5rem; align-items: start; margin-top: 2rem; }
.qr-stage { position: relative; padding: clamp(1rem, 3vw, 2rem); border: 1px solid rgba(255,255,255,.16); border-radius: 30px; background: radial-gradient(circle at 15% 12%, rgba(255,122,43,.35), transparent 36%), radial-gradient(circle at 88% 82%, rgba(14,181,173,.34), transparent 42%), linear-gradient(145deg, var(--surface), var(--navy-soft)); box-shadow: var(--shadow); }
.qr-card { max-width: 520px; margin: auto; padding: clamp(1rem, 4vw, 2rem); border-radius: 24px; background: var(--white); color: var(--navy); box-shadow: 0 20px 48px rgba(0,0,0,.28); }
#qr-code svg { display: block; width: 100%; height: auto; }
.qr-caption { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.qr-caption > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--orange); color: var(--white); font-weight: 900; }
.qr-caption div { display: grid; }
.qr-caption strong { font-size: 1.25rem; }
.qr-caption small { margin-top: .15rem; color: #5e7184; }
.sample-cover { position: absolute; right: 2.5rem; bottom: 2.5rem; left: 2.5rem; display: grid; gap: .35rem; padding: 1rem; border: 1px solid rgba(255,122,43,.42); border-radius: 18px; background: rgba(7,21,38,.96); color: var(--ink); text-align: center; box-shadow: 0 12px 32px rgba(0,0,0,.36); }
.sample-cover[hidden] { display: none; }
.sample-cover button { justify-self: center; margin-top: .35rem; }
.detail-stack { display: grid; gap: 1rem; }
.action-card, .safety-card, .description-card { padding: 1.35rem; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(155deg, rgba(17,43,66,.95), rgba(13,32,52,.95)); box-shadow: var(--shadow); }
.action-card .label { color: var(--orange); font-size: .76rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; }
.action-card h2 { margin: .4rem 0; }
.action-card > p:not(.label), .safety-card p, .description-card p { color: var(--muted); line-height: 1.65; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: 1rem; }
.safety-card { display: flex; gap: .8rem; }
.shield { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: rgba(14,181,173,.14); color: var(--teal); font-weight: 900; }
.safety-card p, .description-card p { margin: .3rem 0 0; }
.empty-state { min-height: 60vh; padding: 2rem; border: 2px dashed rgba(255,122,43,.45); border-radius: 30px; background: rgba(17,43,66,.42); text-align: center; place-items: center; }
.empty-state:not([hidden]) { display: grid; }
.empty-state > div, .empty-state > h2, .empty-state > p { max-width: 430px; margin: .35rem auto; }
.empty-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 18px; background: var(--orange); color: var(--navy); font-size: 2rem; }

.kiosk { position: fixed; inset: 0; z-index: 1000; min-height: 100dvh; overflow: auto; padding: clamp(1rem, 3vw, 2rem); background: radial-gradient(circle at 15% 15%, rgba(255,122,43,.18), transparent 34%), radial-gradient(circle at 85% 80%, rgba(14,181,173,.18), transparent 38%), var(--navy); color: var(--ink); }
.kiosk:not([hidden]) { display: flex; flex-direction: column; }
.kiosk > header { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1200px; margin: auto; }
.kiosk > header button, .kiosk-actions button { border-color: var(--line); background: rgba(255,255,255,.07); color: var(--ink); }
.kiosk-content { display: grid; grid-template-columns: minmax(320px,600px) minmax(260px,1fr); gap: clamp(2rem,5vw,5rem); align-items: center; width: 100%; max-width: 1200px; margin: auto; padding: 2rem 0; }
.kiosk-code { padding: clamp(1rem,3vw,2rem); border-radius: 32px; background: var(--white); box-shadow: var(--shadow); }
.kiosk-code svg { display: block; width: 100%; height: auto; }
.kiosk-copy h2 { margin: .7rem 0; font-size: clamp(3rem,8vw,6rem); line-height: .9; letter-spacing: -.06em; }
.kiosk-copy > p:last-of-type { color: var(--muted); font-size: 1.2rem; line-height: 1.7; }
.kiosk-actions, .kiosk-bots { display: flex; flex-wrap: wrap; gap: .6rem; }
.kiosk-bots { justify-content: center; max-width: 100%; margin: 1rem auto 0; }
.kiosk-bots button[aria-current=true] { border-color: var(--orange); background: var(--orange); color: var(--navy); }

dialog { width: min(580px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--navy-soft); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.55); }
dialog::backdrop { background: rgba(2,8,14,.78); backdrop-filter: blur(7px); }
dialog form { display: grid; gap: 1rem; padding: 1.3rem; }
dialog header, dialog footer, .field-pair { display: flex; justify-content: space-between; gap: 1rem; }
dialog h2 { margin: .2rem 0; }
.icon-button { width: 44px; padding: 0; border: 0; font-size: 1.6rem; }
label { display: grid; gap: .4rem; font-weight: 800; }
label small { color: var(--muted); font-weight: 500; }
input, textarea { width: 100%; padding: .74rem; border: 1px solid rgba(255,255,255,.2); border-radius: 11px; background: rgba(255,255,255,.08); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #7897b2; }
textarea { resize: vertical; }
.field-pair > * { flex: 1; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { font-weight: 800; }
.color-picker { display: flex; gap: .55rem; margin-top: .5rem; }
.color-chip { width: 38px; height: 38px; min-height: 38px; padding: 0; border: 3px solid transparent; border-radius: 999px; }
.color-chip[aria-pressed=true] { outline: 3px solid var(--white); outline-offset: 2px; }
.form-error { margin: 0; color: var(--danger); font-weight: 700; }
.toast { position: fixed; z-index: 1200; bottom: 1rem; left: 50%; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); transform: translate(-50%,140%); transition: transform .2s; }
.toast.show { transform: translate(-50%,0); }
noscript { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; padding: 1rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .shelf-panel { min-height: auto; padding: 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .privacy-note { display: none; }
  .bot-list { display: flex; overflow: auto; }
  .bot-item { min-width: 250px; }
  .detail-grid, .kiosk-content { grid-template-columns: 1fr; }
  .kiosk-content { max-width: 650px; }
  .kiosk-copy { text-align: center; }
  .kiosk-actions { justify-content: center; }
}

@media (max-width: 600px) {
  .main-panel { padding: 1rem; }
  .main-heading { display: grid; }
  .header-actions { justify-content: flex-start; margin-top: .25rem; }
  .header-actions button { padding: .55rem .7rem; }
  .detail-grid { grid-template-columns: minmax(0,1fr); margin-top: 1rem; }
  .action-grid { grid-template-columns: 1fr; }
  .sample-cover { right: 1.4rem; bottom: 1.4rem; left: 1.4rem; }
  .field-pair { display: grid; }
  .kiosk-content { padding: 1rem 0; }
  .kiosk-copy h2 { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
