:root {
  --bg: #e6d7f1;
  --bg-alt: #d7c2e8;
  --ink: #1f1b16;
  --accent: #8a3d21;
  --accent-2: #2f5d50;
  --gold: #caa86a;
  --panel: #fffaf2;
  --panel-border: #d5c6b2;
  --shadow: 0 20px 40px rgba(31, 27, 22, 0.18);
  --radius: 18px;
  --fs-label: clamp(0.62rem, 0.18vw + 0.58rem, 0.72rem);
  --fs-chip: clamp(0.68rem, 0.22vw + 0.64rem, 0.8rem);
  --fs-body: clamp(0.75rem, 0.24vw + 0.7rem, 0.88rem);
  --fs-body-strong: clamp(0.8rem, 0.26vw + 0.75rem, 0.94rem);
  --fs-card-title: clamp(0.88rem, 0.34vw + 0.82rem, 1rem);
  --fs-panel-title: clamp(1.06rem, 0.62vw + 0.93rem, 1.26rem);
  --fs-phase-title: clamp(0.95rem, 0.42vw + 0.87rem, 1.08rem);
  --fs-phase-instruction: clamp(0.78rem, 0.3vw + 0.72rem, 0.92rem);
  --fs-modal-title: clamp(1.08rem, 0.7vw + 0.94rem, 1.28rem);
  --fs-log-tag: clamp(0.56rem, 0.16vw + 0.53rem, 0.64rem);
  --fs-log-time: clamp(0.62rem, 0.16vw + 0.59rem, 0.7rem);
  --fs-button: clamp(0.76rem, 0.24vw + 0.71rem, 0.88rem);
  --shape-panel-radius: 18px 6px 18px 6px;
  --shape-panel-inner-radius: 12px 4px 12px 4px;
  --shape-card-radius: 14px 5px 14px 5px;
  --shape-button-radius: 12px 4px 12px 4px;
  --shape-modal-radius: 20px 4px 20px 4px;
  --shape-chip-radius: 999px;
  --focus-ring-width: 2px;
  --focus-ring-color: #2f5d50;
  --focus-ring-glow: rgba(47, 93, 80, 0.28);
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  position: relative;
  font-family: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 200, 120, 0.12), transparent 42%),
    radial-gradient(circle at 72% 62%, rgba(120, 80, 255, 0.08), transparent 54%),
    linear-gradient(rgba(10, 8, 12, 0.68), rgba(10, 8, 12, 0.82)),
    url("../../assets/generated/PageBG.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-blend-mode: screen, screen, normal, normal;
  min-height: 100vh;
  min-height: 100dvh;
}

html.modal-open,
body.modal-open {
  overscroll-behavior: none;
}

body.modal-open {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(232, 176, 102, 0.14), rgba(232, 176, 102, 0) 58%),
    radial-gradient(circle at 84% 18%, rgba(117, 87, 181, 0.16), rgba(117, 87, 181, 0) 52%),
    radial-gradient(circle at 0% 100%, rgba(255, 168, 96, 0.14), rgba(255, 168, 96, 0) 46%),
    radial-gradient(circle at 50% 50%, rgba(4, 3, 6, 0) 54%, rgba(4, 3, 6, 0.58) 100%);
  opacity: 0.78;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  background-size: 190px 190px;
  mix-blend-mode: soft-light;
  opacity: 0.14;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-right: var(--safe-area-right);
  padding-bottom: var(--safe-area-bottom);
  padding-left: var(--safe-area-left);
  position: relative;
  z-index: 1;
}

.app.modal-blocked {
  pointer-events: none;
  user-select: none;
}

.top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 132px;
  padding: calc(30px + var(--safe-area-top)) calc(32px + var(--safe-area-right)) 30px calc(32px + var(--safe-area-left));
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
  background-image: url("../../assets/generated/Banner.png");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.app.intro-active .controls {
  visibility: hidden;
  pointer-events: none;
}

.app.intro-active .turn-rail-wrap,
.app.intro-active .grid,
.app.intro-active .footer {
  display: none;
}

.intro-gateway {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: calc(28px + var(--safe-area-top)) calc(32px + var(--safe-area-right)) calc(36px + var(--safe-area-bottom)) calc(32px + var(--safe-area-left));
  overflow: hidden;
}

.intro-gateway.hidden {
  display: none;
}

.intro-aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.intro-aurora-a {
  width: min(460px, 56vw);
  height: min(460px, 56vw);
  top: -120px;
  left: -80px;
  background: radial-gradient(circle at 42% 38%, rgba(255, 221, 179, 0.72) 0%, rgba(255, 221, 179, 0) 70%);
}

.intro-aurora-b {
  width: min(540px, 66vw);
  height: min(540px, 66vw);
  right: -140px;
  bottom: -180px;
  background: radial-gradient(circle at 48% 44%, rgba(120, 167, 231, 0.38) 0%, rgba(120, 167, 231, 0) 74%);
}

.intro-gateway-card {
  position: relative;
  width: min(920px, 100%);
  border: 1px solid #caa97c;
  border-radius: 22px;
  padding: 28px 28px 24px;
  background:
    linear-gradient(152deg, rgba(255, 247, 232, 0.97) 0%, rgba(248, 232, 204, 0.94) 48%, rgba(239, 221, 186, 0.92) 100%);
  box-shadow:
    0 26px 42px rgba(40, 24, 15, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.intro-gateway-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(123, 79, 38, 0.35);
  border-radius: 16px;
  pointer-events: none;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ccad7f;
  background: rgba(255, 250, 238, 0.86);
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5f452a;
}

.intro-title {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 1.9vw + 1.62rem, 3rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3d2415;
}

.intro-description {
  margin: 0;
  max-width: 58ch;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.9rem, 0.34vw + 0.84rem, 1.02rem);
  line-height: 1.48;
  color: #5d4631;
}

.intro-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.intro-save-slots {
  margin-top: 16px;
  border: 1px solid #caa97c;
  border-radius: 14px;
  background: rgba(255, 249, 237, 0.9);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.intro-save-slots-title {
  margin: 0;
  font-size: clamp(0.95rem, 0.32vw + 0.88rem, 1.08rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a2d1a;
}

.intro-save-slots-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.intro-save-slot {
  border: 1px solid #cfb286;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  padding: 9px;
  display: grid;
  gap: 8px;
}

.intro-save-slot.is-active-slot {
  border-color: #2f5d50;
  box-shadow: 0 0 0 1px rgba(47, 93, 80, 0.28);
}

.intro-save-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.intro-save-slot-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f452a;
}

.intro-save-slot-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #2f5d50;
  padding: 2px 8px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f5d50;
  background: rgba(47, 93, 80, 0.12);
}

.intro-save-slot-name-wrap {
  display: grid;
  gap: 4px;
}

.intro-save-slot-name-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b5642;
}

.intro-save-slot-name-input {
  width: 100%;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid #d2bc97;
  background: rgba(255, 255, 255, 0.95);
  color: #3f2f24;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body);
  padding: 6px 8px;
}

.intro-save-slot-state {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
  line-height: 1.35;
  color: #5b4d3d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 2);
}

.intro-save-slot-actions {
  display: flex;
  gap: 6px;
}

.intro-save-slot-actions .intro-action {
  flex: 1;
  min-height: 44px;
  padding: 7px 10px;
  font-size: 11px;
}

.intro-save-slot-actions .intro-action:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  filter: saturate(0.65);
  transform: none;
  box-shadow: none;
}

.intro-action {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #c79e67;
  padding: 10px 18px;
  cursor: pointer;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-button);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.intro-action-primary {
  background: linear-gradient(130deg, #2f5d50 0%, #3f7a68 100%);
  color: #fff;
  border: none;
}

.intro-action-secondary {
  background: #fff7e8;
  color: #5f452a;
}

.intro-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(20, 15, 10, 0.2);
  filter: brightness(1.02);
}

.intro-action:active {
  transform: translateY(1px);
  box-shadow: 0 4px 9px rgba(20, 15, 10, 0.18);
  filter: brightness(0.98);
}

