/* ---------------------------------------------------------------------------
   Plant Shop UI

   The 3D canvas fills the viewport; everything here floats on top of it. The
   overlay is pointer-events:none by default and re-enables events only on the
   panels themselves, so dragging on empty space still orbits the camera.
   --------------------------------------------------------------------------- */

:root {
  --bg: #1d241f;
  --panel: rgba(28, 36, 30, 0.86);
  --panel-edge: rgba(255, 255, 255, 0.1);
  --ink: #f2efe4;
  --ink-dim: #b6b6a6;
  --gold: #f6c445;
  --leaf: #7cb342;
  --leaf-dark: #4f7c33;
  --clay: #c1714a;
  --danger: #e0644f;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
}

.app canvas {
  display: block;
  touch-action: none;
}

/* --- Overlay scaffolding -------------------------------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 14px;
  gap: 12px;
  pointer-events: none;
}

.overlay > * {
  pointer-events: none;
}

/**
 * The grid's middle row: greenhouse tasks on the left, everything else on
 * the right. `align-items: stretch` (the default, kept explicit here) gives
 * each side the row's full real height — without it, a percentage-based
 * `max-height` further down (`.market`, `.sidestack`) has nothing to measure
 * against and just grows to fit its content instead of scrolling.
 */
.overlay__middle {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  min-height: 0;
  gap: 12px;
}

.overlay__side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.overlay__side--left {
  align-items: flex-start;
}

.overlay__side--right {
  align-items: flex-end;
}

/* --- HUD ------------------------------------------------------------------ */

.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  pointer-events: auto;
  /* An explicit z-index (rather than auto) isolates a stacking context here — otherwise
     `.hud` is just a grid item of `.overlay`, and a descendant dropdown's z-index doesn't
     reliably win against unrelated content in the grid's other row (`.overlay__middle`). */
  position: relative;
  z-index: 10;
}

.hud__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hud__value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  line-height: 1.1;
}

.hud__sub {
  font-size: 11px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.hud__level {
  min-width: 190px;
}

.hud__clock {
  min-width: 96px;
}

.hud__value--clock {
  font-size: 20px;
  white-space: nowrap;
}

.hud__value--coins {
  color: #f2c94c;
}

.hud__value--reputation {
  color: var(--gold);
}

.hud__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud__toolchip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(124, 179, 66, 0.18);
  border: 1px solid rgba(124, 179, 66, 0.4);
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hud__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Every control in the top bar shares one height and corner radius, icon
   buttons and the market/greenhouse toggle alike, so the row reads as one
   consistent group instead of mismatched pieces. */
.hud__actions .iconbtn,
.hud__actions .hud__toggle {
  height: 34px;
  border-radius: 9px;
}

.xpbar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin: 3px 0;
}

.xpbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--leaf-dark), var(--leaf));
  transition: width 220ms ease-out;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-edge);
  border-radius: 9px;
  cursor: pointer;
  transition:
    background 140ms ease,
    transform 90ms ease;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--leaf-dark);
  border-color: transparent;
}

.btn--primary:hover:not(:disabled) {
  background: var(--leaf);
}

.btn--warn {
  background: rgba(246, 196, 69, 0.22);
  border-color: rgba(246, 196, 69, 0.45);
}

.btn--ghost {
  background: transparent;
}

.btn--small {
  padding: 5px 10px;
  font-size: 12px;
}

.btn--buy {
  min-width: 62px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  background: var(--leaf-dark);
  border-color: transparent;
}

.btn--buy:hover:not(:disabled) {
  background: var(--leaf);
}

/* --- Icon buttons and tooltips -------------------------------------------- */

.iconbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-edge);
  border-radius: 9px;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease;
}

.iconbtn__content {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Square instead of pill-shaped once there's no label to give it width — the tooltip (data-tip) still names it on hover. */
.iconbtn--icon-only {
  width: 34px;
  padding: 0;
}

.iconbtn__label {
  white-space: nowrap;
}

.iconbtn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.iconbtn--active {
  background: var(--leaf-dark);
  border-color: transparent;
  color: #fff;
}

/* Now icon-only, same treatment as `.iconbtn--icon-only`: square, no leftover text padding. */
.hud__toggle {
  position: relative;
  width: 34px;
  padding: 0;
  justify-content: center;
}

/* Tooltip. Rendered from data-tip so the icon stays the only visible label — shared with `.hud__toggle` now that it's icon-only too. */

.iconbtn::after,
.hud__toggle::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(18, 24, 20, 0.96);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  z-index: 20;
}

