/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
:root {
  --ink: #0f1117;
  --ink-2: #171a23;
  --ink-3: #1f2330;
  --line: #2c3142;
  --parchment: #ece3cf;
  --muted: #9aa0b0;
  --gold: #c9a227;
  --gold-dim: #8a721d;
  --red: #c4543f;
  --green: #5a9e6f;
  --blue: #5b87c9;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2030 0%, var(--ink) 60%);
  color: var(--parchment);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

h1,
h2,
h3,
.display {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  letter-spacing: 0.01em;
}

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.brand h1 {
  font-size: 1.9rem;
  margin: 0;
  color: var(--parchment);
}
.brand .spark {
  color: var(--gold);
}
.tagline {
  color: var(--muted);
  margin: 0.35rem 0 2rem;
  font-size: 0.98rem;
}

.search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.search input {
  flex: 1 1;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--parchment);
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
}
.search input:focus {
  border-color: var(--gold-dim);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}
.card img {
  width: 100%;
  display: block;
  aspect-ratio: 488 / 680;
  object-fit: cover;
  background: var(--ink-3);
}
.card .meta {
  padding: 0.55rem 0.65rem 0.7rem;
}
.card .name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}
.card .sub {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.4rem;
}
.tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}

/* --- card hover popover: prices + buy links --- */
.card-hover {
  position: relative;
}
.card-pop {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  background: var(--ink-3);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.card-hover:hover .card-pop,
.card-hover:focus-within .card-pop {
  display: block;
}
.card-pop-prices {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--parchment);
  margin-bottom: 0.45rem;
}
.card-pop-prices .foil {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--gold);
}
.card-pop-buys {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.card-pop-buys a {
  font-size: 0.78rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--parchment);
  text-decoration: none;
  background: var(--ink-2);
}
.card-pop-buys a:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.empty {
  color: var(--muted);
  padding: 2rem 0;
  text-align: center;
}
.footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

