/* [project]/src/app/globals.css [app-client] (css) */
@font-face {
  font-family: Cinzel;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/Cinzel.woff2") format("woff2");
}

@font-face {
  font-family: Cinzel Decorative;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/CinzelDecorative.woff2") format("woff2");
}

@font-face {
  font-family: Cormorant Garamond;
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/CormorantGaramond.woff2") format("woff2");
}

@font-face {
  font-family: Cormorant Garamond;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/CormorantGaramond-Italic.woff2") format("woff2");
}

:root {
  --ink-0: #09090a;
  --ink-1: #111113;
  --ink-2: #19191c;
  --ink-3: #222226;
  --line: #2b2b30;
  --line-strong: #46464e;
  --bone: #e9e4da;
  --bone-bright: #fbf8f1;
  --bone-dim: #a9a49b;
  --muted: #7d7a74;
  --faint: #55534f;
  --glow: #e9e4da59;
  --serif: "Cormorant Garamond", "Georgia", serif;
  --display: "Cinzel", "Georgia", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  --lightningcss-light: ;
  --lightningcss-dark: initial;
  color-scheme: dark;
}

body {
  background: radial-gradient(1200px 600px at 50% -10%, #e9e4da0f, transparent 60%),
    radial-gradient(800px 400px at 50% 110%, #e9e4da0a, transparent 60%),
    var(--ink-0);
  min-height: 100vh;
  color: var(--bone);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
}

a {
  color: var(--bone);
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .25s var(--ease), color .25s;
  text-decoration: none;
}

a:hover {
  color: var(--bone-bright);
  border-color: var(--bone);
}

::selection {
  background: var(--bone);
  color: var(--ink-0);
}

h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: .06em;
  color: var(--bone-bright);
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 {
  font-size: 1.7em;
}

h2 {
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--bone-dim);
  align-items: center;
  gap: 10px;
  font-size: 1.05em;
  display: flex;
}

h2:after {
  content: "";
  background: linear-gradient(90deg, var(--line-strong), transparent);
  flex: 1;
  height: 1px;
}

h3 {
  letter-spacing: .1em;
  color: var(--bone-dim);
  font-size: 1em;
}

p {
  margin: .4em 0 .8em;
}

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

.error {
  color: var(--bone-bright);
  border-left: 2px solid var(--bone);
  padding-left: 10px;
  font-style: italic;
}

.notice {
  color: var(--bone-dim);
  border-left: 2px solid var(--faint);
  padding-left: 10px;
  font-style: italic;
}

.icon {
  vertical-align: -.18em;
  flex: none;
  width: 1.05em;
  height: 1.05em;
}

.topbar {
  z-index: 20;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#111113f5, #111113d9);
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  display: flex;
  position: sticky;
  top: 0;
}

.topbar .brand {
  font-family: "Cinzel Decorative", var(--display);
  letter-spacing: .12em;
  color: var(--bone-bright);
  border: none;
  align-items: center;
  gap: 10px;
  font-size: .95em;
  display: flex;
}

.topbar .brand .icon {
  width: 1.2em;
  height: 1.2em;
  transition: transform .6s var(--ease);
}

.topbar .brand:hover .icon {
  transform: rotate(180deg);
}

.topbar .who {
  font-family: var(--display);
  letter-spacing: .08em;
  color: var(--bone-dim);
  align-items: center;
  gap: 12px;
  font-size: .8em;
  display: flex;
}

.topbar form {
  display: inline;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 90px;
}

main:has(.wide) {
  max-width: 1100px;
}

.card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line);
  margin-bottom: 18px;
  padding: 22px 22px 20px;
  position: relative;
  box-shadow: inset 0 1px #ffffff08, 0 10px 30px #00000059;
}

.card:before, .card:after {
  content: "";
  pointer-events: none;
  border-color: var(--line-strong);
  border-style: solid;
  width: 14px;
  height: 14px;
  position: absolute;
}

.card:before {
  border-width: 1px 0 0 1px;
  top: -1px;
  left: -1px;
}

.card:after {
  border-width: 0 1px 1px 0;
  bottom: -1px;
  right: -1px;
}

.card:hover:before, .card:hover:after {
  border-color: var(--bone-dim);
  transition: border-color .4s;
}

label {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 4px;
  font-size: .68em;
  display: block;
}

input, textarea, select {
  border: 1px solid var(--line);
  background: var(--ink-0);
  width: 100%;
  color: var(--bone);
  font-family: var(--serif);
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 1em;
  transition: border-color .25s, box-shadow .25s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--bone-dim);
  outline: none;
  box-shadow: 0 0 0 3px #e9e4da14;
}

input::placeholder, textarea::placeholder {
  color: var(--faint);
  font-style: italic;
}

textarea {
  resize: vertical;
  min-height: 84px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px), calc(100% - 11px);
  background-repeat: no-repeat;
  background-size: 5px 5px;
  padding-right: 30px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--bone);
  margin: 0;
}

label.check {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: 0;
  color: var(--bone-dim);
  cursor: pointer;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 1em;
  display: flex;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

button {
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
  background: none;
  border-radius: 2px;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 18px;
  font-size: .72em;
  display: inline-flex;
}

button:hover:not(:disabled) {
  border-color: var(--bone);
  background: #e9e4da0f;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px #0006, 0 0 0 1px #e9e4da14;
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

button.primary, form > button[type="submit"]:not(.secondary):not(.link):not(.small) {
  background: var(--bone);
  color: var(--ink-0);
  border-color: var(--bone);
}

button.primary:hover:not(:disabled), form > button[type="submit"]:not(.secondary):not(.link):not(.small):hover:not(:disabled) {
  background: var(--bone-bright);
  box-shadow: 0 0 24px var(--glow);
}

button.secondary {
  color: var(--bone-dim);
  background: none;
}

button.small {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: .64em;
}

button.link {
  color: var(--muted);
  font-family: var(--serif);
  letter-spacing: 0;
  text-transform: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  font-size: 1em;
  box-shadow: none !important;
  transform: none !important;
}

button.link:hover {
  color: var(--bone-bright);
  background: none;
}

button.danger {
  color: var(--bone-dim);
  border-color: var(--line);
}

button.danger:hover {
  color: var(--bone-bright);
  border-color: var(--bone-dim);
}

button .icon {
  transition: transform .5s var(--ease);
}

button:hover .spin-on-hover {
  transform: rotate(360deg);
}

button:hover .shake-on-hover {
  animation: shake .5s var(--ease);
}

button:hover .rise-on-hover {
  transform: translateY(-2px);
}

.chips {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  display: flex;
}

.chip {
  border-color: var(--line);
  color: var(--bone-dim);
  background: var(--ink-0);
  margin: 0;
  padding: 5px 10px;
  font-size: .62em;
}

.chip:hover:not(:disabled) {
  color: var(--bone-bright);
}

.chip .icon {
  width: .95em;
  height: .95em;
}

.row {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  display: grid;
}

.inline-form {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  display: flex;
}

.inline-form > * {
  flex: 70px;
  min-width: 0;
}

.inline-form > button {
  flex: none;
}

.two-col {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 18px;
  display: grid;
}

.toolbar {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  display: flex;
}

.toolbar a, a.btn {
  border: 1px solid var(--line-strong);
  font-family: var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone);
  transition: all .25s var(--ease);
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: .72em;
  display: inline-flex;
}

.toolbar a:hover, a.btn:hover {
  border-color: var(--bone);
  background: #e9e4da0f;
  transform: translateY(-1px);
}

.toolbar a .icon {
  transition: transform .4s var(--ease);
}

.toolbar a:hover .icon {
  transform: scale(1.15) rotate(-6deg);
}

@media (max-width: 720px) {
  .row, .two-col {
    grid-template-columns: 1fr;
  }
}

ul.plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.plain li {
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  display: flex;
}

ul.plain li:last-child {
  border-bottom: none;
}

.badge {
  font-family: var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--bone-dim);
  white-space: nowrap;
  padding: 3px 9px;
  font-size: .6em;
}

