@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=M+PLUS+Rounded+1c:wght@400;700;800&display=swap');

:root {
  --night: #1a1433;
  --panel: #251d4a;
  --panel-2: #2f2560;
  --line: #43377d;
  --paper: #f6f2ff;
  --muted: #a99fd6;
  --sakura: #ff5c9d;
  --volt: #3fe0ff;
  --gold: #ffc93d;
  --danger: #ff4d6d;
  --ok: #5cf2a4;
  --c-tank: #3fe0ff;
  --c-striker: #ff6fa8;
  --c-trickster: #b58cff;
  --display: 'Dela Gothic One', 'Arial Black', Impact, sans-serif;
  --body: 'M PLUS Rounded 1c', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  background: var(--night);
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(1200px 600px at 85% -10%, #3b1f63 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #123a5c 0%, transparent 60%), var(--night);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--volt);
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 2px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: blur(8px);
}
.wordmark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--paper);
  transform: skewX(-8deg);
  display: inline-block;
}
.wordmark span {
  color: var(--sakura);
}
nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
nav a.active {
  color: var(--night);
  background: var(--paper);
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.me img,
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel-2);
}
.coins {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--gold);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.me select.server-pick {
  width: auto;
  max-width: 180px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.link-btn {
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  padding: 0;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 40px) 80px;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(36px, 7vw, 72px);
  transform: skewX(-6deg);
}
h2 {
  font-size: clamp(24px, 3.5vw, 34px);
}
p {
  max-width: 64ch;
}
.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 17px;
  background: var(--sakura);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 0 #b3306a;
  transition: transform 0.08s;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #b3306a;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.ghost {
  background: var(--panel-2);
  box-shadow: 0 4px 0 #1a1340;
}
.btn.small {
  padding: 8px 14px;
  font-size: 15px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.row > * {
  flex: 1 1 300px;
  min-width: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: start;
}
.row.tight {
  gap: 10px;
}
.sub {
  font-weight: 400;
  font-size: 14px;
}
.stack > * + * {
  margin-top: 16px;
}

.countdown {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 60px);
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  line-height: 1;
}

/* ---- Cards ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}
.card {
  --rc: var(--c-tank);
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  border: 2px solid var(--rc);
  display: flex;
  flex-direction: column;
}
.card[data-class='striker'] {
  --rc: var(--c-striker);
}
.card[data-class='trickster'] {
  --rc: var(--c-trickster);
}
.card .art {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  width: 100%;
}
.card .info {
  padding: 10px 12px 12px;
  font-size: 14px;
}
.card .name {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.1;
}
.card .title {
  color: var(--muted);
  font-size: 13px;
}
.card .class-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--rc);
  color: var(--night);
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: capitalize;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 12px;
  margin: 8px 0;
}
.stats b {
  display: block;
  font-size: 15px;
}
.ability {
  font-size: 13px;
  color: var(--muted);
}
.ability b {
  color: var(--paper);
}
.ability + .ability {
  margin-top: 6px;
}
.ability .condition-icon {
  margin-right: 2px;
}
.condition[data-tip] {
  cursor: help;
  color: var(--paper);
  text-decoration: underline dotted color-mix(in srgb, var(--paper) 50%, transparent);
  text-underline-offset: 3px;
}
.ability .trigger {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--night);
  color: var(--gold);
  vertical-align: 1px;
}

.reveal {
  display: grid;
  place-items: center;
  min-height: 200px;
}
.reveal .card {
  width: 220px;
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.payout {
  text-align: center;
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.payout .amount {
  font-family: var(--display);
  font-size: 44px;
  color: var(--gold);
}
.payout.big .amount {
  font-size: 60px;
  text-shadow: 0 0 24px var(--gold);
}
@keyframes pop {
  from {
    transform: scale(0.4) rotate(-8deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* ---- Lineup ---- */