.intro-action:focus-visible {
  outline: 2px solid #2f5d50;
  outline-offset: 2px;
}

.intro-rules {
  margin-top: 16px;
  border: 1px solid #caa97c;
  border-radius: 14px;
  background: rgba(255, 249, 237, 0.92);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.intro-rules.hidden {
  display: none;
}

.intro-rules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.intro-rules-header h2 {
  margin: 0;
  font-size: clamp(1.06rem, 0.46vw + 0.96rem, 1.24rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a2d1a;
}

.intro-rules-status {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  color: #5b4d3d;
}

.intro-rules-content {
  margin: 0;
  border: 1px solid rgba(191, 160, 119, 0.6);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px 12px;
  max-height: min(56vh, 460px);
  overflow: auto;
  white-space: pre-wrap;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.78rem, 0.2vw + 0.74rem, 0.9rem);
  line-height: 1.45;
  color: #3f2f24;
}

.turn-rail-wrap {
  padding: 14px calc(32px + var(--safe-area-right)) 0 calc(32px + var(--safe-area-left));
  display: flex;
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sigil {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(31, 27, 22, 0.22);
  border: 2px solid #f6eddc;
}

.title {
  font-size: 28px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.62),
    0 0 20px rgba(116, 189, 137, 0.42);
}

.subtitle {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #f2f5ff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 14px;
}

.controls select,
.controls button {
  padding: 8px 12px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  font-family: inherit;
}

.controls button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow:
    0 7px 14px rgba(20, 15, 10, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.controls button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 10px 18px rgba(20, 15, 10, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.controls button:not(:disabled):active {
  transform: translateY(1px);
  filter: brightness(0.97);
  box-shadow:
    0 4px 8px rgba(20, 15, 10, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.22);
}

.controls button:disabled {
  background: #7a6f63;
  color: #efe9df;
  cursor: not-allowed;
  filter: saturate(0.65);
  opacity: 0.82;
}

#rulesBtn {
  background: #fff4e1;
  color: #5f452a;
  border: 1px solid #c79e67;
}

#boonsBoardBtn {
  background: var(--accent-2);
}

#saveGameBtn {
  background: #2f5d50;
}

#diagnosticsBtn {
  background: #3e4f7a;
}

.controls .debug-control.hidden {
  display: none;
}

#quitGameBtn {
  background: #5d4a3c;
}

.app-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 120;
  min-height: 0;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(242, 231, 210, 0.7);
  background: rgba(44, 36, 28, 0.94);
  color: #f7f1e4;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.28);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast[data-tone="success"] {
  background: rgba(39, 74, 59, 0.95);
}

.app-toast[data-tone="error"] {
  background: rgba(89, 42, 35, 0.95);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas:
    "board players"
    "board hand";
  gap: 24px;
  padding: 24px calc(32px + var(--safe-area-right)) calc(32px + var(--safe-area-bottom)) calc(32px + var(--safe-area-left));
  flex: 1;
  align-items: start;
}

.panel.board {
  grid-area: board;
}

.panel.players {
  grid-area: players;
}

.panel.hand {
  grid-area: hand;
}

#logToggleBtn[aria-pressed="true"] {
  background: #2f5d50;
}

.panel {
  background:
    linear-gradient(160deg, rgba(20, 14, 11, 0.84) 0%, rgba(36, 25, 18, 0.8) 44%, rgba(16, 12, 10, 0.86) 100%),
    url("../../assets/generated/PageBG.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: multiply;
  border: 1px solid rgba(196, 153, 98, 0.58);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 219, 170, 0.08),
    inset 0 -18px 28px rgba(0, 0, 0, 0.36);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--radius) - 8px);
  border: 1px solid rgba(224, 187, 136, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 192, 0.09),
    inset 0 -12px 20px rgba(0, 0, 0, 0.26);
  pointer-events: none;
  z-index: 0;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 214, 160, 0.2), rgba(255, 214, 160, 0) 54%),
    linear-gradient(140deg, rgba(255, 225, 180, 0.09), rgba(255, 225, 180, 0) 52%);
  opacity: 0.48;
  pointer-events: none;
  z-index: 0;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel.board .panel-header {
  justify-content: center;
  margin-bottom: 8px;
}

.panel-header h2 {
  margin: 0;
  font-size: var(--fs-panel-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0dfc2;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.deck-info,
.round,
.turn,
.phase {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #d8c4a1;
}

.panel.board .selection,
.panel.hand .hand-section-title,
.panel.hand .hand-empty {
  color: #d8c4a1;
}

.deck-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.card-piles-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
}

.pile-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d2b88b;
  background: #f7ecd8;
  color: #5b4d3d;
  font-size: var(--fs-chip);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phase {
  margin-top: 4px;
}

.round {
  margin-top: 2px;
}

.hand-guild-fee-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #d5bf96;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.92);
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: #5b4d3d;
}

.guild-fee-counter-label {
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guild-fee-counter-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.guild-fee-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #beab84;
  background: #eadcc4;
}

.guild-fee-dot.is-available {
  background: #c58f2f;
  border-color: #a97822;
}

.guild-fee-counter-count {
  font-size: var(--fs-chip);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.apothecary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  align-content: start;
}

.card {
  background: #fef8f0;
  border-radius: 14px;
  border: 1px solid #e1d2be;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  min-height: 0;
  aspect-ratio: 1 / 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  position: relative;
}

.card.potion-tone-default {
  background: #fef8f0;
  --potion-tint-rgb: 231, 206, 170;
}

.card.potion-tone-vitality {
  background: #f7d4d4;
  border-color: #ddacac;
  --potion-tint-rgb: 206, 86, 86;
}

.card.potion-tone-giant {
  background: #dce9fb;
  border-color: #aac0e0;
  --potion-tint-rgb: 87, 127, 186;
}

.card.potion-tone-serpent {
  background: #d8f0dd;
  border-color: #a7cfae;
  --potion-tint-rgb: 84, 145, 90;
}

.card.potion-tone-morphic {
  background: #e7daf8;
  border-color: #c3afdf;
  --potion-tint-rgb: 137, 99, 181;
}

.card.potion-tone-fortune {
  background: #f7e6bf;
  border-color: #dfc489;
  --potion-tint-rgb: 182, 134, 41;
}

.card.potion-tone-blank {
  background: #fbfbfb;
  border-color: #cfcfcf;
  --potion-tint-rgb: 186, 186, 186;
}

.card.grid-potion-card {
  background: transparent;
  border: none;
  border-color: transparent;
}

.grid-potion-card {
  padding: 6px;
  display: grid;
  grid-template-rows: minmax(0, 57%) minmax(0, 43%);
  gap: 0;
  background: transparent;
  border: none;
  isolation: isolate;
  overflow: visible;
  box-shadow: none;
}

.grid-potion-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: url("../../assets/generated/PotionCard.png") center / cover no-repeat;
  opacity: 0.97;
  -webkit-mask-image: radial-gradient(
    150% 150% at 50% 50%,
    rgba(0, 0, 0, 0.98) 40%,
    rgba(0, 0, 0, 0.82) 64%,
    rgba(0, 0, 0, 0.36) 84%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    150% 150% at 50% 50%,
    rgba(0, 0, 0, 0.98) 40%,
    rgba(0, 0, 0, 0.82) 64%,
    rgba(0, 0, 0, 0.36) 84%,
    rgba(0, 0, 0, 0) 100%
  );
  filter: none;
  pointer-events: none;
  z-index: 1;
}

.grid-potion-card::after {
  content: "";
  position: absolute;
  inset: 30px 28px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
  background: rgba(var(--potion-tint-rgb, 231, 206, 170), 0.72);
  box-shadow:
    0 0 0 2px rgba(var(--potion-tint-rgb, 231, 206, 170), 0.38),
    0 0 26px 8px rgba(var(--potion-tint-rgb, 231, 206, 170), 0.86),
    0 0 54px 16px rgba(var(--potion-tint-rgb, 231, 206, 170), 0.56),
    0 0 92px 24px rgba(var(--potion-tint-rgb, 231, 206, 170), 0.32);
  filter: saturate(1.32);
  opacity: 1;
}

