:root {
  color-scheme: dark;
  --bg: #111714;
  --surface: #1d2721;
  --surface-2: #26322d;
  --line: #45544a;
  --text: #f2f4e8;
  --muted: #b8c4b7;
  --gold: #d8b45d;
  --mint: #8bd6a4;
  --coral: #ed8f73;
  --blue: #93b7df;
  --danger: #d96b67;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 23, 20, .8), rgba(17, 23, 20, .98)),
    url("assets/seasonal-harvest-cycle.jpg") center / cover fixed;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  border: 1px solid rgba(242, 244, 232, .22);
  background: #2e3d35;
  color: var(--text);
  border-radius: 7px;
  min-height: 36px;
  padding: 0 11px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: var(--gold);
  outline: none;
}

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

button.muted,
button[aria-pressed="false"] {
  color: var(--muted);
  border-color: rgba(242, 244, 232, .14);
  background: rgba(46, 61, 53, .62);
}

.shell {
  width: min(1540px, 100%);
  margin: 0 auto;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.victoryOverlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(216, 180, 93, .22), transparent 32%),
    rgba(9, 13, 11, .58);
  backdrop-filter: blur(7px);
  animation: victoryFade .42s ease-out;
}

.victoryOverlay[hidden] {
  display: none;
}

.victoryOverlay::before,
.victoryOverlay::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 154, .32);
  animation: victoryRing 1.7s ease-out infinite;
}

.victoryOverlay::after {
  inset: 20%;
  animation-delay: .28s;
}

.victoryPanel {
  position: relative;
  z-index: 1;
  width: min(460px, 92vw);
  padding: 28px;
  border: 1px solid rgba(255, 230, 154, .42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(38, 50, 45, .96), rgba(18, 25, 21, .96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48), 0 0 55px rgba(216, 180, 93, .18);
  text-align: center;
  animation: victoryPanelPop .5s cubic-bezier(.2, .8, .2, 1);
}

.victoryPanel::before {
  content: "";
  position: absolute;
  inset: -18px;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 24%, #ffe69a 0 3px, transparent 4px),
    radial-gradient(circle at 86% 18%, #8bd6a4 0 3px, transparent 4px),
    radial-gradient(circle at 76% 82%, #93b7df 0 3px, transparent 4px),
    radial-gradient(circle at 18% 78%, #ed8f73 0 3px, transparent 4px);
  animation: sparkleDrift 1.4s ease-out infinite;
}

.victoryOverlay.loss .victoryPanel {
  border-color: rgba(147, 183, 223, .42);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .52), 0 0 48px rgba(147, 183, 223, .14);
}

#victoryKicker {
  display: block;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .78rem;
}

#victoryTitle {
  display: block;
  margin-top: 8px;
  color: #ffe69a;
  font-size: 3rem;
  line-height: 1;
}

.victoryOverlay.loss #victoryTitle {
  color: #cce3ff;
}

#victoryScore {
  margin: 12px 0 18px;
  color: var(--text);
  font-weight: 900;
}

.victoryActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

#victoryRestartBtn {
  width: 100%;
}

.shell:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(17, 23, 20, .78), rgba(17, 23, 20, .96)),
    url("assets/seasonal-harvest-cycle.jpg") center / cover fixed;
}

.topbar,
.panel,
.fieldWrap {
  background: rgba(22, 31, 26, .88);
  border: 1px solid rgba(242, 244, 232, .14);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 7px 10px;
  border-radius: 8px;
}

.topbar > div:first-child {
  flex: 0 1 330px;
  min-width: 210px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1rem, 1.35vw, 1.5rem);
  line-height: 1.05;
}

h2 {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--muted);
}

#phaseText {
  margin-top: 3px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.12;
}

.meterRow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.meterRow button {
  min-height: 31px;
  padding: 0 9px;
  font-size: .72rem;
  white-space: nowrap;
}

.meter {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 4px;
  min-width: 92px;
  padding: 4px 7px;
  border: 1px solid rgba(242, 244, 232, .14);
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
}

.meter.energyBurst {
  animation: meterBurst .72s ease-out;
  border-color: rgba(216, 180, 93, .75);
}

.meter.energyBurst::after {
  content: attr(data-fx);
  position: absolute;
  right: 8px;
  top: -22px;
  max-width: min(280px, 68vw);
  color: #ffe69a;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
  animation: floatUp .82s ease-out forwards;
}

.meter span,
.meter small {
  color: var(--muted);
  font-size: .62rem;
}

.meter strong {
  font-size: 1rem;
  color: var(--gold);
}

.gameLayout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(560px, 1fr) minmax(260px, 300px);
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  align-items: stretch;
  overflow: hidden;
}

.shell:fullscreen .gameLayout {
  grid-template-columns: minmax(280px, 18vw) minmax(680px, 1fr) minmax(330px, 20vw);
  gap: 18px;
}

.shell:fullscreen .topbar {
  padding: 16px 18px;
}

.shell:fullscreen .fieldWrap {
  padding: 18px;
}

.fieldWrap {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  padding: 10px;
  border-radius: 8px;
}

.laneLabels,
.field {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.laneLabels {
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 0;
}

.field {
  min-height: 0;
}

.shell:fullscreen .field {
  min-height: 0;
}

.slot {
  position: relative;
  min-height: 0;
  border: 1px solid rgba(242, 244, 232, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  overflow: hidden;
}

.slot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.slot.fx-summon {
  animation: summonPop .72s ease-out;
}

.slot.fx-attack {
  animation: attackJolt .5s cubic-bezier(.2, .8, .2, 1);
}

.slot.fx-attack::after {
  background: linear-gradient(90deg, transparent, rgba(255, 234, 176, .34), transparent);
  animation: strikeSweep .46s ease-out;
}

.slot.fx-damage {
  animation: damageShake .46s ease-out;
}

.slot.fx-damage::after,
.slot.fx-destroy::after {
  background: rgba(217, 107, 103, .32);
  animation: flashOverlay .5s ease-out;
}

.slot.fx-heal::after {
  background: rgba(139, 214, 164, .24);
  animation: flashOverlay .6s ease-out;
}

.slot.fx-effect {
  animation: effectPulse .62s ease-out;
}

.slot.fx-effect::after {
  background: radial-gradient(circle, rgba(147, 183, 223, .38), rgba(216, 180, 93, .16) 48%, transparent 74%);
  animation: flashOverlay .72s ease-out;
}

.slot.fx-energy::after,
.slot.fx-state::after,
.slot.fx-score::after {
  background: rgba(216, 180, 93, .22);
  animation: flashOverlay .6s ease-out;
}

.slot.fx-score {
  animation: scorePulse .78s ease-out;
}

.slot.fx-score::after {
  background: radial-gradient(circle, rgba(255, 230, 154, .48), rgba(216, 180, 93, .12) 46%, transparent 72%);
  animation: scoreBloom .78s ease-out;
}

.slot.fx-rangeScore {
  animation: rangeScorePop 1.05s cubic-bezier(.2, .9, .2, 1);
  border-color: rgba(255, 230, 154, .82);
  box-shadow: 0 0 42px rgba(216, 180, 93, .28), inset 0 0 0 1px rgba(255, 230, 154, .38);
}

.slot.fx-rangeScore::after {
  background:
    radial-gradient(circle, rgba(255, 246, 198, .62), rgba(216, 180, 93, .2) 36%, transparent 70%),
    linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .38), transparent 54%);
  animation: rangeScoreBloom 1.05s ease-out;
}

