/* RAIDLOOP site: same palette as the game (scripts/ui/ui_theme.gd) */
@font-face { font-family: "Jersey 10"; src: url("../fonts/Jersey10-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("../fonts/PixelifySans-Medium.ttf") format("truetype"); font-display: swap; }
:root {
  --bg: #0e0e10; --panel: #161618; --panel2: #222225; --border: #36363b;
  --gold: #e8c66a; --gold-dk: #c9a227; --text: #e6e1d3; --muted: #aaa8a2;
  --green: #5fd37c; --red: #e05757;
  --pixel: "Jersey 10", "Pixelify Sans", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--gold); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; margin: 0 0 .5em; color: var(--gold); line-height: 1.1; }
h1 { font-size: 2.6rem; } h2 { font-size: 2rem; } h3 { font-size: 1.5rem; color: var(--text); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.dim { color: var(--muted); } .small { font-size: .875rem; }

/* header */
.top { background: #0b0b0c; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font: 1.9rem/1 var(--pixel); letter-spacing: .04em; }
.brand img { image-rendering: pixelated; border-radius: 6px; }
.links { display: flex; gap: 4px; flex: 1; }
.links a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.links a:hover { background: var(--panel2); color: var(--gold); }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who form { margin: 0; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; color: var(--text); }
.icon-link:hover { background: var(--panel2); color: #5865f2; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; min-height: 36px; }
.chip img { border-radius: 50%; }
.chip-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 8px; }
.chip img + .chip-name { padding-left: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); text-decoration: none; font: 1.25rem/1 var(--pixel); letter-spacing: .04em; cursor: pointer; }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn.gold { background: linear-gradient(#f0d27c, #c9a227); border-color: #8a6d12; color: #1a1405; }
.btn.gold:hover { background: linear-gradient(#f8de90, #d8b23a); color: #1a1405; }
.btn.ghost { background: transparent; }
.btn.big { min-height: 52px; padding: 0 28px; font-size: 1.5rem; }
.btn.prov.discord { background: #5865f2; border-color: #4752c4; color: #fff; }
.btn.prov.google { background: #fff; border-color: #ddd; color: #1f1f1f; }

/* hero */
.hero { text-align: center; padding: 24px 0 8px; background: radial-gradient(ellipse at 50% 0, #2a2112 0, var(--bg) 70%); }
.splash { width: 100%; max-width: 720px; image-rendering: pixelated; margin: 0 auto; display: block; -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse at 50% 50%, #000 62%, transparent 100%); }
.lead { font-size: 1.15rem; max-width: 36rem; margin: 8px auto 20px; color: var(--text); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.state { min-height: 32px; margin-bottom: 16px; }
.state.left { text-align: left; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-size: .9rem; }
.badge i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.badge.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.badge.off i { background: var(--red); }

/* blocks */
.block { padding: 36px 16px; }
.block.narrow { max-width: 760px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card, .panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.card p { margin: 0; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.two > * { min-width: 0; }
.more { display: inline-block; padding: 10px 0; min-height: 44px; }

/* table */
.scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); margin-bottom: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 1.1rem/1 var(--pixel); color: var(--gold); background: #0f0f10; }
.table .num { text-align: right; width: 1%; }
.table .hname { color: var(--text); font-weight: 600; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 16px; border: 1px dashed var(--border); border-radius: 8px; }

/* news */
.note { border-left: 3px solid var(--gold-dk); padding: 2px 0 2px 14px; margin-bottom: 20px; }
.note time { color: var(--muted); font-size: .8rem; }
.note h3 { margin: 2px 0 4px; } .note p { margin: 0; color: var(--muted); }

/* login */
.login .stack { display: grid; gap: 10px; margin: 18px 0; }
.msg { padding: 10px 14px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--border); }
.msg.err { border-color: #7a2e2e; color: #f0a0a0; background: #2a1414; }

.foot { border-top: 1px solid var(--border); padding: 20px 0; margin-top: 24px; color: var(--muted); font-size: .875rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 720px) {
  h1 { font-size: 2.1rem; } h2 { font-size: 1.7rem; }
  .bar { gap: 8px 12px; }
  .links { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .who { margin-left: auto; }
  .two { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .btn.big { flex: 1 1 100%; }
  .block { padding: 28px 16px; }
  .table th, .table td { padding: 9px 8px; }
  .table .hname { max-width: 12ch; }
}

/* shop */
.shop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.shop-head h1 { margin-bottom: .2em; }
.balance { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px; font: 1.5rem/1 var(--pixel); color: var(--gold); }
.balance span { font-size: 1rem; color: var(--muted); font-family: system-ui, sans-serif; }
.gem { display: inline-block; vertical-align: -3px; image-rendering: pixelated; }
.shop-head + .msg, .msg + .msg { margin-top: 8px; }
.msg.ok { border-color: #2d6b3d; color: #a6e8b9; background: #11261a; }
.block h2 { margin-top: 1.4em; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 12px; }
.pack { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 18px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pack-gems { font: 2.2rem/1 var(--pixel); color: var(--gold); display: flex; align-items: center; gap: 8px; }
.pack-gems .gem { width: 28px; height: 28px; vertical-align: 0; }
.pack-name { color: var(--text); }
.pack-bonus { color: var(--green); font-size: .85rem; min-height: 1.3em; }
.pack-price { font: 1.4rem/1 var(--pixel); color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.pack form { width: 100%; margin: 0; } .pack .btn { width: 100%; }
.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.item { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; }
.item h3 { margin: 6px 0 4px; } .item p { flex: 1; font-size: .9rem; }
.item-top { display: flex; justify-content: space-between; align-items: center; }
.tag { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 8px; }
.price { font: 1.3rem/1 var(--pixel); color: var(--gold); }
.redeem { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.redeem .btn { width: 100%; }
.redeem select { min-height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; font: inherit; min-width: 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.table .pos { color: var(--green); } .table .neg { color: var(--red); }
.state-delivered { color: var(--green); } .state-pending { color: var(--gold); } .state-failed, .state-refunded { color: var(--muted); }
@media (max-width: 720px) { .packs { grid-template-columns: 1fr 1fr; } .pack-gems { font-size: 1.8rem; } }

/* home: animated captures */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.shot.pixel img { image-rendering: pixelated; }
.shot figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); text-align: center; }
.shot.lane { max-width: 760px; margin: 8px auto 20px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: center; padding-top: 36px; padding-bottom: 36px; }
.feature > * { min-width: 0; }
.feature.flip .feature-text { order: 2; }
.feature-text p { color: var(--muted); font-size: 1.05rem; }
.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 22px; }
.points li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
@media (max-width: 720px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 24px; padding-bottom: 24px; }
  .feature.flip .feature-text { order: 0; }
  .feature .shot { order: 2; }
}

/* money: number + coin icon, never letters (docs/RULES.md rule 1; partials/money.blade.php) */
.money { display: inline-flex; align-items: center; gap: 2px 4px; white-space: nowrap; }
.money b { font-weight: 600; }
.coin { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45), inset 0 -.2em 0 rgba(0, 0, 0, .18); }
.coin.g { background: #e8c66a; } .coin.s { background: #c3c7cf; } .coin.c { background: #b87333; }

/* admin panel (/admin) */
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.kpi { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 0; }
a.kpi:hover { border-color: var(--gold); }
.kpi .k { display: block; color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.kpi .v { display: block; margin-top: 4px; font: 1.7rem/1.1 var(--pixel); color: var(--gold); overflow-wrap: anywhere; }
.kpi .v small { font: .8rem/1.2 system-ui, sans-serif; color: var(--muted); }
.search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.search input { flex: 1 1 220px; min-height: 44px; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0 12px; font: inherit; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.mono { font-family: ui-monospace, monospace; font-size: .85rem; }
.admin-live code { background: var(--panel2); padding: 1px 6px; border-radius: 4px; }
.table a { color: var(--gold); }
@media (max-width: 720px) {
  .hide-s { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 1.4rem; }
}
.admin .table .hname { max-width: none; overflow: visible; white-space: nowrap; }   /* admin tables: show the whole hero name and its role tag */
.admin .table .hname .tag { margin-left: 6px; vertical-align: 2px; }

/* admin panel: hero page, forms, closures */
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 1.05rem; }
.btn.danger { background: #4a1a1a; border-color: #7a2e2e; color: #f0b0b0; }
.btn.danger:hover { background: #5c2020; border-color: #e05757; color: #fff; }
.admin h1 small { font-size: 1.1rem; font-weight: 400; }
.admin .back { margin: 0 0 4px; } .admin .back a { color: var(--gold); text-decoration: none; }
.admin .table td.wrap-cell { white-space: normal; min-width: 12ch; }
.admin .table td.nowrap { white-space: nowrap; }
.admin .table td.acts { white-space: nowrap; }
.admin .table td.acts form + form { margin-left: 6px; }
form.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.gear { font-weight: 600; }
.small-v { font-size: 1.25rem !important; }
.kpi small { display: block; margin-top: 2px; }
.where p { margin: 4px 0; }
.stuff, .forms, .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 8px 0 12px; align-items: start; }
.panel h3 { margin: 0 0 8px; font-size: 1.3rem; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: 0; }
ul.plain li span { min-width: 0; overflow-wrap: anywhere; }
details summary { cursor: pointer; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.admin label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: .85rem; }
.admin label.check { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); font-size: 1rem; }
.admin input[type=number], .admin input[list], .admin select { min-height: 44px; width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; font: inherit; min-width: 0; }
.admin input.n { width: 100%; max-width: 9rem; }
.admin td.acts input.n { width: 5rem; }
.admin input[type=checkbox] { width: 22px; height: 22px; }
.admin .row { display: flex; gap: 10px; flex-wrap: wrap; } .admin .row > div { flex: 1 1 6rem; min-width: 0; }
.admin .row.coins label { display: flex; align-items: center; margin-top: 10px; }
.admin .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin form.panel > .btn { margin-top: 12px; }
.admin .close-item { max-width: 520px; margin-top: 12px; }
@media (max-width: 720px) {
  .stuff, .forms, .stats { grid-template-columns: minmax(0, 1fr); }
  .admin td.acts form.inline { margin-bottom: 4px; }
}
@media (max-width: 720px) {
  .admin .table td.acts { white-space: normal; }
  .admin .table td.acts form.inline { display: flex; margin: 0 0 6px; }
  .admin .table td.acts form + form { margin-left: 0; }
  .admin .table td.wrap-cell { min-width: 9ch; }
}

/* ===== item cells, tooltips, the paper doll and the bag grid (admin panel; the look of the game's ItemSlot / MatCell / tooltip) ===== */
.slotwrap { display: inline-block; position: relative; line-height: 0; }
.slot { --rc: #36363b; --bc: #36363b; --s: 44px; position: relative; display: inline-block; width: var(--s); height: var(--s); padding: 0; margin: 0; border: 0; background: none; cursor: pointer; font-family: system-ui, sans-serif; vertical-align: top; }
.slot.s-doll { --s: 54px; } .slot.s-bag { --s: 44px; } .slot.s-sm { --s: 36px; }
.slot::before { content: ""; position: absolute; inset: 2px; box-sizing: border-box; border: 1.5px solid var(--rc);
  background: linear-gradient(to top, color-mix(in srgb, var(--rc) 13%, transparent), color-mix(in srgb, var(--rc) 5%, transparent) 50%, transparent 50%), #0b0b0c; }
.slot:hover::before, .slot:focus-visible::before { background-color: #161618; border-color: color-mix(in srgb, var(--rc) 75%, #fff); }
.slot:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.slot.glow::after { content: ""; position: absolute; inset: 0; box-sizing: border-box; border: 1px solid color-mix(in srgb, var(--rc) 28%, transparent); box-shadow: 0 0 5px color-mix(in srgb, var(--rc) 40%, transparent); pointer-events: none; }
.slot.sel::before { border-color: #f2f2f7; box-shadow: 0 0 0 1px #f2f2f7; }
.slot .ico { position: absolute; left: 50%; top: 50%; width: 68%; height: 68%; transform: translate(-50%, -50%); pointer-events: none; user-select: none; }
.slot .ico.unknown { display: flex; align-items: center; justify-content: center; font: 1.2rem/1 var(--pixel); color: var(--muted); width: auto; height: auto; }
.slot .up, .slot .il, .slot .n { position: absolute; bottom: 3px; font: 700 11px/1 system-ui, sans-serif; text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000, 0 0 3px #000; pointer-events: none; }
.slot .up { left: 5px; color: var(--gold); }
.slot .il { right: 5px; color: #ccccd6; }
.slot.s-sm .up, .slot.s-sm .il, .slot.s-sm .n { font-size: 9px; bottom: 2px; }
.slot.stack::before { border-color: var(--bc); background: #0b0b0c; }
.slot.stack .ico { width: 80%; height: 80%; }
.slot .n { right: 5px; color: #fff; }
.slot.ghost { cursor: default; }
.slot.ghost::before { border-color: #36363b; }
.slot.empty { cursor: default; }
.slot.empty::before { border-color: #1d1d20; background: #0b0b0c; }
.slot.empty:hover::before { background-color: #0b0b0c; border-color: #1d1d20; }

/* the tooltip: dark panel framed with the rarity colour darkened, like TooltipWindow */
.tip { display: none; line-height: 1.25; text-align: left; font: 12px/1.3 system-ui, sans-serif; color: var(--text); background: #101012; border: 2px solid var(--tb, #36363b); border-radius: 4px; padding: 8px 10px; width: min(300px, calc(100vw - 16px)); box-sizing: border-box; box-shadow: 0 6px 18px rgba(0, 0, 0, .6); }
.tip.floating { position: fixed; z-index: 1000; pointer-events: none; display: block; }
.tip.floating[hidden] { display: none; }
.tip.inline { display: block; flex: 1 1 260px; box-shadow: none; }
.tl-title { font: 1.15rem/1.15 var(--pixel); letter-spacing: .02em; margin-bottom: 2px; overflow-wrap: anywhere; }
.tl-pair { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.tl { font-size: 12px; } .tl.sm { font-size: 11px; }
.tl.dim-line { opacity: .8; }
.tl-gap { height: 6px; }
.tl-money { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.tone-text { color: var(--text); } .tone-muted { color: var(--muted); } .tone-green { color: var(--green); } .tone-gold { color: var(--gold); } .tone-red { color: var(--red); }

/* hero page: the doll next to the bags */
.char { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin: 8px 0 12px; }
.bag-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bag-head h3 { margin: 0 0 8px; }
.bag { display: grid; grid-template-columns: repeat(var(--cols, 7), var(--cell, 44px)); gap: 4px; justify-content: start; }
.bag .slotwrap { width: 44px; height: 44px; }
.doll { display: grid; grid-template-columns: 54px minmax(112px, 1fr) 54px; gap: 8px 10px; align-items: start; }
.doll-left, .doll-right { display: grid; gap: 14px; }
.doll-mid { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.hero-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 6px; width: 100%; min-height: 138px; justify-content: center; box-sizing: border-box; background: radial-gradient(ellipse at 50% 30%, #2a2112, #0e0e10 75%); border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.hero-card b { font: 1.4rem/1.1 var(--pixel); color: var(--gold); }
.money-line { margin-top: 6px; font-size: .9rem; }
.doll-hands { display: flex; gap: 10px; }
.slot-detail { margin: 0 0 14px; }
.slot-detail[hidden] { display: none; }
.detail-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.card-actions .dim { flex-basis: 100%; }
.dropitem { display: inline-flex; align-items: center; gap: 10px; }
.dropitem .slotwrap { flex: none; }
@media (max-width: 720px) {
  .char { grid-template-columns: minmax(0, 1fr); }
  .doll { grid-template-columns: 54px minmax(0, 1fr) 54px; }
  .bag { grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); }
  .bag .slotwrap { width: auto; height: auto; aspect-ratio: 1; }
  .bag .slot.s-bag { --s: 100%; width: 100%; height: auto; aspect-ratio: 1; min-width: 44px; }
  .bag { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
}
/* the doll: three columns (left slots, hero, right slots) and the hands under the hero */
.doll { grid-template-columns: 54px minmax(96px, 1fr) 54px; grid-template-areas: "l m r" ". h ."; }
.doll-left { grid-area: l; } .doll-mid { grid-area: m; } .doll-right { grid-area: r; }
.doll-hands { grid-area: h; display: flex; justify-content: center; gap: 10px; }
.doll-mid { align-self: stretch; }
.hero-card { min-height: 0; height: 100%; }
@media (max-width: 720px) { .doll { grid-template-columns: 54px minmax(0, 1fr) 54px; } }
.btn.sm { white-space: nowrap; }

/* chat and channels (admin) */
.tts { max-width: 640px; margin: 8px 0 18px; }
.tts input[type=text] { min-height: 44px; width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0 12px; font: inherit; box-sizing: border-box; }
.tts .btn { margin-top: 12px; }
.chatlog { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); max-height: 520px; overflow-y: auto; }
.chatline { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .95rem; }
.chatline:last-child { border-bottom: 0; }
.chatline .when { color: var(--muted); font-size: .8rem; min-width: 5.5rem; }
.chatline .where { color: var(--muted); font-size: .8rem; }
.chatline .msg-text { flex-basis: 100%; overflow-wrap: anywhere; }
.chatline.k-world .where { color: #7ed67a; } .chatline.k-tts { background: #1d1708; } .chatline.k-tts .where { color: var(--gold); }
@media (min-width: 721px) { .chatline .msg-text { flex-basis: auto; flex: 1 1 320px; } }
.admin .tag { white-space: nowrap; display: inline-block; margin: 0 4px 4px 0; }