.iconbtn:hover::after,
.iconbtn:focus-visible::after,
.hud__toggle:hover::after,
.hud__toggle:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/*
 * Footer controls — time + sound. Deliberately quieter than the HUD's
 * `.iconbtn`: smaller, no persistent background, tooltip opens upward since
 * this cluster sits at the bottom edge of the screen.
 */
.footerctl {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  pointer-events: auto;
}

.footerctl__divider {
  width: 1px;
  height: 14px;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.15);
}

.footerbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: rgba(242, 239, 228, 0.7);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease;
}

.footerbtn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

.footerbtn--active {
  background: var(--leaf-dark);
  color: #fff;
}

/* Tooltip opens upward — this cluster lives in the footer, at the bottom edge of the screen. */
.footerbtn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(18, 24, 20, 0.96);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  z-index: 20;
}

.footerbtn:hover::after,
.footerbtn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- HUD dropdown (Estufa) -------------------------------------------------- */

.hudmenu {
  position: relative;
}

.hudmenu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}

kbd {
  font: inherit;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink-dim);
}

/* --- Side panels ---------------------------------------------------------- */

/* Seed pouch and expansion card share the right rail. */
.sidestack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 100%;
  min-height: 0;
  pointer-events: none;
}

.sidestack .tray {
  min-height: 0;
  flex: 0 1 auto;
}

.sidestack .orders,
.sidestack .missions,
.sidestack .bag {
  min-height: 0;
  flex: 0 1 auto;
  overflow-y: auto;
}

.missionlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.missionitem {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-dim);
}

.missionitem--done {
  color: inherit;
}

.missionitem__mark {
  flex: none;
  width: 16px;
  text-align: center;
  color: var(--leaf);
}

.missionitem__label {
  flex: 1;
}

.missionitem__progress {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.expand {
  width: 330px;
  flex: none;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.expand__title {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.expand__now {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.expand__row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.expand__gain {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
}

.expand__sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-dim);
}

.expand__hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-dim);
}

/* --- Colheita (harvested-plant bag) ---------------------------------------- */

.bag__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.baglist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bagitem {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bagitem__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.bagitem__name {
  flex: 1;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* --- Pedidos (customer orders) --------------------------------------------- */

.orders__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.orders__reputation {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.orderlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.order__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order__timer {
  font-size: 12px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.order__flavor {
  margin: 3px 0 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-dim);
}

.orderlines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.orderline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orderline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.orderline__name {
  flex: 1;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.tray,
.market {
  max-height: 100%;
  overflow-y: auto;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.tray {
  width: 330px;
}

/** Wider than every other panel — 4 tabs' worth of catalogue (seeds, upgrades, boosts, decor) need the room a 330px side panel doesn't have. */
.market {
  width: 460px;
}

.tray__title,
.market__title {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.market__hint,
.tray__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-dim);
}

.tray__hint {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--panel-edge);
  color: var(--gold);
}

.tray__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-dim);
}

.tray__list,
.market__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seed {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
}

.seed:hover {
  background: rgba(255, 255, 255, 0.13);
}

.seed--selected {
  border-color: var(--gold);
  background: rgba(246, 196, 69, 0.14);
}

.seed__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.3);
}

.seed__name {
  font-weight: 600;
}

.seed__count {
  margin-left: auto;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.offer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.offer--locked {
  opacity: 0.5;
}

.offer--owned {
  border: 1px solid rgba(124, 179, 66, 0.4);
}

.offer__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  margin-top: 3px;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.3);
}

.offer__body {
  flex: 1;
  min-width: 0;
}

.offer__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}

.offer__held {
  font-size: 11px;
  color: var(--gold);
}

.offer__desc {
  margin: 2px 0 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-dim);
}

.offer__meta {
  margin: 0;
  font-size: 11px;
  color: rgba(182, 182, 166, 0.75);
}

/* --- Feed ----------------------------------------------------------------- */

.feed {
  position: absolute;
  left: 14px;
  bottom: 56px;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  pointer-events: none;
}

.feed__item {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  border-left: 3px solid var(--ink-dim);
  box-shadow: var(--shadow);
  animation: rise 220ms ease-out;
}

.feed__item--good {
  border-left-color: var(--leaf);
  color: #d5f0b8;
}

.feed__item--bad {
  border-left-color: var(--danger);
  color: #ffcfc6;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* --- Footer --------------------------------------------------------------- */

/*
 * Three-column grid, not flex — a flex `space-between` only guarantees the
 * *gaps* around the middle item are equal, not that it sits at the true
 * horizontal center (that depends on the two flanking items being the same
 * width, which `footer__left`'s variable-length hint text and the small
 * "Reiniciar" button never are). `1fr auto 1fr` centers the middle column
 * for real, independent of what's in the other two.
 */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: rgba(242, 239, 228, 0.65);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer > *:last-child {
  justify-self: end;
}

.footer button {
  pointer-events: auto;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.footer__clock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  color: rgba(242, 239, 228, 0.85);
  font-variant-numeric: tabular-nums;
}

.footer__clock-time {
  font-weight: 700;
}

.footer__clock-phase {
  color: rgba(242, 239, 228, 0.55);
}

/* --- Modal (save / load) -------------------------------------------------- */

.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 18, 14, 0.55);
  backdrop-filter: blur(3px);
  z-index: 10;
}

