:root {
  color-scheme: dark;
  --bg: #071111;
  --panel: rgba(15, 31, 29, 0.88);
  --panel-strong: #102522;
  --line: rgba(214, 255, 233, 0.16);
  --text: #edf8ef;
  --muted: #9cb7aa;
  --green: #6ee27f;
  --green-dark: #1d8a48;
  --red: #ff5468;
  --red-dark: #8e1d2f;
  --yellow: #ffd760;
  --blue: #5ed1ff;
  --peat: #a8754d;
  --wind: #b6e8df;
  --danger: #ff7c4d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(93, 209, 255, 0.16), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 215, 96, 0.16), transparent 26%),
    linear-gradient(140deg, #061010 0%, #0d1f1a 48%, #12100c 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 18px;
}

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

.brand-mark {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
}

.brand h1,
.brand p,
.join-copy h2,
.join-copy p,
.block-title h3 {
  margin: 0;
}

.brand h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0;
}

.brand p {
  color: var(--muted);
  font-size: 0.86rem;
}

.shop-link,
.join-form button {
  border: 1px solid rgba(255, 215, 96, 0.45);
  color: #211806;
  background: linear-gradient(180deg, #ffe184, #ffb84f);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(255, 184, 79, 0.22);
  white-space: nowrap;
}

.shop-link {
  padding: 12px 16px;
}

.join-panel {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 28px;
}

.join-copy {
  padding: 28px 0;
}

.eyebrow {
  display: inline-flex;
  color: #04110a;
  background: var(--green);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.join-copy h2 {
  max-width: 760px;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.join-copy p {
  max-width: 610px;
  margin-top: 18px;
  color: #c0d8ca;
  font-size: 1.05rem;
  line-height: 1.7;
}

.join-form,
.side-panel,
.arena-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.join-form {
  border-radius: 8px;
  padding: 22px;
}

.join-form label {
  display: block;
  margin-bottom: 8px;
  color: #c8decf;
  font-weight: 800;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.name-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 13px 15px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  outline: none;
}

.name-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(110, 226, 127, 0.16);
}

.join-form button {
  padding: 0 22px;
}

.connection-text {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
}

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

.arena-panel,
.side-panel {
  border-radius: 8px;
}

.arena-panel {
  padding: 14px;
}

.side-panel {
  padding: 14px;
  position: sticky;
  top: 12px;
}

.match-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto minmax(124px, auto);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.match-strip > div:not(.need-pill) {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.16);
}

.mini-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 900;
}

.match-strip strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
}

.need-pill {
  min-width: 98px;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #06100c;
  background: var(--yellow);
  font-weight: 1000;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.room-actions {
  min-height: 58px;
  display: grid;
  place-items: stretch;
}

.leave-room-button {
  width: 100%;
  border: 1px solid rgba(255, 124, 77, 0.45);
  border-radius: 8px;
  padding: 0 12px;
  color: #fff0e9;
  background: rgba(255, 124, 77, 0.14);
  font-weight: 1000;
}

.leave-room-button:hover,
.leave-room-button:focus-visible {
  border-color: rgba(255, 124, 77, 0.76);
  background: rgba(255, 124, 77, 0.22);
}

.notice-bar {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 10px 14px;
  color: #07110d;
  background: linear-gradient(90deg, #baf9bf, #bdeeff);
  font-weight: 900;
}

.arena {
  position: relative;
  min-height: 620px;
  height: min(68vh, 720px);
  overflow: hidden;
  border: 1px solid rgba(182, 232, 223, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 70, 60, 0.76), rgba(7, 16, 14, 0.92) 70%);
  background-size: 48px 48px, 48px 48px, cover;
}

.sun-halo {
  position: absolute;
  top: 30px;
  right: 46px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 102, 0.82), rgba(255, 223, 102, 0.12) 62%, transparent 70%);
  animation: pulseSun 2.8s ease-in-out infinite;
}

.soil-bed {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -18px;
  height: 132px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 20% 32%, rgba(230, 226, 199, 0.22) 0 3px, transparent 4px),
    radial-gradient(circle at 68% 46%, rgba(230, 226, 199, 0.18) 0 2px, transparent 3px),
    linear-gradient(180deg, #6f4933, #2f2118);
}

.rain-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.plant-board {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 24px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  pointer-events: none;
}

.plant-card {
  --player-color: var(--green);
  min-height: 132px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--player-color) 55%, white 8%);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(9, 24, 22, 0.88), rgba(5, 12, 11, 0.82));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

