/* flysimulator.kem108.dev: the simulator HUD, in the homepage's red glass. */
#scene { position: fixed; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.css3d { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.css3d iframe { border: 0; background: #000; }
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud > .nav-wrap, .hud > .toasts { pointer-events: none; }

/* ---------- welcome ---------- */
.welcome-screen {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: #000;
  transition: opacity .9s var(--ease), visibility .9s;
}
.welcome-screen.is-going { opacity: 0; visibility: hidden; }
.welcome-screen.is-over-world { background: rgba(0, 0, 0, .35); }
.welcome-card {
  width: min(520px, 100%);
  padding: clamp(26px, 5vw, 40px);
  border-radius: 40px;
  animation: rise-in 1.1s var(--ease) both;
}
.welcome-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.welcome-head .app-icon { margin-bottom: 6px; }
.welcome-title { margin: 0; font: 700 clamp(38px, 8vw, 54px)/1 var(--sf-display); letter-spacing: -.045em; }
.welcome-sub { margin: 0; max-width: 24em; font: 500 clamp(17px, 2.2vw, 19px)/1.35 var(--sf-display); letter-spacing: -.015em; color: var(--text-2); text-wrap: balance; }
.welcome-sub b { color: var(--text); font-weight: 600; }
.load { margin: 26px 0 8px; }
.load-bar { height: 6px; border-radius: 99px; background: rgba(255, 90, 100, .16); overflow: hidden; }
.load-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #b10d1b, #ff453a 70%, #ffd2d4); transition: width .3s var(--ease); }
.load-text { margin: 8px 0 0; font-size: 13px; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.profile { display: grid; gap: 14px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field > span { font: 400 13px/1.3 var(--sf); letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); }
.field input {
  width: 100%; height: 46px; padding: 0 16px;
  border: 0; border-radius: 14px;
  font: 400 17px/1 var(--sf); color: var(--text);
  background: rgba(255, 70, 80, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .28);
}
.field input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--red); }
.field input::placeholder { color: var(--text-3); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 70, 80, .1); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .22); }
.seg button {
  height: 38px; border: 0; border-radius: 10px;
  font: 500 15px/1 var(--sf); color: var(--text-2); background: none; cursor: pointer;
  transition: background .25s, color .25s;
}
.seg button[aria-checked="true"] { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #e3262f, #a20d1b); box-shadow: inset 0 0 0 1px rgba(255, 90, 96, .9); }
.looks { display: flex; flex-wrap: wrap; gap: 10px; }
.looks button {
  width: 46px; height: 46px; padding: 0; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--swatch, #444) center/cover; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  transition: transform .3s var(--spring), box-shadow .2s;
}
.looks button[aria-checked="true"] { transform: scale(1.08); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--red); }
.worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.worlds button {
  display: flex; justify-content: space-between; align-items: center;
  height: 44px; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer;
  font: 500 15px/1 var(--sf); color: var(--text-2); background: rgba(255, 70, 80, .08); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .2);
}
.worlds button small { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.worlds button[aria-checked="true"] { color: #fff; box-shadow: inset 0 0 0 1.5px var(--red); background: rgba(255, 60, 70, .18); }
.enter { width: 100%; margin-top: 6px; padding: 15px; font-size: 19px; font-weight: 600; }
.fine { margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-3); text-align: center; }
.welcome-title .tld { display: block; margin-top: 8px; font-size: .4em; letter-spacing: -.02em; }

/* kem108 sign-in gate */
.gate { display: grid; gap: 12px; margin-top: 24px; }
.gate[hidden] { display: none; }
.gate-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-2); text-align: center; text-wrap: balance; }
.gate-btn:disabled { opacity: .55; cursor: default; }
.gate-msg { min-height: 17px; }
.gate-msg.is-error { color: #ff8a80; }
.acct { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 46px; padding: 0 8px 0 16px; border-radius: 14px;
  background: rgba(255, 70, 80, .1); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .28); }
.acct b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px/1 var(--sf); color: var(--text); }
.acct-switch { flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 99px; cursor: pointer;
  font: 500 13px/1 var(--sf); color: var(--text-2); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 90, 96, .35); }