.modal__card {
  width: min(560px, calc(100vw - 40px));
  max-height: 84vh;
  overflow-y: auto;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal__head h2 {
  margin: 0;
  font-size: 18px;
}

.modal__note {
  margin: 6px 0 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-dim);
}

/*
 * PlantPopup only: the species list can run to a dozen-plus rows, longer than
 * `.modal__card`'s own `overflow-y: auto` handles gracefully — the header and
 * the "Ir ao Mercado" note would scroll away with it, and a list cut off
 * mid-row at the card's max-height gives no hint there's more below. Here the
 * card becomes the scroll boundary and only the list scrolls inside it, so
 * the header and note stay put and a visible row always ends cleanly.
 */
.plantpopup {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.plantpopup .modal__head {
  flex: none;
}

.plantpopup .slots {
  overflow-y: auto;
  min-height: 0;
  margin: 12px -4px 0 0;
  padding-right: 4px;
}

.plantpopup .modal__note {
  flex: none;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--panel-edge);
}

.slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

/* Aligned to the name's line, not the vertical center of the whole (name + price)
   block — a dot centered against two stacked lines of text reads as floating,
   belonging to neither. The button stays centered against the block as a whole. */
.slot .seed__dot {
  align-self: flex-start;
  margin-top: 3px;
}

.slot__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.slot__name {
  font-size: 14px;
}

.slot__stats {
  font-size: 12px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.slot__stats--empty {
  color: var(--ink-dim);
  font-style: italic;
}

.slot__time {
  font-size: 11px;
  color: var(--ink-dim);
}

.slot__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.slot__confirm {
  font-size: 12px;
  color: var(--gold);
  margin-right: 2px;
}

/* --- Pause ---------------------------------------------------------------- */

.paused {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 18, 14, 0.45);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.paused__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 44px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.paused__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paused__hint {
  font-size: 12px;
  color: var(--ink-dim);
}

/* --- Login / profile ------------------------------------------------------ */

.authtabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 4px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
}

.authtab {
  flex: 1;
  padding: 8px 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.authtab--active {
  background: var(--leaf-dark);
  color: var(--ink);
}

.authform {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.authform__row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.authform__label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.authform__input {
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
}

.authform__input:focus {
  outline: 2px solid var(--gold);
  outline-offset: -1px;
}

.authform__error {
  margin: 0;
  font-size: 12px;
  color: var(--danger);
}

.profile__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.profile__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  color: #1d241f;
  box-shadow: var(--shadow);
}

.profile__name {
  display: block;
  font-size: 17px;
}

.profile__username {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
}

.profile__stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
}

.profile__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--ink-dim);
}

.profile__stat strong {
  font-size: 15px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.profile__colors {
  display: flex;
  gap: 8px;
}

.profile__color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.profile__color--active {
  border-color: var(--ink);
}

.cloudsave {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(246, 196, 69, 0.14);
  border: 1px solid rgba(246, 196, 69, 0.35);
}

.cloudsave__text {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink);
}

.cloudsave__actions {
  display: flex;
  gap: 8px;
}

.profile__avatar--small {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.profile__tabcontent {
  margin-top: 4px;
}

.seed--static {
  cursor: default;
}

.seed--static:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* --- History --------------------------------------------------------------- */

.history__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.history__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--ink-dim);
  font-size: 13px;
}

.history__item--good {
  border-left-color: var(--leaf);
}

.history__item--bad {
  border-left-color: var(--danger);
}

.history__icon {
  flex: none;
  color: var(--ink-dim);
}

.history__text {
  flex: 1;
  min-width: 0;
}

.history__time {
  flex: none;
  font-size: 11px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* --- Friends ---------------------------------------------------------------- */

.friends__section {
  margin-top: 18px;
}

.friends__section:first-of-type {
  margin-top: 16px;
}

/* --- Cosmetics shop --------------------------------------------------------- */

.shop__section {
  margin-top: 18px;
}

.testmode {
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--gold);
  background: rgba(246, 196, 69, 0.12);
  border: 1px solid rgba(246, 196, 69, 0.3);
}

.packs {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.pack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.decor__list {
  margin-top: 14px;
}

.pack__coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #f2c94c;
  font-variant-numeric: tabular-nums;
}
