:root {
  color-scheme: dark;
  --bg: #090b18;
  --bg2: #10142a;
  --panel: #151b33;
  --panel2: #212945;
  --line: rgba(255, 255, 255, .13);
  --line2: rgba(255, 255, 255, .3);
  --ink: #fff9e6;
  --muted: #b4bcd6;
  --dim: #8a93b4;
  --yellow: #ffe25d;
  --pink: #ff4d79;
  --cyan: #56d8e8;
  --lime: #9aff55;
  --red: #ff5263;
  --sat: var(--discord-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sar: var(--discord-safe-area-inset-right, env(safe-area-inset-right, 0px));
  --sab: var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sal: var(--discord-safe-area-inset-left, env(safe-area-inset-left, 0px));
  --head: Impact, Haettenschweiler, "Arial Narrow Bold", "Roboto Condensed", sans-serif-condensed, "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
}

html.discord-mobile[data-orient="portrait"] {
  --sat: max(var(--discord-safe-area-inset-top, 0px), env(safe-area-inset-top, 0px), 40px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: clamp(14px, calc(8.6px + 1.12vmin), 20px);
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.big-text {
  font-size: clamp(16.5px, calc(10.5px + 1.3vmin), 23.5px);
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.35;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

button:disabled {
  cursor: default;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.screen:focus, .modal-box:focus, .splash:focus {
  outline: none;
}

.selectable, textarea, input {
  user-select: text;
  -webkit-user-select: text;
}

img {
  max-width: 100%;
  -webkit-user-drag: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--head);
  font-weight: 900;
  font-style: italic;
  letter-spacing: .015em;
  line-height: 1.05;
}

h1 em, h2 em {
  color: var(--yellow);
  font-style: inherit;
}

p {
  margin: .35em 0;
}

#app {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow: clip;
}

#boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font: italic 900 28px/1.2 var(--head);
  color: var(--yellow);
}

html.discord-pip #app::after {
  content: 'ZOO FIGHTERS\A WILD CARDS';
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  background: radial-gradient(circle at 50% 40%, #2a1a55, #090b18 70%);
  color: var(--yellow);
  font: italic 900 min(11vw, 20vh)/1.15 var(--head);
  text-align: center;
  white-space: pre;
}

.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#layer-screens {
  z-index: 1;
  pointer-events: auto;
}

#layer-banners { z-index: 20; }
#layer-cut { z-index: 30; }
#layer-modals { z-index: 40; }
#layer-popovers { z-index: 50; }
#layer-toasts { z-index: 60; }

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

.screen.enter {
  animation: screen-in .26s ease-out;
}

@keyframes screen-in {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  display: block;
  margin: 0 0 .15rem;
  color: var(--cyan);
  font: 800 .68rem/1.3 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.backdrop-image {
  position: absolute;
  inset: -3%;
  background-size: cover;
  background-position: center 60%;
  image-rendering: pixelated;
  animation: drift 26s ease-in-out infinite alternate;
}

.backdrop-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 11, 24, .55), rgba(9, 11, 24, .35) 40%, rgba(9, 11, 24, .88));
}

.backdrop-dim .backdrop-shade {
  background: linear-gradient(180deg, rgba(9, 11, 24, .9), rgba(9, 11, 24, .8) 50%, rgba(9, 11, 24, .93));
}

@keyframes drift {
  from { transform: translate3d(-1%, 0, 0) scale(1.02); }
  to { transform: translate3d(1%, -.6%, 0) scale(1.05); }
}

.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -.2em;
  line-height: 1;
}

.ico svg {
  width: 100%;
  height: 100%;
}

.ico-text {
  font-style: normal;
  font-family: var(--body);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: .45em;
  min-height: 44px;
  padding: .45em 1.05em;
  border: 2px solid #06070f;
  border-radius: .5rem;
  background: linear-gradient(180deg, #2c3558, #1d2441);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-family: var(--head);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.05;
  text-transform: uppercase;
  text-align: center;
  transition: transform .09s, box-shadow .09s, filter .12s;
}

.btn:not(:disabled):hover {
  transform: translate(-1px, -1px);
  filter: brightness(1.1);
}

.btn:not(:disabled):active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.btn:disabled {
  opacity: .45;
}

.btn .ico {
  font-size: 1.15em;
}

.btn-sub {
  display: block;
  width: 100%;
  margin-top: .15em;
  font: 700 .6rem/1.2 var(--mono);
  font-style: normal;
  letter-spacing: .04em;
  text-transform: none;
  opacity: .82;
}

.btn-primary {
  background: linear-gradient(180deg, #fff27a, #ffd324);
  color: #19131f;
  box-shadow: 5px 5px 0 #e8426a, inset 0 0 0 1px rgba(255, 255, 255, .6);
}

.btn-primary:not(:disabled):active {
  box-shadow: 2px 2px 0 #e8426a;
}

.btn-cyan {
  background: linear-gradient(180deg, #8ff3ff, #36bcd4);
  color: #05212c;
  box-shadow: 5px 5px 0 #1d4f86;
}

.btn-pink {
  background: linear-gradient(180deg, #ff86a4, #ee356a);
  color: #fff;
  box-shadow: 5px 5px 0 #5c1138;
}

.btn-cash {
  background: linear-gradient(180deg, #c4ff8f, #57d51e);
  color: #0c1e05;
  box-shadow: 5px 5px 0 #1c5d19;
}

.btn-danger {
  background: linear-gradient(180deg, #8a2446, #591532);
  color: #ffe3e9;
  box-shadow: 4px 4px 0 #22060f;
}

.btn-ghost {
  background: rgba(13, 17, 36, .82);
  color: var(--muted);
}

.btn-huge {
  min-height: 56px;
  padding: .5em 1.7em;
  font-size: 1.4rem;
}

.btn-small {
  min-height: 40px;
  padding: .35em .75em;
  font-size: .86rem;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.btn-wide {
  min-width: 13rem;
  max-width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  flex: none;
  min-width: 44px;
  height: 44px;
  padding: 0 .55rem;
  border: 1px solid var(--line2);
  border-radius: .55rem;
  background: rgba(11, 15, 34, .82);
  color: var(--ink);
  font-size: 1.15rem;
  transition: transform .09s, background .12s;
}

.icon-btn:hover {
  background: rgba(40, 52, 92, .95);
}

.icon-btn:active {
  transform: scale(.93);
}

.flip-x {
  display: inline-flex;
  transform: scaleX(-1);
}

.panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: linear-gradient(160deg, rgba(34, 42, 76, .96), rgba(14, 18, 38, .97));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.topbar {
  position: relative;
  z-index: 3;
  flex: none;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: calc(var(--sat) + .5rem) calc(var(--sar) + .75rem) .55rem calc(var(--sal) + .75rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 11, 24, .96), rgba(9, 11, 24, .78));
}

.topbar-title {
  flex: 1;
  min-width: 0;
}

.topbar-title h1 {
  font-size: clamp(1.35rem, 5.4vw, 2.2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  padding-right: .15em;
}

.topbar-right {
  display: flex;
  gap: .5rem;
}

.page {
  display: flex;
  flex-direction: column;
}

.page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem calc(var(--sar) + .9rem) calc(var(--sab) + 1.4rem) calc(var(--sal) + .9rem);
}

.page-foot {
  flex: none;
  display: flex;
  justify-content: center;
  gap: .8rem;
  padding: .6rem calc(var(--sar) + .8rem) calc(var(--sab) + .8rem) calc(var(--sal) + .8rem);
  border-top: 1px solid var(--line);
  background: rgba(9, 11, 24, .9);
}

.panel-narrow {
  width: min(100%, 46rem);
  margin: 0 auto;
}

.section-title {
  margin: 1.1rem 0 .55rem;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.empty {
  grid-column: 1 / -1;
  margin: 1rem auto;
  color: var(--dim);
  text-align: center;
}

.hint {
  margin: .3rem 0;
  color: var(--dim);
  font-size: .8rem;
  text-align: center;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.seg {
  flex: 1 1 auto;
  min-height: 40px;
  padding: .35rem .75rem;
  border: 1px solid var(--line2);
  border-radius: .45rem;
  background: rgba(12, 16, 36, .85);
  color: var(--muted);
  font: 800 .78rem/1.15 var(--mono);
  letter-spacing: .02em;
}

.seg.on {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #17131f;
}

.search {
  width: 100%;
  min-height: 44px;
  padding: 0 .8rem;
  border: 1px solid var(--line2);
  border-radius: .55rem;
  background: rgba(7, 9, 22, .88);
  font-size: max(16px, .95rem);
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 40px;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle i {
  position: relative;
  flex: none;
  width: 2.9rem;
  height: 1.6rem;
  border-radius: 99px;
  border: 1px solid var(--line2);
  background: #0a0e22;
  transition: background .18s;
}

.toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.6rem - 6px);
  height: calc(1.6rem - 6px);
  border-radius: 50%;
  background: var(--muted);
  transition: transform .18s, background .18s;
}

.toggle input:checked + i {
  background: linear-gradient(90deg, #2c8f3a, #7ee84f);
}

.toggle input:checked + i::after {
  transform: translateX(1.3rem);
  background: #fff;
}

.toggle input:focus-visible + i {
  outline: 3px solid var(--yellow);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  min-height: 1.75rem;
  padding: .1rem .6rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(6, 9, 22, .78);
  font-size: .85rem;
  font-weight: 800;
  white-space: nowrap;
}

.stat-chip i {
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
}

.stat-hp .ico { color: #ff5d78; }
.stat-coin .ico { color: var(--yellow); }

.stars i {
  font-style: normal;
  color: #3b4466;
}

.stars i.on {
  color: var(--yellow);
}

.ult-tag {
  display: inline-block;
  padding: .05em .4em;
  border-radius: .25em;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  color: #17131f;
  font: italic 900 .78em/1.3 var(--head);
  letter-spacing: .06em;
}

.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 10px) calc(var(--sab) + 10px) calc(var(--sal) + 10px);
  background: rgba(4, 6, 16, .78);
  pointer-events: auto;
  animation: fade-in .18s ease-out;
}

.modal-box {
  display: flex;
  flex-direction: column;
  grid-area: 1 / 1;
  width: min(100%, 34rem);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 1rem;
  background: linear-gradient(165deg, #232b4f, #0f1329 70%);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .65);
  animation: pop-in .22s cubic-bezier(.2, 1.3, .5, 1);
}

.modal {
  isolation: isolate;
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
}

.modal-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .6rem .65rem .35rem 1.05rem;
}

.modal-title {
  min-width: 0;
  font-size: 1.45rem;
  text-transform: uppercase;
  padding-right: .15em;
}

.modal-close {
  margin-left: auto;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: .45rem 1.05rem 1.05rem;
}

.modal-actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .8rem;
  padding: .75rem 1.1rem calc(.8rem + 2px);
  border-top: 1px solid var(--line);
}

.modal-confirm .modal-box { width: min(100%, 28rem); }
.modal-tall .modal-box { width: min(100%, 44rem); height: 100%; }
.modal-deck .modal-box, .modal-pick .modal-box { width: min(100%, 66rem); max-height: min(100%, 58rem); }
.modal-menu .modal-box { width: min(100%, 24rem); }

.modal-note {
  margin: 0 0 .7rem;
  color: var(--muted);
  font-size: .86rem;
  text-align: center;
}

.confirm-text {
  font-size: 1rem;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .2rem .3rem .4rem 0;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.86) translateY(12px); }
  to { opacity: 1; transform: none; }
}

.popover {
  position: absolute;
  z-index: 1;
  max-width: min(19rem, calc(100vw - 12px));
  max-height: min(70vh, calc(100dvh - 12px));
  overflow-y: auto;
  padding: .6rem .75rem;
  border: 1px solid rgba(86, 216, 232, .65);
  border-radius: .7rem;
  background: #10152ff7;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
  font-size: .85rem;
  pointer-events: auto;
  animation: fade-in .12s ease-out;
}

.short .popover { max-width: min(28rem, calc(100vw - 12px)); max-height: calc(100dvh - 12px); font-size: .78rem; }

.info p {
  margin: .25rem 0;
}

.info-title {
  display: block;
  font: italic 900 1.05rem/1.15 var(--head);
  letter-spacing: .02em;
  color: var(--yellow);
}

.info-sub {
  display: block;
  margin-top: .3rem;
  color: var(--dim);
  font: 700 .68rem var(--mono);
}

#layer-toasts {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .4rem;
  padding-top: calc(var(--sat) + 3.4rem);
}

.toast {
  max-width: min(90vw, 26rem);
  padding: .55rem 1rem;
  border: 2px solid var(--yellow);
  border-radius: 99px;
  background: #121633f5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  font-weight: 800;
  font-size: .9rem;
  text-align: center;
  animation: toast-in .24s cubic-bezier(.2, 1.4, .5, 1);
  transition: opacity .3s, transform .3s;
}

.toast.out {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px) scale(.9); }
  to { opacity: 1; transform: none; }
}

.banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: banner-in .28s cubic-bezier(.15, 1.2, .4, 1);
  z-index: 2;
}

.banner.out {
  animation: banner-out .24s ease-in forwards;
}

.banner-strip {
  position: relative;
  width: 100%;
  padding: .45rem 1rem .55rem;
  background: linear-gradient(90deg, transparent, rgba(10, 12, 30, .94) 18%, rgba(10, 12, 30, .94) 82%, transparent);
  text-align: center;
}

.banner-strip::before, .banner-strip::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--banner, var(--yellow)), transparent);
}

.banner-strip::before { top: 0; }
.banner-strip::after { bottom: 0; }

.banner strong {
  display: block;
  color: var(--banner, var(--yellow));
  font: italic 900 clamp(1.8rem, 9vw, 4rem)/1.05 var(--head);
  letter-spacing: .03em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 #000, 0 0 30px rgba(0, 0, 0, .8);
}

.banner small {
  display: block;
  color: var(--ink);
  font: 800 clamp(.68rem, 2.6vw, .95rem) var(--mono);
  letter-spacing: .08em;
}