/* --- nav --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.nav .navbrand {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  color: var(--parchment);
}
.nav .navbrand .spark {
  color: var(--gold);
}
.nav .navlinks {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}
.nav .navlinks .who {
  color: var(--muted);
}

/* --- forms --- */
.panel {
  max-width: 420px;
  margin: 3rem auto;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.75rem;
}
.panel h2 {
  margin: 0 0 0.25rem;
}
.panel .hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1.25rem;
}
.field {
  display: block;
  margin-bottom: 0.85rem;
}
.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--parchment);
  padding: 0.6rem 0.7rem;
  border-radius: 9px;
  font-size: 0.95rem;
  outline: none;
}
.field input:focus {
  border-color: var(--gold-dim);
}
.checkrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.btn {
  display: inline-block;
  background: var(--gold);
  color: #1a1407;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover {
  background: #d9b439;
}
.btn.ghost {
  background: transparent;
  color: var(--parchment);
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  border-color: var(--gold-dim);
  background: var(--ink-3);
}
.err {
  background: rgba(196, 84, 63, 0.12);
  border: 1px solid var(--red);
  color: #e6a99b;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}
.ok {
  background: rgba(90, 158, 111, 0.12);
  border: 1px solid var(--green);
  color: #a9d8ba;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}
.altlink {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- admin --- */
.adminwrap {
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}
.section {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem;
  margin-bottom: 1.4rem;
}
.section h3 {
  margin: 0 0 0.4rem;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.badge.on {
  color: var(--green);
  border-color: var(--green);
}
.badge.off {
  color: var(--muted);
}
.userlist {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.userlist th,
.userlist td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.userlist th {
  color: var(--muted);
  font-weight: 500;
}

/* --- commander page --- */
.cmdwrap {
  max-width: 1040px;
  margin: 1.5rem auto;
  padding: 0 1.25rem 4rem;
}
.cmd-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.cmd-art {
  width: 200px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.combo {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  background: var(--ink-3);
}
.combo-produces {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.combo-cards {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.25rem 0;
}
.combo-link {
  font-size: 0.8rem;
}
.combo-missing {
  font-size: 0.85rem;
  margin: 0.35rem 0;
}
.missingcard {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-right: 0.6rem;
  white-space: nowrap;
}
.missingprice {
  color: var(--muted);
  font-size: 0.8rem;
}
.missingbuy {
  font-size: 0.72rem;
}
.pip-mini {
  display: inline-block;
  min-width: 14px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 2px;
}

/* --- functional swaps (deck upgrades) --- */
.swap {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem;
  background: var(--ink-3);
}
.swap-from {
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.swap-options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line);
}
.swap-option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
}
.swap-option::before {
  content: "→";
  color: var(--muted);
}

/* --- goldfish playtester --- */
.pt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pt-status {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.pt-status b {
  color: var(--parchment);
}
.pt-hand {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-gap: 0.6rem;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.pt-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-3);
  overflow: hidden;
  cursor: default;
}
.pt-card img {
  display: block;
  width: 100%;
  aspect-ratio: 488 / 680;
  object-fit: cover;
}
.pt-card.land {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.pt-card.selectable {
  cursor: pointer;
}
.pt-card.selectable:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.pt-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 488 / 680;
  padding: 0.4rem;
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}
.pt-prob {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem;
}
.pt-prob label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.pt-prob input {
  width: 100px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--parchment);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}
.pt-prob-out {
  display: flex;
  flex-direction: column;
  padding: 0.3rem 0.6rem;
}
.pt-prob-out b {
  font-size: 1.5rem;
  color: var(--gold);
}
.pt-prob-out span {
  font-size: 0.78rem;
  color: var(--muted);
}
.obadge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-weight: 600;
}
.obadge.owned {
  background: rgba(90, 158, 111, 0.18);
  color: var(--green);
  border: 1px solid var(--green);
}
.obadge.buy {
  background: rgba(91, 135, 201, 0.14);
  color: var(--blue);
  border: 1px solid var(--blue);
}
.card a,
.cardlink {
  text-decoration: none;
  color: inherit;
}

/* --- deck doctor --- */
.verdict {
  list-style: none;
  padding: 0;
  margin: 0;
}
.note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.35rem 0;
  font-size: 0.92rem;
}
.note .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 0.4rem;
  flex: none;
}
.note.good .dot {
  background: var(--green);
}
.note.warn .dot {
  background: var(--red);
}
.note.info .dot {
  background: var(--blue);
}
.statrow {
  display: flex;
  gap: 1.5rem;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat b {
  font-size: 1.4rem;
  font-family: Georgia, serif;
}
.stat span {
  color: var(--muted);
  font-size: 0.75rem;
}
.curve {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  height: 150px;
  margin-bottom: 0.75rem;
}
.curvecol {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.curvebar-wrap {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: flex-end;
}
.curvebar {
  width: 100%;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.curvecount {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.curvelabel {
  font-size: 0.72rem;
  color: var(--muted);
}
.pips {
  display: flex;
  gap: 0.5rem;
}
.pip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.8rem;
}
.pipdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.statusbadge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}
.statusbadge.ok {
  color: var(--green);
  border: 1px solid var(--green);
}
.statusbadge.low {
  color: var(--red);
  border: 1px solid var(--red);
}
.statusbadge.high {
  color: var(--blue);
  border: 1px solid var(--blue);
}
code {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.05rem 0.3rem;
  font-size: 0.85em;
}

/* --- bracket --- */
.bracket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.bracketbadge {
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  white-space: nowrap;
  border: 1px solid var(--line);
}
.bracketbadge.b2 {
  color: var(--green);
  border-color: var(--green);
  background: rgba(90, 158, 111, 0.12);
}
.bracketbadge.b3 {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(201, 162, 39, 0.12);
}
.bracketbadge.b4 {
  color: #e08a3c;
  border-color: #e08a3c;
  background: rgba(224, 138, 60, 0.12);
}
.bracketbadge.b5 {
  color: var(--red);
  border-color: var(--red);
  background: rgba(196, 84, 63, 0.14);
}

/* --- deck list --- */
.deckgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}
.decktile {
  display: block;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.decktile:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  text-decoration: none;
}
.decktile img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  background: var(--ink-3);
}
.decktile-body {
  padding: 0.6rem 0.75rem 0.8rem;
}
.decktile-name {
  font-family: Georgia, serif;
  font-size: 1.02rem;
  margin-bottom: 0.15rem;
}

/* --- live game (/play) --- */
.turntracker {
  position: -webkit-sticky;
  position: sticky;
  top: 0.5rem;
  z-index: 5;
}
.livegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  margin-top: 1rem;
}
.livecard {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem 0.85rem;
}
.livecard.active {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold-dim) inset;
}
.livecard.eliminated {
  opacity: 0.5;
}
.livecard-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}
.livecard-art {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.livecard-name {
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.livecard-name .prio {
  color: var(--gold);
  margin-left: 0.35rem;
  font-size: 0.8rem;
}
.livecard-sub {
  color: var(--muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.livelife {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.2rem 0 0.5rem;
}
.lifenum {
  font-family: Georgia, serif;
  font-size: 2.2rem;
  min-width: 2.6rem;
  text-align: center;
  color: var(--parchment);
}
.livestat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}
.livestat-label {
  flex: 1 1;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.livesection {
  border-top: 1px solid var(--line);
  margin-top: 0.6rem;
  padding-top: 0.5rem;
}
.livesection-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

/* --- live game: stack / Judge panel --- */
.stacklist {
  margin: 0.6rem 0;
}
.stackitem {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  background: var(--ink-3);
}
.stackitem.top {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold-dim) inset;
}
.stackitem-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stackitem-pos {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  flex-shrink: 0;
}
.stackitem-title {
  flex: 1 1;
  font-weight: 600;
  font-size: 0.92rem;
}
.stackitem-sub {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.stackitem-desc {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.stack-rulings {
  margin-top: 0.4rem;
  padding: 0.5rem 0.6rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stack-gloss {
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}
.stack-gloss b {
  color: var(--gold);
}
.stackcomposer {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
  margin-top: 0.4rem;
}
.stackbatch {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.6rem;
  margin-top: 0.5rem;
}
.stack-typeahead {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--ink-3);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  margin-top: 2px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.stack-typeahead-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--parchment);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.stack-typeahead-row span {
  color: var(--muted);
  font-size: 0.72rem;
}
.stack-typeahead-row:hover {
  background: var(--ink-2);
  color: var(--gold);
}

/* --- live game: refined player card (scannable, tap-friendly) --- */
.livelife {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.35rem 0 0.25rem;
}
.lifebtn {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ink-3);
  color: var(--parchment);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.lifebtn:hover {
  border-color: var(--gold-dim);
}
.lifebtn.plus:active {
  background: #1d2a1d;
}
.lifebtn.minus:active {
  background: #2a1d1d;
}
.lifenum {
  flex: 1 1;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--parchment);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.lifenum:hover {
  color: var(--gold);
}
.livelife-mini {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.livelife-mini .btn {
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
}
.liveinline {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  justify-content: center;
}
.liveinput {
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--parchment);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
}
.livechips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.livechip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  color: var(--parchment);
}
.livechip.tappable {
  cursor: pointer;
}
.livechip.tappable:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}
.livechip.danger {
  border-color: #7a2d2d;
  color: #e0a0a0;
}
.livechip-label {
  color: var(--muted);
  font-size: 0.72rem;
}
.livechip .chip-caret {
  color: var(--muted);
  font-size: 0.65rem;
}
.chipbtn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--parchment);
  cursor: pointer;
  line-height: 1;
}
.chipbtn:hover {
  border-color: var(--gold-dim);
}

/* --- live game: control bar + table-style rotatable tiles --- */
.livebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.6rem;
}
.livebar-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--parchment);
}
.livebar-turn {
  font-family: Georgia, serif;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
}
.livebar-phase {
  color: var(--muted);
}
.livebar-sep {
  color: var(--line);
}
.livebar-prio {
  color: var(--gold);
}
.livebar-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.livebar-actions .btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}
.btn.ghost.hot {
  border-color: var(--gold-dim);
  color: var(--gold);
}
.iconbtn {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--ink-3);
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.iconbtn:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* table layout: up to 2 tiles per row, each a square so rotating by 90°
   steps never changes its footprint (no overlap with neighbours). */
.livegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 0.9rem;
  gap: 0.9rem;
  max-width: 880px;
  margin: 0.2rem auto 0;
}
.livecard {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}
.livecard.haspop {
  z-index: 30;
}
@media (max-width: 560px) {
  .livegrid {
    grid-template-columns: 1fr;
  }
  .livecard {
    aspect-ratio: auto;
  }
}

/* --- live game: seating-template "table" layout (tablet in the middle) --- */
.livewrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  --tile: clamp(165px, 19vw, 240px);
}
.livebar-layout {
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--parchment);
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  max-width: 11rem;
}
.livetable {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.livetable-mid {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
.edge {
  display: flex;
  gap: 0.9rem;
}
.edge-top,
.edge-bottom {
  justify-content: center;
  flex-wrap: wrap;
}
.edge-left,
.edge-right {
  flex-direction: column;
  justify-content: center;
}
.livetable-center {
  flex: 1 1;
  align-self: stretch;
  min-width: 90px;
  min-height: var(--tile);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.livetable-hint {
  color: var(--muted);
  font-size: 0.78rem;
  opacity: 0.5;
}
.livetable .livecard {
  width: var(--tile);
  flex: 0 0 auto;
}
@media (max-width: 560px) {
  /* phones: drop the table arrangement, stack tiles upright */
  .livetable {
    display: block;
  }
  .livetable-mid {
    display: block;
  }
  .livetable-center {
    display: none;
  }
  .edge {
    flex-direction: column;
  }
  .livetable .livecard {
    width: 100%;
    aspect-ratio: auto;
  }
}

/* --- live game: edge-filling table (the tablet IS the surface, no center zone) --- */
.livewrap {
  --tile: clamp(160px, min(27vw, 33vh), 320px);
}
.livetable {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: calc(100dvh - 120px);
}
.livetable-mid {
  display: flex;
  flex: 1 1;
  align-items: center;
  justify-content: space-between; /* left column hugs left edge, right hugs right */
  gap: 0.9rem;
}
.edge-left,
.edge-right {
  flex-direction: column;
  justify-content: space-evenly; /* spread this side's tiles down the screen edge */
  align-self: stretch;
}
.edge-top {
  align-items: flex-start;
}
.edge-bottom {
  align-items: flex-end;
}
.livetable-center {
  display: none;
}
@media (max-width: 560px) {
  .livetable {
    min-height: 0;
  }
}

/* --- rules lookup + card reference --- */
.rulecards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-gap: 0.6rem;
  gap: 0.6rem;
}
.rulecard {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink-3);
  text-decoration: none;
  color: var(--parchment);
}
.rulecard:hover {
  border-color: var(--gold-dim);
}
.rulecard img,
.rulecard-noart {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
  background: var(--ink-2);
}
.rulecard-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.rulecard-sub {
  font-size: 0.75rem;
  color: var(--muted);
}
.rulinglist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rulinglist.ordered {
  list-style: decimal;
  padding-left: 1.2rem;
}
.rulinglist li {
  font-size: 0.86rem;
  line-height: 1.5;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.rulinglist li:last-child {
  border-bottom: none;
}
.rulinglist-card {
  color: var(--gold);
  font-weight: 600;
  margin-right: 0.4rem;
}
.rulinglist-text {
  color: var(--parchment);
}

.cardref {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.cardref-img {
  width: 280px;
  max-width: 100%;
  border-radius: 14px;
  flex: none;
}
.cardref-body {
  flex: 1 1;
  min-width: 280px;
}
.cardref-name {
  margin: 0 0 0.3rem;
  color: var(--gold);
}
.cardref-sub {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.cardref-oracle {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
}
.cardref-oracle p {
  margin: 0 0 0.5rem;
}
.cardref-oracle p:last-child {
  margin-bottom: 0;
}

/* --- tough-rulings guide --- */
.ruleslink {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.75rem 0 1.5rem;
}
.interaction-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}
.interaction-nav a {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}
.interaction-nav a:hover {
  border-color: var(--gold-dim);
  color: var(--parchment);
}
.interaction {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.interaction:first-of-type {
  border-top: none;
  padding-top: 0.2rem;
}
.interaction-title {
  margin: 0 0 0.3rem;
  color: var(--gold);
  font-size: 1.02rem;
}
.interaction-q {
  margin: 0 0 0.6rem;
  font-style: italic;
  color: var(--muted);
}
.interaction-steps {
  margin: 0;
  padding-left: 1.2rem;
}
.interaction-steps li {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0.45rem;
}
.interaction-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.interaction-chip {
  font-size: 0.74rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}
.interaction-chip:hover {
  border-color: var(--gold-dim);
  color: var(--parchment);
}

/* --- start-game player-count picker --- */
.countpick {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.countbtn {
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
  font-family: Georgia, serif;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--parchment);
  border-radius: 10px;
  cursor: pointer;
}
.countbtn:hover {
  border-color: var(--gold-dim);
}
.countbtn.on {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

/* --- inline rename on the live board --- */
.nameedit {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: text;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: inherit;
}
.nameedit:hover {
  -webkit-text-decoration: underline dotted var(--gold-dim);
          text-decoration: underline dotted var(--gold-dim);
  text-underline-offset: 3px;
}
.nameinput {
  font-family: Georgia, serif;
  font-size: 1rem;
  width: 100%;
  max-width: 9rem;
  background: var(--ink-3);
  border: 1px solid var(--gold-dim);
  color: var(--parchment);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

/* --- live tile popups (keep the square a fixed size) --- */
.livepop {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--ink-2);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}
.livepop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.45rem 0.4rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--gold);
  font-family: Georgia, serif;
}
.livepop-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 0.5rem 0.55rem;
}
.livepop-note {
  color: var(--muted);
  font-size: 0.74rem;
  margin-bottom: 0.4rem;
}

/* commander picker results */
.cmdpick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--parchment);
  border-radius: 8px;
  padding: 0.25rem 0.35rem;
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.cmdpick:hover {
  border-color: var(--gold-dim);
}
.cmdpick img,
.cmdpick-noart {
  width: 34px;
  height: 26px;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 4px;
  flex: none;
  background: var(--ink-2);
}
.cmdpick-name {
  font-size: 0.78rem;
  line-height: 1.15;
}