.grid-potion-card > * {
  position: relative;
  z-index: 2;
}

.card.grid-potion-card:hover {
  box-shadow: none;
}

.card.grid-potion-card.selected {
  outline: none;
  box-shadow: none;
}

.card-top-zone {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  padding: 16px 20px 0;
}

.card-bottom-zone {
  display: flex;
  align-items: flex-start;
  min-height: 0;
  padding: 24px 20px 14px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(48, 33, 16, 0.2);
}

.card.selected {
  outline: 2px solid var(--accent-2);
  transform: translateY(-4px);
}

.card .name {
  font-weight: 700;
  font-size: var(--fs-card-title);
  line-height: 1.2;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card .points {
  font-size: var(--fs-chip);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #fff;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  background: #2f5d50;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
  font-weight: 700;
}

.card-economy-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.card .fee {
  font-size: var(--fs-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a3d21;
  border: 1px solid #d4b693;
  border-radius: 8px;
  padding: 4px 6px;
  background: rgba(255, 242, 223, 0.95);
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
}

.card .cost {
  font-size: var(--fs-body-strong);
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: #173028;
  border: 1px solid #9dc2b6;
  border-radius: 8px;
  padding: 4px 6px;
  background: rgba(230, 243, 238, 0.95);
  font-weight: 700;
}

.card .fee.fee-discount-active {
  border-color: #8a3d21;
  background: #fbe2d1;
  color: #6f2e17;
  font-weight: 700;
}

.card .effect {
  font-size: var(--fs-body);
  color: #3f2f22;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-potion-card .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(0.98rem, 0.28vw + 0.92rem, 1.14rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #3a2b1d;
  text-shadow: 0 1px 0 rgba(255, 245, 228, 0.55);
  padding-left: 20px;
  padding-right: 44px;
  min-height: 2.06em;
  text-align: center;
  text-wrap: balance;
}

.grid-potion-card .card-header-row {
  position: relative;
  display: block;
  min-height: 2.28em;
}

.grid-potion-card .card-top-zone {
  padding: 14px 14px 0;
}

.grid-potion-card .card-economy-row {
  gap: 0;
}

.grid-potion-card .cost,
.grid-potion-card .fee,
.grid-potion-card .fee.fee-discount-active {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.grid-potion-card .cost {
  font-size: clamp(0.62rem, 0.1vw + 0.6rem, 0.72rem);
  font-weight: 700;
  color: #173028;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 16px;
}

.grid-potion-card .cost-icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  transform: translateY(2px);
}

.grid-potion-card .cost-icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  padding: 1px 2px;
  color: #173028;
  box-shadow: none;
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
}

.grid-potion-card .cost-icon-chip:focus-visible {
  outline: 1px solid rgba(28, 72, 60, 0.58);
  outline-offset: 1px;
}

.grid-potion-card .cost-icon-chip.is-tooltip-open {
  border-color: rgba(28, 72, 60, 0.42);
  background: rgba(243, 232, 213, 0.86);
}

.grid-potion-card .cost-icon-symbol {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.grid-potion-card .cost-icon-symbol svg {
  width: 100%;
  height: 100%;
  display: block;
}

.grid-potion-card .cost-icon-count {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.72rem, 0.12vw + 0.68rem, 0.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
}

.grid-potion-card .cost-icon-chip::before,
.grid-potion-card .cost-icon-chip::after {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  transition-delay: 0s;
}

.grid-potion-card .cost-icon-meta {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  z-index: 7;
  white-space: nowrap;
  background: rgba(27, 34, 31, 0.95);
  color: #f8f2e8;
  border: 1px solid rgba(228, 205, 171, 0.52);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.62rem, 0.1vw + 0.6rem, 0.72rem);
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.grid-potion-card .cost-icon-chip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  z-index: 6;
  white-space: nowrap;
  background: rgba(27, 34, 31, 0.95);
  color: #f8f2e8;
  border: 1px solid rgba(228, 205, 171, 0.52);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.54rem, 0.06vw + 0.52rem, 0.6rem);
  line-height: 1.15;
}

.grid-potion-card .cost-icon-chip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translate(-50%, 4px);
  z-index: 6;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(27, 34, 31, 0.95);
}

.grid-potion-card .cost-icon-chip:hover::before,
.grid-potion-card .cost-icon-chip:hover::after,
.grid-potion-card .cost-icon-chip:focus-visible::before,
.grid-potion-card .cost-icon-chip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 0.5s;
}

.grid-potion-card .cost-icon-chip.is-tooltip-open::before,
.grid-potion-card .cost-icon-chip.is-tooltip-open::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.grid-potion-card .cost-icon-chip.is-tooltip-open .cost-icon-meta {
  opacity: 1;
  transform: translate(-50%, 0);
}

.grid-potion-card .cost-icon-any-reagent {
  border-color: transparent;
  background: transparent;
  color: #5a4722;
}

.grid-potion-card .cost-icon-free {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.62rem, 0.08vw + 0.58rem, 0.68rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1f4a3d;
}

.grid-potion-card .effect {
  font-size: clamp(0.76rem, 0.16vw + 0.72rem, 0.9rem);
  -webkit-line-clamp: 3;
  line-height: 1.18;
  font-weight: 500;
  color: #271d13;
  text-shadow: 0 1px 0 rgba(255, 245, 230, 0.22);
  text-wrap: pretty;
}

.grid-potion-card .points {
  position: absolute;
  top: -5px;
  right: -2px;
  font-size: clamp(0.64rem, 0.12vw + 0.61rem, 0.74rem);
  padding: 1px 6px;
  letter-spacing: 0.06em;
}

.grid-potion-card .fee-corner {
  position: absolute;
  top: -5px;
  left: -2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.grid-potion-card .fee-corner-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 14px;
  max-height: 50px;
  overflow: hidden;
  padding: 2px 1px;
  border-radius: 10px;
  border: 1px solid rgba(132, 84, 46, 0.48);
  background: rgba(250, 232, 207, 0.82);
  box-shadow: 0 1px 4px rgba(74, 45, 26, 0.18);
}

.grid-potion-card .fee-corner-token,
.grid-potion-card .fee-corner-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid #8d5333;
  background: #f2ca9f;
  color: #5e3018;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
}

.grid-potion-card .fee-corner-empty {
  border-style: dashed;
  opacity: 0.9;
}

.grid-potion-card .fee-corner-overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid #8d5333;
  background: rgba(141, 83, 51, 0.15);
  color: #5e3018;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 2px;
}

.grid-potion-card .fee-corner-discount {
  min-width: 21px;
  border-radius: 999px;
  border: 1px solid rgba(132, 84, 46, 0.56);
  background: rgba(255, 246, 233, 0.94);
  color: #6b3820;
  text-align: center;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.58rem, 0.08vw + 0.56rem, 0.66rem);
  font-weight: 700;
  line-height: 1;
  padding: 1px 3px;
}

.grid-potion-card .fee-corner.is-discount-active .fee-corner-stack,
.grid-potion-card .fee-corner.is-discount-active .fee-corner-discount {
  border-color: #6d3117;
  box-shadow: 0 0 0 1px rgba(109, 49, 23, 0.08);
}

.grid-potion-card .fee-corner.is-discount-active .fee-corner-token,
.grid-potion-card .fee-corner.is-discount-active .fee-corner-discount,
.grid-potion-card .fee-corner.is-discount-active .fee-corner-overflow {
  background: #fbe2d1;
  color: #4e200f;
}

.players-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.player-row {
  appearance: none;
  width: 100%;
  border: 1px solid #e2d5c2;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff7ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.player-row.active {
  border-color: var(--accent-2);
  box-shadow: 0 10px 18px rgba(47, 93, 80, 0.2);
}

