.ws-host [hidden] { display: none !important; }
.ws-part { display: contents; }
@container (max-width: 700px) {
  .ws-flow .ws-main, .ws-flow .ws-side { display: contents; }
  .ws-flow .first { order: -1; }
}
:is(.lobby-board, .rw-page, .trn-page, .ref-page, .gw-page, .sg-page, .lb-page, .bd-page, .trade-page, .pf-page, .st-page, .cw-page, .law-page, .donate-page, .app-page) .panel { container: pane / inline-size; }
.hb-tabs .tabs { margin-bottom: 0; }
.hb-tabs .seg { max-width: 100%; }
@media (max-width: 600px) {
  :is(.lobby-board, .rw-page, .trn-page, .ref-page, .gw-page, .sg-page, .lb-page, .bd-page, .trade-page, .pf-page, .cl-wrap, .st-page, .cw-page, .law-page, .donate-page, .app-page) .hb-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.lobby-board { max-width: 1200px; }
.lob-face { flex: none; }
.lob-face .av { display: block; border-radius: 16px; box-shadow: 0 10px 24px -12px var(--glow), 0 0 0 2px color-mix(in srgb, var(--sec, var(--accent)) 45%, transparent); }
.lob-hero .hb-name h1 .uname { font-size: inherit; max-width: 100%; }
.lob-hero .hb-name h1 .uname .nm { overflow: hidden; text-overflow: ellipsis; }
.lob-mark { flex: none; width: 46px; height: 46px; filter: drop-shadow(0 8px 18px var(--glow)); }
.lob-lv { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.lob-lv-bar { flex: 1; min-width: 36px; height: 6px; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-soft); overflow: hidden; }
.lob-lv-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.lob-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lob-ready .lobby-tile { padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 30%, var(--surface-2)); }
.lob-ready .lt-icon { width: 38px; height: 38px; border-radius: 11px; }
.lob-live { display: flex; flex-direction: column; }
.lob-live-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: inherit; border-radius: 10px; }
.lob-live-row + .lob-live-row { border-top: 1px solid var(--line-soft); }
.lob-live-row:hover .lob-live-text b { color: var(--accent-2); }
.lob-live-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); }
.lob-live-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lob-live-text b { font-size: 14px; transition: color 0.15s; }
.lob-live-text small { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.lob-live-when { display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-variant-numeric: tabular-nums; }
.lob-live-when small { font-size: 11px; font-weight: 700; color: var(--faint); }
.lob-live-row > .coin { font-weight: 800; }
.lobby-board .front-post { margin: 0; }
.lobby-board .front-post .panel-head:not(:has(h2)) { margin-bottom: 4px; }
.lob-post { display: contents; }
.lob-polls { display: contents; }
.lob-polls .poll-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
.lob-polls .poll + .poll { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.lob-polls .poll-q { font-size: 14px; }

.rw-claims { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rw-claim { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 30%, var(--surface-2)); border: 1px solid var(--line-soft); }
.rw-claim.ready { border-color: color-mix(in srgb, var(--up) 45%, var(--line-soft)); box-shadow: 0 12px 28px -22px var(--up); }
.rw-claim.ready .rw-icon { background: var(--up-soft); color: var(--up); }
.rw-claim .rw-icon { width: 40px; height: 40px; border-radius: 12px; }
.rw-claim > .btn { margin-top: auto; }
.rw-level { display: flex; flex-direction: column; gap: 12px; }
.rw-friend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rw-friend > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.rw-friend small { font-size: 11px; font-weight: 700; color: var(--faint); }
.rw-friend b, .rw-friend .coin { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.rw-page .spin-card { grid-template-columns: 168px minmax(0, 1fr); gap: 18px; }
.rw-page .spin-holder { width: 168px; height: 168px; }
.rw-page .spin-side { gap: 8px; }
.rw-page .xp-list { padding: 0; border: 0; background: none; box-shadow: none; }
.rw-page .play-steps { margin-top: 0; }
@container pane (max-width: 430px) {
  .rw-page .spin-card { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .rw-page .spin-side { width: 100%; }
  .rw-page .play-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.trn-page .trn-list { margin: 0; gap: 14px; }
.trn-dones { display: flex; flex-direction: column; }
.trn-done + .trn-done { border-top: 1px solid var(--line-soft); }
.trn-done-top { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.trn-done-top::-webkit-details-marker { display: none; }
.trn-done-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--money-soft); color: var(--money); }
.trn-done-name { display: flex; flex-direction: column; min-width: 0; }
.trn-done-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.trn-done-name small { font-size: 12px; color: var(--faint); }
.trn-done-top .coin { font-weight: 800; font-size: 13px; }
.trn-done-chev { flex: none; color: var(--faint); transition: transform 0.2s var(--ease); }
.trn-done[open] .trn-done-chev { transform: rotate(180deg); }
.trn-done .trn-card { padding: 2px 0 14px; border: 0; border-radius: 0; background: none; box-shadow: none; opacity: 1; }
.trn-done .trn-top > .rw-icon, .trn-done .trn-top > div > b { display: none; }
@container pane (max-width: 440px) {
  .trn-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ref-page .ref-hero { gap: 12px; }
.ref-page .ref-link { padding: 14px; font-size: 15px; }
.ref-page .ref-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ref-page .ref-people { margin-top: 0; }
.ref-page .ref-person:first-child { border-top: 0; }
.ref-page .ref-person { border-top-color: var(--line-soft); padding: 10px 0; }

.gw-page .gw-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gw-page .gw-grid > .empty { grid-column: 1 / -1; }
.gw-card { padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 30%, var(--surface-2)); border: 1px solid var(--line-soft); }
.gw-card.in { border-color: color-mix(in srgb, var(--up) 40%, var(--line-soft)); }
.gw-page .ws-side .col { gap: 0; }
.gw-past { padding: 10px 0; }
.gw-past + .gw-past { border-top: 1px solid var(--line-soft); }
.gw-page .gw-winners { justify-content: flex-start; }

.sg-page .ws-main .col { gap: 0; }
.sg-row { padding: 12px 0; }
.sg-row + .sg-row { border-top: 1px solid var(--line-soft); }
.sg-row:first-child { padding-top: 0; }
.sg-page .sg-new .select { width: 100%; }

.lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin-top: 16px; }
.lb-pod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 14px 10px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--medal) 40%, var(--line-soft));
  background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 12%, transparent), transparent 70%), color-mix(in srgb, var(--bg) 45%, var(--surface-2));
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s;
}
.lb-pod:hover { transform: translateY(-2px); border-color: var(--medal); }
.lb-pod.p1 { order: 2; padding-top: 20px; padding-bottom: 16px; }
.lb-pod.p2 { order: 1; }
.lb-pod.p3 { order: 3; }
.lb-pod-place { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--medal); }
.lb-pod-face .av { display: block; border-radius: 16px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--medal) 60%, transparent), 0 12px 24px -14px var(--medal); }
.lb-pod-name { display: flex; justify-content: center; min-width: 0; max-width: 100%; font-weight: 750; }
.lb-pod-name .uname { max-width: 100%; }
.lb-pod-name .uname .nm { overflow: hidden; text-overflow: ellipsis; }
.lb-pod-score { display: flex; justify-content: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-you { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 45%, var(--surface-2)); border: 1px solid var(--line-soft); }
.lb-you:empty { display: none; }
.lb-you small { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.lb-you b { font-size: 17px; font-variant-numeric: tabular-nums; }
.lb-you-score { display: flex; font-weight: 700; color: var(--muted); }
.lb-rows { display: flex; flex-direction: column; gap: 2px; }
.lb-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color 0.15s; }
.lb-row:not(:has(.lb-lvl)) { grid-template-columns: 34px minmax(0, 1fr) auto; }
.lb-row:hover { background: var(--hover); }
.lb-row.me { background: color-mix(in srgb, var(--accent) 11%, transparent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.lb-rank { text-align: center; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.lb-row.top .lb-rank { color: var(--medal); }
.lb-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-who .av { flex: none; border-radius: 9px; }
.lb-who .uname { min-width: 0; max-width: 100%; }
.lb-who .uname .nm { overflow: hidden; text-overflow: ellipsis; }
.lb-lvl { font-size: 12px; font-weight: 700; color: var(--faint); white-space: nowrap; }
.lb-score { display: flex; justify-content: flex-end; min-width: 64px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-page .lb-hits tr.me td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
@media (max-width: 600px) {
  .lb-podium { gap: 6px; }
  .lb-pod { padding: 10px 6px; }
  .lb-pod.p1 { padding-top: 14px; padding-bottom: 12px; }
  .lb-pod-face .av { width: 44px; height: 44px; border-radius: 12px; }
  .lb-pod.p1 .lb-pod-face .av { width: 54px; height: 54px; }
  .lb-pod-score { font-size: 13px; }
  .lb-row { gap: 8px; padding: 8px 6px; grid-template-columns: 26px minmax(0, 1fr) auto; }
  .lb-lvl { display: none; }
}

.bd-list { display: flex; flex-direction: column; }
.bd-row { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 2px; }
.bd-row + .bd-row { border-top: 1px solid var(--line-soft); }
.bd-row .bd-face { flex: none; margin: 0; }
.bd-row .bd-face .av { display: block; border-radius: 12px; }
.bd-row .bd-face .pdot { right: -3px; bottom: -3px; width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--surface); }
.bd-row.away .bd-face { filter: grayscale(0.55); opacity: 0.8; }
.bd-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bd-who .uname { max-width: 100%; font-weight: 750; }
.bd-who .bd-state { font-size: 12px; }
.bd-row .bd-acts { display: flex; gap: 4px; margin: 0; border: 0; align-self: center; }
.bd-row .bd-act { flex-direction: row; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; }
.bd-row .bd-act + .bd-act { border-left: 0; }
.bd-row .bd-drop { position: static; flex: none; opacity: 0.5; }
.bd-row:hover .bd-drop, .bd-row .bd-drop:focus-visible { opacity: 1; }
@container pane (max-width: 520px) {
  .bd-row .bd-act span { display: none; }
  .bd-row .bd-act { padding: 8px; }
}
.bd-page .bd-quiet { padding: 14px; }
.bd-n.hot { background: var(--accent); color: var(--accent-ink); }
.bd-asks { display: flex; flex-direction: column; gap: 8px; }
.bd-asks .bd-ask { width: 100%; flex-wrap: wrap; row-gap: 8px; padding: 10px; border-radius: 14px; }
.bd-asks .bd-ask-who { flex: 1 1 calc(100% - 56px); margin: 0; }
.bd-asks .bd-ask-who .uname { max-width: 100%; }
.bd-asks .bd-ask > .btn-success { flex: 1; margin-left: 50px; }
.bd-asking { border-color: var(--accent-line); }
.bd-page .bd-add { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-page .bd-pick { flex: 1 1 150px; }
.bd-page .bd-sent { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
.bd-page .bd-chip { display: flex; padding: 5px 6px; border-radius: 12px; }
.bd-page .bd-chip > span:not(.spacer) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-page .bd-chip .av { flex: none; border-radius: 7px; }

.trade-list { display: flex; flex-direction: column; gap: 12px; }
.trade-card { padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 35%, var(--surface)); border: 1px solid var(--line-soft); }
.trade-card.incoming { border-color: color-mix(in srgb, var(--money) 35%, var(--line-soft)); }
.trade-dones { display: flex; flex-direction: column; }
.trade-done + .trade-done { border-top: 1px solid var(--line-soft); }
.trade-done[open] { padding-bottom: 12px; }
.trade-done-top { display: flex; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; list-style: none; }
.trade-done-top::-webkit-details-marker { display: none; }
.trade-done-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.trade-done-who > .icon { flex: none; color: var(--faint); }
.trade-done-who .uname { min-width: 0; max-width: 150px; }
.trade-done-who .uname .nm { overflow: hidden; text-overflow: ellipsis; }
.trade-done-val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trade-done-top .chip { flex: none; }
.trade-done-top .tiny { flex: none; white-space: nowrap; }
.trade-done-chev { flex: none; color: var(--faint); transition: transform 0.2s var(--ease); }
.trade-done[open] .trade-done-chev { transform: rotate(180deg); }
.trade-start { display: flex; flex-direction: column; gap: 8px; }
@container pane (min-width: 640px) {
  .trade-done-who .uname { max-width: 240px; }
}
@container pane (max-width: 470px) {
  .trade-page .trade-cols { grid-template-columns: minmax(0, 1fr); }
  .trade-done-top .tiny, .trade-done-top .chip { display: none; }
  .trade-page .trade-who .ulvl, .trade-done-who .ulvl { display: none; }
}

.pf-code { display: block; padding: 10px 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line-soft); word-break: break-all; }
.pf-seeds { display: grid; gap: 14px; }
.pf-verify { display: flex; flex-direction: column; gap: 10px; }
.pf-out { margin: 0; padding: 12px; max-height: 340px; overflow: auto; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-soft); color: var(--muted); }
.pf-page .hb-stat .mono { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 14px; }

.cl-wrap { max-width: 980px; }
.cl-nav { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cl-majors { align-self: flex-start; }
.cl-lines-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cl-lines-nav::-webkit-scrollbar { display: none; }
.cl-chip { flex: none; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-soft); background: color-mix(in srgb, var(--bg) 45%, var(--surface-2)); color: var(--muted); font: inherit; font-family: var(--mono); font-size: 12px; font-weight: 700; cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.cl-chip:hover { color: var(--text); border-color: var(--line); }
.cl-chip.on { color: var(--accent-ink); background: var(--sec, var(--accent)); border-color: transparent; }
.cl-tl { position: relative; display: flex; flex-direction: column; gap: 12px; }
.cl-tl::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 67px; width: 2px; border-radius: 2px; background: linear-gradient(var(--line), var(--line-soft) 80%, transparent); }
.cl-item { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; align-items: start; scroll-margin-top: 14px; }
.cl-rail { position: relative; min-height: 44px; padding: 16px 24px 0 0; text-align: right; }
.cl-dot { position: absolute; top: 18px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: border-color 0.2s, background-color 0.2s; }
.cl-item:has(.cl-entry[open]) .cl-dot { border-color: var(--sec, var(--accent)); }
.cl-item.latest .cl-dot { background: var(--sec, var(--accent)); border-color: var(--sec, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sec, var(--accent)) 22%, transparent); }
.cl-rail .cl-ver { display: block; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cl-item.latest .cl-ver { color: var(--text); }
.cl-wrap .cl-entry { padding: 0; border-radius: 18px; border: 1px solid var(--line-soft); background: var(--sheen), var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.cl-wrap .cl-entry[open] { border-color: color-mix(in srgb, var(--sec, var(--accent)) 28%, var(--line-soft)); }
.cl-wrap .cl-top { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 16px; }
.cl-head { display: flex; align-items: center; gap: 10px; }
.cl-wrap .cl-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.cl-wrap .cl-intro { display: block; margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.cl-groups { display: grid; gap: 14px; padding: 14px 16px 16px; border-top: 1px solid var(--line-soft); }
.cl-wrap .cl-group { margin: 0; }
.cl-wrap .cl-name { display: inline-block; margin-bottom: 7px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.cl-group[data-kind="new"] .cl-name { color: var(--up); background: var(--up-soft); }
.cl-group[data-kind="big"] .cl-name { color: var(--accent-2); background: var(--accent-soft); }
.cl-group[data-kind="new"] .cl-lines li::marker { color: var(--up); }
.cl-group[data-kind="small"] .cl-lines li::marker { color: var(--faint); }
@media (max-width: 600px) {
  .cl-tl::before { left: 9px; }
  .cl-item { grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
  .cl-rail { padding: 0; min-height: 0; }
  .cl-rail .cl-ver { display: none; }
  .cl-dot { right: auto; left: 4px; }
}

.st-page .ws-host + .ws-host { margin-top: 14px; }
.st-page .panel { scroll-margin-top: 14px; }
.st-index { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.st-index::-webkit-scrollbar { display: none; }
.st-jump { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-soft); background: color-mix(in srgb, var(--bg) 45%, var(--surface-2)); color: var(--muted); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.st-jump:hover { color: var(--text); border-color: var(--line); }
.st-jump.on { color: var(--accent-ink); background: var(--sec, var(--accent)); border-color: transparent; }
.st-page .panel-head + .setting-row { padding-top: 4px; }
.cl-ver-in { display: none; flex: none; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted); }
@media (max-width: 600px) {
  .cl-ver-in { display: inline-block; }
}

.hero-band.cw-crest { --sec: var(--crew); }
.cw-crest .hb-top > .cw-tag.big { min-width: 54px; padding: 9px 11px; font-size: 18px; }
.cw-crest .hb-actions .cw-tagsw { margin: 0; }
.cw-stat-crew { display: flex; align-items: center; gap: 8px; }
.cw-page .ws-main > .cw-mine { margin: 0; }
.cw-page .panel-head + .cw-row, .cw-page .panel-head + .cw-member, .cw-page .panel-head + .cw-stand, .cw-page .panel-head + .cw-war-line { border-top: 0; }
.cw-page .panel-head + .cw-upgrade { border-top: 0; padding-top: 0; }
.cw-page .cw-member.me { background: var(--accent-soft); }
.cw-clock { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cw-war-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--down-soft); color: var(--down); }
.cw-page .wr-card { padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 30%, var(--surface-2)); border: 1px solid var(--line-soft); }
.wr-results { display: flex; flex-direction: column; gap: 2px; }
.cw-page .panel.wr-event { border-color: color-mix(in srgb, var(--money) 35%, var(--line-soft)); }
.cw-page .ws-side .cw-stand-name { flex: 1; }
@container pane (max-width: 420px) {
  .cw-page .cw-row .cw-row-num:nth-of-type(2) { display: none; }
  .cw-page .wr-match { flex-wrap: wrap; }
}

.law-page { display: block; }
.law-docket-seg { margin-bottom: 10px; }
.law-docket-seg .seg { width: 100%; }
.law-page .law-list .law-row { border-top-color: var(--line-soft); border-radius: 10px; }
.law-duty.due { border-color: color-mix(in srgb, var(--money) 45%, var(--line-soft)); box-shadow: 0 14px 30px -24px var(--money); }
.law-duty .law-record { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.law-duty .law-record b { font-size: 18px; }
.law-duty .law-list + .law-record, .law-duty .small + .law-record { margin-top: 12px; }
.law-wl { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.law-wl .up { color: var(--up); }
.law-wl .down { color: var(--down); }
.law-file { display: flex; flex-direction: column; gap: 12px; max-width: none; }
.law-file-seg .seg { width: 100%; }
@container pane (max-width: 480px) {
  .law-page .law-row { flex-wrap: wrap; row-gap: 6px; }
  .law-page .law-row-side { flex: 1 1 100%; justify-content: flex-start; padding-left: 46px; }
}
.law-hero .hb-stats { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.law-seat.empty { padding: 0; width: 38px; height: 38px; text-align: center; border-radius: 50%; }
.law-hero .hb-name h1 { white-space: normal; overflow-wrap: anywhere; font-size: 22px; line-height: 1.2; }
.law-hero .hb-top { align-items: flex-start; }
.law-hero .hb-icon { margin-top: 2px; }
.law-hero.loan { --sec: var(--money); }
.law-hero .hb-actions { align-items: center; }
.law-party { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--accent-2); background: var(--accent-soft); }
.law-party.defendant { color: var(--money); background: var(--money-soft); }
.law-page .law-statements { margin-top: 0; }
.law-page .law-events { position: relative; display: flex; flex-direction: column; gap: 0; }
.law-page .law-events::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 6px; width: 2px; border-radius: 2px; background: var(--line-soft); }
.law-page .law-event { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 13px; }
.law-event-dot { position: relative; top: 1px; justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.law-event:first-child .law-event-dot { border-color: var(--sec, var(--accent)); background: var(--sec, var(--accent)); }
.law-event-text { min-width: 0; overflow-wrap: anywhere; }
.law-event .tiny { white-space: nowrap; }
.law-page .panel.law-vote.duty { border-color: var(--money); box-shadow: inset 0 0 0 1px var(--money); }
.law-page .law-jury .law-seats { margin-top: 12px; }

.wrap.donate-page { max-width: 940px; }
.donate-page .donate-card { gap: 12px; }
.donate-page .donate-perk { padding: 18px 12px 14px; }
.donate-page .panel.donate-thanks { padding: 30px 20px; }

.wrap.app-page { max-width: 940px; }
.app-page .app-card { gap: 14px; }
.app-page .app-top { flex-direction: column; align-items: flex-start; gap: 12px; }
.app-page .app-top h2 { font-size: 18px; }
.app-tabs { max-width: 100%; }
@media (max-width: 560px) {
  .app-tabs.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
}

.prof-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.prof-level { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.prof-level-top { display: flex; align-items: baseline; gap: 8px; }
.prof-level-top b { font-size: 15px; }
.prof-level-top span { font-size: 12.5px; font-weight: 750; color: var(--muted); }
.prof-level small { font-size: 11.5px; color: var(--faint); }
.prof-cols { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; align-items: start; }
.prof-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.prof-main > * { margin: 0; }
.prof-aside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.prof-sheet .prof-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.prof-sheet .prof-stats > * { padding: 10px 12px; }
.prof-chips, .prof-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.prof-best { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.prof-best-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prof-shelf .row { align-items: center; }
.prof-actions { padding-top: 14px; border-top: 1px solid var(--line-soft); }
@media (max-width: 700px) {
  .prof-cols { grid-template-columns: minmax(0, 1fr); }
  .prof-aside { order: -1; }
}
@media (max-width: 560px) {
  .prof-sheet .prof-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
