/* egobot.io — one stylesheet for the homepage and the app. */
:root {
  --bg: #0C111B; --panel: #131A27; --panel-2: #0F1520; --line: #1F2838; --line-2: #2B3548;
  --text: #EEF1F6; --text-2: #D6DDEA; --muted: #A9B4C7; --faint: #8C97AB;
  --amber: #F2A541; --amber-ink: #1B1408; --amber-soft: #FFD9A0; --mint: #8FE3C8; --ice: #CFE9FF;
  --red: #F2A0A0;
  --display: "Fredoka", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); }
a { color: var(--amber); } a:hover { color: #FFC978; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 24px 48px; }
.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 64px; }
.logo { font: 600 24px var(--display); text-decoration: none; color: var(--text); }
.logo span { color: var(--amber); }
.beta { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--bg); background: var(--mint); border-radius: 999px; padding: 3px 8px; }
.grow { flex-grow: 1; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.lbl { font-size: 12px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.btn.danger { color: var(--red); border-color: #5A2B2B; }
.btn:disabled { opacity: .55; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea, .field select { min-height: 46px; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: var(--panel-2); color: var(--text); }
.err { color: var(--red); font-size: 14px; min-height: 20px; }
.note { font-size: 13px; color: var(--faint); line-height: 1.5; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
@keyframes pulse { 0%,100% { opacity: .5 } 50% { opacity: 1 } }
@keyframes zz { 0% { opacity: 0; transform: translate(0,0) scale(.8) } 35% { opacity: 1 } 100% { opacity: 0; transform: translate(16px,-26px) scale(1.1) } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 6px) } to { opacity: 1; transform: translate(-50%, 0) } }
.pulse { animation: pulse 1.4s infinite; }
.hidden { display: none !important; }

/* homepage */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 48px 0 64px; }
.hero h1 { margin: 0; font: 600 clamp(38px, 6vw, 60px)/1.05 var(--display); }
.hero p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 520px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-bottom: 64px; }
.three .card { padding: 26px; }
.three h3 { margin: 0 0 8px; font: 600 22px var(--display); }

/* auth + onboarding */
.center { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.sheet { width: min(680px, 100%); background: #F6F1E7; color: #1B2436; border-radius: 24px; padding: 36px 40px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.sheet h2 { margin: 0; font: 600 30px var(--display); }
.sheet .sub { font-size: 15px; color: #4D586B; line-height: 1.5; }
.sheet .field input, .sheet .field textarea { background: #fff; color: #1B2436; border-color: #CFC5B3; }
.sheet .lbl { color: #4D586B; }
.sheet .err { color: #B3261E; }
.sheet .btn { color: #1B2436; border-color: #CFC5B3; }
.sheet .btn.primary { color: var(--amber-ink); }
.sheet.sent { align-items: flex-start; }
.sent-mascot { width: 72px; height: auto; margin-bottom: -6px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choices.one { grid-template-columns: 1fr; }
.choice { text-align: left; padding: 16px; border-radius: 16px; border: 2px solid #E3DACB; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.choice[aria-pressed="true"] { border-color: var(--amber); }
.choice b { font: 600 17px var(--display); color: #1B2436; }
.choice span { font-size: 13px; color: #4D586B; line-height: 1.4; }
.steps { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.steps i { width: 36px; height: 6px; border-radius: 3px; background: #3B4A69; }
.steps i.on { background: var(--amber); }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.summary { background: #fff; border-radius: 16px; padding: 16px 18px; display: grid; grid-template-columns: 130px minmax(0, 1fr); row-gap: 10px; font-size: 15px; }
.summary span { color: #5C6577; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } .sheet { padding: 26px 20px; } }

/* room */
.roomgrid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.stage { position: relative; flex: 999 1 640px; min-width: 0; aspect-ratio: 1024 / 720; border-radius: 20px; overflow: hidden; background: #0A0E16; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.stage > img.room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage img.sprite { position: absolute; pointer-events: none; }
.bubble { position: absolute; transform: translateX(-50%); width: min(230px, 30%); padding: 9px 12px 10px; border-radius: 14px; background: rgba(255,250,240,.96); color: #1A2130; box-shadow: 0 10px 24px rgba(0,0,0,.35); animation: rise .5s ease-out both; pointer-events: none; font-size: 13px; line-height: 1.35; }
.bubble .k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: #8A5A12; }
.zz { position: absolute; width: 30px; height: 34px; pointer-events: none; }
.zz span { position: absolute; font: 600 18px var(--display); color: var(--ice); animation: zz 2.6s infinite; }
.plate { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; padding: 5px 12px; border-radius: 12px; background: rgba(12,17,27,.72); backdrop-filter: blur(6px); white-space: nowrap; pointer-events: none; }
.plate b { font: 600 15px var(--display); color: #FFF8EC; } .plate small { font-size: 12px; color: var(--text-2); }
.hot { position: absolute; border-radius: 18px; display: block; }
.hot:hover, .hot:focus-visible { background: rgba(242,165,65,.10); box-shadow: inset 0 0 0 2px rgba(242,165,65,.55); outline: none; }
.free { position: absolute; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(12,17,27,.72); border: 1px dashed rgba(242,165,65,.8); color: var(--amber-soft); font-weight: 600; font-size: 13px; white-space: nowrap; pointer-events: none; }
.side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.botrow { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 12px 14px; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.meters b { font: 600 18px var(--display); }

/* bot page */
.ident { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.ident .who { flex: 999 1 560px; min-width: 0; display: flex; gap: 20px; align-items: center; padding: 18px 22px; background: linear-gradient(90deg, #172033, #131A27); }
.ident .avatar { width: 96px; height: 96px; border-radius: 24px; background: #0A0E16; flex-shrink: 0; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.ident h1 { margin: 0; font: 600 32px var(--display); }
.wake { flex: 1 1 380px; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.clock { font: 600 40px var(--display); font-variant-numeric: tabular-nums; color: var(--ice); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--mint); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }
.tab { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--panel); color: var(--text-2); }
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); }
.two { display: flex; flex-wrap: wrap; gap: 16px; }
.two > .main { flex: 999 1 560px; min-width: 0; }
.two > .aside { flex: 1 1 340px; min-width: 0; align-self: flex-start; }
.msg { max-width: 80%; border-radius: 16px; padding: 10px 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.msg.owner { align-self: flex-end; background: #24324A; border-radius: 16px 16px 4px 16px; }
.msg.bot { align-self: flex-start; background: #1B2A26; border-radius: 16px 16px 16px 4px; }
.msg.platform { align-self: center; background: transparent; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; }
.msg small { display: block; font-size: 11px; color: var(--faint); margin-top: 4px; }
.empty { padding: 28px; text-align: center; color: var(--muted); line-height: 1.6; }
.gene { display: grid; grid-template-columns: 26px minmax(0, 1fr) 92px 70px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer; color: inherit; }
.gene[aria-pressed="true"] { background: #1C2638; }
.strand { display: flex; flex-direction: column; gap: 3px; } .strand i { height: 4px; border-radius: 2px; display: block; }
.diff { font: 12px/1.6 var(--mono); background: var(--panel-2); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; overflow-x: auto; max-height: 340px; overflow-y: auto; }
.diff .p { color: #6FD08C; } .diff .m { color: #E46A6A; }
pre.prose { white-space: pre-wrap; font: 14px/1.6 var(--body); color: var(--text-2); margin: 0; }

/* phones: the room keeps its scene; names and the free-nook pill live in the
   list below it instead of crowding a small stage. */
@media (max-width: 640px) {
  .stage .plate, .stage .free { display: none; }
  .stage .bubble { width: 46%; font-size: 11px; padding: 6px 8px; }
  #who { display: none; }
  .ident .who { flex-direction: column; align-items: flex-start; }
  .ident .avatar { width: 72px; height: 72px; }
  .ident .avatar img { height: 68px !important; }
  .ident h1 { font-size: 26px; }
  .clock { font-size: 30px; }
  .gene { grid-template-columns: 22px minmax(0, 1fr) 56px; }
  .gene > .bar { display: none; }
  .tab { padding: 0 12px; font-size: 13px; }
}

.botrow:hover, .botrow:focus-visible { color: inherit; border-color: var(--line-2); }