.badge.dm {
  color: var(--ink-0);
  background: var(--bone);
  border-color: var(--bone);
}

.kind {
  font-family: var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: .6em;
}

details summary {
  cursor: pointer;
  color: var(--muted);
  font-style: italic;
}

details summary:hover {
  color: var(--bone);
}

.hero {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  display: flex;
}

.hero h1 {
  font-family: "Cinzel Decorative", var(--display);
  margin-bottom: 2px;
  font-size: 1.9em;
}

.hero .sub {
  color: var(--muted);
  font-style: italic;
}

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

.party .card {
  transition: transform .3s var(--ease), border-color .3s;
  margin: 0;
  padding: 16px;
}

.party .card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.party .name {
  font-family: var(--display);
  letter-spacing: .04em;
  color: var(--bone-bright);
  border: none;
  font-size: .95em;
  display: block;
}

.party .stand-line {
  color: var(--muted);
  align-items: center;
  gap: 6px;
  font-size: .9em;
  font-style: italic;
  display: flex;
}

.party .player-line {
  color: var(--faint);
  font-size: .8em;
  font-family: var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.hp {
  margin: 10px 0 2px;
}

.hp-label {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: .66em;
  display: flex;
}

.hp-label b {
  color: var(--bone);
  font-weight: 600;
}

.hp-track {
  background: var(--ink-0);
  border: 1px solid var(--line);
  height: 7px;
  position: relative;
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  transition: width .8s var(--ease);
  position: relative;
}

.hp-fill.host {
  background: linear-gradient(90deg, var(--bone-dim), var(--bone));
}

.hp-fill.stand {
  background: repeating-linear-gradient(135deg, var(--bone-dim) 0 4px, var(--faint) 4px 8px);
}

.hp-fill:after {
  content: "";
  background: linear-gradient(90deg, #0000, #ffffff40, #0000);
  animation: 3.5s ease-in-out infinite sheen;
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
}

.hp-fill.low {
  animation: 1.2s ease-in-out infinite pulse-dim;
}

.sheet-title h1 {
  margin-bottom: 0;
  font-size: 2em;
}

.sheet-title .sub {
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-style: italic;
  display: flex;
}

.scores, .grades {
  text-align: center;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
  display: grid;
}

.scores div, .grades div {
  border: 1px solid var(--line);
  background: var(--ink-0);
  transition: border-color .3s, transform .3s var(--ease);
  padding: 8px 2px 6px;
}

.scores div:hover, .grades div:hover {
  border-color: var(--bone-dim);
  transform: translateY(-2px);
}

.scores .what, .grades .what {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: .58em;
}

.scores .big {
  font-family: var(--display);
  color: var(--bone-bright);
  font-size: 1.35em;
  font-weight: 600;
  line-height: 1.2;
}

.scores .raw {
  color: var(--faint);
  font-size: .8em;
}

.grades .letter {
  font-family: var(--display);
  color: var(--bone-bright);
  text-shadow: 0 0 14px var(--glow);
  font-size: 1.6em;
  font-weight: 700;
  line-height: 1.1;
}

@media (max-width: 560px) {
  .scores, .grades {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stats {
  color: var(--muted);
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-size: .95em;
  display: flex;
}

.stats b {
  color: var(--bone);
  font-family: var(--display);
  letter-spacing: .04em;
  font-size: .85em;
}

.stand-state {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.stand-state .icon {
  transition: transform .6s var(--ease);
}

.stand-state.summoned .icon {
  color: var(--bone-bright);
  filter: drop-shadow(0 0 6px var(--glow));
  animation: 2.4s ease-in-out infinite breathe;
}

.stand-state.broken .icon {
  opacity: .4;
  animation: shake .6s var(--ease) 1;
}

.ability {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.ability:last-child {
  border-bottom: none;
}

.ability b {
  font-family: var(--display);
  letter-spacing: .04em;
  color: var(--bone-bright);
  font-size: .9em;
}

.ability.locked {
  opacity: .45;
}

.ability.locked .kind:before {
  content: "🔒 ";
  filter: grayscale();
}

.ability .text {
  color: var(--bone-dim);
}

.money {
  font-family: var(--display);
  color: var(--bone-bright);
  letter-spacing: .04em;
  align-items: center;
  gap: 10px;
  font-size: 1.5em;
  display: flex;
}

.money .icon {
  color: var(--bone-dim);
}

ul.log {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  max-height: 440px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

ul.log li {
  border-bottom: 1px solid var(--line);
  animation: rise-in .5s var(--ease) both;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  display: flex;
}

ul.log li.secret {
  color: var(--muted);
  font-style: italic;
}

ul.log li.roll .log-text {
  color: var(--bone-bright);
}

.log-time {
  font-family: var(--display);
  color: var(--faint);
  letter-spacing: .08em;
  white-space: nowrap;
  padding-top: 4px;
  font-size: .6em;
}

.log-text {
  flex: 1;
}

button.star {
  color: var(--faint);
  font-size: 1em;
}

button.star:hover, button.star.on {
  color: var(--bone-bright);
  filter: drop-shadow(0 0 6px var(--glow));
}

.dice-dim {
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  animation: result-in .5s var(--ease) forwards;
  background: radial-gradient(circle, #09090a33, #09090abf 70%);
  position: fixed;
  inset: 0;
}

.dice-dim.result {
  background: radial-gradient(circle, #09090a8c, #09090ad9 70%);
}

.dice-tray {
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  position: fixed;
  inset: 0;
}

.dice-tray.rolling, .dice-tray.result {
  opacity: 1;
}

.dice-tray canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.dice-result {
  z-index: 60;
  pointer-events: none;
  text-align: center;
  animation: result-in .6s var(--ease) both;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dice-result-ring {
  border: 1px solid var(--bone);
  width: 260px;
  height: 260px;
  box-shadow: 0 0 60px var(--glow), inset 0 0 60px #e9e4da14;
  animation: ring-out 1.4s var(--ease) both;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dice-result-ring:after {
  content: "";
  animation: ring-pulse 1.8s var(--ease) .15s both;
  border: 1px solid #e9e4da40;
  border-radius: 50%;
  position: absolute;
  inset: -18px;
}

.dice-result-number {
  font-family: var(--display);
  color: var(--bone-bright);
  text-shadow: 0 0 30px var(--glow), 0 0 90px #e9e4da40;
  animation: number-in .7s var(--ease) both;
  background: radial-gradient(closest-side, #09090ae6, #09090a80 70%, #0000);
  border-radius: 50%;
  padding: 30px 50px;
  font-size: 7em;
  font-weight: 700;
  line-height: 1;
}

.dice-result-label {
  font-family: var(--display);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  animation: rise-in .5s var(--ease) .25s both;
  background: #09090abf;
  margin-top: 6px;
  padding: 4px 14px;
  font-size: .8em;
  display: inline-block;
}

.dice-result-detail {
  color: var(--muted);
  animation: rise-in .5s var(--ease) .35s both;
  background: #09090abf;
  margin-top: 4px;
  padding: 2px 12px;
  font-style: italic;
  display: inline-block;
}

.crit-word {
  color: var(--bone-bright);
  letter-spacing: .3em;
  margin-bottom: 4px;
  display: block;
}

.dice-form .chips {
  margin-bottom: 4px;
}

.entry {
  max-width: 440px;
  margin: 40px auto 0;
}

.entry h1 {
  text-align: center;
  font-family: "Cinzel Decorative", var(--display);
  font-size: 1.4em;
}

@keyframes sheen {
  0% {
    transform: translateX(-100%);
  }

  60%, 100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-dim {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .45;
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px) rotate(-3deg);
  }

  40% {
    transform: translateX(4px) rotate(3deg);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(3px);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes result-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ring-out {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.3);
  }

  40% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
  }
}

@keyframes number-in {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: scale(2.2);
  }

  60% {
    filter: blur();
    transform: scale(.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes flare {
  0% {
    text-shadow: 0 0 30px var(--glow);
  }

  30% {
    text-shadow: 0 0 60px var(--bone-bright), 0 0 140px var(--bone);
  }

  100% {
    text-shadow: 0 0 30px var(--glow);
  }
}

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

button, .chip {
  position: relative;
  overflow: hidden;
}

button:not(:disabled):active, .chip:not(:disabled):active {
  transform: translateY(1px) scale(.98);
}

button:after, .chip:after {
  content: "";
  background: var(--bone);
  opacity: 0;
  pointer-events: none;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
}

button:not(:disabled):active:after, .chip:not(:disabled):active:after {
  animation: press-ripple .5s var(--ease);
}

.cast-wrap {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

.cast-btn {
  border-color: var(--bone-dim);
  color: var(--bone-bright);
}

.cast-btn:not(:disabled):hover {
  box-shadow: 0 0 18px var(--glow);
  border-color: var(--bone);
}

.cast-btn:not(:disabled):hover .icon {
  animation: shake .5s var(--ease) 1;
}

.cast-btn.spent {
  opacity: .4;
  text-decoration: line-through;
}

.cast-dice {
  color: var(--muted);
  letter-spacing: .05em;
  margin-left: 6px;
  font-size: .85em;
}

.uses {
  gap: 3px;
  display: inline-flex;
}

.uses i {
  border: 1px solid var(--line-strong);
  width: 8px;
  height: 8px;
  transition: background .3s, box-shadow .3s;
  transform: rotate(45deg);
}

.uses i.on {
  background: var(--bone);
  box-shadow: 0 0 6px var(--glow);
}

.cast-error {
  color: var(--bone-dim);
  animation: shake .5s var(--ease) 1;
  font-size: .85em;
  font-style: italic;
}

.ability-head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  display: flex;
}

.hp-label span:last-child {
  position: relative;
}

.hp.hit .hp-track {
  animation: shake .5s var(--ease) 1;
}

.hp.hit .hp-fill {
  filter: brightness(1.8);
}

.hp.mend .hp-fill {
  box-shadow: 0 0 14px var(--glow);
  filter: brightness(1.3);
}

.hp-fill {
  transition: width .8s var(--ease), filter .4s, box-shadow .4s;
}

.hp-fill.empty {
  box-shadow: none;
}

.hp-float {
  font-family: var(--display);
  color: var(--bone-bright);
  text-shadow: 0 0 12px var(--glow);
  pointer-events: none;
  animation: float-up 1.4s var(--ease) both;
  font-size: 1.5em;
  font-weight: 700;
  position: absolute;
  top: -4px;
  right: 0;
}

.hp-float.down {
  color: var(--bone-dim);
}

body.quake .topbar, body.quake main .card, body.quake main .tabs {
  animation: quake .6s var(--ease) 1;
}

.moment-dim {
  z-index: 65;
  pointer-events: none;
  animation: result-in .35s var(--ease) both;
  background: radial-gradient(circle, #09090a59, #09090ae0 70%);
  position: fixed;
  inset: 0;
}

.moment-dim.leaving {
  animation: fade-out .5s var(--ease) both;
}

.moment {
  z-index: 70;
  pointer-events: none;
  text-align: center;
  position: fixed;
}

.moment.major {
  animation: result-in .3s var(--ease) both;
  padding: 0 16px;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
}

.moment.major.leaving {
  animation: moment-out .5s var(--ease) both;
}

.moment-streaks {
  width: 200vmax;
  height: 200vmax;
  animation: streaks-in .6s var(--ease) both, streaks-spin 12s linear infinite;
  background: repeating-conic-gradient(#0000 0deg 7deg, #e9e4da12 7deg 8deg);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-mask: radial-gradient(circle, #0000 90px, #000 260px, #0000 70vmax);
  mask: radial-gradient(circle, #0000 90px, #000 260px, #0000 70vmax);
}

.moment-slash {
  background: linear-gradient(90deg, transparent, var(--bone-bright), transparent);
  opacity: 0;
  width: 180vw;
  height: 2px;
  box-shadow: 0 0 24px var(--glow);
  position: fixed;
  top: 50%;
  left: -40vw;
  transform: rotate(-14deg) translateX(-120vw);
}

.moment-ring {
  border: 1px solid var(--bone);
  width: 300px;
  height: 300px;
  box-shadow: 0 0 60px var(--glow), inset 0 0 60px #e9e4da14;
  animation: ring-out 1.5s var(--ease) both;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.moment-sparks {
  width: 0;
  height: 0;
  position: absolute;
  top: 50%;
  left: 50%;
}

.moment-sparks span {
  background: var(--bone-bright);
  width: 4px;
  height: 4px;
  box-shadow: 0 0 8px var(--bone-bright);
  opacity: 0;
  transform: rotate(var(--a)) translateX(0);
  animation: spark 1.3s var(--ease) var(--t) both;
  border-radius: 50%;
  position: absolute;
  top: -2px;
  left: -2px;
}

.moment-icon {
  stroke-width: 1.4px;
  width: 64px;
  height: 64px;
  color: var(--bone-bright);
  filter: drop-shadow(0 0 18px var(--glow));
  animation: icon-in .9s var(--ease) both;
}

.moment.major .moment-title {
  font-family: "Cinzel Decorative", var(--display);
  color: var(--bone-bright);
  text-shadow: 0 0 30px var(--glow), 0 0 90px #e9e4da40;
  animation: title-in .8s var(--ease) .1s both;
  font-size: clamp(2em, 7vw, 4.6em);
  font-weight: 700;
  line-height: 1.1;
}

.moment-sub {
  font-family: var(--display);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--bone-dim);
  animation: rise-in .6s var(--ease) .45s both;
  margin-top: 10px;
  font-size: .85em;
}

.moment-detail {
  color: var(--muted);
  max-width: 520px;
  animation: rise-in .6s var(--ease) .6s both;
  margin: 6px auto 0;
  font-style: italic;
}

.moment.cast .moment-slash, .moment.defeat .moment-slash, .moment.break .moment-slash, .moment.act .moment-slash {
  animation: slash .7s var(--ease) 50ms both;
}

.moment.cast .moment-icon {
  animation: icon-in .9s var(--ease) both, flicker .5s steps(2) .9s 3;
}

.moment.summon .moment-streaks {
  animation-duration: .6s, 30s;
}

.moment.summon .moment-icon {
  animation: rise-big 1.2s var(--ease) both, breathe 2.4s ease-in-out 1.2s infinite;
}

.moment.summon .moment-title {
  animation: title-in 1s var(--ease) .3s both;
}

.moment.defeat .moment-title, .moment.break .moment-title {
  animation: title-in .6s var(--ease) .1s both, shake .6s var(--ease) .7s both;
}

.moment.defeat .moment-streaks, .moment.down .moment-streaks {
  opacity: .4;
  animation-duration: .6s, 6s;
  animation-direction: normal, reverse;
}

.moment.defeat .moment-ring {
  border-width: 3px;
  animation-duration: .9s;
}

.moment.defeat .moment-sub {
  text-decoration: line-through;
  -webkit-text-decoration-color: var(--bone);
  text-decoration-color: var(--bone);
  letter-spacing: .5em;
}

.moment.down .moment-icon {
  animation: icon-in .9s var(--ease) both, sink 2.4s var(--ease) .8s both;
}

.moment.down .moment-title {
  color: var(--bone-dim);
  text-shadow: 0 0 10px #000000e6;
}

.moment.break .moment-icon {
  animation: icon-in .9s var(--ease) both, shake .6s var(--ease) .8s both;
}

.moment.powerup .moment-sparks span, .moment.unlock .moment-sparks span, .moment.act .moment-sparks span {
  animation: spark-rise 1.6s var(--ease) var(--t) both;
}

.moment.powerup .moment-icon, .moment.unlock .moment-icon {
  animation: rise-big 1s var(--ease) both, breathe 1.6s ease-in-out 1s infinite;
}

.moment.act .moment-title {
  animation: title-in .8s var(--ease) .1s both, flare 1.6s ease-out .7s both;
  font-size: clamp(3em, 11vw, 7em);
}

.moment.act .moment-ring {
  animation: ring-out 1.5s var(--ease) both, ring-out 1.5s var(--ease) .6s both;
}

.moment.loot .moment-sparks span {
  animation: spark-fall 1.5s cubic-bezier(.3, 0, .7, 1) var(--t) both;
  width: 7px;
  height: 7px;
}

.moment.loot .moment-icon {
  animation: coin-drop .9s var(--ease) both;
}

.moment.heat .moment-dim, .moment-dim.heat {
  animation: result-in .35s var(--ease) both, pulse-dim .9s ease-in-out .3s 3;
  background: radial-gradient(circle, #09090a4d, #09090ae6 70%);
}

.moment.heat .moment-icon {
  animation: icon-in .9s var(--ease) both, pulse-dim .9s ease-in-out .9s 3;
}

.moment.heal .moment-streaks {
  opacity: .5;
}

.moment.heal .moment-icon {
  animation: icon-in .9s var(--ease) both, breathe 1.8s ease-in-out .9s infinite;
}

.moment.heal .moment-sparks span {
  animation: spark-rise 1.8s var(--ease) var(--t) both;
}

.moment.minor {
  text-align: left;
  background: var(--ink-1);
  border: 1px solid var(--line-strong);
  max-width: min(92vw, 560px);
  animation: banner-in .5s var(--ease) both;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  display: flex;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 10px 40px #0009, 0 0 30px #e9e4da0f;
}

.moment.minor.leaving {
  animation: banner-out .5s var(--ease) both;
}

.moment.minor .moment-icon {
  width: 30px;
  height: 30px;
  animation: icon-in .7s var(--ease) both;
  flex: none;
}

.moment.minor .moment-title {
  font-family: var(--display);
  letter-spacing: .08em;
  color: var(--bone-bright);
  font-size: 1em;
}

.moment.minor .moment-sub {
  letter-spacing: .18em;
  margin-top: 0;
  font-size: .65em;
  animation-delay: .2s;
}

.moment.minor .moment-detail {
  margin: 0;
  font-size: .9em;
  animation-delay: .3s;
}

@keyframes press-ripple {
  from {
    opacity: .35;
    transform: translate(-50%, -50%) scale(0);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(30);
  }
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(.8);
  }

  20% {
    opacity: 1;
    transform: translateY(-4px) scale(1.1);
  }

  100% {
    opacity: 0;
    transform: translateY(-28px) scale(1);
  }
}

@keyframes quake {
  0%, 100% {
    transform: translate(0);
  }

  15% {
    transform: translate(-6px, 3px);
  }

  30% {
    transform: translate(5px, -4px);
  }

  45% {
    transform: translate(-4px, -2px);
  }

  60% {
    transform: translate(3px, 3px);
  }

  75% {
    transform: translate(-2px, 1px);
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes moment-out {
  to {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-50%) scale(1.06);
  }
}

@keyframes streaks-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.6);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes streaks-spin {
  to {
    rotate: 360deg;
  }
}

@keyframes slash {
  0% {
    opacity: 0;
    transform: rotate(-14deg) translateX(-120vw) scaleY(1);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(-14deg) translateX(120vw) scaleY(6);
  }
}

@keyframes spark {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(10px) scale(.5);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(var(--d)) scale(0);
  }
}

@keyframes spark-rise {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(20px) rotate(calc(-1 * var(--a))) translateY(60px) scale(.6);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(60px) rotate(calc(-1 * var(--a))) translateY(-160px) scale(0);
  }
}

@keyframes spark-fall {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(30px) rotate(calc(-1 * var(--a))) translateY(-180px);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateX(90px) rotate(calc(-1 * var(--a))) translateY(120px);
  }
}

@keyframes icon-in {
  0% {
    opacity: 0;
    transform: scale(.2) rotate(-40deg);
  }

  60% {
    opacity: 1;
    transform: scale(1.25) rotate(6deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes rise-big {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(70px) scale(.6);
  }

  100% {
    opacity: 1;
    filter: blur();
    transform: translateY(0) scale(1);
  }
}

@keyframes title-in {
  0% {
    opacity: 0;
    letter-spacing: .6em;
    filter: blur(10px);
    transform: scale(1.3);
  }

  60% {
    opacity: 1;
    filter: blur();
  }

  100% {
    letter-spacing: .06em;
    transform: scale(1);
  }
}

@keyframes flicker {
  0% {
    opacity: 1;
  }

  50% {
    opacity: .3;
  }

  100% {
    opacity: 1;
  }
}

@keyframes sink {
  to {
    opacity: .2;
    transform: translateY(40px) scale(.8);
  }
}

@keyframes coin-drop {
  0% {
    opacity: 0;
    transform: translateY(-90px) scale(.6) rotateY(0);
  }

  55% {
    opacity: 1;
    transform: translateY(8px) scale(1.1) rotateY(360deg);
  }

  75% {
    transform: translateY(-6px) scale(1);
  }

  100% {
    transform: translateY(0) scale(1) rotateY(360deg);
  }
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translate(-50%, -24px);
  }

  to {
    opacity: 1;
    transform: translate(-50%);
  }
}

@keyframes banner-out {
  to {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

.tabs {
  z-index: 30;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  background: #09090aeb;
  gap: 2px;
  margin: -12px -16px 18px;
  padding: 0 12px;
  display: flex;
  position: sticky;
  top: 48px;
  overflow-x: auto;
}

.tab {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  border: none;
  border-bottom: 2px solid #0000;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: .72em;
  transition: color .25s, border-color .25s;
  display: inline-flex;
}

.tab:hover {
  color: var(--bone);
  border-bottom-color: var(--line-strong);
}

.tab.on {
  color: var(--bone-bright);
  border-bottom-color: var(--bone);
  text-shadow: 0 0 12px var(--glow);
}

.tab .icon {
  transition: transform .35s var(--ease);
}

.tab:hover .icon, .tab.on .icon {
  transform: translateY(-1px) scale(1.12);
}

@media (max-width: 720px) {
  .tabs {
    top: 44px;
  }

  .tab span {
    font-size: .9em;
  }
}

.gear {
  grid-template-columns: 1.15fr .85fr;
  align-items: start;
  gap: 18px;
  display: grid;
}

.gear-pack {
  grid-column: 1 / -1;
}

.doll {
  grid-template-columns: 1fr 150px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  display: grid;
}

.slot-col {
  gap: 8px;
  display: grid;
}

.figure {
  width: 100%;
  color: var(--bone-dim);
  filter: drop-shadow(0 0 18px #e9e4da1a);
}

.slot {
  background: var(--ink-0);
  border: 1px solid var(--line);
  min-height: 54px;
  color: var(--bone);
  text-align: left;
  font-family: var(--serif);
  letter-spacing: 0;
  text-transform: none;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  font-size: 1em;
  display: flex;
}

.slot:hover {
  border-color: var(--line-strong);
  background: var(--ink-1);
  transform: none;
}

.slot-label {
  font-family: var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  font-size: .58em;
}

.slot-empty {
  color: var(--faint);
  font-style: italic;
}

.slot.filled {
  border-color: var(--line-strong);
}

.slot.filled .slot-item {
  color: var(--bone-bright);
  animation: slot-in .6s var(--ease) both;
  align-items: center;
  gap: 6px;
  display: flex;
}

.slot.ready {
  border-color: var(--bone);
  box-shadow: 0 0 18px var(--glow), inset 0 0 18px #e9e4da0f;
  animation: 1.2s ease-in-out infinite pulse-dim;
}

.slot.ready .slot-empty {
  color: var(--bone);
  font-style: normal;
}

.slot.picked {
  border-color: var(--bone-bright);
  box-shadow: 0 0 14px var(--glow);
}

.kind-icon {
  opacity: .8;
  font-style: normal;
}

.gear-detail .item-name {
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  display: flex;
}

.gear-detail .rules {
  color: var(--bone-dim);
  min-height: 2.6em;
}

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

.pack-item {
  background: var(--ink-0);
  border: 1px solid var(--line);
  min-height: 92px;
  color: var(--bone);
  text-align: left;
  font-family: var(--serif);
  letter-spacing: 0;
  text-transform: none;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  font-size: 1em;
  display: flex;
  position: relative;
}

.pack-item:hover {
  border-color: var(--bone-dim);
  background: var(--ink-1);
  transform: translateY(-3px);
}

.pack-item.picked {
  border-color: var(--bone-bright);
  box-shadow: 0 0 16px var(--glow);
}

.pack-item .kind-icon {
  font-size: 1.3em;
}

.pack-name {
  font-family: var(--display);
  letter-spacing: .04em;
  color: var(--bone-bright);
  font-size: .8em;
  line-height: 1.25;
}

.pack-qty {
  font-family: var(--display);
  color: var(--bone-dim);
  font-size: .7em;
  position: absolute;
  top: 8px;
  right: 10px;
}

.pack-slot {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: auto;
  font-size: .55em;
}

.pack-item.rarity-uncommon {
  border-color: var(--line-strong);
}

.pack-item.rarity-rare .pack-name, .pack-item.rarity-very-rare .pack-name, .pack-item.rarity-legendary .pack-name {
  text-shadow: 0 0 10px var(--glow);
}

.pack-item.rarity-legendary:before {
  content: "";
  pointer-events: none;
  background: linear-gradient(120deg, #0000 30%, #e9e4da14 50%, #0000 70%);
  animation: 3s ease-in-out infinite sheen;
  position: absolute;
  inset: 0;
}

@keyframes slot-in {
  0% {
    opacity: 0;
    filter: blur(4px);
    transform: scale(.6) translateY(10px);
  }

  60% {
    filter: blur();
    transform: scale(1.08) translateY(0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 720px) {
  .gear {
    grid-template-columns: 1fr;
  }

  .doll {
    grid-template-columns: 1fr 90px 1fr;
    gap: 6px;
  }

  .slot {
    min-height: 48px;
    padding: 6px 8px;
    font-size: .9em;
  }
}

.talk-layout {
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
  gap: 18px;
  display: grid;
}

.talk-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  min-height: 260px;
  max-height: 60vh;
  padding: 4px 4px 4px 0;
  overflow-y: auto;
}

.bubble {
  animation: rise-in .4s var(--ease) both;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  display: flex;
}

.bubble.mine {
  text-align: right;
  flex-direction: row-reverse;
}

.bubble .avatar, .init-chip .avatar {
  border: 1px solid var(--line-strong);
  width: 34px;
  height: 34px;
  font-family: var(--display);
  letter-spacing: .05em;
  color: var(--bone-dim);
  background: var(--ink-0);
  border-radius: 50%;
  flex: none;
  justify-content: center;
  align-items: center;
  font-size: .6em;
  display: inline-flex;
}

.bubble.npc .avatar {
  color: var(--bone);
  border-style: dashed;
}

.bubble-body {
  background: var(--ink-0);
  border: 1px solid var(--line);
  max-width: 80%;
  padding: 8px 12px;
}

.bubble.mine .bubble-body {
  background: var(--ink-3);
  border-color: var(--line-strong);
}

.bubble.npc .bubble-body {
  border-style: dashed;
}

.bubble-who {
  font-family: var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
  font-size: .62em;
}

.bubble.narrate {
  text-align: center;
  justify-content: center;
}

.bubble.narrate .bubble-body {
  border: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 92%;
  color: var(--bone-dim);
  background: none;
  padding: 8px 18px;
  font-style: italic;
}

.bubble.whisper .bubble-body {
  opacity: .7;
  font-style: italic;
}

.composer {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.composer-row {
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  display: flex;
}

.composer-row select {
  flex: 0 auto;
  width: auto;
}

.composer-row input {
  flex: 1;
}

.composer-row button {
  flex: none;
  padding: 10px 14px;
}

@media (max-width: 720px) {
  .talk-layout {
    grid-template-columns: 1fr;
  }
}

.map-page {
  padding-bottom: 20px;
}

.map-head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  display: flex;
}

.map-title {
  margin: 0;
  font-size: 1.5em;
}

.map-head .sub {
  color: var(--muted);
  font-style: italic;
}

.initiative {
  scrollbar-width: none;
  gap: 6px;
  padding: 2px 0 8px;
  display: flex;
  overflow-x: auto;
}

.init-chip {
  border: 1px solid var(--line);
  background: var(--ink-1);
  color: var(--bone-dim);
  font-family: var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all .3s var(--ease);
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  font-size: .7em;
  display: inline-flex;
}

.init-chip .avatar {
  width: 26px;
  height: 26px;
  font-size: .8em;
}

.init-chip.active {
  color: var(--bone-bright);
  border-color: var(--bone);
  box-shadow: 0 0 16px var(--glow);
  transform: translateY(-2px);
}

.init-chip.down {
  opacity: .35;
  text-decoration: line-through;
}

.map-scroll {
  border: 1px solid var(--line);
  background: var(--ink-0);
  touch-action: pan-x pan-y;
  max-height: 72vh;
  position: relative;
  overflow: auto;
}

.map-grid {
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: var(--ink-1);
  margin: 0 auto;
  display: grid;
  position: relative;
}

.cell {
  box-sizing: border-box;
  border: 1px solid #e9e4da12;
  transition: background .2s;
}

.map-grid.mode-wall .cell:hover, .map-grid.mode-place .cell:hover, .map-grid.mode-prop .cell:hover {
  cursor: crosshair;
  background: #e9e4da26;
}

.cell.wall {
  background: repeating-linear-gradient(45deg, var(--ink-3) 0 6px, var(--line-strong) 6px 8px);
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--ink-0);
}

.cell.reach {
  cursor: pointer;
  animation: result-in .3s var(--ease) both;
  background: #e9e4da1f;
  box-shadow: inset 0 0 0 1px #e9e4da40;
}

.cell.reach:hover {
  background: #e9e4da4d;
}

.token, .prop {
  width: var(--cell);
  height: var(--cell);
  transition: transform .55s var(--ease), opacity .3s;
  cursor: pointer;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}

.token:after, .prop:after {
  display: none;
}

.token-face {
  border: 2px solid var(--bone);
  background: radial-gradient(circle at 35% 30%, var(--ink-3), var(--ink-0));
  width: 76%;
  height: 76%;
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(var(--cell) * .3);
  color: var(--bone-bright);
  transition: transform .3s var(--ease), box-shadow .3s;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: 0 4px 12px #0009;
}

.token.npc .token-face {
  border-style: dashed;
  border-color: var(--bone-dim);
}

.token.mine .token-face {
  border-width: 3px;
}

.token.stand .token-face {
  box-shadow: 0 4px 12px #0009, 0 0 16px var(--glow);
}

.token.active .token-face {
  animation: 1.6s ease-in-out infinite token-pulse;
}

.token.picked .token-face {
  outline: 2px solid var(--bone-bright);
  outline-offset: 3px;
}

.token.target .token-face {
  outline: 2px dashed var(--bone-bright);
  outline-offset: 4px;
  cursor: crosshair;
  animation: .8s ease-in-out infinite pulse-dim;
}

.token.near .token-face {
  outline: 2px dotted var(--bone);
  outline-offset: 4px;
}

.token.down {
  opacity: .4;
}

.token.down .token-face {
  filter: grayscale();
  text-decoration: line-through;
}

.token.ghost {
  opacity: .45;
}

.token.ghost .token-face {
  border-style: dotted;
}

.token:hover .token-face {
  transform: scale(1.1);
}

.token-hp {
  background: #000000b3;
  border: 1px solid #e9e4da4d;
  height: 3px;
  position: absolute;
  bottom: 4%;
  left: 14%;
  right: 14%;
}

.token-hp span {
  background: var(--bone);
  height: 100%;
  transition: width .6s var(--ease);
  display: block;
}

.prop .icon {
  width: 55%;
  height: 55%;
  color: var(--bone-dim);
  filter: drop-shadow(0 0 6px #000000e6);
  transition: transform .3s var(--ease), color .3s;
}

.prop:hover .icon {
  color: var(--bone-bright);
  transform: scale(1.15);
}

.prop.hidden .icon {
  opacity: .35;
}

.prop.near .icon {
  color: var(--bone-bright);
  animation: 1s ease-in-out infinite breathe;
}

.prop.picked .icon {
  color: var(--bone-bright);
}

.prop.used .icon {
  opacity: .6;
}

.map-bar {
  margin-top: 12px;
}

.map-bar .chips {
  margin-top: 0;
}

.chip.on {
  background: var(--bone);
  color: var(--ink-0);
  border-color: var(--bone);
}

.chip.end-turn {
  border-color: var(--bone-dim);
  margin-left: auto;
}

.hint {
  color: var(--bone-dim);
  margin: 8px 0 0;
  font-style: italic;
}

.map-side {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 18px;
  margin-top: 18px;
  display: grid;
}

.map-side .card {
  margin: 0;
}

@keyframes token-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px #0009, 0 0 #e9e4da80;
  }

  50% {
    box-shadow: 0 4px 12px #0009, 0 0 0 10px #e9e4da00;
  }
}

@media (max-width: 720px) {
  .map-side {
    grid-template-columns: 1fr;
  }

  .map-scroll {
    max-height: 60vh;
  }

  .chip.end-turn {
    margin-left: 0;
  }
}

.connect .copy-link {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: inline-flex;
}

.connect .copy-link.big {
  border: 1px solid var(--faint);
  background: #00000040;
  border-radius: 6px;
  margin: 6px 0;
  padding: 10px 14px;
  font-size: 1.25rem;
}

.connect .copy-link a {
  word-break: break-all;
}

.copy-btn {
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  display: inline-flex;
}

.plain.tight li {
  padding: 4px 0;
}

.dice-result-number {
  position: relative;
}

.dice-sparks {
  width: 0;
  height: 0;
  position: absolute;
  top: 42%;
  left: 50%;
}

.dice-sparks span {
  background: var(--bone-bright);
  width: 5px;
  height: 5px;
  box-shadow: 0 0 10px var(--bone-bright);
  opacity: 0;
  animation: spark 1.4s var(--ease) calc(var(--t) + .35s) both;
  border-radius: 50%;
  position: absolute;
  top: -3px;
  left: -3px;
}

.dice-result-ring.second {
  border-width: 1px;
  animation-delay: .3s;
}

.dice-rays {
  width: 200vmax;
  height: 200vmax;
  animation: streaks-in .7s var(--ease) both, streaks-spin 14s linear infinite;
  z-index: -1;
  background: repeating-conic-gradient(#0000 0deg 8deg, #fbf8f117 8deg 10deg);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-mask: radial-gradient(circle, #0000 110px, #000 280px, #0000 75vmax);
  mask: radial-gradient(circle, #0000 110px, #000 280px, #0000 75vmax);
}

.dice-result.tier-max .dice-result-number {
  font-size: 8.5em;
  animation: .6s cubic-bezier(.2, 1.6, .4, 1) both slam-in, 1.8s ease-out .45s both flare, 2.2s ease-in-out 1.4s infinite breathe;
}

.dice-result.tier-max .dice-result-ring {
  border-width: 3px;
  animation-duration: 1.1s;
}

.dice-result.tier-max .crit-word {
  animation: title-in .9s var(--ease) .3s both;
  font-size: 1.5em;
}

.dice-dim.tier-max {
  animation: result-in .5s var(--ease) forwards, max-flash .9s ease-out both;
}

.dice-result.tier-high .dice-result-number {
  animation: number-in .6s var(--ease) both, flare 1.4s ease-out .45s both;
}

.dice-result.tier-high .dice-result-ring {
  border-width: 2px;
}

.dice-result.tier-high .dice-sparks span {
  animation: spark-rise 1.6s var(--ease) calc(var(--t) + .3s) both;
}

.dice-result.tier-low .dice-result-number {
  color: var(--bone-dim);
  text-shadow: 0 0 12px #000000e6;
  animation: drop-in .9s cubic-bezier(.3, 0, .3, 1) both, droop 1.6s var(--ease) .9s both;
}

.dice-result.tier-low .dice-result-ring {
  border-color: var(--faint);
  box-shadow: none;
  animation-duration: 1.8s;
}

.dice-result.tier-low .dice-sparks span {
  background: var(--bone-dim);
  width: 4px;
  height: 4px;
  box-shadow: none;
  animation: spark-fall 1.8s cubic-bezier(.4, 0, .8, 1) calc(var(--t) + .5s) both;
}

.dice-result.tier-min .dice-result-number {
  color: var(--bone-dim);
  text-shadow: 0 0 12px #000000e6;
  animation: .7s cubic-bezier(.3, 0, .3, 1) both drop-in;
}

.dice-result.tier-min .dice-result-ring {
  border-color: var(--muted);
  box-shadow: none;
  animation-duration: .8s;
}

.dice-result.tier-min .crit-word {
  color: var(--bone-dim);
  animation: title-in .7s var(--ease) .3s both, shake .6s var(--ease) 1s both;
}

.dice-result.tier-min .dice-sparks span {
  background: var(--muted);
  width: 3px;
  height: 6px;
  box-shadow: none;
  animation: spark-fall 1.6s cubic-bezier(.4, 0, .8, 1) calc(var(--t) + .7s) both;
  border-radius: 1px;
}

.crack-half {
  display: inline-block;
}

.crack-half.a {
  clip-path: polygon(0 0, 100% 0, 100% 38%, 0 62%);
  animation: split-a 1.2s var(--ease) .7s both;
}

.crack-half.b {
  clip-path: polygon(0 62%, 100% 38%, 100% 100%, 0 100%);
  animation: split-b 1.2s var(--ease) .7s both;
  position: absolute;
  inset: 30px 50px;
}

.crack-line {
  background: var(--bone-bright);
  height: 2px;
  box-shadow: 0 0 12px var(--bone-bright);
  opacity: 0;
  animation: crack-flash .7s var(--ease) .62s both;
  position: absolute;
  top: 50%;
  left: 22%;
  right: 22%;
  transform: rotate(-14deg) scaleX(0);
}

.dice-dim.tier-min {
  background: radial-gradient(circle, #09090ab3, #000000f0 70%);
}

.dice-tray.tier-min canvas {
  filter: saturate(.35) brightness(.75);
  transition: filter .8s;
}

.dice-tray.tier-low canvas {
  filter: saturate(.7) brightness(.9);
  transition: filter .8s;
}

@keyframes slam-in {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(3.2);
  }

  55% {
    opacity: 1;
    filter: blur();
    transform: scale(.88);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes drop-in {
  0% {
    opacity: 0;
    transform: translateY(-140px);
  }

  60% {
    opacity: 1;
    transform: translateY(10px);
  }

  78% {
    transform: translateY(-4px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes droop {
  to {
    opacity: .8;
    transform: translateY(8px) scale(.94);
  }
}

@keyframes split-a {
  to {
    transform: translate(-10px, -8px) rotate(-6deg);
  }
}

@keyframes split-b {
  to {
    opacity: .85;
    transform: translate(11px, 13px) rotate(7deg);
  }
}

@keyframes ring-pulse {
  from {
    opacity: 0;
    transform: scale(.3);
  }

  40% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

@keyframes crack-flash {
  0% {
    opacity: 0;
    transform: rotate(-14deg) scaleX(0);
  }

  30% {
    opacity: 1;
    transform: rotate(-14deg) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(-14deg) scaleX(1.1);
  }
}

@keyframes max-flash {
  0% {
    background-color: #fbf8f100;
  }

  12% {
    background-color: #fbf8f147;
  }

  100% {
    background-color: #fbf8f100;
  }
}

.sound-toggle {
  align-items: center;
  display: inline-flex;
}

.toolbar a.small {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: .64em;
}

.world-page {
  padding-bottom: 20px;
}

.world-head {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  display: flex;
}

.world-head .sub {
  color: var(--muted);
  font-style: italic;
}

.world-turns {
  margin-bottom: 4px;
}

.init-chip .avatar, .world-bar .dot {
  box-shadow: inset 0 0 0 2px hsl(var(--tint, 40) 35% 55% / .6);
}

.pips {
  gap: 4px;
  margin-left: 4px;
  display: inline-flex;
}

.pips i {
  background: var(--bone);
  width: 8px;
  height: 8px;
  box-shadow: 0 0 8px var(--glow);
  transition: all .3s var(--ease);
  border-radius: 50%;
}

.pips i.spent {
  box-shadow: inset 0 0 0 1px var(--faint);
  background: none;
}

.pips.big i {
  width: 12px;
  height: 12px;
}

.world-main {
  min-width: 0;
}

.world-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
  display: grid;
}

.world-side .card {
  margin-bottom: 14px;
  padding: 16px 16px 14px;
}

.world-side h2 {
  align-items: center;
  gap: 8px;
  font-size: 1em;
  display: flex;
}

.world-scroll {
  border: 1px solid var(--line);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  background: #0b1015;
  height: min(72vh, 760px);
  position: relative;
  overflow: auto;
}

.world-board {
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
  position: relative;
}

.world-board:active {
  cursor: grabbing;
}

.world-board.mode-add, .world-board.mode-place, .world-board.mode-movePoi {
  cursor: crosshair;
}

.world-art {
  pointer-events: none;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.world-overlay {
  pointer-events: none;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: visible;
}

.world-overlay .reach {
  fill: #e9e4da3d;
  animation: result-in .35s var(--ease) both;
}

.world-overlay .reach.t2 {
  fill: #e9e4da24;
}

.world-overlay .reach.t3 {
  fill: #e9e4da12;
}

.world-overlay .route {
  fill: none;
  stroke: var(--bone-bright);
  stroke-width: .09px;
  stroke-dasharray: .18 .16;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 .15px #000);
  animation: .8s linear infinite march;
}

.world-overlay .route-end {
  fill: var(--bone-bright);
}

.world-overlay .aim {
  fill: #e9e4da38;
  stroke: var(--bone);
  stroke-width: .05px;
}

@keyframes march {
  to {
    stroke-dashoffset: -.68px;
  }
}

.route-cost {
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  color: var(--bone-bright);
  font-family: var(--display);
  letter-spacing: .08em;
  background: #09090ae0;
  padding: 2px 8px;
  font-size: 11px;
  position: absolute;
  transform: translate(-50%, -110%);
}

.world-label {
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--display);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #e9e4da6b;
  text-shadow: 0 0 6px #000, 0 0 2px #000;
  z-index: 1;
  position: absolute;
  transform: translate(-50%, -50%);
}

.poi, .piece {
  width: var(--cell);
  height: var(--cell);
  box-shadow: none;
  cursor: pointer;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}

.poi:hover:not(:disabled), .piece:hover:not(:disabled) {
  box-shadow: none;
  background: none;
  border: none;
}

.poi {
  z-index: 2;
  transition: transform .4s var(--ease), opacity .3s;
}

.poi-badge {
  border: 1.5px solid var(--bone);
  width: 74%;
  min-width: 14px;
  height: 74%;
  min-height: 14px;
  color: var(--bone-bright);
  transition: transform .3s var(--ease), box-shadow .3s;
  background: radial-gradient(circle at 35% 30%, #2c2b2f, #0d0d10);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: 0 3px 10px #000c, 0 0 0 3px #09090a73;
}

.poi-badge .icon {
  width: 58%;
  height: 58%;
}

.poi-name {
  white-space: nowrap;
  font-family: var(--display);
  font-size: max(9px, calc(var(--cell) * .34));
  letter-spacing: .06em;
  color: var(--bone);
  text-shadow: 0 0 4px #000, 0 0 2px #000, 0 1px 2px #000;
  pointer-events: none;
  opacity: .92;
  transition: opacity .2s;
  position: absolute;
  top: 92%;
  left: 50%;
  transform: translateX(-50%);
}

.world-board[style*="--cell: 16px"] .poi-name, .world-board[style*="--cell: 20px"] .poi-name {
  opacity: 0;
}

.poi.label-up .poi-name {
  top: auto;
  bottom: 92%;
}

.poi:hover .poi-name, .poi.picked .poi-name {
  z-index: 8;
  opacity: 1 !important;
}

.poi:hover {
  z-index: 7;
}

.poi:hover .poi-badge {
  transform: scale(1.15);
}

.poi.picked .poi-badge {
  background: var(--bone);
  color: var(--ink-0);
  box-shadow: 0 0 0 3px #09090a99, 0 0 22px var(--glow);
}

.poi.near .poi-badge {
  animation: 1.4s ease-in-out infinite breathe;
}

.poi.found .poi-badge:after {
  content: "";
  background: #d2ad66;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  position: absolute;
  top: -2px;
  right: -2px;
  box-shadow: 0 0 8px #d2ad66;
}

.poi.hidden {
  opacity: .5;
}

.poi.hidden .poi-badge {
  border-style: dashed;
}

.piece {
  z-index: 4;
  transition: transform 95ms linear;
}

.piece-face {
  width: 80%;
  height: 80%;
  font-family: var(--display);
  font-weight: 700;
  font-size: max(8px, calc(var(--cell) * .3));
  color: var(--bone-bright);
  border: 2px solid hsl(var(--tint) 40% 72%);
  background: radial-gradient(circle at 35% 30%, hsl(var(--tint) 30% 34%), hsl(var(--tint) 30% 12%));
  transition: transform .25s var(--ease), box-shadow .3s;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: 0 4px 10px #000000d9;
}

.piece.npc .piece-face {
  border-style: dashed;
  border-color: var(--bone-dim);
  background: radial-gradient(circle at 35% 30%, var(--ink-3), var(--ink-0));
}

.piece:hover .piece-face {
  transform: scale(1.12);
}

.piece.me {
  z-index: 5;
}

.piece.me .piece-face {
  outline: 2px solid var(--bone-bright);
  outline-offset: 2px;
}

.piece.active .piece-face {
  animation: 1.6s ease-in-out infinite token-pulse;
}

.piece.down {
  opacity: .45;
}

.piece.down .piece-face {
  filter: grayscale();
}

.world-bar {
  margin-top: 10px;
}

.world-bar-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}

.world-bar .chip {
  margin: 0;
}

.world-bar .who {
  font-family: var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bone);
  align-items: center;
  gap: 8px;
  font-size: .8em;
  display: inline-flex;
}

.world-bar .dot {
  background: hsl(var(--tint) 30% 30%);
  border: 1px solid hsl(var(--tint) 40% 72%);
  border-radius: 50%;
  width: 14px;
  height: 14px;
}

.poi-card-head {
  align-items: flex-start;
  gap: 12px;
  display: flex;
}

.poi-card-head h2 {
  margin: 2px 0 0;
  font-size: 1.15em !important;
}

.poi-card-head .close {
  margin: 0 0 0 auto;
  padding: 2px 9px;
  font-size: 1em;
}

.poi-badge.big {
  flex: none;
  width: 40px;
  height: 40px;
  position: relative;
}

.poi-card p {
  margin: 10px 0 0;
}

.poi-card .secret {
  color: var(--bone-bright);
  border-left: 2px solid #d2ad66;
  padding-left: 10px;
  font-style: italic;
}

.poi-card .secret .icon {
  color: #d2ad66;
  width: .9em;
  height: .9em;
}

.poi-card .dm-only {
  border-left: 2px dashed var(--faint);
  padding-left: 10px;
  font-size: .9em;
}

.chip.here {
  color: var(--bone-bright);
  border-color: var(--bone-dim);
  cursor: default;
}

.poi-editor {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 4px;
}

.poi-editor textarea {
  width: 100%;
}

.place-list {
  scrollbar-width: thin;
  max-height: 330px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

.place-row {
  border: none;
  border-bottom: 1px solid var(--line);
  text-transform: none;
  letter-spacing: .02em;
  width: 100%;
  font-family: var(--serif);
  color: var(--bone);
  border-radius: 0;
  gap: 10px;
  margin: 0;
  padding: 7px 6px;
  font-size: 1em;
}

.place-row:hover:not(:disabled) {
  box-shadow: none;
  border-color: var(--line);
  transform: none;
}

.place-row .icon {
  width: 1em;
  height: 1em;
  color: var(--bone-dim);
  flex: none;
}

.place-row .place-name {
  text-align: left;
  flex: 1;
}

.place-row .place-far {
  color: var(--muted);
  font-size: .85em;
  font-style: italic;
}

.place-row.hidden {
  opacity: .5;
}

.lately li {
  color: var(--bone-dim);
  font-size: .92em;
}

.dm-tools .muted .icon {
  vertical-align: -1px;
  width: .9em;
  height: .9em;
}

@media (max-width: 960px) {
  .world-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .world-scroll {
    height: 62vh;
  }
}

/*# sourceMappingURL=src_app_globals_162hn9oqc8uss.css.map*/