.acct-switch:hover { color: #fff; background: rgba(255, 59, 48, .3); }

/* test log (brain card) */
.log .log-list { margin: 8px 0 0; padding: 0; list-style: none; max-height: 168px; overflow-y: auto; font: 400 12.5px/1.45 var(--sf); color: var(--text-2); font-variant-numeric: tabular-nums; }
.log .log-list li { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 3px 0; border-top: 1px solid rgba(255, 90, 100, .1); }
.log .log-list li:first-child { border-top: 0; }
.log .log-list time { color: var(--text-3); }
.log .log-list .is-response { color: var(--text); }
.log .log-list:empty::before { content: "Nothing yet. Every stimulus you give and every reflex it fires is logged here."; color: var(--text-3); }

/* ---------- nav extras ---------- */
.nav-btn {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; margin-left: 4px;
  border: 0; border-radius: 50%;
  color: #fff; background: rgba(255, 59, 48, .2);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 96, .45);
  cursor: pointer;
  transition: background .2s, transform .3s var(--spring);
}
.nav-btn:hover { background: rgba(255, 59, 48, .34); transform: scale(1.06); }
.nav-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-me { background-size: cover; background-position: center; }

/* ---------- cards ---------- */
.card { position: fixed; z-index: 12; border-radius: 30px; padding: 16px; animation: rise-in .8s var(--ease) both; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .sq { width: 38px; height: 38px; border-radius: 11px; }
.card-head .sq svg { width: 22px; height: 22px; }
.card-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.card-title b { font: 600 17px/1.25 var(--sf); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title small { font-size: 13px; line-height: 1.3; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%;
  color: var(--text-2); background: rgba(255, 70, 80, .12);
  cursor: pointer;
  transition: background .2s, color .2s, transform .35s var(--spring);
}
.icon-btn:hover { color: #fff; background: rgba(255, 70, 80, .24); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.fly-card { left: 16px; top: calc(80px + env(safe-area-inset-top, 0px)); width: 300px; }
.fly-card [data-action="collapse"] svg { transform: rotate(90deg); transition: transform .35s var(--spring); }
.fly-card.is-collapsed [data-action="collapse"] svg { transform: rotate(-90deg); }
.fly-card.is-collapsed .card-body { display: none; }
.card-body { display: grid; gap: 9px; margin-top: 14px; }
.meter { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.meter i { position: relative; height: 6px; border-radius: 99px; background: rgba(255, 90, 100, .16); overflow: hidden; }
.meter b { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #b10d1b, #ff453a); transition: width .5s var(--ease); }
.meter[data-meter="energy"] b, .meter[data-meter="brave"] b { background: linear-gradient(90deg, #9e2a14, #ff7a52); }
.fly-facts { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--text-3); }
.slider { display: grid; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.slider span { display: flex; justify-content: space-between; }
.slider b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: rgba(255, 90, 100, .2); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(255, 90, 100, .2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }

.brain-card { right: 16px; top: calc(80px + env(safe-area-inset-top, 0px)); width: 380px; max-height: calc(100% - 196px); display: flex; flex-direction: column; overflow: hidden; }
.brain-card .spot { min-height: 80px; }
.brain-view { position: relative; flex: none; margin: 12px -4px 0; height: 240px; border-radius: 20px; overflow: hidden; background: radial-gradient(70% 70% at 50% 45%, rgba(80, 0, 10, .55), rgba(0, 0, 0, .7)); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .2); }
.brain-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.brain-tip { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 6px 10px; border-radius: 10px; font-size: 12px; line-height: 1.35; background: rgba(20, 2, 5, .82); color: var(--text); pointer-events: none; }
.brain-stats { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { padding: 8px 10px; border-radius: 14px; background: rgba(255, 70, 80, .08); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .16); }
.stat b { display: block; font: 600 17px/1.2 var(--sf-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat small { font-size: 11px; color: var(--text-3); }
.spot { list-style: none; margin: 10px 0 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1; }
.spot li { display: grid; grid-template-columns: minmax(0, 1fr) 54px 44px; gap: 8px; align-items: center; padding: 7px 4px; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; border-radius: 8px; }
.spot li:hover { background: rgba(255, 70, 80, .08); }
.spot li span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot li small { color: var(--text-3); }
.spot li i { position: relative; height: 5px; border-radius: 99px; background: rgba(255, 90, 100, .14); overflow: hidden; }
.spot li i b { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #c2190e, #ffd2d4); border-radius: inherit; }
.spot li em { font-style: normal; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.neuron-info { margin-top: 10px; padding: 12px; border-radius: 16px; font-size: 13px; line-height: 1.45; background: rgba(255, 70, 80, .08); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .2); }
.neuron-info h4 { margin: 0 0 4px; font: 600 15px/1.3 var(--sf); }
.neuron-info p { margin: 0 0 8px; color: var(--text-2); }
.neuron-info .row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border: 0; border-radius: 99px;
  font: 500 13px/1 var(--sf); color: #fff; text-decoration: none;
  background: rgba(255, 70, 80, .2); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .4);
  cursor: pointer;
}
.chip:hover { background: rgba(255, 70, 80, .32); }
.chip.is-on { background: linear-gradient(180deg, #e3262f, #a20d1b); }

.people-card { right: 16px; top: calc(80px + env(safe-area-inset-top, 0px)); width: 340px; max-height: calc(100% - 200px); display: flex; flex-direction: column; }
.people-list { list-style: none; margin: 12px 0 0; padding: 0; }
.people-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 15px; }
.people-list li small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.people-list .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--c, #e0241b); flex: none; }
.chat-log { flex: 1; min-height: 60px; max-height: 220px; overflow-y: auto; margin-top: 8px; font-size: 14px; line-height: 1.4; }
.chat-log p { margin: 4px 0; color: var(--text-2); }
.chat-log b { color: var(--text); font-weight: 600; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form input { flex: 1; height: 38px; padding: 0 14px; border: 0; border-radius: 99px; font: 400 15px/1 var(--sf); color: var(--text); background: rgba(255, 70, 80, .1); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .28); }
.chat-form input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--red); }
.chat-form .icon-btn { width: 38px; height: 38px; }

/* ---------- camera views ---------- */
.views {
  position: fixed; z-index: 12; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 2px; padding: 5px; border-radius: 99px;
}
.views button {
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px 0 12px;
  border: 0; border-radius: 99px;
  font: 500 14px/1 var(--sf); color: var(--text-2); background: none; cursor: pointer;
  transition: color .2s, background .25s;
}
.views button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.views button[aria-checked="true"] { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #e3262f, #a20d1b); box-shadow: inset 0 0 0 1px rgba(255, 90, 96, .9); }

/* ---------- dock ---------- */
.dock {
  position: fixed; z-index: 12; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; gap: 4px; padding: 8px 10px; border-radius: 30px;
  max-width: calc(100% - 32px);
  animation: dock-in 1s var(--ease) both .15s;
}
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 24px); } }
.dock button {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 74px; padding: 4px 0 2px; border: 0; background: none; cursor: pointer;
  font: 500 11px/1.1 var(--sf); color: var(--text-2); letter-spacing: -.005em;
  transition: transform .35s var(--spring), color .2s;
}
.dock button:hover { transform: translateY(-4px) scale(1.06); color: #fff; }
.dock button:active { transform: scale(.94); }
.dock button[aria-expanded="true"] { color: #fff; }
.dock button[aria-expanded="true"] .app-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 0 0 1.5px #fff, 0 6px 18px rgba(0, 0, 0, .4); }
.dock .app-icon { width: 48px; height: 48px; border-radius: 12px; }
.dock span:last-child { white-space: nowrap; }

.tray {
  position: fixed; z-index: 13; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(620px, calc(100% - 32px));
  padding: 14px; border-radius: 28px;
  animation: tray-in .5s var(--spring) both;
}
@keyframes tray-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.97); } }
.tray h3 { margin: 2px 6px 10px; font: 600 15px/1.2 var(--sf); color: var(--text); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tray h3 small { font: 400 12px/1.3 var(--sf); color: var(--text-3); text-align: right; }
.tray-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.tray-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px 8px; border: 0; border-radius: 16px; cursor: pointer;
  font: 500 12px/1.15 var(--sf); color: var(--text-2); text-align: center;
  background: rgba(255, 70, 80, .07); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .14);
  transition: background .2s, color .2s, transform .3s var(--spring);
}
.tray-grid button:hover { background: rgba(255, 70, 80, .16); color: #fff; transform: translateY(-2px); }
.tray-grid button[aria-pressed="true"] { color: #fff; background: rgba(255, 60, 70, .26); box-shadow: inset 0 0 0 1.5px var(--red); }
.tray-grid .em { font-size: 30px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.tray-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.tray-row input[type=url], .tray-row input[type=text] { flex: 1; min-width: 160px; height: 38px; padding: 0 14px; border: 0; border-radius: 99px; font: 400 15px/1 var(--sf); color: var(--text); background: rgba(255, 70, 80, .1); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .28); }
.tray-row input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--red); }
.tray p { margin: 10px 6px 0; font-size: 12px; line-height: 1.4; color: var(--text-3); }

.hint {
  position: fixed; z-index: 14; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  padding: 9px 16px; border-radius: 99px;
  font: 500 14px/1.2 var(--sf); color: #fff; white-space: nowrap;
  pointer-events: none;
}

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 30; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; width: min(440px, calc(100% - 32px)); }
.toast {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 18px 10px 10px; border-radius: 26px;
  opacity: 0; transform: translateY(-12px) scale(.96);
  transition: opacity .35s ease, transform .55s var(--spring);
}
.toast.is-on { opacity: 1; transform: none; }
.toast .sq { width: 36px; height: 36px; border-radius: 11px; }
.toast-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.toast-title { font: 600 15px/1.3 var(--sf); color: var(--text); }
.toast-body { font-size: 13px; line-height: 1.35; color: var(--text-2); }

/* ---------- sheet (profile) ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); animation: fade-in .3s ease both; }
.sheet-card { width: min(440px, 100%); max-height: calc(100% - 32px); overflow-y: auto; padding: 24px; border-radius: 32px; animation: rise-in .6s var(--ease) both; }
.sheet-card h2 { margin: 0 0 14px; font: 700 26px/1.1 var(--sf-display); letter-spacing: -.03em; }
.sheet-card .profile { margin-top: 0; }
.sheet-close { position: absolute; top: 18px; right: 18px; }

/* name tags over people and flies */
.tag {
  position: fixed; z-index: 5; left: 0; top: 0;
  padding: 4px 10px; border-radius: 99px;
  font: 600 12px/1.2 var(--sf); color: #fff; white-space: nowrap;
  background: rgba(30, 3, 7, .62); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .4);
  pointer-events: none; will-change: transform;
}
.tag small { font-weight: 400; color: var(--text-2); }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; z-index: 99; color: var(--text-2); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .brain-card, .people-card { left: 12px; right: 12px; width: auto; top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); max-height: 56%; }
  .brain-view { height: 200px; }
}
@media (max-width: 640px) {
  :root { --tab: 58px; }
  .nav { padding-left: 14px; }
  .brand span { display: none; }
  .tabs { margin: 0 2px 0 10px; }
  .tabs > a, .tab-lens-row > span { font-size: 13px; }
  .fly-card { left: 12px; right: 12px; width: auto; top: calc(72px + env(safe-area-inset-top, 0px)); padding: 12px 14px; border-radius: 24px; }
  .fly-card .card-body { margin-top: 10px; gap: 7px; }
  .views { left: 12px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .views button span { display: none; }
  .views button { padding: 0 12px; }
  .dock { left: 12px; right: 12px; transform: none; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: none; padding: 7px; border-radius: 24px; animation: none; }
  .dock::-webkit-scrollbar { display: none; }
  .dock button { width: 62px; }
  .dock .app-icon { width: 42px; height: 42px; }
  .tray { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .welcome-card { border-radius: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .dock, .tray, .welcome-card { animation: none; }
}

/* small segmented switch inside tray headers */
.mini-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 70, 80, .1); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .2); }
.mini-seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 99px; font: 500 12px/1 var(--sf); color: var(--text-2); background: none; cursor: pointer; }
.mini-seg button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, #e3262f, #a20d1b); }
.tool-note { text-align: center; }