.player-row.inactive {
  cursor: pointer;
}

.player-row.inactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(27, 20, 14, 0.18);
}

.player-row.inactive:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(27, 20, 14, 0.2);
}

.player-row:disabled {
  opacity: 1;
  cursor: default;
}

.player-row-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-row-name {
  font-family: "Bitter", "Times New Roman", serif;
  font-size: 0.96rem;
  color: #3f2f24;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.player-row-icons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.player-status-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #c6beae;
  border-radius: 999px;
  padding: 3px 7px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.player-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(40, 40, 40, 0.35);
}

.player-status-icon.is-active {
  background: #eaf6ef;
  border-color: #8cb99d;
  color: #23563a;
}

.player-status-icon.is-active .player-status-dot {
  background: radial-gradient(circle at 35% 35%, #f3fffb 0%, #67ad84 46%, #2f6d4e 100%);
}

.player-status-icon.is-inactive {
  background: #f1ece4;
  border-color: #c9c2b4;
  color: #756a59;
}

.player-status-icon.is-inactive .player-status-dot {
  background: radial-gradient(circle at 35% 35%, #f7f3ed 0%, #c6baab 46%, #9a8e7c 100%);
}

.active-player-overview {
  border: 1px solid #d8c6ab;
  border-radius: 12px;
  background: rgba(255, 247, 234, 0.96);
  padding: 10px;
  gap: 10px;
}

.active-player-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: #4f3b2c;
}

.active-player-status-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.phase-card {
  margin-top: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2d5c2;
  background: #f8efe2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.turn-rail-wrap .phase-card {
  width: min(1000px, 100%);
  max-width: min(1000px, 100%);
  min-height: 148px;
  height: auto;
}

.phase-card[data-phase="draw"] {
  border-color: #8a3d21;
  box-shadow: 0 8px 16px rgba(138, 61, 33, 0.18);
}

.phase-card[data-phase="main"] {
  border-color: #2f5d50;
  box-shadow: 0 8px 16px rgba(47, 93, 80, 0.18);
}

.phase-card[data-phase="brew"] {
  border-color: #caa86a;
  box-shadow: 0 8px 16px rgba(202, 168, 106, 0.2);
}

.phase-card[data-phase="gameover"] {
  border-color: #8a3d21;
  box-shadow: 0 8px 16px rgba(138, 61, 33, 0.22);
}

.phase-title {
  font-size: var(--fs-phase-title);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.phase-active-player {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c4b2c;
}

.phase-instruction {
  font-size: var(--fs-phase-instruction);
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: #5b4d3d;
}

.hand-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hand-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hand-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5b4d3d;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
}

.hand-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.hand-section-grid-potions {
  grid-template-columns: repeat(auto-fit, minmax(92px, 112px));
  justify-content: flex-start;
  gap: 8px;
}

.hand-card {
  border: 1px solid #e2d5c2;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff5e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
}

.hand-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hand-count {
  background: #2f5d50;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
}

.hand-pp {
  font-size: 11px;
  color: #6c4b2c;
  letter-spacing: 0.04em;
}

.owned-potion-card {
  cursor: default;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  aspect-ratio: 1 / 1;
  padding: 6px;
  border-radius: 10px;
}

.owned-potion-card-blank {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 246, 246, 0.98) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(220, 220, 220, 0.2) 0,
      rgba(220, 220, 220, 0.2) 4px,
      rgba(255, 255, 255, 0.14) 4px,
      rgba(255, 255, 255, 0.14) 8px
    );
  border-color: #c4c4c4;
}

.owned-potion-card:hover {
  transform: none;
  box-shadow: none;
}

.owned-potion-title-row {
  width: 100%;
}

.owned-potion-card .name {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-body);
  line-height: 1.15;
}

.owned-potion-blank-source {
  margin-top: 2px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d6d6d;
}

.owned-potion-values {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  font-size: var(--fs-label);
  color: #5b4d3d;
}

.owned-potion-value {
  border: 1px solid #d4b693;
  border-radius: 6px;
  padding: 2px 4px;
  background: rgba(255, 245, 230, 0.95);
  line-height: 1.2;
}

.owned-potion-value strong {
  font-family: "Bitter", "Times New Roman", serif;
}

.owned-potion-modifiers {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.owned-potion-modifiers-empty {
  font-size: var(--fs-label);
  color: #7a664e;
}

.owned-potion-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #c8ad83;
  background: #f3e2c9;
  color: #5b4427;
  font-size: clamp(0.52rem, 0.12vw + 0.5rem, 0.6rem);
  padding: 1px 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.owned-potion-chip-warn {
  border-color: #8a3d21;
  background: #f4d2c5;
  color: #5f2311;
}

.hand-empty {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: #6b5a47;
}

.player {
  border: 1px solid #e2d5c2;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff7ec;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.player.active {
  border-color: var(--accent-2);
  box-shadow: 0 14px 28px rgba(47, 93, 80, 0.25);
  transform: scale(1.015);
  opacity: 1;
  filter: none;
}

.player.inactive {
  opacity: 0.74;
  filter: saturate(0.72);
}

.player h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
}

.hourglass-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #ccb07a;
  background: #f8e7bf;
  color: #5b4d3d;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.player .stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 8px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
}

