/* Each page's own pieces: player, queues, feeds, boards, shop, games, settings panels. */
/* Now playing: the one loud element on the page */
.now { overflow: visible; }
.now .where { color: var(--muted); font-size: .875rem; margin-bottom: 8px; }
.now .title { font-size: clamp(1.375rem, 3.2vw, 2rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.now .title a { text-decoration: none; }
.now .title a:hover { text-decoration: underline; }
.now .by { color: var(--muted); margin-top: 4px; }
.progress { margin: 14px 0 2px; padding: 8px 0; cursor: pointer; }
.progress .track { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.progress:hover .track { height: 10px; margin: -1px 0; }
.progress[aria-disabled="true"] { cursor: default; }
.effects { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.effects > span { width: 4.5rem; flex: none; }
.btn.toggle[aria-pressed="true"] { border-color: var(--gold-fill); color: var(--gold); background: var(--sunken); }
.progress i { display: block; height: 100%; width: 0; background: var(--gold-fill); border-radius: 4px; transition: width .5s linear; }
.times { display: flex; justify-content: space-between; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.knobs { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 5ch auto; gap: 12px 12px; align-items: center; margin-top: 20px; }
.knobs input { width: 100%; accent-color: var(--gold-fill); }
.knobs output { font-variant-numeric: tabular-nums; text-align: right; }
.knobs .btn.quiet:hover { color: var(--ink); }

.addrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.addrow #mQuery { grid-column: 1 / -1; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.duo.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.duo label { display: grid; gap: 6px; font-size: .875rem; color: var(--muted); }
.queuehead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.queuehead h2 { font-size: 1.0625rem; font-weight: 700; }
ol.queue { list-style: none; margin: 0; padding: 0; }
ol.queue li {
  display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line);
}
ol.queue .n { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
ol.queue .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.queue .t a { text-decoration: none; }
ol.queue .t a:hover { text-decoration: underline; }
ol.queue .t small { display: block; color: var(--muted); }
ol.queue .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 12px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; background: var(--sunken); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); border-radius: 50%; width: 28px; height: 28px; font-size: 1.125rem; line-height: 1; }
.chip button:hover { color: var(--danger); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; max-width: 520px; }

.logrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.logrow:first-of-type { border-top: 0; padding-top: 0; }
.logrow .check { grid-column: 2; display: flex; gap: 8px; align-items: center; font-size: .875rem; color: var(--muted); }
.logrow input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar select { width: auto; min-width: 240px; }
.event { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.event:first-child { border-top: 0; padding-top: 0; }
.event .bar { border-radius: 2px; background: var(--muted); }
.event .head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.event .head b { font-weight: 700; }
.event time, .event .who { color: var(--muted); font-size: .875rem; }
.event .body { overflow-wrap: anywhere; }
.event dl { margin: 6px 0 0; display: grid; gap: 4px; }
.event dt { font-size: .875rem; color: var(--muted); }
.event dd { margin: 0; overflow-wrap: anywhere; background: var(--sunken); border-radius: 6px; padding: 6px 10px; }

.console {
  background: var(--sunken); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; height: min(68vh, 720px); overflow-y: auto;
  font: 400 .8125rem/1.55 ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
.console div { white-space: pre-wrap; overflow-wrap: anywhere; }
.console .ts, .console .src { color: var(--muted); }
.console .WARNING { color: var(--gold); }
.console .ERROR, .console .CRITICAL { color: var(--danger); }
.toolbar label.check { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.toolbar input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; padding-top: 0; }
.plist .meta { color: var(--muted); font-size: .875rem; }
.plist .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.plist .acts .btn { min-height: 36px; padding: 6px 12px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--gold); border: 1px solid var(--gold-fill); margin-left: 6px; vertical-align: 1px; }
.row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.row3 label, .fields label { display: grid; gap: 6px; font-size: .875rem; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 16px; }
.fields .check { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 1rem; }
.fields input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
input[type="number"] { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-height: 42px; width: 100%; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-bottom: 24px; }
.stats b { display: block; font-size: 1.75rem; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--gold); }
.stats span { color: var(--muted); font-size: .875rem; }
.stats b span { color: inherit; font-size: inherit; }  /* a number wrapped for live updates keeps the big gold look */
ol.board { list-style: none; margin: 0; padding: 0; }
ol.board li { display: grid; grid-template-columns: 3ch 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
ol.board li:first-child { border-top: 0; }
ol.board img, ol.board .ph { width: 32px; height: 32px; border-radius: 50%; background: var(--sunken); }
ol.board .n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
ol.board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.board .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
ol.board li:nth-child(-n+3) .n { color: var(--gold); font-weight: 700; }
@media (max-width: 760px) { .row3, .duo, .duo.wide-right { grid-template-columns: minmax(0, 1fr); } .plist li { grid-template-columns: 1fr; } .plist .acts { justify-content: flex-start; } }

.drops { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) minmax(0, 7rem) minmax(0, 7rem) 4.5rem; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.drops .head { font-size: .875rem; color: var(--muted); }
.drops .gem { width: 14px; height: 18px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.drops .share { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; font-size: .875rem; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: -4px 0 20px; }
.checks label { display: flex; gap: 8px; align-items: center; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 8px 0 20px; }
legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
@media (max-width: 760px) { .drops { grid-template-columns: 1.5rem minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); } .drops .share { display: none; } }

.feed { list-style: none; margin: 0; padding: 0; max-height: min(78vh, 900px); overflow-y: auto; }
.feed li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 4px; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .ic { width: 28px; height: 28px; display: grid; place-items: center; font-size: 1rem; }
ul.mine .gem { display: inline-block; width: 12px; height: 17px; margin-left: 3px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.feed .gem { width: 14px; height: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.feed .what { overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.4; }
.feed .what b { font-weight: 600; }
.feed .when { display: block; color: var(--muted); font-size: .8125rem; }
.feed .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed .up { color: var(--accent); }
.feed .down { color: var(--danger); }
.feed .even { color: var(--muted); }
.feed li.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: color-mix(in srgb, var(--gold-fill) 22%, transparent); } to { background: transparent; } }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); font-weight: 500; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rail label.sound { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: .875rem; color: var(--muted); }
.sound input { width: 18px; height: 18px; accent-color: var(--accent); }
.soundbox { display: grid; gap: 6px; }
.soundbox input[type="range"] { margin: 0 8px; accent-color: var(--gold-fill); }
.soundbox input[type="range"]:disabled { opacity: .4; }
@media (prefers-reduced-motion: reduce) { .feed li.fresh { animation: none; } }

label.stack { display: grid; gap: 6px; font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.fmtbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--sunken); }
.fmtbar button { min-width: 34px; height: 32px; border: 0; border-radius: 6px; background: none; cursor: pointer; font-size: .9375rem; }
.fmtbar button:hover { background: var(--surface); }
.fmtbar .sep { width: 1px; background: var(--line); margin: 4px 2px; }
#sayText, .tpl textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 10px 12px; resize: vertical; font: inherit; color: inherit; }
.saycount { text-align: right; margin-top: 4px; font-variant-numeric: tabular-nums; }
.saycount.over { color: var(--danger); }
input[type="color"] { width: 100%; height: 42px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.dmsg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; background: #313338; color: #dbdee1; border-radius: 8px; padding: 14px 16px; font-family: "gg sans", "Noto Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.375; }
.dav { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; overflow: hidden; }
.dav img { width: 40px; height: 40px; display: block; }
.dname { font-weight: 600; color: #f2f3f5; margin-bottom: 2px; }
.dtag { font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; border-radius: 3px; padding: 1px 4px; vertical-align: 2px; }
.dtext { overflow-wrap: anywhere; min-height: 1.4em; }
.dtext h1, .dtext h2, .dtext h3 { margin: 6px 0 2px; color: #f2f3f5; line-height: 1.2; }
.dtext h1 { font-size: 24px; } .dtext h2 { font-size: 20px; } .dtext h3 { font-size: 16px; }
.dtext .sub { font-size: 12px; color: #949ba4; }
.dtext blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.dtext code { background: #2b2d31; border-radius: 4px; padding: 1px 4px; font-size: 85%; font-family: ui-monospace, Consolas, monospace; }
.dtext pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; margin: 4px 0; white-space: pre-wrap; }
.dtext pre code { background: none; padding: 0; }
.dtext .spoil { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.dtext .spoil.shown { background: #3f4147; color: inherit; }
.dtext a { color: #00a8fc; text-decoration: none; }
.dtext ul { margin: 2px 0; padding-left: 22px; }
.dtext .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.dembed { border-left: 4px solid #c9a227; background: #2b2d31; border-radius: 4px; padding: 8px 12px 12px; margin-top: 4px; max-width: 520px; }
.dembed .et { font-weight: 600; color: #f2f3f5; margin: 4px 0 6px; }
.dembed .eimg { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; margin-top: 10px; }
.dembed .ef { font-size: 12px; color: #b5bac1; margin-top: 8px; }
/* Rock paper scissors */
.reels.rps .vs { font-size: 1rem; color: var(--muted); align-self: center; background: none; border: 0; box-shadow: none; }
.rpswho { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rpswho select { width: auto; flex: 1; max-width: 280px; }
.rpsmatch { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; background: var(--sunken); }
.rpsmatch.turn { border-color: var(--gold-fill); }
.rpsmatch .pondbtns { margin: 10px 0 0; }
.rpsmatch .note { white-space: pre-line; margin-top: 6px; }
/* DMs: conversations on the left, the chat on the right */
.dmwrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (min-width: 900px) { .dmwrap { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); } }
.dmside #dmNew { width: 100%; justify-content: center; margin-bottom: 12px; }
.dmconvos { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 70vh; overflow-y: auto; }
.dmconvos button { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%;
  padding: 8px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dmconvos button:hover { background: var(--sunken); }
.dmconvos button[aria-current="true"] { background: var(--sunken); border-color: var(--gold-fill); }
.dmconvos .av { width: 36px; height: 36px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; overflow: hidden; }
.dmconvos .av img { width: 100%; height: 100%; object-fit: cover; }
.dmconvos .nm, .dmconvos .lst { display: block; }
.dmconvos .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmconvos .lst { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmconvos .unread .lst { color: var(--ink); font-weight: 600; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.dmhead { font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dmhead .muted { font-weight: 400; }
.dmmsgs { display: flex; flex-direction: column; gap: 8px; min-height: 360px; height: 62vh; overflow-y: auto; padding: 14px 2px; }
.dmmsg { max-width: min(80%, 560px); padding: 8px 12px; border-radius: 14px; background: var(--sunken); white-space: pre-wrap; overflow-wrap: anywhere; }
.dmmsg.in { align-self: flex-start; }
.dmmsg .yt { display: block; position: relative; width: min(100%, 480px); aspect-ratio: 16 / 9; margin-top: 6px; padding: 0;
  border: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.dmmsg button.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dmmsg .yt .play { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 1.25rem; transition: background .15s; }
.dmmsg button.yt:hover .play { background: #ff0033; }
.dmmsg:has(.yt) { width: min(80%, 500px); }
.dmmsg.out { align-self: flex-end; background: color-mix(in srgb, var(--accent) 22%, var(--sunken)); }
.dmmsg .t { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.dmmsg a { color: var(--accent); }
.dmcompose { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding-top: 12px; border-top: 1px solid var(--line); }
.dmcompose #dmUser, .dmembed, .dmembedtoggle { grid-column: 1 / -1; }
.dmembed { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.dmembed #dmImage, .dmembed #dmFooter { grid-column: 1 / -1; }
.dmembed input[type="color"] { width: 48px; height: 100%; min-height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); }
.dmembedtoggle { font-size: .875rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.dmmedia { display: block; margin-top: 6px; max-width: 100%; max-height: 320px; border-radius: 10px; }
.dmmedia.sticker { max-height: 160px; }
.dmmsg .emb { margin-top: 6px; padding: 8px 12px; border-left: 4px solid var(--c, #c9a227); border-radius: 6px; background: var(--bg); white-space: pre-wrap; }
.dmmsg .emb b { display: block; margin-bottom: 2px; }
.dmmsg .emb small { display: block; color: var(--muted); margin-top: 6px; }
.dmcompose textarea { resize: vertical; min-height: 44px; font: inherit; color: inherit; line-height: 1.5; }
/* AI: replies settings beside the DM list, take-over button, and the console */
.aibox { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.aihead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aihead h2 { margin: 0; }
.aibox p { margin: 6px 0 10px; }
.aibox p.down { color: var(--danger); }
.aibox details summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.aibox textarea { resize: vertical; font: inherit; color: inherit; line-height: 1.5; }
.aibox .fields { grid-template-columns: minmax(0, 1fr); margin: 10px 0; }
.aibox .stack { margin-bottom: 10px; }
.dmheadrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.dmheadrow .dmhead { border: 0; padding: 0; }
.dmmsg .bot { color: var(--gold); font-weight: 600; }
.aiconsole .dmmsgs { height: 58vh; }
.aiconsole .dmcompose { grid-template-columns: minmax(0, 1fr) auto auto; }
.aiact { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--gold-fill); border-radius: 10px; background: var(--bg); white-space: normal; }
.aiact .acts { display: flex; gap: 8px; margin-top: 8px; }
.aiact .acts .btn { min-height: 34px; padding: 4px 12px; }
.aiact.done { border-color: var(--line); opacity: .75; }
.dmmsg .look { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.dmmsg.thinking { color: var(--muted); font-style: italic; }
#aiTabs { margin-bottom: 18px; }
.kform { display: grid; gap: 10px; margin: 12px 0 16px; padding: 14px; border: 1px solid var(--gold-fill); border-radius: 12px; }
.kform textarea { resize: vertical; font: inherit; color: inherit; line-height: 1.5; }
.kacts { display: flex; gap: 8px; }
.knotes, .knhits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.knotes li, .knhits li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.knotes li.off { opacity: .55; }
.knotes .kt, .knhits .kt { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.knotes .kx, .knhits .kx { color: var(--muted); font-size: .875rem; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.knotes .kacts { margin-top: 8px; }
.knotes .kacts .btn { min-height: 32px; padding: 4px 12px; }
.tagpill { font-size: .6875rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--gold-fill) 25%, transparent); color: var(--ink); }
.tagpill.dim { background: var(--bg); color: var(--muted); }
/* Members: list on the left, a profile on the right */
.mbwrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (min-width: 1000px) { .mbwrap { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); } .mbprofile { position: sticky; top: 0; } }
#mbSearch { width: 100%; }
#mbFilter { margin: 12px 0 4px; }
.mblist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 68vh; overflow-y: auto; }
.mblist button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%;
  padding: 8px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mblist button:hover { background: var(--sunken); }
.mblist button[aria-current="true"] { background: var(--sunken); border-color: var(--gold-fill); }
.mblist img, .mbhead img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--sunken); }
.mblist .nm { overflow: hidden; }
.mblist .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mblist .nm span { color: var(--muted); font-size: .75rem; }
.mblist .bal { display: flex; align-items: center; gap: 5px; font: 700 1.0625rem/1 var(--display); color: var(--gold);
  font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .02em; }
.mblist .bal.neg { color: var(--danger); }
.mblist .bal .emo { width: 1.1em; height: 1.1em; }
.mbtags { display: inline-flex; gap: 4px; margin-left: 4px; }
.mbhead { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.mbhead img { width: 64px; height: 64px; }
.mbhead h2 { margin: 0; }
.mbhead .sub { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.mbprofile .stats { margin-bottom: 16px; }
.mbcols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; }
@media (min-width: 1200px) { .mbcols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mbsec h3 { font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.mbrules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mbrules li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mbrules b { display: block; }
.mbrules span.muted { font-size: .8125rem; }
.mbacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mbacts input { width: 120px; }
.mbmini { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .875rem; }
.mbmini li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.mbmini li:last-child { border-bottom: 0; }
.mbmini .up { color: var(--accent); } .mbmini .down { color: var(--danger); }
.mine li.wishrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.mine li.wishrow .what { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
/* ---- Chests: CSS-drawn chests (wooden / silver / gold), the open-chest show ---- */
.chestwrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (min-width: 900px) { .chestwrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.chestcard { text-align: center; }
.chestcard h2 { text-align: left; }
.chestbtn { display: block; margin: 8px auto 6px; padding: 18px 22px 10px; border: 0; background: none; cursor: pointer; border-radius: 16px; }
.chestbtn:disabled { cursor: default; }
.chestbtn:not(:disabled):hover .chest { transform: translateY(-3px) scale(1.03); }
.chestbtn:not(:disabled) .chest { animation: chest-idle 2.6s ease-in-out infinite; }
.chestbtn:disabled .chest { filter: saturate(.7) brightness(.85); }
/* Opened for today: the same closed chest, with a padlock hanging from the latch. */
.odds .tiertest { margin-left: 8px; padding: 2px 9px; font-size: .75rem; min-height: 0; }
.chest.locked .lock { background: #a9b1b8; width: 26px; height: 22px; margin-left: -13px; top: 4px; border-radius: 4px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.2); }
.chest.locked .lock::before { content: ""; position: absolute; left: 4px; right: 4px; top: -13px; height: 16px; border: 4px solid #a9b1b8;
  border-bottom: 0; border-radius: 10px 10px 0 0; }
.chest.locked .lock::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: #4a5056; }
@keyframes chest-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.chest { --w1: #8a5a2b; --w2: #6b4320; --band: #3b3b3f; --lock: #d8b04a; position: relative; display: inline-block;
  width: 150px; height: 124px; perspective: 500px; transition: transform .2s; }
.chest.silver { --w1: #c9d2d8; --w2: #8f9aa3; --band: #eef3f6; --lock: #ffffff; }
.chest.gold { --w1: #f2cf5b; --w2: #c99a1e; --band: #fff1b8; --lock: #fffbe6; }
.chest.bronze { --w1: #c07a45; --w2: #8d5129; --band: #5a3a26; --lock: #e6b26a; }
.chest.crystal { --w1: #bdeef8; --w2: #74c6de; --band: #f2fdff; --lock: #ffffff; }
.chest.royal { --w1: #7b4fd0; --w2: #52309a; --band: #f2cf5b; --lock: #f8dc78; }
.chest.mythic { --w1: #f1faf6; --w2: #b4e2d2; --band: #5fb8a4; --lock: #ffe9a8; }
.chest.star { --w1: #ffd84a; --w2: #e39c00; --band: #fff7d6; --lock: #fffdf2; }
.chest.star .lock { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; width: 28px; margin-left: -14px; }
.chest .box, .chest .lid { position: absolute; left: 0; right: 0; border: 4px solid var(--band);
  background: repeating-linear-gradient(0deg, var(--w1) 0 14px, var(--w2) 14px 16px); }
.chest .box { bottom: 0; height: 74px; border-radius: 4px 4px 10px 10px; box-shadow: 0 10px 18px -8px rgba(0,0,0,.6); }
.chest .box::before, .chest .box::after, .chest .lid::before, .chest .lid::after { content: ""; position: absolute; top: -4px; bottom: -4px;
  width: 10px; background: var(--band); }
.chest .box::before, .chest .lid::before { left: 18px; }
.chest .box::after, .chest .lid::after { right: 18px; }
.chest .lid { top: 0; height: 54px; border-radius: 60px 60px 4px 4px / 40px 40px 4px 4px; transform-origin: 50% 100%;
  overflow: hidden;  /* the bands follow the dome instead of poking out square above it */
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); z-index: 1; }
.chest .lock { position: absolute; left: 50%; top: -6px; width: 22px; height: 26px; margin-left: -11px; border-radius: 4px 4px 8px 8px;
  background: var(--lock); box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); z-index: 2; }
/* Open (the show): the lid swings back so you see its darker inside, the mouth glows with treasure, light spills up,
   and the latch drops onto the front. Layers back to front: lid, mouth, glow, box. */
.chest .mouth { position: absolute; left: 5px; right: 5px; top: 28px; height: 30px; border-radius: 50% / 70% 70% 20% 20%; z-index: 1;
  opacity: 0; transition: opacity .2s; pointer-events: none; box-shadow: inset 0 3px 6px rgba(0,0,0,.55);
  background:
    radial-gradient(circle at 28% 50%, #6fe3a8 0 3.5px, transparent 4.5px), radial-gradient(circle at 66% 44%, #7fb6ff 0 3.5px, transparent 4.5px),
    radial-gradient(circle at 47% 56%, #ff7b7b 0 3px, transparent 4px), radial-gradient(circle at 82% 56%, #fff2b0 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 15% 60%, #fff2b0 0 2.5px, transparent 3.5px), radial-gradient(circle at 56% 34%, #fffbe6 0 1.5px, transparent 2.5px),
    radial-gradient(ellipse 60% 45% at 50% 72%, #ffe68f 0, #f0b93e 60%, transparent 62%),
    radial-gradient(ellipse at 50% 100%, #fff7d1 0, #ffd66b 28%, #b5791f 55%, #3a2210 88%); }
.chest.open .mouth { opacity: 1; transition-delay: .08s; }
.chest.open .lid { transform: translateY(-8px) scaleY(.62); z-index: 0;
  filter: brightness(.55) saturate(.9); box-shadow: inset 0 -14px 18px -6px rgba(0,0,0,.6); }
.chest.open .box { z-index: 3; }
.chest.open .lock { top: 4px; height: 18px; border-radius: 3px 3px 7px 7px; }
.chest.open::before { content: ""; position: absolute; left: -10%; right: -10%; top: -46px; height: 104px; z-index: 2; pointer-events: none;
  mix-blend-mode: screen; background: radial-gradient(ellipse 45% 70% at 50% 100%, rgba(255, 246, 200, .9), rgba(255, 220, 120, .3) 50%, transparent 75%); }
.chest.silver, .chest.gold, .chest.crystal, .chest.royal, .chest.mythic { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--w1) 60%, transparent)); }
.chest.star { filter: drop-shadow(0 0 10px #fff3b0) drop-shadow(0 0 26px rgba(255, 200, 40, .8)); }
.chestnote { margin: 6px 0 12px; min-height: 1.5em; }
.week { display: flex; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.week span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; border: 1px solid var(--line);
  color: var(--muted); background: var(--sunken); }
.week span.on { border-color: var(--gold-fill); color: var(--ink); background: color-mix(in srgb, var(--gold-fill) 25%, var(--sunken)); }
.week span.today { box-shadow: 0 0 0 2px var(--gold-fill); }
#keyOpen { margin: 4px auto 14px; }
.odds { list-style: none; margin: 0 auto 12px; padding: 0; display: grid; gap: 6px; max-width: 360px; text-align: left; }
.odds li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .9375rem; }
.odds .sw { width: 18px; height: 14px; border-radius: 3px; }
.odds .n { color: var(--muted); font-variant-numeric: tabular-nums; }

/* The show: everything dims, the chest shakes (and maybe upgrades), bursts open, and the reward card rises. */
.chestshow { --s: 2; position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(4, 8, 6, .82);
  backdrop-filter: blur(4px); animation: cs-fade .25s ease-out; }
.chestshow[hidden] { display: none; }
.cs-stage { position: relative; display: grid; place-items: center; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.chestshow.opened .cs-stage { transform: translateY(-11vh); }
.chestshow .chest { transform: scale(var(--s)); }
.chestshow.enter .chest { animation: cs-in .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes cs-in { from { transform: scale(.6) translateY(40px); opacity: 0; } to { transform: scale(var(--s)); opacity: 1; } }
.chestshow.shake1 .chest { animation: cs-shake1 .35s linear infinite; }
.chestshow.shake2 .chest { animation: cs-shake2 .18s linear infinite; }
@keyframes cs-shake1 { 0%, 100% { transform: scale(var(--s)) rotate(0); } 25% { transform: scale(var(--s)) rotate(-2.5deg); } 75% { transform: scale(var(--s)) rotate(2.5deg); } }
@keyframes cs-shake2 { 0%, 100% { transform: scale(calc(var(--s) * 1.03)) translate(0, 0) rotate(0); } 25% { transform: scale(calc(var(--s) * 1.03)) translate(-3px, 1px) rotate(-4deg); }
  75% { transform: scale(calc(var(--s) * 1.03)) translate(3px, -1px) rotate(4deg); } }
.chestshow .flash { position: fixed; inset: 0; background: #fff; pointer-events: none; animation: cs-flash .5s ease-out forwards; }
@keyframes cs-flash { from { opacity: .85; } to { opacity: 0; } }
.cs-rays { position: absolute; width: 900px; height: 900px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--ray, rgba(255, 220, 120, .28)) 0 7deg, transparent 7deg 20deg);
  mask-image: radial-gradient(circle, #000 0 18%, transparent 62%); -webkit-mask-image: radial-gradient(circle, #000 0 18%, transparent 62%); }
.chestshow.opened .cs-rays { animation: cs-rays 6s linear infinite, cs-fade .6s ease-out forwards; }
.chestshow.t-silver { --ray: rgba(220, 235, 245, .3); }
.chestshow.t-gold { --ray: rgba(255, 210, 80, .4); }
.chestshow.t-bronze { --ray: rgba(230, 160, 100, .22); }
.chestshow.t-crystal { --ray: rgba(170, 235, 255, .4); }
.chestshow.t-royal { --ray: rgba(175, 125, 255, .42); }
.chestshow.t-mythic { --ray: rgba(205, 255, 238, .45); }
.chestshow.t-star { --ray: rgba(255, 222, 90, .6); }
@keyframes cs-rays { to { transform: rotate(360deg); } }
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
.cs-burst { position: absolute; inset: 0; pointer-events: none; }
.cs-burst i { position: absolute; left: 50%; top: 40%; width: 12px; height: 18px; margin: -9px 0 0 -6px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--c); animation: cs-gem 1.1s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes cs-gem { from { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; }
  to { transform: translate(var(--x), var(--y)) scale(1.1) rotate(var(--r)); opacity: 0; } }
.cs-card { position: absolute; bottom: 9vh; min-width: min(420px, calc(100vw - 32px)); padding: 20px 26px; text-align: center; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--gold-fill); box-shadow: 0 20px 60px -20px rgba(0,0,0,.8); animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.cs-card .tier { font: 700 1rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.cs-card .amt { font: 700 2.6rem/1.15 var(--display); color: var(--gold); margin: 6px 0; text-shadow: 0 0 18px var(--gold-glow); }
.cs-card .extra { color: var(--muted); font-size: .9375rem; }
.cs-card .bless { margin-top: 8px; color: var(--ink); font-weight: 600; }
.cs-card .btn { margin-top: 14px; }
@media (max-width: 760px) { .chestshow { --s: 1.5; } .cs-card { bottom: 5vh; } }
@media (prefers-reduced-motion: reduce) { .chestshow .chest, .chestbtn .chest { animation: none !important; } .cs-rays { display: none; } }
/* Daily bounties on Your Page */
.bounties { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bounties li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bounties .ck { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: .8125rem; }
.bounties li.done .ck { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bounties li.done .w { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.bounties .bar { grid-column: 2 / -1; height: 4px; border-radius: 4px; background: var(--sunken); overflow: hidden; margin-top: -4px; }
.bounties .bar i { display: block; height: 100%; background: var(--gold-fill); transition: width .5s; }
.bounties .n { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
#meBountyFoot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* Undo in activity feeds (admins) */
.feed li .undo { margin-left: 8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--sunken);
  color: var(--muted); cursor: pointer; font-size: .875rem; line-height: 1; opacity: 0; transition: opacity .15s; vertical-align: middle; }
.feed li:hover .undo, .feed li .undo:focus-visible { opacity: 1; }
.feed li .undo:hover { color: var(--ink); border-color: var(--gold-fill); }
@media (hover: none) { .feed li .undo { opacity: .7; } }
.feed li.undone .what, .feed li.undone .amt { text-decoration: line-through; opacity: .55; }
/* Send or Request (Your Page) */
.btn.small { padding: 5px 11px; font-size: .8125rem; min-height: 0; }
.sendform { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
.sendform .wide { grid-column: 1 / -1; }
.sendform .row { display: flex; gap: 8px; }
.reqlist { margin-top: 12px; }
.reqlist li.req { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.reqlist li.req .what { white-space: normal; }
.reqlist .acts { display: flex; gap: 6px; }
/* Mask Collection (Your Page) */
.maskgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.mask { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 10px; background: var(--sunken);
  border: 1px solid var(--line); text-align: center; font-size: .75rem; line-height: 1.25; }
.mask b { font-weight: 600; }
.mask .maskicon { width: 56px; height: 56px; object-fit: contain; font-size: 2rem; line-height: 56px; display: block; image-rendering: pixelated; }
.mask.missing .maskicon { filter: brightness(0) opacity(.3); }
.mask.missing b { color: var(--muted); font-weight: 400; }
.mask.have.r-rare { border-color: color-mix(in srgb, #7fb6ff 55%, var(--line)); }
.mask.have.r-legendary { border-color: var(--gold-fill); box-shadow: 0 0 10px -4px var(--gold-fill); }
.mask .n { position: absolute; top: 6px; right: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mask .btn.small { padding: 3px 6px; font-size: .6875rem; margin-top: 2px; }
.moon { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--sunken);
  border: 1px solid var(--gold-fill); margin-top: 10px; }
.moon span { flex: 1 1 240px; }
.moon .maskicon { width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated; }
.masktrade { margin-top: 14px; }
.masktrade summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.masktrade .sendform { margin-top: 10px; }
/* Debug menu (owner only) */
.dbg { position: fixed; right: 16px; bottom: 16px; z-index: 96; width: min(460px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 32px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--gold-fill); border-radius: 14px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .6); font-size: .875rem; }
.dbg[hidden] { display: none; }
.dbg header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dbg header .subtabs { flex: 1; display: flex; gap: 4px; }
.dbg header .subtabs button { border: 0; background: none; color: var(--muted); padding: 5px 10px; border-radius: 7px; cursor: pointer; font: inherit; font-weight: 600; }
.dbg header .subtabs button[aria-selected="true"] { background: var(--sunken); color: var(--ink); }
.dbgx { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.dbgbody { overflow: auto; padding: 12px; display: grid; gap: 10px; }
.dbgbody h3 { margin: 6px 0 0; font-size: .875rem; }
.dbgrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dbgrow select, .dbgrow input { padding: 5px 8px; }
.dbg .btn.danger { color: var(--danger); }
.dbgkv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.dbgkv dt { color: var(--muted); }
.dbgkv dd { margin: 0; overflow-wrap: anywhere; }
.dbglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .8125rem; }
.dbglist code { font-size: .75rem; }
.dbglist.api li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.dbglist.api li code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbglist.api li em { grid-column: 1 / -1; font-style: normal; color: var(--muted); font-size: .75rem; margin-top: -3px; }
.dbglist.api li.bad em { color: var(--danger); }
.dbglist.api li:not(.bad) em { display: none; }
.dbgtest { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--sunken); border: 1px dashed var(--line); }
.dbgtest span { flex: 1 1 220px; }
.dbgtest.on { border: 1px solid var(--gold-fill); }
.dbgbadge { position: fixed; left: 50%; translate: -50% 0; bottom: 16px; z-index: 94; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--gold-fill);
  background: var(--surface); color: var(--gold); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .5); }
.dbgbadge[hidden] { display: none; }
/* "New" tags (owner sets them in the Debug menu) */
.newtag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: .625rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; line-height: 1.5;
  color: var(--on-accent); background: linear-gradient(135deg, var(--gold-fill), color-mix(in srgb, var(--gold-fill) 70%, var(--accent)));
  box-shadow: 0 0 10px -2px var(--gold-glow); }
.block .top .newtag { margin-left: 2px; }
label > .newtag { margin: 0 0 0 6px; justify-self: start; align-self: flex-start; width: fit-content; }
.dbg-pick { outline: 2px dashed var(--gold-fill) !important; outline-offset: 3px; cursor: crosshair !important; }
.dbglist.newtags li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.dbglist.newtags li.head { display: block; margin-top: 6px; color: var(--muted); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; }
/* A worn mask next to a name */
.wornmask { width: 1.25em; height: 1.25em; margin-left: .35em; vertical-align: -.2em; object-fit: contain; image-rendering: pixelated; }
.me-head h1 .wornmask { width: 1.1em; height: 1.1em; }
.mask.have { cursor: pointer; }
.mask.have:hover { border-color: var(--gold-fill); }
.mask.worn { outline: 2px solid var(--gold-fill); outline-offset: -2px; box-shadow: 0 0 14px -4px var(--gold-glow); }
.mask.worn::before { content: "Wearing"; position: absolute; top: 5px; left: 7px; font-size: .5625rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gold); }
/* Kel Studio content: custom pages and panels, the banner */
.lookcontent { display: grid; gap: 12px; }
.lookcontent .lb-head { margin: 4px 0 0; }
.lookcontent .lb-text { margin: 0; line-height: 1.6; }
.lookcontent .lb-img { margin: 0 auto; width: 100%; }
.lookcontent .lb-img img { width: 100%; display: block; }
.lookcontent .lb-img figcaption { color: var(--muted); font-size: .8125rem; text-align: center; margin-top: 6px; }
.lookcontent .lb-btn { margin: 0; }
.lookcontent .lb-video { position: relative; aspect-ratio: 16 / 9; }
.lookcontent .lb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.lookcontent .lb-stat { display: grid; gap: 2px; }
.lookcontent .lb-stat b { font-family: var(--display); font-size: 2rem; color: var(--gold); }
.lookcontent .lb-stat span { color: var(--muted); }
.lookcontent .lb-hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-fill), transparent); width: 100%; }
.lookbanner { position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 44px; text-align: center; font-weight: 600; }
.lookbanner.tone-gold { background: linear-gradient(90deg, color-mix(in srgb, var(--gold-fill) 30%, var(--surface)), color-mix(in srgb, var(--gold-fill) 18%, var(--surface))); color: var(--ink); }
.lookbanner.tone-accent { background: var(--accent); color: var(--on-accent); }
.lookbanner.tone-danger { background: var(--danger); color: #fff; }
.lookbanner.tone-calm { background: var(--sunken); color: var(--ink); border-bottom: 1px solid var(--line); }
.lookbanner a:not(.btn) { color: inherit; text-decoration: underline; }
.lookbanner-x { position: absolute; right: 10px; top: 50%; translate: 0 -50%; border: 0; background: none; color: inherit; font-size: 1rem; cursor: pointer; opacity: .75; }
/* Raffle */
.raffle .rfpot { display: grid; justify-items: center; gap: 2px; margin: 6px 0 14px; }
.raffle .rfpot b { font-family: var(--display); font-size: 2.4rem; color: var(--gold); line-height: 1.1; }
.raffle .rfstats { display: grid; margin-bottom: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.raffle .rfstats b { font-size: 1.4rem; }
.rfbuy { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.rfbuy label { display: grid; gap: 4px; font-size: .8125rem; color: var(--muted); }
.rfbuy input { width: 90px; }
.rfpast { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rfpast li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px;
  border-radius: 10px; background: var(--sunken); }
.rfpast li.mine { box-shadow: inset 0 0 0 1px var(--gold-fill); }
.rfpast .amt { font-weight: 700; white-space: nowrap; }
/* Weekly Recap preview */
.recap { display: grid; gap: 14px; }
.recap .rcsec h3 { margin: 0 0 6px; font-size: 1rem; }
.recap .rcsec p { margin: 2px 0; line-height: 1.5; }
/* Fish Log */
.fishlog { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fishlog li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 8px 10px;
  border-radius: 10px; background: var(--sunken); }
.fishlog li .fe { grid-row: span 2; font-size: 1.4rem; width: 1.6em; text-align: center; }
.fishlog li b { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fishlog li:not(.got) { opacity: .6; }
.fishlog li:not(.got) .fe { filter: grayscale(1); }
.fishlog li.got { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-fill) 45%, transparent); }
/* Polls */
.fields textarea { resize: vertical; font: inherit; color: inherit; line-height: 1.5; }
.poll { margin-bottom: 18px; }
.poll .q { font-size: 1.125rem; font-weight: 700; margin-bottom: 4px; }
.poll .meta { margin-bottom: 14px; }
.popts { display: grid; gap: 8px; }
.popt { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); color: inherit; font: inherit; text-align: left; overflow: hidden; }
button.popt { cursor: pointer; transition: border-color .15s; }
button.popt:hover:not(:disabled) { border-color: var(--gold-fill); }
.popt .fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 16%, transparent); transition: width .4s; }
.popt > span { position: relative; }
.popt.mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.popt.won { border-color: var(--gold-fill); box-shadow: inset 0 0 0 1px var(--gold-fill); }
.popt .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .875rem; }
/* Poll history: each finished poll gets room, with its result as small bars */
.phist { display: grid; gap: 14px; }
.hpoll { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.hpoll .hq { font-weight: 700; line-height: 1.35; }
.hpoll .meta { color: var(--muted); font-size: .875rem; margin: 4px 0 12px; }
.hbars { display: grid; gap: 6px; }
.hbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 6px 10px;
  border-radius: 8px; overflow: hidden; font-size: .9375rem; }
.hbar .fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.hbar.won .fill { background: color-mix(in srgb, var(--gold-fill) 28%, transparent); }
.hbar.won { font-weight: 700; }
.hbar > span { position: relative; }
.hbar .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .875rem; }
.hpoll .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hpoll .acts .btn { min-height: 36px; padding: 6px 12px; }
#plMore { margin-top: 14px; }
.padmin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.padmin select { width: auto; min-height: 38px; padding: 6px 10px; }
/* Blackjack table */
.bj { display: grid; gap: 10px; margin-bottom: 12px; }
.bjrow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 10px; }
.bjlabel { color: var(--muted); font-size: .9375rem; }
.bjlabel b { color: var(--ink); }
.cards { display: flex; flex-wrap: wrap; gap: 6px; min-height: 64px; }
.card { width: 44px; height: 62px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  background: #fbf7ec; color: #1c1c1c; border: 1px solid #d6cdb4; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); animation: deal .25s ease-out; }
.card.red { color: #b3261e; }
.card.back { background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 5px, color-mix(in srgb, var(--accent) 70%, #000) 5px 10px); border-color: var(--accent); }
@keyframes deal { from { opacity: 0; transform: translateY(-8px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
.guessbox { margin: 4px 0 16px; max-width: none; }
.guessbox.miss input { animation: nope .35s; border-color: var(--danger); }
@keyframes nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.privacy { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 8px; }
.privacy li { line-height: 1.45; }
.sayediting { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; margin-bottom: 16px;
  border-radius: 8px; background: var(--sunken); border: 1px solid var(--line); border-left: 3px solid var(--gold-fill); }
#sayRecent .snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sayRecent li { grid-template-columns: minmax(0, 1fr) auto; }
.tplgroup { margin-bottom: 8px; }
.tpl { padding: 14px 0; border-top: 1px solid var(--line); }
/* Subtabs: a row of pills, one group of messages at a time. */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.subtabs button { position: relative; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px;
  padding: 7px 14px; font-weight: 600; font-size: .9375rem; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.subtabs button:hover { color: var(--ink); border-color: var(--muted); }
.subtabs button[aria-selected="true"] { color: var(--ink); border-color: var(--gold-fill); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--gold-fill); }
.subtabs .n { color: var(--muted); font-weight: 500; font-size: .8125rem; margin-left: 4px; }
.panel .subtabs button { padding: 5px 11px; font-size: .875rem; }  /* smaller inside a panel, so a row fits */
.subtabs button.dirty::after { content: ""; position: absolute; top: 4px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-fill); }
/* Placeholders and the emoji button only show while you're editing that message. */
.tpl .chips.ph { display: none; }
.tpl:focus-within .chips.ph { display: flex; }
.tpl:first-of-type { border-top: 0; padding-top: 0; }
.tpl .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.tpl .top b { font-weight: 600; }
.tpl textarea { border-radius: 8px; min-height: 2.6em; }
.tpl.custom textarea { border-color: var(--gold-fill); }
.chips.ph { margin: 8px 0 0; gap: 6px; }
.chips.ph button { font: 500 .8125rem/1 ui-monospace, Consolas, monospace; border: 1px solid var(--line); background: var(--sunken); color: inherit; border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.chips.ph button:hover { border-color: var(--gold-fill); }
.tpl .sample { margin-top: 8px; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.tpl .sample b { color: var(--ink); }
.savebar { position: sticky; bottom: 0; display: flex; gap: 16px; align-items: center; padding: 14px 0; background: var(--bg); border-top: 1px solid var(--line); z-index: 2; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.preset { text-align: left; border: 1px solid var(--line); background: var(--sunken); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: grid; gap: 4px; }
.preset:hover { border-color: var(--gold-fill); }
.preset b { font-weight: 600; }
.preset span { color: var(--muted); font-size: .875rem; }
.preset.active { border-color: var(--gold-fill); box-shadow: inset 0 0 0 1px var(--gold-fill); }
.stpreview { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; background: #2b2d31; color: #dbdee1; font-size: .9375rem; }
.stpreview .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.stpreview b { color: #f2f3f5; }
.ug, .ag { border-top: 1px solid var(--line); }
.feed > .ug:first-child, .feed > li:first-child { border-top: 0; }
.ug > summary, .ag > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 14px; gap: 10px; align-items: center; padding: 10px 4px; }
.ug > summary::-webkit-details-marker, .ag > summary::-webkit-details-marker { display: none; }
.ug > summary::after, .ag > summary::after { content: "›"; color: var(--muted); transition: transform .2s; justify-self: end; }
.ug[open] > summary::after, .ag[open] > summary::after { transform: rotate(90deg); }
.ug > .inner { padding-left: 14px; border-left: 2px solid var(--line); margin: 0 0 8px 13px; }
.ag > summary { padding: 8px 4px; }
.ag > .inner { padding-left: 12px; }
.ug .av { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-weight: 700; font-size: .8125rem; overflow: hidden; }
.ug .av img { width: 100%; height: 100%; }
.ug .count { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.feed .inner > li, .feed .inner > .row { list-style: none; }
.ug.fresh > summary, .feed li.fresh { animation: fresh 1.6s ease-out; }

.emojifield { display: grid; gap: 6px; }
.emojifield .lbl { font-size: .875rem; color: var(--muted); }
.emojibtn { justify-self: start; display: inline-flex; gap: 10px; align-items: center; }
.emo { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; }
.stats .emo { width: 28px; height: 28px; vertical-align: -4px; }
.emojipop { position: fixed; z-index: 50; width: min(360px, calc(100vw - 32px)); max-height: min(420px, 70vh); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.ephead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.epgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; margin-bottom: 12px; }
.epgrid button { height: 44px; border: 1px solid transparent; border-radius: 8px; background: var(--sunken); cursor: pointer; font-size: 1.375rem; display: grid; place-items: center; }
.epgrid button:hover, .epgrid button.on { border-color: var(--gold-fill); }
.epgrid img { width: 28px; height: 28px; object-fit: contain; }
.epgrid .note { grid-column: 1 / -1; font-size: .8125rem; color: var(--muted); }
.eptext { display: grid; gap: 6px; font-size: .875rem; color: var(--muted); }
.chips.ph button.emo-insert { font-family: inherit; }

.catchtable { display: grid; grid-template-columns: 2.2rem minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; margin-bottom: 8px; }
.catchtable .head { font-size: .875rem; color: var(--muted); }
.catchtable .em { font-size: 1.375rem; text-align: center; }
ol.board .sub { color: var(--muted); font-size: .875rem; font-weight: 400; }
@media (max-width: 760px) { .catchtable { grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); } .catchtable .nm { grid-column: 2 / -1; } .catchtable .head:nth-child(2) { display: none; } }

.shoprow { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 8rem); gap: 8px 10px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.shoprow:first-child { border-top: 0; padding-top: 0; }
.shoprow input[data-f="emoji"] { text-align: center; padding-left: 4px; padding-right: 4px; }
.shoprow .what { grid-column: 2 / -1; color: var(--muted); font-size: .875rem; }
.shoprow .sale { grid-column: 2 / -1; display: flex; gap: 8px; align-items: center; font-size: .9375rem; }
.shoprow .sale input { width: 18px; height: 18px; accent-color: var(--accent); }
.shoprow .sale .why { color: var(--gold); font-size: .875rem; }
@media (max-width: 760px) { .shoprow { grid-template-columns: 3rem minmax(0, 1fr); } .shoprow input[data-f="price"] { grid-column: 2; } }
/* Playing from Your Page */
.daily-line .btn { margin-left: auto; }
.pond { display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: var(--sunken); margin-top: 10px; }
.pondline { min-height: 1.5em; }
.pondline.bite { color: var(--gold); font-weight: 700; animation: bite .35s ease-in-out infinite alternate; }
@keyframes bite { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
.pondbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.reel { background: var(--gold-fill); border-color: var(--gold-fill); color: #241a02; }
.betrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.betrow label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9375rem; }
.betrow input { width: 8rem; }
.reels { display: flex; gap: 8px; margin-bottom: 12px; }
.reels span { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem; border-radius: 10px;
  background: var(--sunken); border: 1px solid var(--line); }
.reels.spinning span { animation: reel .12s linear infinite; }
@keyframes reel { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
.gameout { min-height: 1.5em; margin-top: 12px; }
.gameout .up { color: var(--accent); font-weight: 700; } .gameout .down { color: var(--danger); font-weight: 700; }
.mefeed { max-height: min(70vh, 720px); }
/* Your Page: play panels on the left (two columns on wide screens), Recent Coins down the right. */
.melayout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
.meplay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (min-width: 1100px) {
  .melayout { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
  .meside { position: sticky; top: 24px; }
  .meside .mefeed { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
}
@media (min-width: 1400px) { .meplay { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* The player: DJs (or admins) control playback; others watch, and add songs if the queue is open. */
body[data-dj="no"] .dj-only, body[data-add="no"] .add-only { display: none !important; }
.nodj-note { display: none; margin-top: 12px; }
body[data-dj="no"] .nodj-note { display: block; }
body[data-dj="no"] .progress { cursor: default; }
/* Gold edge, like the stat boxes: the player, quiz and trivia start/live panels, and Your Page games. */
.goldedge, #meGamePanel { position: relative; }
.goldedge::before, #meGamePanel::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-fill), transparent); }
@media (prefers-reduced-motion: reduce) { .pondline.bite, .reels.spinning span { animation: none; } }
/* Settings > Sound effects */
.fxlist li { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.fxlist li.fxextra { grid-template-columns: minmax(0, 1fr); }
.fxlist li.fxsection { display: block; }
.fxsection summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.fxsection summary::-webkit-details-marker { display: none; }
.fxsection summary::before { content: "▸"; color: var(--gold-fill); transition: transform .15s; }
.fxsection details[open] summary::before { transform: rotate(90deg); }
.fxsection .fxlist { margin: 10px 0 0 22px; }
.fxplay { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--sunken); color: var(--accent);
  cursor: pointer; font-size: .875rem; display: grid; place-items: center; transition: border-color .15s, transform .12s; }
.fxplay:hover { border-color: var(--gold-fill); }
.fxplay:active { transform: scale(.92); }
@media (max-width: 760px) { .fxlist li { grid-template-columns: auto minmax(0, 1fr); } }
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.me-head img { width: 56px; height: 56px; border-radius: 50%; background: var(--sunken); }
.me-head h1 { margin: 0; }
.daily-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--sunken); margin-bottom: 16px; }
.daily-line b { color: var(--gold); }
.meter { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; margin: 6px 0 4px; }
.meter i { display: block; height: 100%; background: var(--gold-fill); border-radius: 99px; transition: width .4s; }
ul.mine { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
ul.mine li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); }
ul.mine li:last-child { border-bottom: 0; }
ul.mine .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.mine .what small { color: var(--muted); margin-left: 6px; }
ul.mine .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
ul.mine .amt.up { color: var(--accent); } ul.mine .amt.down { color: var(--muted); }
#viewAsBox.on select { border-color: var(--gold-fill); box-shadow: 0 0 0 1px var(--gold-fill); }
.who { position: relative; }
.who-chip { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; min-width: 0; width: 100%;
  border: 1px solid transparent; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.who-chip:hover, .who-chip[aria-expanded="true"] { background: var(--sunken); border-color: var(--line); }
.who-chip .caret { color: var(--muted); font-size: .75rem; transition: transform .2s; }
.who-chip[aria-expanded="true"] .caret { transform: rotate(180deg); }
/* The account menu opens upward from the bottom of the sidebar (downward in the blocks top bar and on phones). */
.who-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 60; display: grid; gap: 2px; padding: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45);
  animation: menu-in .16s ease-out; }
.who-menu button { text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: none; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
.who-menu button:hover, .who-menu button:focus-visible { background: var(--sunken); }
#logout { color: var(--danger); }
@keyframes menu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
nav button[data-tab="settings"] { display: none; }  /* Settings lives in the account menu now */
@media (max-width: 760px) { .who-menu { bottom: auto; top: calc(100% + 6px); } }
@media (prefers-reduced-motion: reduce) { .who-menu { animation: none; } }
.who-chip img { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--sunken); }
.who-chip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 600; }
.who-chip .rl { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.btn.discord { background: #5865F2; border-color: #5865F2; color: #fff; justify-content: center; text-decoration: none; text-align: center; }
.btn.discord:hover { background: #4752c4; }
.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; display: grid; gap: 12px; }
.login h1 { font: 600 1.5rem/1.2 var(--display); letter-spacing: .04em; }

/* Toasts sit in the browser's top layer (popover), above every modal and menu, at the top of the screen. */
#toast {
  position: fixed; inset: 16px auto auto 50%; margin: 0; border: 0; transform: translateX(-50%); z-index: 1000;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 8px; box-shadow: 0 8px 30px rgb(0 0 0 / .35);
  max-width: min(92vw, 560px); width: max-content; overflow: visible; opacity: 0; pointer-events: none; transition: opacity .2s;
}
#toast:popover-open { display: block; }
/* Your wallet, always in view (sidebar footer, or the Blocks top bar) */
.wallet { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--sunken); color: var(--ink); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--gold-fill) 45%, transparent); }
.wallet:hover { border-color: var(--gold-fill); }
.wallet.debt { color: var(--danger); }
.wallet .emo { width: 1.1em; height: 1.1em; }
.wallet.bump { animation: walletBump .5s cubic-bezier(.34, 1.5, .55, 1); }
@keyframes walletBump { 40% { transform: scale(1.12); } }
.rail-foot > .wallet { margin-bottom: 8px; width: fit-content; }
#walletFloat { display: none; position: fixed; left: 12px; bottom: 12px; z-index: 57; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .6); }
#toast.show { opacity: 1; }
#toast.error { background: var(--danger); color: #fff; }

@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail, main { min-width: 0; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; gap: 12px;
    position: static; height: auto; overflow: visible; }
  nav { display: flex; overflow-x: auto; gap: 4px; }
  nav button { white-space: nowrap; padding: 10px 12px; }
  .nav-ind { border-left: 0; border-bottom: 3px solid var(--gold-fill); }
  nav button.sub { padding-left: 12px; }
  nav button.sub::before, nav button.sub::after { display: none; }
  .navhead { padding: 10px 2px 0 10px; align-self: center; font-size: .6875rem; white-space: nowrap; border-left: 1px solid var(--line); }
  .navhead:first-of-type { border-left: 0; padding-left: 0; padding-top: 10px; }
  .rail > nav { flex: none; overflow-y: visible; padding-bottom: 0; }
  .rail-foot { gap: 12px; padding-top: 12px; }
  .addrow, .logrow { grid-template-columns: minmax(0, 1fr); }
  .addrow #mQuery { grid-column: auto; }
  .logrow .check { grid-column: 1; }
  ol.queue li { grid-template-columns: 3ch minmax(0, 1fr) auto; }
  ol.queue .d { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Theme & Bot */
.thpacks .preset.active { border-color: var(--gold-fill); box-shadow: 0 0 0 1px var(--gold-fill) inset; }
.thcard { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sunken); margin-bottom: 16px; }
.thbanner { height: 84px; background: var(--gold-fill) center / cover no-repeat; }
.thbanner.empty { background: linear-gradient(135deg, var(--sunken), var(--line)); }
.thavatar { position: absolute; left: 16px; top: 44px; width: 72px; height: 72px; border-radius: 50%; border: 5px solid var(--sunken); background: var(--sunken); object-fit: cover; }
.thbody { padding: 40px 16px 14px; }
.thbody b { font-size: 1.1rem; }
.thbody p { margin: 6px 0 0; color: var(--muted); font-size: .875rem; white-space: pre-wrap; }

/* Channel Names */
#lyPanel { margin-top: 18px; }
.lysets .preset.active { border-color: var(--gold-fill); box-shadow: 0 0 0 1px var(--gold-fill) inset; }
.lysets .preset .lydel { justify-self: start; margin-top: 4px; font-size: .8rem; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.lybar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; }
.lyh { margin: 22px 0 4px; font-size: 1rem; }
.lymap { display: grid; gap: 4px; margin: 10px 0 14px; }
.lymap .lyg { margin: 12px 0 2px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lyrow { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.lyrow select { min-height: 34px; padding: 4px 8px; }
.lyrow .to { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyrow .to.same { color: var(--muted); }
@media (max-width: 640px) { .lyrow { grid-template-columns: 1fr; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); } }