.slot.fx-fieldSweep {
  animation: fieldSweepPop 1.35s cubic-bezier(.2, .9, .2, 1);
  border-color: rgba(139, 214, 164, .86);
  box-shadow: 0 0 46px rgba(139, 214, 164, .26), inset 0 0 0 1px rgba(255, 230, 154, .34);
}

.slot.fx-fieldSweep::after {
  background:
    radial-gradient(circle, rgba(139, 214, 164, .5), rgba(216, 180, 93, .2) 42%, transparent 72%),
    linear-gradient(110deg, transparent 12%, rgba(255, 246, 198, .42), transparent 62%);
  animation: fieldSweepBloom 1.35s ease-out;
}

.slot.fx-phase::after {
  background: rgba(147, 183, 223, .24);
  animation: flashOverlay .7s ease-out;
}

.slot.fx-move {
  animation: moveShift .72s ease-out;
}

.slot.fx-move::after {
  background: linear-gradient(135deg, transparent 18%, rgba(147, 183, 223, .24), transparent 72%);
  animation: shiftTrail .72s ease-out;
}

.slot.fx-destroy {
  animation: destroyPulse .64s ease-out;
}

.shell:fullscreen .slot {
  min-height: 30vh;
}

.slot.empty {
  display: grid;
  place-items: center;
  color: rgba(242, 244, 232, .38);
  font-weight: 700;
}

.slot.selectable {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(216, 180, 93, .4);
}

.slot.targetable {
  border-color: var(--coral);
  box-shadow: inset 0 0 0 1px rgba(237, 143, 115, .5);
}

.slot.state-phs {
  border-color: rgba(147, 183, 223, .58);
  box-shadow: inset 0 0 0 1px rgba(147, 183, 223, .4), 0 0 22px rgba(147, 183, 223, .16);
}

.slot.state-phs::before {
  content: "PHS ACTIVE";
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid rgba(147, 183, 223, .65);
  background: rgba(8, 12, 10, .82);
  color: #cce3ff;
  font-size: .62rem;
  font-weight: 900;
  pointer-events: none;
}

.slot.state-rfl {
  box-shadow: inset 0 0 0 1px rgba(216, 180, 93, .38), 0 0 18px rgba(216, 180, 93, .12);
}

.slot.state-guard {
  border-color: rgba(123, 202, 154, .72);
  box-shadow: inset 0 0 0 1px rgba(123, 202, 154, .46), 0 0 22px rgba(123, 202, 154, .16);
}

.slot.state-guard::after {
  content: "GUARD";
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid rgba(123, 202, 154, .72);
  background: rgba(8, 12, 10, .84);
  color: #c9f4d6;
  font-size: .62rem;
  font-weight: 900;
  pointer-events: none;
}

.slot.state-new {
  filter: saturate(.82);
}

.warningStack {
  position: absolute;
  z-index: 5;
  left: 9px;
  right: 9px;
  bottom: 9px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  pointer-events: none;
}

.warnBadge {
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 230, 154, .72);
  background: rgba(8, 12, 10, .86);
  color: #ffe69a;
  font-size: .66rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .24);
}

.effectBadge {
  border-color: rgba(147, 183, 223, .72);
  color: #cce3ff;
}

.association {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0;
  color: #cde5d2;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.15;
  opacity: .9;
}

.elementMark {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--element-color, var(--gold));
  box-shadow: 0 0 10px var(--element-color, var(--gold));
}

