/*
 * Weedopolis premium responsive UI shell.
 * STRUCTURE IS LOCKED. Board/deed/deck/currency artwork is intentionally swappable
 * until the final approved masters are imported.
 */

:root {
  --weed-green-950: #07160f;
  --weed-green-900: #0b2117;
  --weed-green-850: #102d20;
  --weed-green-800: #173f2a;
  --weed-green-700: #24583c;
  --weed-gold-300: #f2df9b;
  --weed-gold-400: #dfc56e;
  --weed-gold-500: #b9933e;
  --weed-parchment: #efe3bf;
  --weed-parchment-light: #f8efd5;
  --weed-ink: #183023;
  --weed-line: rgba(185, 147, 62, .72);
  --weed-shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

html {
  scroll-behavior: smooth;
  background: var(--weed-green-950);
}

body {
  padding-bottom: 0;
  background:
    radial-gradient(circle at 15% -10%, rgba(73, 119, 80, .28), transparent 34rem),
    linear-gradient(145deg, #06120d 0%, #0b2117 44%, #07160f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 34px 34px;
}

.game-command-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: .65rem clamp(.75rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--weed-line);
  background: rgba(7, 22, 15, .96);
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
  backdrop-filter: blur(16px);
}

.command-left,
.command-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.icon-button,
.utility-button {
  min-height: 44px;
  border: 1px solid var(--weed-line);
  border-radius: .6rem;
  color: var(--weed-gold-300);
  background: linear-gradient(180deg, rgba(36,88,60,.68), rgba(11,33,23,.9));
  box-shadow: inset 0 0 0 1px rgba(242,223,155,.08);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  text-decoration: none;
  font-size: 1.15rem;
}

.game-identity {
  display: grid;
  min-width: 0;
  line-height: 1;
}

.game-identity strong {
  color: var(--weed-gold-300);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 2.35rem);
  letter-spacing: .035em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}

.game-identity > span:last-child {
  margin-top: .18rem;
  color: #d9c985;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand-kicker {
  color: #a8b8aa;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.bud-bucks-display {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 50px;
  padding: .35rem .85rem;
  border: 1px solid var(--weed-line);
  border-radius: .65rem;
  color: var(--weed-gold-300);
  background: rgba(14, 42, 29, .9);
  box-shadow: inset 0 0 0 1px rgba(242,223,155,.08);
}

.bud-bucks-display small,
.bud-bucks-display strong {
  display: block;
}

.bud-bucks-display small {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.bud-bucks-display strong {
  margin-top: .1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1;
}

.bud-icon {
  font-size: 1.35rem;
}

.game-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  grid-template-areas:
    "setup setup"
    "stage rail";
  gap: 1rem;
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 1rem;
}

.setup-panel {
  grid-area: setup;
  width: min(100%, 980px);
  margin: .5rem auto;
}

.play-stage {
  grid-area: stage;
  min-width: 0;
}

.game-rail {
  grid-area: rail;
  display: grid;
  align-content: start;
  gap: .85rem;
  min-width: 0;
}

.panel {
  border-radius: .7rem;
  box-shadow: var(--weed-shadow);
}

.parchment-panel {
  border: 1px solid var(--weed-line);
  color: var(--weed-ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.44), transparent 30rem),
    linear-gradient(145deg, var(--weed-parchment-light), var(--weed-parchment));
  box-shadow:
    inset 0 0 0 3px rgba(24,48,35,.12),
    inset 0 0 0 5px rgba(185,147,62,.18),
    var(--weed-shadow);
}

.dark-panel {
  border: 1px solid var(--weed-line);
  color: #f7efd6;
  background:
    radial-gradient(circle at 20% 0%, rgba(65,111,75,.2), transparent 22rem),
    linear-gradient(155deg, rgba(17,49,34,.98), rgba(7,25,17,.98));
  box-shadow:
    inset 0 0 0 1px rgba(242,223,155,.08),
    var(--weed-shadow);
}

.section-kicker,
.panel-heading h2,
.panel-heading .section-kicker {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-kicker {
  color: #6d5120;
  font-size: .72rem;
}

.dark-panel .panel-heading h2 {
  color: var(--weed-gold-300);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .75rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(185,147,62,.45);
}

.panel-heading h2 {
  font-size: .88rem;
}

.panel-ornament {
  color: var(--weed-gold-500);
}

.asset-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .18rem .48rem;
  border: 1px solid rgba(109,81,32,.35);
  border-radius: 999px;
  color: #765826;
  background: rgba(255,255,255,.25);
  font-size: .62rem;
  font-weight: 800;
}