.player-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.path-view-btn {
  padding: 4px 8px;
  border: 1px solid #ccb07a;
  border-radius: 8px;
  background: #f8e7bf;
  color: #5b4d3d;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.token-placeholders {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.token-placeholder-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid #c6beae;
  border-radius: 8px;
  background: linear-gradient(180deg, #f2eee6 0%, #e5dfd2 100%);
  color: #7b7364;
  white-space: nowrap;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.token-placeholder-btn::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(72, 72, 72, 0.35);
}

.token-placeholder-btn.shroud::before {
  background: radial-gradient(circle at 32% 32%, #e1dde2 0%, #9f96a8 45%, #6f6778 100%);
}

.token-placeholder-btn.shroud.is-unlocked {
  border-color: #ab8fca;
  background: linear-gradient(180deg, #f5ecff 0%, #e6d9f7 100%);
  color: #4e3a67;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(52, 35, 78, 0.16);
}

.token-placeholder-btn.shroud.is-unlocked::before {
  background: radial-gradient(circle at 30% 30%, #f7f2ff 0%, #b8a1d5 42%, #7f689d 100%);
}

.token-placeholder-btn.arcane-ward::before {
  background: radial-gradient(circle at 50% 50%, #ece6df 25%, #9c9389 26%, #9c9389 56%, #ece6df 57%);
}

.token-placeholder-btn.arcane-ward.is-ready {
  border-color: #7f8fb8;
  background: linear-gradient(180deg, #edf2ff 0%, #dbe6ff 100%);
  color: #2c3d66;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(38, 53, 90, 0.18);
}

.token-placeholder-btn.arcane-ward.is-ready::before {
  background: radial-gradient(circle at 35% 35%, #f9fcff 0%, #b9ccf2 44%, #6f85b8 100%);
}

.token-placeholder-btn.arcane-ward.is-spent {
  border-color: #b49a8d;
  background: linear-gradient(180deg, #efe4df 0%, #e1d3cc 100%);
  color: #6a5146;
}

.token-placeholder-btn.arcane-ward.is-spent::before {
  background: radial-gradient(circle at 45% 45%, #f3e8e2 0%, #c0a697 46%, #8a6f62 100%);
}

.token-placeholder-btn:disabled {
  opacity: 1;
}

.inspiration-status-layout {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.inspiration-status-section {
  min-width: 0;
  border: 1px solid #e2d5c2;
  border-radius: 10px;
  background: #fffaf1;
  padding: 6px 7px;
}

.play-now {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.play-now-title,
.always-on-title {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5b4d3d;
}

.play-now-list,
.always-on-list,
.waiting-trigger-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.play-now-row,
.always-on-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.play-now-name,
.play-now-empty,
.always-on-name,
.always-on-empty,
.waiting-trigger-row,
.waiting-trigger-empty {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body);
  color: #4f5b55;
  overflow-wrap: anywhere;
}

.play-now-timing {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6c4b2c;
}

.always-on-points {
  border: 1px solid #ccb07a;
  border-radius: 999px;
  padding: 1px 6px;
  background: #f8e7bf;
  color: #5b4d3d;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.waiting-triggers {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.waiting-trigger-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #d6c4a8;
  border-radius: 8px;
  background: #fff3df;
  color: #5b4d3d;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 6px;
  min-height: 38px;
  cursor: pointer;
  touch-action: manipulation;
}

.waiting-trigger-btn strong {
  margin-left: 4px;
  font-size: 11px;
  color: #2f5d50;
}

.waiting-trigger-btn[aria-expanded="true"] {
  border-color: #b7905f;
  background: #fcebd1;
}

.waiting-trigger-details {
  margin-top: 2px;
}

.waiting-trigger-details.hidden {
  display: none;
}

.play-now-btn {
  padding: 3px 7px;
  min-height: 38px;
  border: none;
  border-radius: 8px;
  background: #2f5d50;
  color: #fff;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-label);
  cursor: pointer;
  touch-action: manipulation;
}

.waiting-trigger-btn:active,
.play-now-btn:active,
.path-view-btn:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.play-now-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.phase-actions {
  display: none;
  margin-top: 0;
  min-height: 40px;
  align-items: flex-start;
}

.phase-actions button {
  min-width: 158px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.15;
  touch-action: manipulation;
}

.phase-card[data-phase="draw"] .phase-actions.draw {
  display: flex;
}

.phase-card[data-phase="main"] .phase-actions.main {
  display: flex;
}

.phase-card[data-phase="brew"] .phase-actions.brew {
  display: flex;
  align-items: flex-start;
  min-height: 0;
}

.brew-choices {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-height: min(44vh, 320px);
}

.brew-choices.visible {
  display: flex;
  padding: 8px;
  border: 1px solid #d9c8ab;
  border-radius: 10px;
  background: #fff5e7;
  overflow-y: auto;
}

.brew-primary-actions {
  width: 100%;
}

.brew-choice-title {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b4d3d;
}

.brew-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 230px);
  align-items: center;
  gap: 6px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
}

.brew-choice-label {
  min-width: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.brew-choice-select {
  width: 100%;
  min-width: 0;
  max-width: 230px;
  justify-self: end;
  min-height: 32px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #ccb998;
  background: #fff;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
}

.action-row button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.03em;
  background: linear-gradient(145deg, #447e6d 0%, #2f5d50 100%);
  color: white;
  box-shadow:
    0 8px 14px rgba(31, 27, 22, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.action-row button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 12px 18px rgba(31, 27, 22, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.action-row button:not(:disabled):active {
  transform: translateY(1px);
  filter: brightness(0.98);
  box-shadow:
    0 3px 7px rgba(31, 27, 22, 0.24),
    inset 0 2px 4px rgba(0, 0, 0, 0.24);
}

#guildFeeBtn {
  background: linear-gradient(145deg, #b35b3a 0%, #8a3d21 100%);
  border-color: rgba(255, 236, 224, 0.4);
}

#drawBtn {
  background: linear-gradient(145deg, #2f7d73 0%, #225f58 100%);
  border-color: rgba(219, 255, 249, 0.36);
}

#drawCatalystBtn {
  background: linear-gradient(145deg, #4e76b4 0%, #3a5b8f 100%);
  border-color: rgba(223, 235, 255, 0.36);
}

#upgradePathBtn {
  background: linear-gradient(145deg, #7f61af 0%, #624688 100%);
  border-color: rgba(237, 226, 255, 0.34);
}

#buyInspirationBtn {
  background: linear-gradient(145deg, #8b6f34 0%, #6a5428 100%);
  border-color: rgba(255, 242, 205, 0.36);
}

#doNothingBtn {
  background: linear-gradient(145deg, #6f685f 0%, #544e47 100%);
  border-color: rgba(240, 234, 225, 0.34);
}

#brewPotionBtn {
  background: linear-gradient(145deg, #cd8840 0%, #a56529 100%);
  border-color: rgba(255, 236, 214, 0.36);
}

#exchangeElementsBtn {
  background: linear-gradient(145deg, #2f6f8f 0%, #23546c 100%);
  border-color: rgba(220, 242, 255, 0.36);
}

#endTurnBtn {
  background: linear-gradient(145deg, #8a3d4e 0%, #652c39 100%);
  border-color: rgba(250, 221, 228, 0.36);
}

.action-row button:disabled {
  opacity: 0.52;
  transform: none;
  filter: grayscale(0.22);
  box-shadow: none;
  cursor: not-allowed;
}

.selection {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
  margin-top: 10px;
  color: #5b4d3d;
}

.event-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body);
  max-height: 220px;
  overflow-y: auto;
}

.event-log-item {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3eadc;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.event-log-tag {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #d2b88b;
  background: #f7ecd8;
  color: #5b4d3d;
  font-size: var(--fs-log-tag);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.event-log-time {
  font-size: var(--fs-log-time);
  letter-spacing: 0.05em;
  color: #6d5e4f;
  white-space: nowrap;
}

.event-log-message {
  min-width: 0;
  line-height: 1.4;
}

.event-type-draw .event-log-tag {
  background: #dce9fb;
  border-color: #aac0e0;
  color: #2d4d77;
}

.event-type-brew .event-log-tag {
  background: #d8f0dd;
  border-color: #a7cfae;
  color: #245f37;
}

.event-type-inspiration .event-log-tag {
  background: #ece0fa;
  border-color: #c3afdf;
  color: #59377f;
}

.event-type-round .event-log-tag {
  background: #f8e7bf;
  border-color: #ccb07a;
  color: #5b4d3d;
}

.event-type-turn .event-log-tag {
  background: #fbe2d1;
  border-color: #d6a98a;
  color: #7a3f21;
}

.log-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 42%);
  gap: 12px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.log-art {
  margin: 0;
  border: 1px solid #e2d5c2;
  border-radius: 12px;
  background: #f3eadc;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.log-art img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.footer {
  padding: 12px calc(32px + var(--safe-area-right)) calc(20px + var(--safe-area-bottom)) calc(32px + var(--safe-area-left));
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: #5b4d3d;
}

.event-log-modal-card {
  width: min(1240px, calc(100vw - 20px));
}

.event-log-modal-layout {
  grid-template-columns: minmax(0, 1fr);
  min-height: min(62vh, 680px);
}

.event-log-modal-card .event-log {
  max-height: none;
  min-height: 0;
  padding-right: 4px;
}

.player-inspect-modal-card {
  width: min(900px, calc(100vw - 20px));
}

.player-inspect-summary {
  display: grid;
  gap: 10px;
}

.player-inspect-private-note {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
  color: #6c4b2c;
  line-height: 1.4;
}

.player-inspect-potions {
  display: grid;
  gap: 8px;
}

.player-inspect-potions-title {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6c4b2c;
}

.player-inspect-potions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
  gap: 8px;
}

.player-inspect-potion-card {
  min-height: 106px;
}

.player-inspect-potion-empty {
  border: 1px dashed #d5bf96;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: #6c4b2c;
  background: #fffaf1;
}

.player-inspect-status-layout {
  margin-top: 0;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(10px + var(--safe-area-top)) calc(10px + var(--safe-area-right)) calc(10px + var(--safe-area-bottom)) calc(10px + var(--safe-area-left));
  background: rgba(31, 27, 22, 0.62);
  z-index: 1000;
  overscroll-behavior: contain;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(560px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid #d9c3a0;
  background: #fff8ed;
  box-shadow: 0 24px 48px rgba(20, 15, 10, 0.38);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.modal:not(.hidden) .modal-card {
  animation: modal-reveal-in 180ms ease-out;
}

.modal-progress {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c4b2c;
}

.modal-title {
  margin: 0;
  font-size: var(--fs-modal-title);
  letter-spacing: 0.03em;
}

.modal-body {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body-strong);
  line-height: 1.45;
  color: #5b4d3d;
}

.rules-modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
}

.rules-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rules-modal-status {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  color: #5b4d3d;
}

.rules-modal-content {
  margin: 0;
  border: 1px solid rgba(191, 160, 119, 0.6);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px 12px;
  max-height: min(68vh, 620px);
  overflow: auto;
  white-space: pre-wrap;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(0.78rem, 0.2vw + 0.74rem, 0.9rem);
  line-height: 1.45;
  color: #3f2f24;
}

.path-upgrade-modal-card {
  width: min(760px, calc(100vw - 32px));
}

.path-upgrade-form {
  display: grid;
  gap: 10px;
}

.path-upgrade-row {
  display: grid;
  gap: 6px;
}

.path-upgrade-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-chip);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b4d3d;
}

.path-upgrade-select {
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #ccb998;
  background: #fff;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body);
  color: #2f261d;
  padding: 6px 8px;
}

.path-upgrade-summary {
  margin: 0;
  border: 1px solid #d9c8ab;
  border-radius: 10px;
  background: #fff5e7;
  padding: 8px 10px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body);
  color: #5b4d3d;
  line-height: 1.4;
}

.end-round-owner {
  font-size: 13px;
  line-height: 1.4;
  color: #6c4b2c;
  border-radius: 10px;
  padding: 4px 8px;
  background: rgba(197, 165, 112, 0.18);
}

.end-round-owner.active-owner {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #47220d;
  border: 1px solid #b4874b;
  background: #f3debc;
}

.modal-action {
  align-self: flex-end;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #2f5d50;
  color: #fff;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions .modal-action {
  align-self: auto;
}

.modal-action-secondary {
  background: #8a3d21;
}

.modal-action-primary {
  background: #2f5d50;
}

.modal-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(20, 15, 10, 0.22);
  filter: brightness(1.03);
}

.modal-action:active {
  transform: translateY(1px);
  box-shadow: 0 4px 8px rgba(20, 15, 10, 0.2);
  filter: brightness(0.97);
}

.modal-action:focus-visible {
  outline: 2px solid #2f5d50;
  outline-offset: 2px;
}

.modal-action:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  filter: saturate(0.65);
  transform: none;
  box-shadow: none;
}

.boons-modal-card {
  width: min(720px, calc(100vw - 32px));
}

.player-setup-modal-card {
  width: min(460px, calc(100vw - 32px));
  border-color: #ccb588;
  background: linear-gradient(165deg, #fff9ee 0%, #f9edd7 100%);
}

.player-setup-confirm-gate {
  border: 1px solid #dbc6a4;
  border-radius: 10px;
  background: #fff5e7;
  padding: 10px 12px;
}

.player-setup-confirm-text {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.45;
  color: #5b4d3d;
}

.starting-gift-modal-card {
  width: min(620px, calc(100vw - 32px));
  border-color: #ccb588;
  background: linear-gradient(165deg, #fff9ee 0%, #f9edd7 100%);
}

.save-slot-modal-card {
  width: min(520px, calc(100vw - 32px));
  border-color: #ccb588;
  background: linear-gradient(165deg, #fff9ee 0%, #f7ecd8 100%);
}

.diagnostics-modal-card {
  width: min(700px, calc(100vw - 32px));
  border-color: #9da9c8;
  background: linear-gradient(165deg, #f8f9ff 0%, #eef2ff 100%);
}

.diagnostics-list {
  margin: 0;
  padding: 10px 14px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #c7d1ea;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #2f3550;
}

.diagnostics-list li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d5ddf0;
}

.diagnostics-list-time {
  color: #5e6885;
  font-size: 11px;
}

.diagnostics-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}

.starting-gift-form {
  display: grid;
  gap: 10px;
}

.starting-gift-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.starting-gift-row[hidden] {
  display: none !important;
}

.modal-actions .modal-action[hidden] {
  display: none !important;
}

.starting-gift-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #6c4b2c;
}

.starting-gift-select {
  width: 100%;
  border: 1px solid #d8c29a;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: #3b2f24;
}

.starting-gift-helper {
  border: 1px solid #e1d2b6;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 7px 10px 8px;
}

.starting-gift-helper[hidden] {
  display: none !important;
}

.starting-gift-helper ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.starting-gift-helper li {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 11px;
  line-height: 1.35;
  color: #4e4031;
}

.brew-payment-modal-card {
  width: min(560px, calc(100vw - 32px));
  border-color: #ccb588;
  background: linear-gradient(165deg, #fff9ee 0%, #f7ecd8 100%);
}

.brew-payment-modal-card .modal-actions {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brew-payment-modal-card .modal-action {
  min-width: 148px;
}

.exchange-modal-card {
  width: min(520px, calc(100vw - 32px));
  border-color: #ccb588;
  background: linear-gradient(165deg, #fff9ee 0%, #f7ecd8 100%);
}

.exchange-modal-form {
  display: grid;
  gap: 10px;
}

.exchange-hand-summary {
  border: 1px solid #d8c29a;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 8px 10px;
}

.exchange-hand-summary-title {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #6c4b2c;
  margin-bottom: 6px;
}

.exchange-hand-summary-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: #3b2f24;
}

.exchange-hand-summary-key {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b5a45;
}

.exchange-hand-summary-value {
  font-weight: 600;
}

.exchange-modal-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exchange-modal-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #6c4b2c;
}

.exchange-modal-select {
  width: 100%;
  border: 1px solid #d8c29a;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: #3b2f24;
}

.exchange-modal-card .modal-actions {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.exchange-modal-card .modal-action {
  min-width: 148px;
}

.exchange-commit-result {
  margin: 0;
  min-height: 20px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #5b4d3d;
}

.exchange-commit-result.success {
  color: #245f37;
}

.exchange-commit-result.failure {
  color: #8a3d21;
}

.fortune-brew-modal-card {
  width: min(760px, calc(100vw - 32px));
  border-color: #ccb588;
  background: linear-gradient(160deg, #fff7e8 0%, #fdf1d8 100%);
}

.fortune-brew-hint {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: #5b4d3d;
  font-size: 13px;
  line-height: 1.4;
}

.fortune-brew-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.fortune-brew-choice-card {
  text-align: left;
  border: 1px solid #d8c29a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdfa 0%, #f9ecd1 100%);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 8px 18px rgba(20, 15, 10, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.fortune-brew-choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(20, 15, 10, 0.2);
}

.fortune-brew-choice-name {
  font-size: 15px;
  color: #5b4d3d;
  font-weight: 700;
}

.fortune-brew-choice-effect {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  color: #4f5b55;
}

.fortune-brew-choice-cta {
  margin-top: auto;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a3d21;
}

.inspiration-modal-card {
  border-color: #b18fc9;
  background: linear-gradient(165deg, #fcf5ff 0%, #fff3db 100%);
  box-shadow:
    0 24px 48px rgba(20, 15, 10, 0.42),
    0 0 0 1px rgba(177, 143, 201, 0.24),
    0 0 32px rgba(177, 143, 201, 0.3);
  position: relative;
  overflow: hidden;
  animation: inspiration-reveal-in 220ms ease-out;
}

#inspirationModal:not(.hidden) {
  background:
    radial-gradient(circle at 50% 12%, rgba(226, 196, 255, 0.22) 0%, rgba(226, 196, 255, 0) 42%),
    rgba(31, 27, 22, 0.68);
}

.inspiration-modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% -20%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 0% 100%, rgba(199, 160, 236, 0.28), rgba(199, 160, 236, 0) 42%);
  pointer-events: none;
}

.inspiration-modal-card::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -30%;
  width: 34%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  pointer-events: none;
  transform: translateX(0) rotate(8deg);
  animation: inspiration-sheen 540ms ease-out 80ms 1 both;
}

.inspiration-modal-card > * {
  position: relative;
  z-index: 1;
}

.inspiration-source {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #62487d;
  font-size: var(--fs-chip);
}

.inspiration-effect-frame {
  border: 1px solid #d8bfe6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
}

.inspiration-effect-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-body);
  color: #6c4b2c;
  margin-bottom: 6px;
}

.inspiration-effect-text {
  color: #3b2f24;
  font-size: var(--fs-card-title);
  line-height: 1.5;
}

.inspiration-hint {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: #5b4d3d;
  font-size: var(--fs-body-strong);
  line-height: 1.4;
}

.inspiration-shroud-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspiration-shroud-rows[hidden] {
  display: none !important;
}

.inspiration-shroud-heading {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #5d4a73;
}

.inspiration-shroud-row {
  margin-top: -2px;
}

.inspiration-target-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspiration-target-row[hidden] {
  display: none !important;
}

.inspiration-target-potion-row {
  margin-top: -2px;
}

.inspiration-target-label {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #6c4b2c;
}

.inspiration-target-select {
  width: 100%;
  border: 1px solid #d8bfe6;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.88);
  color: #3b2f24;
}

.inspiration-target-row.is-disabled .inspiration-target-label {
  color: #7a7284;
}

.inspiration-target-row.is-disabled .inspiration-target-select {
  border-color: #d6d0dd;
  background: #ece8f1;
  color: #736b7d;
  cursor: not-allowed;
}

.inspiration-modal-card .modal-actions {
  margin-top: 2px;
  flex-wrap: wrap;
}

#inspirationModal.can-store .modal-actions {
  justify-content: space-between;
}

.inspiration-modal-card .modal-action {
  min-width: 148px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.inspiration-modal-card .modal-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(20, 15, 10, 0.25);
  filter: brightness(1.03);
}

.inspiration-modal-card .modal-action:focus-visible {
  outline: 2px solid #2f5d50;
  outline-offset: 2px;
}

#inspirationPlayBtn.modal-action {
  background: linear-gradient(135deg, #2f5d50, #457a67);
}

#inspirationStoreBtn.modal-action-secondary {
  background: linear-gradient(135deg, #8a3d21, #a85b35);
}

@keyframes inspiration-reveal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes inspiration-sheen {
  from {
    transform: translateX(-120%) rotate(8deg);
    opacity: 0;
  }
  to {
    transform: translateX(320%) rotate(8deg);
    opacity: 1;
  }
}

@keyframes modal-reveal-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-draw-pulse {
  from {
    box-shadow: 0 0 0 rgba(47, 93, 80, 0);
  }
  40% {
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.25), var(--shadow);
  }
  to {
    box-shadow: var(--shadow);
  }
}

@keyframes panel-draw-pulse-soft {
  from {
    box-shadow: 0 0 0 rgba(64, 111, 206, 0);
  }
  40% {
    box-shadow: 0 0 0 2px rgba(64, 111, 206, 0.24), var(--shadow);
  }
  to {
    box-shadow: var(--shadow);
  }
}

@keyframes panel-brew-pulse {
  from {
    box-shadow: 0 0 0 rgba(138, 61, 33, 0);
  }
  40% {
    box-shadow: 0 0 0 3px rgba(138, 61, 33, 0.22), var(--shadow);
  }
  to {
    box-shadow: var(--shadow);
  }
}

@keyframes panel-brew-pulse-soft {
  from {
    box-shadow: 0 0 0 rgba(202, 168, 106, 0);
  }
  40% {
    box-shadow: 0 0 0 2px rgba(202, 168, 106, 0.22), var(--shadow);
  }
  to {
    box-shadow: var(--shadow);
  }
}

/* FB-212 silhouette variety system + guardrails */
.panel,
.phase-card {
  border-radius: var(--shape-panel-radius);
}

.panel::before {
  border-radius: var(--shape-panel-inner-radius);
}

.modal-card {
  border-radius: var(--shape-modal-radius);
}

.card,
.hand-card,
.player,
.intro-save-slot,
.inspiration-status-section,
.log-art,
.fortune-brew-choice-card,
.exchange-hand-summary {
  border-radius: var(--shape-card-radius);
}

.controls button,
.action-row button,
.intro-action,
.modal-action,
.path-view-btn,
.waiting-trigger-btn,
.play-now-btn {
  border-radius: var(--shape-button-radius);
}

.pile-chip,
.hand-count,
.hourglass-badge,
.event-log-tag,
.owned-potion-chip,
.always-on-points,
.hand-guild-fee-counter,
.intro-save-slot-badge,
.grid-potion-card .points,
.grid-potion-card .fee-corner-discount {
  border-radius: var(--shape-chip-radius);
}

.phase-card {
  overflow: visible;
}

:where(
  .controls button,
  .controls select,
  .action-row button,
  .log-controls button,
  .intro-action,
  .modal-action,
  .path-view-btn,
  .waiting-trigger-btn,
  .play-now-btn,
  .fortune-brew-choice-card,
  .starting-gift-select,
  .exchange-modal-select,
  .path-upgrade-select,
  .brew-choice-select,
  .inspiration-target-select
):focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--focus-ring-glow);
}