.banner-cyan { --banner: var(--cyan); }
.banner-pink { --banner: var(--pink); }
.banner-yellow { --banner: var(--yellow); }
.banner-boss { --banner: #ff5a3c; }

@keyframes banner-in {
  from { opacity: 0; transform: translateX(-60%) skewX(-18deg); }
  to { opacity: 1; transform: none; }
}

@keyframes banner-out {
  to { opacity: 0; transform: translateX(50%) skewX(-18deg); }
}

.wipe {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  pointer-events: auto;
}

.wipe i {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -40%;
  width: 180%;
  transform: translateX(-110%) skewX(-18deg);
  animation: wipe-in .24s cubic-bezier(.6, 0, .4, 1) forwards;
}

.wipe i:nth-child(1) { background: var(--pink); }
.wipe i:nth-child(2) { background: var(--yellow); animation-delay: .035s; }
.wipe i:nth-child(3) { background: #0c0f22; animation-delay: .07s; }

.wipe.out { pointer-events: none; }
.wipe.out i { animation: wipe-out .3s cubic-bezier(.6, 0, .4, 1) forwards; }
.wipe.out i:nth-child(1) { animation-delay: .06s; }
.wipe.out i:nth-child(2) { animation-delay: .03s; }

@keyframes wipe-in {
  from { transform: translateX(-110%) skewX(-18deg); }
  to { transform: translateX(0) skewX(-18deg); }
}

@keyframes wipe-out {
  from { transform: translateX(0) skewX(-18deg); }
  to { transform: translateX(110%) skewX(-18deg); }
}

.fx-fallback {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fx-fallback i {
  position: absolute;
  border-radius: 2px;
}

.sprite {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.sprite-fallback {
  display: grid;
  place-items: end center;
  width: 100%;
  height: 100%;
}

.sprite-fallback .sf-body {
  display: grid;
  place-items: center;
  width: 62%;
  height: 78%;
  border-radius: 45% 45% 28% 28%;
  border: 3px solid #05060e;
  background: radial-gradient(circle at 40% 25%, #fff6, transparent 35%), var(--fc);
  box-shadow: inset 0 -14px 0 rgba(0, 0, 0, .22);
  transition: transform .15s;
  container-type: inline-size;
}

.sprite-fallback .sf-emoji { font-size: 42cqw; }
.sprite-fallback .sf-name { font: italic 900 17cqw var(--head); color: #11131f; }
.sprite-fallback[data-pose="punch"] .sf-body { transform: translateX(12%) rotate(8deg); }
.sprite-fallback[data-pose="kick"] .sf-body { transform: translateX(8%) rotate(-14deg); }
.sprite-fallback[data-pose="jump"] .sf-body { transform: translateY(-14%); }

.portrait-fallback {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--fc), #1a1f3b 85%);
  container-type: inline-size;
  overflow: hidden;
}

.portrait-fallback span { font-size: 48cqw; line-height: 1; }
.portrait-fallback b { position: absolute; font: italic 900 22cqw var(--head); bottom: 2%; color: #fff; text-shadow: 1px 1px 0 #000; }

.creature-fallback {
  display: grid;
  place-items: center;
  align-content: end;
  width: 100%;
  height: 100%;
  container-type: inline-size;
}

.creature-fallback span { font-size: 56cqw; }
.creature-fallback b { font: 700 9cqw var(--mono); color: var(--muted); }

.art-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--fc) 55%, #0b0e1f), #0b0e1f 75%);
}

.art-fallback .af-fx { font-size: 24cqw; filter: drop-shadow(0 0 8px var(--fc)); }
.art-fallback .af-pose { position: absolute; right: 6%; bottom: 4%; font-size: 12cqw; }

.back-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px solid var(--yellow);
  border-radius: 14%;
  background: repeating-linear-gradient(45deg, #1d2350, #1d2350 4px, #151a3d 4px, #151a3d 8px);
}

.back-fallback b { font: italic 900 .8em var(--head); color: var(--yellow); }

.logo {
  display: block;
  width: min(100%, 34rem);
  margin: 0 auto;
}

.logo > * {
  display: block;
  width: 100%;
  height: auto;
}

.logo-text {
  display: grid;
  justify-items: center;
  font-family: var(--head);
  font-style: italic;
  font-weight: 900;
  line-height: .82;
  transform: skew(-5deg);
  text-shadow: .06em .08em 0 #8b2640, .12em .16em 0 #090b18;
}

.logo-text .logo-zoo { color: var(--yellow); font-size: clamp(3.4rem, 18vmin, 11rem); }
.logo-text .logo-fighters { color: #fff; font-size: clamp(2.4rem, 12vmin, 7.6rem); }
.logo-text .logo-wild { margin-top: .3em; padding: .1em .6em .15em; background: var(--pink); color: #fff; font-size: clamp(1.2rem, 5.4vmin, 3rem); text-shadow: 2px 2px 0 #00000077; }

.card {
  position: relative;
  isolation: isolate;
  flex: none;
  width: 9rem;
  aspect-ratio: 5 / 7;
  container-type: inline-size;
  text-align: center;
  user-select: none;
}

.card.clickable { cursor: pointer; }

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(24cqw, 1fr) auto auto auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: max(2px, 2.1cqw) solid var(--rc);
  border-radius: 8cqw;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 24%, #161c36), #10142b 55%, #0a0d1d);
  box-shadow: 0 0 0 1px #04050c, 0 3cqw 7cqw rgba(0, 0, 0, .45);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 17.5cqw;
  padding: 1.6cqw 3cqw 1.4cqw 17cqw;
  background: linear-gradient(95deg, color-mix(in srgb, var(--tc) 62%, #0b0d1c), color-mix(in srgb, var(--tc) 30%, #0b0d1c));
  border-bottom: 1px solid color-mix(in srgb, var(--tc) 70%, #000);
}

.card-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
  padding-right: .1em;
  color: #fff;
  font: italic 900 max(9px, 10cqw)/1.04 var(--head);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 3px #000;
}

.card.long-name .card-name { font-size: max(8.5px, 8.8cqw); }
.card.up .card-name { color: #c2ff8a; }

.card-art {
  position: relative;
  min-height: 0;
  margin: 2.2cqw 3cqw 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 3.5cqw;
  background: #0a0d1e;
  container-type: inline-size;
}

.card-art > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card-type {
  z-index: 1;
  justify-self: center;
  margin-top: -3cqw;
  padding: .5cqw 3.4cqw .8cqw;
  border: 1px solid #05060e;
  border-radius: 99px;
  background: var(--tc);
  color: #0a0c18;
  font: 900 max(7px, 5.6cqw)/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.card-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 27cqw;
  overflow: hidden;
  padding: 1cqw 4cqw 2cqw;
  color: #eef1fb;
  font-size: max(8.5px, 8.2cqw);
  font-weight: 600;
  line-height: 1.18;
}

.card-text-in {
  max-width: 100%;
  overflow-wrap: break-word;
}

.card-text.len-m { font-size: max(8.2px, 7.6cqw); }
.card-text.len-l { font-size: max(8px, 7cqw); }
.card-text.len-xl { font-size: max(7.8px, 6.4cqw); line-height: 1.14; }

html.big-text .card-text { font-size: max(9.6px, 9cqw); }
html.big-text .card-text.len-m { font-size: max(9.2px, 8.3cqw); }
html.big-text .card-text.len-l { font-size: max(9px, 7.6cqw); }
html.big-text .card-text.len-xl { font-size: max(8.6px, 7cqw); }

.line { display: block; }
.line + .line { margin-top: .12em; }
.line-combo { color: #ffd0dc; }
.line-keyword { color: var(--yellow); font-weight: 800; }
.line-trigger { color: #d4ecff; }

.num { color: #fff; font-weight: 900; }
.num.up { color: #8cff66; }
.num.down { color: #ff7d8c; }
b.kw { color: #ffe59a; font-weight: 800; }
b.combo { color: #ff6f9a; font-weight: 900; }

.card-flavor {
  display: none;
  padding: 0 5cqw 3.2cqw;
  color: #a3acca;
  font: italic 600 4.6cqw/1.25 var(--body);
}

@container (min-width: 200px) {
  .card-flavor { display: block; }
}

@container (max-width: 104px) {
  .card-art { margin-top: 1.5cqw; }
  .card-type { margin-top: -4cqw; padding: 0 3cqw; }
  .card-head { min-height: 18cqw; }
  .card-text { min-height: 34cqw; padding: .5cqw 2.5cqw 1.5cqw; line-height: 1.12; }
  .card-face { grid-template-rows: auto minmax(6cqw, 1fr) auto auto auto; }
  .card-text.len-s { font-size: max(8px, 8cqw); line-height: 1.1; }
  .card-text.len-m { font-size: max(7.8px, 7.3cqw); line-height: 1.09; }
  .card-text.len-l { font-size: max(7.3px, 6.8cqw); line-height: 1.08; }
  .card-text.len-xl { font-size: max(6.6px, 6.2cqw); line-height: 1.05; }
  .card-text .line + .line { margin-top: 0; }
  html.big-text .card-text.len-s { font-size: max(9px, 8.8cqw); }
  html.big-text .card-text.len-m { font-size: max(8.6px, 8cqw); }
  html.big-text .card-text.len-l { font-size: max(8px, 7.2cqw); }
  html.big-text .card-text.len-xl { font-size: max(7.2px, 6.6cqw); }
}

.card-cost {
  position: absolute;
  z-index: 2;
  top: -3.5cqw;
  left: -3.5cqw;
  display: grid;
  place-items: center;
  width: 23cqw;
  height: 23cqw;
  border: max(1.5px, 1.1cqw) solid #19131f;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fffbd8, #ffd62b 52%, #e08b00);
  color: #1b1320;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .6);
  font: italic 900 max(11px, 14cqw)/1 var(--head);
}

.card-cost.cheaper { background: radial-gradient(circle at 34% 28%, #efffe2, #9cff56 52%, #3fae15); }
.card-cost.none { background: #3b415c; color: #cdd3ea; font-size: 9cqw; }

.card-gem {
  position: absolute;
  z-index: 1;
  right: 3cqw;
  bottom: 3cqw;
  width: 5cqw;
  height: 5cqw;
  transform: rotate(45deg);
  background: var(--rc);
  box-shadow: 0 0 0 1px #000, 0 0 6px var(--rc);
}

.card.r-rare .card-face { box-shadow: 0 0 0 1px #04050c, 0 0 6cqw rgba(255, 214, 90, .55); }
.card.r-rare .card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 48%, transparent 56%);
  background-size: 250% 100%;
  animation: shine 4.5s linear infinite;
  pointer-events: none;
}

@keyframes shine {
  from { background-position: 150% 0; }
  to { background-position: -100% 0; }
}

.card.clickable:hover .card-face, .card.clickable:focus-visible .card-face { filter: brightness(1.12); }
.card.clickable { transition: transform .15s; }
@media (hover: hover) {
  .card.clickable:hover { transform: translateY(-4px) scale(1.03); }
}
.card.clickable:active { transform: scale(.97); }
.card.picked { transform: translateY(-8px) scale(1.05) !important; z-index: 2; }
.card.picked .card-face { box-shadow: 0 0 0 3px #0a0c18, 0 0 0 6px var(--yellow), 0 0 26px var(--yellow); }
.card.disabled { opacity: .4; }
.card.glow .card-face { animation: glow-once 1.2s ease-out; }

@keyframes glow-once {
  0% { box-shadow: 0 0 0 0 #fff, 0 0 0 0 #9aff55; filter: brightness(2.2); }
  100% { box-shadow: 0 0 0 1px #04050c, 0 0 18px rgba(154, 255, 85, .55); filter: none; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(94px, 27vw, 160px), 1fr));
  gap: .8rem .65rem;
  padding: .35rem .15rem;
}

.card-grid .card { width: 100%; }

html[data-device="desk"] .card-grid { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }

.modal-detail .modal-box { width: min(100%, 50rem); }

.modal-detail .modal-body {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.detail-stage {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.detail-stage .card-big { width: min(19rem, 52vw, 46vh); }

.detail-side {
  flex: 1;
  min-width: 0;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tag {
  padding: .15rem .55rem;
  border: 1px solid var(--tag);
  border-radius: 99px;
  color: var(--tag);
  font: 800 .68rem var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-flavor {
  color: var(--muted);
  font-style: italic;
}

.glossary {
  display: grid;
  gap: .45rem;
  margin-top: .6rem;
}

.gloss {
  padding: .45rem .65rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: rgba(7, 10, 24, .7);
}

.gloss strong {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--yellow);
  font-size: .86rem;
}

.gloss p {
  margin: .1rem 0 0;
  color: #d4daef;
  font-size: .8rem;
}

html[data-orient="portrait"] .modal-detail .modal-body { flex-direction: column; align-items: stretch; }
html[data-orient="portrait"] .detail-stage .card-big { width: min(17rem, 64vw, 38vh); }

.short .detail-stage .card-big { width: min(40vh, 30vw); }
.short .modal-head { padding-top: .35rem; padding-bottom: .1rem; }
.short .modal-title { font-size: 1.15rem; }
.short .modal-body { padding-top: .35rem; padding-bottom: .6rem; }
.short .modal-actions { padding-top: .45rem; padding-bottom: .55rem; }
.short .card-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(94px, 15vw, 130px), 1fr)); }
.short .pick-confirm .card-big { width: min(36vh, 30vw); }
.short .result-card .card-big { width: min(38vh, 62vw); }

.pick-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .8rem 0;
}

.pick-confirm .card-big { width: min(16rem, 39vw, 52vh); }

.pick-confirm .arrow {
  color: var(--lime);
  font-size: 1.7rem;
}

.pick-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: .4rem 0 .2rem;
}

.result-card {
  display: flex;
  justify-content: center;
  padding: .6rem;
}

.result-card .card-big { width: min(15rem, 62vw, 48vh); }

.relic-chip {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--rc);
  border-radius: .6rem;
  background: rgba(9, 12, 30, .86);
  font-size: 1.25rem;
  line-height: 1;
}

.relic-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.relic-tile {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .65rem .8rem;
  border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent);
  border-radius: .8rem;
  background: linear-gradient(120deg, color-mix(in srgb, var(--rc) 20%, #121733), #101430);
  color: var(--ink);
  text-align: left;
}

button.relic-tile { transition: transform .12s, box-shadow .12s; }
button.relic-tile:hover { transform: translateY(-2px); }
.relic-tile.picked { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow), 0 0 22px rgba(255, 226, 93, .5); }

.relic-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent), transparent 72%);
  font-size: 1.9rem;
  line-height: 1;
}

.relic-copy {
  flex: 1;
  min-width: 0;
  display: grid;
}

.relic-copy strong {
  font: italic 900 1.05rem/1.15 var(--head);
  letter-spacing: .02em;
  color: var(--rc);
}

.relic-copy small {
  color: #d7ddf1;
  font-size: .8rem;
}

.relic-large { padding: 1rem; }
.relic-large .relic-icon { width: 4.4rem; height: 4.4rem; font-size: 2.8rem; }
.relic-large .relic-copy small { font-size: .95rem; }

.price {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .12rem .55rem;
  border-radius: 99px;
  background: #0a0d22;
  border: 1px solid rgba(255, 226, 93, .6);
  color: var(--yellow);
  font: 900 .85rem var(--body);
  white-space: nowrap;
}

.price.cant { color: #ff8795; border-color: #ff879577; }
.price.sold { color: var(--dim); border-color: var(--line); }

.share-box {
  display: grid;
  gap: .5rem;
}

.share-text {
  width: 100%;
  resize: none;
  padding: .6rem .7rem;
  border: 1px solid var(--line2);
  border-radius: .6rem;
  background: #070918;
  color: #e7ecff;
  font: 600 .78rem/1.45 var(--mono);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.share-status {
  min-height: 1.1em;
  margin: 0;
  color: var(--lime);
  font-size: .82rem;
  font-weight: 700;
}

.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: .001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .05s !important;
}

.reduce-motion .timing-marker { transition: none !important; }

.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.35rem, 2.2vh, 1.4rem);
  width: 100%;
  height: 100%;
  padding: calc(var(--sat) + 1rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1rem) calc(var(--sal) + 1rem);
  text-align: center;
}

.splash .logo {
  width: min(92vw, 40rem, 78vh);
  animation: logo-slam .7s cubic-bezier(.2, 1.4, .4, 1) both;
}

.splash-tag {
  margin: 0;
  color: #fff4d9;
  font: 800 clamp(.72rem, 2.8vw, 1rem) var(--mono);
  letter-spacing: .12em;
  text-shadow: 0 2px 6px #000;
  text-transform: uppercase;
}

.splash-cast {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  height: clamp(90px, min(26vh, 22vw), 300px);
}

.splash-fighter {
  flex: 0 1 auto;
  height: 100%;
  aspect-ratio: 1;
  margin: 0 -2.2%;
  animation: cast-in .55s cubic-bezier(.2, 1.3, .4, 1) both;
  animation-delay: calc(.25s + var(--i) * .08s);
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .55));
}

.splash-fighter:nth-child(3) { z-index: 2; transform: scale(1.12); }

.splash-tap span {
  display: inline-block;
  padding: .45em 1.6em;
  border: 2px solid #17131f;
  border-radius: .4rem;
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--pink);
  color: #17131f;
  font: italic 900 clamp(1.3rem, 5.5vw, 2.2rem) var(--head);
  letter-spacing: .08em;
  animation: tap-pulse 1.15s ease-in-out infinite;
}

.splash-foot {
  margin: 0;
  color: var(--muted);
  font: 700 .72rem var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

@keyframes logo-slam {
  from { opacity: 0; transform: scale(1.8) rotate(-4deg); }
  to { opacity: 1; transform: none; }
}

@keyframes cast-in {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; }
}

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}

.short .splash-center { gap: .35rem; }
.short .splash .logo { width: min(60vw, 70vh); }
.short .splash-cast { height: 24vh; }
.short .splash-foot, .short .splash-tag { display: none; }

.title {
  display: flex;
  flex-direction: column;
}

.title-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.5rem, 2.4vh, 2rem);
  overflow-y: auto;
  padding: calc(var(--sat) + .6rem) calc(var(--sar) + .9rem) .4rem calc(var(--sal) + .9rem);
}

.title-main > * { flex: none; }

.title-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 38rem);
  text-align: center;
}

.title-head .logo {
  width: min(86vw, 34rem, 40vh * 1.6);
  animation: logo-float 5s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-.6deg); }
}

.title-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1rem;
  margin: .35rem 0 0;
  color: var(--cyan);
  font: 800 .72rem var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px #000;
}

.title-menu {
  display: grid;
  gap: .72rem;
  width: min(100%, 23rem);
  padding: 0 6px 4px 0;
}

.btn-menu {
  min-height: 52px;
  font-size: 1.35rem;
}

.btn-menu .btn-sub { font-size: .58rem; }

.title-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.title-row .btn {
  flex-direction: column;
  min-height: 54px;
  padding: .3rem .2rem;
  font-size: .8rem;
}

.btn-continue {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: .7rem;
  min-height: 64px;
  padding: .35rem .7rem .35rem .35rem;
  border-color: var(--fc);
  background: linear-gradient(95deg, color-mix(in srgb, var(--fc) 38%, #131833), #131833 75%);
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--fc) 55%, #000);
  text-align: left;
}

.continue-face {
  flex: none;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 2px solid var(--fc);
  border-radius: .5rem;
  background: #0a0e22;
}

.continue-copy {
  display: grid;
  min-width: 0;
}

.continue-copy strong { font-size: 1.4rem; color: var(--yellow); }

.continue-copy small {
  overflow: hidden;
  color: var(--ink);
  font: 700 .68rem var(--mono);
  letter-spacing: 0;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.title-mute {
  position: absolute;
  top: calc(var(--sat) + .6rem);
  right: calc(var(--sar) + .6rem);
}

.parade {
  position: relative;
  flex: none;
  width: 100%;
  height: var(--ph);
  --ph: clamp(78px, 15vh, 170px);
  overflow: hidden;
  padding-bottom: var(--sab);
  pointer-events: none;
}

.parade::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 20, .92));
}

.parade-track {
  position: absolute;
  bottom: var(--sab);
  left: 0;
  display: flex;
  align-items: flex-end;
  width: max-content;
  animation: march calc(var(--count) * 2.4s) linear infinite;
}

.parade-fighter {
  width: var(--ph);
  height: var(--ph);
  margin-right: calc(var(--ph) * -.12);
  animation: parade-hop .9s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes march {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes parade-hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5%); }
}

html[data-orient="landscape"] .title-main {
  flex-direction: row;
  justify-content: center;
  gap: clamp(1rem, 5vw, 6rem);
}

html[data-orient="landscape"] .title-head { width: min(52vw, 44rem); }
html[data-orient="landscape"] .title-head .logo { width: min(50vw, 40rem, 90vh); }
html[data-orient="landscape"] .title-menu { width: min(40vw, 24rem); }

.short .title-main { padding-top: calc(var(--sat) + .3rem); gap: 1.4rem; }
.short .title-head .logo { width: min(42vw, 62vh); }
.short .title-menu { gap: .45rem; }
.short .btn-menu { min-height: 40px; font-size: 1.1rem; }
.short .btn-menu .btn-sub { display: none; }
.short .title-row .btn { min-height: 40px; flex-direction: row; font-size: .72rem; }
.short .title-row .btn .ico { display: none; }
.short .btn-continue { min-height: 48px; }
.short .continue-face { width: 38px; height: 38px; }
.short .continue-copy strong { font-size: 1.1rem; }
.short .parade { --ph: 17vh; }
.short .title-mute { left: calc(var(--sal) + .6rem); right: auto; }

@media (max-height: 600px) {
  html[data-orient="portrait"] .title-head .logo { width: min(66vw, 20rem); }
  html[data-orient="portrait"] .title-stats { display: none; }
  html[data-orient="portrait"] .btn-menu { min-height: 44px; font-size: 1.15rem; }
  html[data-orient="portrait"] .btn-menu .btn-sub { display: none; }
  html[data-orient="portrait"] .title-menu { gap: .5rem; }
  html[data-orient="portrait"] .title-row .btn { min-height: 44px; }
  html[data-orient="portrait"] .title-row .btn .ico { display: none; }
  html[data-orient="portrait"] .parade { --ph: 11vh; }
  html[data-orient="portrait"] .title-main { gap: .5rem; }
}

.select {
  display: flex;
  flex-direction: column;
}

.select-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: .8rem;
  width: min(100%, 92rem);
  margin: 0 auto;
  padding: .7rem calc(var(--sar) + .7rem) calc(var(--sab) + .7rem) calc(var(--sal) + .7rem);
}

.select-roster {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: .55rem;
}

.roster {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(4.6rem, 19vw, 7.4rem), 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: .5rem;
  overflow-y: auto;
  padding: 4px;
  overscroll-behavior: contain;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 3px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: .6rem;
  background: rgba(10, 14, 33, .88);
  transition: transform .1s, border-color .1s, box-shadow .1s;
}

.tile:hover { border-color: rgba(255, 255, 255, .6); }

.tile-face {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: .35rem;
  background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--fc) 45%, #0a0e21), #0a0e21 75%);
}

.tile-name {
  overflow: hidden;
  font: 800 .66rem/1.25 var(--body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile.on {
  border-color: var(--fc);
  background: color-mix(in srgb, var(--fc) 22%, #0a0e21);
  box-shadow: 0 0 0 2px #080a16, 0 0 16px color-mix(in srgb, var(--fc) 80%, transparent);
  transform: translateY(-2px);
}

.tile-trophy {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: .8rem;
}

.select-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fc, #56d8e8) 55%, transparent);
  border-radius: 1rem;
  background: linear-gradient(170deg, color-mix(in srgb, var(--fc, #56d8e8) 18%, #151b36), #0d1126 55%);
}

.detail-hero {
  position: relative;
  flex: none;
  height: clamp(150px, 36vh, 400px);
  container-type: inline-size;
}

.hero-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 92%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid color-mix(in srgb, var(--fc) 70%, transparent);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fc) 35%, transparent), transparent 68%);
  animation: ring-breathe 3s ease-in-out infinite;
}

@keyframes ring-breathe {
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

.hero-sprite {
  position: absolute;
  left: 50%;
  bottom: 3%;
  height: 96%;
  max-width: 100%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  animation: hero-bob 2.4s ease-in-out infinite;
}

@keyframes hero-bob {
  50% { transform: translateX(-50%) translateY(-2%); }
}

.hero-floor {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 2%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .6), transparent 70%);
}

.hero-badge {
  position: absolute;
  left: .85rem;
  bottom: .35rem;
  max-width: 60%;
  text-shadow: 2px 2px 0 #000;
}

.hero-badge b {
  display: block;
  font: italic 900 clamp(1.4rem, 5vw, 2.4rem)/1 var(--head);
  font-size: min(clamp(1.4rem, 5vw, 2.4rem), calc(var(--fit, 160cqw) / var(--n, 8)));
  letter-spacing: .02em;
}

.hero-badge small {
  font: 800 .62rem var(--mono);
  letter-spacing: .1em;
}

.detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: .5rem .9rem .7rem;
  overscroll-behavior: contain;
}

.detail-cta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .8rem;
  padding: .65rem .95rem .75rem;
  border-top: 1px solid var(--line);
  background: rgba(8, 10, 24, .75);
}

.detail-cta .btn-go { flex: 1; }
.sheet-back { display: none; }

.hero-info .chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.hero-blurb {
  margin: .55rem 0;
  font-size: .95rem;
}

.hero-title {
  margin: 0;
  font: 800 .75rem var(--mono);
  letter-spacing: .1em;
}

.info-block {
  margin: .55rem 0;
  padding: .45rem .7rem;
  border-left: 3px solid var(--fc, var(--cyan));
  border-radius: 0 .55rem .55rem 0;
  background: rgba(7, 10, 25, .6);
  font-size: .85rem;
}

.info-block h3 {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: 1.02rem;
  text-transform: uppercase;
}

.info-block h3 small {
  color: var(--dim);
  font: 700 .66rem var(--mono);
  font-style: normal;
}

.info-block p { margin: .25rem 0 0; }

.info-block blockquote, .lore-copy blockquote {
  margin: .25rem 0 0;
  color: #fff3c6;
  font-style: italic;
}

.forms {
  display: grid;
  gap: .4rem;
}

.form-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.form-row p { margin: 0; }

.form-face {
  flex: none;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 2px solid var(--fc, var(--cyan));
  border-radius: .5rem;
  background: #0a0e22;
}

.view-cards { width: 100%; margin-top: .2rem; }

.looks {
  margin: .2rem 0 .45rem;
}

.looks .seg {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .5rem .25rem .25rem;
}