.readyRow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.readyRow span {
  min-width: 0;
  padding: 4px 3px;
  border-radius: 5px;
  border: 1px solid rgba(242, 244, 232, .14);
  font-size: .62rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.readyRow span[data-quick-action] {
  cursor: pointer;
}

.readyRow span[data-quick-action]:hover {
  border-color: rgba(255, 230, 154, .78);
  color: #fff4bf;
  box-shadow: 0 0 14px rgba(216, 180, 93, .16);
}

.readyRow .ready {
  border-color: rgba(139, 214, 164, .62);
  background: rgba(139, 214, 164, .16);
  color: #c8f5d5;
  box-shadow: 0 0 14px rgba(139, 214, 164, .12);
}

.readyRow .spent {
  border-color: rgba(242, 244, 232, .1);
  background: rgba(255, 255, 255, .045);
  color: rgba(184, 196, 183, .58);
}

.effectSummary {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(147, 183, 223, .32);
  border-radius: 7px;
  background: rgba(147, 183, 223, .08);
}

.effectSummary strong {
  color: #cce3ff;
  font-size: .72rem;
  text-transform: uppercase;
}

.effectSummary span {
  color: var(--text);
  font-size: .78rem;
  line-height: 1.25;
}

.effectSummary small {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.2;
}

.floatText {
  position: absolute;
  z-index: 4;
  top: calc(12px + var(--float-offset, 0px));
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(8, 12, 10, .82);
  border: 1px solid rgba(242, 244, 232, .22);
  color: var(--text);
  font-size: .74rem;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  animation: floatUp .82s ease-out forwards;
}

.float-damage,
.float-destroy {
  color: #ffc3bd;
  border-color: rgba(217, 107, 103, .62);
}

.float-heal {
  color: #c8f5d5;
  border-color: rgba(139, 214, 164, .62);
}

.float-attack {
  color: #ffe69a;
}

.float-phase {
  color: #cce3ff;
  border-color: rgba(147, 183, 223, .62);
}

.float-effect {
  color: #d7e8ff;
  border-color: rgba(147, 183, 223, .72);
  background: rgba(18, 29, 41, .92);
}

.float-state,
.float-summon,
.float-move {
  color: #f7ebc2;
  border-color: rgba(216, 180, 93, .62);
}

.float-rangeScore {
  color: #fff4bf;
  border-color: rgba(255, 230, 154, .86);
  background: rgba(75, 54, 14, .92);
  font-size: .82rem;
  letter-spacing: 0;
  box-shadow: 0 0 24px rgba(216, 180, 93, .34);
}

.float-fieldSweep {
  color: #f4ffe6;
  border-color: rgba(139, 214, 164, .9);
  background: rgba(24, 71, 45, .92);
  font-size: .86rem;
  box-shadow: 0 0 28px rgba(139, 214, 164, .36);
}

.midline {
  display: flex;
  justify-content: flex-start;
  gap: 7px;
  flex-wrap: wrap;
  margin: 8px 0 0;
  color: #e9dcae;
  font-size: .78rem;
}

.midline span,
.grammarChip,
.chip {
  border: 1px solid rgba(216, 180, 93, .38);
  background: rgba(216, 180, 93, .12);
  border-radius: 999px;
  padding: 3px 7px;
}

.grammarChip {
  min-height: 23px;
  color: #f7ebc2;
  font-size: .62rem;
  font-weight: 900;
}

.grammarDrawer {
  flex: 0 0 auto;
  margin: 0 0 10px;
  border: 1px solid rgba(242, 244, 232, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.grammarDrawer summary {
  min-height: 30px;
  padding: 6px 9px;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.grammarDrawer .midline {
  margin: 0;
  padding: 0 7px 7px;
  gap: 4px;
  overflow: visible;
}

.grammarDrawer .grammarChip {
  min-height: 21px;
  padding: 2px 5px;
  font-size: .56rem;
  line-height: 1;
}

.grammarChip.active,
.chip.active {
  border-color: rgba(139, 214, 164, .72);
  background: rgba(139, 214, 164, .18);
  color: #dcffe5;
}

.grammarGuide {
  display: grid;
  gap: 4px;
  margin: 6px 7px 7px;
  padding: 6px 8px;
  border: 1px solid rgba(139, 214, 164, .34);
  border-radius: 8px;
  background: rgba(8, 12, 10, .62);
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.22;
}

.grammarGuide[hidden] {
  display: none;
}

.grammarGuide strong {
  color: #dcffe5;
}

.card {
  position: relative;
  min-height: 100%;
  background: #18221d;
  cursor: pointer;
}

.cardInner {
  min-height: 100%;
  background: #18221d;
}

.card img,
.cardInner img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  display: block;
}

.slot .card img,
.slot .cardInner img {
  height: clamp(104px, 14vh, 148px);
}

.shell:fullscreen .slot .card img,
.shell:fullscreen .slot .cardInner img {
  height: clamp(128px, 17vh, 190px);
  min-height: 0;
  max-height: none;
}

.cardBody {
  padding: 7px;
}

.cardTitle {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  min-height: 34px;
}

.card h3 {
  margin: 0;
  font-size: .84rem;
  line-height: 1.12;
}

.cost {
  color: var(--gold);
  font-weight: 850;
  white-space: nowrap;
}

.stats,
.stateRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stats {
  margin-top: 6px;
}

.stat {
  min-width: 38px;
  border-radius: 6px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, .08);
  font-size: .68rem;
  color: var(--muted);
}

.stat strong {
  color: var(--text);
}

.ability {
  min-height: 28px;
  margin-top: 6px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stateRow {
  margin-top: 6px;
  max-height: 42px;
  overflow: hidden;
}

.chip {
  color: #f7ebc2;
  font-size: .64rem;
  font-weight: 800;
}

.chip.state {
  border-color: rgba(139, 214, 164, .42);
  background: rgba(139, 214, 164, .14);
  color: #c8f5d5;
}

.chip.bad,
.chip[data-grammar="NO-PHS"] {
  border-color: rgba(217, 107, 103, .48);
  background: rgba(217, 107, 103, .16);
  color: #ffc3bd;
}

.slot.fx-chain::after {
  background: rgba(139, 214, 164, .2);
  animation: flashOverlay .7s ease-out;
}

.panel {
  border-radius: 8px;
  padding: 12px;
}

.panelHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.panelHead span {
  color: var(--muted);
  font-size: .8rem;
}

.handPanel,
.sidePanel {
  position: static;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidePanel {
  overflow: auto;
}

.fieldWrap,
.handPanel,
.sidePanel {
  min-height: 0;
}

.panelHead {
  flex: 0 0 auto;
}

.hand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.shell:fullscreen .hand {
  max-height: none;
}

.hand .card {
  border: 1px solid rgba(242, 244, 232, .16);
  border-radius: 8px;
  overflow: hidden;
  min-height: 166px;
  padding: 0;
  text-align: left;
}

.hand .card.selected,
.hand .card:hover {
  border-color: var(--gold);
}

.hand .card img {
  height: 62px;
}

.hand .cardTitle {
  min-height: 28px;
}

.hand .card h3 {
  font-size: .8rem;
}

.hand .ability {
  display: -webkit-box;
  min-height: 16px;
  margin-top: 5px;
  -webkit-line-clamp: 1;
}

.hand .stateRow {
  gap: 4px;
  max-height: 36px;
  overflow: hidden;
}

.hand .chip {
  font-size: .55rem;
  padding: 2px 5px;
  line-height: 1.05;
}

.actionPanel {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.dominanceMeter {
  --dominance-fill: 0%;
  --dominance-color: var(--blue);
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 96px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid rgba(242, 244, 232, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  overflow: hidden;
}

.dominanceMeter::before,
.dominanceMeter::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.dominanceMeter::before {
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 230, 154, .7) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 18%, rgba(139, 214, 164, .62) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 72%, rgba(237, 143, 115, .72) 0 2px, transparent 3px),
    radial-gradient(circle at 32% 86%, rgba(147, 183, 223, .62) 0 2px, transparent 3px);
}

.dominanceMeter::after {
  content: attr(data-fx);
  right: 8px;
  top: 8px;
  max-width: calc(100% - 42px);
  color: #fff4bf;
  font-size: .7rem;
  font-weight: 950;
  line-height: 1;
  text-align: right;
  text-shadow: 0 0 10px rgba(216, 180, 93, .45);
}

.dominanceTrack {
  position: relative;
  width: 16px;
  height: 86px;
  border: 1px solid rgba(242, 244, 232, .18);
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(217, 107, 103, .28), rgba(216, 180, 93, .22) 48%, rgba(139, 214, 164, .2));
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .35);
}

.dominanceFill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--dominance-fill);
  min-height: 6px;
  border-radius: 999px 999px 0 0;
  background: var(--dominance-color);
  box-shadow: 0 0 16px rgba(216, 180, 93, .2);
  transition: height .32s ease, background .32s ease;
}

.dominance-score {
  animation: dominancePulse .72s ease-out;
}

.dominance-score::after {
  animation: dominanceLabel .8s ease-out forwards;
}

.dominance-surge,
.dominance-destroy {
  animation: dominanceBurst .9s ease-out;
}

.dominance-surge::before,
.dominance-destroy::before {
  animation: dominanceSpark .9s ease-out forwards;
}

.dominance-surge::after,
.dominance-destroy::after {
  animation: dominanceLabel .9s ease-out forwards;
}

.dominance-sweep,
.dominance-win {
  animation: dominanceDazzle 1.2s cubic-bezier(.2, .9, .2, 1);
}

.dominance-sweep::before,
.dominance-win::before {
  animation: dominanceSpark 1.2s ease-out forwards;
}

.dominance-sweep::after,
.dominance-win::after {
  animation: dominanceLabel 1.05s ease-out forwards;
}

.dominanceCopy {
  display: grid;
  gap: 4px;
}

.dominanceCopy strong {
  color: var(--text);
  font-size: .88rem;
  line-height: 1.12;
}

.dominanceCopy span {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.2;
}

.dominanceMeter.tier-even {
  --dominance-color: var(--blue);
}

.dominanceMeter.tier-edge {
  --dominance-color: var(--mint);
}

.dominanceMeter.tier-control {
  --dominance-color: var(--gold);
}

.dominanceMeter.tier-surge {
  --dominance-color: var(--coral);
}

.dominanceMeter.tier-crush {
  --dominance-color: var(--danger);
}

.floraStability {
  --flora-growth: .18;
  --flora-glow: rgba(147, 183, 223, .16);
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 118px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(139, 214, 164, .18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, var(--flora-glow), transparent 42%),
    rgba(255, 255, 255, .035);
  overflow: hidden;
}

.floraStability::after {
  content: attr(data-fx);
  position: absolute;
  right: 10px;
  top: 9px;
  color: #fff4bf;
  font-size: .66rem;
  font-weight: 950;
  opacity: 0;
  text-shadow: 0 0 12px rgba(216, 180, 93, .45);
  pointer-events: none;
}

