:root {
  --nave: #17141f;
  --nave-deep: #0e0c14;
  --lead: #2d2838;
  --lead-hi: #463f55;
  --vellum: #eadfc6;
  --vellum-dim: #b9ac91;
  --ink: #2a2117;
  --gilt: #d4a94a;
  --gilt-hi: #f1d27f;
  --azure: #4a86d4;
  --azure-deep: #1f3f6e;
  --crimson: #c13b48;
  --crimson-deep: #5e1820;
  --go: #6fc17a;
  --hit: #e8564a;
  --aim: #7fd0e6;
  --stone: #8fe3f2;
  --display: 'Grenze Gotisch', 'UnifrakturCook', Georgia, serif;
  --text: 'Alegreya', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(ellipse 70% 50% at 50% 42%, rgba(212, 169, 74, .09), transparent 70%),
    radial-gradient(ellipse at 50% 120%, #2a2236 0%, var(--nave) 45%, var(--nave-deep) 100%);
  color: var(--vellum);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

body.dragging, body.dragging * { cursor: grabbing !important; }

button { font: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 2px; }

.btn {
  background: linear-gradient(180deg, #3a3346, #2a2533);
  color: var(--vellum);
  border: 1px solid var(--lead-hi);
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 600;
  transition: border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--gilt); }
.btn:active { transform: translateY(1px); }
.btn.main {
  background: linear-gradient(180deg, var(--gilt-hi), var(--gilt) 55%, #a87e2c);
  color: #2b1d06;
  border-color: #f6e2a6;
  box-shadow: 0 2px 0 #6e5118, 0 0 18px rgba(212, 169, 74, .25);
}
.btn.big { padding: 12px 26px; font-size: 17px; }
.btn:disabled { opacity: .35; cursor: default; box-shadow: none; }

.setup {
  position: relative;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px max(16px, 4vw) 48px max(16px, 7vw);
  background: #120c09;
}
.setup[hidden] { display: none; }
@media (max-width: 1100px) {
  .setup {
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 16px 56px;
  }
  .home-art .art-shade { background: linear-gradient(0deg, rgba(10, 7, 6, .85), rgba(10, 7, 6, .55)); }
}
.setup-box {
  flex: 0 0 auto;
  width: min(440px, 100%);
  padding: 26px 32px 30px;
  background: linear-gradient(180deg, rgba(36, 28, 30, .82), rgba(18, 14, 18, .9));
  backdrop-filter: blur(3px);
  border: 1px solid var(--lead-hi);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 4px rgba(212, 169, 74, .08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}
.setup h1.brand {
  margin: 0 -8px -6px;
  line-height: 0;
}
.brand img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(90, 190, 255, .25));
}
.pause-logo {
  width: 220px;
  height: auto;
  margin-bottom: -10px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
}
.tagline { color: var(--vellum-dim); font-style: italic; margin-bottom: 8px; }
.setup label { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; }
.pick { display: flex; align-items: center; gap: 8px; }
.see-deck { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.setup select {
  flex: 1;
  max-width: 240px;
  background: var(--nave-deep);
  color: var(--vellum);
  border: 1px solid var(--lead-hi);
  border-radius: 4px;
  padding: 8px;
  font: inherit;
}

.arena {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto 204px;
}

.seat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: linear-gradient(180deg, rgba(14, 12, 20, .85), rgba(14, 12, 20, .55));
  border-bottom: 1px solid var(--lead);
  min-height: 62px;
}
.seat.me {
  border-bottom: 0;
  border-top: 1px solid var(--lead);
  background: linear-gradient(0deg, rgba(14, 12, 20, .85), rgba(14, 12, 20, .5));
}

.portrait {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  border: 2px solid var(--gilt);
  background: radial-gradient(circle at 40% 35%, #fff3c4, #c9a43a 45%, #3a2b08);
  box-shadow: 0 0 0 3px var(--nave-deep);
  cursor: help;
}
.portrait.own1 { box-shadow: 0 0 0 3px var(--azure-deep); }
.portrait.own2 { box-shadow: 0 0 0 3px var(--crimson-deep); }
.portrait.now.own1 { box-shadow: 0 0 0 3px var(--azure), 0 0 22px var(--azure); }
.portrait.now.own2 { box-shadow: 0 0 0 3px var(--crimson), 0 0 22px var(--crimson); }
.portrait b {
  position: absolute;
  right: -8px;
  bottom: -6px;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  background: var(--nave-deep);
  border: 1px solid var(--gilt);
  color: var(--vellum);
}
.who { display: flex; flex-direction: column; min-width: 0; }
.who strong { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1; }
.who small { color: var(--vellum-dim); font-size: 13px; }
.pts { display: flex; align-items: baseline; gap: 4px; margin-left: 10px; }
.pts span { font-family: var(--display); font-size: 34px; font-weight: 900; line-height: 1; }
.pts small { color: var(--vellum-dim); font-size: 12px; }
.pts.own1 span { color: #8fb8ee; }
.pts.own2 span { color: #ee8f98; }
.pts.bump span { animation: bump .6s ease-out; }
.piles { display: flex; gap: 14px; margin-left: auto; color: var(--vellum-dim); font-size: 14px; }
.piles span { display: flex; align-items: center; gap: 6px; }
.pile-deck {
  display: inline-block;
  width: 14px;
  height: 19px;
  border-radius: 2px;
  border: 1px solid var(--gilt);
  background: url('cartes/dos.jpg') center / cover;
}
.pile-grave { font-style: normal; }
.backs { display: flex; margin-left: 18px; }
.backs i {
  width: 22px;
  height: 31px;
  margin-left: -9px;
  border-radius: 3px;
  border: 1px solid #8a7240;
  background: url('cartes/dos.jpg') center / cover;
  box-shadow: -2px 0 4px rgba(0, 0, 0, .5);
}

.stage {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 260px;
  gap: 14px;
  padding: 10px 14px 0;
  min-height: 0;
}

.journal {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(14, 12, 20, .5);
  border: 1px solid var(--lead);
  border-radius: 6px;
  padding: 10px 12px;
}
.journal h3, .info h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--gilt);
  margin-bottom: 6px;
}
.entries { overflow-y: auto; min-height: 0; font-size: 13px; scrollbar-width: thin; scrollbar-color: var(--lead-hi) transparent; }
.entries p { padding: 4px 0; border-bottom: 1px solid rgba(70, 63, 85, .45); color: var(--vellum-dim); }
.entries p:first-child { color: var(--vellum); }
.entries em { font-style: normal; color: var(--gilt); margin-right: 6px; font-weight: 600; }

.table {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

.prayer {
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(31, 63, 110, .55), rgba(23, 20, 31, .9));
  border: 1px solid var(--aim);
  box-shadow: 0 0 24px rgba(127, 208, 230, .18);
  animation: rise .25s ease-out;
}
.prayer.own2 { background: linear-gradient(90deg, rgba(94, 24, 32, .6), rgba(23, 20, 31, .9)); }
.prayer p { color: #d6f2f8; font-size: 15px; }
.pair { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.tilt {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
}

.board {
  position: relative;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  transform: rotateX(14deg);
  transform-origin: 50% 60%;
  border: 2px solid #6e5a2c;
  box-shadow:
    0 0 0 6px #1a1622,
    0 0 0 7px #8a7240,
    0 40px 70px rgba(0, 0, 0, .75);
}
.board::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: url('plateau.jpg') center / cover no-repeat;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .45);
  transition: transform .5s ease;
}
.board.flip::before { transform: rotate(180deg); }

.cell {
  position: absolute;
  border-radius: 3px;
  display: flex;
  min-width: 0;
  min-height: 0;
  cursor: pointer;
  background: transparent;
  transition: background .15s, box-shadow .15s;
}
.cell.field:hover { background: rgba(255, 255, 255, .14); }
.cell.dz1 { background: rgba(74, 134, 212, .22); }
.cell.dz2 { background: rgba(193, 59, 72, .22); }
.cell.go { box-shadow: inset 0 0 0 2px var(--go), 0 0 16px rgba(111, 193, 122, .35); animation: glowGo 1.4s ease-in-out infinite; }
.cell.hit { box-shadow: inset 0 0 0 2px var(--hit), 0 0 18px rgba(232, 86, 74, .45); animation: glowHit 1s ease-in-out infinite; }
.cell.aim { box-shadow: inset 0 0 0 2px var(--aim), 0 0 18px rgba(127, 208, 230, .4); animation: glowAim 1.2s ease-in-out infinite; }
.cell.over { background: rgba(241, 210, 127, .22) !important; }

.stone {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}
.stone svg {
  width: 70%;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(143, 227, 242, .85)) drop-shadow(0 0 16px rgba(143, 227, 242, .45));
  animation: iariGlow 2.6s ease-in-out infinite;
}
.stone.waiting { visibility: hidden; }
.stone.landed svg { animation: iariSettle .45s cubic-bezier(.3, 1.6, .5, 1), iariGlow 2.6s ease-in-out .45s infinite; }
.cell:has(.unit) .stone { inset: auto 2px auto auto; top: -6px; width: 34%; z-index: 7; }
.cell:has(.unit) .stone svg { width: 100%; }

.iari-fall { position: fixed; z-index: 3; pointer-events: none; transform-origin: 50% 85%; }
.iari-fall svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(170, 235, 255, .95)) drop-shadow(0 0 28px rgba(120, 210, 245, .6)); }
.iari-trail {
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 55%;
  height: 340%;
  border-radius: 50%;
  background: linear-gradient(0deg, rgba(190, 240, 255, .85), rgba(143, 227, 242, .35) 35%, transparent);
  filter: blur(6px);
}
.iari-shadow { position: fixed; border-radius: 50%; background: radial-gradient(ellipse, rgba(5, 20, 30, .65), transparent 70%); pointer-events: none; }
.iari-ring {
  position: fixed;
  border-radius: 50%;
  border: 4px solid #c9f4ff;
  box-shadow: 0 0 0 2px rgba(20, 90, 130, .55), 0 0 26px rgba(90, 200, 240, 1), inset 0 0 22px rgba(90, 200, 240, .8);
  transform: translate(-50%, -50%) scaleY(.45);
  pointer-events: none;
  animation: iariRing .65s cubic-bezier(.1, .7, .3, 1) forwards;
}
.iari-flash { position: fixed; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(170, 235, 255, .55) 35%, transparent 70%); transform: translate(-50%, -50%); pointer-events: none; animation: iariFlash .45s ease-out forwards; }
.iari-shard { position: fixed; width: 12px; height: 17px; background: linear-gradient(160deg, #ffffff, #4fb0e0); filter: drop-shadow(0 0 2px #0d3b55) drop-shadow(0 0 6px rgba(120, 215, 250, .9)); clip-path: polygon(50% 0, 100% 60%, 50% 100%, 0 60%); pointer-events: none; }
.iari-dust { position: fixed; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, rgba(120, 100, 70, .55), transparent 70%); pointer-events: none; }

@keyframes iariGlow { 50% { filter: drop-shadow(0 0 10px rgba(170, 235, 255, 1)) drop-shadow(0 0 24px rgba(143, 227, 242, .7)); } }
@keyframes iariSettle { 0% { transform: translateY(-6px) scale(1.15, .85); } 60% { transform: translateY(1px) scale(.95, 1.06); } 100% { transform: none; } }
@keyframes iariRing { from { transform: translate(-50%, -50%) scaleY(.45) scale(.1); opacity: 1; } to { transform: translate(-50%, -50%) scaleY(.45) scale(1); opacity: 0; } }
@keyframes iariFlash { from { opacity: 1; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } }

.unit {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  touch-action: none;
  transition: transform .15s, filter .2s;
}
.unit .kc { height: 100%; width: auto; max-width: 100%; }
.unit.mine .kc { box-shadow: 0 0 0 1px #fff4cf, 0 0 4px 1px #ffd77a, 0 0 10px 2px rgba(255, 200, 80, .5), 0 0 22px 4px rgba(255, 180, 50, .22), 0 8px 14px rgba(0, 0, 0, .6); }
.unit.mine .kc::after { content: ''; position: absolute; inset: 0; z-index: 9; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, transparent 38%, rgba(255, 244, 205, .45) 50%, transparent 62%); background-size: 260% 100%; background-position: 40% 0; }
.unit.theirs .kc { box-shadow: 0 12px 22px rgba(0, 0, 0, .9), 0 4px 10px rgba(0, 0, 0, .8); }
.unit.rU { border-color: #9fc4e2; }
.unit.rR { border-color: var(--gilt); }
.unit.rE { border-color: var(--gilt-hi); box-shadow: 0 0 0 1px #6e5118, 0 0 16px rgba(241, 210, 127, .45), 0 6px 12px rgba(0, 0, 0, .55); }
.unit.rE.theirs { box-shadow: none; border-color: transparent; }
.unit.ready { cursor: grab; }
.unit.ready .kc { box-shadow: 0 0 0 1px #fffbea, 0 0 5px 1px #ffe08f, 0 0 13px 3px rgba(255, 205, 90, .7), 0 0 30px 7px rgba(255, 180, 50, .35), 0 8px 14px rgba(0, 0, 0, .6); animation: goldPulse 1.8s ease-in-out infinite; }
@keyframes goldPulse { 50% { box-shadow: 0 0 0 1px #fffdf3, 0 0 7px 2px #ffe8a8, 0 0 18px 5px rgba(255, 210, 100, .85), 0 0 40px 10px rgba(255, 185, 60, .45), 0 8px 14px rgba(0, 0, 0, .6); } }
.unit.ready:hover { transform: translateY(-3px) scale(1.04); }
.unit.spent { filter: grayscale(.65) brightness(.7); }
body.dragging .unit.lifted { opacity: .35; }
.unit.lifted { transform: translateY(-3px); }
.unit.lifted .kc { box-shadow: 0 0 0 3px var(--gilt-hi), 0 0 22px rgba(241, 210, 127, .85); }
.unit.arrive { animation: arrive .45s cubic-bezier(.2, 1.3, .5, 1) both; }
.unit.struck { animation: struck .4s ease-out; }

.u-art {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  font-size: clamp(14px, 2.4vw, 28px);
  border-bottom: 1px solid rgba(0, 0, 0, .5);
}
.u-art span { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.u-name {
  font-size: clamp(9px, .9vw, 12px);
  font-weight: 600;
  line-height: 1.05;
  padding: 2px 4px 6px;
  color: var(--vellum);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72%;
}
.u-gem, .face-gem {
  position: absolute;
  right: 3px;
  bottom: 6px;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 17px;
  color: #2b1d06;
  background: radial-gradient(circle at 35% 30%, #fff2c2, var(--gilt) 60%, #7a5a1a);
  border: 1px solid #f6e2a6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .6);
}
.u-gem.hurt, .face-gem.hurt { background: radial-gradient(circle at 35% 30%, #ffd0c8, var(--hit) 60%, #6e1a12); color: #fff; }
.u-marks { position: absolute; top: 2px; left: 3px; display: flex; gap: 3px; }
.u-marks i { font-style: normal; font-size: 11px; padding: 0 3px; border-radius: 3px; background: rgba(14, 12, 20, .8); }
.u-marks .tok { color: #f3b0b0; }
.u-marks .lock { color: #ffb15e; }
.u-marks .kw { color: var(--gilt-hi); }

.art-feu { background: radial-gradient(circle at 50% 75%, #ffcf6b, #d4482c 40%, #3a0f08 85%); }
.art-juges { background: radial-gradient(circle at 50% 70%, #f5ebc0, #8a6f2e 45%, #1e180a 90%); }
.art-guerre { background: radial-gradient(circle at 50% 70%, #e2e6ea, #5d6d7e 45%, #12161b 90%); }
.art-oracles { background: radial-gradient(circle at 50% 70%, #c4f3ff, #3a7192 45%, #08151f 90%); }
.art-prophetes { background: radial-gradient(circle at 50% 70%, #ecd1ff, #6e44a6 45%, #140a22 90%); }
.art-assassins { background: radial-gradient(circle at 50% 70%, #ff9aa8, #6a1626 45%, #0e0306 90%); }
.art-elue { background: radial-gradient(circle at 50% 65%, #fff6d2, #cfa63d 45%, #2c2108 90%); }
.art-none { background: radial-gradient(circle at 50% 70%, #9a9a9a, #3a3a3a 50%, #111 90%); }

.side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.turn {
  background: rgba(14, 12, 20, .55);
  border: 1px solid var(--lead);
  border-radius: 6px;
  padding: 10px 12px;
}
.turn-no { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--gilt-hi); line-height: 1.1; }
.mana-tag { color: var(--stone); text-shadow: 0 0 8px var(--stone); }
.pips { display: flex; gap: 4px; margin: 7px 0 9px; }
.pips i { flex: 1; height: 5px; border-radius: 3px; background: var(--lead); }
.pips i.mana { background: #2c4a52; }
.pips i.past { background: #6e5a2c; }
.pips i.on { background: var(--gilt-hi); box-shadow: 0 0 8px var(--gilt); }
.steps { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.steps li { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 3px; color: var(--vellum-dim); border-left: 2px solid transparent; }
.steps li.past { color: #6f6680; text-decoration: line-through; text-decoration-color: rgba(111, 102, 128, .5); }
.steps li.on { color: var(--vellum); background: rgba(212, 169, 74, .12); border-left-color: var(--gilt); font-weight: 600; }
.steps em { font-style: normal; color: var(--gilt-hi); }
.turn-lead { margin-top: 8px; font-size: 13px; color: var(--vellum-dim); font-style: italic; }

.end { padding: 12px; font-size: 16px; }

.side { position: relative; }
.inspect {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  padding: 12px;
  background: #17141f;
  border: 1px solid #8a7240;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  overflow-y: auto;
  scrollbar-width: thin;
}
.inspect.on { display: block; animation: rise .15s ease-out; pointer-events: none; }

.inspect-empty { color: #6f6680; font-style: italic; text-align: center; padding: 20px; border: 1px dashed var(--lead); border-radius: 8px; }

.info { background: rgba(14, 12, 20, .55); border: 1px solid var(--lead); border-radius: 6px; padding: 10px 12px; }
.info .hint { font-size: 14px; }
.info .small { font-size: 12px; color: var(--vellum-dim); margin-top: 6px; }
.quota { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.quota span { padding: 2px 8px; border-radius: 3px; border: 1px solid var(--gilt); color: var(--gilt-hi); font-size: 13px; font-weight: 600; }
.quota span.gone { border-color: var(--lead); color: #6f6680; text-decoration: line-through; }

.face {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 5px;
  gap: 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #3a3224, #1d1810);
  border: 2px solid #8a8a8a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 20px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.face.rU { border-color: #9fc4e2; background: linear-gradient(180deg, #2f3442, #171a22); }
.face.rR { border-color: var(--gilt); background: linear-gradient(180deg, #4a3a1c, #21190b); }
.face.rE { border-color: var(--gilt-hi); background: linear-gradient(180deg, #57441a, #241b08); }
.face.own1 { box-shadow: inset 0 3px 0 var(--azure), inset 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 20px rgba(0, 0, 0, .55); }
.face.own2 { box-shadow: inset 0 3px 0 var(--crimson), inset 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 20px rgba(0, 0, 0, .55); }
.face-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.05;
  padding: 3px 5px 2px;
  border-radius: 3px;
  color: var(--ink);
  background: linear-gradient(180deg, #f2e7cd, #cdbd98);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.face-art {
  height: 38%;
  flex-shrink: 0;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: 34px;
  border: 1px solid rgba(0, 0, 0, .6);
}
.face-art span { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.face-sub { font-size: 10px; font-style: italic; color: var(--vellum-dim); line-height: 1.1; padding: 0 2px; }
.face-text {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ede2c8, #d8c9a5);
  color: var(--ink);
  font-size: 10px;
  line-height: 1.2;
}
.face-text p + p { margin-top: 3px; }
.face-text .plain { color: #7a6c52; font-style: italic; }
.face-text .warn { color: #8c1f1f; font-weight: 600; }
.face .face-gem { right: 5px; bottom: 5px; }
.face.big { padding: 8px; gap: 6px; border-width: 3px; }
.face.big .face-name { font-size: 22px; padding: 5px 8px 4px; }
.face.big .face-art { font-size: 56px; height: 30%; }
.face.big .face-sub { font-size: 13px; }
.face.big .face-text { font-size: 12.5px; line-height: 1.28; padding: 7px 9px 30px; }
.face.big .face-text b { font-weight: 800; }
.face.big .face-gem { width: 40px; height: 40px; font-size: 24px; right: 8px; bottom: 8px; }

.hand {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 20px 0;
  z-index: 10;
  overflow: visible;
}
.hand .empty { align-self: center; color: #6f6680; font-style: italic; }
.card {
  position: relative;
  flex: 0 0 auto;
  width: 106px;
  height: auto;
  margin: 0 -12px;
  transform: translateY(var(--lift)) rotate(var(--rot));
  transform-origin: 50% 140%;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), filter .2s;
  touch-action: none;
}
.card.playable { cursor: grab; }
.card .kc { box-shadow: 0 0 0 1px #fff4cf, 0 0 4px 1px #ffd77a, 0 0 10px 2px rgba(255, 200, 80, .5), 0 0 22px 4px rgba(255, 180, 50, .22), 0 10px 20px rgba(0, 0, 0, .55); }
.card.playable .kc { box-shadow: 0 0 0 1px #fffbea, 0 0 5px 1px #ffe08f, 0 0 13px 3px rgba(255, 205, 90, .7), 0 0 30px 7px rgba(255, 180, 50, .35), 0 10px 20px rgba(0, 0, 0, .55); animation: goldPulseCard 1.8s ease-in-out infinite; }
@keyframes goldPulseCard { 50% { box-shadow: 0 0 0 1px #fffdf3, 0 0 7px 2px #ffe8a8, 0 0 18px 5px rgba(255, 210, 100, .85), 0 0 40px 10px rgba(255, 185, 60, .45), 0 10px 20px rgba(0, 0, 0, .55); } }
.card .kc {
  transform-origin: 50% 100%;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}
.card:hover { z-index: 30; }
.card:hover .kc { transform: translateY(-46px) rotate(calc(var(--rot) * -1)) scale(1.22); }
.card.picked { z-index: 25; }
.card.picked .kc { transform: translateY(-28px) rotate(calc(var(--rot) * -1)) scale(1.1); box-shadow: 0 0 0 3px var(--go), 0 0 26px rgba(111, 193, 122, .55); }
.card.picked:hover .kc { transform: translateY(-46px) rotate(calc(var(--rot) * -1)) scale(1.22); }
.card.off { filter: grayscale(.55) brightness(.62); }
.card.off:hover { filter: none; }
.card.discard { cursor: pointer; filter: none; }
.card.discard .kc { box-shadow: 0 0 0 2px var(--aim), 0 0 18px rgba(127, 208, 230, .45); }
.card.drawn { animation: drawIn .55s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i) * 30ms); }

.veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, rgba(23, 20, 31, .86), rgba(8, 7, 11, .97));
  backdrop-filter: blur(4px);
}
.veil.soft { background: rgba(8, 7, 11, .55); backdrop-filter: none; }
.veil .box {
  width: min(460px, 100%);
  padding: 28px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #2c2638, #1a1622);
  border: 1px solid #8a7240;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: rise .3s ease-out;
}
.veil h2 { font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1; color: var(--gilt-hi); }
.veil p { color: var(--vellum-dim); }
.seal {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  border: 3px solid var(--gilt);
  background: radial-gradient(circle at 40% 35%, #fff3c4, #c9a43a 45%, #3a2b08);
}
.seal.own1 { box-shadow: 0 0 0 5px var(--azure-deep), 0 0 40px var(--azure); }
.seal.own2 { box-shadow: 0 0 0 5px var(--crimson-deep), 0 0 40px var(--crimson); }

.banner {
  position: fixed;
  left: 0;
  right: 0;
  top: 40%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  padding: 14px 0 18px;
}
.banner.show { animation: sweep 1.5s ease-in-out both; }
.banner strong {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1;
  color: var(--gilt-hi);
  text-shadow: 0 3px 0 #6e5118, 0 0 50px rgba(241, 210, 127, .5);
}
.banner-sub { font-size: 18px; color: var(--vellum); font-style: italic; }
.banner[data-owner="1"] { background: linear-gradient(90deg, transparent, rgba(31, 63, 110, .75) 30%, rgba(31, 63, 110, .75) 70%, transparent); }
.banner[data-owner="2"] { background: linear-gradient(90deg, transparent, rgba(94, 24, 32, .75) 30%, rgba(94, 24, 32, .75) 70%, transparent); }

.fx { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.ghost { position: fixed; left: 0; top: 0; pointer-events: none; opacity: .92; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .7)); }
.ghost .unit { margin: 0; height: 100%; }
.dead { position: fixed; pointer-events: none; animation: shatter .75s ease-out forwards; }
.dead .unit { margin: 0; height: 100%; }
.float {
  position: fixed;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 900;
  font-size: 34px;
  pointer-events: none;
  animation: floatUp 1s ease-out forwards;
  text-shadow: 0 2px 0 #000, 0 0 12px currentColor;
}
.toast {
  position: fixed;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  max-width: min(560px, 92vw);
  padding: 10px 18px;
  border-radius: 6px;
  background: #2a2133;
  border: 1px solid var(--gilt);
  color: var(--vellum);
  font-size: 15px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
  animation: toastLife 3.2s ease forwards;
}
@keyframes toastLife { 0% { opacity: 0; margin-top: -10px; } 10% { opacity: 1; margin-top: 0; } 85% { opacity: 1; } 100% { opacity: 0; } }
.float.down { color: #ff7a6e; }
.float.up { color: #9cf0a6; }

.mute {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 80;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--lead-hi);
  background: var(--nave-deep);
  color: var(--gilt);
}
.mute.off { color: #6f6680; text-decoration: line-through; }
.mute[aria-expanded="true"] { border-color: var(--gilt); box-shadow: 0 0 10px rgba(212, 169, 74, 0.45); }

.sound {
  position: fixed;
  left: 12px;
  bottom: 56px;
  z-index: 81;
  width: 236px;
  padding: 12px 14px 14px;
  border: 1px solid var(--lead-hi);
  border-radius: 8px;
  background: linear-gradient(180deg, #1d1928, var(--nave-deep));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  color: var(--vellum);
  font-family: var(--text);
}
.sound[hidden] { display: none; }
.sound h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  color: var(--gilt-hi);
  letter-spacing: 1px;
}
.sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0;
}
.sound-name { font-weight: 600; }
.sound-row b {
  min-width: 42px;
  text-align: right;
  font-size: 13px;
  color: var(--vellum-dim);
  font-weight: 600;
}
.sound-row input[type="range"] {
  flex: 1;
  accent-color: var(--gilt);
  cursor: pointer;
}
.sound-switch {
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--gilt);
  background: rgba(212, 169, 74, 0.16);
  color: var(--gilt-hi);
  font: 600 12px var(--text);
  cursor: pointer;
}
.sound-switch.off {
  border-color: var(--lead-hi);
  background: transparent;
  color: #6f6680;
}
.sound-note {
  margin: -2px 0 10px;
  font-size: 12px;
  font-style: italic;
  color: var(--vellum-dim);
}
.sound-all {
  width: 100%;
  margin-top: 8px;
  padding: 6px 0;
  font-size: 13px;
}

.kc {
  position: relative;
  width: 100%;
  aspect-ratio: 1443 / 2023;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 7px;
  background: #26392b;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .55);
}
.kc > * { position: absolute; }
.kc-art {
  left: 0;
  top: 0;
  width: 100%;
  height: 67.5%;
  background-size: cover;
  background-position: 50% 0;
  display: grid;
  place-items: center;
  font-size: 34cqw;
}
.kc-art span { filter: drop-shadow(0 1cqw 2cqw rgba(0, 0, 0, .6)); margin-top: -6cqw; }
.kc-panel {
  left: 0;
  right: 0;
  top: 66%;
  bottom: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 2cqw, transparent 2cqw 5cqw),
    radial-gradient(ellipse 80% 60% at 50% 35%, #50705a, #36523e 55%, #263b2c);
}
.kc-bar { z-index: 2; left: 0; top: 55.78%; width: 100%; height: 21.15%; pointer-events: none; }
.kc-gem { z-index: 3; left: calc(50% - 1.7cqw); top: calc(66.5% - 1.7cqw); width: 3.4cqw; height: 3.4cqw; }
.kc-meds { inset: 0; pointer-events: none; }
.kc-med { position: absolute; top: calc(66.5% - 1.8cqw); width: 33cqw; height: 31.2cqw; left: 33.5cqw; }
.kc-meds.n2 .kc-med { width: 30cqw; height: 28.4cqw; }
.kc-meds.n2 .kc-med:nth-child(1) { left: 20cqw; }
.kc-meds.n2 .kc-med:nth-child(2) { left: 50cqw; }
.kc-meds.n3 .kc-med { width: 25cqw; height: 23.6cqw; }
.kc-meds.n3 .kc-med:nth-child(1) { left: 11.5cqw; }
.kc-meds.n3 .kc-med:nth-child(2) { left: 37.5cqw; }
.kc-meds.n3 .kc-med:nth-child(3) { left: 63.5cqw; }
.kc-med > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc-trig { position: absolute; left: calc(50% - 3.2cqw); top: calc(100% + 1.2cqw); width: 6.4cqw; height: 6.4cqw; filter: drop-shadow(0 .3cqw .4cqw rgba(0, 0, 0, .6)); }
.kc-meds.n3 .kc-trig { width: 5.4cqw; height: 5.4cqw; left: calc(50% - 2.7cqw); }
.unit .kc-trig { display: none; }
.kc-med b {
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  bottom: 10%;
  display: grid;
  place-items: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 9.5cqw;
  line-height: 1;
  color: #fff;
  text-shadow: 0 .5cqw .8cqw rgba(0, 0, 0, .6);
}
.kc-meds.n3 .kc-med b { font-size: 8cqw; }
.kc-med b .kc-ico { width: 11cqw; height: 11cqw; filter: drop-shadow(0 .5cqw .6cqw rgba(0, 0, 0, .6)); }
.kc-meds.n3 .kc-med b .kc-ico { width: 9cqw; height: 9cqw; }
.kc-drop { left: 83%; top: calc(88.5% - 10.2cqw); width: 15cqw; height: 20.4cqw; z-index: 3; }
.kc-drop img { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc-drop b {
  position: absolute;
  left: -3cqw;
  right: -3cqw;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  padding-top: 1.2cqw;
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-weight: 900;
  font-size: 8.5cqw;
  line-height: 1;
  color: #fff;
  text-shadow: 0 .4cqw 0 #3a0a0a, 0 0 1.5cqw rgba(0, 0, 0, .7);
}
.kc-drop.hurt b { color: #ffd0c4; }
.unit .kc-drop { left: 66%; top: calc(86% - 19cqw); width: 28cqw; height: 38cqw; }
.unit .kc-drop b { font-size: 15cqw; padding-top: 2cqw; }
.unit .kc-foot { display: none; }
.kc-foot {
  left: 0;
  right: 0;
  bottom: 0;
  height: 5.3%;
  z-index: 2;
  background: #050505;
  display: flex;
  align-items: center;
  font-family: 'Archivo Black', 'Arial Black', sans-serif;
  font-size: 2.9cqw;
  letter-spacing: .1cqw;
  color: #f4f4f4;
  text-transform: uppercase;
}
.kc-artist { position: absolute; left: 9cqw; display: flex; align-items: center; gap: 1.2cqw; }
.kc-artist i { font-style: normal; font-size: 3.4cqw; }
.kc-set { position: absolute; left: 0; right: 0; text-align: center; }

.read { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.read h4 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1; color: var(--gilt-hi); }
.read-sub { font-size: 12.5px; font-style: italic; color: var(--vellum-dim); }
.read-card { width: min(100%, 230px); align-self: center; margin: 4px 0; }
.read-text { font-size: 13px; line-height: 1.35; background: rgba(14, 12, 20, .55); border: 1px solid var(--lead); border-radius: 6px; padding: 8px 10px; }
.read-text p + p { margin-top: 6px; }
.read-text b { color: var(--gilt-hi); margin-right: 4px; }
.read-text .num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f1d27f, #8a6f2e); color: #241a06; font-weight: 800; font-size: 11px; }
.read-text .plain { color: #6f6680; font-style: italic; }
.read-text .warn { color: #f3b0b0; }

.tome-btn { width: 100%; }
.setup .tome-btn { margin-top: -4px; }
.portrait { cursor: pointer; }

.tome-veil { z-index: 90; background: rgba(8, 7, 11, .82); }
.tome-body p { color: #33261a; }
.tome-body .rite-when { color: #6a5434; }
.tome-body .rite-who, .tome-body .tome-empty { color: #7a6040; }
.tome-body .tome-intro > p { color: #4a3a26; }
.tome {
  position: relative;
  width: min(1080px, 100%);
  height: min(860px, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  border-radius: 10px 10px 8px 8px;
  padding: 10px;
  background: linear-gradient(90deg, #3b2412, #5a3a1c 3%, #3b2412 50%, #5a3a1c 97%, #3b2412);
  box-shadow: 0 0 0 2px #8a6a30, 0 40px 90px rgba(0, 0, 0, .8);
  animation: tomeOpen .35s cubic-bezier(.2, .9, .3, 1);
}
.tome-tabs { display: flex; gap: 6px; padding: 2px 46px 10px 8px; flex-wrap: wrap; }
.tome-tab {
  border: 1px solid #a07c3a;
  border-radius: 6px 6px 0 0;
  padding: 6px 16px;
  background: #4a2e16;
  color: #e9d9b4;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
}
.tome-tab.on { background: #efe3c6; color: #3a2a14; border-color: #efe3c6; }
.tome-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #a07c3a;
  background: #2b1a0c;
  color: #f1d27f;
  font-size: 15px;
}
.tome-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 0;
  border-radius: 4px;
  color: #33261a;
  background:
    linear-gradient(90deg, transparent calc(39% - 14px), rgba(70, 45, 15, .28) 39%, transparent calc(39% + 14px)),
    radial-gradient(ellipse at 30% 20%, #f7eed8, #eadbb8 60%, #dcc79c);
  box-shadow: inset 0 0 50px rgba(110, 80, 30, .35);
  scrollbar-width: thin;
  scrollbar-color: #a88a52 transparent;
}
.tome-intro { padding: 26px 30px 26px 30px; }
.tome-intro h2 { font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1; color: #3a2210; margin-bottom: 12px; }
.tome-intro > p { font-size: 15.5px; line-height: 1.5; color: #4a3a26; }
.tome-legend { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 16px 0 20px; }
.tome-legend li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tome-legend img, .rite-when img, .tome-kw img {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 50%;
  background: #3a2a1a;
  flex: none;
}
.tome-elue { padding: 14px 16px; border-left: 3px solid #b08a3e; background: rgba(176, 138, 62, .12); margin-bottom: 16px; }
.tome-elue h3 { font-family: var(--display); font-size: 24px; font-weight: 700; color: #3a2210; margin-bottom: 4px; }
.tome-elue p { font-size: 14.5px; line-height: 1.45; }
.tome-kw p { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; margin-bottom: 8px; }
.tome-kw b { margin-right: 4px; }
.tome-rites { padding: 20px 28px 28px 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 26px; align-content: start; }
.rite { padding-bottom: 14px; border-bottom: 1px solid rgba(110, 80, 30, .25); }
.rite-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.rite-med { position: relative; width: 58px; height: 55px; flex: none; }
.rite-med img { position: absolute; inset: 0; width: 100%; height: 100%; }
.rite-med b { position: absolute; left: 0; right: 0; top: 22%; bottom: 10%; display: grid; place-items: center; font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 19px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.rite h3 { font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1.05; color: #2e1c0c; }
.rite-when { display: flex; align-items: center; gap: 7px; font-size: 13px; font-style: italic; color: #6a5434; margin-top: 3px; }
.rite-when img { width: 22px; height: 22px; padding: 4px; }
.rite-text { font-size: 15px; line-height: 1.5; color: #33261a; }
.rite-scale { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.rite-scale li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.rite-scale span { color: #5a4630; }
.rite-scale b { margin-left: auto; color: #2e1c0c; }
.rite-gem { width: 18px; height: 18px; }
.rite-who { margin-top: 8px; font-size: 13px; font-style: italic; color: #7a6040; }
.tome-empty { font-style: italic; color: #7a6040; font-size: 16px; }

.deck-veil { z-index: 90; background: rgba(8, 7, 11, .85); }
.deckview {
  position: relative;
  width: min(1180px, 100%);
  height: min(880px, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2c2638, #1a1622);
  box-shadow: 0 0 0 1px #8a7240, 0 40px 90px rgba(0, 0, 0, .8);
  animation: tomeOpen .3s cubic-bezier(.2, .9, .3, 1);
}
.deck-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; }
.deck-list { min-height: 0; overflow-y: auto; padding: 6px 8px 16px; scrollbar-width: thin; scrollbar-color: var(--lead-hi) transparent; }
.deck-head h2 { font-family: var(--display); font-weight: 900; font-size: 38px; line-height: 1; color: var(--gilt-hi); }
.deck-head p { color: var(--vellum-dim); margin: 6px 0 14px; }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px 14px; }
.deck-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--vellum);
  text-align: center;
  transition: transform .15s;
}
.deck-card:hover { transform: translateY(-4px); }
.deck-card.on .kc { box-shadow: 0 0 0 3px var(--gilt-hi), 0 0 22px rgba(241, 210, 127, .55); }
.deck-card.is-elue .kc { box-shadow: 0 0 0 2px var(--azure), 0 10px 20px rgba(0, 0, 0, .55); }
.deck-name { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.deck-qty {
  position: absolute;
  z-index: 6;
  top: -8px;
  right: -8px;
  min-width: 34px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #2b1d06;
  background: linear-gradient(180deg, var(--gilt-hi), var(--gilt));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.deck-card.is-elue .deck-qty { background: linear-gradient(180deg, #8fb8ee, var(--azure)); color: #081a33; }
.deck-detail { min-height: 0; overflow-y: auto; padding: 8px 6px 16px; border-left: 1px solid var(--lead); scrollbar-width: thin; scrollbar-color: var(--lead-hi) transparent; }
.deck-detail .read-card { width: min(100%, 240px); }

@media (max-width: 760px) {
  .deck-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .deck-detail { order: -1; border-left: 0; border-bottom: 1px solid var(--lead); max-height: 42dvh; }
  .deck-detail .read-card { width: 150px; }
  .deck-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .pick { flex-wrap: wrap; }
}

.online { gap: 12px; text-align: left; }
.online h2 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; color: var(--gilt-hi); text-align: center; }
.online-lead { font-size: 14px; color: var(--vellum-dim); text-align: center; }
.online-row { display: flex; gap: 8px; flex-wrap: wrap; }
.online-row > .btn { flex: 1; }
.join { flex: 1.2; display: flex; gap: 6px; min-width: 200px; }
.join input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid var(--lead-hi);
  background: var(--nave-deep);
  color: var(--vellum);
  font: inherit;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.join input:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 1px; }
.net-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border: 1px dashed var(--gilt); border-radius: 6px; background: rgba(212, 169, 74, .08); }
.net-code span { font-size: 13px; color: var(--vellum-dim); }
.net-code strong { font-size: 34px; letter-spacing: 8px; color: var(--gilt-hi); user-select: all; -webkit-user-select: all; }
.net-status { min-height: 1.4em; font-size: 14px; text-align: center; color: var(--vellum-dim); }
.net-status[data-tone="bad"] { color: #f19a8f; }
.net-status[data-tone="ok"] { color: #9fd9a6; }
.net-status[data-tone="wait"] { color: var(--gilt-hi); }
.net-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 9px; font-style: normal; font-size: 12px; background: rgba(111, 193, 122, .18); color: #9fd9a6; }

.clock { display: flex; flex-direction: column; gap: 5px; padding: 8px 12px; border-radius: 6px; background: rgba(14, 12, 20, .55); border: 1px solid var(--lead); }
.clock-track { height: 8px; border-radius: 4px; background: var(--lead); overflow: hidden; }
.clock-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gilt), var(--gilt-hi)); transition: width .25s linear; }
.clock b { font-size: 14px; font-weight: 600; color: var(--vellum-dim); }
.clock.mine b { color: var(--vellum); }
.clock.low .clock-track i { background: linear-gradient(90deg, #a8322a, var(--hit)); }
.clock.low.mine { border-color: var(--hit); animation: clockPulse 1s ease-in-out infinite; }
.clock.low b { color: #f3a39a; }
@keyframes clockPulse { 50% { box-shadow: 0 0 16px rgba(232, 86, 74, .55); } }

@keyframes tomeOpen { from { transform: scale(.94) rotateX(8deg); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 860px) {
  .tome-body { grid-template-columns: 1fr; background: radial-gradient(ellipse at 30% 20%, #f7eed8, #eadbb8 60%, #dcc79c); }
  .tome-intro { padding: 20px 20px 4px; }
  .tome-intro h2 { font-size: 32px; }
  .tome-rites { padding: 12px 20px 24px; }
}

@keyframes glowGo { 50% { box-shadow: inset 0 0 0 2px var(--go), 0 0 26px rgba(111, 193, 122, .55); } }
@keyframes glowHit { 50% { box-shadow: inset 0 0 0 2px var(--hit), 0 0 28px rgba(232, 86, 74, .7); } }
@keyframes glowAim { 50% { box-shadow: inset 0 0 0 2px var(--aim), 0 0 28px rgba(127, 208, 230, .6); } }
@keyframes arrive { from { transform: translateY(-34px) scale(1.35); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes struck {
  0% { transform: translateX(0); filter: brightness(2.2) saturate(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  100% { transform: none; filter: none; }
}
@keyframes shatter {
  0% { opacity: 1; transform: none; filter: brightness(1.6); }
  100% { opacity: 0; transform: translateY(14px) scale(.7) rotate(-8deg); filter: brightness(.3) blur(3px); }
}
@keyframes floatUp { from { opacity: 0; margin-top: 6px; } 15% { opacity: 1; } to { opacity: 0; margin-top: -54px; } }
@keyframes drawIn { from { transform: translate(55vw, -30px) rotate(25deg) scale(.8); opacity: 0; } to { transform: translateY(var(--lift)) rotate(var(--rot)); opacity: 1; } }
@keyframes fall { from { transform: translateY(-120px) scale(1.8); opacity: 0; } to { transform: none; opacity: .85; } }
@keyframes bump { 40% { transform: scale(1.5); color: var(--gilt-hi); } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sweep {
  0% { opacity: 0; transform: scaleY(.3); }
  18% { opacity: 1; transform: none; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) 230px; }
  .left-col { display: none; }
}

@media (max-width: 760px) {
  body { overflow: auto; }
  .arena { height: auto; min-height: 100vh; grid-template-rows: auto auto auto 180px; }
  .stage { grid-template-columns: 1fr; }
  .tilt { height: 92vw; flex: none; }
  .board { transform: none; }
  .inspect { display: none; }
  .backs, .piles { display: none; }
  .card { width: 92px; height: 130px; margin: 0 -14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
kbd {
  padding: 1px 6px;
  border: 1px solid var(--lead-hi);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--nave-deep);
  color: var(--vellum-dim);
  font: 600 11px var(--text);
}

.pause-veil { z-index: 95; }
.veil .box.pause {
  width: min(400px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  gap: 12px;
}
.pause-note {
  margin: -4px 0 2px;
  font-size: 14px;
  font-style: italic;
}
.pause-main,
.pause-confirm {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pause-main[hidden],
.pause-confirm[hidden] { display: none; }
.pause-actions,
.pause-leave {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pause-sound {
  padding: 12px 14px 14px;
  border: 1px solid var(--lead-hi);
  border-radius: 6px;
  background: rgba(14, 12, 20, 0.55);
  text-align: left;
}
.pause h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 24px;
  color: var(--gilt-hi);
  letter-spacing: 1px;
}
.pause-leave {
  padding-top: 12px;
  border-top: 1px solid var(--lead);
}
.btn.danger {
  border-color: #7a2c35;
  background: linear-gradient(180deg, #4a1d24, #2f1318);
  color: #f3c9c6;
}
.btn.danger:hover { border-color: var(--crimson); }
.btn.danger.own1 { border-color: var(--azure); background: linear-gradient(180deg, #23385a, #152239); color: #d6e6fa; }
.btn.danger.own2 { border-color: var(--crimson); }
.pause-confirm h3 { text-align: center; }
.pause-confirm p { text-align: center; }
.pause-confirm-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setup-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise .25s ease-out;
}
.setup-step[hidden] { display: none; }
.step-ask {
  margin: 0;
  font-size: 17px;
  color: var(--vellum);
}
.step-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--gilt-hi);
  text-align: center;
}
.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 20px;
}
.mode-btn span { font-size: 19px; }
.mode-btn small {
  font-size: 13px;
  font-weight: 600;
  opacity: .75;
}
.step-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--lead);
}
.step-library .tome-btn { margin-top: 0; }
.step-back {
  align-self: center;
  padding: 6px 22px;
  font-size: 14px;
  background: transparent;
}

.news {
  flex: 0 1 380px;
  align-self: center;
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 760px);
  border: 1px solid var(--lead-hi);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(36, 28, 30, .78), rgba(18, 14, 18, .88));
  backdrop-filter: blur(3px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(212, 169, 74, .06);
  overflow: hidden;
}
.news-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--lead);
}
.news-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--gilt-hi);
}
.news-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-style: italic;
  color: var(--vellum-dim);
}
.news-list {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--lead-hi) transparent;
}
.news-item {
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(14, 11, 16, .55);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  overflow: hidden;
}
.news-item:hover,
.news-item:focus-visible {
  border-color: rgba(212, 169, 74, .55);
  background: rgba(30, 23, 26, .75);
  outline: none;
}
.news-pic {
  height: 92px;
  background-size: cover;
  background-position: center 30%;
  border-bottom: 1px solid var(--lead);
}
.news-item.lead .news-pic { height: 140px; }
.news-body { padding: 10px 12px 12px; }
.news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--vellum-dim);
}
.news-meta time { margin-left: auto; }
.news-tag {
  padding: 1px 8px;
  border-radius: 9px;
  border: 1px solid rgba(212, 169, 74, .6);
  color: var(--gilt-hi);
  font-weight: 600;
}
.news-new {
  padding: 1px 8px;
  border-radius: 9px;
  background: rgba(90, 190, 255, .18);
  color: #9ad8ff;
  font-weight: 600;
}
.news-item h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--vellum);
}
.news-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--vellum-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item.open p {
  display: block;
  -webkit-line-clamp: unset;
}
.news-empty {
  padding: 16px;
  text-align: center;
  font-style: italic;
  color: var(--vellum-dim);
}
.version-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .3px;
  color: rgba(234, 223, 198, .55);
  pointer-events: none;
}
@media (max-width: 1100px) {
  .news {
    flex: 0 0 auto;
    align-self: center;
    width: min(440px, 100%);
    max-height: none;
  }
  .news-list { overflow: visible; }
  .version-bar { position: static; flex: 0 0 auto; }
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--lead-hi);
  border-radius: 5px;
  overflow: hidden;
}
.auth-tab {
  padding: 9px 0;
  border: 0;
  background: rgba(14, 11, 16, .6);
  color: var(--vellum-dim);
  font: 600 15px var(--text);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab + .auth-tab { border-left: 1px solid var(--lead-hi); }
.auth-tab.on {
  background: linear-gradient(180deg, rgba(212, 169, 74, .28), rgba(212, 169, 74, .1));
  color: var(--gilt-hi);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.auth-form[hidden] { display: none; }
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}
.setup .field { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 5px; }
.field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--vellum-dim);
}
.field input {
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid var(--lead-hi);
  background: var(--nave-deep);
  color: var(--vellum);
  font: inherit;
  font-size: 15px;
}
.field input:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 1px; }
.auth-form .btn.main { margin-top: 4px; }
.link-btn {
  align-self: center;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: var(--gilt-hi);
  font: 600 13px var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: #fff3c9; }
.who-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--lead);
  border-radius: 5px;
  background: rgba(14, 11, 16, .55);
  font-size: 14px;
  color: var(--vellum-dim);
}
.who-bar b { color: var(--gilt-hi); }
.who-bar .link-btn { align-self: auto; }

.lobby {
  border: 1px solid var(--lead-hi);
  border-radius: 6px;
  background: rgba(14, 11, 16, .55);
  overflow: hidden;
}
.lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--lead);
}
.lobby-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  color: var(--gilt-hi);
}
.lobby-count {
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(111, 193, 122, .18);
  color: #9fd9a6;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.lobby-count:empty { display: none; }
.lobby-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--lead-hi) transparent;
}
.lobby-pick {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: none;
  color: var(--vellum);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lobby-pick:hover:not(:disabled) {
  border-color: rgba(212, 169, 74, .55);
  background: rgba(212, 169, 74, .08);
}
.lobby-pick:disabled { cursor: default; opacity: .55; }
.lobby-player.asked .lobby-pick { opacity: 1; border-color: rgba(212, 169, 74, .45); }
.lobby-dot {
  grid-row: span 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6fc17a;
  box-shadow: 0 0 8px rgba(111, 193, 122, .8);
}
.lobby-name { font-weight: 700; }
.lobby-church {
  grid-column: 2;
  font-size: 12px;
  color: var(--vellum-dim);
}
.lobby-act {
  grid-column: 3;
  grid-row: 1 / span 2;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--gilt);
  color: var(--gilt-hi);
  font-size: 13px;
  font-weight: 700;
}
.lobby-player.asked .lobby-act { border-color: transparent; font-style: italic; font-weight: 600; }
.lobby-empty {
  padding: 14px 8px;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--vellum-dim);
}
.lobby-hint {
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--lead);
  font-size: 12px;
  color: var(--vellum-dim);
}
.private-game {
  font-size: 14px;
  color: var(--vellum-dim);
}
.private-game summary {
  cursor: pointer;
  text-align: center;
  font-weight: 600;
}
.private-game[open] summary { margin-bottom: 10px; }
.private-game .net-code { margin-top: 10px; }

.invite-pop {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 120;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 16px 18px;
  border: 1px solid var(--gilt);
  border-radius: 8px;
  background: linear-gradient(180deg, #2e2430, #17121a);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .7), 0 0 30px rgba(212, 169, 74, .2);
  color: var(--vellum);
  overflow: hidden;
  animation: invitePop .35s cubic-bezier(.2, .9, .3, 1.2);
}
.invite-pop[hidden] { display: none; }
@keyframes invitePop { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.invite-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #f1d27f, #a87e2c);
  color: #2b1d06;
  font-size: 22px;
}
.invite-body p { margin: 0; font-size: 16px; }
.invite-body b { color: var(--gilt-hi); }
.invite-body small { display: block; margin-top: 2px; font-size: 13px; color: var(--vellum-dim); }
.invite-btns { display: flex; gap: 8px; margin-top: 10px; }
.invite-btns .btn { flex: 1; padding: 7px 10px; }
.invite-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, .4);
}
.invite-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #a87e2c, #f1d27f);
  transition: width .5s linear;
}

.player-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(16px, 3vw);
  background: #050304;
  border-bottom: 2px solid var(--gilt);
  box-shadow: 0 1px 10px rgba(212, 169, 74, .35);
}
.player-bar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  height: 90px;
  background: linear-gradient(180deg, rgba(5, 3, 4, .95) 0%, rgba(5, 3, 4, .6) 40%, rgba(5, 3, 4, 0) 100%);
  pointer-events: none;
}
.player-bar[hidden] { display: none; }
.pb-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pb-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--gilt);
  box-shadow: 0 0 12px rgba(212, 169, 74, .35);
  color: #fff6dc;
  font: 700 20px var(--display);
}
.pb-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pb-id b {
  font-size: 17px;
  color: var(--gilt-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-id small {
  font-size: 12px;
  color: var(--vellum-dim);
}
.pb-stats {
  display: flex;
  gap: 6px;
  margin: 0 auto;
}
.pb-stats > div {
  min-width: 84px;
  padding: 5px 12px;
  border: 1px solid var(--lead);
  border-radius: 5px;
  background: rgba(30, 24, 30, .6);
  text-align: center;
}
.pb-stats dt {
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--vellum-dim);
}
.pb-stats dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--vellum);
}
.pb-side {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pb-online {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--vellum-dim);
  white-space: nowrap;
}
.pb-logout {
  padding: 6px 14px;
  font-size: 13px;
}
.setup.with-bar { padding-top: 88px; }
@media (max-width: 1100px) {
  .player-bar { gap: 14px; }
  .pb-stats > div { min-width: 0; padding: 4px 8px; }
  .pb-online { display: none; }
}
@media (max-width: 760px) {
  .pb-stats { display: none; }
  .pb-side { margin-left: auto; }
}

.lobby-online {
  font-size: 12px;
  color: var(--vellum-dim);
}
.lobby-foot {
  display: flex;
  justify-content: center;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--lead);
}
.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 5px;
}
.friend-row + .friend-row { border-top: 1px solid rgba(70, 63, 85, .45); }
.friend-row.off .friend-id b { color: var(--vellum-dim); }
.friend-row.asked { background: rgba(212, 169, 74, .08); }
.friend-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5b5566;
}
.friend-dot.is-lobby { background: #6fc17a; box-shadow: 0 0 8px rgba(111, 193, 122, .8); }
.friend-dot.is-menu { background: #7fb6e6; box-shadow: 0 0 6px rgba(127, 182, 230, .6); }
.friend-dot.is-game { background: #e0a34a; }
.friend-id {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.friend-id b {
  color: var(--vellum);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-id small {
  font-size: 12px;
  color: var(--vellum-dim);
}
.friend-row .btn {
  flex: 0 0 auto;
  padding: 5px 12px;
  font-size: 13px;
}
.friend-invite:not(:disabled) {
  border-color: var(--gilt);
  color: var(--gilt-hi);
}
.friend-acts {
  display: flex;
  gap: 6px;
}
.friend-empty {
  padding: 14px 8px;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--vellum-dim);
}
.pb-friends {
  position: relative;
  padding: 6px 14px;
  font-size: 13px;
}
.pb-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--crimson);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.pb-badge:empty { display: none; }
.friends-veil { z-index: 92; }
.veil .box.friends-box {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  align-items: stretch;
  text-align: left;
  gap: 12px;
}
.friends-box h2 { text-align: center; }
.friends-box .tome-close { position: absolute; top: 12px; right: 12px; }
.friend-add .field { display: flex; flex-direction: column; gap: 6px; }
.friend-add .field > span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--vellum-dim);
}
.friend-add-row {
  display: flex;
  gap: 8px;
}
.friend-add-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid var(--lead-hi);
  background: var(--nave-deep);
  color: var(--vellum);
  font: inherit;
  font-size: 15px;
}
.friend-add-row input:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: 1px; }
.friend-add .net-status { margin: 6px 0 0; }
.friend-group[hidden] { display: none; }
.friend-group h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 21px;
  color: var(--gilt-hi);
}
.friend-group h3 span {
  font-family: var(--text);
  font-size: 14px;
  color: var(--vellum-dim);
}
.friend-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--lead);
  border-radius: 6px;
  background: rgba(14, 11, 16, .55);
  max-height: 260px;
  overflow-y: auto;
}

.pb-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}
.pb-lvl {
  position: absolute;
  right: -6px;
  bottom: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid #f6e2a6;
  background: linear-gradient(180deg, var(--gilt-hi), #a87e2c);
  color: #2b1d06;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.pb-lvl:empty { display: none; }
.pb-level {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}
.pb-xp-track,
.xp-track {
  display: block;
  width: 150px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.pb-xp-track i,
.xp-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4a86d4, #8fe3f2);
  box-shadow: 0 0 8px rgba(143, 227, 242, .6);
  transition: width .6s ease;
}
.pb-level small {
  font-size: 11px;
  color: var(--vellum-dim);
}

.match {
  border: 1px solid rgba(212, 169, 74, .45);
  border-radius: 6px;
  background: rgba(14, 11, 16, .55);
  overflow: hidden;
}
.match-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}
.match-text {
  margin: 0;
  font-size: 13px;
  color: var(--vellum-dim);
}
.match .net-status:empty { display: none; }
.match.on {
  border-color: var(--gilt);
  box-shadow: 0 0 18px rgba(212, 169, 74, .2);
}
.match.on .match-body::before {
  content: '';
  align-self: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(212, 169, 74, .25);
  border-top-color: var(--gilt-hi);
  animation: matchSpin 1s linear infinite;
}
.match.on .match-text { display: none; }
@keyframes matchSpin { to { transform: rotate(360deg); } }

.end-xp {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--lead-hi);
  border-radius: 6px;
  background: rgba(14, 11, 16, .6);
  text-align: left;
}
.end-xp[hidden] { display: none; }
.xp-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.xp-lines li,
.xp-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 14px;
  color: var(--vellum-dim);
}
.xp-lines b { color: #8fe3f2; }
.xp-total {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid var(--lead);
  font-size: 16px;
  color: var(--vellum);
}
.xp-total b { color: var(--gilt-hi); }
.xp-up {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--display);
  font-size: 22px;
  color: var(--gilt-hi) !important;
  animation: rise .4s ease-out;
}
.xp-level {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--vellum);
}
.xp-level .xp-track { flex: 1; width: auto; height: 7px; }
.xp-level small { color: var(--vellum-dim); white-space: nowrap; }

.setup > :not(.smoke):not(.home-art) { position: relative; z-index: 1; }
.setup > .version-bar.version-bar { position: absolute; }
.smoke {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .85) 35%, rgba(0, 0, 0, .25) 70%, transparent 100%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .85) 35%, rgba(0, 0, 0, .25) 70%, transparent 100%);
}
.smoke i {
  position: absolute;
  left: -50%;
  bottom: -10%;
  width: 200%;
  height: 90%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='500'><filter id='f' x='0' y='0'><feTurbulence type='fractalNoise' baseFrequency='0.0045 0.009' numOctaves='4' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.86  0 0 0 0 0.8  0 0 0 0 0.76  0 0 0 2.1 -0.95'/></filter><rect width='800' height='500' filter='url(%23f)'/></svg>");
  background-size: 800px 500px;
  background-repeat: repeat;
  opacity: .32;
  filter: blur(6px);
  will-change: transform;
}
.smoke i:nth-child(1) { animation: smokeDrift 70s linear infinite; }
.smoke i:nth-child(2) {
  background-size: 1100px 650px;
  opacity: .22;
  animation: smokeDrift 110s linear infinite reverse;
}
.smoke i:nth-child(3) {
  height: 60%;
  background-size: 600px 380px;
  opacity: .18;
  filter: blur(10px) sepia(.6) saturate(2.5) hue-rotate(-20deg);
  animation: smokeDrift 50s linear infinite, smokeRise 18s ease-in-out infinite alternate;
}
@keyframes smokeDrift { from { transform: translateX(0); } to { transform: translateX(25%); } }
@keyframes smokeRise { from { bottom: -12%; } to { bottom: -2%; } }
@media (prefers-reduced-motion: reduce) {
  .smoke i { animation: none !important; }
}

.versus {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(ellipse at center, rgba(40, 22, 14, .92) 0%, rgba(8, 5, 6, .97) 70%);
  overflow: hidden;
  color: var(--vellum);
}
.versus[hidden] { display: none; }
.vs-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 210, 127, .28), rgba(212, 120, 40, .08) 45%, transparent 70%);
  opacity: 0;
}
.vs-title {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 4.5vw, 56px);
  color: var(--gilt-hi) !important;
  text-shadow: 0 3px 0 #6e5118, 0 0 30px rgba(241, 210, 127, .45);
  opacity: 0;
}
.vs-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(24px, 6vw, 90px);
}
.vs-card {
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 18px 20px;
  border: 1px solid rgba(212, 169, 74, .6);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(46, 36, 48, .95), rgba(20, 15, 22, .95));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), inset 0 0 0 4px rgba(212, 169, 74, .07);
  opacity: 0;
}
.vs-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 50%;
  border: 3px solid var(--gilt);
  box-shadow: 0 0 26px rgba(212, 169, 74, .45);
  color: #fff6dc;
  font: 700 46px var(--display);
}
.vs-lvl {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 2px solid #f6e2a6;
  background: linear-gradient(180deg, var(--gilt-hi), #a87e2c);
  color: #2b1d06;
  font: 800 15px var(--text);
}
.vs-name {
  font-size: 22px;
  color: var(--vellum);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-level { font-size: 15px; color: #8fe3f2; font-weight: 700; }
.vs-church { font-size: 13px; color: var(--vellum-dim); font-style: italic; }
.vs-mark {
  font-family: var(--display);
  font-size: clamp(54px, 7vw, 96px);
  color: #fff3c9;
  text-shadow: 0 0 20px rgba(255, 170, 60, .9), 0 0 50px rgba(220, 80, 30, .7);
  opacity: 0;
}
.vs-sub {
  position: relative;
  margin: 0;
  font-size: 20px;
  font-style: italic;
  letter-spacing: .5px;
  color: var(--vellum) !important;
  opacity: 0;
}
.vs-count {
  position: relative;
  min-height: 70px;
  font-family: var(--display);
  font-size: 64px;
  line-height: 70px;
  color: var(--gilt-hi);
  text-shadow: 0 0 24px rgba(241, 210, 127, .6);
}
.vs-count.tick { animation: vsTick .9s ease-out; }
.versus.go .vs-glow { animation: vsGlow 4s ease-out forwards; }
.versus.go .vs-title { animation: vsDrop .5s .05s cubic-bezier(.2, .9, .3, 1.3) forwards; }
.versus.go .vs-left { animation: vsLeft .55s .25s cubic-bezier(.2, .9, .3, 1.15) forwards; }
.versus.go .vs-right { animation: vsRight .55s .25s cubic-bezier(.2, .9, .3, 1.15) forwards; }
.versus.go .vs-mark { animation: vsMark .5s .65s cubic-bezier(.2, .9, .3, 1.6) forwards, vsPulse 1.2s 1.2s ease-in-out infinite; }
.versus.go .vs-sub { animation: vsFade .5s 1s ease-out forwards; }
.versus.out { animation: vsOut .6s ease-in forwards; }
@keyframes vsGlow { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: .7; transform: scale(1.1); } }
@keyframes vsDrop { from { opacity: 0; transform: translateY(-40px) scale(1.3); } to { opacity: 1; transform: none; } }
@keyframes vsLeft { from { opacity: 0; transform: translateX(-60vw) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes vsRight { from { opacity: 0; transform: translateX(60vw) rotate(8deg); } to { opacity: 1; transform: none; } }
@keyframes vsMark { from { opacity: 0; transform: scale(3); } to { opacity: 1; transform: scale(1); } }
@keyframes vsPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes vsFade { to { opacity: 1; } }
@keyframes vsTick { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes vsOut { to { opacity: 0; transform: scale(1.05); } }
@media (max-width: 700px) {
  .vs-row { flex-direction: column; gap: 10px; }
  .vs-card { width: 220px; padding: 14px; }
  .vs-avatar { width: 64px; height: 64px; font-size: 30px; }
}
@media (max-width: 1100px) {
  .setup > .version-bar { position: static; }
}

.news {
  position: relative;
  overflow: visible;
  border-color: transparent !important;
  border-radius: 2px !important;
}
.news::before {
  content: '';
  position: absolute;
  inset: -8px;
  z-index: 3;
  pointer-events: none;
  background:
    url('images/deco/corner.png') left -7px top -7px / 30px 30px no-repeat,
    url('images/deco/corner.png') right -7px top -7px / 30px 30px no-repeat,
    url('images/deco/corner.png') left -7px bottom -7px / 30px 30px no-repeat,
    url('images/deco/corner.png') right -7px bottom -7px / 30px 30px no-repeat,
    url('images/deco/bar-h.png') left top / auto 16px repeat-x,
    url('images/deco/bar-h.png') left bottom / auto 16px repeat-x,
    url('images/deco/bar-v.png') left top / 16px auto repeat-y,
    url('images/deco/bar-v.png') right top / 16px auto repeat-y;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6));
}
.news::after {
  content: '';
  position: absolute;
  top: -31px;
  left: 50%;
  width: 44px;
  height: 62px;
  margin-left: -22px;
  z-index: 4;
  pointer-events: none;
  background: url('images/deco/gem.png') center / 100% 100% no-repeat;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .7));
}
.news-head { padding: 22px 24px 12px; }
.news-list { padding: 10px 16px 18px; }

.pb-gems {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(160, 110, 230, .5);
  border-radius: 14px;
  background: rgba(60, 30, 90, .45);
  color: #e4cfff;
  font-size: 14px;
}
.pb-gems img { width: 18px; height: 18px; object-fit: contain; filter: drop-shadow(0 0 4px rgba(180, 120, 255, .7)); }
.xp-gems {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 15px;
  color: #e4cfff;
}
.xp-gems span { display: flex; align-items: center; gap: 6px; }
.xp-gems img { width: 18px; height: 18px; object-fit: contain; }
.xp-gems b { color: #d0a8ff; }

.collection-box .col-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 2px 8px 10px;
  border-bottom: 1px solid var(--lead);
}
.col-wallet {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid rgba(160, 110, 230, .55);
  border-radius: 16px;
  background: rgba(60, 30, 90, .5);
  color: #e4cfff;
}
.col-wallet img { width: 22px; height: 22px; object-fit: contain; }
.col-wallet b { font-size: 17px; }
.col-rates { flex: 1 1 260px; font-size: 12.5px; color: var(--vellum-dim); }
.col-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--gilt-hi);
}
.col-wallet[hidden] { display: none; }
.col-switch { margin-left: auto; white-space: nowrap; }
.col-bar .net-status { margin: 0; flex: 1 1 100%; text-align: left; min-height: 1.2em; }
.tome-tab.locked { opacity: .65; }
.col-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}
.col-actions .btn { padding: 7px 14px; font-size: 14px; }
.col-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  font-weight: 800;
}
.col-price img { width: 16px; height: 16px; object-fit: contain; }
.col-deck-state b { color: var(--vellum); }
.col-deck-state.ok { color: #9fd9a6 !important; }
.col-deck-state.bad { color: #f1b38f !important; }
.deck-card.missing .kc { filter: grayscale(.85) brightness(.55); }
.deck-card.in-deck .deck-qty { background: linear-gradient(180deg, #9fe0a8, #4f9a5a); color: #0d2410; }
.col-card-info { margin-top: 12px; font-size: 14px; color: var(--vellum-dim); }
.col-card-info p { margin: 0 0 8px; }
.col-card-info b { color: var(--vellum); }
.col-craft { width: 100%; display: flex; align-items: center; justify-content: center; }
.col-sell { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.sell-veil { z-index: 120; background: rgba(8, 7, 11, .7); }
.veil .box.sell-box {
  width: min(560px, 100%);
  flex-direction: row;
  align-items: center;
  gap: 24px;
  text-align: left;
}
.sell-card { flex: 0 0 170px; }
.sell-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sell-info h2 { font-size: 32px; }
.sell-sub { font-size: 14px; }
.sell-qty { display: flex; align-items: center; gap: 10px; }
.sell-qty .btn { width: 38px; height: 38px; padding: 0; font-size: 20px; line-height: 1; }
.sell-qty b { min-width: 28px; text-align: center; font-size: 24px; color: var(--vellum); }
.sell-qty small { font-size: 13px; color: var(--vellum-dim); }
.veil p.sell-total { font-size: 15px; color: var(--vellum); }
.sell-total b { display: inline-flex; align-items: center; gap: 5px; font-size: 20px; color: #e4cfff; }
.sell-total img { width: 22px; height: 22px; object-fit: contain; }
.sell-info .pair { justify-content: flex-start; }
@media (max-width: 560px) {
  .veil .box.sell-box { flex-direction: column; text-align: center; }
  .sell-qty, .sell-info .pair { justify-content: center; }
}
.col-note { margin: 8px 0 0; font-size: 13px; font-style: italic; color: var(--vellum-dim); }
.col-decklist { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--lead); }
.col-decklist h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  color: var(--gilt-hi);
}
.col-decklist h3 small { font-family: var(--text); font-size: 13px; color: var(--vellum-dim); }
.col-decklist ul { list-style: none; margin: 0; padding: 0; }
.col-decklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(70, 63, 85, .4);
}
.col-decklist li span:nth-child(2) { flex: 1; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; background: #b9b9c2; }
.col-dot.r-U { background: #6fc17a; }
.col-dot.r-R { background: #a873e6; }
.col-empty { font-style: italic; color: var(--vellum-dim); }

.kc.ch-destin .kc-panel {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 2cqw, transparent 2cqw 5cqw),
    radial-gradient(ellipse 80% 60% at 50% 35%, #6a4f86, #4b3463 55%, #301f42);
}
.kc.ch-indecis .kc-panel {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 2cqw, transparent 2cqw 5cqw),
    radial-gradient(ellipse 80% 60% at 50% 35%, #6b6d72, #4c4e53 55%, #333438);
}
.col-quota {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 6px;
}
.col-quota span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--lead-hi);
  border-radius: 14px;
  background: rgba(14, 11, 16, .55);
  font-size: 13px;
  color: var(--vellum-dim);
}
.col-quota span.over { border-color: var(--crimson); color: #f19a8f; }
.col-quota img { width: 14px; height: 14px; object-fit: contain; }
.col-quota b { color: var(--vellum); }
.col-sep {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--lead-hi);
}
.col-sep b {
  font-family: var(--display);
  font-size: 24px;
  color: #c9cbd1;
}
.col-sep span { font-size: 13px; font-style: italic; color: var(--vellum-dim); }

.reward {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(46, 30, 18, .96), rgba(6, 4, 6, .985) 70%);
  color: var(--vellum);
  text-align: center;
}
.reward[hidden] { display: none; }
.rw-rays {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 1600px;
  height: 1600px;
  margin: -800px 0 0 -800px;
  background: repeating-conic-gradient(from 0deg, rgba(241, 210, 127, .09) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  opacity: 0;
}
.rw-glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 700px;
  height: 700px;
  margin: -350px 0 0 -350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 210, 127, .35), rgba(212, 120, 40, .1) 45%, transparent 70%);
  opacity: 0;
}
.rw-kicker {
  position: relative;
  margin: 0;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 1px;
  color: var(--vellum) !important;
  opacity: 0;
}
.rw-title {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1;
  color: var(--gilt-hi);
  text-shadow: 0 3px 0 #6e5118, 0 0 34px rgba(241, 210, 127, .5);
  opacity: 0;
}
.rw-elue {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 8px 0 4px;
  opacity: 0;
}
.rw-elue-card {
  width: clamp(130px, 13vw, 190px);
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--gilt-hi), 0 0 50px rgba(241, 210, 127, .55), 0 20px 50px rgba(0, 0, 0, .7);
}
.rw-elue > b { margin-top: 8px; font-size: 20px; color: var(--gilt-hi); }
.rw-elue > span { font-size: 13px; font-style: italic; color: var(--vellum-dim); }
.rw-cards {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: calc(5 * clamp(76px, 7.2vw, 108px) + 4 * 12px + 1px);
}
.rw-card {
  position: relative;
  width: clamp(76px, 7.2vw, 108px);
  opacity: 0;
}
.rw-card .kc { border-radius: 6px; }
.rw-card.rR .kc { box-shadow: 0 0 0 2px #b88cf0, 0 0 22px rgba(168, 115, 230, .7); }
.rw-card.rU .kc { box-shadow: 0 0 0 2px #6fc17a, 0 0 14px rgba(111, 193, 122, .5); }
.rw-qty {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gilt-hi), #a87e2c);
  color: #2b1d06;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.rw-sum {
  position: relative;
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--vellum-dim) !important;
  opacity: 0;
}
.rw-btns {
  position: relative;
  display: flex;
  gap: 10px;
  margin-top: 8px;
  opacity: 0;
}
.reward.go .rw-rays { animation: rwFade .8s ease-out forwards, rwSpin 60s linear infinite; }
.reward.go .rw-glow { animation: rwGlow 1.4s ease-out forwards; }
.reward.go .rw-kicker { animation: rwDrop .5s .1s ease-out forwards; }
.reward.go .rw-title { animation: rwDrop .6s .3s cubic-bezier(.2, .9, .3, 1.3) forwards; }
.reward.go .rw-elue { animation: rwElue .8s .6s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.reward.go .rw-card { animation: rwCard .55s cubic-bezier(.2, .9, .3, 1.25) forwards; animation-delay: calc(1.25s + var(--i) * .14s); }
.reward.go .rw-sum { animation: rwFade .5s 2.6s ease-out forwards; }
.reward.go .rw-btns { animation: rwDrop .5s 2.8s ease-out forwards; }
@keyframes rwFade { to { opacity: 1; } }
@keyframes rwSpin { to { transform: rotate(360deg); } }
@keyframes rwGlow { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; } 100% { opacity: .8; transform: scale(1); } }
@keyframes rwDrop { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes rwElue { 0% { opacity: 0; transform: scale(.4) rotateY(180deg); } 100% { opacity: 1; transform: none; } }
@keyframes rwCard { 0% { opacity: 0; transform: translateY(60px) scale(.6) rotate(-8deg); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reward.go * { animation-duration: .01s !important; animation-delay: 0s !important; }
}

.forge {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(ellipse at 50% 45%, rgba(40, 18, 6, .9), rgba(6, 3, 3, .95) 65%);
  cursor: pointer;
}
.forge[hidden] { display: none; }
.fg-glow {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 140, 40, .45), rgba(200, 60, 10, .15) 45%, transparent 70%);
  opacity: .5;
  animation: fgPulse 1.2s ease-in-out infinite alternate;
}
.fg-stage {
  position: relative;
  width: clamp(160px, 15vw, 210px);
}
.fg-card {
  position: relative;
  border-radius: 8px;
  filter: brightness(.25) sepia(1) saturate(4) hue-rotate(-20deg);
  box-shadow: 0 0 40px rgba(255, 120, 30, .55);
  transform: scale(.85);
  opacity: 0;
  transition: filter .6s ease, box-shadow .6s ease;
}
.forge.go .fg-card { animation: fgIn .35s ease-out forwards; }
.forge.hit .fg-card { animation: fgHit .32s ease-out; opacity: 1; transform: scale(.9); }
.forge.done .fg-card {
  opacity: 1;
  transform: scale(1);
  filter: none;
  animation: fgReveal .6s cubic-bezier(.2, .9, .3, 1.4);
  box-shadow: 0 0 0 2px var(--gilt-hi), 0 0 60px rgba(241, 210, 127, .8);
}
.forge.done.rR .fg-card { box-shadow: 0 0 0 2px #b88cf0, 0 0 70px rgba(168, 115, 230, .9); }
.forge.done.rU .fg-card { box-shadow: 0 0 0 2px #6fc17a, 0 0 60px rgba(111, 193, 122, .8); }
.forge.hit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 220, 160, .35), transparent 40%);
  animation: fgFlash .25s ease-out forwards;
  pointer-events: none;
}
.fg-sparks {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}
.fg-sparks i {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd38a;
  box-shadow: 0 0 6px 2px rgba(255, 160, 50, .9);
  animation: fgSpark .6s ease-out forwards;
}
.fg-text {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 60px;
  opacity: 0;
}
.fg-text b {
  font-family: var(--display);
  font-size: 40px;
  color: var(--gilt-hi);
  text-shadow: 0 3px 0 #6e5118, 0 0 24px rgba(241, 210, 127, .5);
}
.fg-text span { font-size: 16px; color: var(--vellum); }
.forge.done .fg-text { animation: rwDrop .45s ease-out forwards; }
@keyframes fgIn { to { opacity: 1; transform: scale(.9); } }
@keyframes fgHit {
  0% { transform: scale(.9) translateY(0); }
  20% { transform: scale(.86) translateY(6px) rotate(-1.5deg); }
  60% { transform: scale(.92) translateY(-3px) rotate(1deg); }
  100% { transform: scale(.9) translateY(0); }
}
@keyframes fgReveal { 0% { transform: scale(.9); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes fgFlash { from { opacity: 1; } to { opacity: 0; } }
@keyframes fgPulse { from { opacity: .35; transform: scale(.95); } to { opacity: .7; transform: scale(1.05); } }
@keyframes fgSpark {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; }
}
.xp-lines li.xp-penalty span,
.xp-lines li.xp-penalty b { color: #f19a8f; }
.xp-wait { margin: 0 0 8px; font-style: italic; font-size: 14px; color: var(--vellum); opacity: .85; text-align: center; }
.end-vote {
  margin: 0;
  min-height: 1.2em;
  font-size: 14px;
  font-style: italic;
  color: var(--gilt-hi) !important;
}
.end-vote:empty { display: none; }
.kc-star {
  position: absolute;
  right: 9cqw;
  font-family: Georgia, serif;
  font-size: 4.2cqw;
  line-height: 1;
  color: #f1d27f;
  text-shadow: 0 0 1.5cqw rgba(241, 210, 127, .8);
}
.col-star { font-style: normal; color: var(--gilt-hi); }

.home-art {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #120c09;
}
.home-art i {
  position: absolute;
  inset: 0;
  background-position: center 16%;
  background-size: cover;
  background-repeat: no-repeat;
}
.home-art .art-bg {
  background-image: url('images/accueil.jpg');
  animation: artBreathe 30s ease-in-out infinite alternate;
}
.home-art .art-mana,
.home-art .art-elue {
  --cover: max(100vw, 100vh);
  inset: auto;
  left: calc((100vw - var(--cover)) / 2);
  top: calc((100vh - var(--cover)) * .16);
  width: var(--cover);
  height: var(--cover);
  background-size: 100% 100%;
  background-position: 0 0;
}
.home-art .art-mana {
  background-image: url('images/accueil-mana.webp');
  will-change: transform, opacity;
  animation: manaFall 4.5s cubic-bezier(.5, 0, .9, .6) .6s both;
}
.home-art .art-elue {
  background-image: url('images/accueil-elue.webp');
  will-change: transform;
  animation: elueFloat 6s ease-in-out infinite alternate;
}
.home-art .art-shade {
  background:
    linear-gradient(90deg, rgba(10, 7, 6, .92) 0%, rgba(10, 7, 6, .7) 28%, rgba(10, 7, 6, .12) 55%, rgba(10, 7, 6, .25) 100%),
    linear-gradient(0deg, rgba(10, 7, 6, .75) 0%, rgba(10, 7, 6, 0) 35%);
}
@keyframes manaFall {
  0% { transform: translateY(-38vh); opacity: 0; }
  15% { opacity: 1; }
  86% { transform: translateY(9vh); opacity: 1; animation-timing-function: ease-out; }
  93% { transform: translateY(7.6vh); animation-timing-function: ease-in; }
  100% { transform: translateY(9vh); opacity: 1; }
}
@keyframes elueFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-2.2vh); }
}
@keyframes artBreathe {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .home-art i { animation: none !important; }
}

.left-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.left-col .journal { flex: 1 1 auto; min-height: 120px; }
.chat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  max-height: 46%;
  min-height: 0;
  background: rgba(14, 12, 20, .72);
  border: 1px solid var(--lead);
  border-radius: 6px;
  overflow: hidden;
}
.chat[hidden] { display: none; }
.chat.ping { animation: chatPing .9s ease-out; }
@keyframes chatPing {
  0% { box-shadow: 0 0 0 0 rgba(241, 210, 127, .7); border-color: var(--gilt-hi); }
  100% { box-shadow: 0 0 0 10px rgba(241, 210, 127, 0); border-color: var(--lead); }
}
.chat-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 8px 12px 6px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}
.chat-head h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--gilt);
}
.chat-head small {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-style: italic;
  color: var(--vellum-dim);
}
.chat-unread {
  align-self: center;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--crimson);
  color: #fff;
  font-size: 11px;
  text-align: center;
}
.chat-arrow {
  align-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--vellum-dim);
  border-bottom: 2px solid var(--vellum-dim);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s;
}
.chat.closed .chat-arrow { transform: rotate(-135deg) translate(-2px, -2px); }
.chat.closed .chat-body { display: none; }
.chat-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 0 12px 10px;
}
.chat-list {
  flex: 1 1 auto;
  min-height: 70px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  line-height: 1.35;
  scrollbar-width: thin;
  scrollbar-color: var(--lead-hi) transparent;
}
.chat-list p {
  max-width: 92%;
  padding: 5px 9px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  color: var(--vellum);
}
.chat-list p b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 1px;
}
.chat-list p.mine {
  align-self: flex-end;
  background: rgba(74, 134, 212, .22);
  border: 1px solid rgba(74, 134, 212, .4);
}
.chat-list p.mine b { color: #9cc3f2; }
.chat-list p.theirs {
  align-self: flex-start;
  background: rgba(193, 59, 72, .2);
  border: 1px solid rgba(193, 59, 72, .4);
}
.chat-list p.theirs b { color: #f09aa3; }
.chat-list .chat-empty {
  align-self: center;
  max-width: none;
  padding: 10px 0;
  border: 0;
  font-style: italic;
  color: var(--vellum-dim);
}
.chat-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-chip {
  padding: 3px 8px;
  border: 1px solid var(--lead-hi);
  border-radius: 12px;
  background: rgba(45, 40, 56, .7);
  color: var(--vellum-dim);
  font-size: 12px;
}
.chat-chip:hover { border-color: var(--gilt); color: var(--vellum); }
.chat-form { display: flex; gap: 6px; }
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--lead-hi);
  border-radius: 4px;
  background: #0e0c14;
  color: var(--vellum);
  font: inherit;
  font-size: 13px;
}
.chat-form input:focus { outline: none; border-color: var(--gilt); }
.chat-form .btn { padding: 6px 10px; font-size: 13px; }

.kc.holo::after,
.forge.holo.done .fg-card .kc::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 70, 170, .55) 28%, rgba(255, 220, 60, .5) 36%, rgba(60, 255, 170, .5) 44%, rgba(60, 170, 255, .55) 52%, rgba(190, 80, 255, .55) 60%, transparent 70%),
    repeating-linear-gradient(55deg, rgba(255, 255, 255, .14) 0 2px, transparent 2px 7px);
  background-size: 260% 260%, 100% 100%;
  mix-blend-mode: color-dodge;
  opacity: .75;
  animation: holoShift 3.6s ease-in-out infinite alternate;
}
@keyframes holoShift {
  from { background-position: 0% 0%, 0 0; }
  to { background-position: 100% 100%, 0 0; }
}
.holo-tag {
  position: absolute;
  top: -8px;
  left: -6px;
  z-index: 6;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #1b1030;
  background: linear-gradient(100deg, #ff8ad8, #ffe680, #7dffcf, #7cc8ff, #d39bff);
  background-size: 200% 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
  animation: holoTag 3s linear infinite;
}
@keyframes holoTag { to { background-position: 200% 0; } }
.holo-text {
  background: linear-gradient(100deg, #ff8ad8, #ffe680, #7dffcf, #7cc8ff, #d39bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.forge.holo.done .fg-card { box-shadow: 0 0 0 2px #fff, 0 0 40px rgba(255, 120, 220, .7), 0 0 90px rgba(120, 200, 255, .7); }
.forge.holo.done .fg-text b {
  background: linear-gradient(100deg, #ff8ad8, #ffe680, #7dffcf, #7cc8ff, #d39bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 #3a1d4f);
}
.col-all .col-sep:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.col-church { flex-wrap: wrap; }
.col-church.ch-loi b { color: #8fd17a; }
.col-church.ch-destin b { color: #c79bf0; }
.col-church .col-buy { margin-left: auto; padding: 6px 12px; font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .kc.holo::after, .holo-tag { animation: none; }
}
.col-all .col-bar { padding-right: 56px; }
.col-church .col-buy span { font-size: inherit; font-style: normal; color: inherit; }

.shop-box { width: min(1240px, 100%); }
.shop-box .col-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 2px 56px 10px 8px;
  border-bottom: 1px solid var(--lead);
}
.shop-box .col-bar .net-status { margin: 0; flex: 1 1 100%; text-align: left; min-height: 1.2em; }
.shop-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  padding: 16px 8px 8px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--lead-hi) transparent;
}
.pack {
  --tint: #9aa0aa;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 14px;
  border: 1px solid var(--lead-hi);
  border-top: 3px solid var(--tint);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .25)), rgba(20, 16, 24, .9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.pack.ch-loi { --tint: #8fd17a; }
.pack.ch-destin { --tint: #c79bf0; }
.pack-church { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--tint); }
.pack-head h3 { margin: 2px 0 4px; font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.05; color: var(--gilt-hi); }
.pack-head p { font-size: 13px; color: var(--vellum-dim); }
.pack-fan { position: relative; height: 150px; }
.pack-card {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 92px;
  transform-origin: 50% 120%;
  transform: translateX(-50%) rotate(calc((var(--k) - 2) * 9deg)) translateX(calc((var(--k) - 2) * 18px));
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55));
  transition: transform .25s;
}
.pack-fan.n1 .pack-card { transform: translateX(-50%); }
.pack-fan.n2 .pack-card { transform: translateX(-50%) rotate(calc((var(--k) - .5) * 10deg)) translateX(calc((var(--k) - .5) * 30px)); }
.pack-fan.n3 .pack-card { transform: translateX(-50%) rotate(calc((var(--k) - 1) * 10deg)) translateX(calc((var(--k) - 1) * 24px)); }
.pack-fan.n4 .pack-card { transform: translateX(-50%) rotate(calc((var(--k) - 1.5) * 9deg)) translateX(calc((var(--k) - 1.5) * 20px)); }
.pack:hover .pack-card { transform: translateX(-50%) rotate(calc((var(--k) - 2) * 12deg)) translateX(calc((var(--k) - 2) * 26px)) translateY(-4px); }
.pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.pack-list li { display: flex; align-items: center; gap: 8px; color: var(--vellum); }
.pack-list li span:nth-child(2) { flex: 1; }
.pack-list b { color: var(--gilt-hi); }
.pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--lead); }
.pack-foot small { color: var(--vellum-dim); font-size: 12px; }
.pack-buy { display: inline-flex; align-items: center; gap: 8px; }
.pack-lock { margin: -4px 0 0; font-size: 12px; font-style: italic; color: #f09aa3; }
.veil .box.shop-confirm-box { width: min(440px, 100%); gap: 12px; }
.shop-confirm-box h2 { font-size: 32px; }
.rw-card .holo-tag { top: auto; bottom: -8px; left: 50%; transform: translateX(-50%); }

.shop-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 8px 0; }
.shop-filter {
  --tint: var(--gilt-hi);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--lead-hi);
  border-radius: 18px;
  background: rgba(30, 26, 38, .8);
  color: var(--vellum-dim);
  font-weight: 600;
  font-size: 14px;
}
.shop-filter small {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  font-size: 11px;
  text-align: center;
}
.shop-filter.ch-loi { --tint: #8fd17a; }
.shop-filter.ch-destin { --tint: #c79bf0; }
.shop-filter.ch-indecis { --tint: #c9cbd1; }
.shop-filter:hover { border-color: var(--tint); color: var(--vellum); }
.shop-filter.on { border-color: var(--tint); color: var(--tint); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--tint); }
.pack-fan { margin-bottom: 14px; }
.pack-list { margin-top: 6px; }
.pack-list .pack-group { margin-top: 8px; }
.pack-list .pack-group:first-child { margin-top: 0; }

.atelier-btn { border-color: rgba(241, 210, 127, .6); color: var(--gilt-hi); }
.atelier-box { width: min(1320px, 100%); }
.at-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; padding-top: 12px; }
.at-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.at-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.at-filters .shop-filter { padding: 4px 10px; font-size: 12px; }
.at-tools { display: flex; flex-direction: column; gap: 6px; }
.at-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--lead-hi) transparent; }
.at-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: none;
  color: var(--vellum);
  text-align: left;
  font-size: 14px;
}
.at-item:hover { background: rgba(255, 255, 255, .05); }
.at-item.on { border-color: var(--gilt); background: rgba(241, 210, 127, .08); }
.at-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-state { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: var(--vellum-dim); }
.at-state.s-créée { background: rgba(111, 193, 122, .2); color: #a6e2ae; }
.at-state.s-modifiée { background: rgba(74, 134, 212, .25); color: #a9c8f2; }
.at-state.s-brouillon { background: rgba(193, 59, 72, .25); color: #f09aa3; }
.at-main { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--lead-hi) transparent; }
.at-empty { padding: 40px; text-align: center; font-style: italic; color: var(--vellum-dim); }
.at-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.at-form { display: flex; flex-direction: column; gap: 12px; }
.at-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--vellum-dim); }
.at-form input, .at-form select {
  padding: 7px 9px;
  border: 1px solid var(--lead-hi);
  border-radius: 4px;
  background: #0e0c14;
  color: var(--vellum);
  font: inherit;
  font-size: 14px;
}
.at-form input:focus, .at-form select:focus { outline: none; border-color: var(--gilt); }
.at-form input:disabled, .at-form select:disabled { opacity: .55; }
.at-row { display: flex; gap: 12px; }
.at-row > label { flex: 1; min-width: 0; }
.at-form fieldset { margin: 0; padding: 8px 12px 10px; border: 1px solid var(--lead); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.at-form legend { padding: 0 6px; font-size: 12px; color: var(--gilt); }
.at-form .at-check { flex-direction: row; align-items: center; gap: 6px; font-size: 13.5px; color: var(--vellum); cursor: pointer; }
.at-form .at-check .num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--gilt); color: #2b1d06; font-size: 11px; font-weight: 800; }
.at-draft { padding: 8px 12px; border: 1px dashed rgba(193, 59, 72, .6); border-radius: 6px; }
.at-arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; width: 100%; }
.at-art {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #0e0c14 center / cover no-repeat;
  cursor: pointer;
}
.at-art:hover { border-color: var(--lead-hi); }
.at-art.on { border-color: var(--gilt-hi); box-shadow: 0 0 10px rgba(241, 210, 127, .5); }
.at-form .at-upload { display: grid; place-items: center; border: 2px dashed var(--lead-hi); color: var(--vellum-dim); font-size: 26px; }
.at-aside { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.at-actions { display: flex; flex-direction: column; gap: 8px; }
.at-actions .armed { border-color: var(--crimson); background: linear-gradient(180deg, #7a2530, var(--crimson-deep)); color: #fff; }

.tip {
  --arrow: 50%;
  position: fixed;
  z-index: 1000;
  max-width: min(320px, calc(100vw - 16px));
  padding: 7px 12px 8px;
  border: 1px solid rgba(212, 169, 74, .75);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(241, 210, 127, .08), transparent 55%),
    linear-gradient(180deg, #241d2a, #141018);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 26px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 236, 180, .12);
  color: var(--vellum);
  font-family: var(--text);
  font-size: 13.5px;
  line-height: 1.35;
  white-space: pre-line;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease;
}
.tip[hidden] { display: none; }
.tip.on { opacity: 1; transform: none; }
.tip.below { transform: translateY(-4px); }
.tip.below.on { transform: none; }
.tip::before,
.tip::after {
  content: '';
  position: absolute;
  left: var(--arrow);
  width: 0;
  height: 0;
  border: 7px solid transparent;
  transform: translateX(-50%);
}
.tip::before { top: 100%; border-top-color: rgba(212, 169, 74, .75); }
.tip::after { top: calc(100% - 1.5px); border-top-color: #141018; }
.tip.below::before { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: rgba(212, 169, 74, .75); }
.tip.below::after { top: auto; bottom: calc(100% - 1.5px); border-top-color: transparent; border-bottom-color: #241d2a; }
@media (prefers-reduced-motion: reduce) {
  .tip { transition: none; }
}

.player-bar { z-index: 100; gap: 20px; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; margin-right: auto; }
.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  background: none;
  color: var(--vellum-dim);
  font-family: var(--text);
  font-weight: 800;
  font-size: 15.5px;
  transition: color .15s, background .15s;
}
.nav-tab[hidden] { display: none; }
.nav-tab svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-tab:hover { color: var(--vellum); background: linear-gradient(0deg, rgba(255, 255, 255, .05), transparent); }
.nav-tab.on { color: var(--gilt-hi); background: linear-gradient(0deg, rgba(212, 169, 74, .2), transparent); }
.nav-tab.on::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -2px;
  height: 3px;
  border-radius: 2px;
  background: var(--gilt-hi);
  box-shadow: 0 0 10px var(--gilt-hi);
}
.nav-tab.nav-admin { color: #c79bf0; }
.nav-tab.nav-admin.on { color: #e0c4ff; }
.nav-tab.nav-admin.on::after { background: #c79bf0; box-shadow: 0 0 10px #c79bf0; }
.nav-tab:focus-visible { outline: 2px solid var(--gilt-hi); outline-offset: -4px; }
body.with-nav .deck-veil,
body.with-nav .tome-veil { top: 64px; }
@media (max-width: 1280px) {
  .nav-tab { padding: 0 10px; font-size: 14px; }
}
@media (max-width: 1050px) {
  .nav-tab span { display: none; }
  .nav-tab svg { width: 24px; height: 24px; }
}
body.with-nav .deck-veil,
body.with-nav .tome-veil {
  padding: 0;
  place-items: stretch;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  background: #120e16;
  backdrop-filter: none;
}
body.with-nav .deck-veil .deckview {
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: 18px max(16px, 3vw) 12px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212, 169, 74, .07), transparent 70%),
    linear-gradient(180deg, #221c2b, #120e16);
  box-shadow: none;
  animation: pageIn .22s ease-out;
}
body.with-nav .tome-veil .tome {
  width: 100%;
  height: 100%;
  border-radius: 0;
  animation: pageIn .22s ease-out;
}
body.with-nav .deck-veil .tome-close,
body.with-nav .tome-veil .tome-close { display: none; }
body.with-nav .shop-box .col-bar,
body.with-nav .collection-box .col-bar,
body.with-nav .atelier-box .col-bar { padding-right: 8px; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

body.with-nav #col-switch { display: none; }

body.view-open .player-bar::after { display: none; }

.col-count {
  align-self: center;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid var(--lead-hi);
  background: rgba(255, 255, 255, .05);
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
  color: var(--vellum);
}
.col-count.full { border-color: var(--gilt); color: var(--gilt-hi); }
.col-all .deck-head:empty { display: none; }
body.with-nav .deck-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 0; padding-top: 6px; }
body.with-nav .deck-list { padding: 14px 28px 32px 6px; scrollbar-gutter: stable; }
body.with-nav .deck-detail { padding: 14px 8px 28px 28px; }
body.with-nav .deck-grid { gap: 26px 20px; }
body.with-nav .col-sep { margin-top: 22px; padding-top: 24px; margin-bottom: 4px; }
body.with-nav .col-all .col-sep:first-child { margin-top: 0; padding-top: 0; }
body.with-nav .deck-detail .col-card-info { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
body.with-nav .collection-box .col-bar { padding-bottom: 16px; }
body.with-nav .shop-grid { gap: 24px; padding: 20px 28px 32px 6px; }
body.with-nav .shop-filters { padding: 18px 6px 4px; }
@media (max-width: 760px) {
  body.with-nav .deck-body { grid-template-columns: 1fr; gap: 14px; }
  body.with-nav .deck-detail { padding: 10px 6px; }
}

.col-forge-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.col-forge-row .col-craft, .col-forge-row .col-sell { width: 100%; margin: 0; padding: 9px 8px; gap: 6px; white-space: nowrap; }
.kc-art::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 66%, rgba(0, 0, 0, .15) 76%, rgba(0, 0, 0, .4) 86%, rgba(0, 0, 0, .6) 96%);
}

.banner.mine strong { font-size: clamp(44px, 7.5vw, 90px); }
.banner.mine.show { animation: sweep 2.1s ease-in-out both; }
.banner.mine::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gilt-hi), transparent);
  box-shadow: 0 0 12px var(--gilt-hi);
}
.banner.theirs strong { color: var(--vellum); text-shadow: 0 3px 0 #2a2117, 0 0 30px rgba(0, 0, 0, .6); font-size: clamp(34px, 5.5vw, 64px); }
.turn-who {
  margin: -2px 0 8px;
  padding: 6px 10px;
  border-radius: 5px;
  text-align: center;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  border: 1px solid var(--lead-hi);
  color: var(--vellum-dim);
  background: rgba(255, 255, 255, .04);
}
.turn-who.me {
  color: #2b1d06;
  border-color: #f6e2a6;
  background: linear-gradient(180deg, var(--gilt-hi), var(--gilt) 60%, #a87e2c);
  animation: myTurnPulse 1.6s ease-in-out infinite;
}
@keyframes myTurnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241, 210, 127, .55); }
  50% { box-shadow: 0 0 16px 2px rgba(241, 210, 127, .55); }
}
@media (prefers-reduced-motion: reduce) {
  .turn-who.me { animation: none; }
}

.fireball {
  position: fixed;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 45% 40%, #fffbe0 0%, #ffd34d 22%, #ff7a1a 48%, #d1220f 72%, rgba(120, 10, 0, 0) 100%);
  box-shadow: 0 0 24px 10px rgba(255, 120, 30, .8), 0 0 60px 20px rgba(255, 60, 0, .45);
  filter: blur(.4px);
  z-index: 75;
}
.fireball.big { width: 70px; height: 70px; }
.fire-ember {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 210, 90, .95), rgba(255, 90, 20, .6) 50%, transparent 72%);
  animation: emberFade .52s ease-out forwards;
}
@keyframes emberFade { to { opacity: 0; transform: translate(-50%, -50%) scale(.2) translateY(-14px); } }
.fire-burst {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff6c8 0%, #ffcc40 25%, #ff6a10 50%, rgba(200, 30, 0, .5) 70%, transparent 75%);
  box-shadow: 0 0 40px 20px rgba(255, 110, 20, .7);
  animation: fireBurst .7s ease-out forwards;
}
.fire-burst.big { box-shadow: 0 0 60px 30px rgba(255, 110, 20, .8); }
@keyframes fireBurst {
  0% { width: 30px; height: 30px; opacity: 1; }
  40% { opacity: 1; }
  100% { width: 220px; height: 220px; opacity: 0; }
}
.fire-burst.big { animation-name: fireBurstBig; }
@keyframes fireBurstBig {
  0% { width: 40px; height: 40px; opacity: 1; }
  40% { opacity: 1; }
  100% { width: 300px; height: 300px; opacity: 0; }
}
.fire-spark {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  background: #ffd36a;
  box-shadow: 0 0 8px 2px #ff7a1a;
  transform: translate(-50%, -50%);
  animation: fireSpark .65s ease-out forwards;
}
@keyframes fireSpark { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))); opacity: 0; } }
body.fire-shake .tilt { animation: fireShake .32s ease-out; }
@keyframes fireShake {
  0%, 100% { translate: 0 0; }
  20% { translate: -5px 3px; }
  40% { translate: 4px -3px; }
  60% { translate: -3px 2px; }
  80% { translate: 2px -1px; }
}