.board-frame {
  position: relative;
  min-width: 0;
  padding: clamp(.35rem, .8vw, .6rem);
  overflow: hidden;
  border: 1px solid var(--weed-line);
  border-radius: .85rem;
  background: linear-gradient(145deg, #173f2a, #081d14);
  box-shadow:
    inset 0 0 0 2px rgba(242,223,155,.08),
    0 22px 60px rgba(0,0,0,.42);
}

.board-art-slot {
  position: absolute;
  inset: .6rem;
  border-radius: .55rem;
  pointer-events: none;
  opacity: .11;
  background:
    radial-gradient(circle at center, rgba(239,227,191,.9), rgba(239,227,191,.38) 46%, transparent 47%),
    repeating-linear-gradient(45deg, rgba(242,223,155,.15) 0 1px, transparent 1px 12px);
}

.board-frame .board {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 720px;
  max-width: none;
  border: 0;
  border-radius: .55rem;
  background: rgba(7,23,15,.72);
  box-shadow: none;
}

.board-center {
  border: 1px solid rgba(185,147,62,.55);
  color: #1e3d2b;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.62), transparent 24rem),
    linear-gradient(145deg, rgba(248,239,213,.96), rgba(226,210,164,.96));
  box-shadow: inset 0 0 0 3px rgba(23,63,42,.08);
}

.board-center h2 {
  color: #173f2a;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 1px 0 #fff8de;
}

.board-center p {
  color: #4c5c4f;
}

.tile {
  border-color: rgba(23,63,42,.78);
  background: #f0e5c5;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.2),
    inset 0 0 0 4px color-mix(in srgb, var(--space-color, #efe2bd) 55%, transparent);
}

.tile::before {
  height: .43rem;
}

.tile-name {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .015em;
}

.tile.current-space {
  outline-color: var(--weed-gold-300);
  filter: saturate(1.12) brightness(1.04);
}

.player-token {
  border: 1px solid rgba(23,63,42,.55);
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}

.asset-status-note {
  margin: .55rem .25rem 0;
  color: #9daf9f;
  font-size: .72rem;
  line-height: 1.4;
  text-align: center;
}

.turn-card button,
.property-management-card button,
.setup-panel button {
  border-color: #8d6d2e;
}

.parchment-panel button {
  color: #f8efd5;
  background: linear-gradient(180deg, #286341, #173f2a);
  box-shadow: inset 0 0 0 1px rgba(242,223,155,.14);
}

.parchment-panel button.primary,
button.primary {
  color: #f9f0d3;
  background: linear-gradient(180deg, #2f704a, #174329);
}

.turn-summary,
.parchment-panel p,
.parchment-panel .property-card p {
  color: #405044;
}

.turn-card .pending-card,
.property-management-card .pending-card {
  color: #2c3e30;
  background: rgba(185,147,62,.12);
}

.players-card .player-card,
.game-log-card .log li {
  border-color: rgba(223,197,110,.22);
}

.players-card .player-card.current {
  border-color: var(--weed-gold-400);
  background: rgba(223,197,110,.1);
}

.players-card .player-card p,
.game-log-card .log li {
  color: #c7d0c8;
}

.property-art-slot {
  display: grid;
  place-items: center;
  min-height: 120px;
  margin-bottom: .75rem;
  border: 1px dashed rgba(109,81,32,.38);
  border-radius: .55rem;
  color: #705526;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(185,147,62,.08)),
    repeating-linear-gradient(45deg, rgba(23,63,42,.04) 0 1px, transparent 1px 9px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.property-management-card .property-list {
  gap: .5rem;
}

.property-management-card .property-card {
  border-color: rgba(109,81,32,.22);
  background: rgba(255,255,255,.23);
}

.property-management-card .status-badge {
  color: #f8efd5;
  background: #315f43;
}

.mobile-game-dock {
  display: none;
}

@media (max-width: 1180px) {
  .game-shell {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }

  .board-frame .board {
    min-width: 650px;
  }
}

@media (max-width: 960px) {
  body {
    padding-bottom: 78px;
  }

  .game-command-bar {
    position: static;
  }

  .game-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "setup"
      "stage"
      "rail";
    padding: .65rem;
  }

  .game-rail {
    grid-template-columns: 1fr;
  }

  .board-frame {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .board-frame .board {
    min-width: 700px;
  }

  .mobile-game-dock {
    position: fixed;
    z-index: 50;
    right: .55rem;
    bottom: .55rem;
    left: .55rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .35rem;
    padding: .42rem;
    border: 1px solid var(--weed-line);
    border-radius: .8rem;
    background: rgba(7,22,15,.97);
    box-shadow: 0 14px 40px rgba(0,0,0,.42);
    backdrop-filter: blur(14px);
  }

  .mobile-game-dock a,
  .mobile-game-dock button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 48px;
    padding: .35rem .25rem;
    border: 1px solid rgba(223,197,110,.35);
    border-radius: .55rem;
    color: var(--weed-gold-300);
    background: rgba(23,63,42,.55);
    font-size: .72rem;
    font-weight: 850;
    text-align: center;
    text-decoration: none;
  }

  .mobile-game-dock button:not(:disabled) {
    color: #0b2117;
    background: linear-gradient(180deg, #f2df9b, #c6a14c);
  }
}

@media (max-width: 680px) {
  .game-command-bar {
    align-items: stretch;
    padding: .55rem;
  }

  .game-identity .brand-kicker,
  .game-identity > span:last-child {
    display: none;
  }

  .command-right {
    gap: .35rem;
  }

  .utility-button {
    min-width: 44px;
    padding-inline: .55rem;
    font-size: .72rem;
  }

  .bud-bucks-display {
    padding-inline: .55rem;
  }

  .bud-bucks-display small {
    font-size: .5rem;
  }

  .bud-bucks-display strong {
    font-size: 1.05rem;
  }

  .bud-icon {
    display: none;
  }

  .game-shell {
    gap: .65rem;
  }

  .panel {
    padding: .78rem;
    border-radius: .6rem;
  }

  .board-frame {
    padding: .28rem;
  }

  .board-frame .board {
    min-width: 620px;
  }

  .asset-status-note {
    text-align: left;
  }

  .action-row,
  .manage-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row button,
  .manage-actions button {
    min-height: 48px;
  }
}

@media (max-width: 420px) {
  .game-identity strong {
    font-size: 1.15rem;
  }

  .icon-button {
    width: 40px;
    min-width: 40px;
  }

  .utility-button {
    display: none;
  }

  .board-frame .board {
    min-width: 570px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