.look-face {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: .35rem;
  background: #0a0e22;
}

.climb-options {
  display: grid;
  gap: .4rem;
  margin: .2rem 0 .6rem;
}

.segmented.heats { display: grid; grid-template-columns: repeat(auto-fit, minmax(3.4rem, 1fr)); }
.heats .seg { min-width: 0; padding-inline: .1rem; font-size: .72rem; }
.short .segmented.heats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lengths .seg { flex: 1 1 40%; white-space: nowrap; padding-inline: .3rem; }

.heat-desc {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.wide:not(.short) .select-detail {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.wide:not(.short) .detail-hero { grid-row: 1 / 3; height: auto; border-right: 1px solid var(--line); }
.wide:not(.short) .hero-sprite { width: 118%; max-width: 118%; height: auto; bottom: 14%; }
.wide:not(.short) .hero-badge { bottom: 1rem; max-width: 90%; }
.wide:not(.short) .hero-ring { top: 55%; width: 94%; height: auto; }
.wide:not(.short) .detail-scroll { padding-top: .9rem; }

.stack .select-body {
  grid-template-columns: minmax(0, 1fr);
}

.stack .select-detail {
  position: absolute;
  z-index: 5;
  top: .45rem;
  left: calc(var(--sal) + .45rem);
  right: calc(var(--sar) + .45rem);
  bottom: calc(var(--sab) + .45rem);
  visibility: hidden;
  transform: translateY(105%);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .7);
  transition: transform .26s cubic-bezier(.2, .9, .3, 1), visibility 0s .26s;
}

.stack .select.sheet-open .select-detail {
  visibility: visible;
  transform: none;
  transition: transform .26s cubic-bezier(.2, .9, .3, 1);
}

.stack .sheet-back { display: inline-flex; }
.stack .detail-hero { height: clamp(130px, calc(40vh - 60px), 300px); }
.stack .hero-badge { --fit: 112cqw; }

html[data-orient="portrait"]:not(.stack) .select-body {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1.7fr) minmax(0, 1fr);
}

html[data-orient="portrait"]:not(.stack) .select-detail {
  order: -1;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-rows: minmax(0, 1fr) auto;
}
html[data-orient="portrait"]:not(.stack) .detail-hero { grid-row: 1 / 3; height: auto; border-right: 1px solid var(--line); }
html[data-orient="portrait"]:not(.stack) .hero-sprite { width: 122%; max-width: 122%; height: auto; bottom: 16%; }
html[data-orient="portrait"]:not(.stack) .hero-badge { bottom: 1rem; max-width: 92%; }
html[data-orient="portrait"]:not(.stack) .hero-ring { top: 52%; width: 96%; height: auto; }
html[data-orient="portrait"]:not(.stack) .detail-scroll { padding-top: .8rem; }

.short .select-body { padding-top: .4rem; padding-bottom: calc(var(--sab) + .4rem); }
.short .select-detail {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}
.short .detail-hero { height: auto; grid-row: 1 / 3; }
.short .hero-badge { max-width: 94%; }
.short .hero-sprite { bottom: 11%; height: auto; width: 128%; max-width: 128%; }
.short .detail-scroll { padding: .4rem .6rem; }
.short .detail-cta { padding: .45rem .6rem; }
.short .btn-go { min-height: 44px; font-size: 1.15rem; }
.short .roster { grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); gap: .35rem; }
.short .search { min-height: 40px; }
.short .topbar { padding-top: calc(var(--sat) + .25rem); padding-bottom: .25rem; }
.short .topbar .eyebrow { display: none; }

.page.daily .page-body > *, .page.duel .page-body > * {
  width: min(100%, 64rem);
  margin-left: auto;
  margin-right: auto;
}

.daily-intro {
  color: var(--muted);
  text-align: center;
}

.daily-resume { display: flex; }

.daily-result {
  display: grid;
  gap: .7rem;
  margin-top: .8rem;
}

.daily-score {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.daily-face {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: .7rem;
  background: #0a0e22;
}

.daily-score div { display: grid; }
.daily-score b { font: italic 900 1.8rem var(--head); color: var(--yellow); }
.daily-score small { color: var(--muted); }

.daily-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}

.daily-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .8rem;
  border: 2px solid color-mix(in srgb, var(--fc) 60%, transparent);
  border-radius: 1rem;
  background: linear-gradient(175deg, color-mix(in srgb, var(--fc) 28%, #141a35), #0d1126 62%);
  text-align: center;
  animation: cast-in .4s ease-out both;
  animation-delay: calc(var(--i) * .08s);
}

.daily-sprite {
  width: min(100%, 15rem, 30vh);
  aspect-ratio: 1;
}

.daily-copy h3 { font-size: 1.6rem; color: var(--fc); }
.daily-copy small { font: 800 .66rem var(--mono); letter-spacing: .1em; }
.daily-copy p { margin: .25rem 0; font-size: .85rem; }

.daily-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: auto;
}

.stack .daily-picks { grid-template-columns: minmax(0, 1fr); }

.stack .daily-pick {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  padding: .55rem .7rem;
  text-align: left;
}

.stack .daily-sprite { grid-row: 1 / 3; width: 7rem; }
.stack .daily-actions { justify-content: flex-start; }

.short .daily-sprite { width: min(100%, 26vh); }

.duel-resume { display: flex; margin-bottom: .8rem !important; }

.duel-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem 1.2rem;
}

.versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  margin-top: .8rem !important;
}

.duel-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  min-width: 0;
  padding: .55rem .4rem .7rem;
  border: 2px solid color-mix(in srgb, var(--fc, #8892b0) 55%, transparent);
  border-radius: 1rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fc, #8892b0) 24%, #131836), #0d1126);
  text-align: center;
}

.duel-slot strong { font: italic 900 1.3rem var(--head); color: var(--fc); }
.duel-slot > small:not(.eyebrow) { font-size: .68rem; color: var(--muted); }

.duel-sprite {
  width: min(100%, 17rem, 32vh);
  aspect-ratio: 1;
}

.mystery {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font: italic 900 5rem var(--head);
  color: var(--dim);
}

.slot-actions {
  display: flex;
  gap: .5rem;
  margin-top: .35rem;
}

.vs-mark {
  font: italic 900 clamp(1.8rem, 7vw, 4rem) var(--head);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--pink);
  padding-right: .1em;
}

.arena-row {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: 4px 4px 8px;
  scrollbar-width: thin;
}

.arena-chip {
  flex: 0 0 clamp(6.4rem, 22vw, 9rem);
  display: grid;
  gap: .25rem;
  padding: 3px 3px 6px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-radius: .6rem;
  background: #0b0f24;
  font: 800 .66rem var(--body);
}

.arena-chip.on { border-color: var(--cyan); box-shadow: 0 0 14px rgba(86, 216, 232, .6); }
.wide:not(.short) .arena-chip { flex: 1 1 0; min-width: 0; align-content: start; }

.arena-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: .35rem;
  background-size: cover;
  background-position: center;
  background-color: #1b2140;
  image-rendering: pixelated;
  font: italic 900 1.6rem var(--head);
  color: var(--yellow);
}

.arena-rule {
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}

.short .duel-sprite { width: min(100%, 20vh); }
.short .page.duel .page-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-auto-rows: max-content; column-gap: 1rem; padding-top: .5rem; }
.short .page.duel .page-body > * { width: 100%; margin: 0 !important; }
.short .page.duel .duel-resume, .short .page.duel .duel-options { grid-column: 1 / -1; margin-bottom: .45rem !important; }
.short .page.duel .versus { grid-column: 1; grid-row: span 3; }
.short .page.duel .section-title, .short .page.duel .arena-row, .short .page.duel .arena-rule { grid-column: 2; }
.short .page.duel .arena-row { flex-wrap: wrap; overflow: visible; }
.short .page.duel .arena-chip { flex-basis: calc(25% - .45rem); }
.short .page.duel .section-title { margin-bottom: .35rem !important; font-size: 1rem; }
@media (max-height: 640px) {
  .duel-sprite { width: min(100%, 22vh); }
  .duel-options { gap: .4rem .8rem; }
  .versus { margin-top: .45rem !important; }
  .page.duel .section-title { margin: .5rem auto .3rem; }
  html[data-orient="portrait"] .rest-body { grid-template-rows: minmax(0, 1fr); align-content: center; }
  html[data-orient="portrait"] .rest-scene { display: none; }
}
@media (min-width: 900px) and (min-height: 520px) and (max-height: 800px) {
  .duel-sprite { width: min(100%, 21vh); }
  .versus { margin-top: .45rem !important; }
  .duel-slot { padding-block: .4rem .5rem; }
  .page.duel .section-title { margin: .45rem auto .25rem; }
}
.short .duel-slot > small:not(.eyebrow) { display: none; }

.draft-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
}

.draft-body > * { flex: none; }
.draft-body .card-choices .card { width: clamp(90px, min(29vw, 40vh, calc((100vh - 18rem) / 1.4)), 260px); }
.draft-body > :first-child { margin-top: auto; }
.draft-body > :last-child { margin-bottom: auto; }

.draft-progress {
  display: flex;
  gap: .35rem;
}

.draft-progress i {
  width: 1.6rem;
  height: .5rem;
  border-radius: 99px;
  background: #272f55;
}

.draft-progress i.done { background: var(--lime); }
.draft-progress i.now { background: var(--yellow); animation: tap-pulse 1s infinite; }

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem;
}

.card-choices {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(.35rem, 2vw, 1.5rem);
  width: 100%;
  padding: .9rem .1rem .6rem;
}

.card-choices .card { width: clamp(90px, min(29vw, 34vh, calc((100vh - 27.5rem) / 1.4)), 240px); }
.card-choices.count-4 .card, .card-choices.count-5 .card { width: clamp(70px, min(22vw, 30vh, calc((100vh - 27.5rem) / 1.4)), 200px); }
.card-choices.count-4, .card-choices.count-5 { gap: clamp(.35rem, 1.6vw, 1.2rem); }

html.stack .reward-body .card-choices.count-4, html.stack .reward-body .card-choices.count-5 { display: grid; grid-template-columns: repeat(2, auto); gap: 1rem .8rem; }
html.stack .reward-body .card-choices.count-4 .card, html.stack .reward-body .card-choices.count-5 .card { width: clamp(112px, min(40vw, 22vh), 190px); }
html.stack .reward-body .card-choices.count-5 > :last-child { grid-column: 1 / -1; justify-self: center; }
html.stack .reward-body .card-choices.count-4 ~ .reward-actions, html.stack .reward-body .card-choices.count-5 ~ .reward-actions { position: sticky; z-index: 70; bottom: calc(-1 * var(--sab) - 1.2rem); justify-content: center; width: calc(100% + 1.4rem); padding: .7rem .5rem calc(var(--sab) + .8rem); background: linear-gradient(180deg, transparent, rgba(7, 9, 22, .96) 30%); }

.runbar {
  position: relative;
  z-index: 3;
  flex: none;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "face stats relics actions";
  align-items: center;
  gap: .35rem .75rem;
  padding: calc(var(--sat) + .4rem) calc(var(--sar) + .65rem) .45rem calc(var(--sal) + .65rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 11, 24, .97), rgba(9, 11, 24, .86));
}

.runbar-face {
  grid-area: face;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 2px solid var(--fc);
  border-radius: 50%;
  background: color-mix(in srgb, var(--fc) 30%, #0b0e1f);
}

.runbar-stats { grid-area: stats; min-width: 0; }

.runbar-name {
  display: block;
  color: var(--fc);
  font: italic 900 1rem/1.1 var(--head);
  letter-spacing: .03em;
}

.runbar-chips {
  display: flex;
  gap: .35rem;
  margin-top: .15rem;
}

.runbar-relics {
  grid-area: relics;
  display: flex;
  gap: .35rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.runbar-relics::-webkit-scrollbar { display: none; }

.no-gear {
  align-self: center;
  color: var(--dim);
  font: 700 .68rem var(--mono);
}

.runbar-actions {
  grid-area: actions;
  display: flex;
  gap: .45rem;
}

.deck-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  min-width: 56px;
  height: 44px;
  padding: 0 .6rem;
  border: 1px solid var(--line2);
  border-radius: .55rem;
  background: rgba(11, 15, 34, .85);
  font-size: 1.2rem;
}

.deck-btn b { font-size: .95rem; }

.stack .runbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "face stats actions" "relics relics relics";
}

.stack .runbar-relics:has(.no-gear) { display: none; }

.stack .runbar-name { display: none; }

.map, .reward, .shop, .rest, .treasure, .event {
  display: flex;
  flex-direction: column;
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .45rem calc(var(--sar) + .8rem) .2rem calc(var(--sal) + .8rem);
}

.map-head h1 {
  flex: 1;
  font-size: clamp(1.15rem, 4.6vw, 1.9rem);
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}

.map-head .eyebrow { display: none; }

html:not(.short):not(.stack) .map-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "eyebrow info" "title info";
  row-gap: 0;
}

html:not(.short):not(.stack) .map-head .eyebrow { display: block; grid-area: eyebrow; }
html:not(.short):not(.stack) .map-head h1 { grid-area: title; }
html:not(.short):not(.stack) .map-head .map-legend { grid-area: info; }

.map-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  padding-bottom: var(--sab);
}

.map-canvas {
  position: relative;
  margin: 0 auto;
}

.map-lines {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.map-lines path {
  fill: none;
  stroke: rgba(210, 220, 255, .28);
  stroke-width: 4;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}

.map-lines path.walked { stroke: rgba(255, 226, 93, .85); stroke-dasharray: none; }
.map-lines path.next { stroke: var(--cyan); stroke-dasharray: 9 9; stroke-width: 5; animation: dash 1s linear infinite; }

@keyframes dash { to { stroke-dashoffset: -18; } }

.map-node {
  --nc: #9aa6d0;
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border: 3px solid var(--nc);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--nc) 45%, #1a2046), #0c1029 75%);
  box-shadow: 0 0 0 3px rgba(6, 8, 20, .8), 0 6px 14px rgba(0, 0, 0, .5);
  font-size: 1.75rem;
  transition: transform .12s;
}

.n-fight { --nc: #ff9a62; }
.n-elite { --nc: #ff4d79; }
.n-event { --nc: #b78cff; }
.n-shop { --nc: #ffe25d; }
.n-rest { --nc: #7ee896; }
.n-treasure { --nc: #56d8e8; }
.n-boss { --nc: #ff5a3c; }

.map-node.n-boss {
  width: 82px;
  height: 82px;
  margin: -41px 0 0 -41px;
  font-size: 2.9rem;
}

.big-map .map-node { width: 74px; height: 74px; margin: -37px 0 0 -37px; font-size: 2.2rem; }
.big-map .map-node.n-boss { width: 118px; height: 118px; margin: -59px 0 0 -59px; font-size: 3.8rem; }
.big-map .map-token { width: 54px; height: 54px; margin: -58px 0 0 -60px; }
.big-map .map-token.start { margin: -27px 0 0 -27px; }
.big-map .map-lines path { stroke-width: 5; }

.map-node:not(.available):not(.current) { filter: saturate(.55) brightness(.72); }
.map-node.visited { filter: grayscale(.7) brightness(.6); }
.map-node.n-boss:not(.available) { filter: brightness(.9); }

.map-node.available {
  z-index: 2;
  animation: node-pulse 1.25s ease-out infinite;
}

.map-node.available:hover { transform: scale(1.14); }
.map-node.chosen { transform: scale(1.3); }

.map-node.current {
  border-color: #fff;
}

@keyframes node-pulse {
  0% { box-shadow: 0 0 0 3px rgba(6, 8, 20, .8), 0 0 0 3px var(--nc); }
  100% { box-shadow: 0 0 0 3px rgba(6, 8, 20, .8), 0 0 0 16px transparent; }
}

.node-label {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(6, 8, 20, .88);
  font: 800 .6rem/1.5 var(--mono);
  white-space: nowrap;
  text-transform: uppercase;
  pointer-events: none;
}

.map-token {
  position: absolute;
  z-index: 3;
  width: 40px;
  height: 40px;
  margin: -28px 0 0 -48px;
  overflow: hidden;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  background: color-mix(in srgb, var(--fc) 40%, #0b0e1f);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .6);
  pointer-events: none;
  animation: token-bob 1.1s ease-in-out infinite;
}

.map-token.start { margin: -20px 0 0 -20px; }

@keyframes token-bob {
  50% { transform: translateY(-5px); }
}

.legend {
  display: grid;
  gap: .45rem;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.legend-row p { margin: 0; font-size: .85rem; }

.node-dot {
  --nc: #9aa6d0;
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--nc);
  border-radius: 50%;
  background: #0c1029;
  font-size: 1.15rem;
}

.reward-body, .treasure-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  overflow-y: auto;
  padding: .9rem calc(var(--sar) + .7rem) calc(var(--sab) + 1.2rem) calc(var(--sal) + .7rem);
  text-align: center;
}

.reward-body > *, .treasure-body > * { flex: none; }
.reward-body > :first-child, .treasure-body > :first-child { margin-top: auto; }
.reward-body > :last-child, .treasure-body > :last-child { margin-bottom: auto; }

.reward-title {
  font-size: clamp(2.2rem, 10vw, 4.4rem);
  color: var(--yellow);
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 rgba(0, 0, 0, .6);
  padding-right: .15em;
  animation: logo-slam .45s cubic-bezier(.2, 1.4, .4, 1);
}

.loot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: .6rem;
  max-width: 44rem;
}

.loot-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  border: 2px solid rgba(255, 226, 93, .55);
  border-radius: .8rem;
  background: rgba(10, 13, 32, .85);
  animation: pop-in .35s .15s both;
}

.loot-item .ico { font-size: 1.5rem; }
.loot-item b { font: italic 900 1.6rem var(--head); color: var(--yellow); }
.loot-item span { color: var(--muted); font-size: .75rem; }
.loot-heal { border-color: rgba(255, 93, 120, .6); }
.loot-heal b { color: #ff8fa2; }
.loot-heal .ico { color: #ff5d78; }
.loot-gold .ico { color: var(--yellow); }

.loot-relic {
  width: min(100%, 28rem);
  animation: pop-in .35s .3s both;
}

.step-title {
  margin-top: .45rem;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.choose.boss-gear {
  display: grid;
  gap: .6rem;
  width: min(100%, 34rem);
}

.reward-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: .3rem 0;
}

.reward-got {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-got .card { width: min(10.5rem, 36vw, 30vh); }
.reward-skip { color: var(--muted); }

@media (min-width: 900px) and (min-height: 520px) and (max-height: 800px) {
  .reward-body { gap: .35rem; padding-top: .4rem; padding-bottom: calc(var(--sab) + .5rem); }
  .reward-title { font-size: 2.8rem; }
  .reward-body .loot-relic { padding-block: .25rem; }
  .reward-body .step-title { margin-top: .15rem; }
  .reward-body .hint { display: none; }
}

.short .reward-body {
  flex-flow: row wrap;
  align-content: center;
  justify-content: center;
  gap: .3rem 1rem;
  padding-top: .3rem;
  padding-bottom: calc(var(--sab) + .3rem);
}
.short .reward-body > * { margin: 0 !important; }
.short .reward-title { font-size: 1.7rem; }
.short .loot-item { padding: .15rem .7rem; }
.short .loot-item .ico { font-size: 1.15rem; }
.short .loot-item b { font-size: 1.25rem; }
.short .loot-relic { padding: .25rem .6rem; width: auto; max-width: 22rem; }
.short .loot-relic .relic-icon { width: 2rem; height: 2rem; font-size: 1.3rem; }
.short .step-title { display: none; }
.short .card-choices { padding: .55rem .2rem .15rem; }
.short .card-choices .card { width: min(37vh, 24vw, 13rem); }
.short .hint { display: none; }
.short .reward-actions { width: 100%; padding: .2rem 0; }
.short .reward-got { flex-direction: row; gap: 1rem; width: 100%; justify-content: center; }
.short .reward-got .card { width: min(36vh, 24vw); }
.short .reward-skip { width: 100%; }
.short .choose.boss-gear { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 52rem; }
.short .boss-gear .relic-tile { flex-direction: column; text-align: center; padding: .45rem; gap: .35rem; }

.shop-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: .7rem calc(var(--sar) + .8rem) calc(var(--sab) + 1.4rem) calc(var(--sal) + .8rem);
  overscroll-behavior: contain;
}

.shop-body > * {
  width: min(100%, 72rem);
  margin-left: auto;
  margin-right: auto;
}

.shop-head {
  position: sticky;
  top: -.7rem;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .8rem .55rem .7rem;
  border-radius: 0 0 .8rem .8rem;
  background: linear-gradient(180deg, rgba(22, 15, 22, .97), rgba(28, 18, 20, .93));
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
}

.shop-head h1 {
  font-size: clamp(1.7rem, 7vw, 2.8rem);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

.shop-label {
  margin-top: .8rem;
  margin-bottom: .45rem;
  color: var(--cyan);
  font-size: 1.1rem;
  text-transform: uppercase;
}

.shop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(92px, 27vw, 140px), 1fr));
  gap: .8rem .6rem;
}

.shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.shop-item .card { width: 100%; }
.short .shop-cards { grid-template-columns: repeat(auto-fill, minmax(clamp(92px, 12vw, 118px), 1fr)); }
.shop-item.sold .card { filter: grayscale(1) brightness(.45); }

.shop-relics, .shop-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: .6rem;
}

.shop-relic.sold { opacity: .4; }
.shop-relic .price { flex: none; }

.service {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 64px;
  padding: .55rem .8rem;
  border: 2px solid var(--line2);
  border-radius: .8rem;
  background: linear-gradient(120deg, #1c2348, #101431);
  text-align: left;
}

.service:disabled { opacity: .45; }
.service-icon { font-size: 1.8rem; }
.service-copy { flex: 1; display: grid; }
.service-copy strong { font: italic 900 1.05rem var(--head); letter-spacing: .02em; }
.service-copy small { color: var(--muted); font-size: .78rem; }

.rest-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: .8rem calc(var(--sar) + .8rem) calc(var(--sab) + .8rem) calc(var(--sal) + .8rem);
}

.rest-scene {
  position: relative;
  isolation: isolate;
  height: min(100%, 30rem);
  align-self: center;
}

.rest-cook {
  position: absolute;
  right: 6%;
  bottom: 12%;
  width: min(66%, 55vh);
  aspect-ratio: 1;
}

.rest-cook::before, .rest-bowl::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 16%;
  right: 16%;
  bottom: 5%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent);
}

.rest-bowl::before { left: 8%; right: 8%; bottom: -2%; height: 12%; }

.rest-bowl {
  position: absolute;
  left: 4%;
  bottom: 4%;
  width: min(52%, 40vh);
}

.noodle-img {
  display: block;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .6));
}

