:root {
  --bg: #0f0c1d;
  --bg2: #171329;
  --panel: rgba(22, 18, 40, 0.82);
  --panel-solid: #1a1630;
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #f4f2fb;
  --muted: #a8a3c2;
  --accent: #a855f7;
  --accent2: #ec4899;
  --accent3: #f97316;
  --good: #22c55e;
  --bad: #ef4444;
  --gold: #fbbf24;
  --grad: linear-gradient(135deg, #a855f7 0%, #ec4899 55%, #f97316 100%);
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; overflow: hidden; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }

.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; transition: transform .12s, background .2s, opacity .2s; user-select: none; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35); }
.btn.primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn.big { padding: 15px 22px; font-size: 16px; width: 100%; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.good { background: var(--good); color: #fff; }
.btn.bad { background: var(--bad); color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* Start */
#screen-start { display: none; align-items: center; justify-content: center; padding: 20px; }
#screen-start.active { display: flex; }
.start-bg { position: absolute; inset: 0; background:
  radial-gradient(900px 500px at 15% 10%, rgba(168, 85, 247, 0.35), transparent 60%),
  radial-gradient(700px 500px at 90% 30%, rgba(236, 72, 153, 0.28), transparent 60%),
  radial-gradient(800px 600px at 50% 110%, rgba(249, 115, 22, 0.25), transparent 60%), var(--bg); }
.start-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px); background-size: 46px 46px; opacity: .06; }
.start-card { position: relative; width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 32px 28px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.brand h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.brand p { margin: 2px 0 0; }
.brand-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(168, 85, 247, .45); }
.brand-logo svg { width: 30px; height: 30px; stroke: #fff; fill: rgba(255,255,255,.25); }
.lead { line-height: 1.55; color: #d9d5ea; margin: 0 0 22px; }
.start-actions { display: grid; gap: 10px; margin-bottom: 16px; }
.returning { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-bottom: 14px; }
.returning img { width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(160deg, #2a2350, #1a1630); }

/* Editor */
.creator { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 520px); background:
  radial-gradient(800px 600px at 20% 30%, rgba(168, 85, 247, .25), transparent 60%),
  radial-gradient(600px 500px at 30% 90%, rgba(249, 115, 22, .18), transparent 60%), var(--bg); }
.creator-preview { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
#creator-canvas { width: 100%; height: 100%; display: block; }
.preview-actions { position: absolute; bottom: 24px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 0 12px; }
.creator-panel { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.creator-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 8px; }
.creator-head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.field { display: grid; gap: 6px; padding: 8px 24px 12px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input { background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--accent); }
.field small { min-height: 16px; font-size: 12px; }
.field small.bad { color: #fca5a5; }
.tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.tab { padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--text); border-color: var(--accent2); }
.options { flex: 1; overflow-y: auto; padding: 16px 24px 20px; }
.opt-group { margin-bottom: 18px; }
.opt-group h4 { margin: 0 0 9px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 13px; font-weight: 600; transition: all .15s; }
.chip:hover { background: rgba(255,255,255,.1); }
.chip.active { background: rgba(168, 85, 247, .22); border-color: rgba(168, 85, 247, .8); color: #fff; }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); position: relative; transition: transform .12s; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(168, 85, 247, .7); }
.creator-foot { display: flex; gap: 10px; padding: 16px 24px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); }
.creator-foot .primary { flex: 1; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.switch { width: 46px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* Spiel */
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.hud-top { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.scene-card { padding: 10px 14px; min-width: 150px; }
.scene-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.scene-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.scene-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #777; }
.dot.online { background: var(--good); box-shadow: 0 0 8px var(--good); }
.dot.offline { background: var(--gold); }
.dot.reconnecting { background: var(--bad); }
.hud-buttons { display: flex; gap: 8px; }
.icon-btn { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; transition: background .2s; }
.icon-btn:hover { background: rgba(60, 50, 100, .9); }
.icon-btn.off { color: var(--muted); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent2); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.hud-meters { position: absolute; top: calc(98px + var(--safe-t)); left: 12px; padding: 10px 14px; width: 190px; display: grid; gap: 10px; }
.meter-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.meter-label b { color: var(--text); }
.meter-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #fbbf24 45%, #ef4444); transition: width .4s; }
.bar.bladder i { background: linear-gradient(90deg, #38bdf8, #a855f7 60%, #ef4444); }
.meter.warn .meter-sub { color: #fca5a5; font-weight: 700; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.hud-actions { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); display: flex; gap: 6px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.act { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 12px; border-radius: 14px; font-size: 11px; font-weight: 600; color: #dcd8ee; min-width: 64px; transition: background .15s; }
.act:hover { background: rgba(255,255,255,.08); }
.act.on { background: var(--grad); color: #fff; }
.act:disabled { opacity: .35; }
.act svg { width: 22px; height: 22px; }
.action-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); padding: 8px 14px; border-radius: 12px; background: rgba(0,0,0,.6); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }

/* Modal */
#modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.modal-wrap { position: absolute; inset: 0; background: rgba(5, 3, 15, .55); display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: auto; animation: fade .18s; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: min(86vh, 760px); overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; animation: pop .2s; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.01em; }
.modal .sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.close-x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); flex: none; }
.floor-list { display: grid; gap: 10px; }
.floor-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); text-align: left; transition: all .15s; width: 100%; }
.floor-card:hover { background: rgba(255,255,255,.09); border-color: var(--line2); transform: translateY(-1px); }
.floor-card.current { border-color: rgba(168,85,247,.7); }
.floor-num { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.floor-num.pool { background: linear-gradient(135deg, #22d3ee, #f59e0b); }
.floor-num.lounge { background: linear-gradient(135deg, #92400e, #f59e0b); }
.floor-num.disco { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.floor-num.outside { background: linear-gradient(135deg, #15803d, #4ade80); }
.floor-info { flex: 1; }
.floor-info b { display: block; font-size: 16px; }
.floor-info span { font-size: 13px; color: var(--muted); }
.floor-count { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.floor-count::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.drink-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drink { padding: 14px 8px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); display: grid; justify-items: center; gap: 6px; transition: all .15s; }
.drink:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.drink .glass { width: 30px; height: 38px; border-radius: 3px 3px 8px 8px; border: 2px solid rgba(255,255,255,.6); position: relative; overflow: hidden; }
.drink .glass i { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; }
.drink b { font-size: 14px; }
.drink span { font-size: 11px; color: var(--muted); text-align: center; }
.track-list { display: grid; gap: 8px; }
.track { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); text-align: left; width: 100%; }
.track:hover { background: rgba(255,255,255,.09); }
.track.active { border-color: rgba(236,72,153,.8); background: rgba(236,72,153,.12); }
.track .disc { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle, #ec4899 0 18%, #111 19% 100%); flex: none; }
.track.active .disc { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.track-info { flex: 1; }
.track-info b { display: block; }
.track-info span { font-size: 12px; color: var(--muted); }
.board-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.board-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.board-col h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.board-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.board-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.board-table td:first-child { width: 26px; color: var(--muted); font-weight: 700; }
.board-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.board-table tr.me td { color: #f9a8d4; }
.stars { color: var(--gold); letter-spacing: 1px; }
.tag { display: inline-block; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.1); color: var(--muted); margin-left: 4px; vertical-align: 1px; letter-spacing: .04em; }
.tag.online { background: rgba(34,197,94,.18); color: #86efac; }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.profile-head img { width: 76px; height: 76px; border-radius: 18px; background: linear-gradient(160deg, #2a2350, #1a1630); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); text-align: center; }
.stat b { display: block; font-size: 16px; }
.stat span { font-size: 11px; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); margin-bottom: 8px; }
.contact-row img { width: 44px; height: 44px; border-radius: 12px; background: #2a2350; }
.contact-row .ci { flex: 1; }
.contact-row .ci span { display: block; font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; font-size: 14px; }
.range { width: 100%; accent-color: var(--accent2); }

/* Chat */
#chat-dock { position: absolute; right: 12px; bottom: calc(14px + var(--safe-b)); width: 360px; max-width: calc(100vw - 24px); pointer-events: none; }
#chat-dock > * { pointer-events: auto; }
.chat { display: flex; flex-direction: column; height: min(520px, calc(100vh - 140px)); background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; animation: pop .2s; }
.chat.min { height: auto; }
.chat.min .chat-body, .chat.min .chat-tools, .chat.min .chat-input { display: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chat-head img { width: 40px; height: 40px; border-radius: 12px; background: #2a2350; }
.chat-title { flex: 1; min-width: 0; }
.chat-title b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title span { font-size: 12px; color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.07); }
.timer.low { color: #fca5a5; background: rgba(239,68,68,.15); }
.timer.friend { color: #86efac; background: rgba(34,197,94,.15); font-size: 12px; }
.chat-progress { height: 3px; background: rgba(255,255,255,.06); }
.chat-progress i { display: block; height: 100%; background: var(--grad); transition: width 1s linear; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, #9333ea, #db2777); border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: rgba(255,255,255,.08); border-bottom-left-radius: 5px; }
.msg .drunk-note { display: block; font-size: 10.5px; opacity: .75; margin-top: 4px; font-style: italic; }
.msg.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; text-align: center; padding: 2px 8px; max-width: 95%; }
.typing { align-self: flex-start; font-size: 12px; color: var(--muted); padding: 2px 6px; }
.chat-tools { display: flex; gap: 6px; padding: 8px 10px 0; }
.chat-tools .btn { flex: 1; padding: 8px 6px; font-size: 12px; }
.chat-input { display: flex; gap: 8px; padding: 10px; }
.chat-input input { flex: 1; min-width: 0; background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 12px; padding: 11px 12px; outline: none; font-size: 15px; }
.chat-input input:focus { border-color: var(--accent); }
.chat-input .btn { padding: 10px 14px; }
.decide { padding: 18px 16px; display: grid; gap: 14px; text-align: center; }
.decide h4 { margin: 0; font-size: 17px; }
.decide p { margin: 0; color: var(--muted); font-size: 13px; }
.yn { display: flex; gap: 14px; justify-content: center; }
.yn button { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; border: 2px solid transparent; transition: all .15s; }
.yn button svg { width: 34px; height: 34px; stroke-width: 3; }
.yn .no { background: rgba(239,68,68,.15); color: #ef4444; }
.yn .yes { background: rgba(34,197,94,.15); color: #22c55e; }
.yn .no.sel { background: #ef4444; color: #fff; transform: scale(1.06); }
.yn .yes.sel { background: #22c55e; color: #fff; transform: scale(1.06); }
.star-row { display: flex; justify-content: center; gap: 6px; }
.star-row button { font-size: 34px; color: rgba(255,255,255,.18); transition: transform .1s, color .1s; line-height: 1; }
.star-row button.on { color: var(--gold); }
.star-row button:hover { transform: scale(1.12); }
.star-label { font-size: 13px; color: var(--gold); font-weight: 700; min-height: 18px; }
.result-big { font-size: 46px; line-height: 1; }

/* Wetttrinken */
.contest { text-align: center; }
.contest .lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.lane b { display: block; margin-bottom: 8px; font-size: 14px; }
.beer { height: 160px; width: 74px; margin: 0 auto; border: 3px solid rgba(255,255,255,.7); border-top: 0; border-radius: 0 0 14px 14px; position: relative; overflow: hidden; background: rgba(255,255,255,.04); }
.beer i { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background: linear-gradient(#fff 0 10px, #f2b632 10px); transition: height .1s; }
.tap-btn { width: 100%; padding: 22px; font-size: 20px; font-weight: 800; border-radius: 18px; background: var(--grad); color: #fff; user-select: none; touch-action: manipulation; }
.tap-btn:active { transform: scale(.97); }
.countdown { font-size: 54px; font-weight: 800; margin: 10px 0; }

/* Toasts */
#toasts { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toast { background: rgba(20, 16, 36, .94); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 14px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: pop .2s; text-align: center; }
.toast.good { border-color: rgba(34,197,94,.5); }
.toast.bad { border-color: rgba(239,68,68,.5); }
.toast.warn { border-color: rgba(251,191,36,.5); }

/* Anfrage-Popup */
.request { position: fixed; left: 50%; top: calc(80px + var(--safe-t)); transform: translateX(-50%); z-index: 70; width: min(380px, calc(100vw - 24px)); background: var(--panel-solid); border: 1px solid rgba(168,85,247,.6); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; animation: pop .25s; }
.request img { width: 52px; height: 52px; border-radius: 14px; background: #2a2350; }
.request .ri { flex: 1; min-width: 0; }
.request .ri b { display: block; }
.request .ri span { font-size: 12px; color: var(--muted); }
.request .ra { display: flex; gap: 6px; }
.request .ra button { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.request .ra .yes { background: var(--good); }
.request .ra .no { background: rgba(255,255,255,.1); }

#faint-overlay, #toilet-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30; }
#faint-overlay { background: radial-gradient(circle, rgba(20,0,30,.55), rgba(0,0,0,.92)); backdrop-filter: blur(4px); }
#toilet-overlay { background: rgba(10,10,20,.6); }
.faint-box { text-align: center; padding: 24px; display: grid; gap: 8px; width: min(420px, 92vw); }
.faint-title { font-size: 26px; font-weight: 800; }
.faint-sub { color: var(--muted); }
.faint-time { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; }
#rotate-hint { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); padding: 8px 14px; border-radius: 10px; font-size: 12px; z-index: 40; }

/* Mobil */
@media (max-width: 820px) {
  .creator { grid-template-columns: 1fr; grid-template-rows: 38vh 1fr; }
  .creator-panel { border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; min-height: 0; }
  .preview-actions { bottom: 8px; }
  .chip { padding: 7px 10px; }
  .creator-head { padding: 16px 18px 4px; }
  .field, .tabs, .options, .creator-foot { padding-left: 18px; padding-right: 18px; }
  .board-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hud-meters { width: 150px; padding: 8px 10px; top: calc(86px + var(--safe-t)); gap: 7px; }
  .scene-card { padding: 8px 12px; min-width: 0; }
  .scene-name { font-size: 15px; }
  .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
  .hud-buttons { gap: 6px; }
  .act { min-width: 54px; padding: 7px 6px; font-size: 10px; }
  .act svg { width: 20px; height: 20px; }
  .hud-actions { gap: 2px; padding: 5px; }
  #chat-dock { left: 8px; right: 8px; width: auto; bottom: calc(8px + var(--safe-b)); max-width: none; }
  .chat { height: min(70vh, 520px); }
  .meter-sub { display: none; }
  .drink-grid { grid-template-columns: repeat(2, 1fr); }
  .action-hint { bottom: calc(82px + var(--safe-b)); white-space: normal; text-align: center; width: max-content; max-width: 90vw; }
}
@media (max-height: 520px) {
  .hud-meters { display: none; }
  .chat { height: calc(100vh - 30px); }
}