.flora-pulse {
  animation: floraPanelPulse 1.05s ease-out;
}

.flora-pulse::after {
  animation: floraLabelRise 1.05s ease-out forwards;
}

.flora-pulse .aura {
  animation: auraTurn 1.4s linear infinite, floraAuraFlash 1.05s ease-out;
}

.plantStage {
  position: relative;
  height: 98px;
  display: grid;
  place-items: end center;
}

.soil {
  position: absolute;
  bottom: 4px;
  width: 58px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(216, 180, 93, .34), rgba(86, 67, 36, .62));
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .34);
}

.stem {
  position: absolute;
  bottom: 12px;
  width: 7px;
  height: calc(18px + 58px * var(--flora-growth));
  border-radius: 999px;
  transform-origin: bottom;
  background: linear-gradient(180deg, #b9f1bc, #659b65);
  box-shadow: 0 0 18px rgba(139, 214, 164, .2);
  animation: plantBreath 2.8s ease-in-out infinite;
}

.leaf {
  position: absolute;
  bottom: calc(24px + 35px * var(--flora-growth));
  width: calc(16px + 13px * var(--flora-growth));
  height: calc(9px + 8px * var(--flora-growth));
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #d7ffd2, #76c47d);
  opacity: clamp(.25, var(--flora-growth), 1);
  box-shadow: 0 0 14px rgba(139, 214, 164, .18);
}

.leafLeft {
  left: 18px;
  transform: rotate(-32deg);
}

.leafRight {
  right: 18px;
  transform: scaleX(-1) rotate(-32deg);
}

.bud {
  position: absolute;
  bottom: calc(30px + 58px * var(--flora-growth));
  width: calc(12px + 12px * var(--flora-growth));
  height: calc(12px + 12px * var(--flora-growth));
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 32% 28%, #fff4bf, #ed8f73 52%, #8bd6a4 78%);
  opacity: clamp(.18, calc(var(--flora-growth) * 1.2), 1);
  box-shadow: 0 0 calc(8px + 22px * var(--flora-growth)) var(--flora-glow);
  animation: budPulse 2s ease-in-out infinite;
}

.aura {
  position: absolute;
  bottom: calc(10px + 42px * var(--flora-growth));
  width: calc(24px + 58px * var(--flora-growth));
  height: calc(24px + 58px * var(--flora-growth));
  border-radius: 50%;
  border: 1px solid rgba(139, 214, 164, .18);
  opacity: clamp(.08, var(--flora-growth), .72);
  box-shadow: 0 0 28px var(--flora-glow), inset 0 0 18px rgba(255, 255, 255, .05);
  animation: auraTurn 4.8s linear infinite;
}

.stabilityCopy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stabilityCopy strong {
  color: var(--text);
  font-size: .86rem;
  line-height: 1.12;
}

.stabilityCopy span {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.18;
}

.moleculeBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.moleculeBadges span {
  border: 1px solid rgba(139, 214, 164, .36);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(139, 214, 164, .12);
  color: #d9ffe0;
  font-size: .58rem;
  font-weight: 900;
}

.flora-seed {
  --flora-growth: .12;
  --flora-glow: rgba(147, 183, 223, .12);
}

.flora-sprout {
  --flora-growth: .38;
  --flora-glow: rgba(139, 214, 164, .2);
}

.flora-seedling {
  --flora-growth: .58;
  --flora-glow: rgba(139, 214, 164, .28);
}

.flora-mature {
  --flora-growth: .78;
  --flora-glow: rgba(216, 180, 93, .28);
}

.flora-bloom {
  --flora-growth: 1;
  --flora-glow: rgba(237, 143, 115, .34);
}

.flora-bloom .moleculeBadges span,
.flora-mature .moleculeBadges span {
  border-color: rgba(216, 180, 93, .5);
  background: rgba(216, 180, 93, .15);
  color: #fff4bf;
}

.focusCard {
  border: 1px solid rgba(242, 244, 232, .16);
  border-radius: 8px;
  overflow: hidden;
  background: #18221d;
}

.focusCard .cardInner {
  min-height: 0;
}

.focusCard img {
  height: 76px;
}

.shell:fullscreen .focusCard img {
  height: 104px;
}

.actionGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hint {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

.sourceText {
  max-height: 70px;
  overflow: auto;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
  padding: 8px;
  border: 1px solid rgba(242, 244, 232, .12);
  border-radius: 7px;
  background: rgba(255, 255, 255, .045);
}

.exportPanel {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px;
  border: 1px solid rgba(216, 180, 93, .32);
  border-radius: 8px;
  background: rgba(216, 180, 93, .1);
}

.exportPanel[hidden] {
  display: none;
}

.exportPanelHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.exportPanelHead strong,
.exportPanel a {
  color: #f7ebc2;
  font-size: .82rem;
}

.exportPanelHead button {
  min-height: 32px;
  padding: 0 10px;
  font-size: .78rem;
}

.exportPanel > button {
  width: 100%;
  min-height: 36px;
  border-color: rgba(216, 180, 93, .5);
}

.exportPanel textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid rgba(242, 244, 232, .18);
  border-radius: 7px;
  background: rgba(10, 14, 12, .62);
  color: var(--text);
  font: .72rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.35;
  padding: 8px;
}

.selectedSlot {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(147, 183, 223, .45);
}

.blocked {
  opacity: .55;
}

.logHead {
  margin-top: 4px;
}

.log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 22vh;
  overflow: auto;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.3;
}

.log[hidden] {
  display: none;
}

.shell:fullscreen .log {
  max-height: 38vh;
}

.gameOver {
  color: var(--gold);
}