.photo-fallback.noodle-img {
  font-size: 5rem;
  text-align: center;
}

.steam {
  position: absolute;
  left: 30%;
  right: 30%;
  top: -8%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}

.steam i {
  width: .5rem;
  height: 2.4rem;
  border-radius: 99px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .55), transparent);
  filter: blur(3px);
  animation: steam 2.2s ease-in infinite;
}

.steam i:nth-child(2) { animation-delay: -.7s; }
.steam i:nth-child(3) { animation-delay: -1.4s; }

@keyframes steam {
  from { transform: translateY(20px) scaleY(.6); opacity: 0; }
  40% { opacity: 1; }
  to { transform: translateY(-30px) scaleY(1.3); opacity: 0; }
}

.rest-panel {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-height: 100%;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(165deg, rgba(34, 42, 76, .96), rgba(14, 18, 38, .97));
}

.rest-panel > * { flex: none; }

.rest-panel h1, .event-panel h1, .treasure-body h1 {
  font-size: clamp(1.7rem, 6.5vw, 2.8rem);
  text-transform: uppercase;
  padding-right: .15em;
}

.rest-panel > p { margin: 0; color: var(--muted); }

.rest-hp {
  display: flex;
  align-items: center;
  gap: .6rem;
  font: 800 .8rem var(--body);
}

.rest-hp .bar {
  position: relative;
  flex: 1;
  height: 1rem;
  overflow: hidden;
  border: 2px solid #05060e;
  border-radius: 6px;
  background: #2b1020;
}

.rest-hp .bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

