:root {
  --ink: #fff6e8;
  --ink-2: rgba(255, 246, 232, 0.7);
  --chip: rgba(36, 24, 30, 0.72);
  --chip-hover: rgba(60, 40, 46, 0.85);
  --accent: #c4683f;
  --accent-2: #dea13a;
  --line: rgba(255, 230, 200, 0.16);
  --card: rgba(38, 26, 32, 0.86);
  --field: rgba(255, 245, 230, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #2a1c24;
  font-family: Fredoka, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
[hidden] { display: none !important; }
#game { position: fixed; inset: 0; display: block; touch-action: none; }
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(20, 8, 14, 0.35) 100%);
}

/* ---------- HUD ---------- */
.hud { position: fixed; display: flex; gap: 8px; align-items: center; z-index: 3; }
.top-left { top: 16px; left: 16px; flex-direction: column; align-items: flex-start; gap: 6px; }
.top-right { top: 16px; right: 16px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 32px); }
.brand { font-family: Pacifico, cursive; font-size: 22px; text-shadow: 0 2px 10px rgba(0,0,0,0.45); }
.brand .cup { font-family: system-ui; font-size: 18px; }
.pill, button {
  background: var(--chip); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pill { padding: 4px 12px; font-size: 13px; }
button {
  font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
  padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
button:hover { background: var(--chip-hover); }
button:active { transform: translateY(1px); }
button.on { background: var(--accent); border-color: transparent; }
button i { font-style: normal; opacity: 0.9; }
.avatar-btn { padding: 2px 12px 2px 3px; }
.avatar-btn canvas { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,240,220,0.15); }
.hint {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 10px);
  background: var(--chip); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px; opacity: 0; transition: opacity 0.4s, transform 0.4s;
  pointer-events: none; max-width: calc(100vw - 32px); text-align: center; z-index: 3;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hint.show { opacity: 1; transform: translate(-50%, 0); }

/* popovers */
.pop-wrap { position: relative; }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 10px;
}
.pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pop-head small { color: var(--ink-2); font-size: 12px; }
.mini { padding: 3px 10px; font-size: 12px; }
.mix { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.menu-item { border-radius: 10px; justify-content: flex-start; background: transparent; border-color: transparent; }
.menu-item:hover { background: rgba(255,240,220,0.08); }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px;
  background: rgba(30, 18, 24, 0.25);
  backdrop-filter: blur(6px) saturate(1.05); -webkit-backdrop-filter: blur(6px) saturate(1.05);
  opacity: 0; transition: opacity 0.35s;
  overflow-y: auto; user-select: auto;
}
.overlay.show { opacity: 1; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 30px 80px rgba(10, 4, 8, 0.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: translateY(10px) scale(0.98); transition: transform 0.35s;
}
.overlay.show .card { transform: none; }

.login-card { width: min(380px, 100%); padding: 28px 28px 20px; display: flex; flex-direction: column; gap: 14px; }
.logo { font-family: Pacifico, cursive; font-size: 34px; text-align: center; }
.tagline { margin: -8px 0 4px; text-align: center; color: var(--ink-2); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--field); border-radius: 999px; padding: 3px; }
.tabs button { background: transparent; border: 0; justify-content: center; backdrop-filter: none; }
.tabs button.active { background: var(--accent); }
form { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
input:not([type=range]) {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
input:not([type=range]):focus { border-color: var(--accent-2); background: rgba(255,245,230,0.12); }
.form-msg { min-height: 18px; font-size: 13px; color: #ffb3a0; text-align: center; }
.form-msg.ok { color: #b9e6b0; }
.primary {
  background: linear-gradient(180deg, #d4774c, #b85d36); border-color: transparent;
  justify-content: center; padding: 11px 18px; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(196, 104, 63, 0.35);
}
.primary:hover { background: linear-gradient(180deg, #df8457, #c4683f); }
.link { background: none; border: 0; justify-content: center; color: var(--ink-2); backdrop-filter: none; }
.link:hover { color: var(--ink); background: none; text-decoration: underline; }
.fine { margin: 0; font-size: 11px; color: rgba(255,246,232,0.45); text-align: center; }

/* creator */
.creator-card { width: min(880px, 100%); display: grid; grid-template-columns: 300px 1fr; gap: 0; overflow: hidden; }
.cc-left { padding: 24px; display: flex; flex-direction: column; gap: 12px; background: rgba(255,240,220,0.04); border-right: 1px solid var(--line); }
.cc-left h2 { margin: 0; font-weight: 600; font-size: 20px; }
.cc-stage {
  position: relative; height: 280px; border-radius: 18px;
  background: radial-gradient(ellipse at 50% 85%, rgba(222,161,58,0.28), transparent 60%), linear-gradient(180deg, #3a2a30, #2c1f26);
  border: 1px solid var(--line);
}
#cc-preview { width: 100%; height: 100%; display: block; }
.round { position: absolute; bottom: 10px; width: 36px; height: 36px; padding: 0; justify-content: center; font-size: 18px; }
#cc-left { left: 10px; } #cc-right { right: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--field); border-radius: 999px; padding: 3px; }
.seg button { background: transparent; border: 0; justify-content: center; backdrop-filter: none; }
.seg button.sel { background: rgba(255,240,220,0.16); }
.cc-right { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; max-height: min(640px, calc(100vh - 32px)); }
#cc-options { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.cc-row { display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center; }
.cc-label { font-size: 13px; color: var(--ink-2); }
.cc-items { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  width: 28px; height: 28px; padding: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18); backdrop-filter: none;
}
.swatch:hover { transform: scale(1.08); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.chip { padding: 5px 12px; background: var(--field); backdrop-filter: none; }
.chip.sel { background: var(--accent); border-color: transparent; }
.cc-actions { display: flex; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.grow { flex: 1; }

@media (max-width: 720px) {
  button span { display: none; }
  .avatar-btn span { display: none; }
  .brand { font-size: 18px; }
  .creator-card { grid-template-columns: 1fr; }
  .cc-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .cc-stage { height: 200px; }
  .cc-row { grid-template-columns: 1fr; gap: 4px; }
  .cc-right { max-height: none; }
}

/* =================== v3 additions =================== */
.icon { width: 32px; height: 32px; padding: 0; justify-content: center; font-size: 15px; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
button:disabled { opacity: 0.45; cursor: default; }
.bean { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.bean-icon { display: inline-block; width: 18px; height: 18px; vertical-align: -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='12' rx='7.5' ry='10' transform='rotate(35 12 12)' fill='%238a5232' stroke='%234a2a18' stroke-width='1.3'/%3E%3Cpath d='M8.2 17.5c3.2-2.4 1.2-6.6 4.4-9.4 1.3-1.1 2.5-1.5 3.4-1.6' fill='none' stroke='%23f1c48a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* stats chips (level + beans) */
.stats { display: flex; gap: 6px; }
.stat { padding: 4px 10px; gap: 7px; font-size: 13px; }
.stat.level b { font-weight: 600; }
.stat .bar { width: 64px; }
.stat small { color: var(--ink-2); font-size: 11px; }
.bar { display: inline-block; height: 6px; border-radius: 99px; background: rgba(255,240,220,0.14); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), #f3c46a); transition: width 0.6s; }
.bar.big { height: 9px; width: 220px; }
.stat.beans b { font-variant-numeric: tabular-nums; }
.stat.pulse { animation: pulse 0.6s; }
@keyframes pulse { 40% { transform: scale(1.12); background: rgba(222,161,58,0.55); } }

/* scrollbars */
.scrollbar { position: fixed; z-index: 2; opacity: 0.35; transition: opacity 0.3s; }
.scrollbar.active, .scrollbar:hover { opacity: 1; }
.scrollbar.sx { left: 12px; right: 18px; bottom: 4px; height: 8px; }
.scrollbar.sy { top: 12px; bottom: 18px; right: 4px; width: 8px; }
.scrollbar i { position: absolute; display: block; border-radius: 99px; background: rgba(255,240,220,0.55); box-shadow: 0 0 0 1px rgba(40,20,20,0.35); cursor: grab; }
.scrollbar.sx i { top: 0; bottom: 0; }
.scrollbar.sy i { left: 0; right: 0; }
.scrollbar i:active { cursor: grabbing; background: rgba(255,240,220,0.85); }
.zoom { position: fixed; right: 18px; bottom: 22px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }

/* focus dock */
.dock { position: fixed; left: 16px; top: 132px; z-index: 3; width: 300px; max-height: calc(100vh - 160px); display: flex; flex-direction: column; }
.dock-pill { display: none; align-self: flex-start; font-variant-numeric: tabular-nums; }
.dock.collapsed .dock-pill { display: inline-flex; }
.dock.collapsed .dock-card { display: none; }
.dock.running .dock-pill { background: var(--accent); border-color: transparent; }
.dock-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); min-height: 0; }
.dock-tabs { display: flex; gap: 4px; }
.dock-tabs button { flex: 1; justify-content: center; background: transparent; border-color: transparent; backdrop-filter: none; }
.dock-tabs button.active { background: rgba(255,240,220,0.12); }
.dock-tabs .icon { flex: 0 0 32px; }
.count { background: var(--accent); border-radius: 99px; padding: 0 6px; font-size: 11px; }
.count:empty { display: none; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--field); border-radius: 99px; padding: 3px; }
.modes button { background: transparent; border: 0; justify-content: center; font-size: 12px; padding: 5px 4px; backdrop-filter: none; }
.modes button.active { background: rgba(255,240,220,0.16); }
.dock[data-mode="focus"] .modes button.active { background: var(--accent); }
.dock[data-mode="short"] .modes button.active, .dock[data-mode="long"] .modes button.active { background: #3f8f6a; }
.ring-wrap { position: relative; width: 168px; height: 168px; margin: 4px auto 0; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,240,220,0.1); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent-2); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.9s linear; }
.dock[data-mode="short"] .ring-fg, .dock[data-mode="long"] .ring-fg { stroke: #6fc79a; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.t-time { font-size: 38px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.t-sub { font-size: 12px; color: var(--ink-2); }
.adjust { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.adjust .icon { width: 26px; height: 26px; }
.working { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; }
.working select { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.working select option { color: #222; }
.controls { display: flex; gap: 8px; align-items: center; justify-content: center; }
.controls .primary { flex: 1; }
.controls .primary.running { background: linear-gradient(180deg, #5e8f78, #3f6f5a); box-shadow: none; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,240,220,0.18); }
.dots i.on { background: var(--accent-2); }
.tasks { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
#task-form { flex-direction: row; gap: 6px; }
#task-form input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; }
#task-form .primary { padding: 8px 12px; font-size: 13px; box-shadow: none; }
#task-list, #task-done { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 46vh; }
.task { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border-radius: 10px; font-size: 14px; transition: background 0.2s, opacity 0.25s, transform 0.25s; }
.task:hover { background: rgba(255,240,220,0.06); }
.task.current { background: rgba(222,161,58,0.16); }
.task .check { width: 20px; height: 20px; padding: 0; border-radius: 6px; justify-content: center; font-size: 12px; background: transparent; border: 1.5px solid rgba(255,240,220,0.45); flex: none; backdrop-filter: none; }
.task.done .check { background: #3f8f6a; border-color: transparent; }
.task .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: text; outline: none; }
.task.done .txt { text-decoration: line-through; color: var(--ink-2); }
.task .act { opacity: 0; width: 24px; height: 24px; padding: 0; justify-content: center; font-size: 12px; background: transparent; border-color: transparent; backdrop-filter: none; }
.task:hover .act { opacity: 0.8; }
.task.pop { opacity: 0; transform: translateX(10px); }
.empty { color: var(--ink-2); font-size: 13px; padding: 8px 4px; }

/* toasts + bean pops */
#toasts { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 9; pointer-events: none; align-items: center; }
.toast { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35); opacity: 0; transform: translateY(-8px); transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: none; }
.toast.done { border-color: rgba(111,199,154,0.6); }
.toast.level { border-color: rgba(243,196,106,0.8); background: linear-gradient(180deg, rgba(120,80,30,0.9), rgba(60,40,20,0.9)); }
.bean-pop { position: fixed; z-index: 4; pointer-events: none; font-weight: 600; font-size: 15px; color: #ffe7b0; text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  transform: translate(-50%, 0); animation: beanup 1.7s ease-out forwards; }
@keyframes beanup { 0% { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -38px); } }

/* creator v2 */
.cc-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--field); border-radius: 999px; padding: 3px; }
.cc-tabs button { background: transparent; border: 0; justify-content: center; backdrop-filter: none; }
.cc-tabs button.sel { background: var(--accent); }
.chip.locked { border-style: dashed; }
.chip small { opacity: 0.85; font-size: 11px; }
.lock-note { font-size: 13px; color: #ffe2a8; background: rgba(222,161,58,0.14); border: 1px solid rgba(222,161,58,0.35); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-right { min-height: 520px; }

/* profile + shop */
.close { position: absolute; right: 14px; top: 14px; }
.profile-card, .shop-card { position: relative; padding: 26px; width: min(560px, 100%); display: flex; flex-direction: column; gap: 16px; }
.shop-card { width: min(760px, 100%); }
.profile-card h2, .shop-card h2 { margin: 0; font-weight: 600; }
.pf-head { display: flex; gap: 18px; align-items: center; }
#pf-avatar { width: 112px; height: 112px; border-radius: 24px; background: radial-gradient(circle at 50% 70%, rgba(222,161,58,0.3), rgba(255,240,220,0.06)); flex: none; }
.pf-head > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-level { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.lv-badge { background: linear-gradient(180deg, #f3c46a, #c98a2c); color: #3a2410; border-radius: 10px; padding: 2px 9px; font-size: 14px; }
.pf-beans { font-size: 15px; display: flex; gap: 6px; align-items: center; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-stats div { background: var(--field); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.pf-stats span { font-size: 12px; color: var(--ink-2); }
.pf-stats b { font-size: 17px; font-weight: 600; }
.pf-how { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.pf-actions { display: flex; gap: 8px; align-items: center; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 60vh; overflow-y: auto; }
.shop-item { background: var(--field); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.shop-item canvas { width: 88px; height: 88px; }
.shop-item .si-name { font-size: 14px; }
.si-tag { font-size: 11px; color: #ffb3a0; background: rgba(200,50,58,0.2); border-radius: 99px; padding: 1px 8px; }
.shop-item button { width: 100%; justify-content: center; }
.shop-item.owned { border-color: rgba(111,199,154,0.5); }
.shop-item.soon { opacity: 0.7; }
.shake { animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 720px) {
  .dock { top: auto; bottom: 16px; width: calc(100vw - 80px); }
  .stat .bar, .stat small { display: none; }
  .pf-stats { grid-template-columns: 1fr 1fr; }
  .zoom { bottom: 80px; }
}
#cc-options { flex: 1; }
.scrollbar { opacity: 0.6; }

/* v4: order + store */
.stat.order { gap: 6px; }
.stat.order.has { background: rgba(63,143,106,0.85); border-color: transparent; }
.stat.order.waiting { background: var(--accent); border-color: transparent; }
.stat i { font-style: normal; }
.shop-tabs { margin-top: -4px; }
.order-card { position: relative; padding: 24px; width: min(560px, 100%); display: flex; flex-direction: column; gap: 12px; }
.order-card h2 { margin: 0; font-weight: 600; }
.order-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 62vh; overflow-y: auto; }
.order-item { border-radius: 16px; padding: 8px 12px 8px 6px; justify-content: flex-start; text-align: left; gap: 8px; background: var(--field); }
.order-item:hover { background: rgba(255,240,220,0.14); }
.order-item canvas { width: 44px; height: 44px; flex: none; }
.oi-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.oi-text small { color: var(--ink-2); font-size: 11px; }
.oi-price { font-weight: 600; white-space: nowrap; }
.order-item.festive { border-color: rgba(200,50,58,0.55); }
.order-item.poor { opacity: 0.5; }
@media (max-width: 720px) { .order-list { grid-template-columns: 1fr; } }

/* ---- online: connection dot, room name, chat ---- */
#net { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: #9a958f; }
#net[data-state="online"] { background: #6fcf8f; box-shadow: 0 0 6px #6fcf8f; }
#net[data-state="connecting"], #net[data-state="reconnecting"] { background: #e3a63f; animation: netpulse 1s infinite alternate; }
#net[data-state="offline"], #net[data-state="signed-out"] { background: #c9684a; }
@keyframes netpulse { to { opacity: 0.35; } }
#room:not(:empty)::after { content: " · "; }
.chat { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(420px, calc(100vw - 140px)); z-index: 3; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.chat ul { list-style: none; margin: 0; padding: 0 4px; max-height: 132px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; opacity: 0; transition: opacity .4s; scrollbar-width: none; }
.chat.fresh ul, .chat:focus-within ul, .chat:hover ul { opacity: 1; pointer-events: auto; }
.chat li { align-self: flex-start; max-width: 100%; background: rgba(43,28,44,0.72); color: #fbf3e6; border-radius: 12px; padding: 3px 10px; font-size: 13px; line-height: 1.35; backdrop-filter: blur(6px); word-wrap: break-word; }
.chat li.old { opacity: 0.7; }
.chat li.me { background: rgba(196,104,63,0.88); }
.chat li b { font-weight: 600; color: #f3d7a0; margin-right: 2px; }
.chat li.me b { color: #fff4e0; }
.chat form { pointer-events: auto; }
.chat input { width: 100%; box-sizing: border-box; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: inherit; padding: 8px 14px; font: inherit; font-size: 13px; }
body:has(#chat:not([hidden])) .hint { bottom: 64px; }
.toast button { pointer-events: auto; margin-left: 6px; }
.toast button.link { background: none; border: none; color: #f3c46a; text-decoration: underline; padding: 0; font: inherit; cursor: pointer; }