.lineup-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    'picker lines'
    'picker info';
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}
.fighter-picker {
  grid-area: picker;
  position: sticky;
  top: calc(var(--topbar-h, 0px) + 16px);
  height: calc(100dvh - var(--topbar-h, 0px) - 32px);
  max-height: 900px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.fighter-picker .filters {
  margin-bottom: 10px;
}
.fighter-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 2px;
}
.fighter-row {
  --rc: var(--c-tank);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  height: 76px;
  overflow: hidden;
  background: var(--panel-2);
  border: 2px solid transparent;
  border-left: 4px solid var(--rc);
  border-radius: 12px;
  cursor: grab;
  user-select: none;
  -webkit-touch-callout: none;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.fighter-row[data-class='striker'],
.line-card[data-class='striker'],
.fighter-info[data-class='striker'] {
  --rc: var(--c-striker);
}
.fighter-row[data-class='trickster'],
.line-card[data-class='trickster'],
.fighter-info[data-class='trickster'] {
  --rc: var(--c-trickster);
}
.fighter-row:hover {
  border-color: var(--line);
  border-left-color: var(--rc);
}
.fighter-row.selected {
  border-color: var(--rc);
  background: color-mix(in srgb, var(--rc) 14%, var(--panel-2));
}
.fighter-row:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}
.fighter-row .slice {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}
.fighter-row.picked .slice {
  filter: saturate(0.4) brightness(0.6);
}
.fighter-row .meta {
  padding: 6px 10px;
  min-width: 0;
}
.fighter-row .name {
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.class-tag {
  color: var(--rc);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}
.mini-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.mini-stats b {
  color: var(--paper);
}
.mini-stats .up b {
  color: var(--ok);
}
.mini-stats .down b {
  color: var(--muted);
}
.in-tag {
  display: inline-block;
  vertical-align: 2px;
  background: var(--gold);
  color: var(--night);
  font-family: var(--body);
  font-weight: 800;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
}
.fighter-row.pressed {
  transform: scale(0.97);
}
.lineup-lines {
  grid-area: lines;
}
.lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.line {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.line.front {
  border-color: var(--volt);
}
.line.drop-over {
  border-color: var(--gold);
  background: var(--panel-2);
}
.line h3 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  font-size: 20px;
}
.line .sub {
  margin: 0 0 10px;
}
.line-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 100px));
  gap: 8px;
  min-height: 100px;
}
.line-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  border: 2px dashed var(--line);
  border-radius: 14px;
  font-size: 14px;
}
.line-card {
  --rc: var(--c-tank);
  position: relative;
  text-align: center;
  background: var(--panel-2);
  border: 2px solid var(--rc);
  border-radius: 14px;
  padding: 6px;
  font-size: 13px;
  cursor: grab;
  user-select: none;
  -webkit-touch-callout: none;
}
.line-card.selected {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 45%, transparent);
}
.line-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.line-card .name {
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-card .bench {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--night);
  color: var(--muted);
  line-height: 1;
}
.line-card .bench:hover {
  color: var(--paper);
}
.lineup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.lineup-bar .btn {
  white-space: nowrap;
}
.lineup-bar .field {
  flex: 0 1 220px;
  padding: 6px 10px;
}
.lineup-bar #lineupStatus {
  flex: 1;
}
.lineup-chips {
  margin-bottom: 0;
}
.lineup-shelf {
  margin-bottom: 16px;
}
.shelf-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.shelf-head h3 {
  margin: 0;
}
.shelf-head .muted {
  font-size: 14px;
}
.shelf {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x proximity;
}
.lineup-tile {
  flex: 0 0 168px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}