.gavel-flash {
  position: fixed;
  pointer-events: none;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(255, 236, 170, .9), inset 0 0 30px rgba(255, 214, 110, .8), 0 0 26px rgba(241, 190, 80, .8);
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 240, 190, .55), transparent 70%);
  animation: gavelFlash .55s ease-out forwards;
}
.gavel-flash.heavy { box-shadow: inset 0 0 0 3px #fff2c4, inset 0 0 40px rgba(255, 214, 110, .95), 0 0 46px rgba(241, 190, 80, .95); }
@keyframes gavelFlash { from { opacity: 1; } to { opacity: 0; } }
.gavel-ring {
  position: fixed;
  width: 20px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  border: 3px solid rgba(255, 226, 140, .95);
  box-shadow: 0 0 14px rgba(241, 190, 80, .9);
  transform: translate(-50%, -50%);
  animation: gavelRing .6s ease-out forwards;
}
.gavel-ring.heavy { border-width: 4px; animation-name: gavelRingBig; }
@keyframes gavelRing { to { width: 140px; height: 70px; opacity: 0; } }
@keyframes gavelRingBig { to { width: 230px; height: 115px; opacity: 0; } }
.gavel-spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: #fff3c2;
  box-shadow: 0 0 8px 2px #e8b04a;
  transform: translate(-50%, -50%);
  animation: fireSpark .6s ease-out forwards;
}
.gavel-mark {
  position: fixed;
  pointer-events: none;
  font-size: 44px;
  line-height: 1;
  color: #ffe9a8;
  text-shadow: 0 0 12px rgba(241, 190, 80, .95), 0 2px 0 #6e5118;
  transform: translate(-50%, -50%) scale(.4);
  animation: gavelMark 1.1s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
@keyframes gavelMark {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  25% { transform: translate(-50%, -60%) scale(1.25); opacity: 1; }
  70% { transform: translate(-50%, -80%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -110%) scale(.9); opacity: 0; }
}

.dead.hold { animation: none; }

.prayer {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "head btns" "text btns" "hint btns";
  align-items: center;
  gap: 2px 18px;
  padding: 12px 18px 12px;
  border-radius: 8px;
  border: 1px solid rgba(241, 210, 127, .55);
  background:
    linear-gradient(90deg, rgba(31, 63, 110, .75), rgba(20, 17, 28, .94) 70%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 8px 26px rgba(0, 0, 0, .5), 0 0 30px rgba(127, 208, 230, .18);
}
.prayer.own2 { background: linear-gradient(90deg, rgba(110, 28, 38, .8), rgba(20, 17, 28, .94) 70%); }
.prayer.mine { border-color: var(--gilt-hi); animation: rise .25s ease-out, prayerGlow 1.8s ease-in-out .25s infinite; }
@keyframes prayerGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 8px 26px rgba(0, 0, 0, .5), 0 0 14px rgba(241, 210, 127, .25); }
  50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 8px 26px rgba(0, 0, 0, .5), 0 0 30px rgba(241, 210, 127, .55); }
}
.prayer-head { grid-area: head; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.prayer-who { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--vellum-dim); }
.prayer-name { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.05; color: var(--gilt-hi); }
.prayer #prayer-text { grid-area: text; font-size: 16px; color: #eef6f8; }
.prayer .prayer-hint { grid-area: hint; font-size: 13px; font-style: italic; color: var(--aim); }
.prayer .prayer-hint[hidden] { display: none; }
.prayer #prayer-btns { grid-area: btns; flex-direction: column; }
.prayer #prayer-btns:empty { display: none; }
.prayer-pop {
  position: fixed;
  left: 50%;
  top: 34%;
  z-index: 76;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 40px 14px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(20, 16, 26, .92) 40%, transparent 72%);
  animation: prayerPop 1.9s ease-out forwards;
}
.prayer-pop span { font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--vellum-dim); }
.prayer-pop strong { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; color: var(--gilt-hi); text-shadow: 0 3px 0 #6e5118, 0 0 36px rgba(241, 210, 127, .55); }
.prayer-pop.own2 strong { text-shadow: 0 3px 0 #5e1820, 0 0 36px rgba(232, 86, 74, .6); }
@keyframes prayerPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  24% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .prayer.mine, .prayer-pop { animation: none; }
}

.u-marks { align-items: center; }
.kc-cercle {
  z-index: 4;
  top: 3.5cqw;
  right: 3.5cqw;
  display: grid;
  place-items: center;
  width: 13cqw;
  height: 13cqw;
  border-radius: 50%;
  font-style: normal;
  font-size: 6.5cqw;
  line-height: 1;
  color: var(--gilt-hi);
  background: radial-gradient(circle at 40% 35%, #3a2f22, #120e0a);
  box-shadow: 0 0 0 .6cqw var(--gilt), 0 .6cqw 1.6cqw rgba(0, 0, 0, .7);
}
.kc-cercle img { width: 68%; height: 68%; object-fit: contain; filter: sepia(1) saturate(3) hue-rotate(-12deg) brightness(1.05); }
.unit .kc-cercle { top: 5cqw; right: 5cqw; width: 26cqw; height: 26cqw; font-size: 13cqw; box-shadow: 0 0 0 1.2cqw var(--gilt), 0 1cqw 3cqw rgba(0, 0, 0, .7); }
.kc-cercle.c-feu { background: radial-gradient(circle at 40% 35%, #8a2a14, #2a0806); }
.kc-cercle.c-juges { background: radial-gradient(circle at 40% 35%, #6e5a24, #1e180a); }
.kc-cercle.c-guerre { background: radial-gradient(circle at 40% 35%, #4b5866, #12161b); }
.kc-cercle.c-oracles { background: radial-gradient(circle at 40% 35%, #2e5d78, #08151f); }
.kc-cercle.c-prophetes { background: radial-gradient(circle at 40% 35%, #5a3888, #140a22); }
.kc-cercle.c-assassins { background: radial-gradient(circle at 40% 35%, #6a1626, #0e0306); }

.prayer {
  border: 1px solid #8a7240;
  background: linear-gradient(180deg, rgba(36, 28, 30, .96), rgba(16, 12, 16, .98));
  box-shadow: inset 0 1px 0 rgba(255, 236, 180, .12), 0 0 0 3px #120e14, 0 0 0 4px rgba(212, 169, 74, .45), 0 10px 26px rgba(0, 0, 0, .55);
}
.prayer.own2 { background: linear-gradient(180deg, rgba(36, 28, 30, .96), rgba(16, 12, 16, .98)); }
.prayer.own2 .prayer-who { color: #e8564a; }
.prayer .prayer-who { color: var(--gilt); }
.prayer #prayer-text { color: var(--vellum); }
.prayer .prayer-hint { color: var(--gilt); }
.pmodal {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 6, 10, .58);
  animation: pmFade .2s ease-out;
}
.pmodal[hidden] { display: none; }
.pmodal-box {
  width: min(600px, 100%);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px 28px 22px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2c2638, #17121e);
  box-shadow: 0 0 0 1px #8a7240, 0 0 0 4px #17121e, 0 0 0 5px rgba(212, 169, 74, .45), 0 30px 70px rgba(0, 0, 0, .8);
  animation: pmIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.pm-art {
  position: relative;
  width: 160px;
  height: 150px;
  border-radius: 6px;
  background-size: cover;
  background-position: center 20%;
  box-shadow: 0 0 0 2px var(--gilt), 0 0 30px rgba(241, 210, 127, .35);
}
.pmodal.own2 .pm-art { box-shadow: 0 0 0 2px #c13b48, 0 0 30px rgba(232, 86, 74, .45); }
.pm-icon {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  background: radial-gradient(circle at 40% 35%, #5a0d13, #1e0406);
  box-shadow: 0 0 0 2px var(--gilt), 0 4px 10px rgba(0, 0, 0, .6);
}
.pm-who { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--vellum-dim); }
.pmodal.own2.theirs .pm-who { color: #f09aa3; }
.pm-name { margin: 3px 0 8px; font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1; color: var(--gilt-hi); text-shadow: 0 2px 0 #6e5118; }
.pm-text { font-size: 17px; color: var(--vellum); }
.pm-rule { margin-top: 6px; font-size: 13.5px; color: var(--vellum-dim); }
.pm-rule[hidden] { display: none; }
.pm-hint { margin-top: 8px; font-size: 13.5px; font-style: italic; color: var(--gilt); }
.pm-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@keyframes pmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pmIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .pmodal-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pm-btns { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .pmodal, .pmodal-box { animation: none; }
}

.cell.go { box-shadow: inset 0 0 0 1px rgba(241, 210, 127, .45); background: rgba(241, 210, 127, .08); animation: none; }
.cell.go:hover { background: rgba(241, 210, 127, .2); }
.move-arrow {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.move-arrow svg {
  width: 40%;
  height: 40%;
  transform: rotate(var(--a));
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)) drop-shadow(0 0 8px rgba(241, 210, 127, .7));
  animation: arrowNudge 1.1s ease-in-out infinite;
}
.cell.go:hover .move-arrow svg { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)) drop-shadow(0 0 14px rgba(255, 230, 150, 1)); }
@keyframes arrowNudge {
  0%, 100% { transform: rotate(var(--a)) translateY(18%); opacity: .55; }
  50% { transform: rotate(var(--a)) translateY(-18%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .move-arrow svg { animation: none; }
}

.pm-reopen {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid #8a7240;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 28, 30, .96), rgba(16, 12, 16, .98));
  box-shadow: 0 0 0 2px #120e14, 0 0 0 3px rgba(212, 169, 74, .4), 0 6px 16px rgba(0, 0, 0, .5);
  color: var(--gilt-hi);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}
.pm-reopen[hidden] { display: none; }
.pm-reopen small { font-family: var(--text); font-size: 12px; font-weight: 600; color: var(--vellum-dim); }
.pm-reopen:hover { box-shadow: 0 0 0 2px #120e14, 0 0 0 3px var(--gilt-hi), 0 0 18px rgba(241, 210, 127, .45); }

.cell.go-preview { background: rgba(241, 210, 127, .06); box-shadow: inset 0 0 0 1px rgba(241, 210, 127, .3); }
.move-arrow.preview svg { opacity: .8; }

.side-col {
  flex: 0 1 380px;
  align-self: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 46px;
  max-height: min(76vh, 740px);
}
.side-col .news { flex: 1 1 auto; align-self: stretch; min-height: 180px; max-height: 360px; }
.quests {
  position: relative;
  flex: 0 0 auto;
  padding: 22px 20px 16px;
  text-align: left;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(36, 28, 30, .82), rgba(18, 14, 18, .9));
  backdrop-filter: blur(3px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(212, 169, 74, .06);
}
.quests::before {
  content: '';
  position: absolute;
  inset: -8px;
  z-index: 3;
  pointer-events: none;
  background:
    url('images/deco/corner.png') left -7px top -7px / 30px 30px no-repeat,
    url('images/deco/corner.png') right -7px top -7px / 30px 30px no-repeat,
    url('images/deco/corner.png') left -7px bottom -7px / 30px 30px no-repeat,
    url('images/deco/corner.png') right -7px bottom -7px / 30px 30px no-repeat,
    url('images/deco/bar-h.png') left top / auto 16px repeat-x,
    url('images/deco/bar-h.png') left bottom / auto 16px repeat-x,
    url('images/deco/bar-v.png') left top / 16px auto repeat-y,
    url('images/deco/bar-v.png') right top / 16px auto repeat-y;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6));
}
.quests-head { margin-bottom: 12px; padding: 0 4px; }
.quests-head h2 { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--gilt-hi); white-space: nowrap; }
.quests-head small { display: block; margin-top: 4px; font-size: 13px; font-style: italic; color: var(--vellum-dim); }
@media (max-width: 1100px) {
  .side-col { flex: 0 0 auto; width: min(440px, 100%); max-height: none; }
}
.quests-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.quest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 5px;
  background: rgba(45, 40, 56, .55);
  border: 1px solid rgba(70, 63, 85, .8);
}
.quest.done:not(.claimed) { border-color: rgba(241, 210, 127, .7); box-shadow: 0 0 14px rgba(212, 169, 74, .25); }
.quest.claimed { opacity: .55; }
.quest-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; }
.quest-main b { grid-column: 1 / -1; font-size: 15px; font-weight: 600; color: var(--vellum); line-height: 1.2; }
.quest-track { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .55); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.quest-track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a87e2c, var(--gilt-hi)); transition: width .5s ease; }
.quest.done .quest-track i { background: linear-gradient(90deg, #4f9a5a, #9fe0a8); }
.quest-main small { font-size: 12px; color: var(--vellum-dim); font-variant-numeric: tabular-nums; }
.quest-gems { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #d9b8ff; white-space: nowrap; }
.quest-gems img { width: 18px; height: 18px; object-fit: contain; }
.quest-claim { padding: 7px 12px; font-size: 14px; white-space: nowrap; animation: questGlow 1.6s ease-in-out infinite; }
@keyframes questGlow { 50% { box-shadow: 0 0 16px rgba(241, 210, 127, .7); } }
.quest-got { font-size: 13px; font-weight: 700; color: #9fd9a6; white-space: nowrap; }
.quest-wait { font-style: italic; color: var(--vellum-dim); font-size: 14px; padding: 6px 2px; }
.quests-msg { margin-top: 8px; text-align: center; font-weight: 700; color: var(--gilt-hi); }


.camp-box { width: min(1100px, 100%); }
.camp-box .col-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 2px 56px 14px 8px;
  border-bottom: 1px solid var(--lead);
}
.camp-box .col-bar .net-status { margin: 0; flex: 1 1 100%; text-align: left; min-height: 1.2em; }
body.with-nav .camp-box .col-bar { padding-right: 8px; }
.camp-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 8px 24px;
  counter-reset: none;
}
.camp-ch { position: relative; }
.camp-ch:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 39px;
  bottom: -15px;
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, rgba(212, 169, 74, .6), rgba(212, 169, 74, .1));
}
.camp-open {
  width: 100%;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 20px 14px 10px;
  border-radius: 8px;
  border: 1px solid var(--lead-hi);
  background: linear-gradient(180deg, rgba(45, 40, 56, .75), rgba(24, 20, 30, .85));
  color: var(--vellum);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.camp-ch.open .camp-open:hover,
.camp-ch.open .camp-open:focus-visible { border-color: var(--gilt); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .45), 0 0 18px rgba(212, 169, 74, .2); }
.camp-ch.done .camp-open:hover { border-color: #6fc17a; }
.camp-ch.locked .camp-open { cursor: not-allowed; opacity: .5; filter: grayscale(.6); }
.camp-num {
  justify-self: center;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  color: #2b1d06;
  background: radial-gradient(circle at 40% 35%, var(--gilt-hi), var(--gilt) 55%, #8a6420);
  box-shadow: 0 0 0 2px #120e14, 0 0 0 3px rgba(212, 169, 74, .6), 0 4px 10px rgba(0, 0, 0, .6);
}
.camp-ch.done .camp-num { background: radial-gradient(circle at 40% 35%, #c8f0cd, #6fc17a 55%, #2f6a38); }
.camp-ch.locked .camp-num { background: radial-gradient(circle at 40% 35%, #8a8494, #4a4554 60%, #2a2633); color: #1a1622; }
.camp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.camp-main b { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.05; color: var(--gilt-hi); }
.camp-main small { font-size: 14px; font-style: italic; color: var(--vellum-dim); }
.camp-foe { font-size: 14px; color: var(--vellum); }
.camp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.camp-diff { padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; border: 1px solid currentColor; }
.camp-diff.d-facile { color: #9fd9a6; }
.camp-diff.d-normal { color: var(--gilt-hi); }
.camp-diff.d-difficile { color: #f19a8f; }
.camp-reward { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: #d9b8ff; font-size: 16px; }
.camp-reward img { width: 20px; height: 20px; object-fit: contain; }
.camp-state { font-size: 14px; font-weight: 700; color: var(--vellum-dim); }
.camp-ch.done .camp-state { color: #9fd9a6; }

.veil .box.camp-story { width: min(620px, 100%); gap: 12px; text-align: left; }
.cs-kicker { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--vellum-dim); }
.camp-story h2 { font-size: 40px; line-height: 1; color: var(--gilt-hi); }
.cs-where { font-style: italic; color: var(--vellum-dim); margin-top: -4px; }
.cs-text {
  max-height: 38vh;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid rgba(212, 169, 74, .25);
  background: rgba(10, 8, 12, .55);
  font-size: 16px;
  line-height: 1.55;
  color: var(--vellum);
}
.cs-text p + p { margin-top: 10px; }
.cs-foe { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: baseline; }
.cs-foe span { grid-row: span 2; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--vellum-dim); }
.cs-foe b { font-family: var(--display); font-size: 24px; color: #f19a8f; line-height: 1.1; }
.cs-foe small { color: var(--vellum-dim); }
.cs-reward { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; color: var(--vellum-dim); }
.cs-reward-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.cs-reward-line > b { display: inline-flex; align-items: center; gap: 4px; color: #d9b8ff; }
.cs-reward-line > b > img { width: 18px; height: 18px; object-fit: contain; }
.cs-pick { text-align: left; }

.camp-end { display: flex; flex-direction: column; gap: 8px; text-align: left; font-size: 15px; line-height: 1.5; color: var(--vellum); }
.camp-end-note { font-size: 13px; font-style: italic; color: var(--vellum-dim); }
.camp-end-gain { display: inline-flex; align-items: center; gap: 6px; align-self: center; font-size: 22px; font-weight: 800; color: #d9b8ff; }
.camp-end-gain img { width: 26px; height: 26px; object-fit: contain; }
.camp-story .cs-text,
.camp-story .cs-foe,
.camp-story .cs-reward,
.camp-story .cs-pick { align-self: stretch; }
.camp-back { padding: 6px 14px; font-size: 14px; }
.camp-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-content: start;
  gap: 22px;
  padding: 22px 8px 24px;
}
.camp-pick {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--lead-hi);
  background: linear-gradient(180deg, rgba(45, 40, 56, .8), rgba(20, 16, 26, .92));
  color: var(--vellum);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.camp-pick:hover,
.camp-pick:focus-visible { border-color: var(--gilt); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 20px rgba(212, 169, 74, .2); }
.camp-card.done .camp-pick { border-color: rgba(111, 193, 122, .6); }
.camp-pic {
  height: 150px;
  background: radial-gradient(ellipse at 50% 70%, #5a4020, #1a1410) center / cover;
  box-shadow: inset 0 -40px 40px -20px rgba(20, 16, 26, .95);
}
.camp-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 16px; }
.camp-card-body b { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1; color: var(--gilt-hi); }
.camp-card-body small { font-size: 14px; line-height: 1.4; color: var(--vellum-dim); }
.camp-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.camp-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .55); overflow: hidden; }
.camp-track i { display: block; height: 100%; background: linear-gradient(90deg, #a87e2c, var(--gilt-hi)); }
.camp-card.done .camp-track i { background: linear-gradient(90deg, #4f9a5a, #9fe0a8); }
.camp-card-foot em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--vellum-dim); white-space: nowrap; }
.camp-card.done .camp-card-foot em { color: #9fd9a6; }
.camp-diff.d-initiation { color: #8fe3f2; }
.camp-pic { position: relative; }
.camp-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #2b1d06;
  background: linear-gradient(180deg, var(--gilt-hi), var(--gilt));
  box-shadow: 0 3px 10px rgba(0, 0, 0, .55);
}
.camp-card.tuto .camp-pick { border-color: rgba(212, 169, 74, .55); }
.coach {
  position: fixed;
  left: 20px;
  bottom: 170px;
  z-index: 80;
  width: min(360px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 14px;
  border-radius: 8px;
  border: 1px solid #8a7240;
  background: linear-gradient(180deg, rgba(44, 36, 40, .97), rgba(20, 15, 20, .98));
  box-shadow: 0 0 0 3px #120e14, 0 0 0 4px rgba(212, 169, 74, .45), 0 18px 40px rgba(0, 0, 0, .7);
  color: var(--vellum);
}
.coach.in { animation: coachIn .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes coachIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.coach-step { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #8fe3f2; }
.coach h3 { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; color: var(--gilt-hi); }
.coach p { font-size: 15px; line-height: 1.5; }
.coach .btn { align-self: flex-end; padding: 7px 18px; }
.camp-card.locked .camp-pick { cursor: not-allowed; opacity: .5; filter: grayscale(.7); }
.camp-card.locked .camp-pick:hover { transform: none; box-shadow: none; border-color: var(--lead-hi); }
.camp-end-gain { gap: 18px; }
.camp-end-gain span { display: inline-flex; align-items: center; gap: 6px; }
#match-start.locked { filter: grayscale(.75) brightness(.8); }
.coach-objective {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid rgba(143, 227, 242, .45);
  background: rgba(20, 60, 70, .35);
}
.coach-objective b, .goal-but b, .cs-goal b { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #8fe3f2; }
.coach-objective span { font-weight: 700; color: var(--vellum); }
.coach-goal {
  position: fixed;
  left: 16px;
  top: 78px;
  z-index: 78;
  width: 232px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 10px;
  border-radius: 6px;
  border: 1px solid rgba(143, 227, 242, .45);
  background: linear-gradient(180deg, rgba(18, 30, 36, .96), rgba(12, 16, 22, .97));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .6);
  color: var(--vellum);
  font-size: 14px;
  line-height: 1.4;
}
.goal-but { display: flex; flex-direction: column; gap: 2px; }
.goal-obj {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: start;
  gap: 4px 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(143, 227, 242, .2);
  font-weight: 700;
}
.goal-check { width: 16px; height: 16px; margin-top: 2px; border-radius: 3px; border: 2px solid #8fe3f2; }
.goal-obj.ok .goal-check { background: #6fc17a; border-color: #6fc17a; box-shadow: 0 0 10px rgba(111, 193, 122, .8); }
.goal-obj.ok .goal-check::after { content: '✓'; display: block; margin: -3px 0 0 1px; font-size: 13px; color: #10200f; font-style: normal; }
.goal-obj.ok #goal-text, .goal-fin.ok #goal-fin-text { color: #9fd9a6; }
.goal-obj em { font-style: normal; font-size: 12px; color: #8fe3f2; }
.goal-skip {
  grid-column: 2 / -1;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--vellum-dim);
  text-decoration: underline;
  cursor: pointer;
}
.goal-obj.ok .goal-skip { visibility: hidden; }
.cs-goal { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 6px; border: 1px solid rgba(143, 227, 242, .4); background: rgba(20, 60, 70, .3); font-weight: 700; color: var(--vellum); align-self: stretch; }
.coach-goal.nudge, .coach.nudge { animation: tutoNudge .45s ease-out; }
@keyframes tutoNudge {
  0%, 100% { translate: 0 0; }
  20% { translate: -6px 0; box-shadow: 0 0 0 2px #8fe3f2, 0 0 24px rgba(143, 227, 242, .8); }
  40% { translate: 5px 0; }
  60% { translate: -3px 0; }
  80% { translate: 2px 0; }
}


.duel { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; cursor: pointer; transition: opacity .3s; }
.duel.out { opacity: 0; }
.duel-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(70, 18, 20, .55), rgba(6, 5, 10, .9) 70%); opacity: 0; transition: opacity .25s; }
.duel.in .duel-veil { opacity: 1; }
.duel-stage { position: relative; display: flex; align-items: center; gap: clamp(36px, 8vw, 130px); padding: 0 16px; }
.duel-side { position: relative; width: clamp(130px, 19vw, 250px); display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), opacity .3s; }
.duel-side.left { transform: translateX(-55vw) rotate(-10deg); }
.duel-side.right { transform: translateX(55vw) rotate(10deg); }
.duel.in .duel-side { opacity: 1; transform: none; }
.duel-card { position: relative; width: 100%; border-radius: 9px; }
.duel-side.mine .duel-card .kc { box-shadow: 0 0 0 1px #fffbea, 0 0 8px 2px #ffe08f, 0 0 22px 5px rgba(255, 205, 90, .65), 0 0 50px 12px rgba(255, 180, 50, .3), 0 24px 50px rgba(0, 0, 0, .7); }
.duel-side.theirs .duel-card .kc { box-shadow: 0 24px 50px rgba(0, 0, 0, .95), 0 8px 18px rgba(0, 0, 0, .85); }
.duel-role { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--vellum-dim); }
.duel-side.mine .duel-role { color: var(--gilt-hi); }
.duel-side.theirs .duel-role { color: var(--vellum-dim); }
.duel-name { font-family: var(--display); font-size: clamp(18px, 2vw, 26px); color: var(--vellum); text-align: center; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.duel-cover { font-size: 13px; color: var(--gilt-hi); }
.duel-vs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); font-family: var(--display); font-style: normal; font-size: clamp(40px, 5vw, 68px); color: var(--gilt-hi); text-shadow: 0 0 18px rgba(241, 210, 127, .7), 0 4px 10px rgba(0, 0, 0, .9); transition: transform .4s .3s cubic-bezier(.3, 1.6, .5, 1), opacity .15s; pointer-events: none; }
.duel.in .duel-vs { transform: translate(-50%, -50%) scale(1); }
.duel.clash .duel-vs { opacity: 0; }
.duel-spark { position: absolute; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: radial-gradient(circle, #fff 0, #ffe7a8 30%, rgba(255, 140, 60, .6) 55%, transparent 72%); opacity: 0; pointer-events: none; }
.duel.clash .duel-spark { animation: duel-spark .55s .2s ease-out; }
.duel.clash .duel-side.left { animation: duel-left .55s ease-in-out; }
.duel.clash .duel-side.right { animation: duel-right .55s ease-in-out; }
.duel.clash .duel-stage { animation: duel-shake .35s .22s ease-out; }
.duel-dmg { position: absolute; left: 50%; top: 10%; z-index: 5; font-size: clamp(44px, 5.5vw, 76px); font-weight: 800; font-family: Arial, Helvetica, sans-serif; color: #ff6b5e; text-shadow: 0 0 14px rgba(255, 60, 40, .7), 0 4px 0 #3a0c0c, 0 6px 14px rgba(0, 0, 0, .9); opacity: 0; transform: translate(-50%, 0) scale(.3); pointer-events: none; }
.duel-side.hit .duel-dmg { animation: duel-dmg 1.7s ease-out forwards; }
.duel-side.hit .duel-card .kc { animation: duel-hurt .45s ease-out; }
.duel-ko { position: absolute; left: 50%; top: 50%; z-index: 6; width: 58%; transform: translate(-50%, -50%) scale(2.4); opacity: 0; filter: drop-shadow(0 0 14px rgba(255, 60, 40, .8)) drop-shadow(0 6px 10px rgba(0, 0, 0, .9)); pointer-events: none; }
.duel-ko svg { display: block; width: 100%; height: auto; }
.duel-side.dead .duel-ko { animation: duel-ko .35s ease-in forwards; }
.duel-side.dead .duel-card .kc { animation: duel-fall .8s ease-in forwards; }
@keyframes duel-left { 0% { transform: none; } 40% { transform: translateX(-22px) rotate(-3deg); } 62% { transform: translateX(clamp(30px, 5vw, 75px)) rotate(4deg); } 100% { transform: none; } }
@keyframes duel-right { 0% { transform: none; } 40% { transform: translateX(22px) rotate(3deg); } 62% { transform: translateX(calc(-1 * clamp(30px, 5vw, 75px))) rotate(-4deg); } 100% { transform: none; } }
@keyframes duel-spark { 0% { opacity: 1; transform: scale(.2); } 60% { opacity: 1; transform: scale(5); } 100% { opacity: 0; transform: scale(7); } }
@keyframes duel-shake { 0%, 100% { translate: 0 0; } 25% { translate: -8px 5px; } 50% { translate: 7px -4px; } 75% { translate: -3px 2px; } }
@keyframes duel-dmg { 0% { opacity: 0; transform: translate(-50%, 0) scale(.3); } 14% { opacity: 1; transform: translate(-50%, -10px) scale(1.3); } 26% { transform: translate(-50%, -14px) scale(1); } 80% { opacity: 1; transform: translate(-50%, -40px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(.9); } }
@keyframes duel-hurt { 0% { filter: none; } 20% { filter: brightness(2.2) sepia(1) saturate(6) hue-rotate(-30deg); } 100% { filter: none; } }
@keyframes duel-fall { to { filter: grayscale(1) brightness(.45); transform: translateY(26px) rotate(9deg) scale(.94); } }
@keyframes duel-ko { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(.9); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.prompt-wait { display: flex; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.prompt-wait[hidden] { display: none; }
.prompt-wait i { width: 10px; height: 10px; border-radius: 50%; background: var(--gilt-hi); animation: prompt-wait 1.1s ease-in-out infinite; }
.prompt-wait i:nth-child(2) { animation-delay: .18s; }
.prompt-wait i:nth-child(3) { animation-delay: .36s; }
@keyframes prompt-wait { 0%, 80%, 100% { opacity: .25; transform: scale(.7); } 40% { opacity: 1; transform: scale(1); } }

.players-box { width: min(1180px, 100%); }
.pl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; }
.pl-tools input { flex: 1 1 220px; max-width: 340px; padding: 8px 12px; border: 1px solid var(--lead-hi); border-radius: 6px; background: var(--nave-deep); color: var(--vellum); font: inherit; }
.pl-scroll { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--lead); border-radius: 8px; }
.pl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pl-table th { position: sticky; top: 0; z-index: 1; background: var(--lead); text-align: left; white-space: nowrap; }
.pl-table th button { width: 100%; padding: 9px 12px; border: 0; background: none; color: var(--vellum-dim); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.pl-table th button.on, .pl-table th button:hover { color: var(--gilt-hi); }
.pl-table td { padding: 8px 12px; border-top: 1px solid rgba(70, 63, 85, .55); white-space: nowrap; color: var(--vellum); }
.pl-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .025); }
.pl-table tbody tr:hover td { background: rgba(212, 169, 74, .08); }
.pl-name { font-weight: 700; }
.pl-tag { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(143, 227, 242, .14); color: var(--stone); font-size: 11px; font-weight: 400; }
.pl-win { color: #9fd9a6; }
.pl-loss { color: #ee8f98; }
.pl-empty { text-align: center; color: var(--vellum-dim); padding: 24px; }

.coach.with-card { width: min(560px, calc(100vw - 40px)); }
.coach-card { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 34px; align-items: center; margin: 4px 0 2px; }
.coach-card[hidden] { display: none; }
.cc-card { position: relative; z-index: 1; width: 180px; animation: ccCard .45s cubic-bezier(.2, 1.3, .4, 1); }
.cc-card .kc { box-shadow: 0 0 0 2px var(--gilt), 0 12px 26px rgba(0, 0, 0, .7); }
.cc-notes { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; gap: 10px; padding: 8px 0; margin: 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.35; }
.cc-notes li { padding: 5px 8px; border-left: 2px solid var(--gilt); border-radius: 0 4px 4px 0; background: rgba(212, 169, 74, .08); }
.cc-notes b { color: var(--gilt-hi); }
.cc-arrows { position: absolute; left: 0; top: 0; z-index: 2; overflow: visible; pointer-events: none; }
.cc-arrows marker path { fill: var(--gilt-hi); }
.cc-line { fill: none; stroke: var(--gilt-hi); stroke-width: 3; stroke-dasharray: 400; stroke-dashoffset: 400; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .9)); animation: ccLine .5s ease-out forwards; }
.cc-arrows circle { fill: none; stroke: var(--gilt-hi); stroke-width: 3; opacity: 0; filter: drop-shadow(0 0 4px rgba(241, 210, 127, .8)); animation: ccRing .4s ease-out forwards; }
@keyframes ccLine { to { stroke-dashoffset: 0; } }
@keyframes ccRing { from { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(1.8); } to { opacity: 1; transform-box: fill-box; transform-origin: center; transform: scale(1); } }
@keyframes ccCard { from { opacity: 0; transform: translateY(10px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .coach-card { grid-template-columns: 110px 1fr; gap: 18px; } .cc-card { width: 110px; } }

.sound-veil { z-index: 96; }
.veil .box.sound-box { width: min(340px, 100%); gap: 12px; text-align: left; }
.sound-box h2 { text-align: center; }
.sound-box .btn { align-self: center; }

.enlist { position: fixed; z-index: 30; pointer-events: none; perspective: 900px; }
.enlist-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.enlist-face, .enlist-back { position: absolute; inset: 0; backface-visibility: hidden; }
.enlist-face .unit { margin: 0; height: 100%; }
.enlist-back { transform: rotateY(180deg); border-radius: 7px; border: 1px solid var(--gilt); background: url('cartes/dos.jpg') center / cover; box-shadow: 0 0 18px rgba(212, 169, 74, .55), 0 10px 20px rgba(0, 0, 0, .6); }
.piles span.pile-bump { animation: pileBump .5s ease-out; }
@keyframes pileBump { 0% { transform: scale(1); } 35% { transform: scale(1.35); color: var(--gilt-hi); } 100% { transform: scale(1); } }

.pile-grave-btn { display: flex; align-items: center; gap: 6px; padding: 2px 6px; margin: -2px -6px; border: 1px solid transparent; border-radius: 4px; background: none; color: inherit; font: inherit; cursor: pointer; }
.pile-grave-btn:hover { border-color: var(--gilt); color: var(--gilt-hi); }
.grave-veil { z-index: 90; }
.veil .box.grave-box { width: min(880px, 100%); max-height: calc(100vh - 32px); gap: 10px; }
.grave-count { margin: -4px 0 0; font-size: 14px; }
.grave-list { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; overflow-y: auto; padding: 4px 4px 8px; }
.grave-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.grave-card .kc { filter: grayscale(.35) brightness(.9); }
.grave-card figcaption { font-size: 13px; color: var(--vellum); text-align: center; line-height: 1.2; }
.grave-empty { grid-column: 1 / -1; padding: 24px 0; }
.shuffle { position: fixed; z-index: 31; width: 34px; height: 47px; pointer-events: none; transition: opacity .3s; animation: shuffleIn .2s ease-out; }
.shuffle.out { opacity: 0; }
.shuffle i { position: absolute; inset: 0; border-radius: 3px; border: 1px solid var(--gilt); background: url('cartes/dos.jpg') center / cover; box-shadow: 0 3px 8px rgba(0, 0, 0, .6); }
.shuffle b { position: absolute; left: 50%; top: 100%; margin-top: 6px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--gilt-hi); text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
@keyframes shuffleIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.shuffle.up b { top: auto; bottom: 100%; margin: 0 0 6px; }

.mode-btn.locked { filter: grayscale(.6) brightness(.8); }
#end.with-booster .box { width: min(600px, 100%); }
.booster { display: flex; justify-content: center; gap: 10px; margin: 4px 0 6px; perspective: 1000px; }
.bst-title { margin-top: 6px; }
.bst-card { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0; animation: bstDeal .45s cubic-bezier(.2, 1.2, .4, 1) forwards; animation-delay: calc(var(--k) * 120ms); }
.bst-in { position: relative; width: 100%; aspect-ratio: 1443 / 2023; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.bst-card.open .bst-in { transform: rotateY(180deg); }
.bst-back, .bst-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 7px; }
.bst-back { border: 1px solid var(--gilt); background: url('cartes/dos.jpg') center / cover; box-shadow: 0 8px 18px rgba(0, 0, 0, .6); }
.bst-face { transform: rotateY(180deg); }
.bst-card.open .bst-face .kc { animation: bstGlow 1s ease-out; }
.bst-name { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--vellum); opacity: 0; transition: opacity .3s .35s; }
.bst-card.open .bst-name { opacity: 1; }
@keyframes bstDeal { from { opacity: 0; transform: translateY(-40px) rotate(-8deg) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes bstGlow { 0% { box-shadow: 0 0 0 2px var(--gilt-hi), 0 0 34px rgba(241, 210, 127, .9); } 100% { box-shadow: 0 10px 20px rgba(0, 0, 0, .55); } }
@media (max-width: 560px) { .booster { flex-wrap: wrap; } .bst-card { width: 74px; } }

.pl-tools #pl-reset { margin-left: auto; }
.pl-reset { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 14px 16px; border: 1px solid #7a2c35; border-radius: 8px; background: rgba(74, 29, 36, .35); color: var(--vellum); font-size: 14px; }
.pl-reset[hidden] { display: none; }
.pl-reset label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pl-reset input { padding: 7px 10px; border: 1px solid var(--lead-hi); border-radius: 6px; background: var(--nave-deep); color: var(--vellum); font: inherit; letter-spacing: 1px; }
.pl-reset-btns { display: flex; gap: 10px; }

.camp-gift { display: flex; gap: 3px; margin-top: 4px; }
.camp-ch.locked .camp-gift { opacity: .45; filter: grayscale(.5); }
.cs-gift-n { color: var(--gilt-hi) !important; }
.cs-gift { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cs-gift-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 74px; }
.cs-gift-card .rw-qty { top: -7px; right: auto; left: -9px; min-width: 24px; height: 20px; font-size: 12px; }
.gift-card i { position: absolute; top: -5px; left: -6px; padding: 0 4px; border-radius: 7px; background: linear-gradient(180deg, var(--gilt-hi), #a87e2c); color: #2b1d06; font-size: 10px; font-style: normal; font-weight: 800; line-height: 14px; }
.cs-gift-card small { font-size: 11px; line-height: 1.15; text-align: center; color: var(--vellum); }

.camp-ch:hover { z-index: 5; }
.gift-card { position: relative; display: block; width: 30px; height: 42px; }
.gift-card .gift-scale { position: absolute; top: 0; right: 0; width: 140px; transform: scale(.2143); transform-origin: top right; transition: transform .18s ease-out; }
.gift-card:hover { z-index: 6; }
.gift-card:hover .gift-scale { transform: scale(1.25); transform-origin: top right; }
.gift-card:hover i { opacity: 0; }
.gift-card .kc { border-radius: 7px; box-shadow: 0 6px 14px rgba(0, 0, 0, .6); }
.gift-card:hover .kc { box-shadow: 0 22px 48px rgba(0, 0, 0, .9), 0 6px 16px rgba(0, 0, 0, .7); }
.gift-card i { z-index: 1; }
.gift-box { position: relative; display: block; width: 74px; height: 104px; }
.gift-box .gift-scale { position: absolute; left: 50%; bottom: 0; width: 160px; transform: translateX(-50%) scale(.4625); transform-origin: bottom center; transition: transform .18s ease-out; }
.cs-gift-card:hover { z-index: 6; }
.cs-gift-card:hover .gift-box .gift-scale { transform: translateX(-50%) scale(1.15); }
.cs-gift-card:hover .kc { box-shadow: 0 22px 48px rgba(0, 0, 0, .9), 0 6px 16px rgba(0, 0, 0, .7); }
.cs-gift-card .rw-qty { z-index: 2; }
.cs-gift-card:hover .rw-qty { opacity: 0; }
.bst-card { position: relative; }
.bst-card.open:hover { z-index: 6; }
.bst-card.open .bst-in { transform-origin: bottom center; }
.bst-card.open:hover .bst-in { transform: rotateY(180deg) scale(1.7); }

.rw-flip { perspective: 1000px; }
.rw-flip .bst-in { transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); }
.rw-flip.open .bst-in { transform: rotateY(180deg); }
.rw-flip .bst-face .kc { box-shadow: 0 10px 20px rgba(0, 0, 0, .55); }
.rw-flip.rU .bst-face .kc { box-shadow: 0 0 0 2px #6fc17a, 0 0 14px rgba(111, 193, 122, .5); }
.rw-flip.rR .bst-face .kc { box-shadow: 0 0 0 2px #b88cf0, 0 0 22px rgba(168, 115, 230, .7); }
.rw-flip.open .bst-face .kc { animation: bstGlow 1s ease-out; }
.rw-flip.rR.open .bst-face .kc { animation: rareFlash 1.2s ease-out; }
.rw-flip .holo-tag { opacity: 0; transition: opacity .3s .4s; }
.rw-flip.open .holo-tag { opacity: 1; }
.rw-flip.open:hover { z-index: 6; }
.rw-flip.open .bst-in { transform-origin: center; }
.rw-flip.open:hover .bst-in { transform: rotateY(180deg) scale(1.6); }
@keyframes rareFlash { 0% { box-shadow: 0 0 0 3px #e9d4ff, 0 0 60px 20px rgba(190, 140, 255, 1); } 100% { box-shadow: 0 0 0 2px #b88cf0, 0 0 22px rgba(168, 115, 230, .7); } }

.camp-news { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding: 16px 20px; text-align: left; border: 1px solid rgba(241, 210, 127, .55); border-radius: 8px; background: linear-gradient(180deg, rgba(70, 54, 26, .55), rgba(30, 24, 16, .75)); box-shadow: inset 0 0 24px rgba(241, 210, 127, .08), 0 0 18px rgba(241, 210, 127, .12); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.camp-news.on { opacity: 1; transform: none; }
.camp-news p { margin: 0; font-size: 16px; font-weight: 400; line-height: 1.55; color: var(--gilt-hi); }
.camp-news .rest { color: transparent; }
.camp-news p.on:not(.done) .typed::after { content: '▍'; margin-left: 1px; color: #fff1c2; animation: newsCaret .7s steps(1) infinite; }
@keyframes newsCaret { 50% { opacity: 0; } }

.gx-top { display: flex; align-items: center; gap: 14px; padding: 6px 8px 14px; border-bottom: 1px solid var(--lead); }
.gx-count { padding: 3px 10px; border: 1px solid var(--lead-hi); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--vellum); }
.gx-top .btn.main { margin-left: auto; }
.gx-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; padding: 18px 8px; align-content: start; }
.gx-deck { position: relative; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, #2a2434, #17131d); box-shadow: 0 10px 24px rgba(0, 0, 0, .6); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.gx-deck:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px #fff4cf, 0 0 14px 3px rgba(255, 200, 80, .45), 0 14px 30px rgba(0, 0, 0, .7); }
.gx-art { height: 190px; background-size: cover; background-position: center 18%; position: relative; }
.gx-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(23, 19, 29, .95)); }
.gx-church { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 2px 9px; border-radius: 10px; background: rgba(10, 8, 14, .75); font-size: 11.5px; font-weight: 700; color: var(--gilt-hi); }
.gx-info { padding: 0 14px 14px; margin-top: -34px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.gx-info b { font-family: var(--display); font-size: 22px; line-height: 1.05; color: var(--gilt-hi); }
.gx-info small { color: var(--vellum-dim); font-style: italic; }
.gx-state { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.gx-state.ok { color: #9fd9a6; }
.gx-state.bad { color: #f0b46a; }
.gx-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.gx-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d9a23c, #fff1c2); }
.gx-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 4px; opacity: 1; }
.gx-tools button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--lead-hi); background: rgba(14, 11, 18, .85); color: var(--vellum); font-size: 13px; cursor: pointer; }
.gx-new { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 282px; border: 2px dashed rgba(241, 210, 127, .35); border-radius: 10px; color: var(--gilt-hi); font-family: var(--display); font-size: 22px; background: rgba(241, 210, 127, .03); }
.gx-new span { font-size: 54px; line-height: 1; }
.gx-new small { font-family: var(--text); font-size: 13px; color: var(--vellum-dim); }
.gx-modal { width: min(760px, 100%) !important; text-align: left !important; align-items: stretch !important; }
.gx-modal h2 { text-align: center; }
.gx-step { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #8fe3f2; }
.gx-elues { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.gx-elue { width: 150px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--lead-hi); background: rgba(14, 12, 20, .5); cursor: pointer; }
.gx-elue.on { border-color: transparent; box-shadow: 0 0 0 1px #fff4cf, 0 0 14px 3px rgba(255, 200, 80, .5); }
.gx-elue b { color: var(--gilt-hi); font-family: var(--display); font-size: 20px; }
.gx-elue small { color: var(--vellum-dim); font-size: 12px; text-align: center; }
.gx-elue.locked .kc { filter: grayscale(1) brightness(.45); }
.gx-elue.locked { cursor: default; }
.gx-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: #d9b8ff; }
.gx-lock img { width: 16px; height: 16px; }
.gx-name { display: flex; flex-direction: column; gap: 6px; }
.gx-name input { padding: 10px 12px; border: 1px solid var(--lead-hi); border-radius: 6px; background: var(--nave-deep); color: var(--vellum); font: inherit; font-size: 16px; }
.gx-btns { display: flex; gap: 10px; justify-content: center; }
.gx-edit-head { display: flex; align-items: center; gap: 14px; }
.gx-edit-elue { width: 64px; flex: none; }
.gx-edit-head h2 { margin: 0; }
.gx-edit-head small { display: block; color: var(--vellum-dim); font-style: italic; }
.elue-shop { grid-column: 1 / -1; display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; padding: 18px 20px; border-radius: 10px; background: linear-gradient(135deg, rgba(94, 56, 136, .35), rgba(20, 15, 28, .9)); box-shadow: 0 0 0 1px rgba(184, 140, 240, .45), 0 12px 30px rgba(0, 0, 0, .55); }
.elue-shop h3 { margin: 0 0 4px; font-family: var(--display); font-size: 30px; color: #e9d4ff; }
.elue-shop p { margin: 0 0 10px; color: var(--vellum); }
.elue-shop .pack-church { color: #d9b8ff; }
#collection.gx-mode .deck-body { grid-template-columns: minmax(0, 1fr); }
#collection.gx-mode .deck-detail { display: none; }
#collection.gx-mode .deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; align-content: start; padding: 6px 4px 14px; }
.gx-top { border-bottom: 0; padding: 0 0 6px; }
.gx-tools button:hover { border-color: var(--gilt); color: var(--gilt-hi); }
.gx-new { cursor: pointer; font-family: var(--display); }
.gx-new:hover { border-color: rgba(241, 210, 127, .7); background: rgba(241, 210, 127, .07); }
.gx-empty { grid-column: 1 / -1; margin: 0; color: var(--vellum-dim); font-style: italic; }
.veil .box.gx-modal { width: min(760px, 100%); text-align: left; align-items: stretch; gap: 12px; }
.gx-modal h2 { text-align: center; }
.gx-pick { display: flex; flex-direction: column; gap: 10px; }
.gx-pick[hidden], .gx-name[hidden], .gx-del[hidden] { display: none; }
.gx-elue { font: inherit; color: inherit; }
.gx-elue .kc { width: 128px; }
.gx-msg { min-height: 1.2em; margin: 0; color: #f19a8f; text-align: center; }
.gx-del { margin: 0; text-align: center; color: var(--vellum); }
.gx-edit-head { margin-bottom: 4px; }
.gx-edit-head h2 { display: flex; align-items: center; gap: 8px; }
.gx-rename { border: 1px solid var(--lead-hi); border-radius: 6px; background: transparent; color: var(--vellum-dim); cursor: pointer; font-size: 14px; padding: 2px 7px; }
.gx-rename:hover { color: var(--gilt-hi); border-color: var(--gilt); }
.gx-back { white-space: nowrap; }

.elue-shop .kc { width: 150px; }
.elue-shop.owned { opacity: .75; box-shadow: 0 0 0 1px var(--lead-hi), 0 10px 24px rgba(0, 0, 0, .5); background: linear-gradient(135deg, rgba(45, 40, 56, .7), rgba(20, 15, 28, .9)); }
.elue-owned { font-weight: 800; color: #9fd9a6; }

.col-edit:empty { display: none; }
#collection.gx-editing .col-title, #collection.gx-editing .col-rates, #collection.gx-editing .col-switch { display: none; }
.col-edit { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0; }
.gx-edit-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gx-edit-title h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--gilt-hi); }
.gx-edit-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.gx-edit-sub small { color: var(--vellum-dim); font-style: italic; font-size: 14px; }
.gx-count-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px 3px 4px; border-radius: 16px; font-size: 13.5px; color: var(--vellum); background: rgba(14, 12, 20, .6); box-shadow: inset 0 0 0 1px var(--lead-hi); }
.gx-count-badge b { font-weight: 800; }
.gx-ring { --c: #e0a83a; position: relative; width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(var(--c) var(--p), rgba(255, 255, 255, .1) 0); font-style: normal; display: grid; place-items: center; }
.gx-ring::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #1d1826; }
.gx-ring b { position: relative; font-size: 12px; color: var(--c); }
.gx-count-badge.ok { box-shadow: inset 0 0 0 1px rgba(111, 193, 122, .6); }
.gx-count-badge.ok .gx-ring { --c: #6fc17a; }
.gx-count-badge.ok span b { color: #9fd9a6; }
.gx-count-badge.bad { box-shadow: inset 0 0 0 1px rgba(232, 86, 74, .6); }
.gx-count-badge.bad .gx-ring { --c: #e8564a; }
.gx-count-badge.wip span b { color: var(--gilt-hi); }

.gx-n { font-style: normal; font-weight: 800; }
.gx-n.ok { color: #9fd9a6; }
.gx-n.wip { color: var(--gilt-hi); }
.gx-n.bad { color: #f19a8f; }

#collection.gx-editing .col-bar { align-items: center; }
#collection.gx-editing .col-bar .net-status:empty { display: none; }
#collection.gx-editing .deck-head:empty { display: none; }
.col-edit .col-quota { margin: 0 0 0 auto; justify-content: flex-end; }
.col-sep-first { margin-top: 0; padding-top: 0; border-top: 0; }
#collection .deck-grid .col-sep.col-sep-first { margin-top: 0; padding-top: 0; border-top: 0; }

.col-list { display: none; }
#collection.gx-editing .deck-body { grid-template-columns: 250px minmax(0, 1fr) 290px; }
#collection.gx-editing .col-list { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 8px 8px 16px 2px; border-right: 1px solid var(--lead); scrollbar-width: thin; scrollbar-color: var(--lead-hi) transparent; }
.col-list h3 { margin: 0 0 10px; font-family: var(--display); font-size: 22px; color: var(--gilt-hi); display: flex; align-items: baseline; justify-content: space-between; }
.col-list h3 small { font-family: var(--text); font-size: 13px; color: var(--vellum-dim); }
.gl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gl-row { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 6px; border-radius: 5px; overflow: hidden; cursor: pointer; background: #1c1824; box-shadow: inset 0 0 0 1px rgba(70, 63, 85, .7); font-size: 13.5px; color: var(--vellum); }
.gl-row::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 62%; background-image: var(--art); background-size: cover; background-position: center 30%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); opacity: .55; }
.gl-row > * { position: relative; }
.gl-row:hover { box-shadow: inset 0 0 0 1px var(--gilt); }
.gl-row.on { box-shadow: inset 0 0 0 1px #fff4cf, 0 0 10px rgba(255, 200, 80, .35); }
.gl-gem { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #b9b9c2; box-shadow: 0 0 6px rgba(255, 255, 255, .25); }
.gl-row.r-U .gl-gem { background: #6fc17a; }
.gl-row.r-R .gl-gem { background: #a873e6; }
.gl-elue .gl-gem { background: var(--gilt-hi); }
.gl-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.gl-n { min-width: 22px; padding: 1px 6px; border-radius: 10px; background: rgba(10, 8, 14, .8); color: var(--gilt-hi); font-size: 12.5px; text-align: center; }
.gl-elue { background: linear-gradient(90deg, #3a2f22, #1c1824); }
.gl-empty { padding: 10px 4px; color: var(--vellum-dim); font-style: italic; font-size: 13px; }
#collection.gx-editing .col-list { padding: 8px 18px 16px 22px; }
#collection.gx-editing .col-list { padding: 8px 24px 16px 22px; }
#collection.gx-editing .deck-list { padding-left: 22px; }
#collection.gx-editing .deck-detail { padding: 8px 24px 16px 22px; }

#collection.gx-editing .deck-card[draggable="true"] { cursor: grab; }
#collection .col-list.drop-ready { box-shadow: inset 0 0 0 2px rgba(241, 210, 127, .35); border-radius: 8px; }
#collection .col-list.drop-over { box-shadow: inset 0 0 0 2px #fff4cf, inset 0 0 30px rgba(255, 200, 80, .25); background: rgba(241, 210, 127, .05); }

.alert-veil { z-index: 140; background: rgba(8, 7, 11, .7); }
.veil .box.alert-box { width: min(420px, 100%); gap: 10px; }
.alert-box h2 { font-size: 30px; }
.alert-box p { margin: 0 0 6px; font-size: 16px; line-height: 1.5; color: var(--vellum); }
.alert-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-family: var(--display); font-size: 28px; font-weight: 900; color: #2b1d06; background: radial-gradient(circle at 40% 35%, var(--gilt-hi), var(--gilt) 60%, #8a6420); box-shadow: 0 0 0 2px #120e14, 0 0 0 3px rgba(212, 169, 74, .6), 0 0 18px rgba(241, 210, 127, .35); }

.kc-frame { z-index: 2; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.kc-med-elue > img:first-child { inset: auto; left: 2cqw; top: 2cqw; width: 29cqw; height: 29cqw; }
.kc-med-elue b { top: calc(22% - 1cqw); bottom: calc(10% + 1cqw); }
.kc-bar.kc-bar-loi { top: 60.9%; height: 10.84%; z-index: 4; }
.kc-bar.kc-bar-loi.rU { height: 16.16%; }
.kc-bar.kc-bar-loi.rR { top: 55.51%; height: 21.55%; }
.kc-gem.kc-gem-loi { z-index: 5; }