.panel.fx-draw-pulse {
  animation: panel-draw-pulse 280ms ease-out;
}

.panel.fx-draw-pulse-soft {
  animation: panel-draw-pulse-soft 280ms ease-out;
}

.panel.fx-brew-pulse {
  animation: panel-brew-pulse 300ms ease-out;
}

.panel.fx-brew-pulse-soft {
  animation: panel-brew-pulse-soft 300ms ease-out;
}

.boons-board {
  overflow-x: auto;
}

.path-modal-card {
  width: min(1320px, calc(100vw - 32px));
}

.path-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 22vw, 250px);
  gap: 8px;
  align-items: stretch;
}

.path-board {
  overflow-x: auto;
  min-width: 0;
}

.path-art-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.path-art-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  display: block;
}

.path-board-note {
  margin-bottom: 8px;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: #5b4d3d;
}

.path-board-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: clamp(9px, 0.72vw, 12px);
}

.path-board-table th,
.path-board-table td {
  border: 1px solid #d9c3a0;
  padding: clamp(4px, 0.48vw, 8px) clamp(3px, 0.4vw, 6px);
  text-align: center;
  vertical-align: middle;
}

.path-board-table thead th {
  background: #f4e6d2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
}

.path-board-table tbody th {
  background: #fbf2e3;
  min-width: 64px;
}