.plant-card.you {
  box-shadow: 0 0 0 2px rgba(110, 226, 127, 0.35), 0 16px 32px rgba(0, 0, 0, 0.34);
}

.plant-card.dead {
  opacity: 0.62;
  filter: grayscale(0.55);
}

.rival-plant {
  --health: 100;
  position: relative;
  width: 74px;
  height: 92px;
  transform: scale(calc(0.76 + (var(--health) / 100) * 0.24));
  transform-origin: bottom center;
}

.rival-pot,
.rival-stem,
.rival-trap {
  position: absolute;
  display: block;
}

.rival-pot {
  left: 16px;
  bottom: 0;
  width: 42px;
  height: 28px;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #c67943, #603421);
}

.rival-pot::before {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  top: -7px;
  height: 15px;
  border-radius: 50%;
  background: #7a5134;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.rival-stem {
  left: 34px;
  bottom: 22px;
  width: 7px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1c7940, #69e274);
  transform-origin: bottom center;
}

.rival-stem.s1 { transform: rotate(-34deg); }
.rival-stem.s2 { height: 56px; transform: rotate(4deg); }
.rival-stem.s3 { transform: rotate(34deg); }

.rival-trap {
  width: 34px;
  height: 27px;
  border: 3px solid #74eb77;
  background: linear-gradient(135deg, #ff6575 0 48%, #9e102c 49% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 230, 232, 0.15);
}

.rival-trap::after {
  content: "";
  position: absolute;
  inset: -6px;
  background: repeating-conic-gradient(from 0deg, transparent 0 14deg, #f3fff5 14deg 18deg, transparent 18deg 30deg);
  clip-path: polygon(0 42%, 100% 42%, 100% 58%, 0 58%);
}

.rival-trap.t1 {
  left: 2px;
  top: 23px;
  border-radius: 80% 18% 70% 22%;
  transform: rotate(-24deg);
}

.rival-trap.t2 {
  left: 22px;
  top: 4px;
  border-radius: 48% 48% 16% 16%;
  transform: rotate(5deg);
}

.rival-trap.t3 {
  right: 2px;
  top: 26px;
  border-radius: 18% 80% 22% 70%;
  transform: rotate(24deg);
}

.plant-card-copy {
  min-width: 0;
}

.plant-card-copy strong,
.plant-card-copy span {
  display: block;
}

.plant-card-copy strong {
  overflow: hidden;
  color: #f4fff6;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-card-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.plant-card-score {
  align-self: start;
  min-width: 42px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #06100c;
  background: var(--player-color);
  text-align: center;
  font-weight: 1000;
}

.plant-life {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.plant-life i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5468, #ffd760 42%, #6ee27f);
}

.falling-item {
  --item-color: var(--green);
  position: absolute;
  top: 0;
  left: 50%;
  top: -60px;
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 7px;
  min-width: 104px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 10px 7px 7px;
  color: #06100c;
  background: color-mix(in srgb, var(--item-color) 78%, white 22%);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%) translate3d(0, 0, 0);
  transition: filter 0.12s ease, scale 0.12s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  contain: layout paint style;
  will-change: transform;
  z-index: 7;
}

.falling-item:hover {
  filter: brightness(1.08);
  scale: 1.04;
}

.falling-item.claimed {
  pointer-events: none;
  opacity: 0;
  scale: 0.72;
  transform: translate(-50%, 0) rotate(10deg);
}

.item-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.36);
  font-weight: 1000;
  font-size: 0.78rem;
}

.item-label {
  font-weight: 1000;
  font-size: 0.9rem;
}

.item-light { --item-color: var(--yellow); }
.item-water { --item-color: var(--blue); }
.item-substrate { --item-color: var(--peat); }
.item-insect { --item-color: #f8f1d4; }
.item-wind { --item-color: var(--wind); }
.item-pest,
.item-dry { --item-color: var(--danger); }

.plant-stage {
  position: absolute;
  left: 50%;
  bottom: 142px;
  width: 300px;
  height: 310px;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0.48;
}

.plant-pot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 150px;
  height: 105px;
  transform: translateX(-50%);
}

.pot-rim,
.pot-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #c27a4a, #6e3c2c);
}

.pot-rim {
  top: 0;
  width: 160px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.08);
}