.lineup-tile:hover:not(:disabled) {
  border-color: var(--muted);
  transform: translateY(-2px);
}
.lineup-tile[aria-pressed='true'] {
  border-color: var(--sakura);
  background: color-mix(in srgb, var(--sakura) 14%, var(--panel));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sakura) 30%, transparent);
}
.lineup-tile .faces {
  display: flex;
  gap: 4px;
}
.lineup-tile .face {
  --rc: var(--c-tank);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 2px solid var(--rc);
  overflow: hidden;
}
.lineup-tile .face[data-class='striker'] {
  --rc: var(--c-striker);
}
.lineup-tile .face[data-class='trickster'] {
  --rc: var(--c-trickster);
}
.lineup-tile .face.empty {
  border: 2px dashed var(--line);
  background: transparent;
}
.lineup-tile .face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
.lineup-tile .tile-name {
  max-width: 100%;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lineup-tile .tile-meta {
  font-size: 12px;
  color: var(--muted);
}
.lineup-tile.dirty .tile-meta {
  color: var(--gold);
}
.lineup-tile .new-tag {
  background: var(--sakura);
  color: var(--night);
  font-weight: 800;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: 1px;
}
.lineup-tile.add {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  border-color: var(--sakura);
  background: transparent;
}
.lineup-tile.add .plus {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--sakura);
  color: var(--night);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.lineup-tile.add:hover:not(:disabled) {
  border-color: var(--sakura);
  background: color-mix(in srgb, var(--sakura) 10%, transparent);
}
.lineup-tile.add:disabled {
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 0.6;
}
.lineup-tile.add:disabled .plus {
  background: var(--line);
}
.stat-bars {
  display: grid;
  gap: 6px;
  max-width: 420px;
  margin: 16px 0;
}
.stat-bar {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px 46px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: help;
}
.stat-bar .key {
  font-weight: 800;
  color: var(--muted);
}
.stat-bar .track {
  display: block;
  width: 100%;
  height: 10px;
  overflow: visible;
  border-radius: 999px;
  background: var(--night);
}
.stat-bar .fill {
  fill: var(--rc);
}
.stat-bar .avg {
  fill: var(--paper);
  stroke: var(--night);
  stroke-width: 1;
}
.stat-legend .avg-mark {
  width: 2px;
  height: 12px;
  background: var(--paper);
  border-radius: 1px;
}
.stat-bar b {
  font-size: 18px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stat-bar .diff {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.stat-bar.up .diff {
  color: var(--ok);
}
.stat-bar.down .diff {
  color: var(--danger);
}
.stat-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.lineup-chips .chip {
  text-transform: none;
}
.fighter-info {
  --rc: var(--c-tank);
  grid-area: info;
  display: grid;
  grid-template-columns: clamp(180px, 34%, 300px) minmax(0, 1fr);
  overflow: hidden;
  background: var(--panel);
  border: 2px solid var(--rc);
  border-radius: 18px;
}
.fighter-info .art {
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: 50% 15%;
}
.fighter-info .body {
  padding: 18px 22px;
}
.fighter-info .class-badge {
  display: inline-block;
  background: var(--rc);
  color: var(--night);
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: capitalize;
}
.fighter-info .name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  margin: 8px 0 0;
}
.fighter-info .title {
  color: var(--muted);
}
.fighter-info .ability {
  font-size: 15px;
}
.fighter-info .ability + .ability {
  margin-top: 12px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.chip {
  --rc: var(--paper);
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 13px;
  text-transform: capitalize;
}
.chip[data-class='tank'] {
  --rc: var(--c-tank);
}
.chip[data-class='striker'] {
  --rc: var(--c-striker);
}
.chip[data-class='trickster'] {
  --rc: var(--c-trickster);
}
.chip[aria-pressed='true'] {
  border-color: var(--rc);
  background: var(--rc);
  color: var(--night);
}
.drag-source {
  opacity: 0.4;
}
body.dragging {
  cursor: grabbing;
  user-select: none;
}
.drag-ghost {
  position: fixed;
  z-index: 100;
  width: 120px;
  pointer-events: none;
  transform: translate(-50%, -60%) rotate(-4deg);
  filter: drop-shadow(0 8px 16px rgb(0 0 0 / 0.5));
}
@media (max-width: 1100px) {
  .fighter-info {
    grid-template-columns: 1fr;
  }
  .fighter-info .art {
    height: 300px;
    min-height: 0;
    aspect-ratio: auto;
  }
}
@media (max-width: 820px) {
  .lineup-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: 'lines' 'picker' 'info';
  }
  .fighter-picker {
    position: static;
    height: auto;
  }
  .lineup-lines {
    position: sticky;
    top: var(--topbar-h, 0px);
    z-index: 5;
    margin: 0 -16px;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--night) 92%, transparent);
    backdrop-filter: blur(8px);
  }
  .fighter-list {
    max-height: 55vh;
  }
}
@media (max-width: 560px) {
  .line {
    padding: 8px;
  }
  .line h3 {
    font-size: 16px;
  }
  .line .sub {
    display: none;
  }
  .line-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    min-height: 72px;
  }
  .line-card {
    padding: 3px;
  }
  .line-card .name {
    font-size: 11px;
  }
  .line-card .bench {
    width: 20px;
    height: 20px;
    top: 2px;
    right: 2px;
  }
}
select,
.field {
  width: 100%;
  font: inherit;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--paper);
}
.list-item input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--sakura);
}
.list-item:has(input:disabled) {
  opacity: 0.55;
}

/* ---- Lists / bracket ---- */
.list {
  display: grid;
  gap: 10px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.list-item .grow {
  flex: 1;
  font-weight: 700;
}
.countdown.inline {
  font-size: 28px;
  vertical-align: -2px;
}
.champions {
  font-family: var(--display);
  font-size: 26px;
  color: var(--gold);
  line-height: 1.3;
}
.bracket {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.bracket-round {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bracket-round h3 {
  margin: 0;
}
.bracket-slots {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-around;
}
.bm {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 15px;
}
.bm .p {
  padding: 2px 0;
  font-weight: 700;
}
.bm .p.bye,
.bm .p.tbd {
  color: var(--muted);
  font-weight: 400;
}
.bm .p.you {
  color: var(--volt);
}
.bm .p.win {
  color: var(--gold);
  font-weight: 800;
}
.bm .p.lose {
  color: var(--muted);
  text-decoration: line-through;
}
.bm .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.badge {
  display: inline-block;
  min-width: 1.5em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--sakura);
  color: var(--night);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.lineup-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.preview-card {
  width: 110px;
  padding: 8px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.preview-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.preview-card .name {
  font-weight: 700;
}
.status-live {
  color: var(--sakura);
  font-weight: 800;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--night);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  z-index: 50;
  max-width: 90vw;
}
.toast.error {
  background: var(--danger);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
  }
}
.ability.off b {
  text-decoration: line-through;
  color: var(--muted);
}
.ability.off {
  opacity: 0.6;
}
.ability .skill-note {
  font-size: 11px;
  font-weight: 800;
  color: var(--sakura);
}

.flush {
  margin: 0;
}
.heading-row {
  align-items: baseline;
}
.heading-row > * {
  flex: 0 1 auto;
}
.dev-login {
  max-width: 420px;
}
.dev-login > .field {
  flex: 1;
}

/* ---- Tooltips ---- */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  max-width: min(260px, calc(100vw - 16px));
  pointer-events: none;
  animation: tip-in 0.12s ease-out;
}
.tooltip.wide {
  max-width: min(400px, calc(100vw - 16px));
}
@keyframes tip-in {
  from {
    opacity: 0;
  }
}
.tip-text {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--night);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  font-weight: 700;
}