@keyframes summonPop {
  0% {
    transform: scale(.96);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
  45% {
    transform: scale(1.025);
    box-shadow: 0 0 28px rgba(216, 180, 93, .36);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
}

@keyframes attackJolt {
  0%, 100% {
    transform: translateX(0);
  }
  32% {
    transform: translateX(10px) scale(1.012);
  }
  68% {
    transform: translateX(-4px);
  }
}

@keyframes strikeSweep {
  0% {
    opacity: 0;
    transform: translateX(-70%) skewX(-14deg);
  }
  30% {
    opacity: .9;
  }
  100% {
    opacity: 0;
    transform: translateX(70%) skewX(-14deg);
  }
}

@keyframes damageShake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  45% {
    transform: translateX(5px);
  }
  70% {
    transform: translateX(-2px);
  }
}

@keyframes destroyPulse {
  0% {
    transform: scale(1);
    filter: saturate(1);
  }
  45% {
    transform: scale(.97);
    filter: saturate(1.5) brightness(1.2);
  }
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
}

@keyframes moveGlow {
  0% {
    box-shadow: inset 0 0 0 1px rgba(216, 180, 93, .1);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgba(216, 180, 93, .75), 0 0 22px rgba(216, 180, 93, .22);
  }
  100% {
    box-shadow: inset 0 0 0 1px rgba(216, 180, 93, .1);
  }
}

@keyframes moveShift {
  0% {
    transform: translateY(8px) scale(.985);
    box-shadow: inset 0 0 0 1px rgba(147, 183, 223, .12);
  }
  45% {
    transform: translateY(-3px) scale(1.01);
    box-shadow: inset 0 0 0 2px rgba(147, 183, 223, .7), 0 0 24px rgba(147, 183, 223, .2);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 0 0 1px rgba(147, 183, 223, .12);
  }
}

@keyframes shiftTrail {
  0% {
    opacity: .85;
    transform: translateX(-24px);
  }
  100% {
    opacity: 0;
    transform: translateX(24px);
  }
}

@keyframes scorePulse {
  0% {
    transform: scale(.98);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
  42% {
    transform: scale(1.025);
    box-shadow: 0 0 30px rgba(255, 230, 154, .34);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
}

@keyframes scoreBloom {
  0% {
    opacity: 0;
    transform: scale(.8);
  }
  35% {
    opacity: .95;
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes effectPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(147, 183, 223, 0);
  }
  38% {
    transform: scale(1.018);
    box-shadow: 0 0 26px rgba(147, 183, 223, .26), inset 0 0 0 1px rgba(216, 180, 93, .32);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(147, 183, 223, 0);
  }
}

@keyframes rangeScorePop {
  0% {
    transform: scale(.96) translateY(8px);
    filter: saturate(1);
  }
  36% {
    transform: scale(1.055) translateY(-5px);
    filter: saturate(1.35);
  }
  64% {
    transform: scale(1.015) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
    filter: saturate(1);
  }
}

@keyframes rangeScoreBloom {
  0% {
    opacity: 0;
    transform: scale(.72) translateX(-18px);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.32) translateX(24px);
  }
}

@keyframes fieldSweepPop {
  0% {
    transform: scale(.94);
    filter: saturate(.9) brightness(.95);
  }
  28% {
    transform: scale(1.045);
    filter: saturate(1.45) brightness(1.14);
  }
  58% {
    transform: scale(1.012);
  }
  100% {
    transform: scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes fieldSweepBloom {
  0% {
    opacity: 0;
    transform: scale(.68) translateX(-30px);
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.42) translateX(34px);
  }
}

@keyframes flashOverlay {
  0% {
    opacity: .95;
  }
  100% {
    opacity: 0;
  }
}

@keyframes plantBreath {
  0%, 100% {
    transform: scaleY(.98) rotate(-1deg);
  }
  50% {
    transform: scaleY(1.04) rotate(1deg);
  }
}

@keyframes budPulse {
  0%, 100% {
    transform: scale(.96);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.08);
    filter: saturate(1.25) brightness(1.08);
  }
}

@keyframes auraTurn {
  0% {
    transform: rotate(0deg) scale(.96);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
  }
  100% {
    transform: rotate(360deg) scale(.96);
  }
}

@keyframes floraPanelPulse {
  0% {
    border-color: rgba(139, 214, 164, .18);
    box-shadow: 0 0 0 rgba(139, 214, 164, 0);
  }
  42% {
    border-color: rgba(216, 180, 93, .58);
    box-shadow: 0 0 34px rgba(139, 214, 164, .22), inset 0 0 0 1px rgba(216, 180, 93, .22);
  }
  100% {
    border-color: rgba(139, 214, 164, .18);
    box-shadow: 0 0 0 rgba(139, 214, 164, 0);
  }
}

@keyframes floraLabelRise {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes floraAuraFlash {
  0% {
    opacity: .16;
    filter: saturate(1);
  }
  45% {
    opacity: .95;
    filter: saturate(1.35) brightness(1.12);
  }
  100% {
    opacity: clamp(.08, var(--flora-growth), .72);
    filter: saturate(1);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -24px);
  }
}

@keyframes meterBurst {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
  45% {
    transform: scale(1.035);
    box-shadow: 0 0 22px rgba(216, 180, 93, .28);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
}

@keyframes dominancePulse {
  0%, 100% {
    border-color: rgba(242, 244, 232, .12);
    box-shadow: 0 0 0 rgba(216, 180, 93, 0);
  }
  45% {
    border-color: rgba(216, 180, 93, .62);
    box-shadow: 0 0 24px rgba(216, 180, 93, .16);
  }
}

@keyframes dominanceBurst {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(242, 244, 232, .12);
  }
  38% {
    transform: scale(1.018);
    border-color: rgba(237, 143, 115, .74);
    box-shadow: 0 0 34px rgba(237, 143, 115, .18);
  }
}

@keyframes dominanceDazzle {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(242, 244, 232, .12);
  }
  25% {
    transform: scale(1.025);
    border-color: rgba(255, 230, 154, .82);
    box-shadow: 0 0 36px rgba(216, 180, 93, .24), inset 0 0 22px rgba(217, 107, 103, .16);
  }
  58% {
    transform: scale(1.01);
    border-color: rgba(217, 107, 103, .76);
    box-shadow: 0 0 44px rgba(217, 107, 103, .22), inset 0 0 18px rgba(255, 230, 154, .12);
  }
}

@keyframes dominanceSpark {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(.92);
  }
  34% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(1.08);
  }
}