.path-metric-cell {
  background: #fcf3e4;
  font-size: 12px;
  font-weight: 600;
  color: #4f5b55;
}

.path-board-table .path-row-start th,
.path-board-table .path-row-start td {
  background: #efe5d2;
}

.path-track-cell {
  min-width: clamp(96px, 8.6vw, 140px);
  text-align: left;
}

.path-track-text {
  min-height: clamp(18px, 2.2vw, 30px);
  margin-bottom: 6px;
  font-size: clamp(8px, 0.68vw, 11px);
  line-height: 1.25;
  color: #5b4d3d;
}

.path-track-token {
  display: flex;
  justify-content: center;
  align-items: center;
}

.path-track-active .path-track-text {
  color: #2f5d50;
  font-weight: 600;
}

.path-token {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(40, 40, 40, 0.35);
  background: var(--token-color, #8a3d21);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 1px 3px rgba(20, 20, 20, 0.2);
}

.path-slot-empty {
  color: #9c8c72;
  font-size: 11px;
}

.boons-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  font-size: 13px;
}

.boons-table th,
.boons-table td {
  border: 1px solid #d9c3a0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.boons-table th {
  background: #f4e6d2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
}

.boons-table tbody tr.active {
  background: #e4f1ec;
  box-shadow: inset 0 0 0 1px #2f5d50;
}

@media (max-width: 1050px) {
  .path-modal-layout {
    grid-template-columns: 1fr;
  }

  .path-art-panel {
    min-height: 0;
  }

  .path-art-image {
    max-height: 260px;
  }
}