.bar-fill { background: linear-gradient(180deg, #ff7a8a, #d71f48); }
.bar-gain { background: repeating-linear-gradient(45deg, #5ee06f, #5ee06f 5px, #3fbf53 5px, #3fbf53 10px); opacity: .8; }

.rest-choices {
  display: grid;
  gap: .7rem;
}

.big-choice {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 72px;
  padding: .7rem .9rem;
  border: 2px solid;
  border-radius: .9rem;
  background: linear-gradient(120deg, #1d254b, #11152f);
  text-align: left;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
  transition: transform .1s;
}

.big-choice:not(:disabled):hover { transform: translate(-2px, -2px); }
.big-choice:not(:disabled):active { transform: translate(2px, 2px); }
.big-choice:disabled { opacity: .45; }
.big-choice.eat { border-color: #7ee896; }
.big-choice.train { border-color: var(--cyan); }
.bc-icon { font-size: 2.4rem; }
.big-choice strong { display: block; font: italic 900 1.35rem var(--head); text-transform: uppercase; }
.big-choice small { color: var(--muted); font-size: .82rem; }

html[data-orient="portrait"] .rest-body {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
}

html[data-orient="portrait"] .rest-scene { width: 100%; height: min(100%, 108vw); pointer-events: none; }
html[data-orient="portrait"] .rest-cook { width: auto; height: 96%; right: 8%; bottom: calc(-8.6% - 20px); }
html[data-orient="portrait"] .rest-bowl { width: min(46%, 22vh); bottom: -22px; }

.short .rest-panel { padding: .6rem; gap: .4rem; }
.short .rest-panel > p { display: none; }
.short .big-choice { min-height: 52px; padding: .35rem .7rem; }
.short .bc-icon { font-size: 1.6rem; }

.treasure-body { gap: .9rem; }

.chest {
  position: relative;
  width: clamp(130px, 40vmin, 240px);
  aspect-ratio: 1.35;
  margin: .4rem auto;
}

.chest-base, .chest-lid {
  position: absolute;
  left: 4%;
  right: 4%;
  border: 4px solid #1d0f06;
  background: linear-gradient(180deg, #c9732b, #8a4416);
}

.chest-base {
  bottom: 0;
  height: 54%;
  border-radius: 8px 8px 14px 14px;
}

.chest-lid {
  bottom: 50%;
  height: 40%;
  border-radius: 60px 60px 6px 6px;
  background: linear-gradient(180deg, #f3a44a, #b0601f);
  transform-origin: 50% 100%;
  z-index: 2;
}

.chest-base::before, .chest-lid::before, .chest-base::after, .chest-lid::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10%;
  background: linear-gradient(90deg, #ffe7a0, #d79a22);
  border: 2px solid #3a2204;
}

.chest-base::before, .chest-lid::before { left: 14%; }
.chest-base::after, .chest-lid::after { right: 14%; }

.chest-base i {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 18%;
  height: 40%;
  margin-left: -9%;
  border: 3px solid #3a2204;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 55%, #3a2204 18%, #ffd84d 22%);
  z-index: 3;
}

.chest-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 42%;
  height: 60%;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 100%, #fff6b0, rgba(255, 214, 80, .45) 40%, transparent 70%);
}

.chest-button { transition: transform .12s; }
.chest-button .chest { animation: chest-wobble 2.2s ease-in-out infinite; }
.chest-button:hover { transform: scale(1.05); }

@keyframes chest-wobble {
  0%, 80%, 100% { transform: rotate(0); }
  84% { transform: rotate(-5deg); }
  88% { transform: rotate(5deg); }
  92% { transform: rotate(-3deg); }
}

.chest.open .chest-lid {
  animation: lid-open .5s cubic-bezier(.2, 1.5, .4, 1) forwards;
}

.chest.open .chest-glow { animation: glow-up .5s .2s forwards; }
.chest.open { width: clamp(90px, 26vmin, 170px); }

@keyframes lid-open {
  to { transform: translateY(-30%) scaleY(.55) rotate(-4deg); }
}

@keyframes glow-up { to { opacity: 1; } }

.pop-in { animation: pop-in .4s .25s both; }
.treasure-body .relic-tile { width: min(100%, 32rem); }

.event-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1rem;
  width: min(100%, 78rem);
  margin: 0 auto;
  padding: .8rem calc(var(--sar) + .8rem) calc(var(--sab) + .8rem) calc(var(--sal) + .8rem);
}

.event-scene {
  position: relative;
  min-height: 0;
  overflow: hidden;
  align-self: center;
  width: 100%;
  height: min(100%, 34rem);
  border: 3px solid var(--line2);
  border-radius: 1rem;
  background-size: cover;
  background-position: center bottom;
  image-rendering: pixelated;
}

.event-actor {
  position: absolute;
  left: 50%;
  bottom: 3%;
  height: 80%;
  max-width: 96%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  animation: hero-bob 2.4s ease-in-out infinite;
}

.event-actor.creature { height: 68%; }

.event-panel {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-height: 0;
  max-height: 100%;
  align-self: center;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(165deg, rgba(34, 42, 76, .96), rgba(14, 18, 38, .97));
}

.event-panel > * { flex: none; }

.event-text {
  margin: 0;
  font-size: 1rem;
}

.event-text.result {
  color: #fff3c6;
  font-size: 1.1rem;
}

.event-choices {
  display: grid;
  gap: .6rem;
  margin-top: .25rem;
}

.event-choice {
  display: grid;
  gap: .1rem;
  min-height: 52px;
  padding: .55rem .8rem;
  border: 2px solid var(--line2);
  border-left: 6px solid var(--yellow);
  border-radius: .6rem;
  background: linear-gradient(110deg, #222b55, #121736);
  text-align: left;
  transition: transform .1s, border-color .1s;
}

.event-choice:not(:disabled):hover { transform: translateX(4px); border-color: var(--yellow); }
.event-choice.mini { border-left-color: var(--pink); }
.event-choice:disabled { opacity: .45; border-left-color: var(--dim); }
.event-choice strong { font: italic 900 1.08rem/1.15 var(--head); letter-spacing: .02em; }
.event-choice small { color: var(--muted); font-size: .8rem; }

.mini-tag {
  display: inline-block;
  margin-left: .5rem;
  padding: 0 .4rem;
  border-radius: 4px;
  background: var(--pink);
  color: #fff;
  font: 800 .6rem/1.6 var(--mono);
  vertical-align: middle;
  font-style: normal;
}

.event-log {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-log li {
  padding: .25rem .65rem;
  border: 1px solid;
  border-radius: 99px;
  background: #0a0d22;
  font-size: .8rem;
  font-weight: 800;
  animation: pop-in .35s both;
}

.event-log li.good { color: var(--lime); }
.event-log li.bad { color: #ff8fa2; }

html[data-orient="portrait"] .event-body {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 30%) minmax(0, 1fr);
}

html[data-orient="portrait"] .event-scene { height: 100%; }
html[data-orient="portrait"] .event-panel { align-self: start; }

.short .event-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); padding-top: .4rem; padding-bottom: .4rem; }
.short .event-panel { padding: .6rem .7rem; gap: .4rem; }
.short .event-panel .eyebrow { display: none; }
.short .event-text { font-size: .88rem; }
.short .event-choice { min-height: 42px; padding: .3rem .6rem; }

.end-body {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  align-content: safe center;
  align-items: center;
  gap: 1.2rem;
  overflow-y: auto;
  padding: calc(var(--sat) + 1rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1.4rem) calc(var(--sal) + 1rem);
}

.end-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.end-title {
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  text-transform: uppercase;
  padding: 0 .1em;
  animation: logo-slam .6s cubic-bezier(.2, 1.4, .4, 1) both;
}

.end.won .end-title { color: var(--yellow); text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 rgba(0, 0, 0, .55); }
.end.lost .end-title { color: #c9d4ff; text-shadow: 5px 5px 0 #3b3f7a, 10px 10px 0 rgba(0, 0, 0, .55); }

.end-sub { color: var(--muted); }

.end-sprite {
  width: min(80%, 24rem, 46vh);
  aspect-ratio: 1;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .55));
}

.end.lost .end-sprite { filter: grayscale(.75) brightness(.75); transform: rotate(-6deg); }

.end-quote {
  position: relative;
  max-width: 24rem;
  margin: .2rem 0 0;
  padding: .55rem .9rem;
  border-radius: 1rem;
  background: #fffdf0;
  color: #17131f;
  font-weight: 800;
}

.end-loser { color: var(--muted); font-style: italic; font-size: .85rem; }

.end-panel {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(165deg, rgba(34, 42, 76, .95), rgba(14, 18, 38, .97));
}

.end-score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: .5rem;
  text-align: center;
}

.end-score small { width: 100%; color: var(--cyan); font: 800 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.end-score-value { font: italic 900 clamp(2.6rem, 8vw, 4rem)/1 var(--head); color: #fff; text-shadow: 3px 3px 0 var(--pink); padding-right: .1em; }
.end-score span { color: var(--muted); font-weight: 800; }
.end-score em { padding: .1rem .5rem; border-radius: 4px; background: var(--lime); color: #0d1a05; font: italic 900 .9rem var(--head); }

.end-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}

.end-stats div {
  display: grid;
  padding: .4rem .25rem;
  border-radius: .55rem;
  background: rgba(7, 10, 24, .7);
  text-align: center;
}

.end-stats b { font: italic 900 1.3rem var(--head); color: var(--yellow); }
.end-stats span { color: var(--muted); font-size: .62rem; }

.end-path {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
}

.end-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.share-title { font-size: 1.1rem; text-transform: uppercase; color: var(--cyan); }

.end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem;
  padding-top: .2rem;
}

.duel-end-actions { flex-direction: column; align-items: center; }

html[data-orient="portrait"] .end-body { grid-template-columns: minmax(0, 1fr); align-content: start; }
html[data-orient="portrait"] .end-sprite { width: min(64%, 17rem, 23vh); }

.short .end-title { font-size: 2.2rem; }
.short .end-body { align-items: start; align-content: start; padding-top: calc(var(--sat) + .5rem); }
.short .end-hero { position: sticky; top: 0; }
.short .end-sprite { width: min(60%, 32vh); }
.short .end-quote { font-size: .8rem; padding: .35rem .7rem; }
.short .end-sub { display: none; }

.binder-body { padding-top: .6rem; }
.binder-body > * { width: min(100%, 86rem); margin-left: auto; margin-right: auto; }

.binder-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .55rem;
}

.binder-owners {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding: 3px 3px 8px;
  scrollbar-width: thin;
}

.owner-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 4.4rem;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: .6rem;
}

.owner-chip.on { border-color: var(--fc, var(--yellow)); background: color-mix(in srgb, var(--fc, var(--yellow)) 22%, #0c1029); }

.owner-face {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
  background: #141a38;
}

.owner-text { font-size: 1.4rem; }

.owner-name {
  max-width: 100%;
  overflow: hidden;
  font-size: .62rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-name.long, .owner-name.long {
  overflow-wrap: anywhere;
  font-size: .55rem;
  line-height: 1.15;
  letter-spacing: -.01em;
  white-space: normal;
}

.binder-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
}

.binder-tools .search { flex: 1 1 12rem; width: auto; }
.binder-count { color: var(--dim); font: 800 .72rem var(--mono); }

.binder-chip-rows { display: grid; gap: .35rem; }

.binder-chips {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.binder-chips::-webkit-scrollbar { display: none; }

.fchip {
  flex: none;
  min-height: 40px;
  padding: 0 .8rem;
  border: 1px solid var(--line2);
  border-radius: 99px;
  background: rgba(10, 14, 33, .85);
  color: var(--c, var(--muted));
  font: 800 .72rem var(--mono);
}

.fchip.on { border-color: var(--c, var(--yellow)); background: var(--c, var(--yellow)); color: #11131f; }

.binder-lore {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: .7rem !important;
  padding: .8rem;
  border-left: 5px solid var(--fc, var(--cyan));
  border-radius: .3rem .9rem .9rem .3rem;
  background: linear-gradient(110deg, color-mix(in srgb, var(--fc, #56d8e8) 16%, #121733), #0d1127);
  font-size: .86rem;
}

.binder-lore.hidden { display: none; }
.lore-sprite { flex: none; width: clamp(84px, 22vw, 210px); aspect-ratio: 1; }
.lore-copy { min-width: 0; }
.lore-copy h2 { font-size: 1.7rem; color: var(--fc); }
.lore-story { color: #ffeeb8; }

.stack .binder-lore { flex-direction: column; align-items: center; }
.stack .lore-sprite { width: 44vw; }
.stack .lore-copy { width: 100%; }

.binder-grid { margin-top: .8rem !important; }
.binder-sentinel { height: 2px; }

.howto-block { margin-bottom: 1.2rem; }
.howto-block h3 { margin-bottom: .35rem; color: var(--yellow); font-size: 1.3rem; text-transform: uppercase; }
.howto-block p { margin: .3rem 0; }
.howto .glossary { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

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

.keys div { display: flex; align-items: center; gap: .6rem; }

kbd {
  min-width: 2.6rem;
  padding: .2rem .45rem;
  border: 1px solid var(--line2);
  border-bottom-width: 3px;
  border-radius: .35rem;
  background: #0a0d22;
  font: 800 .75rem var(--mono);
  text-align: center;
}

.settings-panel { display: grid; }

.setting {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(0, 1.6fr) 3.2rem;
  align-items: center;
  gap: .5rem .9rem;
  min-height: 58px;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}

.setting label { display: flex; align-items: center; gap: .45rem; font-weight: 800; }
.setting input[type="range"] { width: 100%; height: 40px; accent-color: var(--yellow); }
.setting output { color: var(--muted); font: 800 .75rem var(--mono); text-align: right; }
.setting .segmented { grid-column: 2 / -1; }

.setting-toggle { grid-template-columns: minmax(0, 1fr) auto; cursor: pointer; }
.setting-toggle > span:first-child { display: grid; font-weight: 800; }
.setting-toggle small { color: var(--muted); font-weight: 500; }

.setting-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  border-bottom: 0;
  padding-top: .9rem;
}

.setting-note { color: #ffc878; font-size: .82rem; }
.credit { color: var(--dim); font-size: .72rem; text-align: center; margin-top: 1rem; }

.crash-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; text-align: center; }
.crash-body h1 { font-size: 3rem; color: var(--yellow); }
.crash-detail { max-width: 36rem; color: var(--dim); font: 600 .75rem var(--mono); }

.modal-fighter .modal-box { width: min(100%, 36rem); }
.fighter-sheet .hero-title { margin-bottom: .4rem; }

.modal-game .modal-box { width: min(100%, 32rem); }

.minigame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  text-align: center;
}

.timing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  width: 100%;
}

.timing-track {
  position: relative;
  width: 100%;
  height: 3.4rem;
  overflow: hidden;
  border: 3px solid #05060e;
  border-radius: 1rem;
  background: linear-gradient(180deg, #2a1330, #161036);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15);
  cursor: pointer;
  touch-action: none;
}

.timing-zone, .timing-perfect {
  position: absolute;
  top: 0;
  bottom: 0;
}

.timing-zone { background: rgba(110, 224, 138, .5); }
.timing-perfect { background: repeating-linear-gradient(45deg, #d8ff8a, #d8ff8a 4px, #a6ec55 4px, #a6ec55 8px); }

.timing-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 9px;
  margin-left: -4.5px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 14px #fff, 0 0 0 2px #000;
}

.timing-verdict {
  min-height: 1.5em;
  font: italic 900 1.3rem var(--head);
  letter-spacing: .03em;
}

.timing.ok .timing-verdict { color: var(--yellow); animation: pop-in .3s; }
.timing.bad .timing-verdict { color: #ff8095; animation: pop-in .3s; }

.noodle-steps {
  display: flex;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.noodle-steps li {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--line2);
  border-radius: 50%;
  background: #0c1029;
  font-size: 1.4rem;
  filter: grayscale(.7);
}

.noodle-steps li.now { border-color: var(--yellow); filter: none; animation: tap-pulse .9s infinite; }
.noodle-steps li.good { border-color: var(--lime); filter: none; }
.noodle-steps li.okay { border-color: var(--yellow); filter: none; }
.noodle-steps li.bad { border-color: var(--pink); filter: none; }

.noodle-pic {
  position: relative;
  width: min(70%, 15rem);
  height: min(24vh, 12rem);
  display: grid;
  place-items: center;
}

.noodle-pic .noodle-img { height: 100%; }
.noodle-title { font-size: 1.35rem; text-transform: uppercase; }
.noodle-slot { display: flex; flex-direction: column; align-items: center; gap: .7rem; width: 100%; }

.meter-big {
  position: relative;
  width: 100%;
  height: 2.2rem;
  overflow: hidden;
  border: 2px solid #05060e;
  border-radius: 99px;
  background: #161036;
}

.meter-big i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--pink), var(--yellow), var(--lime)); }
.meter-big b { position: relative; display: block; font: italic 900 1.3rem/1.95rem var(--head); text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }

.big-gain { font: italic 900 3rem var(--head); color: var(--lime); text-shadow: 3px 3px 0 #000; animation: logo-slam .5s; }

.claw-glass {
  position: relative;
  width: 100%;
  height: min(40vh, 18rem);
  overflow: hidden;
  border: 5px solid var(--pink);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 30%), linear-gradient(180deg, #1c1250, #31196a);
}

.claw-rail { position: absolute; left: 0; right: 0; top: 6px; height: 8px; background: linear-gradient(#dfe4ff, #6670a8); }

.claw-arm {
  position: absolute;
  top: 8px;
  left: 6%;
  width: 0;
  height: 100%;
  z-index: 3;
  transition: left .6s ease-in-out;
}

.claw-glass .claw-arm:not(.down):not(.closed) { transition: none; }

.claw-cable {
  position: absolute;
  left: -2px;
  top: 0;
  width: 4px;
  height: 14%;
  background: #c9d0f0;
  transition: height .65s ease-in-out;
}

.claw-head {
  position: absolute;
  left: -24px;
  top: 14%;
  width: 48px;
  height: 36px;
  transition: top .65s ease-in-out;
}

.claw-head i {
  position: absolute;
  top: 0;
  left: 20px;
  width: 8px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(#f0f3ff, #8890c8);
  border: 1px solid #222;
  transform-origin: 50% 0;
  transition: transform .25s;
}

.claw-head i:nth-child(1) { transform: rotate(38deg); }
.claw-head i:nth-child(3) { transform: rotate(-38deg); }
.claw-head::before { content: ""; position: absolute; top: -6px; left: 12px; width: 24px; height: 12px; border-radius: 6px; background: #ffd84d; border: 2px solid #3a2204; }
.claw-arm.closed .claw-head i:nth-child(1) { transform: rotate(14deg); }
.claw-arm.closed .claw-head i:nth-child(3) { transform: rotate(-14deg); }
.claw-arm.down .claw-cable { height: 56%; }
.claw-arm.down .claw-head { top: 56%; }

.prize {
  position: absolute;
  z-index: 2;
  bottom: 5%;
  width: 14%;
  min-width: 46px;
  aspect-ratio: 1;
  transform: translateX(-50%);
  overflow: hidden;
  border: 3px solid var(--fc);
  border-radius: 40% 40% 30% 30%;
  background: color-mix(in srgb, var(--fc) 45%, #160f36);
  box-shadow: 0 6px 10px rgba(0, 0, 0, .5);
  transition: left .6s ease-in-out, bottom .65s ease-in-out;
}

.prize.grabbed { bottom: 62%; z-index: 4; }
.prize.slip { animation: slip .75s ease-in; }
.prize.dropped { bottom: -30%; }

@keyframes slip {
  30% { bottom: 30%; }
  55% { bottom: 28%; transform: translateX(-50%) rotate(25deg); }
  100% { bottom: 5%; }
}

.claw-chute { position: absolute; left: 0; bottom: 0; width: 15%; height: 28%; border-right: 4px dashed rgba(255, 255, 255, .4); border-top: 4px dashed rgba(255, 255, 255, .4); }
.claw-msg { min-height: 1.4em; font: italic 900 1.15rem var(--head); }
.claw-msg.good, .rip-msg.good { color: var(--lime); }
.claw-msg.bad, .rip-msg.bad { color: #ff8095; }

.rip-screen { position: relative; width: 100%; }

.rip-chart {
  display: block;
  width: 100%;
  height: min(38vh, 17rem);
  border: 3px solid #05060e;
  border-radius: 1rem;
  background: radial-gradient(ellipse at 50% 100%, rgba(86, 216, 232, .14), transparent 70%), #070a18;
}

.rip-mult {
  position: absolute;
  top: .4rem;
  left: 0;
  right: 0;
  font: italic 900 clamp(2.4rem, 10vw, 3.6rem) var(--head);
  color: var(--lime);
  text-shadow: 3px 3px 0 #000;
}

.rip-mult.down { color: #ffb36c; }
.rip-mult.sold { color: var(--yellow); }
.rip-mult.crashed:not(.sold) { color: var(--pink); animation: nope .4s; }
.rip-msg { min-height: 2.6em; font-weight: 800; }

@keyframes nope {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.short .claw-glass { height: 36vh; }
.short .rip-chart { height: 34vh; }
.short .noodle-pic { height: 18vh; }
.short .modal-game .modal-head { padding-top: .3rem; }
.short .minigame { gap: .35rem; }
.short .btn-huge { min-height: 44px; font-size: 1.15rem; }

.modal-result .modal-box { width: min(100%, 24rem); }

.pass-wrap { background: radial-gradient(circle at 50% 30%, #252c52, #070916 75%); animation: none; }
.pass-wrap .modal-box { width: min(100%, 30rem); background: transparent; border: 0; box-shadow: none; }

.pass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  text-align: center;
}

.pass h2 { font-size: clamp(1.8rem, 8vw, 3rem); text-transform: uppercase; color: var(--fc); text-shadow: 3px 3px 0 #000; padding-right: .1em; }
.pass-sprite { width: min(70%, 18rem, 40vh); aspect-ratio: 1; }
.pass p { color: var(--muted); }

.battle {
  --cw: 110px;
  --me: #56d8e8;
  --side: clamp(118px, 15.5vw, 260px);
  display: grid;
  overflow: hidden;
  overflow: clip;
  background: #070916;
}

.battle.is-portrait {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "top top" "stage stage" "res ult" "hand hand" "left right";
}

.battle.is-landscape {
  grid-template-columns: calc(var(--side) + var(--sal)) minmax(0, 1fr) calc(var(--side) + var(--sar));
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "top top top" "stage stage stage" "res hand ult" "left hand right";
}

.b-arena {
  position: absolute;
  z-index: -3;
  left: 0;
  right: 0;
  top: 0;
  height: 70%;
  background-size: cover;
  background-position: center bottom;
  image-rendering: pixelated;
}

.b-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5, 6, 16, .55), transparent 16%, transparent 52%, rgba(5, 6, 16, .35) 64%, rgba(7, 9, 22, .96) 80%),
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(4, 5, 14, .55));
  pointer-events: none;
}

.b-ground {
  position: absolute;
  z-index: -1;
  left: -20%;
  right: -20%;
  top: 60%;
  height: 20%;
  overflow: hidden;
  pointer-events: none;
  perspective: 300px;
}

.b-ground::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(86, 216, 232, .16) 0 2px, transparent 2px 56px),
    repeating-linear-gradient(180deg, rgba(86, 216, 232, .13) 0 2px, transparent 2px 26px);
  transform-origin: 50% 0;
  transform: rotateX(48deg) scaleY(1.6);
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0, transparent 85%);
}

.tall-stage .b-ground { border-top: 2px solid rgba(86, 216, 232, .3); background: linear-gradient(180deg, rgba(8, 10, 28, .55), rgba(8, 10, 28, .15)); }

.b-top {
  grid-area: top;
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  padding: calc(var(--sat) + 4px) calc(var(--sar) + 6px) 4px calc(var(--sal) + 6px);
  background: linear-gradient(180deg, rgba(7, 9, 22, .9), rgba(7, 9, 22, .55));
}

.b-menu { height: 40px; min-width: 40px; }

.b-turn {
  flex: none;
  display: grid;
  justify-items: center;
  min-width: 2.7rem;
  padding: 1px 4px;
  border-radius: .45rem;
  background: rgba(7, 10, 26, .8);
}

.b-turn small { color: var(--cyan); font: 800 .52rem/1.4 var(--mono); letter-spacing: .12em; }
.b-turn b { font: italic 900 1.25rem/1 var(--head); }

.b-arena-chip {
  flex: 0 1 auto;
  display: grid;
  min-width: 0;
  min-height: 40px;
  align-content: center;
  padding: 2px .6rem;
  border-left: 3px solid var(--cyan);
  border-radius: .3rem .45rem .45rem .3rem;
  background: rgba(7, 10, 26, .75);
  text-align: left;
}

.b-arena-chip b { overflow: hidden; font: italic 900 .92rem/1.1 var(--head); letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; padding-right: .15em; }
.b-arena-chip small { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }

.b-relics {
  flex: 1;
  display: flex;
  gap: .3rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.b-relics::-webkit-scrollbar { display: none; }
.b-relics > :first-child { margin-left: auto; }
.b-relics .relic-chip { width: 40px; height: 40px; font-size: 1.15rem; }
.b-relics:not(:empty) { min-width: 44px; }
.b-relics .relic-all { position: relative; display: none; }
.b-relics .relic-all b { position: absolute; right: 1px; bottom: 0; color: var(--yellow); font: 900 .66rem/1 var(--mono); text-shadow: 0 0 3px #000, 0 0 3px #000; }
.b-relics.stacked > .relic-chip { display: none; }
.b-relics.stacked > .relic-all { display: grid; margin-left: auto; place-items: center; }

.b-speed {
  flex: none;
  min-width: 42px;
  height: 40px;
  padding: 0 .35rem;
  border: 1px solid var(--line2);
  border-radius: .55rem;
  background: rgba(11, 15, 34, .85);
  color: var(--yellow);
  font-size: .62rem;
  letter-spacing: -.08em;
}

.b-stage {
  grid-area: stage;
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0 var(--sar) 0 var(--sal);
}

.unit {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

.unit-body {
  position: relative;
  width: var(--size);
  height: var(--size);
  pointer-events: auto;
}

.unit-body:focus-visible { outline: none; }
.unit-body:focus-visible .target-ring { opacity: 1; }

.unit-shadow {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -1%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .68), transparent 68%);
}

.tall .unit.side-1 .unit-shadow {
  left: 8%;
  right: 8%;
  height: 13%;
  bottom: -4%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .75) 30%, rgba(86, 216, 232, .22) 55%, transparent 72%);
}

.unit-sprite {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.unit-bob {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  animation: idle-bob 2.5s ease-in-out infinite;
}

.unit-bob > * { width: 100%; height: 100%; }

@keyframes idle-bob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-1.6%) scale(.995, 1.012); }
}

.is-creature .unit-bob { animation-duration: 1.9s; }

.unit-body.flash .unit-bob { filter: brightness(2.6) saturate(.35) drop-shadow(0 0 10px #fff); }
.unit-body.guard .unit-bob { filter: brightness(1.3) drop-shadow(0 0 12px #6fd0ff); }
.unit-body.morph .unit-bob { animation: morph .55s ease-in-out; }

@keyframes morph {
  0% { filter: brightness(1); transform: scale(1); }
  30% { filter: brightness(5) saturate(0); transform: scale(1.15, .9); }
  55% { filter: brightness(5) saturate(0); transform: scale(.85, 1.2) rotate(6deg); }
  100% { filter: brightness(1); transform: scale(1); }
}

.unit.acting .unit-bob { filter: drop-shadow(0 0 14px #ff5a6e); }

.unit.dead .unit-body { pointer-events: none; }
.unit.gone .unit-sprite { visibility: hidden; }
.unit.gone .plate { opacity: .35; filter: grayscale(1); }
.unit.gone .unit-shadow { opacity: 0; }

.target-ring {
  --c: var(--yellow);
  position: absolute;
  inset: 8% 6% 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) left top / 20px 4px,
    linear-gradient(var(--c) 0 0) left top / 4px 20px,
    linear-gradient(var(--c) 0 0) right top / 20px 4px,
    linear-gradient(var(--c) 0 0) right top / 4px 20px,
    linear-gradient(var(--c) 0 0) left bottom / 20px 4px,
    linear-gradient(var(--c) 0 0) left bottom / 4px 20px,
    linear-gradient(var(--c) 0 0) right bottom / 20px 4px,
    linear-gradient(var(--c) 0 0) right bottom / 4px 20px;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 3px #000);
  transition: opacity .15s, inset .15s;
}

.unit.targetable .target-ring { opacity: .55; animation: ring-pulse 1.1s ease-in-out infinite; }
.unit.targeted .target-ring { --c: #ff5a6e; opacity: 1; inset: 4% 2% -2%; animation: ring-pulse .8s ease-in-out infinite; }
.unit.self-target .target-ring { --c: var(--cyan); opacity: .9; }
.unit.targetable { cursor: crosshair; }

@keyframes ring-pulse {
  50% { transform: scale(1.04); }
}

.intent {
  --ic: #ff6b6b;
  position: absolute;
  z-index: 3;
  left: calc(var(--size) / 2);
  top: calc(var(--size) * .03 - 20px);
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  min-width: 46px;
  min-height: 40px;
  justify-content: center;
  padding: .1rem .5rem;
  border: 2px solid var(--ic);
  border-radius: 99px;
  background: rgba(10, 12, 32, .9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
  color: #fff;
  font: italic 900 1.15rem/1 var(--head);
  letter-spacing: .03em;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: auto;
  animation: intent-float 1.9s ease-in-out infinite;
}

.intent.hidden { display: none; }
.unit.side-1.kind-enemy:not(.is-creature) .intent { top: calc(var(--size) * .1 - 40px); }
.intent .ico { font-size: 1.15em; }
.intent b { padding-right: .1em; }
.intent-extra { font-size: .82em; }
.intent.used { opacity: .35; }
.intent.pop-in { animation: pop-in .35s cubic-bezier(.2, 1.5, .5, 1), intent-float 1.9s ease-in-out .35s infinite; }
.intent-attack, .intent-attack-block, .intent-attack-buff, .intent-attack-debuff { --ic: #ff6b6b; background: rgba(54, 10, 22, .92); }
.intent-block { --ic: #5cc8ff; }
.intent-buff { --ic: #ffd75a; }
.intent-debuff { --ic: #c492ff; }
.intent-special { --ic: #9aff55; }
.intent-stun { --ic: #8a93a8; }
.intent.big { font-size: 1.4rem; }
.intent.big::after { content: "!"; color: #ffe25d; }

@keyframes intent-float {
  50% { margin-top: -5px; }
}

.plate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  padding-top: 2px;
  pointer-events: auto;
  cursor: help;
  text-align: center;
}

.plate-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-width: 0;
  font: italic 900 .86rem/1.1 var(--head);
  letter-spacing: .03em;
  text-shadow: 0 1px 0 #000, 0 0 4px #000;
  text-transform: uppercase;
}

.plate-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: .15em; }
.plate-tag { flex: none; padding: 0 .3rem; border-radius: 3px; background: var(--fc, var(--cyan)); color: #11131f; font: 900 .58rem/1.5 var(--mono); font-style: normal; text-shadow: none; }

.hpbar {
  position: relative;
  height: 1.05rem;
  border: 1.5px solid #05060e;
  border-radius: 5px;
  background: rgba(36, 10, 22, .88);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

.hp-ghost, .hp-fill {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  transform-origin: left center;
}

.hp-ghost { background: #ffe9a0; transition: transform .55s ease-in .22s; }
.hp-fill { background: linear-gradient(180deg, #ff8794, #df2250 60%, #b3143f); transition: transform .16s ease-out; }
.side-0 .hp-fill { background: linear-gradient(180deg, #8dff9a, #2fbf4e 60%, #1f8f3a); }
.unit.low .hp-fill { background: linear-gradient(180deg, #ffb35e, #e2531f); animation: low-hp .9s ease-in-out infinite; }

@keyframes low-hp { 50% { filter: brightness(1.45); } }

.hp-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 900 .7rem/1 var(--body);
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  white-space: nowrap;
}

.block-badge {
  position: absolute;
  z-index: 2;
  left: -.55rem;
  top: 50%;
  display: none;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  transform: translateY(-50%);
  font-size: .78rem;
}

.block-badge .ico { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 1.75rem; color: #5cc8ff; }
.block-badge span { position: relative; font: 900 .78rem/1 var(--body); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 0 #000; }
.has-block .block-badge { display: grid; }
.has-block .hpbar { border-color: #66ccff; box-shadow: 0 0 0 2px rgba(102, 204, 255, .8), 0 0 10px rgba(102, 204, 255, .6); }
.block-badge.pop-in { animation: badge-pop .35s cubic-bezier(.2, 1.7, .5, 1); }

@keyframes badge-pop {
  from { transform: translateY(-50%) scale(1.8); }
  to { transform: translateY(-50%) scale(1); }
}

.statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 2px;
  max-height: 1.5rem;
  overflow: hidden;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 1.45rem;
  min-width: 1.75rem;
  padding: 0 .2rem;
  border: 1.5px solid rgba(86, 216, 232, .75);
  border-radius: .4rem;
  background: rgba(11, 14, 36, .9);
  font: 900 .7rem/1 var(--body);
  animation: pop-in .3s cubic-bezier(.2, 1.5, .5, 1);
}

.chip .ico { font-size: .98rem; }
.chip-debuff { border-color: rgba(255, 96, 140, .85); }
.chip-power { border-color: var(--yellow); color: var(--yellow); }
.chip.overflow { display: none; }
.chip-more { border-color: var(--line2); }

@media (pointer: coarse) {
  .chip:not(.chip-more):not(.chip-power) { pointer-events: none; }
}

.chip-meter { border-color: rgba(255, 226, 93, .55); gap: 2px; }
.chip-meter .ico { font-size: 1.05rem; }
.chip-meter.full { background: var(--yellow); color: #15121f; }

.hud-res {
  position: relative;
  grid-area: res;
  justify-self: start;
  align-self: center;
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: calc(100% - 12px);
  min-height: 44px;
  margin: 2px 6px 2px calc(var(--sal) + 8px);
  padding: .2rem .65rem .2rem .3rem;
  border: 1px solid color-mix(in srgb, var(--me) 60%, transparent);
  border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--me) 24%, #0e1230), rgba(12, 16, 40, .92));
  text-align: left;
  min-width: 0;
}

.res-icon { flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(4, 6, 18, .75); font-size: 1.45rem; }
.res-copy { display: grid; grid-template-columns: minmax(0, auto); gap: 3px; min-width: 0; }
.res-name { display: flex; align-items: baseline; gap: .35rem; white-space: nowrap; }
.res-name b { overflow: hidden; font: italic 900 .92rem/1 var(--head); letter-spacing: .03em; text-transform: uppercase; text-overflow: ellipsis; padding-right: .15em; }
.res-name em { color: var(--yellow); font: 900 .8rem/1 var(--body); }
.res-pips { display: flex; gap: 3px; }
.res-pips i { flex: 0 1 auto; width: .62rem; min-width: 3px; height: .5rem; border-radius: 2px; background: #2a3158; transform: skewX(-15deg); transition: background .2s, box-shadow .2s; }
.res-pips i.on { background: var(--me); box-shadow: 0 0 6px var(--me); }
.res-bar { position: relative; display: block; width: 7.5rem; height: .45rem; overflow: hidden; border-radius: 3px; background: #2a3158; }
.res-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--me); box-shadow: 0 0 8px var(--me); transition: width .25s; }
.res-form { position: absolute; top: -.6rem; right: .5rem; padding: .08rem .5rem .1rem; border: 1.5px solid #05060e; border-radius: 99px; background: var(--me); color: #11131f; font: italic 900 .7rem/1.2 var(--head); text-transform: uppercase; white-space: nowrap; }

.hud-ult {
  grid-area: ult;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  padding: 2px calc(var(--sar) + 8px) 2px 4px;
}

.ult-orb {
  --p: 0;
  position: relative;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, var(--yellow) 0, var(--pink) calc(var(--p) * 1%), #262e57 calc(var(--p) * 1%));
  box-shadow: 0 0 0 2px #05060e, 0 4px 10px rgba(0, 0, 0, .5);
  transition: transform .12s;
}

.ult-core {
  position: absolute;
  inset: 5px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: #10142f;
  text-align: center;
  line-height: 1;
}

.ult-core b { font: italic 900 1.02rem var(--head); letter-spacing: .05em; color: #8790bd; padding-right: .1em; }
.ult-core small { color: var(--muted); font: 900 .62rem var(--body); }
.ult-orb.full .ult-core { background: radial-gradient(circle at 40% 30%, #fff7b0, #ffcc28 45%, #ff4d79); }
.ult-orb.full .ult-core b { color: #1a1020; font-size: 1.15rem; }
.ult-orb.full .ult-core small { color: #1a1020; }
.ult-orb.ready { animation: ult-ready 1s ease-in-out infinite; }
.ult-orb.ready::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(transparent 0 8%, rgba(255, 226, 93, .75) 12%, transparent 16% 33%, rgba(255, 77, 121, .7) 37%, transparent 41% 58%, rgba(86, 216, 232, .7) 62%, transparent 66% 83%, rgba(255, 226, 93, .75) 87%, transparent 91%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%);
  mask: radial-gradient(circle, transparent 60%, #000 62%);
  animation: spin 2.2s linear infinite;
}

.ult-orb.burst-once { animation: ult-burst .6s ease-out; }
.ult-orb.spent .ult-core { background: #1a1f3d; }
.ult-orb.spent .ult-core small { color: var(--yellow); }
.ult-name { display: none; min-width: 0; max-width: 100%; overflow: hidden; color: var(--muted); font: italic 900 .86rem/1.05 var(--head); text-align: right; text-transform: uppercase; padding-right: .15em; }

@keyframes ult-ready { 50% { transform: scale(1.1); } }
@keyframes ult-burst { 0% { transform: scale(1.6); filter: brightness(2); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

.hand {
  grid-area: hand;
  position: relative;
  min-width: 0;
}

.battle.row .hand {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: calc(var(--cw) * 1.4 + 22px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 10px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.battle.row .hand::-webkit-scrollbar { display: none; }
.battle.row .hand > :first-child { margin-left: auto; }
.battle.row .hand > :last-child { margin-right: auto; }
.battle.row .hand.more-right { -webkit-mask-image: linear-gradient(90deg, #000 84%, rgba(0, 0, 0, .25)); mask-image: linear-gradient(90deg, #000 84%, rgba(0, 0, 0, .25)); }
.battle.row .hand.more-left { -webkit-mask-image: linear-gradient(270deg, #000 84%, rgba(0, 0, 0, .25)); mask-image: linear-gradient(270deg, #000 84%, rgba(0, 0, 0, .25)); }
.battle.row .hand.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .25), #000 14%, #000 86%, rgba(0, 0, 0, .25)); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .25), #000 14%, #000 86%, rgba(0, 0, 0, .25)); }

.hand-card {
  position: relative;
  width: var(--cw);
  cursor: grab;
  outline: none;
}

.battle.row .hand-card {
  flex: 0 0 var(--cw);
  scroll-snap-align: center;
  touch-action: pan-x;
  transition: transform .16s cubic-bezier(.2, 1.4, .5, 1);
}

.battle.row .hand-card.selected { transform: translateY(-12px); }

.battle.fan .hand { height: calc(var(--cw) * 1.4 + 26px); }
.battle.fan.compact .hand { height: calc(var(--cw) * 1.4 + 14px); }
.battle.fan.compact .hand-card { top: 9px; }

.battle.fan .hand-card {
  position: absolute;
  left: 0;
  top: 14px;
  transform-origin: 50% 120%;
  touch-action: none;
  transition: transform .22s cubic-bezier(.2, .9, .3, 1.15);
}

.hand-card .card { width: 100%; transition: transform .16s cubic-bezier(.2, 1.2, .5, 1), filter .15s; transform-origin: 50% 100%; }

@media (hover: hover) {
  .battle.fan .hand-card:hover:not(.selected):not(.dragging) { z-index: 60 !important; }
  .battle.fan .hand-card:hover:not(.selected):not(.dragging) .card { transform: translateY(calc(var(--cw) * -.34)) scale(1.24); }
  .battle.row .hand-card:hover:not(.selected) .card { transform: translateY(-6px); }
}

.hand-card:focus-visible .card-face { outline: 3px solid var(--yellow); }
.hand-card.playable .card-face { box-shadow: 0 0 0 1.5px #05060e, 0 0 0 3.5px color-mix(in srgb, var(--me) 85%, #fff), 0 0 16px 3px color-mix(in srgb, var(--me) 60%, transparent); }
.hand-card.blocked .card { filter: brightness(.6) saturate(.55); }
.hand-card.combo .card-face { box-shadow: 0 0 0 1.5px #05060e, 0 0 0 4px #ff4d79, 0 0 20px 5px rgba(255, 77, 121, .75); }
.hand-card.selected .card-face { box-shadow: 0 0 0 1.5px #05060e, 0 0 0 4px var(--yellow), 0 0 22px 5px rgba(255, 226, 93, .65); }
.hand-card.selected .card { filter: none; }
.hand-card.dragging { opacity: .28; }

.combo-flag {
  position: absolute;
  z-index: 3;
  top: -9px;
  right: -4px;
  display: none;
  padding: 0 .45rem;
  border: 1.5px solid #14080f;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  color: #1a0b12;
  font: italic 900 .68rem/1.45 var(--head);
  letter-spacing: .06em;
  pointer-events: none;
  animation: combo-flag .7s ease-in-out infinite;
}

.hand-card.combo .combo-flag { display: block; }

@keyframes combo-flag { 50% { transform: translateY(-2px) scale(1.08); } }

.card.drawn { animation: card-drawn .38s cubic-bezier(.2, .9, .3, 1.2); }
.card.burning { animation: card-burn .4s ease-in forwards; }
.card.glow-once { animation: card-glow .7s ease-out; }
.card.nope { animation: nope .35s; }

@keyframes card-drawn {
  from { opacity: 0; transform: translate(-90%, 40%) rotate(-24deg) scale(.45); }
}

@keyframes card-burn {
  40% { filter: brightness(2.4) sepia(1) saturate(4) hue-rotate(-25deg); transform: translateY(-14px) scale(1.04); }
  100% { opacity: 0; filter: brightness(.2); transform: translateY(-36px) scale(.8) rotate(8deg); }
}

@keyframes card-glow {
  0% { filter: brightness(2.6); transform: scale(1.12); }
  100% { filter: none; }
}

.b-left {
  grid-area: left;
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: 3px 4px calc(var(--sab) + 7px) calc(var(--sal) + 8px);
}

.b-right {
  grid-area: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  min-width: 0;
  padding: 3px calc(var(--sar) + 10px) calc(var(--sab) + 7px) 4px;
}

.energy-orb {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 3px solid #05060e;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff9, transparent 34%), radial-gradient(circle, color-mix(in srgb, var(--me) 90%, #fff), color-mix(in srgb, var(--me) 55%, #0d1030) 70%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--me) 80%, transparent), 0 0 18px color-mix(in srgb, var(--me) 55%, transparent);
  color: #fff;
}

.energy-orb span { display: flex; align-items: baseline; font-family: var(--head); font-style: italic; font-weight: 900; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.energy-orb b { font-size: 1.75rem; line-height: 1; }
.energy-orb small { font-size: .95rem; }
.energy-orb.drained { filter: grayscale(.85) brightness(.75); }
.energy-orb.pulse-once { animation: orb-pulse .35s ease-out; }
.energy-orb.nope { animation: nope .35s; }

@keyframes orb-pulse { 40% { transform: scale(1.22); } }

.pile {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 52px;
  border-radius: .5rem;
}

.pile-art { display: grid; place-items: center; width: 28px; height: 36px; font-size: 1.5rem; color: var(--muted); }
.pile-back > * { width: 100%; height: 100%; }
.pile b { position: absolute; top: 0; right: 0; display: grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .2rem; border: 1.5px solid #05060e; border-radius: 99px; background: var(--ink); color: #10132a; font: 900 .72rem/1 var(--body); }
.pile small { color: var(--muted); font: 800 .52rem/1.2 var(--mono); text-transform: uppercase; white-space: nowrap; }
.pile-exhaust.unused { display: none; }
.pile.pulse-once, .hud-res.pulse-once { animation: orb-pulse .35s ease-out; }

.end-turn { min-width: 7.4rem; min-height: 50px; font-size: 1.1rem; }
.end-turn.pulse { animation: end-pulse .9s ease-in-out infinite; }
@keyframes end-pulse { 50% { transform: scale(1.07); filter: brightness(1.2); } }
.foe-turn .end-turn { filter: saturate(.4); }

.battle.is-landscape .hud-res { align-self: end; justify-self: start; margin-bottom: 2px; }
.battle.is-landscape .hud-ult { align-self: end; flex-direction: row; justify-content: flex-end; }
.battle.is-landscape .b-left { align-self: end; }
.battle.is-landscape .b-right { align-self: end; flex-wrap: nowrap; }
.battle.is-landscape .hand { grid-row: 3 / 5; align-self: end; }
.battle.is-landscape .res-pips i { width: .45rem; }

.battle.compact.is-landscape { --side: clamp(112px, 17vw, 170px); }
.battle.compact.is-landscape .res-icon { width: 1.8rem; height: 1.8rem; font-size: 1.15rem; }
.battle.compact.is-landscape .hud-res { min-height: 40px; padding-right: .45rem; gap: .35rem; }
.battle.compact.is-landscape .res-name b { font-size: .78rem; max-width: 5.2rem; }
.battle.compact.is-landscape .res-pips { gap: 1px; }
.battle.compact.is-landscape .res-pips i { width: .34rem; height: .36rem; }
.battle.compact.is-landscape .res-bar { width: 4.4rem; }
.battle.compact.is-landscape .res-form { font-size: .58rem; top: -.5rem; right: .2rem; }
.battle.compact.is-landscape .ult-orb { width: 48px; height: 48px; }
.battle.compact.is-landscape .energy-orb { width: 46px; height: 46px; }
.battle.compact.is-landscape .energy-orb b { font-size: 1.45rem; }
.battle.compact.is-landscape .end-turn { min-width: 0; min-height: 44px; padding: .3rem .55rem; font-size: .92rem; }
.battle.compact.is-landscape .pile { width: 40px; height: 46px; }
.battle.compact.is-landscape .pile small { display: none; }
.battle.compact.is-landscape .b-left, .battle.compact.is-landscape .b-right { gap: .3rem; padding-bottom: calc(var(--sab) + 5px); }
.battle.compact.is-landscape .b-top { padding-top: calc(var(--sat) + 2px); padding-bottom: 2px; }
.battle.compact .b-arena-chip small { display: none; }

.battle.compact.is-portrait .res-icon { width: 1.8rem; height: 1.8rem; font-size: 1.15rem; }
.battle.compact.is-portrait .hud-res { min-height: 40px; }
.battle.compact.is-portrait .ult-orb { width: 48px; height: 48px; }
.battle.compact.is-portrait .energy-orb { width: 46px; height: 46px; }
.battle.compact.is-portrait .energy-orb b { font-size: 1.45rem; }
.battle.compact.is-portrait .end-turn { min-width: 6.2rem; min-height: 44px; font-size: .95rem; }
.battle.compact.is-portrait .pile { width: 40px; height: 46px; }
.battle.compact.is-portrait .pile small { display: none; }
.battle.compact.is-portrait .b-left, .battle.compact.is-portrait .b-right { gap: .3rem; padding-bottom: calc(var(--sab) + 5px); }
.battle.compact.is-portrait .res-pips i { width: .42rem; }

.battle.roomy .ult-name { display: block; order: -1; }
.battle.roomy .ult-orb { width: 74px; height: 74px; }
.battle.roomy .ult-core b { font-size: 1.3rem; }
.battle.roomy .energy-orb { width: 76px; height: 76px; }
.battle.roomy .energy-orb b { font-size: 2.4rem; }
.battle.roomy .end-turn { min-width: 10rem; min-height: 58px; font-size: 1.35rem; }
.battle.roomy .pile { width: 60px; height: 70px; }
.battle.roomy .pile-art { width: 38px; height: 50px; font-size: 2rem; }
.battle.roomy .b-left { padding-left: calc(var(--sal) + 1.4rem); padding-bottom: calc(var(--sab) + 1rem); gap: 1rem; }
.battle.roomy .b-right { padding-right: calc(var(--sar) + 1.4rem); padding-bottom: calc(var(--sab) + 1rem); gap: .8rem; flex-wrap: wrap-reverse; align-content: flex-start; }
.battle.roomy .hud-res { margin-left: calc(var(--sal) + 1.2rem); margin-bottom: .5rem; }
.battle.roomy .hud-ult { padding-right: calc(var(--sar) + 1.4rem); padding-bottom: .5rem; }
.battle.roomy .res-name b { font-size: 1.15rem; }
.battle.roomy .res-pips i { width: .8rem; height: .65rem; }

.b-preview {
  position: absolute;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  pointer-events: none;
}

.b-preview.hidden { display: none; }

.preview-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: var(--pw);
  pointer-events: auto;
  animation: pop-in .2s cubic-bezier(.2, 1.4, .5, 1);
}

.preview-main .card { width: var(--pw); }
.preview-main .card .card-face { box-shadow: 0 0 0 2px #05060e, 0 0 0 5px var(--yellow), 0 14px 40px rgba(0, 0, 0, .75); }
.preview-main .card.blocked .card-face { box-shadow: 0 0 0 2px #05060e, 0 0 0 5px #767da0, 0 14px 40px rgba(0, 0, 0, .75); }

.preview-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: max-content;
  max-width: max(calc(var(--pw) + 44px), 14rem);
  min-height: 30px;
  padding: .12rem .3rem .12rem .65rem;
  border: 1px solid rgba(255, 226, 93, .75);
  border-radius: 99px;
  background: rgba(9, 11, 28, .95);
  color: var(--yellow);
  font: 800 .7rem/1.2 var(--body);
  text-align: center;
}

.preview-hint.bad { border-color: #ff7d8c; color: #ff9aa6; }

.b-preview.beside .preview-main { flex-direction: row; align-items: flex-end; gap: 6px; width: auto; }
.b-preview.beside .preview-main > .card, .b-preview.beside .preview-main > .ult-preview { flex: none; }
.b-preview.beside .preview-hint { flex-direction: column; width: max-content; max-width: 7.6rem; padding: .45rem .55rem; border-radius: .8rem; }
.b-preview.beside .ult-preview { width: calc(var(--pw) * 1.35); min-height: 0; gap: .2rem; padding: .5rem; font-size: .72rem; line-height: 1.25; }
.b-preview.beside .ult-preview strong { font-size: 1.15rem; }

.preview-info {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #232c5c;
  color: var(--ink);
  font-size: .95rem;
}

.preview-info::before { content: ""; position: absolute; inset: -8px; }

.preview-gloss {
  width: 15rem;
  max-height: calc(var(--pw) * 1.45);
  overflow: hidden;
  pointer-events: auto;
}

.preview-gloss .glossary { margin: 0; gap: .35rem; }
.preview-gloss .gloss { background: rgba(9, 12, 30, .94); }
.preview-gloss .gloss p { font-size: .74rem; }

.ult-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: var(--pw);
  min-height: var(--pw);
  padding: .8rem;
  border: 3px solid var(--yellow);
  border-radius: 1rem;
  background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--fc) 60%, #12163a), #0c0f27 75%);
  box-shadow: 0 0 30px color-mix(in srgb, var(--fc) 70%, transparent);
  text-align: center;
  font-size: .8rem;
}

.ult-preview strong { font: italic 900 1.5rem/1.05 var(--head); color: var(--fc); text-shadow: 2px 2px 0 #000; text-transform: uppercase; padding-right: .1em; }

.battle.compact.is-portrait .ult-preview { gap: .2rem; padding: .5rem .45rem; font-size: .72rem; line-height: 1.25; }
.battle.compact.is-portrait .ult-preview strong { font-size: 1.15rem; }

.drag-ghost {
  position: absolute;
  z-index: 70;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform;
}

.drag-ghost .card { width: 100%; }
.drag-ghost.armed .card-face { box-shadow: 0 0 0 2px #05060e, 0 0 0 5px var(--lime), 0 0 28px 8px rgba(154, 255, 85, .7); }

.flying {
  position: absolute;
  z-index: 40;
  pointer-events: none;
  will-change: transform, opacity;
}

.flying .card { width: 100%; }

.b-fx {
  position: absolute;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
}

.b-fx canvas { pointer-events: none; }

.b-popups {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .25rem;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font: italic 900 1.15rem/1 var(--head);
  letter-spacing: .03em;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 0 12px rgba(0, 0, 0, .6);
  animation: float-up var(--ms, 900ms) cubic-bezier(.2, .8, .4, 1) forwards;
}

.float b { font-weight: 900; padding-right: .08em; }
.float small { font-size: .55em; margin-left: .15em; }

@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); }
  14% { opacity: 1; transform: translate(-50%, -60%) scale(1.25); }
  28% { transform: translate(-50%, -70%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(.95); }
}

.float-dmg { font-size: 2.1rem; color: #fff; }
.float-dmg.big { font-size: 2.8rem; color: #ffe25d; }
.float-dmg.huge { font-size: 3.6rem; color: #ff9d2e; }
.float-dmg.mine { color: #ff6a7e; }
.float-dmg.from-combo { color: #ff7fa8; }
.float-dmg.kind-poison { color: #c79bff; }
.float-dmg.kind-burn, .float-dmg.kind-detonate { color: #ffab46; }
.float-dmg.kind-thorns { color: #b6ff7e; }
.float-block { color: #9fe4ff; font-size: 1.45rem; }
.float-gain.block { color: #9fe4ff; font-size: 1.55rem; }
.float-gain.heal { color: #8dff9d; font-size: 1.75rem; }
.float-status { font-size: 1rem; }
.float-status.buff { color: #9ff2ff; }
.float-status.debuff { color: #ff9ab8; }
.float-status.energy { color: var(--yellow); }
.float-res { color: var(--yellow); font-size: .95rem; }
.float-gold { color: var(--yellow); font-size: 1.2rem; }
.float-ready { color: var(--yellow); font-size: 1.35rem; text-transform: uppercase; }
.float-ko { color: #ff5a74; font-size: 3.4rem; text-transform: uppercase; }
.float-move, .float-trigger {
  padding: .25rem .6rem;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 99px;
  background: rgba(11, 13, 34, .92);
  font-size: .95rem;
  text-shadow: 1px 1px 0 #000;
}
.float-move { border-color: #ff7186; color: #ffe1e6; text-transform: uppercase; }
.float-trigger { border-color: var(--cyan); color: #d8fbff; font-size: .8rem; }

.reduce-motion .float { animation: float-still var(--ms, 900ms) linear forwards !important; animation-duration: var(--ms, 900ms) !important; }
@keyframes float-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

.bubble {
  position: absolute;
  max-width: min(62vw, 17rem);
  padding: .45rem .75rem;
  border: 2px solid #17131f;
  border-radius: 1rem;
  background: #fffdf2;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
  color: #17131f;
  font: 800 .84rem/1.25 var(--body);
  text-align: center;
  animation: bubble var(--ms, 1800ms) ease-out forwards;
}

.bubble::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 30%;
  width: 14px;
  height: 14px;
  border-right: 2px solid #17131f;
  border-bottom: 2px solid #17131f;
  background: #fffdf2;
  transform: rotate(45deg);
}

.bubble.side-1::after { left: auto; right: 30%; }
.bubble.beside::after { left: -9px; bottom: 45%; border-right: 0; border-left: 2px solid #17131f; }

@keyframes bubble {
  0% { opacity: 0; transform: scale(.5) translateY(10px); }
  10% { opacity: 1; transform: scale(1.06); }
  16% { transform: scale(1); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-6px); }
}

.reduce-motion .bubble { animation: float-still var(--ms, 1800ms) linear forwards !important; animation-duration: var(--ms, 1800ms) !important; }

.combo-pop {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: .3rem;
  transform: translate(-50%, -50%) rotate(-8deg);
  animation: combo-pop 1.05s cubic-bezier(.15, 1.4, .4, 1) forwards;
  white-space: nowrap;
}

.combo-pop strong {
  background: linear-gradient(180deg, #fff6a8 20%, #ffd024 50%, #ff3f72);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: italic 900 clamp(2.3rem, 11vmin, 4.6rem)/1 var(--head);
  letter-spacing: .02em;
  filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 10px rgba(255, 77, 121, .7));
  padding: 0 .12em;
}

.combo-pop small { color: #fff; font: italic 900 1.6rem var(--head); text-shadow: 2px 2px 0 #000; }

@keyframes combo-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.6); }
  18% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -60%) rotate(-8deg) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -90%) rotate(-8deg) scale(.9); }
}

.reduce-motion .combo-pop { animation: float-still 1s linear forwards !important; animation-duration: 1s !important; }

.b-banners {
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.b-banners .banner { top: 34%; }

.arena-flash {
  position: absolute;
  top: calc(var(--sat) + 56px);
  left: 50%;
  transform: translateX(-50%);
  padding: .35rem .9rem;
  border: 2px solid var(--cyan);
  border-radius: 99px;
  background: rgba(9, 12, 32, .95);
  font: italic 900 .95rem var(--head);
  letter-spacing: .04em;
  white-space: nowrap;
  animation: toast-in .3s both;
}

.b-result {
  position: absolute;
  left: 50%;
  top: 36%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  transform: translate(-50%, -50%);
  animation: result-in .55s cubic-bezier(.15, 1.4, .4, 1);
  pointer-events: auto;
}

.b-result strong {
  width: 100%;
  padding: .3rem 0 .4rem;
  background: linear-gradient(90deg, transparent, rgba(8, 9, 24, .92) 20%, rgba(8, 9, 24, .92) 80%, transparent);
  color: var(--yellow);
  font: italic 900 clamp(2.8rem, 14vw, 6.5rem)/1.05 var(--head);
  letter-spacing: .02em;
  text-align: center;
  text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 #000;
  text-transform: uppercase;
}

.battle.is-portrait .b-result { top: 32%; }

.b-quote {
  display: grid;
  gap: .1rem;
  max-width: min(88%, 28rem);
  margin: -.3rem 0 0;
  padding: .55rem 1rem;
  border: 2px solid var(--fc);
  border-radius: 1rem;
  background: rgba(10, 12, 30, .94);
  text-align: center;
}

.b-quote span { font: italic 800 .95rem/1.3 var(--body); color: #fff8dc; }
.b-quote b { color: var(--fc); font: italic 900 .8rem var(--head); letter-spacing: .06em; }
.short .b-result { gap: .5rem; }
.short .b-result strong { font-size: 2.6rem; }
.short .b-quote { padding: .3rem .8rem; }

.b-result.lost strong { color: #d5dcff; text-shadow: 5px 5px 0 #3d4287, 10px 10px 0 #000; }

@keyframes result-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

.server-wipe {
  position: absolute;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(166, 247, 126, .13) 0 2px, transparent 2px 5px);
  animation: wipe-fade 1.05s ease-out forwards;
}

.server-wipe i {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 7%;
  background: linear-gradient(90deg, transparent, rgba(166, 247, 126, .75) 18%, transparent 31%, rgba(255, 77, 121, .65) 47%, rgba(255, 77, 121, .2) 63%, rgba(166, 247, 126, .8) 74%, transparent);
  mix-blend-mode: screen;
  animation: wipe-bar .28s steps(4, end) infinite;
}

.server-wipe i:nth-child(1) { top: 17%; }
.server-wipe i:nth-child(2) { top: 55%; height: 3%; animation-direction: reverse; }
.server-wipe i:nth-child(3) { top: 71%; height: 11%; animation-delay: -.12s; }

.server-wipe strong {
  position: relative;
  padding: .1em .3em;
  background: rgba(2, 10, 4, .82);
  color: #fff;
  font: italic 900 clamp(2.4rem, 12vw, 7rem)/1.1 var(--head);
  letter-spacing: .04em;
  white-space: nowrap;
  text-shadow: -4px 0 #ff4d79, 4px 0 #a6f77e, 0 0 24px #000;
  animation: wipe-text .18s steps(2, end) infinite;
}

@keyframes wipe-bar { 0% { transform: translateX(-14%); } 50% { transform: translateX(9%) scaleY(1.6); } 100% { transform: translateX(14%); } }
@keyframes wipe-text { 50% { transform: translate(3px, -2px) skewX(-6deg); } }
@keyframes wipe-fade { 0% { background-color: rgba(166, 247, 126, .4); } 14% { background-color: rgba(3, 14, 7, .74); } 78% { opacity: 1; } 100% { opacity: 0; background-color: rgba(3, 14, 7, 0); } }

.reduce-motion .server-wipe { animation: float-still 1s linear forwards !important; animation-duration: 1s !important; }

.b-flash {
  position: absolute;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  opacity: 0;
}

.b-flash.hurt { animation: hurt-flash .42s ease-out; }

@keyframes hurt-flash {
  0% { opacity: 1; box-shadow: inset 0 0 90px 24px rgba(255, 40, 70, .75); }
  100% { opacity: 0; box-shadow: inset 0 0 90px 24px rgba(255, 40, 70, .75); }
}

.battle.over .hand, .battle.over .b-left, .battle.over .b-right, .battle.over .hud-res, .battle.over .hud-ult { opacity: .35; pointer-events: none; transition: opacity .4s; }
.battle.cpu-turn .hand { opacity: .6; }
.battle.intro .unit.side-0 { animation: enter-left .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.battle.intro .unit.side-1 { animation: enter-right .5s cubic-bezier(.2, 1.2, .4, 1) both; }

@keyframes enter-left { from { transform: translateX(-60vw); } }
@keyframes enter-right { from { transform: translateX(60vw); } }

.cutin {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: center;
  cursor: pointer;
}

.cutin-dim { position: absolute; inset: 0; background: rgba(4, 4, 14, .72); animation: fade-in .2s; }

.cutin-band {
  position: relative;
  width: 100%;
  height: clamp(170px, 46%, 460px);
  overflow: hidden;
  border-top: 5px solid #fff;
  border-bottom: 5px solid #fff;
  background: linear-gradient(100deg, color-mix(in srgb, var(--fc) 92%, #fff) 0, color-mix(in srgb, var(--fc) 60%, #12103a) 45%, #0c0a24 85%);
  box-shadow: 0 0 60px var(--fc);
  transform: skewY(-4deg);
  animation: band-in .32s cubic-bezier(.2, .9, .3, 1.1);
}

.cutin-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(104deg, transparent 0 22px, rgba(255, 255, 255, .13) 22px 26px, transparent 26px 60px);
  animation: speed-lines .5s linear infinite;
}

.cutin-sprite {
  position: absolute;
  left: -2%;
  bottom: -30%;
  height: 138%;
  aspect-ratio: 1;
  max-width: 68%;
  transform: skewY(4deg);
  animation: cut-sprite .5s cubic-bezier(.2, 1.1, .3, 1) both;
  filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, .45));
}

.cutin-text {
  position: absolute;
  right: 3%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  width: 56%;
  text-align: right;
  transform: translateY(-50%) skewY(4deg);
  animation: cut-text .45s .12s cubic-bezier(.2, 1.2, .3, 1) both;
}

.cutin-text small { font: 800 .7rem var(--mono); letter-spacing: .14em; text-shadow: 1px 1px 0 #000; }
.cutin-text strong { font: italic 900 clamp(2rem, 8.5vmin, 5rem)/.98 var(--head); text-transform: uppercase; color: #fff; text-shadow: min(4px, .06em) min(4px, .06em) 0 #000, min(8px, .12em) min(8px, .12em) 0 color-mix(in srgb, var(--fc) 70%, transparent); padding-right: .12em; }
.cutin-text p { margin: 0; color: #fff8dc; font: italic 800 clamp(.82rem, 3vmin, 1.4rem) var(--body); text-shadow: 2px 2px 0 #000; }

.cutin.side-1 .cutin-sprite { left: auto; right: -2%; }

@media (orientation: portrait) {
  .cutin-sprite { left: -8%; bottom: -4%; width: 76%; height: auto; max-width: 76%; }
  .cutin.side-1 .cutin-sprite { left: auto; right: -8%; }
  .cutin-text { width: 50%; top: 40%; }
}
.cutin.side-1 .cutin-text { right: auto; left: 3%; align-items: flex-start; text-align: left; }
.cutin.out { animation: cut-out .28s forwards; }

@keyframes band-in { from { transform: translateX(-110%) skewY(-4deg); } }
@keyframes cut-sprite { from { transform: translateX(-60%) skewY(4deg) scale(1.2); opacity: 0; } }
@keyframes cut-text { from { transform: translate(60%, -50%) skewY(4deg); opacity: 0; } }
@keyframes speed-lines { to { background-position: 120px 0; } }
@keyframes cut-out { to { opacity: 0; transform: scale(1.06); } }

.coin-toss {
  position: absolute;
  z-index: 60;
  left: 50%;
  top: 36%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.coin-toss small { padding: 0 .6rem; border-radius: 99px; background: rgba(8, 10, 28, .9); font: 800 .7rem/1.8 var(--mono); }

.coin {
  position: relative;
  width: 6rem;
  height: 6rem;
  transform-style: preserve-3d;
  animation: coin-spin .85s cubic-bezier(.2, .7, .3, 1) forwards;
}

.coin.tails { animation-name: coin-spin-tails; }

.coin i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 5px solid #7a4a00;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c0, #ffcf33 55%, #c98a00);
  font-size: 2.8rem;
  font-style: normal;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.coin .coin-t { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #fff, #bfc8e8 55%, #6a73a6); border-color: #303863; }

@keyframes coin-spin {
  0% { transform: translateY(40px) rotateY(0) scale(.6); }
  50% { transform: translateY(-60px) rotateY(900deg) scale(1.15); }
  100% { transform: translateY(0) rotateY(1800deg) scale(1); }
}

@keyframes coin-spin-tails {
  0% { transform: translateY(40px) rotateY(0) scale(.6); }
  50% { transform: translateY(-60px) rotateY(990deg) scale(1.15); }
  100% { transform: translateY(0) rotateY(1980deg) scale(1); }
}

.coin-toss strong { font: italic 900 2rem var(--head); color: var(--yellow); text-shadow: 3px 3px 0 #000; opacity: 0; padding-right: .1em; }
.coin-toss.landed strong { opacity: 1; animation: pop-in .3s; }
.coin-toss.out { opacity: 0; transition: opacity .25s; }

.coach {
  position: absolute;
  z-index: 65;
  width: min(16rem, calc(100% - 12px));
  padding: .6rem .75rem;
  border: 2px solid #19131f;
  border-radius: .8rem;
  background: linear-gradient(180deg, #fff4a8, #ffd83a);
  box-shadow: 4px 4px 0 var(--pink), 0 12px 30px rgba(0, 0, 0, .5);
  color: #19131f;
  animation: pop-in .3s cubic-bezier(.2, 1.4, .5, 1);
}

.coach p { margin: 0 0 .35rem; font-weight: 800; font-size: .88rem; line-height: 1.3; }
.coach-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.coach-skip { min-height: 40px; color: #6a4b00; font: 800 .72rem var(--mono); text-decoration: underline; }
.coach-dots { color: #6a4b00; font: 900 .7rem var(--mono); }
.coach .btn { box-shadow: 3px 3px 0 #19131f; background: #19131f; color: var(--yellow); }

.coach-arrow {
  position: absolute;
  left: var(--ax, 50%);
  bottom: -9px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-right: 2px solid #19131f;
  border-bottom: 2px solid #19131f;
  background: #ffd83a;
  transform: rotate(45deg);
}

.coach.below .coach-arrow { top: -9px; bottom: auto; background: #fff4a8; transform: rotate(225deg); }
.coach.beside-left .coach-arrow, .coach.beside-right .coach-arrow { top: 50%; bottom: auto; margin-top: -7px; }
.coach.beside-left .coach-arrow { left: auto; right: -9px; margin-left: 0; transform: rotate(-45deg); }
.coach.beside-right .coach-arrow { left: -9px; margin-left: 0; transform: rotate(135deg); background: #ffe566; }

.short .coach { padding: .4rem .6rem; }
.short .coach p { font-size: .78rem; }

#layer-net { z-index: 35; }

.o-spinner {
  flex: none;
  width: 2.8rem;
  height: 2.8rem;
  border: 5px solid rgba(255, 255, 255, .14);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.o-label {
  display: block;
  color: var(--cyan);
  font: 800 .66rem/1.3 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.o-hint { margin: .2rem 0; color: var(--muted); font-size: .78rem; text-align: center; }
.o-hint.bad { color: #ff9aa6; }
.o-error { margin: .6rem 0 0; color: #ff9aa6; font-size: .85rem; font-weight: 800; text-align: center; }
.o-error:empty { display: none; }

.btn-discord {
  background: linear-gradient(180deg, #828cff, #4b57d6);
  color: #fff;
  box-shadow: 5px 5px 0 #232a6e;
}

.o-face {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 2px solid var(--fc, #56628c);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 72%, color-mix(in srgb, var(--fc, #56628c) 55%, #0a0e21), #0a0e21 78%);
}

.o-face > * { width: 100%; height: 100%; }
.o-face-empty { color: var(--dim); font: italic 900 1.3rem var(--head); }
.o-face-open { border-style: dashed; border-color: var(--line2); background: rgba(8, 10, 26, .7); }

.o-chips { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }

.o-chip {
  padding: .1rem .5rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(6, 9, 22, .75);
  color: var(--muted);
  font: 800 .64rem/1.55 var(--mono);
  white-space: nowrap;
}

.o-chip-format { border-color: rgba(255, 226, 93, .45); color: var(--yellow); }

.o-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--line2);
  border-radius: .9rem;
  background: rgba(10, 13, 30, .62);
  text-align: center;
}

.o-empty p { margin: 0; }
.o-unreachable .ico-wifi { font-size: 2.6rem; color: #ffb05e; }
.o-unreachable h3 { font-size: 1.45rem; text-transform: uppercase; }

.o-hub-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: .9rem;
  width: min(100%, 76rem);
  margin: 0 auto;
}

html[data-orient="landscape"] .o-hub-body { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); align-items: start; }

.o-me { display: flex; flex-direction: column; gap: .75rem; }
.o-name-row { display: flex; gap: .5rem; margin-top: -.45rem; }
.o-name-row .search { flex: 1; min-width: 0; font: italic 900 1.2rem var(--head); letter-spacing: .03em; }
.o-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; padding-right: 5px; }
.o-actions .btn { min-height: 52px; padding-inline: .5em; }
.o-table { min-height: 60px; margin-right: 5px; }
.o-rejoin { margin-right: 5px; }
.o-rejoin .btn-sub { text-transform: none; }

.o-open { min-width: 0; }
.o-open-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.o-open-head .section-title { flex: 1; min-width: 0; margin: 0; }
.o-live { display: inline-flex; align-items: center; gap: .35rem; color: var(--lime); font: 800 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.o-live:empty { display: none; }
.o-live::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.o-live.bad { color: #ffb05e; }
.o-refresh.busy .ico { animation: spin .9s linear infinite; }

.o-lobbies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: .7rem;
  padding-right: 4px;
}

.o-lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main seats" "foot foot";
  align-items: center;
  gap: .5rem .7rem;
  min-width: 0;
  padding: .7rem .75rem;
  border: 1px solid var(--line2);
  border-radius: .9rem;
  background: linear-gradient(160deg, rgba(34, 42, 76, .97), rgba(14, 18, 38, .98));
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
  text-align: left;
  transition: transform .1s, border-color .12s;
}

.o-lobby:hover { border-color: var(--yellow); transform: translateY(-2px); }
.o-lobby:active { transform: translate(2px, 2px); }
.o-lobby-main { grid-area: main; display: grid; min-width: 0; }
.o-lobby-main strong { padding-right: .15em; font: italic 900 1.2rem/1.15 var(--head); letter-spacing: .02em; text-transform: uppercase; }
.o-lobby-main small { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.o-lobby-seats { grid-area: seats; display: flex; align-items: center; gap: .6rem; padding-right: 3px; }
.o-lobby-seats b { font: italic 900 1.1rem var(--head); color: var(--ink); }
.o-join-pill { padding: .3rem .8rem .32rem; border-radius: .45rem; background: var(--yellow); box-shadow: 3px 3px 0 var(--pink); color: #17131f; font: italic 900 1rem var(--head); text-transform: uppercase; }
.o-lobby-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; min-width: 0; }
.o-faces { display: flex; }
.o-faces .o-face + .o-face { margin-left: -8px; }

.modal-join .modal-box, .modal-code .modal-box { width: min(100%, 24rem); }
.o-join { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: .4rem 0; text-align: center; }
.o-join-code { padding-left: .18em; color: var(--yellow); font: italic 900 2.3rem var(--head); letter-spacing: .18em; }
.o-join-code.table { padding-left: 0; font-size: 1.5rem; letter-spacing: .02em; text-transform: uppercase; }
.o-join-status { margin: 0; color: var(--muted); }
.search.o-code-input { min-height: 62px; font: italic 900 2rem var(--head); letter-spacing: .3em; text-align: center; text-transform: uppercase; }
.search.o-code-input::placeholder { color: #4d5786; letter-spacing: .2em; }

.modal-create .modal-box { width: min(100%, 32rem); }
.o-form { display: grid; gap: .75rem; }
.o-field { display: grid; gap: .35rem; min-width: 0; }
.o-form .o-hint { margin: -.4rem 0 0; }
.o-seg .seg { padding-inline: .4rem; }
.segmented.o-seg-format { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.modal-swap .btn-sub { font-size: .66rem; line-height: 1.35; overflow-wrap: anywhere; }
.o-room-settings[hidden] { display: none; }
.o-room .topbar-title h1 { font-size: clamp(1.2rem, 4.8vw, 2rem); }
.o-room .topbar-title .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.o-room-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "code" "seats" "extra";
  align-content: start;
  gap: .75rem;
  width: min(100%, 76rem);
  margin: 0 auto;
}

.o-code { grid-area: code; }
.o-seats { grid-area: seats; min-width: 0; }
.o-room-extra { grid-area: extra; display: grid; align-content: start; gap: .75rem; min-width: 0; }
.o-room-extra > :empty { display: none; }

html[data-orient="landscape"] .o-room-body {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-areas: "seats code" "seats extra";
  grid-template-rows: auto 1fr;
}

.o-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main actions" "chips chips" "hint hint";
  align-items: center;
  align-self: start;
  gap: .55rem .8rem;
  padding: .75rem .9rem;
}

.o-code-main { grid-area: main; display: grid; justify-items: start; min-width: 0; }
.o-code-big { padding: 0 .15em 0 0; color: var(--yellow); font: italic 900 clamp(2.3rem, 11vw, 3.5rem)/1.1 var(--head); letter-spacing: .13em; text-shadow: 4px 4px 0 var(--pink); }
.o-code-table { color: #b5bdff; font: italic 900 clamp(1.4rem, 6vw, 2rem)/1.15 var(--head); text-transform: uppercase; }
.o-code-actions { grid-area: actions; display: flex; flex-direction: column; gap: .65rem; padding-right: 5px; }
.o-code .o-chips { grid-area: chips; }
.o-code .o-hint { grid-area: hint; margin: 0; text-align: left; }

.o-seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .6rem; }

.o-seat {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-height: 76px;
  padding: .45rem .55rem;
  border: 2px solid color-mix(in srgb, var(--fc, #56628c) 60%, transparent);
  border-radius: .9rem;
  background: linear-gradient(100deg, color-mix(in srgb, var(--fc, #56628c) 26%, #12172f), #0e1228 72%);
}

.o-seat.me { border-color: var(--yellow); box-shadow: 0 0 16px rgba(255, 226, 93, .22); }
.o-seat.o-open-seat { border-style: dashed; border-color: var(--line2); background: rgba(10, 13, 30, .66); }
.o-seat .o-face { width: 56px; height: 56px; border-radius: .6rem; }
.o-seat-face { display: block; border-radius: .6rem; }
.o-seat-copy { display: grid; min-width: 0; line-height: 1.25; }
.o-seat-top { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.o-crown { flex: none; display: inline-flex; }
.o-crown .ico { font-size: 1.1rem; }
.o-seat-name { min-width: 0; padding-right: .15em; font: italic 900 1.14rem/1.15 var(--head); letter-spacing: .02em; }
.o-seat-fighter { font-size: .76rem; font-weight: 700; }
.o-seat-name, .o-seat-fighter, .o-lobby-main strong, .o-result-who b, .o-draft-who b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; white-space: normal; }
.o-seat.o-open-seat .o-seat-fighter { color: var(--dim); font-weight: 600; }
.o-seat-state { display: flex; align-items: center; gap: .35rem; min-width: 0; color: #ffb869; font: 800 .64rem/1.7 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.o-seat.ready .o-seat-state > span { color: var(--lime); }
.o-seat.host .o-seat-state > span { color: var(--yellow); }
.o-seat.off .o-seat-state > span { color: var(--dim); }
.o-seat.off .o-seat-face { filter: grayscale(.85); }
.o-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: #737aa0; }
.o-dot.on { background: var(--lime); box-shadow: 0 0 6px var(--lime); }
.o-tag { flex: none; padding: 0 .35rem; border-radius: 3px; color: #11131f; font: 900 .58rem/1.55 var(--mono); font-style: normal; letter-spacing: .04em; }
.o-tag.you { background: var(--cyan); }
.o-tag.cpu { background: var(--yellow); }
.o-seat-actions { display: flex; align-items: center; gap: .35rem; }
.o-seat-actions:empty { display: none; }
.o-seat-actions .icon-btn { min-width: 40px; height: 40px; padding: 0 .4rem; font-size: 1.05rem; }
.o-seat-actions .btn { white-space: nowrap; }
.o-won { flex: none; font-size: .95rem; }

.o-seat-bubble {
  position: absolute;
  z-index: 5;
  top: -.7rem;
  right: .4rem;
  max-width: 64%;
  padding: .35rem .75rem;
  border: 2px solid #17131f;
  border-radius: 1rem;
  background: #fffdf2;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .5);
  color: #17131f;
  font: 800 .82rem/1.25 var(--body);
  pointer-events: none;
  animation: o-pop 2.6s ease-out forwards;
}

.reduce-motion .o-seat-bubble { animation: none !important; }

@keyframes o-pop {
  0% { opacity: 0; transform: scale(.6); }
  8% { opacity: 1; transform: scale(1.06); }
  14% { transform: scale(1); }
  86% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-6px); }
}

.o-team { --team: #ffb23e; padding: .5rem .55rem .6rem; border: 1px solid color-mix(in srgb, var(--team) 50%, transparent); border-left: 5px solid var(--team); border-radius: .9rem; background: color-mix(in srgb, var(--team) 10%, rgba(10, 13, 30, .74)); }
.o-team-1 { --team: #a693ff; }
.o-team + .o-team { margin-top: .6rem; }
.o-team-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; margin: 0 0 .45rem; color: var(--team); font-size: 1.05rem; text-transform: uppercase; }
.o-team-title small { color: var(--muted); font: 800 .62rem var(--mono); letter-spacing: .08em; }

.o-show { display: none; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }

@media (min-width: 900px) and (min-height: 700px), (min-width: 700px) and (min-height: 960px) {
  .o-show { display: flex; }
}

.o-show-sprite { width: min(100%, 15rem, 27vh); aspect-ratio: 1; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55)); }
.o-show-sprite > * { width: 100%; height: 100%; }
.o-show-name { font: italic 900 1.5rem/1.1 var(--head); text-transform: uppercase; }
.o-show-title { color: var(--muted); font: 800 .64rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.o-show-looks { width: 100%; max-width: 18rem; margin-top: .25rem; }
.o-show-empty { display: grid; place-items: center; gap: .3rem; width: 100%; padding: 1rem; border: 2px dashed var(--line2); border-radius: .8rem; }
.o-show-empty span { color: var(--dim); font: italic 900 4rem/1 var(--head); }
.o-last-box { display: flex; align-items: center; gap: .75rem; padding: .6rem .85rem; border-color: rgba(255, 226, 93, .45); }
.o-last-box p { display: grid; min-width: 0; margin: 0; }
.o-last-box small { color: var(--muted); }
.o-last-cup { flex: none; font-size: 1.7rem; }

.o-room-foot { flex-direction: column; align-items: center; gap: .45rem; }
.o-foot-hint { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; text-align: center; }
.o-link { min-height: 28px; margin-left: .5rem; color: var(--yellow); font-weight: 800; text-decoration: underline; }
.o-foot-row { display: flex; align-items: center; justify-content: center; gap: .7rem; width: min(100%, 34rem); padding-right: 5px; }
.o-foot-row .btn { min-height: 52px; }
.o-foot-row .o-main, .o-foot-row .o-pick { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; padding-inline: .7em; font-size: 1.28rem; white-space: nowrap; }
.narrow .o-foot-row .btn { padding-inline: .55em; }
.narrow .o-foot-row .o-main .ico { display: none; }
.o-foot-row .o-change { flex: none; }
.o-foot-row .o-emote-btn { width: 52px; height: 52px; font-size: 1.45rem; }

.short .o-room-foot { padding-top: .35rem; padding-bottom: calc(var(--sab) + .45rem); }
.short .o-foot-hint { font-size: .72rem; }
.short .o-foot-row .btn { min-height: 42px; }
.short .o-foot-row .o-main, .short .o-foot-row .o-pick { font-size: 1.1rem; }
.short .o-foot-row .o-emote-btn { width: 44px; height: 42px; }
.short .o-room .topbar { padding-top: calc(var(--sat) + .25rem); padding-bottom: .25rem; }
.short .o-room-body, .short .o-hub-body { padding-top: .5rem; }
.short .o-seat { min-height: 64px; padding-block: .3rem; }
.short .o-seat .o-face { width: 46px; height: 46px; }
.short .o-code-big { font-size: 2.2rem; }
html[data-orient="landscape"].short .o-room-body { grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); }
.short .o-seat { gap: .45rem; }
.short .o-seat-actions { gap: .25rem; }
.short .o-seat-actions .icon-btn { min-width: 36px; width: 36px; height: 38px; padding: 0; }
.short .o-code { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "actions" "chips" "hint"; }
.short .o-code-actions { flex-direction: row; flex-wrap: wrap; }
.short .o-seat-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); gap: .45rem; }
.short .o-seat-name { font-size: 1.02rem; }
html.big-text.short .o-crown { display: none; }
.short .o-team { padding-block: .35rem .45rem; }
.short .o-team + .o-team { margin-top: .45rem; }
.short .o-team-title { margin-bottom: .3rem; font-size: .92rem; }

.o-emote-pop { max-width: min(20rem, calc(100vw - 12px)); }
.o-emotes { display: grid; grid-template-columns: repeat(2, minmax(7rem, 1fr)); gap: .4rem; }
.o-emote { min-height: 44px; padding: .3rem .65rem; border: 2px solid #17131f; border-radius: 1rem; background: #fffdf2; color: #17131f; font: 800 .86rem/1.2 var(--body); }
.o-emote:hover { background: #fff1a8; }
.o-emote-quote { grid-column: 1 / -1; font-style: italic; }
.short .o-emotes { grid-template-columns: repeat(4, minmax(5.5rem, 1fr)); }
.short .popover.o-emote-pop { max-width: min(34rem, calc(100vw - 12px)); }

html[data-orient="landscape"].short .modal-create .modal-box { width: min(100%, 46rem); }
html[data-orient="landscape"].short .o-form { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; align-items: start; gap: .45rem 1rem; }
html[data-orient="landscape"].short .o-form .o-hint { margin: 0; }
html[data-orient="landscape"].short .o-seg-format.segmented { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.o-draft .draft-body { gap: .6rem; }
.o-draft-timer { display: flex; align-items: center; gap: .65rem; width: min(100%, 30rem); }
.o-draft-timer.hidden { display: none; }
.o-draft-bar { flex: 1; height: .6rem; overflow: hidden; border-radius: 99px; background: #232b52; }
.o-draft-bar i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--pink), var(--yellow)); transition: width .25s linear; }
.o-draft-timer b { min-width: 2.6em; padding-right: .1em; font: italic 900 1.35rem var(--head); text-align: right; }
.o-draft-timer.low b { color: #ff6b7d; }
.o-draft-row { display: flex; flex-direction: column; align-items: center; width: 100%; }
.o-draft-row.done { gap: .6rem; }
.o-draft-row .card-choices { padding-block: .6rem .35rem; }
.o-draft .card-choices .card { width: clamp(90px, min(29vw, 36vh, calc((100vh - 20rem) / 1.4)), 250px); }
.o-draft .card.disabled { opacity: .45; }
.o-draft-wait { margin: 0; font-weight: 800; text-align: center; }
.o-draft-foot { display: flex; flex-direction: column; align-items: center; gap: .7rem; width: 100%; }
.o-draft-picked { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; width: min(100%, 34rem, 62vh); }
.o-draft-picked .card { width: 100%; }
.o-draft-players { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.o-draft-player { display: flex; align-items: center; gap: .45rem; padding: .25rem .75rem .25rem .3rem; border: 1px solid var(--line); border-radius: 99px; background: rgba(10, 13, 30, .85); }
.o-draft-player.me { border-color: var(--yellow); }
.o-draft-player.done { border-color: rgba(154, 255, 85, .65); }
.o-draft-player .o-face { width: 32px; height: 32px; }
.o-draft-who { display: grid; line-height: 1.15; }
.o-draft-who b { max-width: 8.5rem; font-size: .8rem; }
.o-draft-who small { color: var(--muted); font: 700 .64rem var(--mono); }
.short .o-draft .draft-body { gap: .3rem; padding-top: .35rem; padding-bottom: calc(var(--sab) + .4rem); }
.short .o-draft .topbar { padding-top: calc(var(--sat) + .2rem); padding-bottom: .2rem; }
.short .o-draft-row .card-choices { padding-block: .35rem .1rem; }
.short .o-draft .card-choices .card { width: clamp(80px, calc((100vh - 13rem) / 1.4), 200px); }
.short .o-draft-foot { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; }
.short .o-draft-picked { grid-template-columns: repeat(8, minmax(0, 1fr)); width: min(100%, 52rem); }

.battle.mode-online .b-turn, .battle.mode-online .b-relics, .battle.mode-online .b-arena-chip { display: none; }

@media (min-width: 760px) {
  .battle.mode-online .b-arena-chip { display: grid; max-width: 15rem; }
}

.o-turn {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  max-width: 28rem;
  height: 42px;
  margin: 0 auto;
  padding: 0 .6rem 0 3px;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: .65rem;
  background: rgba(7, 10, 26, .86);
  text-align: left;
}

.o-turn.mine { border-color: var(--yellow); background: linear-gradient(90deg, rgba(255, 226, 93, .3), rgba(7, 10, 26, .9) 75%); }
.o-turn-face { flex: none; width: 34px; height: 34px; overflow: hidden; border: 2px solid var(--fc, var(--cyan)); border-radius: 50%; background: #0a0e22; }
.o-turn-face > * { width: 100%; height: 100%; }
.o-turn-copy { flex: 1; display: grid; min-width: 0; line-height: 1.1; }
.o-turn-copy small { overflow: hidden; color: var(--cyan); font: 800 .52rem/1.4 var(--mono); letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.o-turn-copy b { overflow: hidden; padding-right: .15em; font: italic 900 1.02rem/1.15 var(--head); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.o-turn.mine .o-turn-copy b { color: var(--yellow); }
.narrow .o-turn-suffix, .narrow .o-turn-role { display: none; }
.o-turn-time { flex: none; padding-right: .1em; font: italic 900 1.2rem var(--head); font-variant-numeric: tabular-nums; }
.o-turn-time:empty { display: none; }
.o-turn-time.cpu { color: var(--muted); font-size: .85rem; }
.o-turn-time.low { color: #ff5d74; animation: o-blink 1s steps(2, end) infinite; }
.o-turn-bar { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--pink), var(--yellow)); transform: scaleX(0); transform-origin: left center; transition: transform .25s linear; }
.narrow .o-turn-copy.long b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; white-space: normal; font-size: .82rem; line-height: 1.02; }
@keyframes o-blink { 50% { opacity: .45; } }
.battle .o-emote-btn { flex: none; min-width: 42px; height: 40px; font-size: 1.25rem; }

.battle.mode-online .unit.active-turn:not(.gone) .unit-shadow { left: 0; right: 0; bottom: -5%; height: 16%; background: radial-gradient(ellipse, rgba(255, 226, 93, .95), rgba(255, 226, 93, .35) 42%, transparent 68%); animation: o-glow 1.2s ease-in-out infinite; }
.battle.mode-online .unit.active-turn:not(.gone) .plate-name span { color: var(--yellow); }
@keyframes o-glow { 50% { transform: scale(1.12); } }
.battle.mode-online .unit.team-0 { --team: #ffb23e; }
.battle.mode-online .unit.team-1 { --team: #a693ff; }
.battle.mode-online .unit.team-0 .plate-name::before, .battle.mode-online .unit.team-1 .plate-name::before { content: ""; flex: none; width: .5rem; height: .5rem; border: 1px solid #05060e; background: var(--team); box-shadow: 0 0 5px var(--team); transform: rotate(45deg); }
.battle.mode-online .b-stage.squads .plate-name { gap: .22rem; font-size: .8rem; }
.battle.mode-online .b-stage.squads .plate-tag { padding: 0 .2rem; font-size: .52rem; }
.unit-flag { position: absolute; z-index: 4; bottom: 6%; left: 50%; transform: translateX(-50%); padding: 0 .45rem; border: 1.5px solid #8a93a8; border-radius: 99px; background: rgba(10, 12, 30, .94); color: #e3e8ff; font: 900 .6rem/1.75 var(--mono); letter-spacing: .08em; white-space: nowrap; }
.unit.is-away .unit-bob { filter: grayscale(.75) brightness(.72); }
.chip-hand .ico { color: var(--muted); }
.o-order { margin: .35rem 0; padding-left: 1.2rem; }
.o-order li.now b { color: var(--yellow); }
.o-order span { color: var(--muted); }
.battle.mode-online .hand.o-out::after { content: "You are knocked out. Watch the rest, or leave from the menu."; }
.battle.mode-online .hand.o-no-cards::after { content: "Your cards arrive when your turn starts."; }
.battle.mode-online .hand.o-no-cards::after, .battle.mode-online .hand.o-out::after { position: absolute; top: 50%; left: 50%; width: max-content; max-width: calc(100% - 2rem); transform: translate(-50%, -50%); padding: .45rem .9rem; border: 1px dashed var(--line2); border-radius: 99px; color: var(--muted); font: 800 .8rem/1.35 var(--body); text-align: center; }
.hand-card.sending { animation: o-sending .55s ease-in-out infinite alternate; }
@keyframes o-sending { to { opacity: .45; } }

.o-away {
  position: absolute;
  z-index: 62;
  bottom: calc(var(--sab) + 5.8rem);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  width: min(24rem, calc(100% - 20px));
  padding: .85rem 1rem 1rem;
  border: 2px solid var(--yellow);
  border-radius: 1rem;
  background: rgba(12, 15, 36, .97);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .75);
  text-align: center;
  transform: translateX(-50%);
}

.o-away.hidden { display: none; }
.o-away strong { color: var(--yellow); font: italic 900 1.35rem var(--head); text-transform: uppercase; }
.o-away p { margin: 0; color: var(--muted); font-size: .85rem; }
.battle.over .o-away { display: none; }
.short .o-away { bottom: calc(var(--sab) + 1rem); gap: .25rem; padding: .55rem .8rem .65rem; }

.battle.mode-online .b-result strong { font-size: clamp(2.2rem, 10vw, 5.2rem); }
.short .battle.mode-online .b-result strong, .battle.mode-online.compact .b-result strong { font-size: 2.3rem; }

.o-net {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--sat) + 1rem) 1rem calc(var(--sab) + 1rem);
  background: rgba(4, 6, 16, .76);
  pointer-events: auto;
  animation: fade-in .2s ease-out;
}

.o-net-box { display: flex; flex-direction: column; align-items: center; gap: .6rem; width: min(100%, 23rem); text-align: center; }
.o-net-box h2 { font-size: 1.6rem; text-transform: uppercase; }
.o-net-text { margin: 0; color: var(--muted); }
.o-net-actions { display: flex; gap: .85rem; margin-top: .35rem; }

.end.o-result .end-title { font-size: clamp(2rem, 6.4vw, 4.6rem); overflow-wrap: anywhere; }
.end.won.o-result .end-title { text-shadow: .08em .08em 0 var(--pink), .15em .15em 0 rgba(0, 0, 0, .55); }
.end.lost.o-result .end-title { text-shadow: .07em .07em 0 #3b3f7a, .13em .13em 0 rgba(0, 0, 0, .55); }
.o-result-sprites { display: flex; justify-content: center; width: 100%; }
.end.o-result .end-sprite { width: min(62%, 20rem, 40vh); filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .55)); transform: none; }
.end.o-result .o-result-sprites.count-2 .end-sprite { width: min(48%, 17rem, 32vh); margin: 0 -2%; }
html[data-orient="portrait"] .end.o-result .end-sprite { width: min(56%, 15rem, 21vh); }
html[data-orient="portrait"] .end.o-result .o-result-sprites.count-2 .end-sprite { width: min(46%, 13rem, 18vh); }
.short .end.o-result .end-sprite { width: min(56%, 30vh); }
.short .end.o-result .o-result-sprites.count-2 .end-sprite { width: min(42%, 26vh); }
.o-result-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.o-result-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 1.4rem; align-items: center; gap: .6rem; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: .7rem; background: rgba(7, 10, 24, .72); }
.o-result-list li.win { border-color: rgba(255, 226, 93, .7); background: linear-gradient(90deg, rgba(255, 226, 93, .18), rgba(7, 10, 24, .72)); }
.o-result-list li.out .o-face { filter: grayscale(.85); }
.o-result-who { display: grid; min-width: 0; line-height: 1.2; }
.o-result-who small { color: var(--muted); font-size: .72rem; }
.o-result-hp { color: var(--muted); font: 900 .76rem var(--mono); white-space: nowrap; }
.o-result-status { margin: 0; color: var(--cyan); font-size: .84rem; font-weight: 800; text-align: center; }
.o-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; padding-right: 5px; }
.o-result-actions .btn-huge { flex: 1 1 100%; }
.short .o-result .end-panel { gap: .45rem; padding: .6rem .7rem; }
.short .o-result-list { gap: .25rem; }
.short .o-result-list li { padding: .15rem .45rem; }
.short .o-result-list .o-face { width: 28px; height: 28px; }
.short .o-result-actions { gap: .6rem; }
.short .o-result-actions .btn-huge { flex: 1 1 auto; min-height: 44px; font-size: 1.15rem; }

@media (max-height: 640px) {
  html[data-orient="portrait"] .end.o-result .end-body { gap: .5rem; padding-top: calc(var(--sat) + .35rem); padding-bottom: calc(var(--sab) + .5rem); }
  html[data-orient="portrait"] .end.o-result .end-sprite { width: min(36%, 13vh); }
  html[data-orient="portrait"] .end.o-result .o-result-sprites.count-2 .end-sprite { width: min(30%, 12vh); }
  html[data-orient="portrait"] .end.o-result .end-quote { padding: .25rem .65rem; font-size: .76rem; }
  html[data-orient="portrait"] .end.o-result .end-panel { gap: .35rem; padding: .55rem; }
  html[data-orient="portrait"] .o-result-list { gap: .25rem; }
  html[data-orient="portrait"] .o-result-list li { padding-block: .15rem; }
  html[data-orient="portrait"] .o-result-actions { gap: .6rem; }
  html[data-orient="portrait"] .o-result-actions .btn-huge { min-height: 46px; }
}

@media (max-width: 359px) {
  .o-seat { gap: .45rem; padding-inline: .45rem; }
  .o-seat .o-face { width: 46px; height: 46px; }
  .o-seat-actions { gap: .25rem; }
  .o-seat-actions .icon-btn { min-width: 36px; width: 36px; padding: 0; }
  .o-seat-state { flex-wrap: wrap; row-gap: 0; }
  .o-seat-name { font-size: 1.04rem; }
  html.big-text .o-crown { display: none; }
  .o-room .topbar { gap: .5rem; }
  .o-room .topbar .o-live { gap: 0; font-size: 0; }
  .o-room .topbar-title h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; white-space: normal; font-size: 1.15rem; line-height: 1.05; }
  .o-turn { gap: .35rem; }
  .o-turn-face { width: 28px; height: 28px; }
  .o-turn-time { font-size: 1.05rem; }
  html.big-text .o-turn { padding-left: .5rem; }
  html.big-text .o-turn-face { display: none; }
  .battle.mode-online .b-stage.squads .plate-name { gap: .15rem; font-size: .72rem; letter-spacing: 0; }
  .battle.mode-online .b-stage.squads .plate-tag { padding: 0 .15rem; font-size: .48rem; }
}