.pot-body {
  top: 18px;
  width: 118px;
  height: 86px;
  clip-path: polygon(0 0, 100% 0, 84% 100%, 16% 100%);
}

.venus.large {
  position: absolute;
  left: 50%;
  bottom: 74px;
  width: 250px;
  height: 220px;
  transform: translateX(-50%);
  animation: plantBreathe 2.4s ease-in-out infinite;
}

.stem,
.leaf,
.trap {
  position: absolute;
  display: block;
}

.stem {
  bottom: 22px;
  left: 50%;
  width: 14px;
  height: 118px;
  border-radius: 999px;
  transform-origin: bottom center;
  background: linear-gradient(90deg, #1e7a45, #5acc67, #17633a);
}

.stem-a { transform: translateX(-50%) rotate(-38deg); height: 120px; }
.stem-b { transform: translateX(-50%) rotate(8deg); height: 150px; }
.stem-c { transform: translateX(-50%) rotate(38deg); height: 118px; }

.leaf {
  bottom: 28px;
  width: 120px;
  height: 38px;
  border-radius: 90% 0 90% 0;
  background: linear-gradient(90deg, #2c9a54, #7aec7b);
  opacity: 0.9;
}

.leaf-a { left: 20px; transform: rotate(-18deg); }
.leaf-b { right: 18px; transform: scaleX(-1) rotate(-14deg); }
.leaf-c { left: 70px; bottom: 12px; width: 140px; transform: rotate(2deg); }

.trap {
  width: 96px;
  height: 74px;
  border: 5px solid #50d161;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 255, 255, 0.22), transparent 20%),
    linear-gradient(120deg, #ff6673 0 48%, #b91232 49% 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 210, 220, 0.16), 0 14px 26px rgba(0, 0, 0, 0.32);
}

.trap::before,
.trap::after {
  content: "";
  position: absolute;
  inset: -10px;
  background:
    repeating-conic-gradient(from 0deg, transparent 0 12deg, #e9fff1 12deg 16deg, transparent 16deg 28deg);
  clip-path: polygon(0 42%, 100% 42%, 100% 58%, 0 58%);
  opacity: 0.95;
}

.trap-a {
  left: 10px;
  top: 40px;
  border-radius: 88% 12% 72% 20%;
  transform: rotate(-28deg);
}

.trap-b {
  left: 92px;
  top: 0;
  border-radius: 48% 48% 16% 16%;
  transform: rotate(8deg);
}

.trap-c {
  right: 8px;
  top: 52px;
  border-radius: 12% 88% 20% 72%;
  transform: rotate(28deg);
}

.arena-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 26px;
  text-align: center;
  background: rgba(4, 10, 9, 0.52);
}

.arena-overlay[hidden] {
  display: none;
}

.arena-overlay strong {
  font-size: clamp(1.8rem, 5vw, 4rem);
}

.arena-overlay span {
  color: #d1e3d7;
  font-weight: 700;
}

.my-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.mini-venus {
  position: relative;
  width: 52px;
  height: 52px;
}

.mini-venus span {
  position: absolute;
  width: 32px;
  height: 26px;
  border-radius: 70% 20%;
  border: 3px solid #6cea7a;
  background: linear-gradient(90deg, #ff6978, #b80f2b);
}

.mini-venus span:nth-child(1) { left: 0; top: 15px; transform: rotate(-25deg); }
.mini-venus span:nth-child(2) { left: 17px; top: 4px; transform: rotate(8deg); }
.mini-venus span:nth-child(3) { right: 0; top: 18px; transform: scaleX(-1) rotate(-24deg); }

.score-badge {
  min-width: 64px;
  border-radius: 999px;
  padding: 9px 12px;
  text-align: center;
  color: #06100c;
  background: var(--green);
  font-size: 1.2rem;
}

.vitals {
  display: grid;
  gap: 9px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.vital-row {
  display: grid;
  grid-template-columns: 76px 1fr 38px;
  gap: 8px;
  align-items: center;
}

.vital-row span:first-child {
  color: #c6ded0;
  font-size: 0.82rem;
  font-weight: 900;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.bar i {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--green));
  transition: width 0.18s ease;
}

.vital-row b {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.leaderboard-block {
  padding-top: 14px;
}

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

.block-title h3 {
  font-size: 1rem;
}

.block-title span {
  color: var(--muted);
  font-weight: 900;
}

.players-list {
  display: grid;
  gap: 8px;
}

.player-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.13);
}

.player-row.you {
  border-color: rgba(110, 226, 127, 0.56);
}

.player-row.dead {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.player-color {
  width: 10px;
  height: 30px;
  border-radius: 999px;
  background: var(--player-color);
}

.player-main strong,
.player-main span {
  display: block;
}

.player-main strong {
  font-size: 0.95rem;
}

.player-main span {
  color: var(--muted);
  font-size: 0.76rem;
}

.player-score {
  font-weight: 1000;
  font-size: 1.05rem;
}

.event-log {
  min-height: 54px;
  margin-top: 14px;
  border: 1px solid rgba(255, 215, 96, 0.24);
  border-radius: 8px;
  padding: 10px;
  color: #ffe8a4;
  background: rgba(255, 215, 96, 0.08);
  font-size: 0.9rem;
  line-height: 1.35;
}

.chat-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.chat-title {
  margin-bottom: 8px;
}

.chat-messages {
  height: 178px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.chat-message {
  --chat-color: var(--green);
  max-width: 92%;
  border-left: 4px solid var(--chat-color);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.075);
}

.chat-message.mine {
  align-self: flex-end;
  border-left: 0;
  border-right: 4px solid var(--chat-color);
  background: rgba(110, 226, 127, 0.13);
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #f4fff6;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-meta time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.chat-message p {
  margin: 0;
  color: #dff4e6;
  font-size: 0.86rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.chat-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  outline: none;
}

.chat-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(110, 226, 127, 0.16);
}

.chat-form button {
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #06100c;
  background: var(--green);
  font-weight: 1000;
}

@keyframes pulseSun {
  0%,
  100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes plantBreathe {
  0%,
  100% { transform: translateX(-50%) rotate(-1deg) scale(1); }
  50% { transform: translateX(-50%) rotate(1deg) scale(1.025); }
}

@media (max-width: 900px) {
  :root {
    --shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
  }

  body {
    background: linear-gradient(160deg, #061010 0%, #0d1f1a 54%, #12100c 100%);
  }

  .join-form,
  .side-panel,
  .arena-panel {
    backdrop-filter: none;
    box-shadow: none;
  }

  .brand-mark {
    filter: none;
  }

  .topbar,
  .join-panel,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .shop-link {
    width: 100%;
    text-align: center;
  }

  .join-panel {
    min-height: auto;
    padding-top: 30px;
  }

  .game-grid {
    display: flex;
    flex-direction: column;
  }

  .arena-panel,
  .side-panel {
    width: 100%;
  }

  .side-panel {
    position: static;
  }

  .match-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-actions {
    grid-column: span 2;
    min-height: 48px;
  }

  .need-pill {
    min-height: 54px;
  }

  .arena {
    min-height: 520px;
    height: 66vh;
    background: linear-gradient(180deg, rgba(16, 70, 60, 0.76), rgba(7, 16, 14, 0.92) 70%);
    background-size: auto;
  }

  .sun-halo,
  .plant-stage {
    display: none;
  }

  .plant-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: 16px;
  }

  .plant-card {
    min-height: 112px;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    padding: 8px;
    box-shadow: none;
  }

  .falling-item {
    box-shadow: none;
    transition: opacity 0.08s ease;
  }

  .falling-item:hover {
    filter: none;
    scale: 1;
  }

  .plant-card.dead,
  .player-row.dead {
    filter: none;
  }

  .chat-messages {
    height: 150px;
  }

  .rival-plant {
    width: 62px;
    height: 78px;
  }

  .plant-stage {
    bottom: 170px;
    transform: translateX(-50%) scale(0.78);
    transform-origin: bottom center;
  }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .sun-halo,
  .venus.large {
    animation: none;
  }

  .bar i {
    transition: none;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
  }

  .brand h1 {
    font-size: 1.35rem;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

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

  .join-form button {
    height: 48px;
  }

  .join-copy h2 {
    font-size: 2.2rem;
  }

  .falling-item {
    min-width: 86px;
    grid-template-columns: 28px auto;
    padding: 6px 8px 6px 6px;
  }

  .item-icon {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }

  .plant-board {
    left: 8px;
    right: 8px;
    gap: 7px;
  }

  .plant-card {
    min-height: 98px;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .plant-card-score {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    font-size: 0.82rem;
  }

  .rival-plant {
    width: 48px;
    height: 68px;
  }

  .rival-trap {
    width: 28px;
    height: 23px;
  }
}