@media (max-width: 1100px) {
  .turn-rail-wrap {
    padding: 12px 22px 0;
  }

  .card-piles-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "board"
      "players"
      "hand";
  }

  .event-log-modal-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  :root {
    --fs-label: clamp(0.74rem, 0.3vw + 0.7rem, 0.82rem);
    --fs-chip: clamp(0.78rem, 0.34vw + 0.72rem, 0.9rem);
    --fs-body: clamp(0.84rem, 0.34vw + 0.78rem, 0.96rem);
    --fs-body-strong: clamp(0.9rem, 0.34vw + 0.84rem, 1rem);
    --fs-button: clamp(0.86rem, 0.28vw + 0.82rem, 0.94rem);
  }

  body {
    background-attachment: scroll;
  }

  body::after {
    opacity: 0.08;
  }

  .top {
    padding: calc(14px + var(--safe-area-top)) calc(14px + var(--safe-area-right)) 16px calc(14px + var(--safe-area-left));
    min-height: 104px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .controls {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
  }

  .controls select,
  .controls button {
    min-height: 44px;
    font-size: 14px;
  }

  .intro-gateway {
    padding: calc(12px + var(--safe-area-top)) calc(14px + var(--safe-area-right)) calc(18px + var(--safe-area-bottom)) calc(14px + var(--safe-area-left));
    align-items: start;
  }

  .intro-gateway-card {
    width: 100%;
    padding: 18px 14px 14px;
    border-radius: 16px;
  }

  .intro-title {
    margin-top: 10px;
    line-height: 1.08;
  }

  .intro-actions {
    flex-direction: column;
    gap: 10px;
  }

  .intro-action {
    width: 100%;
  }

  .intro-save-slots-list {
    grid-template-columns: 1fr;
  }

  .intro-rules {
    padding: 10px;
  }

  .intro-rules-header {
    flex-direction: column;
    align-items: stretch;
  }

  .intro-rules-content {
    max-height: min(50vh, 360px);
  }

  .grid {
    padding: 14px calc(14px + var(--safe-area-right)) calc(18px + var(--safe-area-bottom)) calc(14px + var(--safe-area-left));
    gap: 14px;
    grid-template-areas:
      "board"
      "hand"
      "players";
  }

  .turn-rail-wrap {
    padding: 10px calc(14px + var(--safe-area-right)) 0 calc(14px + var(--safe-area-left));
  }

  .turn-rail-wrap .phase-card {
    width: 100%;
    height: auto;
    min-height: 116px;
  }

  .panel {
    padding: 12px;
    min-height: 0;
  }

  .panel.players {
    max-height: min(35vh, 280px);
  }

  .panel.hand {
    max-height: min(40vh, 330px);
  }

  .players-area {
    min-height: 0;
  }

  .hand-grid {
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  .pile-chip {
    min-height: 34px;
  }

  .action-row button {
    min-height: 44px;
    padding: 9px 12px;
  }

  .phase-card[data-phase="main"] .phase-actions.main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .phase-card[data-phase="main"] .phase-actions.main button {
    width: 100%;
  }

  .phase-card[data-phase="brew"] .phase-actions.brew .brew-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .phase-card[data-phase="brew"] .phase-actions.brew #endTurnBtn {
    grid-column: 1 / -1;
  }

  .phase-actions button {
    min-width: 0;
    white-space: normal;
  }

  .brew-choice-row {
    grid-template-columns: 1fr;
  }

  .brew-choice-label {
    white-space: normal;
  }

  .brew-choice-select {
    max-width: none;
    justify-self: stretch;
  }

  .phase-card[data-phase="brew"] .phase-actions.brew {
    display: flex;
    margin-top: 2px;
    max-width: none;
    min-height: 0;
  }

  .brew-choices {
    max-width: none;
    max-height: min(48vh, 360px);
  }

  .inspiration-status-layout {
    grid-template-columns: 1fr;
  }

  .card {
    aspect-ratio: auto;
    min-height: 118px;
  }

  .owned-potion-card {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .card .points {
    padding: 2px 8px;
  }

  .player-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .player-row-head {
    justify-content: space-between;
  }

  .player-row-icons {
    justify-content: flex-start;
  }

  .player h3 {
    font-size: 16px;
  }

  .player .stats {
    font-size: 12px;
    gap: 3px 8px;
  }

  .event-log-item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 8px;
  }

  .event-log-time {
    grid-column: 2;
  }

  .event-log-message {
    grid-column: 1 / span 2;
  }

  .modal {
    align-items: flex-start;
    padding: calc(8px + var(--safe-area-top)) calc(8px + var(--safe-area-right)) calc(8px + var(--safe-area-bottom)) calc(8px + var(--safe-area-left));
  }

  .modal-card {
    width: min(100%, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
    padding: 12px;
    gap: 8px;
  }

  .modal-card > * {
    min-width: 0;
  }

  .rules-modal-header {
    position: sticky;
    top: -2px;
    z-index: 3;
    padding-bottom: 6px;
    background: inherit;
  }

  .rules-modal-header .modal-action {
    width: auto;
    min-width: 100px;
  }

  .rules-modal-content,
  .event-log-modal-card .event-log,
  .player-inspect-summary,
  .path-board,
  .boons-board {
    max-height: min(52dvh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
  }

  .event-log-modal-layout {
    min-height: 0;
  }

  .inspiration-modal-card,
  .exchange-modal-card,
  .brew-payment-modal-card,
  .path-modal-card,
  .fortune-brew-modal-card {
    width: calc(100vw - 20px);
    padding: 14px;
  }

  .exchange-modal-card .modal-actions,
  .brew-payment-modal-card .modal-actions,
  .inspiration-modal-card .modal-actions,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions {
    margin-top: auto;
    position: sticky;
    bottom: -2px;
    z-index: 2;
    padding-top: 10px;
    background: linear-gradient(
      180deg,
      rgba(255, 248, 237, 0) 0%,
      rgba(255, 248, 237, 0.9) 24%,
      #fff8ed 62%
    );
  }

  .exchange-modal-card .modal-action,
  .brew-payment-modal-card .modal-action,
  .inspiration-modal-card .modal-action,
  .modal-action {
    width: 100%;
  }

  .path-modal-layout {
    grid-template-columns: 1fr;
  }

  .path-art-panel {
    min-height: 0;
  }

  .path-art-image {
    max-height: 220px;
  }

  .fortune-brew-choices {
    grid-template-columns: 1fr;
  }

  .path-board-table th,
  .path-board-table td {
    padding: 6px 5px;
  }

  .path-track-cell {
    min-width: 138px;
  }

  .path-track-text {
    min-height: 0;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .apothecary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    min-height: 104px;
  }

  .grid-potion-card {
    padding: 4px;
  }

  .grid-potion-card .card-top-zone {
    padding: 10px 10px 0;
  }

  .grid-potion-card .card-bottom-zone {
    padding: 16px 10px 10px;
  }

  .grid-potion-card .name {
    padding-left: 14px;
    padding-right: 32px;
    min-height: 1.3em;
    -webkit-line-clamp: 1;
    font-size: clamp(0.86rem, 0.28vw + 0.82rem, 0.96rem);
  }

  .grid-potion-card .effect {
    -webkit-line-clamp: 2;
    font-size: clamp(0.74rem, 0.2vw + 0.7rem, 0.84rem);
    line-height: 1.12;
  }

  .grid-potion-card .cost-icon-symbol {
    width: 18px;
    height: 18px;
  }

  .grid-potion-card .points {
    right: -1px;
  }

  .grid-potion-card .fee-corner {
    left: -1px;
  }
}

@media (hover: none) {
  .controls button:not(:disabled):hover,
  .action-row button:not(:disabled):hover,
  .player-row.inactive:hover,
  .fortune-brew-choice-card:hover,
  .modal-action:hover,
  .inspiration-modal-card .modal-action:hover {
    transform: none;
    box-shadow: inherit;
    filter: none;
  }

  .grid-potion-card .cost-icon-chip::before,
  .grid-potion-card .cost-icon-chip::after {
    display: none;
  }
}

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