@keyframes dominanceLabel {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  22%, 72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes victoryFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes victoryPanelPop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes victoryRing {
  0% {
    opacity: .8;
    transform: scale(.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

@keyframes sparkleDrift {
  0%, 100% {
    opacity: .65;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

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

@media (max-width: 1280px) {
  .topbar > div:first-child {
    flex-basis: 260px;
  }

  .meterRow {
    flex-wrap: wrap;
  }
}

@media (max-width: 980px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .topbar,
  .gameLayout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .gameLayout,
  .fieldWrap {
    overflow: visible;
  }

  .meterRow {
    justify-content: start;
  }

  .handPanel,
  .sidePanel {
    position: static;
    overflow: visible;
  }

  .hand {
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .field {
    min-height: 210px;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 10px;
  }

  .field,
  .laneLabels {
    gap: 7px;
  }

  .slot {
    min-height: 188px;
  }

  .slot .card img {
    height: 86px;
  }

  .cardBody {
    padding: 7px;
  }

  .ability {
    display: none;
  }

  .hand {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    height: auto;
    min-height: 100svh;
    overflow: auto;
    background-attachment: scroll;
  }

  button {
    min-height: 40px;
    padding: 0 10px;
  }

  .shell,
  .shell:fullscreen {
    width: 100%;
    height: auto;
    min-height: 100svh;
    overflow: visible;
    padding: 8px;
  }

  .topbar,
  .shell:fullscreen .topbar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .topbar > div:first-child {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 8px;
  }

  h1 {
    font-size: 1.18rem;
  }

  #phaseText {
    grid-column: 1 / -1;
    font-size: .62rem;
    line-height: 1.1;
  }

  .meterRow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .meter {
    min-width: 0;
    padding: 5px 6px;
    grid-template-columns: 1fr auto auto;
  }

  .meter span,
  .meter small {
    font-size: .56rem;
  }

  .meter strong {
    font-size: .95rem;
  }

  .meterRow button {
    min-height: 36px;
    padding: 0 6px;
    font-size: .66rem;
  }

  #exportLogBtn {
    grid-column: span 2;
  }

  .gameLayout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
    overflow: visible;
  }

  .sidePanel {
    order: 1;
    max-height: none;
    padding: 8px;
    overflow: visible;
  }

  .fieldWrap {
    order: 2;
    gap: 6px;
    padding: 8px;
    overflow: visible;
  }

  .handPanel {
    order: 3;
    padding: 8px;
    overflow: visible;
  }

  .panelHead {
    margin-bottom: 6px;
  }

  .actionPanel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 8px;
  }

  .actionPanel > p,
  .actionPanel > .focusCard,
  .actionPanel > .effectPreview,
  .actionPanel > .choiceRow {
    grid-column: 1 / -1;
  }

  .focusCard {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
  }

  .focusCard img {
    width: 108px;
    height: auto;
    max-height: 52dvh;
    min-height: 96px;
    object-fit: cover;
  }

  .dominanceMeter,
  .floraStability {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 7px;
    margin-bottom: 7px;
  }

  .dominanceTrack {
    width: 100%;
    height: 10px;
    transform: rotate(180deg);
  }

  .dominanceFill {
    top: 0;
    bottom: 0;
    width: var(--dominance-fill);
    height: auto;
    right: auto;
    border-radius: 999px;
  }

  .dominanceCopy {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .floraStability {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .plantStage {
    height: 76px;
  }

  .stem {
    height: calc(14px + 42px * var(--flora-growth));
  }

  .bud {
    bottom: calc(26px + 42px * var(--flora-growth));
  }

  .aura {
    bottom: calc(8px + 32px * var(--flora-growth));
  }

  .stabilityCopy strong {
    font-size: .78rem;
  }

  .stabilityCopy span {
    font-size: .64rem;
  }

  .moleculeBadges span {
    font-size: .52rem;
  }

  .grammarDrawer {
    margin-bottom: 7px;
  }

  .grammarDrawer:not([open]) {
    min-height: 0;
  }

  .logHead {
    margin-top: 0;
  }

  .log {
    max-height: 150px;
    overflow: auto;
  }

  .laneLabels,
  .field {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .laneLabels {
    font-size: .62rem;
  }

  .field {
    min-height: 0;
  }

  .slot,
  .shell:fullscreen .slot {
    min-height: 176px;
  }

  .slot .card img,
  .slot .cardInner img,
  .shell:fullscreen .slot .card img,
  .shell:fullscreen .slot .cardInner img {
    height: 70px;
  }

  .cardBody {
    padding: 6px;
  }

  .cardTitle {
    min-height: 28px;
    gap: 5px;
  }

  .card h3 {
    font-size: .72rem;
    line-height: 1.08;
  }

  .cost {
    font-size: .72rem;
  }

  .stats {
    gap: 4px;
    margin-top: 5px;
  }

  .stat {
    min-width: 0;
    padding: 2px 4px;
    font-size: .56rem;
  }

  .ability {
    display: -webkit-box;
    min-height: 15px;
    margin-top: 5px;
    font-size: .58rem;
    -webkit-line-clamp: 1;
  }

  .stateRow {
    gap: 3px;
    max-height: 30px;
    margin-top: 5px;
  }

  .chip {
    padding: 2px 4px;
    font-size: .5rem;
    line-height: 1;
  }

  .slot.state-phs::before,
  .slot.state-guard::after {
    top: 5px;
    padding: 3px 5px;
    font-size: .52rem;
  }

  .slot.state-phs::before {
    right: 5px;
  }

  .slot.state-guard::after {
    left: 5px;
  }

  .hand {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(168px, 72vw);
    grid-template-columns: none;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 4px;
    scroll-snap-type: x proximity;
  }

  .hand .card {
    min-height: 178px;
    scroll-snap-align: start;
  }

  .hand .card img {
    height: 68px;
  }

  .hand .ability {
    display: -webkit-box;
  }
}

@media (max-width: 430px) and (pointer: coarse) {
  .meterRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #exportLogBtn {
    grid-column: auto;
  }

  .slot,
  .shell:fullscreen .slot {
    min-height: 164px;
  }

  .slot .card img,
  .slot .cardInner img,
  .shell:fullscreen .slot .card img,
  .shell:fullscreen .slot .cardInner img {
    height: 62px;
  }

  .card h3 {
    font-size: .67rem;
  }

  .ability {
    display: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body {
    position: fixed;
    inset: 0;
  }

  .shell,
  .shell:fullscreen {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-width: 100vw;
    overflow: hidden;
    display: block;
    padding: 0;
  }

  .topbar,
  .shell:fullscreen .topbar {
    grid-column: 2;
    grid-row: 1;
    position: fixed;
    right: 5px;
    top: 5px;
    z-index: 18;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    width: 92px;
    height: auto;
    max-height: 52dvh;
    gap: 5px;
    padding: 5px;
    border-radius: 7px;
    overflow: hidden;
  }

  .topbar > div:first-child {
    display: none;
  }

  h1 {
    font-size: .95rem;
    line-height: 1;
    white-space: nowrap;
  }

  #phaseText {
    display: none;
  }

  .meterRow {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 5px;
    overflow: hidden;
  }

  .meter {
    min-width: 0;
    min-height: 30px;
    padding: 3px 5px;
    gap: 2px;
  }

  .meter span {
    display: none;
  }

  .meter strong {
    font-size: .78rem;
    line-height: 1;
  }

  .meter small {
    display: inline;
    font-size: .47rem;
    opacity: .82;
  }

  .meter strong,
  .meter small {
    white-space: nowrap;
  }

  .playerMeter::before,
  .enemyMeter::before,
  #playerScoreMeter::before,
  #enemyScoreMeter::before {
    display: block;
    color: var(--muted);
    font-size: .42rem;
    line-height: 1;
    text-transform: uppercase;
  }

  .playerMeter::before {
    content: "You";
  }

  .enemyMeter::before {
    content: "Opp";
  }

  #playerScoreMeter::before {
    content: "You VP";
  }

  #enemyScoreMeter::before {
    content: "Opp VP";
  }

  #fullscreenBtn,
  #exportLogBtn,
  #restartBtn {
    display: none;
  }

  .meterRow button {
    min-height: 30px;
    font-size: .5rem;
    line-height: 1.05;
    padding: 0 4px;
    white-space: normal;
  }

  #soundBtn {
    display: block;
    border-color: rgba(147, 183, 223, .48);
    background: rgba(42, 58, 64, .82);
  }

  #soundBtn.pending {
    border-color: rgba(216, 180, 93, .72);
    color: #ffe8a5;
  }

  #autoEndBtn {
    font-size: .5rem;
  }

  #autoEndBtn,
  #endTurnBtn {
    grid-column: auto;
  }

  .gameLayout {
    position: fixed;
    left: 5px;
    top: 5px;
    bottom: 5px;
    width: calc(100vw - 118px);
    max-width: calc(100vw - 118px);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    gap: 5px;
    margin-top: 0;
  }

  .sidePanel,
  .fieldWrap,
  .handPanel {
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    height: auto;
    overflow: hidden;
    border-radius: 7px;
  }

  .sidePanel {
    position: static;
    grid-row: 2;
    z-index: 1;
    width: 100%;
    max-height: none;
    padding: 5px;
    pointer-events: auto;
    align-self: start;
  }

  .sidePanel > .panelHead:first-child {
    margin-bottom: 4px;
  }

  .sidePanel > .panelHead:first-child h2 {
    font-size: .66rem;
  }

  #selectionLabel {
    font-size: .58rem;
  }

  .actionPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    pointer-events: auto;
  }

  .actionPanel > .sourceText,
  .actionPanel > .hint {
    display: none;
  }

  .actionPanel > p {
    font-size: .64rem;
    line-height: 1.12;
    max-height: 32px;
    overflow: hidden;
  }

  .actionPanel button {
    min-height: 28px;
    border-radius: 5px;
    font-size: .46rem;
    line-height: 1;
    padding: 0 2px;
  }

  .actionGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .choiceRow {
    display: none;
  }

  .focusCard {
    display: none;
  }

  .effectPreview {
    display: grid;
  }

  .effectSummary {
    gap: 2px;
    padding: 6px 7px;
    border-radius: 6px;
  }

  .effectSummary strong {
    font-size: .5rem;
    letter-spacing: 0;
  }

  .effectSummary span {
    display: -webkit-box;
    max-height: 2.45em;
    overflow: hidden;
    color: #e9f6ed;
    font-size: .58rem;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .effectSummary small {
    display: none;
  }

  .dominanceMeter {
    min-height: 34px;
    margin-bottom: 4px;
    padding: 4px;
    pointer-events: none;
  }

  .dominanceTrack {
    height: 7px;
  }

  .dominanceCopy strong {
    font-size: .64rem;
  }

  .dominanceCopy span {
    font-size: .54rem;
  }

  .floraStability {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 36px;
    margin-bottom: 0;
    padding: 4px;
    gap: 4px;
  }

  .plantStage {
    height: 30px;
  }

  .soil {
    width: 38px;
    height: 8px;
    bottom: 2px;
  }

  .stem {
    bottom: 8px;
    width: 5px;
    height: calc(10px + 28px * var(--flora-growth));
  }

  .leaf {
    bottom: calc(16px + 23px * var(--flora-growth));
    width: calc(11px + 9px * var(--flora-growth));
    height: calc(7px + 5px * var(--flora-growth));
  }

  .leafLeft {
    left: 9px;
  }

  .leafRight {
    right: 9px;
  }

  .bud {
    bottom: calc(18px + 28px * var(--flora-growth));
    width: calc(9px + 8px * var(--flora-growth));
    height: calc(9px + 8px * var(--flora-growth));
  }

  .aura {
    bottom: calc(5px + 20px * var(--flora-growth));
    width: calc(18px + 36px * var(--flora-growth));
    height: calc(18px + 36px * var(--flora-growth));
  }

  .stabilityCopy {
    gap: 1px;
  }

  .stabilityCopy strong {
    font-size: .5rem;
  }

  .stabilityCopy span {
    font-size: .43rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .moleculeBadges {
    gap: 3px;
    margin-top: 1px;
  }

  .moleculeBadges span {
    font-size: .48rem;
    padding: 1px 5px;
  }

  .logHead,
  .log,
  .exportPanel {
    display: none !important;
  }

  .grammarDrawer {
    display: block;
    margin: 4px 0 0;
    border-color: rgba(139, 214, 164, .18);
    background: rgba(12, 22, 17, .5);
  }

  .grammarDrawer summary {
    min-height: 22px;
    padding: 3px 7px;
    font-size: .52rem;
  }

  .grammarDrawer .midline {
    display: flex;
    max-height: 42px;
    padding: 0 6px 6px;
    overflow: hidden;
  }

  .grammarDrawer .grammarChip {
    min-height: 16px;
    padding: 1px 4px;
    font-size: .42rem;
  }

  .grammarGuide {
    margin: 0 6px 6px;
    padding: 5px;
    font-size: .5rem;
    line-height: 1.14;
  }

  .fieldWrap {
    display: grid;
    grid-row: 1;
    width: 100%;
    grid-template-rows: 14px minmax(104px, 128px) minmax(104px, 128px);
    align-content: start;
    gap: 5px;
    padding: 5px;
  }

  .laneLabels,
  .field {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    gap: 4px;
  }

  .laneLabels {
    font-size: .5rem;
  }

  .slot,
  .shell:fullscreen .slot {
    min-width: 0;
    min-height: 104px;
    height: auto;
    max-height: 128px;
    padding: 0;
    border-radius: 7px;
  }

  .slot.empty {
    display: grid;
    place-items: center;
    min-height: 104px;
    font-size: .5rem;
  }

  .slot .card img,
  .slot .cardInner img,
  .shell:fullscreen .slot .card img,
  .shell:fullscreen .slot .cardInner img {
    height: clamp(34px, 6dvh, 48px);
  }

  .slot .cardBody {
    display: grid;
    grid-template-rows: auto auto auto auto;
    padding: 3px;
  }

  .slot .cardTitle {
    min-height: 18px;
    gap: 2px;
    align-items: flex-start;
  }

  .slot h3,
  .slot .card h3,
  .slot .cardInner h3 {
    display: -webkit-box;
    min-height: 0;
    max-height: 2.1em;
    overflow: hidden;
    font-size: .42rem;
    line-height: 1.05;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .slot .cost {
    font-size: .42rem;
  }

  .slot .stats {
    gap: 2px;
    margin-top: 2px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .slot .stat {
    padding: 1px 2px;
    font-size: .38rem;
  }

  .slot .association {
    display: block;
    font-size: .38rem;
    line-height: 1;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slot .readyRow {
    gap: 2px;
    margin-top: 3px;
  }

  .slot .readyRow span {
    min-width: 0;
    padding: 1px 2px;
    font-size: .34rem;
  }

  .slot .stateRow {
    gap: 2px;
    max-height: 13px;
    margin-top: 2px;
    overflow: hidden;
  }

  .slot .chip,
  .hand .chip {
    font-size: .36rem;
    padding: 1px 2px;
  }

  .slot .ability {
    display: none;
  }

  .warningStack {
    top: 4px;
    right: auto;
    bottom: auto;
    left: 4px;
    max-width: calc(100% - 8px);
    gap: 2px;
  }

  .warnBadge {
    padding: 2px 4px;
    border-radius: 4px;
    font-size: .42rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  }

  .effectStack {
    top: 4px;
    right: 4px;
    left: auto;
    justify-content: flex-end;
    max-width: 58%;
  }

  .floatText {
    top: calc(4px + var(--float-offset, 0px) * .55);
    left: 4px;
    transform: none;
    max-width: calc(100% - 8px);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: .42rem;
    line-height: 1;
  }

  .handPanel {
    position: fixed;
    right: 5px;
    top: 220px;
    bottom: 5px;
    z-index: 19;
    width: 108px;
    padding: 5px;
    overflow: hidden;
  }

  .handPanel .panelHead {
    margin-bottom: 3px;
  }

  .handPanel h2 {
    font-size: .5rem;
  }

  .handPanel .panelHead span {
    display: none;
  }

  .hand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: calc(100% - 14px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0;
  }

  .hand .card {
    flex: 0 0 58px;
    min-height: 0;
    height: 58px;
    border-radius: 7px;
  }

  .hand .cardInner {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 100%;
  }

  .hand .card img {
    grid-column: 1;
    grid-row: 1 / span 2;
    float: none;
    width: 28px;
    height: 100%;
    margin: 0;
    border-radius: 5px;
  }

  .hand .cardBody {
    display: grid;
    grid-column: 2;
    grid-template-rows: auto auto auto;
    min-width: 0;
    padding: 3px;
  }

  .hand .card h3 {
    display: -webkit-box;
    min-height: 0;
    max-height: 2.1em;
    overflow: hidden;
    font-size: .36rem;
    line-height: 1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hand .cardTitle {
    min-height: 0;
    gap: 2px;
    padding-top: 0;
  }

  .hand .cost {
    font-size: .4rem;
  }

  .hand .association {
    clear: none;
    font-size: .38rem;
    line-height: 1;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hand .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    margin-top: 1px;
  }

  .hand .stat {
    min-width: 0;
    padding: 1px;
    font-size: .31rem;
    white-space: nowrap;
  }

  .hand .ability {
    display: none;
  }

  .hand .stateRow {
    gap: 2px;
    max-height: 13px;
    margin-top: 1px;
    overflow: hidden;
  }
}

@media (max-width: 430px) {
  .gameLayout {
    grid-template-rows: auto auto;
  }

  .shell,
  .shell:fullscreen {
    display: block;
  }

  .gameLayout {
    width: calc(100vw - 116px);
    max-width: calc(100vw - 116px);
  }

  .topbar,
  .shell:fullscreen .topbar {
    width: 106px;
  }

  .sidePanel {
    width: 100%;
  }

  .handPanel {
    width: 106px;
    top: 214px;
  }
}

@media (max-width: 760px) {
  .shell,
  .shell:fullscreen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(126px, 34vw);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 5px;
    padding: 5px;
  }

  .shell::after,
  .shell:fullscreen::after {
    content: "FloraSphere Field Duel";
    grid-column: 1 / -1;
    grid-row: 4;
    align-self: start;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid rgba(139, 214, 164, .16);
    border-radius: 7px;
    background: linear-gradient(90deg, rgba(22, 31, 26, .78), rgba(22, 31, 26, .34));
    color: rgba(242, 244, 232, .82);
    font-size: .7rem;
    font-weight: 900;
  }

  .gameLayout {
    display: contents;
    position: static;
    width: auto;
    max-width: none;
    height: auto;
  }

  .fieldWrap {
    grid-column: 1 / -1;
    grid-row: 1;
    width: auto;
    grid-template-rows: 14px minmax(136px, 156px) minmax(136px, 156px);
  }

  .slot,
  .shell:fullscreen .slot {
    min-height: 136px;
    max-height: 156px;
  }

  .slot.empty {
    min-height: 136px;
  }

  .slot .card img,
  .slot .cardInner img,
  .shell:fullscreen .slot .card img,
  .shell:fullscreen .slot .cardInner img {
    height: clamp(38px, 6.4dvh, 48px);
  }

  .slot .stateRow {
    max-height: 28px;
  }

  .slot .chip {
    font-size: .38rem;
    padding: 1px 3px;
  }

  .topbar,
  .shell:fullscreen .topbar {
    position: static;
    grid-column: 2;
    grid-row: 2;
    width: auto;
    max-height: none;
    padding: 5px;
  }

  .meterRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .meter {
    min-height: 25px;
    padding: 2px 4px;
  }

  .meter::before {
    font-size: .34rem;
  }

  .meter strong {
    font-size: .66rem;
  }

  .meter small {
    font-size: .36rem;
  }

  .meterRow button {
    min-height: 26px;
    font-size: .42rem;
  }

  #soundBtn,
  #autoEndBtn,
  #endTurnBtn {
    grid-column: span 2;
  }

  .handPanel {
    position: static;
    grid-column: 1 / -1;
    grid-row: 3;
    width: auto;
    min-height: 0;
    height: auto;
    padding: 5px;
    overflow: hidden;
  }

  .hand {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    height: 92px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    gap: 4px;
  }

  .hand .card {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 92px;
    overflow: hidden;
  }

  .hand .cardInner {
    grid-template-columns: 30px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
  }

  .hand .cardBody,
  .hand .cardTitle,
  .hand .stats,
  .hand .stateRow {
    min-width: 0;
    overflow: hidden;
  }

  .hand .card img {
    width: 28px;
  }

  .hand .card h3 {
    font-size: .34rem;
  }

  .hand .cost {
    font-size: .34rem;
  }

  .hand .stat {
    min-width: 0;
    font-size: .29rem;
    overflow: hidden;
  }

  .hand .association {
    font-size: .33rem;
  }

  .hand .chip {
    max-width: 100%;
    font-size: .32rem;
    padding: 1px 2px;
    overflow: hidden;
  }

  .hand .stateRow {
    max-height: 26px;
  }

  .sidePanel {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

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

  .grammarDrawer {
    max-height: 176px;
    overflow: hidden;
  }

  .grammarDrawer .midline {
    max-height: 56px;
  }

  .grammarGuide {
    max-height: 54px;
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .sidePanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 6px;
    background: rgba(17, 27, 22, .72);
  }

  .sidePanel > .panelHead:first-child {
    align-items: center;
    min-height: 18px;
    margin-bottom: 0;
  }

  .sidePanel > .panelHead:first-child h2 {
    font-size: .56rem;
    color: rgba(242, 244, 232, .82);
  }

  #selectionLabel {
    font-size: .5rem;
  }

  .actionPanel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 0;
  }

  .actionGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .actionPanel button {
    min-height: 24px;
    padding: 0 3px;
    border-radius: 6px;
    background: rgba(46, 61, 53, .62);
    color: rgba(242, 244, 232, .86);
    font-size: .4rem;
    font-weight: 850;
  }

  .effectSummary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 7px;
    border-color: rgba(147, 183, 223, .22);
    background: rgba(147, 183, 223, .055);
  }

  .effectSummary strong {
    color: #cce3ff;
    font-size: .46rem;
    white-space: nowrap;
  }

  .effectSummary span {
    display: block;
    max-height: none;
    overflow: hidden;
    color: rgba(242, 244, 232, .86);
    font-size: .52rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dominanceMeter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 30px;
    margin-bottom: 0;
    padding: 5px 7px;
  }

  .dominanceTrack {
    grid-column: 1 / -1;
    width: 100%;
    height: 5px;
    order: 2;
  }

  .dominanceCopy {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    order: 1;
  }

  .dominanceCopy strong {
    font-size: .56rem;
    white-space: nowrap;
  }

  .dominanceCopy span {
    font-size: .48rem;
    white-space: nowrap;
  }

  .floraStability {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 30px;
    padding: 4px 6px;
  }

  .plantStage {
    height: 26px;
  }

  .stabilityCopy strong {
    font-size: .48rem;
  }

  .stabilityCopy span {
    font-size: .4rem;
  }

  .moleculeBadges span {
    font-size: .42rem;
    padding: 1px 5px;
  }

  .grammarDrawer {
    max-height: 124px;
    margin-top: 2px;
  }

  .grammarDrawer summary {
    min-height: 18px;
    padding: 2px 7px;
    font-size: .48rem;
  }

  .grammarDrawer .midline {
    max-height: 36px;
    padding: 0 6px 4px;
    gap: 3px;
  }

  .grammarDrawer .grammarChip {
    min-height: 14px;
    padding: 1px 4px;
    font-size: .38rem;
  }

  .grammarGuide {
    max-height: 42px;
    margin: 0 6px 5px;
    padding: 4px 6px;
    font-size: .45rem;
  }
}