/* touch controls for walking around as you */
.stick { position: fixed; z-index: 13; left: 24px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); width: 116px; height: 116px; border-radius: 50%; background: rgba(30, 3, 7, .35); box-shadow: inset 0 0 0 1.5px rgba(255, 90, 100, .45); touch-action: none; }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: linear-gradient(180deg, #ff6b61, #c3121c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 14px rgba(0, 0, 0, .4); transition: transform .08s; }
.jump-btn { position: fixed; z-index: 13; right: 24px; bottom: calc(160px + env(safe-area-inset-bottom, 0px)); width: 84px; height: 84px; border: 0; border-radius: 50%; font: 600 15px/1 var(--sf); color: #fff; touch-action: none; }

/* about the brain */
.about { flex: none; margin-top: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 70, 80, .06); box-shadow: inset 0 0 0 1px rgba(255, 90, 100, .16); font-size: 12.5px; line-height: 1.45; color: var(--text-2); max-height: 40vh; overflow-y: auto; }
.about summary { cursor: pointer; font: 600 13px/1.3 var(--sf); color: var(--text); list-style: none; }
.about summary::-webkit-details-marker { display: none; }
.about summary::after { content: ' +'; color: var(--red); }
.about[open] summary::after { content: ' −'; }
.about p { margin: 8px 0 0; }
.about b { color: var(--text); font-weight: 600; }
.about .credits { color: var(--text-3); font-size: 11.5px; }
