/* nunito-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* nunito-cyrillic-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* nunito-vietnamese-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-vietnamese-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* nunito-latin-ext-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* nunito-latin-wght-normal */
@font-face {
  font-family: 'Nunito Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(./fonts/nunito-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities {
  .visible {
    visibility: visible;
  }
  .absolute {
    position: absolute;
  }
  .static {
    position: static;
  }
  .flex {
    display: flex;
  }
  .hidden {
    display: none;
  }
  .table {
    display: table;
  }
  .shrink {
    flex-shrink: 1;
  }
  .transform {
    transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
  }
  .resize {
    resize: both;
  }
  .blur {
    --tw-blur: blur(8px);
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
  .filter {
    filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
  }
}
:root {
  --bg: #0a2421;
  --bg-soft: #10332e;
  --panel: #f7f4ec;
  --panel-warm: #fffaf0;
  --ink: #183832;
  --muted: #6b7c74;
  --line: #dfe3d9;
  --gold: #d9ad53;
  --gold-light: #f5d98b;
  --red: #a93345;
  --blue: #5395ac;
  --green: #2c765c;
  --shadow: 0 14px 38px rgba(3, 24, 21, .16);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
button, select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
button, a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible, select:focus-visible {
  outline: 3px solid #e9c76d;
  outline-offset: 2px;
}
h1, h2, h3, p {
  margin: 0;
}
svg {
  flex-shrink: 0;
}
.game-app {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background: radial-gradient(circle at 50% -15%, #285449 0, transparent 42%), linear-gradient(180deg, #0c2b27, #0a2421 70%);
}
.ambient-snow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: .45;
}
.ambient-snow i {
  position: absolute;
  top: -15px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e9f5ef;
  animation: snow-fall 12s linear infinite;
}
.ambient-snow i:nth-child(3n) {
  width: 7px;
  height: 7px;
  opacity: .45;
}
@keyframes snow-fall {
  to {
    transform: translate3d(45px, 105vh, 0) rotate(180deg);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spin {
  animation: spin 1s linear infinite;
}
.pulse {
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: .4;
  }
}
.app-header {
  height: 72px;
  padding: 0 max(20px, calc((100vw - 1540px) / 2));
  display: flex;
  align-items: center;
  gap: 22px;
  color: #f8f4e8;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(7, 32, 28, .87);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  background: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  text-align: left;
}
.brand > span:last-child {
  display: flex;
  flex-direction: column;
}
.brand strong {
  font-family: Georgia, serif;
  font-size: 20px;
  letter-spacing: -.3px;
}
.brand small {
  color: #a9c3b7;
  font-size: 12.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 3px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #f1cc74;
  background: linear-gradient(145deg, #285c4c, #153d34);
  border: 1px solid #537565;
  border-radius: 13px;
  position: relative;
  box-shadow: inset 0 1px rgba(255,255,255,.12);
}
.brand-mark > svg:last-child {
  position: absolute;
  top: 4px;
  right: 4px;
}
.brand-mark.large {
  width: 72px;
  height: 72px;
  border-radius: 23px;
}
.brand-mark.large > svg:last-child {
  width: 18px;
  height: 18px;
  top: 8px;
  right: 8px;
}
.header-resources {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.resource-pill {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  font-size: 14px;
}
.resource-pill strong {
  font-variant-numeric: tabular-nums;
}
.resource-pill span {
  color: #a9c0b6;
  font-size: 13px;
}
.resource-pill.coins svg {
  color: #edc367;
}
.resource-pill.snowflakes svg {
  color: #a8e3e9;
}
.score-pill {
  color: #f0d484;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.daily-header-button {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #d8e5dd;
  background: transparent;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  font-size: 13.5px;
}
.daily-header-button.ready {
  color: #ffe6a2;
  border-color: rgba(238,198,103,.45);
  background: rgba(217,173,83,.09);
}
.daily-header-button i {
  position: absolute;
  width: 7px;
  height: 7px;
  right: -2px;
  top: -2px;
  border-radius: 50%;
  background: #efc465;
  box-shadow: 0 0 0 3px #12342e;
}
.save-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8faea0;
  font-size: 13px;
  min-width: 76px;
}
.save-indicator.error {
  color: #ef9b9b;
}
.player-level-mobile {
  display: none;
}
.main-nav {
  height: 55px;
  padding: 0 max(20px, calc((100vw - 1510px) / 2));
  display: flex;
  align-items: stretch;
  gap: 4px;
  position: sticky;
  top: 72px;
  z-index: 35;
  background: rgba(14, 46, 40, .95);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.main-nav > button {
  color: #9eb8ab;
  background: transparent;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  position: relative;
  border-bottom: 2px solid transparent;
}
.main-nav > button:hover {
  color: #f7e7bc;
  background: rgba(255,255,255,.03);
}
.main-nav > button.active {
  color: #f5d581;
  border-bottom-color: #e2b75d;
}
.nav-short-label {
  display: none;
}
.nav-dot {
  width: 5px;
  height: 5px;
  background: #e9c36b;
  border-radius: 50%;
}
.nav-level {
  margin-left: auto;
  width: 160px;
  align-self: center;
  color: #a5bdb0;
  font-size: 12.5px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
}
.nav-level > div {
  height: 4px;
  background: #294a42;
  border-radius: 5px;
  overflow: hidden;
  grid-column: 1 / 3;
}
.nav-level > div i {
  display: block;
  height: 100%;
  background: #d7b25c;
}
.nav-level small {
  grid-column: 2;
  grid-row: 1;
  font-size: 12px;
}
.app-content-wrapper {
  min-height: calc(100vh - 55px);
  position: relative;
}
.app-content {
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px 20px 35px;
  min-height: calc(100vh - 170px);
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 18px;
  align-items: start;
}
.tree-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 18px;
  align-items: start;
}
.tree-play-column, .tree-info-card, .side-card, .ratings-card, .mini-game-shell {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.tree-play-column {
  padding: 18px;
  min-width: 0;
}
.tree-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.eyebrow {
  display: block;
  color: #78887e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.55px;
  line-height: 1.4;
}
.tree-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}
.tree-title-row h1 {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  color: #173b32;
}
.level-badge {
  color: #8c6828;
  background: #f3e6bf;
  border: 1px solid #e7d49f;
  border-radius: 7px;
  padding: 3px 7px;
  font-size: 12.5px;
  font-weight: 700;
}
.tree-score {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b4852d;
}
.tree-score > div {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.tree-score strong {
  font-size: 22px;
}
.tree-score span {
  color: #8b938a;
  font-size: 12px;
  margin-top: 4px;
}
.level-track {
  height: 5px;
  border-radius: 10px;
  background: #dde3d9;
  position: relative;
  margin-bottom: 14px;
}
.level-track > span, .level-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c59841, #efd580);
  border-radius: inherit;
  transition: width .35s;
}
.level-track small {
  position: absolute;
  right: 0;
  top: 8px;
  font-size: 12px;
  color: #89958d;
}
.tree-stage {
  width: 100%;
  aspect-ratio: 500 / 620;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, var(--theme-a), transparent 62%), linear-gradient(180deg, #163e38, #0b2926 80%);
  @supports (color: color-mix(in lab, red, red)) {
    background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--theme-a) 28%, transparent), transparent 62%), linear-gradient(180deg, #163e38, #0b2926 80%);
  }
  border: 1px solid #2d5147;
  box-shadow: inset 0 0 70px rgba(0,0,0,.25);
}
.tree-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: radial-gradient(circle at 15% 22%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 85% 15%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 80% 65%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 15% 75%, #fff 0 1px, transparent 1.5px);
  background-size: 160px 170px, 220px 190px, 180px 220px, 240px 210px;
}
.tree-stage.theme-cosmic {
  background: radial-gradient(ellipse at 50% 35%, rgba(107,88,174,.4), transparent 60%), linear-gradient(180deg, #181c48, #102b35 80%);
}
.tree-stage.theme-retro {
  background: radial-gradient(ellipse at 50% 35%, rgba(154,85,55,.32), transparent 60%), linear-gradient(180deg, #3b3430, #17332d 80%);
}
.tree-stage.theme-forest {
  background: radial-gradient(ellipse at 50% 35%, rgba(82,129,91,.32), transparent 60%), linear-gradient(180deg, #173c35, #0c2926 80%);
}
.tree-svg {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  touch-action: none;
  user-select: none;
}
.tree-svg.is-placing {
  cursor: crosshair;
}
.placed-ornament {
  cursor: grab;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.35));
}
.placed-ornament:active {
  cursor: grabbing;
}
.placed-ornament.readonly {
  cursor: default;
}
.placed-ornament.selected {
  filter: drop-shadow(0 0 6px rgba(255,231,143,.8));
}
.selection-ring {
  animation: spin 8s linear infinite;
  transform-origin: center;
}
.garland-bulb {
  animation: bulb-glow 1.8s ease-in-out infinite;
}
@keyframes bulb-glow {
  50% {
    opacity: .48;
  }
}
.svg-snow {
  animation: snow-drift 5s ease-in-out infinite alternate;
}
@keyframes snow-drift {
  to {
    transform: translate(7px, 13px);
    opacity: .3;
  }
}
.tree-tier.locked {
  opacity: .2;
  filter: grayscale(.6);
}
.stage-sky i {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #f4e4aa;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 8px #f4e4aa;
  animation: pulse 2s infinite;
}
.stage-sky i:nth-child(1) {
  left: 12%;
  top: 14%;
}
.stage-sky i:nth-child(2) {
  left: 82%;
  top: 23%;
  animation-delay: -.7s;
}
.stage-sky i:nth-child(3) {
  left: 70%;
  top: 8%;
  animation-delay: -1.2s;
}
.stage-sky i:nth-child(4) {
  left: 23%;
  top: 38%;
}
.stage-sky i:nth-child(5) {
  left: 90%;
  top: 52%;
}
.stage-sky i:nth-child(6) {
  left: 9%;
  top: 59%;
}
.branch-lock {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 20px;
  color: #d5ded8;
  background: rgba(5,25,23,.65);
  font-size: 12px;
  pointer-events: none;
}
.placing-hint {
  position: absolute;
  z-index: 5;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 13px;
  border-radius: 20px;
  color: #273d32;
  background: #f5d98b;
  box-shadow: 0 5px 20px rgba(0,0,0,.3);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  animation: hint-bob 1.5s ease-in-out infinite;
}
@keyframes hint-bob {
  50% {
    transform: translate(-50%, -3px);
  }
}
.tree-selection-actions {
  position: absolute;
  z-index: 6;
  bottom: 10px;
  left: 10px;
  right: 10px;
  min-height: 38px;
  padding: 5px 6px 5px 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(249,246,234,.94);
  border-radius: 11px;
  box-shadow: 0 4px 15px rgba(0,0,0,.25);
  font-size: 12px;
  color: #6d7b72;
}
.tree-selection-actions span {
  margin-right: auto;
}
.tree-selection-actions button {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9e3e48;
  background: #f4dfe0;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12.5px;
}
.tree-selection-actions .icon-button {
  color: #5c6e65;
  background: #e4e8df;
  padding: 7px;
}
.invalid-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  animation: invalid .35s;
  border: 2px solid transparent;
  border-radius: inherit;
}
@keyframes invalid {
  50% {
    border-color: #e38787;
    background: rgba(197,60,60,.08);
  }
}
.tree-underbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 2px 0;
}
.score-recipe {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  color: #7b8981;
  font-size: 12px;
}
.score-recipe span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.score-recipe b {
  color: #3c725d;
}
.branch-pips {
  display: flex;
  gap: 3px;
}
.branch-pips i {
  width: 14px;
  height: 5px;
  background: #d7ddd4;
  border-radius: 4px;
}
.branch-pips i.open {
  background: #4d8a6c;
}
.inventory-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.inventory-heading p {
  color: #4d645b;
  font-size: 13px;
  margin-top: 3px;
}
.text-button {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: #8e6b2c;
  font-size: 12.5px;
  white-space: nowrap;
}
.inventory-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: #c6cec3 transparent;
}
.inventory-item {
  flex: 0 0 86px;
  height: 112px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #dce1d7;
  background: #edf0e9;
  color: #3f554c;
  padding: 5px 4px 7px;
  transition: transform .16s, border-color .16s;
}
.inventory-item:hover {
  transform: translateY(-2px);
  border-color: #b4c3b5;
}
.inventory-item.active {
  border: 2px solid #c69b43;
  background: #fff6d9;
  box-shadow: 0 0 0 3px rgba(213,175,87,.14);
}
.inventory-item > svg {
  width: 66px;
  height: 70px;
}
.inventory-item > span:last-of-type {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.inventory-count {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d8ded4;
  color: #52675d;
  font-size: 12px;
  font-weight: 700;
}
.selected-check {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #c69b43;
  color: white;
}
.empty-inventory {
  padding: 20px;
  background: #ecefe8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6e7d74;
  font-size: 13px;
}
.empty-inventory button {
  margin-left: auto;
  color: #8c672a;
  background: #f4e4ba;
  border-radius: 8px;
  padding: 8px;
}
.tree-info-card {
  padding: 17px;
}
.info-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9c772f;
}
.info-card-heading h2, .side-heading h2 {
  color: #23483d;
  font-size: 15px;
}
.muted-copy {
  color: #76857c;
  font-size: 13px;
  line-height: 1.55;
  margin: 10px 0 13px;
}
.theme-list {
  display: grid;
  gap: 6px;
}
.theme-choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  text-align: left;
  border: 1px solid #e0e3da;
  background: #f0f1eb;
  color: #385349;
  border-radius: 10px;
}
.theme-choice.active {
  border-color: #c9a656;
  background: #fff6db;
}
.theme-choice:disabled {
  opacity: .55;
}
.theme-choice > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.theme-choice strong {
  display: block;
  font-size: 13px;
}
.theme-choice small {
  display: block;
  font-size: 11px;
  color: #839087;
  margin-top: 2px;
  line-height: 1.3;
}
.theme-swatch {
  width: 28px;
  height: 32px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.tip-box {
  display: flex;
  gap: 8px;
  padding: 11px;
  margin-top: 14px;
  border-radius: 10px;
  color: #7b6b45;
  background: #f2ead4;
  font-size: 12px;
  line-height: 1.5;
}
.tip-box svg {
  margin-top: 1px;
}
.contribution-highlight {
  display: flex;
  flex-direction: column;
  padding: 15px;
  border-radius: 12px;
  background: #e4eee5;
  text-align: center;
  color: #4b6d5c;
}
.contribution-highlight strong {
  font-family: Georgia, serif;
  font-size: 35px;
  color: #28634d;
}
.contribution-highlight span, .contribution-highlight small {
  font-size: 12.5px;
}
.micro-rules {
  display: grid;
  gap: 9px;
  margin-top: 15px;
  color: #64776c;
  font-size: 12.5px;
}
.micro-rules span {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.micro-rules svg {
  color: #4c8a6a;
}
.home-sidebar, .team-panels {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.side-card, .ratings-card {
  padding: 15px;
  min-width: 0;
}
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #947230;
}
.daily-teaser, .gift-teaser {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 9px;
}
.side-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #987433;
  background: #f1e6c9;
  border-radius: 11px;
}
.side-card h3 {
  color: #294a40;
  font-size: 13.5px;
  margin-top: 2px;
}
.side-card > small, .gift-teaser small {
  display: block;
  color: #819087;
  font-size: 12px;
  margin-top: 3px;
}
.daily-teaser > button, .gift-teaser > button {
  background: #e9d49d;
  color: #765923;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
}
.gift-teaser > button {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gift-teaser.ready {
  background: #fff7df;
  border-color: #e8cc86;
}
.gift-teaser > button:disabled {
  color: #849087;
  background: #e6e9e2;
}
.round-link {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #61776b;
  background: #e9ede5;
}
.compact-task-list {
  display: grid;
  gap: 8px;
}
.wide-subtle-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #5e7167;
  background: #e9ede6;
  border-radius: 9px;
  padding: 9px;
  margin-top: 10px;
  font-size: 12.5px;
}
.weekly-mini {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #edf4ef, #f7f4ec);
}
.weekly-mini .eyebrow {
  margin-top: -3px;
}
.weekly-mini h3 {
  font-family: Georgia, serif;
  font-size: 17px;
  margin: 4px 0 5px;
}
.weekly-mini p {
  color: #74867c;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 11px;
}
.weekly-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 11px;
  opacity: .85;
}
.live-dot, .sync-badge {
  color: #56816b;
  background: #e1eee5;
  border-radius: 10px;
  padding: 3px 7px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.live-dot::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: #5d9b77;
}
.activity-card {
  padding-bottom: 9px;
}
.activity-row {
  display: flex;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid #e5e7df;
}
.activity-kind {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5a35c;
  margin-top: 4px;
  flex-shrink: 0;
}
.activity-kind.team {
  background: #589073;
}
.activity-kind.visit {
  background: #b5798c;
}
.activity-kind.gift {
  background: #7298b6;
}
.activity-row p {
  color: #5f7167;
  font-size: 12px;
  line-height: 1.4;
}
.activity-row small {
  display: block;
  color: #9aa49d;
  font-size: 11px;
  margin-top: 3px;
}
.task-card {
  border: 1px solid #dfe3da;
  background: #fffdf7;
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}
.task-card.complete {
  border-color: #a7c7ad;
  background: #f6fbf4;
}
.task-card.claimed {
  opacity: .72;
}
.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9a793d;
  background: #f4ecd8;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 11px;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-weight: 800;
}
.claimed-label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #4e8466;
  font-size: 11px;
}
.task-card h3 {
  font-size: 14.5px;
  color: #2d4e43;
  margin: 9px 0 4px;
}
.task-card p {
  color: #7c8a81;
  font-size: 12.5px;
  line-height: 1.45;
  min-height: 29px;
}
.task-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #77877d;
  font-size: 11px;
  margin: 10px 0 5px;
}
.progress-bar {
  height: 5px;
  flex: 1;
  min-width: 20px;
  border-radius: 8px;
  background: #dfe5dd;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .35s;
}
.progress-bar.tone-gold span {
  background: linear-gradient(90deg, #c89a43, #e7c974);
}
.progress-bar.tone-blue span {
  background: linear-gradient(90deg, #4c8ba0, #83c4cc);
}
.progress-bar.tone-green span {
  background: linear-gradient(90deg, #418064, #78af85);
}
.task-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.task-card-bottom > button {
  flex-shrink: 0;
  border-radius: 7px;
  padding: 7px 9px;
  color: #77633c;
  background: #eee5cd;
  font-size: 11px;
  font-weight: 700;
}
.task-card.complete .task-card-bottom > button:not(:disabled) {
  color: white;
  background: #42795e;
}
.task-card-bottom > button:disabled {
  opacity: .65;
}
.reward-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: #7a704f;
  font-size: 11px;
}
.reward-line span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.reward-line span:nth-child(2) {
  color: #56889a;
}
.task-card.compact {
  padding: 10px;
  background: #f2f2eb;
}
.task-card.compact h3 {
  font-size: 13px;
  margin-top: 6px;
}
.task-card.compact p {
  font-size: 12px;
  min-height: 0;
}
.task-card.compact .task-tag {
  display: none;
}
.task-card.compact .task-card-top {
  position: absolute;
}
.unlock-copy {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px;
  margin-top: 10px;
  border-radius: 8px;
  color: #597869;
  background: #e9f0e8;
  font-size: 12px;
  line-height: 1.4;
}
.coop-task {
  background: #f5faf8;
}
.page-section {
  min-width: 0;
}
.section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 3px 22px;
  color: #eff4ec;
}
.section-intro h1 {
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  margin: 4px 0 7px;
}
.section-intro p {
  max-width: 650px;
  color: #a7bdb1;
  font-size: 13.5px;
  line-height: 1.55;
}
.section-intro .eyebrow {
  color: #d2b566;
}
.intro-stat {
  min-width: 145px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  align-items: center;
  color: #e0bd67;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
}
.intro-stat svg {
  grid-row: 1 / 3;
}
.intro-stat strong {
  font-size: 20px;
  color: #f2e9d3;
}
.intro-stat span {
  color: #9eb5a9;
  font-size: 12px;
}
.tasks-page {
  max-width: 1280px;
  margin: auto;
}
.tasks-page > section + section {
  margin-top: 26px;
}
.subsection-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  color: #eef1e8;
  margin-bottom: 11px;
}
.subsection-heading h2 {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}
.subsection-heading span {
  color: #8fa99b;
  font-size: 12.5px;
}
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tasks-grid .task-card {
  padding: 17px;
}
.tasks-grid .task-card h3 {
  font-size: 15px;
}
.tasks-grid .task-card p {
  font-size: 13px;
}
.team-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}
.team-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}
.team-main > .ratings-card {
  max-width: 680px;
  width: 100%;
  justify-self: center;
}
.weekly-card {
  background: linear-gradient(145deg, #eef5f2, #faf7ee);
}
.weekly-card h2 {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  color: #275246;
  margin: 5px 0 7px;
}
.weekly-card > p {
  color: #71847a;
  font-size: 12.5px;
  line-height: 1.5;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 17px;
  color: #213f35;
  background: linear-gradient(180deg, #efd17e, #d9ae50);
  border: 1px solid #c99b42;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255,255,255,.5);
}
.primary-button:hover:not(:disabled) {
  filter: brightness(1.04);
}
.primary-button:disabled {
  opacity: .5;
}
.primary-button.full {
  width: 100%;
  margin-top: 13px;
}
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 15px;
  border-radius: 10px;
  color: #52685e;
  background: #e1e7df;
  font-size: 13px;
}
.role-perk {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  color: #88692e;
  background: #f2e8ce;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 9px;
}
.role-options {
  display: grid;
  gap: 5px;
}
.role-options button {
  text-align: left;
  border: 1px solid #e0e4dc;
  background: #eff1eb;
  color: #54685e;
  border-radius: 8px;
  padding: 8px;
}
.role-options button.active {
  border-color: #bb9a53;
  background: #fff5d9;
}
.role-options strong, .role-options small {
  display: block;
}
.role-options strong {
  font-size: 12.5px;
}
.role-options small {
  color: #87938b;
  font-size: 11px;
  margin-top: 2px;
}
.contribution-list {
  display: grid;
  gap: 9px;
}
.contribution-list > div {
  display: grid;
  grid-template-columns: 18px 62px 1fr 28px;
  align-items: center;
  gap: 5px;
  color: #6c7e73;
  font-size: 12px;
}
.contribution-list > div.mine {
  color: #876629;
  font-weight: 700;
}
.contribution-rank {
  color: #9aa69e;
  text-align: center;
}
.contribution-list strong {
  text-align: right;
}
.coop-mini-list {
  display: grid;
  gap: 6px;
}
.coop-mini-list > button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 9px;
  color: #4c665a;
  background: #edf1eb;
  border-radius: 9px;
  border: 1px solid transparent;
}
.coop-mini-list > button:not(:disabled) {
  border-color: #b7caa9;
  background: #f2f8e9;
}
.coop-mini-list > button > div {
  flex: 1;
  min-width: 0;
}
.coop-mini-list strong, .coop-mini-list span {
  display: block;
}
.coop-mini-list strong {
  font-size: 12px;
}
.coop-mini-list span {
  color: #849188;
  font-size: 11px;
  margin: 3px 0 6px;
}
.leaderboard {
  display: grid;
  gap: 5px;
}
.leaderboard > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 6px 8px;
  border-radius: 9px;
  color: #5a6f64;
  background: #eff1eb;
}
.leaderboard > div.mine {
  background: #fff3d1;
  border: 1px solid #e3c77e;
}
.leaderboard .rank {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dce2d9;
  color: #7c8980;
  font-size: 12.5px;
  font-weight: 700;
}
.leaderboard .rank-1 {
  color: #7d5e20;
  background: #efdaa0;
}
.leaderboard .rank-2 {
  color: #647473;
  background: #dce6e5;
}
.leaderboard .rank-3 {
  color: #866044;
  background: #ead4bd;
}
.leaderboard > div > i {
  width: 7px;
  height: 26px;
  border-radius: 4px;
}
.leaderboard > div > div {
  flex: 1;
}
.leaderboard strong, .leaderboard small {
  display: block;
}
.leaderboard strong {
  font-size: 13px;
}
.leaderboard small {
  color: #8a968e;
  font-size: 11px;
  margin-top: 3px;
}
.leaderboard b {
  color: #9a772f;
  font-size: 14px;
}
.friends-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  gap: 18px;
  align-items: start;
}
.friends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.friend-card {
  padding: 0;
  text-align: left;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.35);
}
.friend-card:hover {
  transform: translateY(-2px);
}
.friend-tree-preview {
  height: 280px;
  overflow: hidden;
}
.friend-tree-preview .tree-stage {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
}
.friend-tree-preview .tree-svg {
  transform: scale(.96);
}
.friend-card-info {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px 8px;
}
.friend-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 11px;
  color: white;
  font-family: Georgia, serif;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.55);
}
.friend-avatar.large {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 22px;
}
.friend-card-info > div {
  flex: 1;
}
.friend-card-info h2 {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}
.friend-card-info p {
  color: #829087;
  font-size: 12px;
  margin-top: 3px;
}
.friend-card-info > svg {
  color: #9b7d41;
}
.friend-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 13px 12px;
  color: #819087;
  font-size: 12px;
}
.friend-card-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.friend-card-footer span:last-child {
  margin-left: auto;
  color: #8b6c32;
  font-weight: 700;
}
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b7c9bd;
  background: transparent;
  padding: 4px 0 16px;
  font-size: 13px;
}
.visit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
  max-width: 1100px;
  margin: auto;
}
.visit-tree-column {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.friend-profile-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.friend-profile-header > div:nth-child(2) {
  flex: 1;
}
.friend-profile-header h1 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}
.friend-profile-header p {
  color: #7d8c83;
  font-size: 12.5px;
  margin-top: 4px;
}
.friend-likes {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #b24f62;
  font-size: 14.5px;
}
.visit-sidebar {
  display: grid;
  gap: 12px;
}
.visit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 11px 0;
}
.visit-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 3px;
  background: #edf0e9;
  border-radius: 9px;
}
.visit-stats strong {
  color: #365f4e;
  font-size: 18px;
}
.visit-stats span {
  color: #89958d;
  font-size: 11px;
  margin-top: 3px;
}
.friend-meta-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid #e1e5dc;
  color: #6c7f74;
  font-size: 12.5px;
}
.gift-form > p {
  color: #7c8b82;
  font-size: 12.5px;
  line-height: 1.5;
}
.gift-item-preview {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 10px 1px;
}
.gift-item-preview button {
  flex: 0 0 48px;
  height: 52px;
  position: relative;
  border: 1px solid #dce2d8;
  background: #edf0e9;
  border-radius: 8px;
}
.gift-item-preview button.active {
  border: 2px solid #c69d48;
  background: #fff5d7;
}
.gift-item-preview svg {
  width: 100%;
  height: 100%;
}
.gift-item-preview span {
  position: absolute;
  right: 2px;
  top: 2px;
  background: white;
  border-radius: 5px;
  padding: 1px 3px;
  font-size: 11px;
}
.gift-form label {
  display: grid;
  gap: 5px;
  color: #6c7b72;
  font-size: 12px;
}
.gift-form select {
  width: 100%;
  padding: 9px;
  color: #385248;
  background: white;
  border: 1px solid #d7ded4;
  border-radius: 8px;
  font-size: 12.5px;
}
.helper-status {
  display: flex;
  gap: 10px;
  color: #56866c;
}
.helper-status strong {
  font-size: 13px;
}
.helper-status p {
  color: #7b8a81;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}
.visit-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 11px;
}
.visit-actions > button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 45px;
  padding: 7px;
  border-radius: 10px;
  color: #536d60;
  background: #e6ebe3;
  font-size: 12.5px;
}
.visit-actions > button:first-child {
  color: #a74d60;
  background: #f3e1e3;
}
.visit-actions > button.active {
  color: #806122;
  background: #f4e4b8;
  border: 1px solid #d9b867;
}
.visit-actions > button:disabled {
  opacity: .6;
  font-size: 11px;
}
.visit-actions small {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #86948c;
  font-size: 11px;
}
.match-instructions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #dfc574;
  border-radius: 10px;
  color: #846727;
  background: #fff3cd;
}
.match-instructions > div {
  flex: 1;
}
.match-instructions strong, .match-instructions span {
  display: block;
}
.match-instructions strong {
  font-size: 13px;
}
.match-instructions span {
  font-size: 12px;
  margin-top: 3px;
}
.match-instructions button {
  color: #8b6b2d;
  background: transparent;
  font-size: 12px;
}
.empty-note {
  padding: 10px;
  background: #ecefe8;
  border-radius: 8px;
}
.trade-section {
  margin-top: 24px;
}
.trade-section .subsection-heading .eyebrow {
  color: #d0b163;
  margin-bottom: 4px;
}
.trade-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.trade-card {
  padding: 14px;
  border-radius: 15px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.trade-card.accepted {
  opacity: .66;
}
.trade-person {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trade-person strong, .trade-person small {
  display: block;
}
.trade-person strong {
  font-size: 13.5px;
}
.trade-person small {
  color: #849188;
  font-size: 11px;
  margin-top: 2px;
}
.trade-items {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: center;
  gap: 5px;
  margin: 12px 0;
}
.trade-items > svg {
  color: #a3823e;
}
.trade-items > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.trade-items > div > svg {
  width: 75px;
  height: 70px;
}
.trade-items span {
  color: #909b93;
  font-size: 11px;
}
.trade-items strong {
  width: 100%;
  min-height: 24px;
  color: #466056;
  font-size: 12px;
  margin: 3px 0;
}
.trade-items small {
  color: #759182;
  font-size: 11px;
}
.trade-card > button {
  width: 100%;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff8e7;
  background: #396c55;
  border-radius: 8px;
  font-size: 12px;
}
.trade-card > button:disabled {
  color: #849188;
  background: #e2e7de;
}
.shop-wallet {
  display: flex;
  gap: 8px;
}
.shop-wallet span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  color: #edcc7a;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius: 11px;
}
.shop-wallet span:last-child {
  color: #a9e0e4;
}
.shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.filter-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
}
.filter-tabs button, .owned-filter {
  white-space: nowrap;
  color: #a7bcb0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12.5px;
}
.filter-tabs button.active {
  color: #2c493e;
  background: #e7cd88;
  border-color: #e7cd88;
}
.owned-filter {
  display: flex;
  align-items: center;
  gap: 5px;
}
.owned-filter.active {
  color: #e7cd88;
  border-color: #bca363;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.shop-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.4);
}
.shop-item-art {
  height: 165px;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #fff 0, #e8ede4 75%);
  border-bottom: 1px solid #e0e5db;
}
.shop-item-art > svg {
  width: 125px;
  height: 125px;
  filter: drop-shadow(0 8px 6px rgba(34,56,47,.17));
}
.rarity-label {
  position: absolute;
  left: 9px;
  top: 9px;
  z-index: 2;
  color: #77877d;
  background: rgba(255,255,255,.8);
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.rarity-rare .rarity-label {
  color: #467d94;
}
.rarity-epic .rarity-label {
  color: #7a5a98;
}
.rarity-legendary .rarity-label {
  color: #9a712c;
  background: #fff0c2;
}
.rarity-legendary .shop-item-art {
  background: radial-gradient(circle, #fff9db, #e9ddae);
}
.owned-count {
  position: absolute;
  right: 8px;
  top: 9px;
  color: #4d755f;
  font-size: 11px;
}
.shop-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(32,52,46,.45);
  backdrop-filter: grayscale(1);
}
.shop-item.locked .shop-item-art > svg {
  filter: grayscale(1);
  opacity: .5;
}
.shop-item-copy {
  padding: 12px 13px 9px;
  flex: 1;
}
.item-theme {
  color: #8a9a8e;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.shop-item-copy h2 {
  font-family: Georgia, serif;
  color: #2b4c41;
  font-size: 17px;
  font-weight: 500;
  margin: 3px 0 5px;
}
.shop-item-copy p {
  color: #7d8a82;
  font-size: 12px;
  line-height: 1.45;
  min-height: 39px;
}
.item-value {
  display: flex;
  gap: 9px;
  margin-top: 8px;
  color: #77887d;
  font-size: 11px;
}
.item-value span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.shop-item-footer {
  min-height: 49px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-top: 1px solid #e2e5dc;
  background: #f0f1ea;
}
.price {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9c752e;
  font-size: 15px;
  font-weight: 700;
}
.price.snowflakes {
  color: #4d879a;
}
.shop-item-footer > button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  color: #fff9e8;
  background: #346650;
  border-radius: 8px;
  font-size: 12px;
}
.locked-reason {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #87938a;
  font-size: 11px;
  line-height: 1.35;
}
.unlock-roadmap {
  margin-top: 22px;
  padding: 20px;
  border-radius: 17px;
  background: #f2f1e9;
  box-shadow: var(--shadow);
}
.unlock-roadmap h2 {
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: 21px;
  margin-top: 4px;
}
.roadmap-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 15px;
}
.roadmap-steps > div {
  display: flex;
  gap: 9px;
  padding: 11px;
  border-radius: 10px;
  background: #e5e8e0;
  opacity: .65;
}
.roadmap-steps > div.unlocked {
  background: #e3eee3;
  opacity: 1;
}
.roadmap-steps > div > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #79602f;
  background: #eee0b9;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.roadmap-steps strong {
  font-size: 12.5px;
}
.roadmap-steps p {
  color: #7c8b81;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 3px;
}
.empty-state {
  padding: 45px;
  text-align: center;
  color: #a9bdb1;
}
.empty-state h2 {
  margin: 10px;
}
.empty-state p {
  font-size: 13px;
}
.empty-state button {
  margin-top: 15px;
  padding: 9px;
  border-radius: 8px;
  background: #e2c678;
  color: #28493d;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.game-card {
  padding: 0;
  display: grid;
  grid-template-columns: 155px 1fr;
  min-height: 190px;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.game-card:hover {
  transform: translateY(-2px);
}
.game-card-art {
  position: relative;
  display: grid;
  place-items: center;
  color: #d5f0ed;
  background: radial-gradient(circle at 50% 35%, #619aaa, #28566a);
}
.game-card.tone-gold .game-card-art {
  color: #ffedb0;
  background: radial-gradient(circle at 50% 35%, #b18c46, #5d5034);
}
.game-card.tone-plum .game-card-art {
  color: #eed8ff;
  background: radial-gradient(circle at 50% 35%, #8a6c9d, #4b3e62);
}
.game-card.tone-green .game-card-art {
  color: #d7f0d7;
  background: radial-gradient(circle at 50% 35%, #65936f, #335b4a);
}
.game-best {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  text-align: center;
  padding: 5px;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.17);
  border-radius: 7px;
  font-size: 11px;
}
.game-card-copy {
  padding: 19px;
  display: flex;
  flex-direction: column;
}
.game-card-copy h2 {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
}
.game-card-copy > p {
  color: #78887e;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 8px 0 15px;
  flex: 1;
}
.game-card-copy > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8c713c;
  font-size: 12px;
}
.game-card-copy > div > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.game-card-copy i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #f8efd8;
  background: #376b55;
  border-radius: 50%;
}
.honest-coop-note {
  display: flex;
  gap: 11px;
  max-width: 700px;
  margin: 18px auto 0;
  padding: 14px;
  color: #bcd0c2;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  border-radius: 13px;
}
.honest-coop-note strong {
  font-size: 13px;
}
.honest-coop-note p {
  color: #8fa99a;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}
.game-play-page {
  max-width: 900px;
  margin: auto;
}
.mini-game-shell {
  padding: 20px;
}
.mini-game-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mini-game-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: #9c7834;
  background: #f0e4c5;
  border-radius: 14px;
}
.mini-game-header h1 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  margin: 2px 0 3px;
}
.mini-game-header p {
  color: #7b8a81;
  font-size: 12.5px;
  line-height: 1.4;
}
.mini-game-header-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: #6d8075;
  font-size: 13px;
}
.mini-game-header-right span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.mini-game-header-right strong {
  color: #37644f;
  font-size: 14px;
}
.snow-field {
  height: 480px;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: radial-gradient(circle at 50% 20%, #376679, #163d4b 70%, #12343d);
  border: 1px solid #436875;
}
.snow-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.45) 0 1px, transparent 1.5px);
  background-size: 48px 53px;
  opacity: .35;
}
.catch-flake {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  color: #e2f8fa;
  background: transparent;
  filter: drop-shadow(0 0 7px rgba(175,237,245,.65));
  animation: flake-float 3s ease-in-out infinite alternate;
  touch-action: manipulation;
}
.catch-flake:active {
  transform: scale(.7);
}
@keyframes flake-float {
  to {
    translate: 8px 13px;
    rotate: 45deg;
  }
}
.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  color: #eaf3ec;
  background: rgba(13,44,44,.76);
  backdrop-filter: blur(4px);
}
.game-overlay > div {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  color: #f0d17e;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  border-radius: 22px;
}
.game-overlay h2 {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  margin: 15px 0 8px;
}
.game-overlay p {
  max-width: 390px;
  color: #b5cbc0;
  font-size: 13px;
  line-height: 1.55;
}
.game-overlay .primary-button {
  margin-top: 18px;
}
.game-targets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 12px;
  color: #8a978f;
  font-size: 12px;
}
.game-targets span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.game-targets span.reached {
  color: #408062;
}
.pattern-board {
  height: 340px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: radial-gradient(circle at 50% 20%, #31554c, #183a34);
  overflow: hidden;
}
.pattern-status {
  color: #c4d4c9;
  font-size: 13.5px;
  margin-bottom: 25px;
}
.bulb-sequence {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}
.sequence-bulb {
  width: 64px;
  height: 79px;
  display: grid;
  place-items: center;
  color: var(--bulb);
  border: 1px solid var(--bulb);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--bulb) 50%, #456);
  }
  border-radius: 18px;
  background: var(--bulb);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb, var(--bulb) 15%, #173a34);
  }
  filter: drop-shadow(0 0 12px var(--bulb));
  @supports (color: color-mix(in lab, red, red)) {
    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--bulb) 35%, transparent));
  }
}
.sequence-bulb.hidden {
  color: var(--bulb);
  filter: none;
}
.sequence-bulb > span {
  color: #829d92;
  font-size: 22px;
}
.pattern-progress {
  display: flex;
  gap: 5px;
  margin-top: 20px;
}
.pattern-progress i {
  width: 25px;
  height: 4px;
  border-radius: 4px;
  background: #42645a;
}
.pattern-progress i.done {
  background: #e8c66f;
}
.color-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.color-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
  color: var(--bulb);
  background: var(--bulb);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb, var(--bulb) 12%, #edf0e8);
  }
  border: 1px solid var(--bulb);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--bulb) 35%, #d9dfd5);
  }
  border-radius: 11px;
  font-size: 12px;
}
.color-controls button:active {
  transform: scale(.97);
}
.guess-ready {
  height: 420px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #655476, #2b3545);
}
.guess-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  min-height: 420px;
}
.silhouette-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #b7acc4;
  background: radial-gradient(circle, #5c506c, #303444);
}
.silhouette-box > svg {
  width: 220px;
  height: 240px;
}
.silhouette {
  filter: brightness(0) saturate(0) opacity(.8);
}
.silhouette-box span {
  font-family: Georgia, serif;
  font-size: 18px;
}
.guess-options {
  display: grid;
  gap: 10px;
  align-content: center;
}
.guess-options button {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8ded5;
  border-radius: 12px;
  color: #435e52;
  background: #eef0e9;
  font-size: 13.5px;
}
.guess-options button.correct {
  color: #2e6c4d;
  background: #dcefdc;
  border-color: #75ac81;
}
.guess-options button.wrong {
  color: #9d4550;
  background: #f2dfe0;
  border-color: #d69aa0;
}
.guess-options button.dimmed {
  opacity: .45;
}
.local-badge {
  color: #4e765f;
  background: #e1ebdf;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.duo-board {
  min-height: 430px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  border-radius: 15px;
  background: radial-gradient(circle at 50% 10%, #446c57, #1c4237);
  overflow: hidden;
}
.duo-board > .game-overlay {
  border-radius: 15px;
}
.turn-label {
  text-align: center;
  color: #e4eee5;
  margin-bottom: 10px;
}
.turn-label > span {
  color: #e4c878;
  font-size: 12px;
  letter-spacing: 1.5px;
}
.turn-label h2 {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  margin: 5px;
}
.turn-label p {
  color: #aac2b2;
  font-size: 12.5px;
}
.duo-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}
.duo-board .color-controls {
  width: 100%;
}
.handoff-screen {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #e5c96f;
}
.handoff-screen .eyebrow {
  color: #adc7b6;
  margin-top: 14px;
}
.handoff-screen h2 {
  font-family: Georgia, serif;
  color: #eff4e9;
  font-size: 26px;
  font-weight: 500;
  margin: 7px;
}
.handoff-screen p {
  color: #b1c8b8;
  font-size: 13px;
  line-height: 1.55;
}
.handoff-screen button {
  margin-top: 18px;
}
.memorize-timer {
  width: 250px;
  height: 5px;
  margin-top: 15px;
  background: #426457;
  border-radius: 5px;
  overflow: hidden;
}
.memorize-timer i {
  display: block;
  height: 100%;
  background: #edcf77;
  animation: memorize 3.2s linear;
}
@keyframes memorize {
  from {
    width: 100%;
  }
  to {
    width: 0;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4,22,20,.76);
  backdrop-filter: blur(8px);
}
.modal {
  width: min(570px, 100%);
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  padding: 27px;
  text-align: center;
  border-radius: 22px;
  background: #faf6eb;
  box-shadow: 0 30px 90px rgba(0,0,0,.4);
}
.modal-close {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #687b70;
  background: #e8ebe3;
  border-radius: 50%;
}
.modal-hero-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: #9b7837;
  background: #efe2bd;
  border-radius: 18px;
}
.modal h2 {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  margin: 5px;
}
.modal > p {
  max-width: 400px;
  margin: 0 auto;
  color: #78887e;
  font-size: 12.5px;
  line-height: 1.5;
}
.daily-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 20px;
}
.daily-grid > div {
  min-width: 0;
  padding: 10px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #8a968e;
  background: #e9ece4;
  border: 1px solid transparent;
  border-radius: 9px;
}
.daily-grid > div.current {
  color: #896828;
  background: #fff0c5;
  border-color: #dcba64;
}
.daily-grid > div.past {
  color: #538068;
  background: #e1ece1;
}
.daily-grid span {
  font-size: 11px;
}
.daily-grid strong, .daily-grid small {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
}
.daily-grid small {
  color: #608c9a;
}
.daily-claim {
  margin-top: 18px;
}
.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 28px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #f0f4ec;
  background: rgba(20,55,47,.96);
  border: 1px solid #537568;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0,0,0,.35);
  font-size: 13px;
  animation: toast-in .25s ease-out;
}
.toast > span {
  color: #e4c46c;
}
.toast > button {
  display: grid;
  place-items: center;
  margin-left: 5px;
  padding: 4px;
  color: #9eb8aa;
  background: transparent;
}
@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}
.app-footer {
  max-width: 1560px;
  margin: auto;
  padding: 0 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #658579;
  font-size: 12px;
}
.app-footer span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.loading-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 25px;
  text-align: center;
  color: #e8d18e;
  background: radial-gradient(circle at 50% 30%, #265247, #092622 65%);
}
.loading-screen h1 {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}
.loading-screen > p {
  color: #9eb8a9;
  font-size: 13px;
}
.loading-card {
  max-width: 420px;
  padding: 35px;
  border: 1px solid #42675b;
  background: #153b33;
  border-radius: 20px;
}
.loading-card p {
  color: #a4baad;
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0 20px;
}
@media (max-width: 1350px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
  }
  .tree-game-layout {
    grid-template-columns: 1fr;
  }
  .tree-info-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px 18px;
  }
  .tree-info-card .info-card-heading, .tree-info-card .muted-copy {
    grid-column: 1;
  }
  .tree-info-card .theme-list, .tree-info-card .micro-rules {
    grid-column: 2;
    grid-row: 1 / 4;
    grid-template-columns: repeat(2, 1fr);
  }
  .tree-info-card .tip-box, .tree-info-card .contribution-highlight {
    grid-column: 1;
    margin-top: 0;
  }
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .trade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1080px) {
  .app-header {
    gap: 12px;
  }
  .resource-pill span, .save-indicator span {
    display: none;
  }
  .save-indicator {
    min-width: auto;
  }
  .main-nav > button {
    padding: 0 10px;
  }
  .home-layout, .team-page {
    grid-template-columns: 1fr;
  }
  .home-sidebar, .team-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team-main {
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: start;
  }
  .team-main > .ratings-card {
    align-self: start;
  }
  .friends-layout {
    grid-template-columns: 1fr;
  }
  .friends-layout > .ratings-card {
    max-width: none;
  }
  .leaderboard {
    grid-template-columns: repeat(2, 1fr);
  }
  .tasks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .games-grid {
    gap: 12px;
  }
  .game-card {
    grid-template-columns: 120px 1fr;
  }
}
@media (max-width: 820px) {
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 16px;
  }
  .score-pill {
    display: none;
  }
  .daily-header-button span {
    display: none;
  }
  .nav-full-label {
    display: none;
  }
  .nav-short-label {
    display: inline;
  }
  .main-nav > button {
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
  }
  .nav-level {
    display: none;
  }
  .team-main {
    grid-template-columns: 1fr;
  }
  .team-main > .ratings-card {
    max-width: none;
  }
  .visit-layout {
    grid-template-columns: 1fr;
  }
  .visit-sidebar {
    grid-template-columns: repeat(2, 1fr);
  }
  .helper-status {
    grid-column: 1 / 3;
  }
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .roadmap-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
  .game-card {
    grid-template-columns: 155px 1fr;
  }
}
@media (max-width: 620px) {
  .game-app {
    padding-bottom: 66px;
  }
  .app-header {
    height: 60px;
    padding: 0 10px;
    gap: 8px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .brand-mark > svg:first-child {
    width: 21px;
  }
  .brand strong {
    font-size: 14px;
    max-width: 95px;
    line-height: 1.05;
  }
  .header-resources {
    gap: 4px;
  }
  .resource-pill {
    height: 33px;
    padding: 0 8px;
    gap: 4px;
    font-size: 13.5px;
    border-radius: 10px;
  }
  .resource-pill svg {
    width: 14px;
  }
  .header-actions {
    gap: 5px;
  }
  .daily-header-button {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
  .save-indicator {
    display: none;
  }
  .main-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.13);
    border-bottom: 0;
    z-index: 50;
  }
  .main-nav > button {
    flex: 1;
    min-width: 0;
    padding: 3px 1px;
    border-bottom: 0;
    border-top: 2px solid transparent;
    border-radius: 8px;
    font-size: 11px;
  }
  .main-nav > button.active {
    border-top-color: #e2b75d;
    border-bottom-color: transparent;
    background: rgba(255,255,255,.04);
  }
  .main-nav > button svg {
    width: 19px;
    height: 19px;
  }
  .nav-dot {
    position: absolute;
    right: 12px;
    top: 7px;
  }
  .app-content {
    padding: 11px 9px 20px;
    min-height: calc(100vh - 126px);
  }
  .home-layout {
    gap: 11px;
  }
  .tree-game-layout {
    gap: 11px;
  }
  .tree-play-column {
    padding: 11px;
    border-radius: 16px;
  }
  .tree-title-row h1 {
    font-size: 23px;
  }
  .tree-score strong {
    font-size: 19px;
  }
  .tree-stage {
    border-radius: 12px;
  }
  .tree-selection-actions > span {
    display: none;
  }
  .tree-selection-actions {
    left: auto;
  }
  .tree-underbar {
    align-items: flex-start;
  }
  .score-recipe {
    gap: 6px;
  }
  .branch-pips i {
    width: 10px;
  }
  .inventory-heading p {
    font-size: 12px;
  }
  .text-button {
    font-size: 0;
  }
  .text-button svg {
    width: 18px;
    height: 18px;
  }
  .text-button svg:last-child {
    display: none;
  }
  .inventory-item {
    flex-basis: 78px;
    height: 105px;
  }
  .inventory-item > svg {
    width: 59px;
    height: 65px;
  }
  .tree-info-card {
    display: block;
    padding: 14px;
    border-radius: 15px;
  }
  .tree-info-card .theme-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 10px;
  }
  .tree-info-card .tip-box {
    margin-top: 10px;
  }
  .home-sidebar, .team-panels {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-sidebar .activity-card {
    display: none;
  }
  .side-card, .ratings-card {
    border-radius: 15px;
  }
  .section-intro {
    padding: 5px 3px 15px;
    align-items: flex-start;
  }
  .section-intro h1 {
    font-size: 26px;
  }
  .section-intro p {
    font-size: 12.5px;
  }
  .intro-stat {
    display: none;
  }
  .tasks-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .subsection-heading {
    display: block;
  }
  .subsection-heading span {
    display: block;
    margin-top: 4px;
  }
  .tasks-grid .task-card {
    padding: 14px;
  }
  .tasks-grid .task-card h3 {
    font-size: 14px;
  }
  .trade-grid {
    gap: 8px;
  }
  .trade-card {
    padding: 10px;
  }
  .trade-items > div > svg {
    width: 58px;
    height: 58px;
  }
  .friends-grid {
    gap: 8px;
  }
  .friend-tree-preview {
    height: 210px;
  }
  .friend-card {
    border-radius: 13px;
  }
  .friend-card-info {
    padding: 9px 8px 6px;
    gap: 6px;
  }
  .friend-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .friend-card-info h2 {
    font-size: 15px;
  }
  .friend-card-info p {
    font-size: 11px;
  }
  .friend-card-info > svg {
    display: none;
  }
  .friend-card-footer {
    padding: 6px 8px 9px;
    gap: 6px;
    font-size: 11px;
  }
  .friend-card-footer span:nth-child(2) {
    display: none;
  }
  .leaderboard {
    grid-template-columns: 1fr;
  }
  .visit-tree-column {
    padding: 10px;
    border-radius: 15px;
  }
  .friend-profile-header h1 {
    font-size: 21px;
  }
  .friend-profile-header p {
    font-size: 11px;
  }
  .friend-avatar.large {
    width: 42px;
    height: 42px;
  }
  .friend-likes {
    font-size: 12.5px;
  }
  .visit-sidebar {
    grid-template-columns: 1fr;
  }
  .helper-status {
    grid-column: auto;
  }
  .visit-actions > button {
    font-size: 12px;
  }
  .visit-actions small {
    display: none;
  }
  .match-instructions {
    padding: 8px;
  }
  .match-instructions strong {
    font-size: 12.5px;
  }
  .shop-controls {
    align-items: flex-start;
  }
  .filter-tabs {
    padding-bottom: 4px;
  }
  .filter-tabs button {
    padding: 7px 9px;
  }
  .owned-filter {
    padding: 7px;
    font-size: 0;
  }
  .owned-filter svg {
    width: 16px;
  }
  .shop-grid {
    gap: 8px;
  }
  .shop-item {
    border-radius: 13px;
  }
  .shop-item-art {
    height: 135px;
  }
  .shop-item-art > svg {
    width: 100px;
    height: 100px;
  }
  .rarity-label {
    font-size: 11px;
    left: 6px;
    top: 6px;
  }
  .owned-count {
    top: auto;
    bottom: 5px;
    right: 6px;
    font-size: 11px;
  }
  .shop-item-copy {
    padding: 10px 9px 7px;
  }
  .shop-item-copy h2 {
    font-size: 15px;
  }
  .shop-item-copy p {
    font-size: 11px;
    min-height: 46px;
  }
  .item-value {
    flex-direction: column;
    gap: 3px;
  }
  .shop-item-footer {
    padding: 7px 8px;
    min-height: 45px;
  }
  .shop-item-footer > button {
    padding: 7px;
    font-size: 11px;
  }
  .price {
    font-size: 14.5px;
  }
  .locked-reason {
    font-size: 11px;
  }
  .unlock-roadmap {
    padding: 14px;
  }
  .roadmap-steps {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .game-card {
    grid-template-columns: 105px 1fr;
    min-height: 175px;
  }
  .game-card-copy {
    padding: 14px;
  }
  .game-card-copy h2 {
    font-size: 18px;
  }
  .game-card-copy > p {
    font-size: 12px;
  }
  .game-card-copy > div {
    font-size: 11px;
  }
  .game-card-art > svg {
    width: 34px;
  }
  .honest-coop-note {
    padding: 11px;
  }
  .mini-game-shell {
    padding: 11px;
    border-radius: 15px;
  }
  .mini-game-header {
    gap: 8px;
    margin-bottom: 12px;
  }
  .mini-game-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .mini-game-header h1 {
    font-size: 21px;
  }
  .mini-game-header p {
    font-size: 11px;
  }
  .mini-game-header-right {
    font-size: 12px;
  }
  .mini-game-header-right strong {
    font-size: 13px;
  }
  .local-badge {
    display: none;
  }
  .snow-field {
    height: 430px;
  }
  .game-targets {
    gap: 8px;
    font-size: 11px;
  }
  .game-overlay h2 {
    font-size: 24px;
  }
  .game-overlay p {
    font-size: 12.5px;
  }
  .pattern-board {
    height: 300px;
  }
  .bulb-sequence {
    gap: 6px;
    padding: 12px 4px;
  }
  .sequence-bulb {
    width: 52px;
    height: 65px;
    border-radius: 13px;
  }
  .sequence-bulb svg {
    width: 23px;
  }
  .color-controls {
    gap: 5px;
  }
  .color-controls button {
    flex-direction: column;
    gap: 2px;
    min-height: 58px;
    font-size: 11px;
  }
  .guess-ready {
    height: 430px;
  }
  .guess-board {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .silhouette-box {
    min-height: 265px;
  }
  .silhouette-box > svg {
    width: 150px;
    height: 175px;
  }
  .guess-options {
    gap: 7px;
  }
  .guess-options button {
    min-height: 49px;
  }
  .duo-board {
    min-height: 440px;
    padding: 13px 8px;
  }
  .turn-label h2 {
    font-size: 20px;
  }
  .duo-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  .handoff-screen h2 {
    font-size: 22px;
  }
  .modal {
    padding: 22px 13px;
  }
  .daily-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .daily-grid > div {
    padding: 8px 3px;
  }
  .modal h2 {
    font-size: 24px;
  }
  .toast {
    bottom: 77px;
    font-size: 12.5px;
  }
  .app-footer {
    display: none;
  }
}
@media (max-width: 370px) {
  .brand > span:last-child {
    display: none;
  }
  .friends-grid, .shop-grid, .trade-grid {
    grid-template-columns: 1fr;
  }
  .friend-tree-preview {
    height: 270px;
  }
  .shop-item-art {
    height: 165px;
  }
  .resource-pill {
    padding: 0 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-x {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-y {
  syntax: "*";
  inherits: false;
}
@property --tw-blur {
  syntax: "*";
  inherits: false;
}
@property --tw-brightness {
  syntax: "*";
  inherits: false;
}
@property --tw-contrast {
  syntax: "*";
  inherits: false;
}
@property --tw-grayscale {
  syntax: "*";
  inherits: false;
}
@property --tw-hue-rotate {
  syntax: "*";
  inherits: false;
}
@property --tw-invert {
  syntax: "*";
  inherits: false;
}
@property --tw-opacity {
  syntax: "*";
  inherits: false;
}
@property --tw-saturate {
  syntax: "*";
  inherits: false;
}
@property --tw-sepia {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
@layer properties {
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
    *, ::before, ::after, ::backdrop {
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
    }
  }
}

/* ==========================================================================
   Game theme — one visual language for every screen
   twilight scene · glossy blue capsules · white-rimmed round buttons · gold frames
   ========================================================================== */

:root {
  --ink: #2b2670;
  --muted: #6c68a3;
  --line: #e4dcf7;
  --panel: #fffaf0;
  --gold: #f3b933;
  --blue-grad: linear-gradient(#4cc9f7, #0e86cb 58%, #0a62a3);
  --green-grad: linear-gradient(#8bf06d, #35bb2e 55%, #209a20);
  --gold-grad: linear-gradient(#ffe27a, #f1b02a 55%, #d58b0c);
  --red-grad: linear-gradient(#ff8f8f, #e03a4a 55%, #b82437);
  --purple-grad: linear-gradient(#a37cf3, #6d3fd4 55%, #4c26a6);
  --pink-grad: linear-gradient(#ff8cc8, #e4509f 55%, #b52678);
  --orange-grad: linear-gradient(#ffc27a, #f08a1c 55%, #c3620a);
  --card-shadow: 0 0 0 3px #eab13d, 0 14px 28px rgba(15, 8, 70, .5), inset 0 2px 0 #fff;
  --stroke: 0 2px 0 rgba(30, 20, 110, .9), 0 0 8px rgba(30, 20, 110, .75);
}

html, body { background: #1d1658; }
body { font-family: "Nunito Variable", "Trebuchet MS", system-ui, sans-serif; font-weight: 700; color: var(--ink); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, select, input, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-weight: 900; }
.spin { animation: spin 1s linear infinite; }

/* ---------- root + snow ---------- */
.game-root { position: relative; min-height: 100dvh; isolation: isolate; overflow-x: hidden; }
.game-root.is-glade { height: 100dvh; overflow: hidden; }
.ambient-snow { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; opacity: .55; }

/* ---------- full-bleed pictures ---------- */
.loading-bg, .auth-bg, .glade-bg, .shell-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.shell-bg { position: fixed; z-index: -2; }

/* ---------- loading ---------- */
.loading-scene { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #1b1560; }
.loading-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 58%, rgba(30, 20, 120, 0) 38%, rgba(20, 10, 80, .5)); }
.loading-top, .loading-center, .loading-bottom { position: relative; z-index: 2; }
.loading-top { padding: calc(16px + env(safe-area-inset-top)) 20px 0; display: flex; }
.season-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; color: #fff; font-size: 13.5px; font-weight: 900; background: rgba(20, 10, 80, .55); border: 2px solid rgba(255, 255, 255, .55); backdrop-filter: blur(6px); }
.loading-center { margin: auto; width: 100%; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.loading-logo { width: min(88vw, 640px); height: auto; filter: drop-shadow(0 18px 22px rgba(10, 5, 60, .6)); animation: logo-float 4s ease-in-out infinite; }
@keyframes logo-float { 50% { transform: translateY(-7px); } }
.candy-bar { position: relative; width: min(86vw, 520px); margin-top: 6px; padding: 5px; border-radius: 18px; background: linear-gradient(#ffe27a, #f0a81c 60%, #b9760b); border: 2px solid #ffe9a0; box-shadow: 0 8px 20px rgba(10, 5, 60, .55), inset 0 2px 0 rgba(255, 255, 255, .7); }
.candy-track { position: relative; height: 34px; border-radius: 13px; overflow: hidden; background: #5a577b; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .5); }
.candy-fill { height: 100%; transition: width .2s; background: repeating-linear-gradient(-55deg, #f0243f 0 14px, #fff 14px 28px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45); }
.candy-track strong { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 900; text-shadow: 0 2px 0 rgba(90, 10, 30, .9), 0 0 6px rgba(0, 0, 0, .6); }
.candy-gem { position: absolute; top: 50%; z-index: 3; width: 22px; height: 22px; margin-top: -11px; transform: rotate(45deg); border-radius: 4px; border: 2px solid #ffe9a0; background: linear-gradient(135deg, #fff, #4cc8f0 50%, #0a6cb0); }
.candy-gem.left { left: -10px; } .candy-gem.right { right: -10px; }
.loading-caption { margin-top: 12px; color: #fff; font-size: 15px; font-weight: 800; text-shadow: var(--stroke); text-align: center; }
.loading-bottom { display: flex; justify-content: flex-end; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
.support-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: 999px; color: #fff; font-size: 16px; font-weight: 900; background: var(--blue-grad); border: 3px solid #fff; text-shadow: 0 2px 0 rgba(3, 60, 110, .8); box-shadow: 0 5px 0 #04507f, 0 10px 20px rgba(5, 20, 80, .5), inset 0 2px 0 rgba(255, 255, 255, .55); }
.support-text { text-align: left; display: grid; gap: 10px; margin-bottom: 4px; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.support-text p { margin: 0; }
.support-version { color: var(--muted); font-size: 12.5px; padding-top: 8px; border-top: 2px solid var(--line); }
.loading-screen { color: #fff; background: radial-gradient(circle at 50% 30%, #4a35b8, #1d1658 70%); }
.loading-screen h1 { color: #ffe27a; text-shadow: var(--stroke); }
.loading-screen > p { color: #e6defa; }
.loading-card { background: linear-gradient(180deg, #fffdf6, #efe8ff); color: var(--ink); border: 4px solid #fff; box-shadow: var(--card-shadow); border-radius: 26px; }
.loading-card p { color: var(--muted); font-size: 14px; }

/* ---------- auth ---------- */
.auth-scene { position: relative; min-height: 100dvh; overflow: hidden; background: #1b1560; }
.auth-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(25, 15, 100, .3), rgba(25, 15, 100, .72)); }
.auth-wrap { position: relative; z-index: 2; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px; }
.auth-logo { width: min(64vw, 340px); height: auto; filter: drop-shadow(0 14px 18px rgba(10, 5, 60, .55)); }
.auth-card { width: min(440px, 100%); max-height: none; }

/* ---------- round buttons, capsules ---------- */
.round-btn { position: relative; display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; color: #fff; border: 3px solid #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .28), 0 10px 18px rgba(10, 5, 60, .45), inset 0 3px 0 rgba(255, 255, 255, .55); }
.round-btn.sm { width: 42px; height: 42px; border-width: 2.5px; }
.round-btn.big { width: 74px; height: 74px; border-width: 4px; }
.round-btn.blue { background: var(--blue-grad); } .round-btn.gold { background: var(--gold-grad); color: #5a3500; } .round-btn.green { background: var(--green-grad); }
.round-btn.red { background: var(--red-grad); } .round-btn.purple { background: var(--purple-grad); } .round-btn.pink { background: var(--pink-grad); } .round-btn.orange { background: var(--orange-grad); }
.round-btn svg { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .3)); }
.asset-icon { width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.bang { position: absolute; top: -7px; right: -5px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #ffcf3d; color: #6b3c00; border: 2px solid #fff; font-size: 13px; font-weight: 900; font-style: normal; animation: bang-bob 1.4s ease-in-out infinite; }
@keyframes bang-bob { 50% { transform: translateY(-3px); } }

.capsule { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 10px; border-radius: 999px; color: #fff; font-weight: 900; font-size: 15px; background: var(--blue-grad); border: 3px solid #fff; text-shadow: 0 2px 0 rgba(3, 60, 110, .8); box-shadow: 0 4px 0 #04507f, 0 8px 14px rgba(5, 20, 80, .45), inset 0 2px 0 rgba(255, 255, 255, .55); }
.capsule.pink { background: var(--pink-grad); text-shadow: 0 2px 0 rgba(100, 10, 70, .8); box-shadow: 0 4px 0 #7d1b57, 0 8px 14px rgba(60, 5, 50, .45), inset 0 2px 0 rgba(255, 255, 255, .55); }
.capsule .plus { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 18px; font-weight: 900; line-height: 1; background: radial-gradient(circle at 40% 30%, #8bf06d, #27ad24); border: 2px solid #fff; text-shadow: none; }
.capsule-gap { width: 8px; }
.currency-img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.currency-emoji { font-size: 19px; line-height: 1; }
.coin-dot { display: inline-block; flex: none; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #f3b933 55%, #b97a0c); border: 2px solid #fff3b0; box-shadow: inset 0 -2px 0 rgba(120, 70, 0, .4); }

.avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 14px; background: linear-gradient(#fff, #e9e1ff); }
.avatar-emoji { font-size: 26px; line-height: 1; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.admin-tag, .guest-tag, .ban-tag { display: inline-block; font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.admin-tag { background: #f1b02a; color: #4a2c00; } .guest-tag { background: #d8cff3; color: #4f45a0; } .ban-tag { background: #e03a4a; color: #fff; }

/* ---------- HUD ---------- */
.hud { z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
.hud-overlay { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(180deg, rgba(25, 14, 100, .5), transparent); }
.hud-bar { position: sticky; top: 0; background: linear-gradient(180deg, rgba(25, 14, 100, .88), rgba(25, 14, 100, .55) 70%, transparent); }
.hud-player { display: flex; align-items: center; gap: 12px; padding: 0; text-align: left; color: #fff; background: none; }
.hud-avatar-wrap { position: relative; flex: none; }
.hud-avatar { width: 60px; height: 60px; border-radius: 18px; border: 3px solid #fff; background: linear-gradient(#ffe9a0, #e5a627); box-shadow: 0 4px 0 #a8700c, 0 8px 16px rgba(10, 5, 60, .5); }
.hud-avatar .avatar-emoji { font-size: 34px; }
.hud-level { position: absolute; right: -9px; bottom: -9px; min-width: 28px; height: 28px; padding: 0 4px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 900; background: var(--blue-grad); border: 2px solid #fff; text-shadow: 0 1px 0 rgba(0, 50, 100, .8); }
.hud-player-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hud-name { display: flex; align-items: center; max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-size: 14.5px; font-weight: 900; text-shadow: var(--stroke); }
.hud-xp { position: relative; width: 132px; height: 18px; overflow: hidden; border-radius: 999px; background: rgba(15, 8, 70, .65); border: 2px solid #8fdcf8; }
.hud-xp i { display: block; height: 100%; background: linear-gradient(#7de2ff, #2aa7e9); transition: width .3s; }
.hud-xp em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.hud-score { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 1px 10px 1px 6px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 900; background: linear-gradient(#7b4fe0, #4a2aa8); border: 2px solid #fff; }
.hud-score .currency-img, .hud-score .currency-emoji { width: 18px; height: 18px; font-size: 15px; }
.hud-resources { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 4px; min-width: 0; }
.hud-actions { display: flex; gap: 8px; padding-top: 2px; }
.hud-btn { padding: 0; background: none; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding: 22px 12px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(25, 14, 100, .82), rgba(25, 14, 100, .5) 60%, transparent); pointer-events: none; }
.dock > *, .dock-mid > * { pointer-events: auto; }
.dock-mid { display: flex; align-items: flex-end; gap: 12px; }
.dock-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; background: none; transition: transform .15s; }
.dock-item.active { transform: translateY(-6px); }
.dock-item.active .round-btn { outline: 4px solid #ffe27a; outline-offset: 2px; }
.dock-label, .side-label { color: #fff; font-size: 12px; font-weight: 900; line-height: 1.1; text-shadow: var(--stroke); text-align: center; }
.event-tag { position: absolute; top: 34px; right: -10px; z-index: 2; padding: 1px 6px; border-radius: 999px; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: #e22d3d; border: 2px solid #fff; }

/* ---------- shell (all non-glade pages) ---------- */
.shell { position: relative; isolation: isolate; min-height: 100dvh; padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
.shell-veil { position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(48, 24, 140, .62), rgba(30, 20, 110, .76) 50%, rgba(22, 14, 85, .9)); backdrop-filter: blur(2px); }
.shell-content { position: relative; z-index: 1; max-width: 1560px; margin: 0 auto; padding: 6px 16px 20px; }

/* ---------- glade ---------- */
.glade { position: relative; height: 100dvh; min-height: 560px; overflow: hidden; }
.glade-bg { object-position: 50% 70%; }
.glade-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40, 20, 120, .28), transparent 30%, transparent 60%, rgba(30, 15, 100, .5)); }
.glade-side { position: absolute; top: 122px; z-index: 12; display: flex; flex-direction: column; gap: 14px; }
.glade-side.left { left: 12px; } .glade-side.right { right: 12px; }
.side-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 78px; padding: 0; background: none; }
.glade-stage { --h: min(54dvh, 540px); --overlap: .22; --sneg: .40; --santa: .44; position: absolute; z-index: 10; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 100%; max-width: 920px; height: var(--h); }
.glade-tree { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: var(--h); width: calc(var(--h) * .806); padding: 0; background: none; transition: transform .2s; }
.glade-tree:hover { transform: translateX(-50%) scale(1.02); }
.glade-tree .tree-stage { width: 100%; height: 100%; }
.tree-cta { position: absolute; top: 1%; left: 50%; transform: translateX(-50%); z-index: 4; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 14px; border-radius: 999px; color: #5a3500; font-size: 13.5px; font-weight: 900; background: var(--gold-grad); border: 2px solid #fff; box-shadow: 0 4px 0 #a0640a, 0 8px 14px rgba(10, 5, 60, .45); animation: cta-bob 1.8s ease-in-out infinite; }
@keyframes cta-bob { 50% { transform: translateX(-50%) translateY(-4px); } }
.glade-char { position: absolute; bottom: 0; z-index: 3; padding: 0; background: none; transition: transform .2s; }
.glade-char img { display: block; height: 100%; width: auto; filter: drop-shadow(0 12px 14px rgba(20, 10, 70, .55)); }
.glade-char:hover { transform: scale(1.04); } .glade-char:active { transform: scale(.97); }
.glade-char.sneg { height: calc(var(--h) * var(--sneg)); right: calc(50% + var(--h) * (.403 - var(--overlap))); }
.glade-char.santa { height: calc(var(--h) * var(--santa)); left: calc(50% + var(--h) * (.403 - var(--overlap))); }
.glade-char.bunny { height: calc(var(--h) * .15); left: calc(50% - var(--h) * .27); z-index: 4; }
.char-flag { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 9px; border-radius: 999px; color: #fff; font-size: 11.5px; font-weight: 900; border: 2px solid #fff; animation: bang-bob 1.4s ease-in-out infinite; }
.char-flag.cyan { background: #19a8d8; } .char-flag.gold { background: #e49a12; } .char-flag.yellow { background: #d9a400; }
.char-dialog { position: absolute; z-index: 25; left: 50%; top: clamp(128px, 20dvh, 170px); transform: translateX(-50%); width: min(92vw, 430px); display: flex; align-items: center; gap: 12px; padding: 12px 42px 12px 12px; border-radius: 22px; background: linear-gradient(180deg, #fffdf6, #efe8ff); border: 3px solid #fff; box-shadow: var(--card-shadow); color: var(--ink); animation: toast-in .25s ease-out; }
.char-dialog-face { width: 62px; height: 62px; flex: none; object-fit: cover; object-position: 50% 12%; border-radius: 18px; background: #e6defa; border: 2px solid #fff; }
.char-dialog h4 { margin: 0 0 3px; font-size: 16px; } .char-dialog p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.char-dialog > button { position: absolute; top: 8px; right: 10px; padding: 4px; color: var(--muted); background: none; font-size: 15px; }

/* ---------- panels ---------- */
.tree-play-column, .tree-info-card, .side-card, .ratings-card, .mini-game-shell, .visit-tree-column, .unlock-roadmap, .friend-card, .shop-item, .game-card, .trade-card {
  color: var(--ink); background: linear-gradient(180deg, #fffdf6, #f1eaff); border: 3px solid #fff; border-radius: 24px; box-shadow: var(--card-shadow);
}
.tree-play-column, .tree-info-card, .side-card, .ratings-card, .visit-tree-column, .unlock-roadmap { padding: 16px; }
.mini-game-shell { padding: 18px; }
.tree-title-row h1, .friend-profile-header h1, .mini-game-header h1, .unlock-roadmap h2, .weekly-card h2, .weekly-mini h3, .side-heading h2, .info-card-heading h2, .shop-item-copy h2, .game-card-copy h2, .friend-card-info h2, .task-card h3, .side-card h3, .trade-person strong, .leaderboard strong { color: var(--ink); }
.tree-title-row h1 { font-size: 28px; }
.eyebrow { color: #8a7fd0; font-weight: 900; }
.muted-copy, .task-card p, .shop-item-copy p, .game-card-copy > p, .inventory-heading p, .friend-profile-header p, .mini-game-header p, .gift-form > p, .score-recipe, .tip-box, .micro-rules, .item-value, .weekly-card > p, .weekly-mini p, .activity-row p, .friend-card-info p, .leaderboard small { color: var(--muted); }
.task-card { background: #fff; border: 2px solid #e6defa; border-radius: 18px; }
.task-card.complete { border-color: #9bd8a1; background: #f3fcf2; }
.task-card.compact { background: #f4efff; }
.task-tag { color: #6d3fd4; background: #eadfff; }
.inventory-item, .theme-choice, .role-options button, .coop-mini-list > button, .leaderboard > div, .visit-stats > div, .empty-inventory, .contribution-highlight, .roadmap-steps > div, .gift-item-preview button, .daily-grid > div, .score-recipe, .intro-chip { background: #f0eaff; border-color: #e0d6fa; }
.leaderboard > div.mine, .theme-choice.active, .role-options button.active, .inventory-item.active, .gift-item-preview button.active, .daily-grid > div.current { background: #fff3cc; border-color: #f1b02a; }
.tip-box { background: #fff3cc; color: #7a5a14; }
.level-badge { color: #fff; background: var(--purple-grad); border: 2px solid #fff; padding: 2px 9px; }
.level-track { height: 12px; background: #ddd3f7; border: 2px solid #fff; box-shadow: inset 0 2px 3px rgba(60, 30, 140, .25); margin-bottom: 20px; }
.level-track > span, .level-track > i { background: linear-gradient(#7de2ff, #2aa7e9); }
.level-track small { top: 14px; font-size: 12px; color: var(--muted); }
.progress-bar { height: 10px; background: #ddd3f7; }
.progress-bar.tone-gold span { background: var(--gold-grad); } .progress-bar.tone-blue span { background: var(--blue-grad); } .progress-bar.tone-green span { background: var(--green-grad); }
.leaderboard .rank { color: #fff; background: #b4a9e0; font-size: 13px; }
.leaderboard .rank-1 { background: var(--gold-grad); color: #5a3500; } .leaderboard .rank-2 { background: linear-gradient(#e8eef5, #aab6c6); color: #3a4658; } .leaderboard .rank-3 { background: var(--orange-grad); color: #4a2400; }
.leaderboard b, .tree-score { color: #b5760a; }
.price { color: #b5760a; } .price.snowflakes { color: #1b86c4; }
.friend-card { transition: transform .15s; } .friend-card:hover { transform: translateY(-3px); }
.friend-card-footer span:last-child { color: #6d3fd4; }
.game-card-art { background: radial-gradient(circle at 50% 35%, #6d4fe0, #2c1f86); color: #fff; }
.game-card.tone-gold .game-card-art { background: radial-gradient(circle at 50% 35%, #f6b93b, #9a5d0c); }
.game-card.tone-plum .game-card-art { background: radial-gradient(circle at 50% 35%, #e46fb0, #7d2a78); }
.game-card.tone-green .game-card-art { background: radial-gradient(circle at 50% 35%, #62d96a, #1d7a34); }
.game-card-copy i { background: var(--green-grad); border: 2px solid #fff; }
.shop-item-art { background: radial-gradient(circle, #fff 0, #ece4ff 78%); border-bottom: 2px solid #e4dcf7; }
.shop-item-footer { background: #f0eaff; border-top: 2px solid #e4dcf7; }
.rarity-rare .rarity-label { color: #1b86c4; } .rarity-epic .rarity-label { color: #8a3fd0; } .rarity-legendary .rarity-label { color: #b5760a; }
.roadmap-steps > div > span { background: var(--gold-grad); color: #5a3500; }

/* ---------- section titles on the scene ---------- */
.section-intro { color: #fff; padding: 8px 4px 20px; }
.section-intro h1 { color: #fff; font-size: clamp(28px, 5vw, 42px); text-shadow: 0 3px 0 #3a2a9a, 0 0 18px rgba(30, 15, 110, .8); }
.section-intro p { color: #f0eaff; font-size: 15px; text-shadow: 0 2px 6px rgba(20, 10, 90, .85); }
.section-intro .eyebrow, .subsection-heading .eyebrow { color: #ffe27a; text-shadow: 0 1px 4px rgba(20, 10, 90, .8); }
.intro-stat { color: #ffe27a; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .6); backdrop-filter: blur(6px); }
.intro-stat strong { color: #fff; } .intro-stat span { color: #e6defa; font-size: 12.5px; }
.subsection-heading { color: #fff; } .subsection-heading h2 { color: #fff; text-shadow: 0 2px 0 #3a2a9a, 0 0 12px rgba(30, 15, 110, .8); }
.subsection-heading span { color: #e6defa; text-shadow: 0 1px 4px rgba(20, 10, 90, .8); font-size: 13px; }
.back-button { color: #fff; font-size: 15px; font-weight: 900; text-shadow: var(--stroke); }
.shop-wallet span { color: #ffe27a; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .6); font-weight: 900; } .shop-wallet span:last-child { color: #aeeaff; }
.filter-tabs button, .owned-filter { color: #fff; background: rgba(255, 255, 255, .16); border: 2px solid rgba(255, 255, 255, .55); font-weight: 900; font-size: 13.5px; }
.filter-tabs button.active { color: #5a3500; background: var(--gold-grad); border-color: #fff; }
.owned-filter.active { color: #5a3500; background: var(--gold-grad); border-color: #fff; }
.empty-state { color: #fff; text-shadow: var(--stroke); } .empty-state p { color: #e6defa; }
.honest-coop-note { color: #fff; background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.honest-coop-note p { color: #e6defa; font-size: 13px; }
.trade-section .subsection-heading { margin-bottom: 12px; }

/* ---------- buttons ---------- */
.primary-button, .gold-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 16px; border: 3px solid #fff; color: #fff; font-size: 15px; font-weight: 900; transition: transform .1s, filter .15s; }
.primary-button { background: var(--green-grad); text-shadow: 0 2px 0 rgba(10, 80, 10, .7); box-shadow: 0 4px 0 #167016, 0 8px 14px rgba(10, 60, 10, .35), inset 0 2px 0 rgba(255, 255, 255, .5); }
.gold-button { background: var(--gold-grad); color: #5a3500; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); box-shadow: 0 4px 0 #a0640a, 0 8px 14px rgba(80, 40, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .55); }
.secondary-button { background: var(--blue-grad); text-shadow: 0 2px 0 rgba(3, 60, 110, .7); box-shadow: 0 4px 0 #075f9d, 0 8px 14px rgba(5, 20, 80, .35), inset 0 2px 0 rgba(255, 255, 255, .5); }
.danger-button { background: var(--red-grad); text-shadow: 0 2px 0 rgba(100, 10, 25, .7); box-shadow: 0 4px 0 #8a1a2a, 0 8px 14px rgba(80, 5, 20, .35), inset 0 2px 0 rgba(255, 255, 255, .5); }
.primary-button:hover:not(:disabled), .gold-button:hover:not(:disabled), .secondary-button:hover:not(:disabled), .danger-button:hover:not(:disabled) { filter: brightness(1.06); }
.primary-button:active:not(:disabled), .gold-button:active:not(:disabled), .secondary-button:active:not(:disabled), .danger-button:active:not(:disabled) { transform: translateY(3px); }
.primary-button:disabled, .gold-button:disabled, .secondary-button:disabled, .danger-button:disabled { opacity: .5; filter: grayscale(.35); }
.full { width: 100%; margin-top: 12px; }
.task-card-bottom > button, .shop-item-footer > button, .trade-card > button, .gift-teaser > button, .daily-teaser > button, .empty-inventory button, .empty-state button, .match-instructions button.go {
  color: #fff; font-size: 13.5px; font-weight: 900; padding: 9px 13px; border-radius: 12px; border: 2px solid #fff; background: var(--green-grad); text-shadow: 0 1px 0 rgba(10, 80, 10, .7); box-shadow: 0 3px 0 #167016;
}
.task-card-bottom > button:disabled, .shop-item-footer > button:disabled, .trade-card > button:disabled, .gift-teaser > button:disabled, .daily-teaser > button:disabled { color: #8d87b8; background: #e3dcf7; text-shadow: none; box-shadow: 0 3px 0 #c8bfe8; opacity: 1; }
.task-card.complete .task-card-bottom > button:not(:disabled) { background: var(--green-grad); color: #fff; }
.visit-actions > button { color: #4f45a0; background: #e6defa; border: 2px solid #fff; font-size: 14px; font-weight: 900; box-shadow: 0 3px 0 #c8bfe8; }
.visit-actions > button:first-child { color: #fff; background: var(--pink-grad); text-shadow: 0 1px 0 rgba(100, 10, 70, .6); box-shadow: 0 3px 0 #8a1a5c; }
.visit-actions > button.active { color: #5a3500; background: var(--gold-grad); box-shadow: 0 3px 0 #a0640a; }
.visit-actions > button:disabled { opacity: .6; font-size: 12.5px; }
.visit-actions small { color: inherit; opacity: .8; }
.wide-subtle-button, .text-button { color: #6d3fd4; font-weight: 900; } .wide-subtle-button { background: #eadfff; }
.round-link { color: #fff; background: var(--blue-grad); border: 2px solid #fff; }
.inventory-item { border-width: 2px; border-style: solid; color: var(--ink); }
.inventory-count { color: var(--ink); border: 2px solid #e0d6fa; }
.selected-check { background: #f1b02a; }

/* ---------- modals ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 14px; overflow-y: auto; background: rgba(15, 8, 70, .74); backdrop-filter: blur(6px); }
.modal-card, .modal { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 22px; border-radius: 28px; color: var(--ink); background: linear-gradient(180deg, #fffdf6, #efe8ff); border: 4px solid #fff; box-shadow: 0 0 0 4px #eab13d, 0 26px 60px rgba(10, 5, 60, .65), inset 0 2px 0 #fff; }
.modal { text-align: center; }
.modal-x, .modal-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 50%; color: #fff; background: var(--red-grad); border: 3px solid #fff; box-shadow: 0 3px 0 #8a1a2a; }
.modal-x.static { position: static; flex: none; }
.modal-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; font-size: 24px; }
.modal h2 { color: var(--ink); } .modal > p { color: var(--muted); font-size: 14px; }
.modal-hero-icon { background: var(--gold-grad); color: #5a3500; }
.daily-grid > div { color: var(--muted); } .daily-grid > div.past { background: #dcf3de; color: #2d7a3a; } .daily-grid > div.current { color: #8a5a00; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(124px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 18px; color: #fff; font-size: 14.5px; font-weight: 800; background: rgba(36, 22, 130, .97); border: 3px solid #fff; box-shadow: 0 10px 28px rgba(10, 5, 60, .55); animation: toast-in .25s ease-out; }
.toast > span { color: #ffe27a; display: grid; } .toast > button { color: #cfc6f5; }
.save-pill { position: fixed; z-index: 60; top: calc(6px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 900; background: rgba(36, 22, 130, .9); border: 2px solid rgba(255, 255, 255, .7); }
.save-pill.error { background: #c0283d; }

/* ---------- forms ---------- */
.ui-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; margin-bottom: 14px; border-radius: 16px; background: #e6defa; }
.ui-tabs button { padding: 11px 8px; border-radius: 12px; color: #6a5fb0; background: transparent; font-size: 15px; font-weight: 900; }
.ui-tabs button.active { color: #fff; background: var(--blue-grad); text-shadow: 0 1px 0 rgba(0, 60, 110, .6); box-shadow: 0 3px 0 #075f9d; }
.ui-form { display: block; }
.ui-field { display: grid; gap: 6px; margin-bottom: 12px; text-align: left; }
.ui-field > span { display: flex; align-items: center; gap: 5px; color: #5d56a0; font-size: 13.5px; font-weight: 900; }
.ui-input-wrap { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #8a7fd0; background: #fff; border: 3px solid #d8cff3; border-radius: 14px; }
.ui-input-wrap:focus-within, .ui-input.plain:focus { border-color: #3aa7e6; }
.ui-input { width: 100%; padding: 12px 0; color: var(--ink); font-size: 16px; font-weight: 800; background: transparent; border: 0; outline: 0; }
.ui-input.plain { padding: 12px 14px; background: #fff; border: 3px solid #d8cff3; border-radius: 14px; }
textarea.ui-input { resize: vertical; }
.ui-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; color: #a1223b; font-size: 14px; background: #ffe3e8; border: 2px solid #f3a7b5; border-radius: 12px; text-align: left; }
.ui-ok { padding: 10px 12px; margin-bottom: 12px; color: #1d6a2a; font-size: 14px; background: #dcf7de; border: 2px solid #9bd8a1; border-radius: 12px; text-align: left; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.avatar-option { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; color: #5d56a0; font-size: 11.5px; font-weight: 800; background: #f3efff; border: 3px solid transparent; border-radius: 14px; }
.avatar-option.active { background: #fff4cf; border-color: #f1b02a; }
.guest-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; margin-top: 10px; color: #5a4fb0; font-size: 14.5px; font-weight: 900; background: #e6defa; border-radius: 14px; }

/* ---------- profile ---------- */
.profile-card { text-align: left; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-right: 36px; }
.profile-avatar { width: 76px; height: 76px; border-radius: 22px; border: 4px solid #fff; box-shadow: 0 0 0 3px #eab13d; background: linear-gradient(#ffe9a0, #e5a627); }
.profile-avatar .avatar-emoji { font-size: 46px; }
.profile-head h2 { margin: 0; font-size: 24px; } .profile-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.profile-level { color: #6d3fd4 !important; font-weight: 900; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.profile-stats > div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; text-align: center; background: #f0eaff; border-radius: 14px; }
.profile-stats strong { font-size: 18px; } .profile-stats span { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.2; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin-bottom: 12px; background: #f0eaff; border-radius: 16px; }
.toggle-row strong { display: flex; align-items: center; gap: 6px; font-size: 15px; } .toggle-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.switch { flex: none; width: 58px; height: 32px; padding: 3px; background: #c9c2e6; border-radius: 999px; transition: background .2s; }
.switch i { display: block; width: 26px; height: 26px; background: #fff; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch.on { background: #35bb2e; } .switch.on i { transform: translateX(26px); }
.settings-block { padding: 14px; margin-bottom: 12px; background: #f0eaff; border-radius: 16px; }
.settings-block h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 17px; }
.settings-block p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ---------- admin ---------- */
.admin-backdrop { align-items: start; }
.admin-card { width: min(1120px, 100%); height: min(94dvh, 920px); max-height: none; display: flex; flex-direction: column; padding: 18px; overflow: hidden; text-align: left; }
.admin-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.admin-head h2 { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 24px; }
.admin-stats { display: flex; gap: 8px; margin-left: auto; } .admin-stats span { padding: 6px 12px; color: var(--muted); font-size: 13px; background: #efe8ff; border-radius: 999px; } .admin-stats b { color: #6d3fd4; font-size: 15px; }
.admin-tabs { display: flex; gap: 6px; margin: 12px 0; overflow-x: auto; flex: none; }
.admin-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; color: #5d56a0; font-size: 14px; font-weight: 900; white-space: nowrap; background: #efe8ff; border-radius: 14px; }
.admin-tabs button.active { color: #fff; background: var(--blue-grad); text-shadow: 0 1px 0 rgba(0, 60, 110, .6); box-shadow: 0 3px 0 #075f9d; }
.admin-tabs .admin-refresh { margin-left: auto; padding: 10px; }
.admin-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.admin-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.admin-search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #8a7fd0; background: #fff; border: 3px solid #d8cff3; border-radius: 14px; }
.admin-search.wide { margin-bottom: 12px; }
.admin-search input { width: 100%; padding: 10px 0; color: var(--ink); font-size: 15px; font-weight: 800; background: transparent; border: 0; outline: 0; }
.chip { padding: 6px 12px; color: #5d56a0; font-size: 13px; font-weight: 900; white-space: nowrap; background: #efe8ff; border-radius: 999px; }
.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.admin-chips button { padding: 7px 13px; color: #5d56a0; font-size: 13px; font-weight: 900; background: #efe8ff; border-radius: 999px; }
.admin-chips button.active { color: #4a2c00; background: var(--gold-grad); }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.asset-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #fff; border: 3px solid #e6defa; border-radius: 18px; }
.asset-card.custom { border-color: #7cc97f; }
.asset-thumb { height: 130px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: repeating-conic-gradient(#f1ecff 0 25%, #e4dcfa 0 50%) 50% / 16px 16px; }
.asset-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; } .asset-thumb.wide img { width: 100%; height: 100%; object-fit: cover; }
.asset-empty { color: #8b84c0; font-size: 12.5px; text-align: center; line-height: 1.3; }
.asset-meta h4 { margin: 0; color: var(--ink); font-size: 15px; } .asset-meta code { display: block; margin: 2px 0; color: #8b84c0; font-size: 12px; }
.asset-meta p { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.status { display: inline-block; padding: 3px 9px; color: var(--muted); font-size: 12px; font-weight: 900; background: #ece7fa; border-radius: 999px; } .status.on { color: #1d7a2c; background: #d9f5db; }
.asset-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.mini-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; color: #4f45a0; font-size: 13px; font-weight: 900; background: #e6defa; border-radius: 11px; }
.mini-btn.green { color: #fff; background: var(--green-grad); text-shadow: 0 1px 0 rgba(10, 80, 10, .6); } .mini-btn.gold { color: #5a3500; background: var(--gold-grad); } .mini-btn.red { color: #fff; background: var(--red-grad); }
.mini-btn:disabled { opacity: .5; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 3px solid #e6defa; border-radius: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { padding: 10px 12px; color: #5d56a0; font-size: 13px; text-align: left; white-space: nowrap; background: #efe8ff; }
.admin-table td { padding: 10px 12px; vertical-align: middle; border-top: 2px solid #f0eafc; }
.admin-table small { display: block; color: #8b84c0; font-size: 12px; }
.admin-user { display: flex; align-items: center; gap: 10px; } .admin-user .avatar { width: 38px; height: 38px; } .admin-user .avatar-emoji { font-size: 22px; }
.admin-res { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; } .admin-res span { display: inline-flex; align-items: center; gap: 4px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { padding: 6px 11px; color: #5d56a0; font-size: 12.5px; font-weight: 900; background: #e6defa; border-radius: 999px; } .chip-btn.gold { color: #4a2c00; background: var(--gold-grad); } .chip-btn:disabled { opacity: .55; }
.admin-empty { padding: 28px; color: #8b84c0; text-align: center; }
.logs td { font-size: 13px; }
.broadcast-form { max-width: 640px; margin: 0 auto; padding: 16px; background: #f4efff; border-radius: 18px; }
.broadcast-form h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 19px; } .broadcast-form > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.broadcast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ---------- tree stage (3D tree on the scene) ---------- */
.tree-stage { position: relative; width: 100%; aspect-ratio: 500 / 620; overflow: hidden; background: #2a2080; border: 3px solid #fff; border-radius: 22px; box-shadow: 0 0 0 3px rgba(234, 177, 61, .95), inset 0 0 60px rgba(20, 10, 90, .3); }
.tree-stage::before, .stage-sky { display: none; }
.stage-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; transform: scale(1.3); transform-origin: 50% 80%; }
.stage-tint { position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--theme-a) 40%, transparent), transparent 62%), linear-gradient(180deg, rgba(35, 22, 120, .45), rgba(25, 15, 95, .35)); }
.tree-stage.theme-cosmic, .tree-stage.theme-retro, .tree-stage.theme-forest, .tree-stage.theme-classic { background: #2a2080; }
.tree-stage.bare { overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
.tree-svg { position: relative; z-index: 2; display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
.tree-svg.inert { pointer-events: none; }
.tree-stage.bare .tree-svg { filter: drop-shadow(0 16px 18px rgba(20, 10, 70, .45)); }
.placed-ornament { cursor: grab; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.placing-hint { color: #5a3500; background: var(--gold-grad); border: 2px solid #fff; font-size: 13.5px; }
.tree-selection-actions { background: rgba(255, 253, 246, .96); color: var(--muted); font-size: 12.5px; border: 2px solid #fff; }
.tree-selection-actions button { color: #fff; background: var(--red-grad); border-radius: 9px; font-size: 13px; font-weight: 900; }
.tree-selection-actions .icon-button { color: #5d56a0; background: #e6defa; }
.friend-tree-preview .tree-stage { height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; }
.friend-tree-preview .tree-svg { transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 900px) {
  .glade-stage { --h: min(62dvh, 640px); --overlap: .06; --sneg: .6; --santa: .66; }
  .side-btn { width: 90px; }
  .round-btn.big { width: 82px; height: 82px; }
  .dock { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 899px) and (min-width: 621px) {
  .glade-stage { --h: min(58dvh, 600px); --overlap: .14; --sneg: .5; --santa: .54; }
}
@media (max-width: 620px) {
  .hud { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 6px; }
  .hud-resources { grid-column: 1 / -1; grid-row: 2; padding-top: 0; gap: 6px; }
  .hud-avatar { width: 50px; height: 50px; border-radius: 15px; } .hud-avatar .avatar-emoji { font-size: 28px; }
  .hud-level { min-width: 24px; height: 24px; font-size: 12.5px; right: -7px; bottom: -7px; }
  .hud-xp { width: 104px; height: 16px; } .hud-name { max-width: 112px; font-size: 13.5px; }
  .hud-actions { gap: 6px; } .round-btn.sm { width: 38px; height: 38px; }
  .capsule { height: 32px; font-size: 13.5px; padding-left: 8px; gap: 4px; border-width: 2.5px; }
  .capsule .plus { width: 22px; height: 22px; font-size: 16px; }
  .currency-img { width: 20px; height: 20px; } .currency-emoji { font-size: 16px; }
  .glade-side { top: 132px; gap: 10px; } .side-btn { width: 64px; }
  .round-btn { width: 48px; height: 48px; } .round-btn.big { width: 58px; height: 58px; border-width: 3px; }
  .dock { gap: 2px; padding: 18px 6px calc(6px + env(safe-area-inset-bottom)); }
  .dock-mid { gap: 5px; }
  .round-btn.md { width: 42px; height: 42px; border-width: 2.5px; }
  .dock .round-btn.big { width: 54px; height: 54px; }
  .dock-label, .side-label { font-size: 10.5px; }
  .event-tag { top: 28px; right: -8px; font-size: 9px; padding: 0 5px; }
  .glade-stage { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .shell { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .shell-content { padding: 4px 10px 16px; }
  .tree-play-column, .tree-info-card, .side-card, .ratings-card, .visit-tree-column, .unlock-roadmap { padding: 12px; border-radius: 20px; }
  .mini-game-shell { padding: 12px; border-radius: 20px; }
  .toast { bottom: calc(108px + env(safe-area-inset-bottom)); font-size: 13.5px; }
  .modal-card, .modal { padding: 18px 14px; border-radius: 24px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .avatar-grid { gap: 6px; }
  .admin-card { padding: 12px; height: 96dvh; }
  .admin-stats { margin-left: 0; width: 100%; }
  .broadcast-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .asset-thumb { height: 100px; }
  .char-dialog { top: 136px; }
  .tree-title-row h1 { font-size: 23px; }
}
@media (max-width: 380px) {
  .hud-name { max-width: 90px; } .hud-xp { width: 90px; }
  .capsule { font-size: 12.5px; }
  .dock-mid { gap: 3px; } .round-btn.md { width: 40px; height: 40px; } .dock .round-btn.big { width: 50px; height: 50px; }
}
@media (max-height: 640px) and (min-width: 621px) {
  .glade-stage { --h: min(52dvh, 480px); }
}

/* ==========================================================================
   Clans, chat, mail, staged tasks, admin extensions
   ========================================================================== */
.task-tag.alt { color: #4f86b0; background: #e2f1fb; margin-left: 4px; }
.tier-dots { display: flex; gap: 5px; margin-top: 9px; }
.tier-dots i { flex: 1; height: 6px; border-radius: 6px; background: #ddd3f7; }
.tier-dots i.done { background: #35bb2e; }
.tier-dots i.current { background: repeating-linear-gradient(-55deg, #f3b933 0 6px, #fff3c9 6px 12px); }
.tier-done { display: flex; align-items: center; gap: 7px; color: #1d7a2c; font-size: 14px; font-weight: 900; padding: 7px 9px; margin: 8px 0 2px; background: #e2f6e4; border-radius: 10px; }
.you-tag { display: inline-block; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: #35bb2e; border-radius: 999px; padding: 1px 8px; margin-left: 7px; }
.leader-tag { display: inline-block; font-style: normal; font-size: 11px; font-weight: 900; color: #7d5a00; background: #ffe9a0; border-radius: 999px; padding: 1px 8px; margin-left: 7px; }

.hud-count { position: absolute; top: -5px; right: -6px; min-width: 21px; height: 21px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; color: #6b1020; background: #ffcf3d; border: 2px solid #fff; font-size: 12px; font-weight: 900; }
.hud-btn { position: relative; padding: 0; background: none; }

.rank-avatar { width: 34px; height: 34px; border-radius: 12px; border: 2px solid #fff; }
.rank-avatar .avatar-emoji { font-size: 20px; }
.rank-clan { display: grid; place-items: center; width: 38px; height: 26px; border-radius: 8px; color: #fff; font-size: 9px; font-weight: 900; font-style: normal; letter-spacing: .3px; }

/* chat + mail modal */
.social-card { text-align: left; }
.chat-list, .mail-list { flex: 1; min-height: 0; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding-right: 4px; margin-bottom: 12px; }
.chat-empty { color: var(--muted); font-size: 14px; padding: 20px 8px; text-align: center; }
.chat-row { display: flex; align-items: flex-start; gap: 9px; }
.chat-row.mine { background: #f2ecff; border-radius: 12px; padding: 7px; }
.chat-row.admin { background: #fff6df; border-radius: 12px; padding: 7px; }
.chat-body { flex: 1; min-width: 0; }
.chat-author { display: flex; align-items: center; gap: 5px; color: var(--ink); font-size: 14px; flex-wrap: wrap; }
.chat-author small { color: #9a93c7; font-weight: 700; }
.chat-author.mine { color: #6d3fd4; }
.chat-body p { margin: 2px 0 1px; color: #4c4776; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-time { color: #a29bc9; font-size: 12px; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; padding: 12px 14px; border: 3px solid #d8cff3; border-radius: 14px; font-size: 15px; font-weight: 700; color: var(--ink); background: #fff; }
.chat-input button { width: 48px; display: grid; place-items: center; color: #fff; background: var(--green-grad); border: 2px solid #fff; border-radius: 14px; }
.chat-input button:disabled { opacity: .5; }
.mail-row { background: #fff; border: 2px solid #e6defa; border-radius: 13px; overflow: hidden; }
.mail-row.unread { border-color: #f1b02a; background: #fffaf0; }
.mail-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: none; text-align: left; }
.mail-meta { flex: 1; min-width: 0; display: grid; gap: 1px; }
.mail-meta strong { color: var(--ink); font-size: 14px; }
.mail-meta > span { color: #5d56a0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-meta small { color: #a29bc9; font-size: 12px; }
.mail-body { padding: 0 14px 12px 56px; }
.mail-body p { color: #4c4776; font-size: 14px; line-height: 1.5; margin: 0 0 10px; }
.mail-actions { display: flex; justify-content: flex-end; }
.mail-out { margin-top: 14px; padding-top: 12px; border-top: 2px dashed #ddd3f7; }
.mail-out p { margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.mail-out b { color: var(--ink); }
.mail-out small { color: #a29bc9; }

/* clan */
.clan-create-card { max-width: 560px; margin: 0 auto; padding: 22px; }
.clan-create-card h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 22px; }
.clan-create-card .tag { text-transform: uppercase; letter-spacing: 2px; }
.clan-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.clan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.clan-main { min-width: 0; display: grid; gap: 18px; }
.clan-main > .ratings-card { max-width: 680px; width: 100%; justify-self: center; }
.clan-card { background: linear-gradient(180deg, #fff7e0, #f1eaff); }
.clan-level-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.clan-level-row b { font-size: 34px; font-family: Georgia, serif; color: #8a5a00; }
.clan-level-row .level-track { flex: 1; margin: 0; }
.clan-members { display: grid; gap: 9px; }
.clan-members > div { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: #f0eaff; border-radius: 12px; }
.clan-members > div.top { background: #fff3cc; }
.clan-members div > div { flex: 1; min-width: 0; }
.clan-members strong { display: block; font-size: 13.5px; color: var(--ink); }
.clan-members small { color: var(--muted); font-size: 12px; }
.chat-row.preview { padding: 5px 0; border-bottom: 1px solid #e9e2fa; border-radius: 0; }
.chat-row.preview p { font-size: 13px; }

/* letter form (friend visit) */
.letter-form { display: flex; gap: 8px; margin-top: 9px; }
.letter-form input { flex: 1; padding: 10px 12px; border: 2px solid #fff; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--ink); background: #fff; }
.letter-form button { padding: 0 14px; display: grid; place-items: center; color: #fff; background: var(--blue-grad); border: 2px solid #fff; border-radius: 12px; }
.letter-form button:disabled { opacity: .5; }
.visit-actions { grid-template-columns: repeat(4, 1fr); }

/* admin extensions */
.level-cell { display: grid; gap: 4px; justify-items: start; }
.level-editor { display: flex; gap: 5px; align-items: center; }
.level-editor input { width: 64px; padding: 7px 8px; border: 2px solid #d8cff3; border-radius: 9px; font-size: 14px; font-weight: 800; color: var(--ink); }
.caps-form { max-width: 620px; margin: 0 auto; padding: 20px; background: #f4efff; border-radius: 18px; }
.caps-form h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 20px; }
.caps-form > p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.caps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.caps-note { margin: 10px 0 0; color: #5d56a0; font-size: 13px; font-weight: 800; }
.social-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.social-block { padding: 14px; background: #f4efff; border-radius: 16px; }
.social-block .side-heading { margin-bottom: 10px; }
.admin-mini-list { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; }
.admin-mini-list > div { display: flex; align-items: flex-start; gap: 8px; padding: 8px; background: #fff; border-radius: 11px; }
.admin-mini-list > div > div { flex: 1; min-width: 0; }
.admin-mini-list strong { font-size: 13.5px; color: var(--ink); }
.admin-mini-list small { color: #a29bc9; }
.admin-mini-list p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.admin-tags .admin-tag { margin-left: 0; }

/* 6-button dock on phones */
@media (max-width: 620px) {
  .dock-mid { gap: 3px; }
  .dock .round-btn.md, .dock-mid .round-btn { width: 37px; height: 37px; border-width: 2px; }
  .dock .round-btn.big { width: 48px; height: 48px; border-width: 3px; }
  .dock-label { font-size: 9.5px; }
  .caps-grid, .social-cols { grid-template-columns: 1fr; }
  .visit-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 621px) {
  .caps-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ornament pictures capped at 150x150 (admin uploads are downscaled to the same) */
.shop-item-art { height: 150px; }
.shop-item-art > svg, .shop-item-art img { width: 118px; height: 118px; }

/* ===== player profiles, trades, reward editor, gifts ===== */
.avatar-btn { padding: 0; background: none; border-radius: 12px; display: inline-flex; }
.avatar-btn:hover { filter: brightness(1.06); }
.chat-author.link { padding: 0; background: none; text-align: left; text-decoration: underline dotted rgba(109, 63, 212, .5); }
.rank-avatar.big { width: 54px; height: 54px; border-radius: 16px; }
.player-card { text-align: left; }
.player-tree { position: relative; margin: 6px 0 14px; border-radius: 18px; overflow: hidden; background: #2a2080; }
.player-tree .tree-stage { border: 0; box-shadow: none; border-radius: 0; max-height: 46vh; }
.player-tree-tag { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; color: #fff; font-size: 12.5px; font-weight: 900; border-radius: 999px; background: rgba(25, 14, 100, .7); border: 2px solid rgba(255, 255, 255, .6); }
.player-letter { flex-direction: column; }
.player-letter textarea { width: 100%; padding: 10px 12px; border: 2px solid #d8cff3; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--ink); resize: vertical; }
.player-letter .primary-button { align-self: flex-end; }
.friends-tabs { max-width: 420px; margin-bottom: 14px; }
.trade-panel { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.trade-form { background: linear-gradient(180deg, #fffdf6, #f1eaff); }
.trade-pick { display: grid; gap: 12px; margin-bottom: 12px; }
.pick-strip { display: flex; gap: 7px; overflow-x: auto; padding: 6px 2px; }
.pick-strip button { position: relative; flex: 0 0 62px; height: 66px; border: 2px solid #e0d6fa; background: #fff; border-radius: 12px; }
.pick-strip button.active { border-color: #f1b02a; background: #fff6dc; }
.pick-strip svg { width: 100%; height: 100%; }
.pick-strip small { position: absolute; right: 3px; top: 3px; padding: 1px 4px; border-radius: 6px; background: #efe8ff; color: var(--ink); font-size: 10px; font-weight: 900; }
.trade-list { display: grid; gap: 10px; }
.trade-row { padding: 11px; border: 2px solid #e6defa; border-radius: 14px; background: #fff; }
.trade-row.accepted { opacity: .65; }
.trade-row-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink); }
.trade-row-head span { color: var(--muted); font-size: 12px; }
.trade-row-items { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 9px 0; }
.trade-row-items > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.trade-row-items svg:first-child { width: 54px; height: 54px; }
.trade-row-items small { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.trade-row > button { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; background: var(--green-grad); border: 2px solid #fff; border-radius: 11px; font-weight: 900; font-size: 13px; }
.trade-row > button:disabled { background: #e3dcf7; color: #8d87b8; }
.avatar-upload-row { display: flex; align-items: center; gap: 12px; padding: 10px; background: #fff; border: 3px solid #d8cff3; border-radius: 14px; }
.avatar-upload-row > div { display: grid; gap: 5px; }
.avatar-upload-row small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.admin-economy { display: grid; gap: 14px; }
.econ-block { padding: 14px; background: #f4efff; border-radius: 16px; }
.econ-block h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 17px; }
.econ-daily { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.econ-daily > div { padding: 9px; background: #fff; border-radius: 12px; display: grid; gap: 5px; }
.econ-daily span { font-weight: 900; color: var(--ink); font-size: 13px; }
.econ-daily label { display: grid; gap: 2px; color: var(--muted); font-size: 11.5px; }
.econ-daily input, .econ-table input, .econ-table select { width: 100%; padding: 6px 7px; border: 2px solid #d8cff3; border-radius: 8px; font-size: 13px; font-weight: 800; color: var(--ink); background: #fff; }
.econ-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: 13px; }
.econ-table th { padding: 7px 6px; text-align: left; color: #5d56a0; background: #efe8ff; font-size: 12px; }
.econ-table td { padding: 5px 6px; border-top: 1px solid #f0eafc; }
.econ-tasks { display: grid; gap: 10px; }
.econ-task h4 { margin: 0 0 5px; font-size: 14px; color: var(--ink); }
.admin-gifts { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.gifts-form { padding: 14px; background: #f4efff; border-radius: 16px; }
.gifts-form h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 18px; }
.gifts-form > p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.gift-history { padding: 14px; background: #fff; border: 3px solid #e6defa; border-radius: 16px; }
.gift-history h4 { margin: 0 0 9px; font-size: 16px; }
.gift-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px solid #f0eafc; }
.gift-row strong { font-size: 13.5px; color: var(--ink); }
.gift-row p { margin: 2px 0; color: var(--muted); font-size: 12.5px; }
.gift-row small { color: #a29bc9; font-size: 11.5px; }
.gift-row-rewards { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; color: #8a5a00; font-size: 12px; font-weight: 900; white-space: nowrap; }
.gift-row-rewards span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 900px) {
  .trade-panel, .admin-gifts { grid-template-columns: 1fr; }
}

/* ===== admin ornaments, downloads, bank ===== */
.orn-form { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 14px; background: #f4efff; border-radius: 16px; margin-bottom: 14px; }
.orn-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(circle, #fff, #ece4ff 78%); border-radius: 14px; padding: 10px; }
.orn-preview svg { width: 130px; height: 130px; }
.orn-preview small { color: var(--muted); font-size: 12px; }
.orn-fields h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 18px; }
.orn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 10px; }
.ui-input.color { height: 46px; padding: 4px; }
.orn-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.orn-hint { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.orn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.orn-card { display: flex; gap: 10px; padding: 10px; background: #fff; border: 3px solid #e6defa; border-radius: 16px; }
.orn-card.hidden-item { opacity: .6; }
.orn-card-art { flex: none; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle, #fff, #ece4ff 78%); }
.orn-card-art svg { width: 70px; height: 70px; }
.orn-card-body { min-width: 0; display: grid; gap: 4px; }
.orn-card-body strong { color: var(--ink); font-size: 14.5px; }
.orn-card-body small { color: var(--muted); font-size: 12px; }
.admin-downloads { max-width: 920px; margin: 0 auto; }
.dl-intro { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dl-card { padding: 18px; background: linear-gradient(180deg, #fffdf6, #f1eaff); border: 3px solid #fff; border-radius: 20px; box-shadow: 0 0 0 3px #eab13d; }
.dl-icon { width: 54px; height: 54px; display: grid; place-items: center; color: #fff; background: var(--purple-grad); border: 3px solid #fff; border-radius: 16px; }
.dl-card h3 { margin: 10px 0 8px; font-size: 20px; color: var(--ink); }
.dl-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.dl-fallback { display: block; margin-top: 10px; color: #1b6fb0; font-size: 13px; font-weight: 800; text-align: center; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.bank-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 14px 14px; color: var(--ink); background: linear-gradient(180deg, #fffdf6, #f1eaff); border: 3px solid #fff; border-radius: 24px; box-shadow: var(--card-shadow); }
.bank-badge { position: absolute; top: -10px; right: 12px; padding: 4px 11px; color: #fff; font-size: 12px; font-weight: 900; background: var(--red-grad); border: 2px solid #fff; border-radius: 999px; }
.bank-art { width: 78px; height: 78px; display: grid; place-items: center; color: #5a3500; background: var(--gold-grad); border: 4px solid #fff; border-radius: 50%; box-shadow: 0 6px 14px rgba(120, 70, 0, .35); }
.bank-card h2 { margin: 12px 0 8px; font-size: 19px; color: var(--ink); }
.bank-contents { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin-bottom: 4px; font-size: 16px; font-weight: 900; color: #4c4776; }
.bank-contents span { display: inline-flex; align-items: center; gap: 4px; }
.bank-card .gold-button { margin-top: auto; font-size: 17px; }
.bank-note { display: flex; gap: 12px; max-width: 760px; margin: 18px auto 0; padding: 14px; color: #fff; background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .55); border-radius: 18px; backdrop-filter: blur(6px); }
.bank-note strong { font-size: 15px; }
.bank-note p { margin: 4px 0 0; color: #ece6ff; font-size: 13.5px; line-height: 1.5; }
.bank-note a { color: #ffe27a; }
.bank-modal { text-align: left; }
.bank-modal-pack { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.bank-mailto { text-decoration: none; }
.bank-add { margin-top: 10px; }
@media (max-width: 760px) {
  .orn-form, .dl-grid { grid-template-columns: 1fr; }
  .orn-preview svg { width: 100px; height: 100px; }
}

/* ===== achievements, growing tree, mail reader ===== */
.height-badge { padding: 2px 8px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 900; background: linear-gradient(#62d96a, #1d7a34); border: 2px solid #fff; }
.tasks-tabs { max-width: 480px; margin-bottom: 14px; }
.achievements { display: grid; gap: 12px; }
.ach-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 18px; color: var(--ink); background: linear-gradient(180deg, #fffdf6, #f1eaff); border: 3px solid #fff; box-shadow: var(--card-shadow); }
.ach-intro h2 { display: flex; align-items: center; gap: 8px; margin: 3px 0 5px; font-size: 22px; }
.ach-intro p { max-width: 560px; margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ach-stats { display: flex; gap: 8px; }
.ach-stats > div { min-width: 84px; padding: 8px 10px; text-align: center; border-radius: 12px; background: #fff; border: 2px solid #e6defa; }
.ach-stats strong { display: block; font-size: 18px; color: #6d3fd4; }
.ach-stats span { color: var(--muted); font-size: 11.5px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ach-card { display: flex; gap: 10px; padding: 12px; border-radius: 16px; background: var(--panel); border: 3px solid #fff; box-shadow: var(--card-shadow); }
.ach-card.complete { border-color: #9bd8a1; background: #f5fbf4; }
.ach-card.claimed { opacity: .72; border-color: #e6defa; }
.ach-icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px; border-radius: 14px; background: linear-gradient(#ffe27a, #f1b02a); border: 2px solid #fff; color: #5a3500; }
.ach-card:not(.complete) .ach-icon { background: #e9e3f8; color: #8d87b8; }
.ach-body { flex: 1; min-width: 0; }
.ach-body h3 { margin: 0 0 2px; font-size: 15px; color: var(--ink); }
.ach-body p { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ach-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ach-bottom > button { flex: none; padding: 7px 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: 10px; color: #fff; font-size: 12.5px; font-weight: 900; background: var(--green-grad); border: 2px solid #fff; text-shadow: 0 1px 0 rgba(10, 80, 10, .6); }
.ach-bottom > button:disabled { color: #8d87b8; background: #e3dcf7; text-shadow: none; }
.achievement-teaser .muted-copy { margin-bottom: 4px; }

/* mail list + full letter reader */
.mail-row { background: #fff; border: 2px solid #e6defa; border-radius: 13px; overflow: hidden; }
.mail-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; }
.mail-item .mail-head { flex: 1; min-width: 0; padding: 0; background: none; display: flex; align-items: center; gap: 8px; text-align: left; color: #8d87b8; }
.mail-item .avatar-btn { flex: none; }
.mail-reader { display: flex; flex-direction: column; min-height: 0; }
.mail-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 10px; padding: 7px 11px; border-radius: 10px; color: #5d56a0; font-weight: 900; font-size: 13px; background: #efe8ff; }
.mail-reader-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid #e9e2fa; }
.mail-reader-head > div { flex: 1; min-width: 0; }
.mail-reader-head h3 { margin: 0 0 3px; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.mail-reader-head p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.mail-reader-head small { color: #a29bc9; font-size: 12px; }
.mail-reader-body { max-height: 44vh; overflow-y: auto; padding: 12px 2px; color: #3f3a6b; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-reader-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 2px solid #e9e2fa; }
.mail-reply-hint { color: var(--muted); font-size: 12.5px; }
.mail-reply { display: grid; gap: 8px; padding-top: 8px; }
.mail-reply textarea { resize: vertical; }
.mail-reply .primary-button { justify-self: end; }
@media (max-width: 620px) {
  .ach-grid { grid-template-columns: 1fr; }
  .ach-stats { width: 100%; justify-content: space-between; }
  .ach-stats > div { flex: 1; min-width: 0; }
  .mail-reader-body { max-height: 38vh; }
}

.econ-note { margin: -4px 0 10px; color: var(--muted); font-size: 12.5px; }
.econ-task h4 small { color: var(--muted); font-weight: 700; font-size: 12px; }

/* ===== статус над ёлкой ===== */
.glade-tree-wrap { position: absolute; left: 50%; bottom: 0; z-index: 1; transform: translateX(-50%); height: var(--h); width: calc(var(--h) * .806); }
.glade-tree-wrap .glade-tree { position: relative; left: auto; bottom: auto; transform: none; width: 100%; height: 100%; }
.glade-tree-wrap .glade-tree:hover { transform: scale(1.02); }
.tree-cta { top: auto; bottom: 3%; }
.tree-status { display: flex; justify-content: center; pointer-events: none; }
.tree-status.floating { position: absolute; left: 50%; z-index: 6; width: max-content; max-width: min(94%, calc(100vw - 170px)); transform: translate(-50%, calc(-100% - 6px)); }
.tree-status.static { margin: 0 auto 10px; max-width: 100%; }
.tree-status-ribbon { position: relative; display: inline-flex; max-width: 100%; min-width: 0; padding: 5px 20px 7px; border-radius: 999px; background: linear-gradient(180deg, #8f57ee, #5a2fc0 60%, #43209a); border: 2.5px solid #fff; box-shadow: 0 0 0 3px #f3b933, 0 8px 18px rgba(15, 8, 70, .45), inset 0 2px 0 rgba(255, 255, 255, .35); }
.tree-status-ribbon::before, .tree-status-ribbon::after { content: "✦"; position: absolute; top: 50%; transform: translateY(-50%); color: #ffe27a; font-size: 11px; text-shadow: 0 0 6px rgba(255, 226, 122, .9); }
.tree-status-ribbon::before { left: 7px; } .tree-status-ribbon::after { right: 7px; }
.tree-status-text { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: Georgia, "Nunito Variable", serif; font-style: italic; font-weight: 900; font-size: clamp(13px, 1.1vw + 8px, 20px); line-height: 1.25; letter-spacing: .3px; color: #ffe27a; background: linear-gradient(180deg, #fffbe0 10%, #ffd84a 55%, #f5a623); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 0 rgba(50, 15, 110, .85)); }
.status-editor { margin-bottom: 12px; }
.status-editor.compact { margin-top: 10px; }
.status-input-row { display: flex; gap: 8px; }
.status-input-row .ui-input { flex: 1; min-width: 0; }
.status-input-row .gold-button { flex: none; padding: 10px 14px; font-size: 14px; }
.status-counter { color: var(--muted); font-size: 12px; font-weight: 800; }
.status-counter.warn { color: #c0283d; }
.topper-hint { animation: topper-pulse 1.4s ease-in-out infinite; transform-origin: 250px 40px; }
@keyframes topper-pulse { 50% { opacity: .35; } }
.cooldown-note { margin-top: 8px !important; color: #ffe27a !important; font-size: 13px; }

/* ===== полное редактирование игрока ===== */
.editor-backdrop { z-index: 130; align-items: start; }
.player-editor { width: min(860px, 100%); max-height: calc(100dvh - 28px); display: flex; flex-direction: column; text-align: left; }
.editor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 40px; }
.editor-head h2 { margin: 0; font-size: 22px; }
.editor-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.editor-tabs { flex: none; }
.editor-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.editor-level { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 12px; margin-top: 4px; background: #f4efff; border-radius: 14px; }
.editor-level .editor-note { grid-column: 1 / -1; margin: 0; }
.editor-note { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.editor-check { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; margin-bottom: 8px; color: var(--ink); font-size: 14px; background: #f4efff; border-radius: 12px; cursor: pointer; }
.editor-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: #6d3fd4; }
.editor-check.danger { background: #ffe9ec; color: #a1223b; }
.editor-check.disabled { opacity: .55; cursor: not-allowed; }
.editor-ops { display: grid; }
.editor-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.editor-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #5d56a0; background: #efe8ff; border: 2px solid transparent; cursor: pointer; }
.editor-chip.on { color: #4a2c00; background: #fff1c2; border-color: #f1b02a; }
.editor-chip input { accent-color: #d58b0c; }
.editor-inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 46vh; overflow-y: auto; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 11px; background: #fff; border: 2px solid #ece6fa; }
.inv-row.has { border-color: #f1b02a; background: #fffaf0; }
.inv-row span { display: grid; color: var(--ink); font-size: 13.5px; font-weight: 800; }
.inv-row small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.inv-row input { width: 76px; padding: 6px 8px; border: 2px solid #d8cff3; border-radius: 9px; font-size: 14px; font-weight: 800; color: var(--ink); }
.editor-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 10px; border-top: 2px solid #e9e2fa; }
.editor-foot .editor-note { margin: 0; }
@media (max-width: 620px) {
  .tree-status.floating { max-width: min(94%, calc(100vw - 150px)); }
  .tree-status-ribbon { padding: 4px 16px 5px; }
  .editor-grid, .editor-level { grid-template-columns: 1fr; }
  .editor-foot { flex-direction: column; align-items: stretch; }
  .status-input-row { flex-direction: column; }
}

/* ===== скачивание PHP-версии с базой ===== */
.dl-variant { display: grid; gap: 6px; padding: 12px; margin-top: 12px; background: #fff; border: 2px solid #e6defa; border-radius: 14px; }
.dl-variant strong { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 15px; }
.dl-variant span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.dl-variant .full { margin-top: 6px; }
.dl-warning { display: flex; gap: 7px; align-items: flex-start; margin: 12px 0 0; padding: 9px 11px; color: #a1223b; font-size: 12.5px; line-height: 1.45; background: #ffe9ec; border-radius: 12px; }
.dl-card code { padding: 1px 5px; font-size: 12px; background: #efe8ff; border-radius: 5px; }
