/* =========================================================
   CULTIVETONPROD — feuille de style originale
   ========================================================= */
:root {
  --bg: #0a110d;
  --bg2: #0e1812;
  --panel: #12211a;
  --panel2: #16291f;
  --panel3: #1c3327;
  --line: rgba(140, 200, 155, .14);
  --line2: rgba(140, 200, 155, .28);
  --text: #e8f3ea;
  --muted: #8da595;
  --green: #6fdc86;
  --green2: #3fae62;
  --lime: #b8ff7d;
  --amber: #f0c45a;
  --red: #ff6f6f;
  --blue: #6fc7f5;
  --purple: #b08ef0;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(70, 180, 110, .12), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(60, 130, 90, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { flex: 1; }
.good { color: var(--green) !important; }
.warn { color: var(--amber) !important; }
.bad { color: var(--red) !important; }
.blue { color: var(--blue) !important; }
.amber { color: var(--amber) !important; }
.green { color: var(--green) !important; }
.red { color: var(--red) !important; }

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  height: 68px; padding: 0 18px;
  background: rgba(10, 18, 13, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brandleaf { font-size: 1.5rem; filter: drop-shadow(0 0 10px rgba(120, 240, 150, .5)); }
.brandtext { font-weight: 800; letter-spacing: .12em; font-size: .95rem; }
.brandtext em { display: block; font-style: normal; font-size: .62rem; letter-spacing: .42em; color: var(--green); font-weight: 700; }
.burger { display: none; background: none; border: 1px solid var(--line2); color: var(--text); border-radius: 9px; font-size: 1.1rem; padding: 6px 10px; cursor: pointer; }

.hstats { display: flex; gap: 22px; margin-left: 12px; flex: 1; }
.hstat { min-width: 82px; }
.hstat .hl { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.hstat b { font-size: .95rem; font-variant-numeric: tabular-nums; }
.hstat.heat { min-width: 120px; }
.hbar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; margin-top: 4px; }
.hbar i { display: block; height: 100%; background: var(--green); transition: width .4s ease, background .4s; }
.hbar i.warn { background: var(--amber); }
.hbar i.bad { background: var(--red); }

.clockbox { text-align: right; flex-shrink: 0; }
.clockbox .day { font-weight: 700; font-size: .9rem; }
.clockbox .weather { font-size: .78rem; color: var(--muted); }

/* ---------------- shell ---------------- */
.shell { display: flex; align-items: flex-start; }
.sidebar {
  position: sticky; top: 68px;
  width: 232px; flex-shrink: 0;
  height: calc(100vh - 68px); overflow-y: auto;
  padding: 16px 12px 24px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 33, 26, .45), rgba(10, 17, 13, .2));
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(140, 200, 155, .18); border-radius: 6px; }
.side-status {
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(111, 220, 134, .05);
}
.side-weather { font-weight: 600; font-size: .86rem; }
.side-next { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.navgroup {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted); padding: 14px 10px 6px;
}
.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  color: #cfe0d4; font-size: .9rem;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.navlink span { width: 20px; text-align: center; font-size: 1rem; }
.navlink:hover { background: rgba(140, 200, 155, .07); color: #fff; }
.navlink.active {
  background: linear-gradient(90deg, rgba(111, 220, 134, .18), rgba(111, 220, 134, .04));
  border-color: rgba(111, 220, 134, .3);
  color: #fff;
}
.navlink.active span { filter: drop-shadow(0 0 6px rgba(120, 240, 150, .6)); }
.side-foot { margin-top: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; font-size: .72rem; }

/* ---------------- main ---------------- */
.main { flex: 1; min-width: 0; padding: 22px clamp(14px, 3vw, 34px) 40px; }
#view { max-width: 1240px; margin: 0 auto; }
.footer {
  max-width: 1240px; margin: 34px auto 0; padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .72rem; color: var(--muted);
}

/* ---------------- composants ---------------- */
.card {
  background: linear-gradient(180deg, rgba(22, 41, 31, .9), rgba(18, 33, 26, .9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.card h2 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; margin-bottom: 16px; }
.stats4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.houses { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.venues { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.vehicles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.jobs { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); }

.stat { padding: 14px 16px; }
.statlabel { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; }
.statval { font-size: 1.32rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.statsub { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.stat .bar { margin-top: 8px; }

.bar { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green2), var(--green)); transition: width .4s ease; }
.bar.grow i { background: linear-gradient(90deg, #3fae62, var(--lime)); }
.bar i.good { background: var(--green); }
.bar i.warn { background: var(--amber); }
.bar i.bad { background: var(--red); }

.pagehead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.pagehead h1 { margin-bottom: 2px; }
.pagehead .sub { color: var(--muted); font-size: .88rem; margin: 0; max-width: 760px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .04);
  color: var(--text); border-radius: 10px; padding: 9px 15px;
  font-size: .87rem; font-weight: 600; cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.btn:hover { background: rgba(255, 255, 255, .08); border-color: var(--line2); }
.btn:active { transform: translateY(1px); }
.btn.green {
  background: linear-gradient(180deg, #58cc74, #349a54);
  border-color: #6ee28a; color: #08140c !important;
  box-shadow: 0 4px 14px rgba(80, 200, 110, .2);
}
.btn.green:hover { background: linear-gradient(180deg, #6ade87, #3cab61); }
.btn.ghost { background: transparent; }
.btn.red { background: rgba(255, 111, 111, .12); border-color: rgba(255, 111, 111, .4); color: #ffb3b3 !important; }
.btn.blue { background: rgba(111, 199, 245, .12); border-color: rgba(111, 199, 245, .4); color: #b3e6ff !important; }
.btn.amber { background: rgba(240, 196, 90, .12); border-color: rgba(240, 196, 90, .38); color: #ffe0a0 !important; }
.btn.small { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
.btn.tiny { padding: 3px 8px; font-size: .72rem; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 20px;
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  background: rgba(140, 200, 155, .1); border: 1px solid rgba(140, 200, 155, .2);
  color: #cfe0d4; vertical-align: middle;
}
.tag.green { background: rgba(111, 220, 134, .12); border-color: rgba(111, 220, 134, .35); color: var(--green); }
.tag.red { background: rgba(255, 111, 111, .12); border-color: rgba(255, 111, 111, .35); color: #ffb3b3; }
.tag.blue { background: rgba(111, 199, 245, .12); border-color: rgba(111, 199, 245, .35); color: #b3e6ff; }
.tag.amber { background: rgba(240, 196, 90, .12); border-color: rgba(240, 196, 90, .35); color: #ffe0a0; }

/* hero */
.hero {
  position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 18px;
  padding: 20px 22px; margin-bottom: 16px;
  border-radius: 20px;
  border: 1px solid rgba(111, 220, 134, .22);
  background:
    radial-gradient(500px 200px at 90% 20%, rgba(111, 220, 134, .18), transparent 70%),
    linear-gradient(120deg, #13271c, #0f1c15 70%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 760px; }
.hero-media {
  position: relative; z-index: 1; flex: none; width: min(100%, 980px); max-width: 980px;
  margin: 0 auto; aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(111, 220, 134, .28);
  background: #08110b url("assets/ui/hero-poster.jpg") center / cover no-repeat;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  filter: saturate(1.06) contrast(1.03);
}
.hero h1 { text-shadow: 0 3px 18px rgba(0, 0, 0, .45); }
.kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--green); margin-bottom: 6px; }
.hero p { color: var(--muted); margin: 4px 0 12px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-art { font-size: clamp(4rem, 10vw, 7rem); filter: drop-shadow(0 10px 30px rgba(111, 220, 134, .35)); transform: rotate(-8deg); }

/* mini grille d'accès rapide */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 8px; margin-top: 12px; }
.quick {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .025); font-size: .84rem;
  transition: background .15s, border-color .15s, transform .1s;
}
.quick:hover { background: rgba(111, 220, 134, .08); border-color: rgba(111, 220, 134, .3); transform: translateY(-1px); }

/* objectifs / journal */
.quests { list-style: none; margin: 0; padding: 0; }
.quests li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
  font-size: .85rem;
}
.quests li:last-child { border-bottom: none; }
.quests li.done { color: var(--muted); text-decoration: line-through; }
.quests .qmark { color: var(--green); width: 16px; }
.quests .reward { margin-left: auto; font-size: .74rem; color: var(--amber); white-space: nowrap; }

.loglist { list-style: none; margin: 0; padding: 0; }
.logrow { font-size: .84rem; padding: 6px 0; border-bottom: 1px dashed var(--line); color: #cfe0d4; }
.logrow:last-child { border-bottom: none; }
.logrow .logtime { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; margin-right: 6px; }
.logrow.good { color: #b7f0c4; }
.logrow.bad { color: #ffc0c0; }
.logrow.warn { color: #ffe0a0; }
.loglist.big .logrow { padding: 9px 0; }

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--muted); }

/* salles */
.roomgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roomcard {
  display: flex; align-items: center; gap: 12px;
  padding: 13px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .15s, background .15s, transform .1s;
}
.roomcard:hover { border-color: rgba(111, 220, 134, .35); background: rgba(111, 220, 134, .06); transform: translateY(-1px); }
.roomemoji { font-size: 1.6rem; }
.roomcard b { display: block; font-size: .92rem; }
.roomcard .muted { font-size: .72rem; }
.roomcount {
  margin-left: auto; font-weight: 800; font-size: 1.1rem;
  color: var(--green); font-variant-numeric: tabular-nums;
}
.roomwarn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 8px; font-size: .72rem; font-weight: 700;
  color: #ffd2a1; background: rgba(255, 176, 84, .14);
  border: 1px solid rgba(255, 176, 84, .4);
}
.roomwarn + .roomcount { margin-left: 0; }
.roomalerts { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.roomalert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 11px; font-size: .8rem;
  border: 1px solid rgba(255, 176, 84, .35);
  background: rgba(255, 176, 84, .07);
}
.roomalert.bad {
  border-color: rgba(255, 111, 111, .4);
  background: rgba(255, 111, 111, .09);
}
.roomalert .raico { font-size: 1.05rem; line-height: 1.2; flex-shrink: 0; }
.roomalert .rabody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.roomalert .rabody b { font-size: .82rem; color: #ffe3c0; }
.roomalert.bad .rabody b { color: #ffc5c5; }
.roomalert .rabody span { color: var(--muted); line-height: 1.4; }
.roomalert .ralink {
  flex-shrink: 0; align-self: center; padding: 4px 9px; border-radius: 8px;
  border: 1px solid var(--line2); color: var(--text); font-size: .72rem;
  background: rgba(255, 255, 255, .05);
}
.roomalert .ralink:hover { border-color: var(--green); background: rgba(111, 220, 134, .12); }

/* plants */
.plants { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.plant {
  position: relative; display: flex; flex-direction: column; align-items: stretch;
  gap: 12px; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, .022);
  transition: border-color .15s, background .15s;
}
.plant:hover { border-color: var(--line2); background: rgba(255, 255, 255, .035); }
.plant.dead { opacity: .45; }
.pcheck {
  position: absolute; top: 9px; left: 9px; z-index: 3;
  padding: 4px; border-radius: 8px; background: rgba(10, 17, 13, .72);
  border: 1px solid var(--line); backdrop-filter: blur(4px);
}
.pcheck input { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; display: block; }
.pbody { flex: 1; min-width: 0; width: 100%; }
.ptop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.pmeta { font-size: .78rem; color: var(--muted); margin: 3px 0 6px; }
.pmeta b { color: #cfe0d4; font-weight: 600; }
.warnline {
  margin: 6px 0 4px; padding: 7px 9px; border-radius: 8px;
  background: rgba(255, 111, 111, .12); border: 1px solid rgba(255, 111, 111, .35);
  color: #ffc0c0; font-size: .75rem; line-height: 1.4;
}
.manualdose {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px dashed var(--line2); background: rgba(255, 255, 255, .02);
  font-size: .8rem;
}
.manualdose label { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.manualdose .num { width: 72px; min-width: 72px; }
.pfoot { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .74rem; flex-wrap: wrap; }
.q { font-weight: 600; }
.q.good { color: var(--green); }
.q.warn { color: var(--amber); }
.q.bad { color: var(--red); }

.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.num, select, input[type="number"], input[type="text"] {
  background: rgba(0, 0, 0, .28); color: var(--text);
  border: 1px solid var(--line2); border-radius: 8px;
  padding: 7px 9px; font-size: .84rem; font-family: inherit;
  min-width: 70px;
}
select { min-width: 180px; }
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 220, 134, .12); }
input[type="range"] { width: 100%; accent-color: var(--green); }

.form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); }
.form label select, .form label input { width: 100%; }
.preview {
  padding: 10px 12px; border-radius: 10px;
  border: 1px dashed var(--line2); background: rgba(111, 220, 134, .05);
  font-size: .84rem;
}
.preview b { color: var(--green); }

/* boutique */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 7px 13px; border-radius: 20px; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); font-family: inherit; font-size: .8rem; font-weight: 600;
}
.tab:hover { color: var(--text); border-color: var(--line2); }
.tab.active { background: rgba(111, 220, 134, .14); border-color: rgba(111, 220, 134, .45); color: var(--green); }

.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 11px; }
.shopcard {
  display: flex; gap: 12px; padding: 13px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .022);
  transition: border-color .15s, background .15s;
}
.shopcard:hover { border-color: var(--line2); background: rgba(255, 255, 255, .035); }
.shopcard.compact { align-items: flex-start; }
.shopemoji {
  font-size: 1.7rem; width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 11px;
  background: color-mix(in srgb, var(--c, #6fdc86) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, #6fdc86) 28%, transparent);
}
.shopbody { flex: 1; min-width: 0; }
.shoptop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.shoptop b { font-size: .92rem; }
.price { color: var(--green); font-weight: 700; font-size: .84rem; white-space: nowrap; }
.shopbody p { font-size: .76rem; margin: 2px 0 7px; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; font-size: .72rem; color: var(--muted); margin-bottom: 8px; }

/* listes */
.list { display: flex; flex-direction: column; gap: 2px; }
.rowitem {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: .86rem;
}
.rowitem:last-child { border-bottom: none; }
.rowitem.active { background: rgba(111, 220, 134, .05); border-radius: 8px; padding: 9px 8px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }

/* lieux / immobilier / véhicules / métiers */
.venue, .house, .vehicle, .job, .crew {
  border: 1px solid var(--line); border-radius: 13px; padding: 14px;
  background: rgba(255, 255, 255, .022);
  transition: border-color .15s, transform .1s;
}
.venue:hover, .house:hover, .vehicle:hover, .job:hover, .crew:hover { border-color: var(--line2); transform: translateY(-1px); }
.venue.locked { opacity: .48; }
.venue-top { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.vemoji { font-size: 1.2rem; }
.venue p { font-size: .75rem; }
.venue-status { font-size: .74rem; font-weight: 700; margin-top: 6px; }
.house, .vehicle { text-align: center; }
.house .houseemoji, .vehicle .houseemoji { font-size: 2rem; margin-bottom: 6px; }
.house h3, .vehicle h3 { margin-bottom: 8px; }
.house .kv, .vehicle .kv { text-align: left; }
.house .btn, .vehicle .btn, .job .btn, .crew .btn { width: 100%; margin-top: 10px; }
.house.current, .vehicle.current, .job.current, .crew.current { border-color: rgba(111, 220, 134, .45); background: rgba(111, 220, 134, .06); }
.badge-current {
  margin-top: 10px; padding: 6px; border-radius: 8px;
  background: rgba(111, 220, 134, .12); color: var(--green);
  font-size: .76rem; font-weight: 700; text-align: center;
}
.jobhead { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: .95rem; }
.job .kv { font-size: .8rem; }

.crew { text-align: center; }
.crewemoji { font-size: 2rem; margin-bottom: 6px; }
.crew h3 { color: var(--c, var(--green)); }
.crew .kv { text-align: left; }

/* table */
table.rank { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.rank th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line2); }
table.rank td { padding: 8px 10px; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
table.rank tr.me td { background: rgba(111, 220, 134, .09); color: #fff; font-weight: 700; }
table.rank tr.me td:first-child { border-radius: 8px 0 0 8px; }
table.rank tr.me td:last-child { border-radius: 0 8px 8px 0; }

/* succès */
.achievements { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .02); opacity: .6;
}
.ach.won { opacity: 1; border-color: rgba(111, 220, 134, .35); background: rgba(111, 220, 134, .06); }
.achicon { font-size: 1.2rem; }
.ach b { font-size: .8rem; display: block; }
.ach .muted { font-size: .7rem; }
.ach .reward { margin-left: auto; color: var(--amber); font-size: .72rem; white-space: nowrap; }

/* casino */
.game label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); margin: 10px 0; }
.game .btn { width: 100%; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.playcard {
  font-size: 1.6rem; padding: 10px 0; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line2); color: var(--text);
  transition: background .15s, transform .1s;
}
.playcard:hover { background: rgba(111, 220, 134, .14); transform: translateY(-2px); }

/* divers */
.empty {
  padding: 26px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line2); border-radius: 12px; margin-top: 12px;
  background: rgba(255, 255, 255, .015);
}
.disclaimer {
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(240, 196, 90, .28); background: rgba(240, 196, 90, .06);
  font-size: .8rem; color: #e9d9a8; line-height: 1.6;
}
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* toasts */
#toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; max-width: min(380px, 90vw);
}
.toast {
  padding: 11px 14px; border-radius: 11px;
  background: #1a2e22; border: 1px solid var(--line2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-size: .84rem; animation: slidein .25s ease;
  border-left: 3px solid var(--green);
}
.toast.good { border-left-color: var(--green); }
.toast.bad { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast.info { border-left-color: var(--blue); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes slidein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* modal */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 8, 5, .72); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal.show { display: flex; }
.modalbox {
  width: min(560px, 100%); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, #172b20, #101c15);
  border: 1px solid rgba(111, 220, 134, .3);
  border-radius: 18px; padding: 24px; box-shadow: 0 20px 70px rgba(0, 0, 0, .6);
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.modalbox h2 { font-size: 1.3rem; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.help p { font-size: .86rem; color: #cfe0d4; margin: 8px 0; }
.welcome-art { font-size: 3.4rem; text-align: center; margin-bottom: 6px; filter: drop-shadow(0 0 20px rgba(111, 220, 134, .4)); }

/* images */
.navicon { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; flex-shrink: 0; }
.hero-art { width: clamp(120px, 16vw, 190px); height: auto; object-fit: contain; border-radius: 16px; border: 5px solid #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transform: rotate(2deg); background: #fff; }
.roomemoji img { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 9px; padding: 2px; }
.pemoji { position: relative; width: 192px; height: 192px; flex-shrink: 0; margin: 0 auto; }
.plant-sway {
  width: 100%; height: 100%; position: relative;
  transform-origin: 50% 100%; animation: plantSway 5s ease-in-out infinite;
}
.plant-sway .stage-img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 16px;
  background: #fff; padding: 4px; border: 1px solid var(--line);
  transform: scale(var(--grow, 1)); transition: transform .6s ease;
}
.plant-sway .stage-img { display: block; }
.plant-sway .strain-badge {
  position: absolute; left: -12px; bottom: -10px; width: 44px; height: 44px;
  object-fit: contain; padding: 2px; border-radius: 50%;
  background: #fff; border: 3px solid #12211a; transform: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}
.plant-leaf {
  position: absolute; left: -12px; bottom: -6px; font-size: 1.4rem; opacity: .8;
  animation: leafFloat 4s ease-in-out infinite; pointer-events: none;
}
.pstage { position: absolute; right: -6px; bottom: -6px; font-size: .95rem; line-height: 1; background: #12211a; border: 1px solid var(--line2); border-radius: 8px; padding: 4px 5px; }
.plant-group {
  margin-top: 18px; padding: 12px 14px 14px; border: 1px solid var(--line);
  border-radius: 16px; background: rgba(255, 255, 255, .012);
}
.plant-group:first-of-type { margin-top: 10px; }
.plant-group-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line2);
}
.plant-group-head b { font-size: .95rem; }
.plant-group-head .tag { margin-left: 2px; }
.groupicon {
  width: 34px; height: 34px; object-fit: contain; border-radius: 9px;
  background: #fff; padding: 2px; border: 1px solid var(--line);
}
.plant.stage-germ .plant-sway { animation: seedPulse 3.2s ease-in-out infinite; }
.plant.stage-veg .plant-sway { animation-duration: 4.6s; }
.plant.stage-flo .plant-sway { animation: plantSway 4s ease-in-out infinite, plantGlow 2.8s ease-in-out infinite; }
.plant.stage-dry .plant-sway { transform-origin: 50% 0; animation: drySwing 7s ease-in-out infinite; }
.plant.stage-dry .stage-img { filter: sepia(.6) brightness(.9); }
.plant.stage-germ .plant-leaf, .plant.stage-dry .plant-leaf { display: none; }
.plant.overdose { border-color: rgba(255, 111, 111, .55); animation: overdosePulse 1.5s ease-in-out infinite; }
.plant.frozen .plant-sway img { filter: hue-rotate(160deg) brightness(1.08); }
.plant.pest .pemoji::after {
  content: "🐛"; position: absolute; top: -6px; left: 6px; font-size: 1rem;
  animation: bugCrawl 3.2s ease-in-out infinite; pointer-events: none;
}
.plant.watering .pemoji::before {
  content: "💧"; position: absolute; top: -8px; left: 50%; font-size: 1rem;
  animation: waterFall 1.5s ease-in forwards; pointer-events: none;
}
.plant.feeding .pemoji::before {
  content: "✨"; position: absolute; top: -6px; left: 50%; font-size: 1rem;
  animation: feedSparkle 1.4s ease-out forwards; pointer-events: none;
}
@keyframes plantSway {
  0%, 100% { transform: rotate(-2.2deg); }
  50% { transform: rotate(2.2deg); }
}
@keyframes seedPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}
@keyframes drySwing {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
@keyframes leafFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-4px) rotate(8deg); }
}
@keyframes plantGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(240, 196, 90, 0)); }
  50% { filter: drop-shadow(0 0 7px rgba(240, 196, 90, .7)); }
}
@keyframes overdosePulse {
  50% { box-shadow: 0 0 0 2px rgba(255, 111, 111, .22), inset 0 0 18px rgba(255, 111, 111, .08); }
}
@keyframes bugCrawl {
  0%, 100% { transform: translate(0, 0) rotate(-12deg); }
  50% { transform: translate(18px, 12px) rotate(14deg); }
}
@keyframes waterFall {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 34px) scale(1); }
}
@keyframes feedSparkle {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.4); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -22px) scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .plant-sway, .plant-leaf, .plant.pest .pemoji::after,
  .plant.watering .pemoji::before, .plant.feeding .pemoji::before,
  .plant.overdose { animation: none !important; }
  .hero-video { display: none; }
}
.shopimg { width: 54px; height: 54px; object-fit: contain; border-radius: 11px; border: 1px solid var(--line); background: #fff; padding: 3px; flex-shrink: 0; }
.cardimg { width: 112px; height: 112px; object-fit: contain; display: block; margin: 0 auto 8px; border-radius: 14px; background: #fff; padding: 4px; }
.vemoji { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; background: #fff; padding: 2px; border: 1px solid var(--line); }
.jobimg { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; }
.tinyimg { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; border: 1px solid var(--line); flex-shrink: 0; }
.itemname { display: flex; align-items: center; gap: 10px; }
.hashgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hashcard { display: flex; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.hashcard img { width: 68px; height: 68px; object-fit: contain; border-radius: 10px; background: #fff; padding: 2px; flex-shrink: 0; }
.hashcard b { font-size: .9rem; }
.hashcard .muted { font-size: .72rem; }
.gameimg { width: 100%; height: 118px; object-fit: contain; display: block; margin-bottom: 8px; border-radius: 10px; background: #fff; padding: 4px; }

/* ---------------- admin ---------------- */
.adm-warn {
  margin-bottom: 16px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 111, 111, .35);
  background: rgba(255, 111, 111, .08);
  color: #ffd2d2; font-size: .84rem;
}
.adm-warn b { color: #ffb3b3; }
.admin-tabs { margin-bottom: 14px; }
.admform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.admfield { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; color: var(--muted); }
.admfield input, .admfield select { width: 100%; }
.jsonbox {
  width: 100%; min-height: 260px; resize: vertical;
  background: rgba(0, 0, 0, .35); color: #cfe0d4;
  border: 1px solid var(--line2); border-radius: 10px;
  padding: 12px; font-family: Consolas, "Courier New", monospace; font-size: .78rem;
  line-height: 1.45;
}
.jsonbox:focus { outline: none; border-color: var(--green); }

/* ---------------- authentification / multi-joueurs ---------------- */
#app.auth-locked { filter: blur(5px); pointer-events: none; user-select: none; }
.auth {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 18px;
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(111, 220, 134, .16), transparent 65%),
    rgba(4, 9, 6, .92);
  backdrop-filter: blur(10px);
}
.auth.show { display: flex; }
.auth-card {
  width: min(430px, 100%);
  background: linear-gradient(180deg, #172b20, #0f1c15);
  border: 1px solid rgba(111, 220, 134, .32);
  border-radius: 20px; padding: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
  animation: pop .25s ease;
}
.auth-logo { font-size: 2.6rem; text-align: center; filter: drop-shadow(0 0 18px rgba(111, 220, 134, .5)); }
.auth-card h1 { text-align: center; font-size: 1.5rem; letter-spacing: .12em; margin: 4px 0 2px; }
.auth-card h1 em { font-style: normal; color: var(--green); }
.auth-card > p { text-align: center; font-size: .82rem; margin-bottom: 16px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.auth-tabs button {
  padding: 8px; border: 0; border-radius: 9px; cursor: pointer; font-family: inherit;
  background: transparent; color: var(--muted); font-weight: 700; font-size: .82rem;
}
.auth-tabs button.active { background: rgba(111, 220, 134, .16); color: var(--green); }
.auth-card form { display: flex; flex-direction: column; gap: 11px; }
.auth-card form label { display: flex; flex-direction: column; gap: 5px; font-size: .76rem; color: var(--muted); }
.auth-card form input {
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line2); border-radius: 10px;
  padding: 11px 12px; color: var(--text); font-family: inherit; font-size: .9rem;
}
.auth-card form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 220, 134, .13); }
.auth-card form .btn { width: 100%; margin-top: 4px; }
.auth-error { min-height: 18px; font-size: .76rem; color: #ffb3b3; }
.auth-sep { height: 1px; background: var(--line); margin: 16px 0 12px; }
.auth-foot { text-align: center; font-size: .72rem; color: var(--muted); margin-bottom: 8px; }
.auth-card > .btn.ghost { width: 100%; }
.auth-note { margin-top: 12px; text-align: center; font-size: .68rem; color: var(--muted); line-height: 1.5; }

.userbadge { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.ub-line { display: flex; align-items: center; gap: 6px; font-size: .78rem; flex-wrap: wrap; }
.ub-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.ub-dot.off { background: var(--red); box-shadow: 0 0 6px var(--red); }

.playerlist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 330px; overflow-y: auto; }
.playerrow {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  color: var(--text); font-family: inherit;
}
.playerrow:hover { border-color: var(--line2); background: rgba(255, 255, 255, .05); }
.playerrow.active { border-color: rgba(111, 220, 134, .5); background: rgba(111, 220, 134, .08); }
.pavatar {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; color: #08140c;
  background: linear-gradient(180deg, #6ade87, #3cab61);
}
.pname { display: flex; flex-direction: column; min-width: 0; }
.pname b { font-size: .86rem; }
.pname small { font-size: .7rem; color: var(--muted); }
.playerrow .tag { margin-left: auto; }
.adm-target { border-color: rgba(111, 220, 134, .35); }
.stagebox {
  margin: 14px 0 4px; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(111, 220, 134, .28);
  background: rgba(111, 220, 134, .05);
}
.stagebox-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; font-size: .84rem; }
.stagebox-head b { font-size: .92rem; }
.stagegrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.stagegrid + .stagegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stagebtn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line2);
  color: var(--text); font-family: inherit; font-size: .78rem;
  transition: border-color .15s, background .15s, transform .1s;
}
.stagebtn:hover:not(:disabled) { border-color: rgba(111, 220, 134, .55); background: rgba(111, 220, 134, .1); }
.stagebtn:active:not(:disabled) { transform: translateY(1px); }
.stagebtn:disabled { opacity: .32; cursor: not-allowed; }
.stagebtn .stageico { font-size: 1.05rem; line-height: 1; }
.stagebtn .stagename { flex: 1; min-width: 0; }
.stagebtn .stagect {
  padding: 1px 7px; border-radius: 6px; font-weight: 700; font-size: .72rem;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
}
.stagebtn.greenbtn { border-color: rgba(111, 220, 134, .5); background: rgba(111, 220, 134, .16); color: #dcf7e2; }

/* ---------------- tutoriel ---------------- */
.tutorial {
  position: fixed; inset: 0; z-index: 115; display: none;
  align-items: center; justify-content: center; padding: 18px;
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(111, 220, 134, .14), transparent 65%),
    rgba(4, 9, 6, .9);
  backdrop-filter: blur(9px);
}
.tutorial.show { display: flex; }
body.tut-open { overflow: hidden; }
.tut-card {
  position: relative;
  width: min(840px, 100%); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #172b20, #0f1c15);
  border: 1px solid rgba(111, 220, 134, .32);
  border-radius: 22px; padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
  animation: pop .25s ease;
}
.tut-skip {
  position: absolute; top: 14px; right: 16px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 5px 10px; border-radius: 8px; font-size: .72rem; font-family: inherit; cursor: pointer;
}
.tut-skip:hover { color: var(--text); border-color: var(--line2); }
.tut-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-right: 64px; flex-wrap: wrap; }
.tut-step { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--green); font-weight: 700; }
.tut-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.tut-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255, 255, 255, .18); cursor: pointer; transition: width .2s, background .2s;
}
.tut-dot.done { background: rgba(111, 220, 134, .55); }
.tut-dot.active { width: 22px; border-radius: 5px; background: var(--green); }
.tut-body { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: center; }
.tut-art {
  background: #fff; border-radius: 16px; padding: 10px;
  display: grid; place-items: center; min-height: 220px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.tut-art img { width: 100%; max-height: 280px; object-fit: contain; border-radius: 10px; }
.tut-emoji { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
.tut-content h2 { font-size: 1.4rem; margin: 0 0 8px; }
.tut-text { font-size: .92rem; line-height: 1.65; color: #d7e6da; }
.tut-tip {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(111, 220, 134, .08);
  border: 1px solid rgba(111, 220, 134, .25);
  font-size: .8rem; line-height: 1.5; color: #cfe8d5;
}
.tut-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
}

/* ---------------- casino étendu ---------------- */
.casinogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.casinocard {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .022);
}
.casinocard.disabled { opacity: .45; }
.casinoemoji {
  width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 1.55rem; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.casinobody { flex: 1; min-width: 0; }
.casinobody p { font-size: .74rem; margin: 2px 0 6px; }
.casinobody .btn { width: 100%; }
.wheelrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.wheelseg {
  min-width: 58px; text-align: center; padding: 10px 8px; border-radius: 10px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .03);
  font-weight: 700; font-size: .82rem;
}
.wheelseg.win { background: rgba(111, 220, 134, .2); border-color: var(--green); color: var(--green); transform: scale(1.06); }
.scratchrow { display: flex; gap: 10px; margin: 14px 0; }
.scratchcard {
  flex: 1; min-height: 92px; display: grid; place-items: center;
  font-size: 2.4rem; border-radius: 12px;
  border: 1px dashed var(--line2); background: rgba(255, 255, 255, .03);
}
.kenogrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; max-width: 360px; margin: 12px 0; }
.kenonum {
  padding: 10px 0; border-radius: 9px; cursor: pointer; font-family: inherit; font-weight: 700;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line2); color: var(--text);
}
.kenonum.picked { background: rgba(111, 220, 134, .2); border-color: var(--green); color: var(--green); }
.kenonum.drawn { outline: 2px solid var(--amber); }
.hilo-card {
  width: 110px; height: 150px; margin: 10px 0; border-radius: 14px;
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 800;
  background: #fff; color: #12211a; border: 4px solid #e8f3ea;
}
.crashbox {
  margin: 12px 0; padding: 26px; border-radius: 16px; text-align: center;
  border: 1px solid var(--line2);
  background: radial-gradient(circle at 50% 0%, rgba(111, 220, 134, .12), rgba(0, 0, 0, .25));
}
.crashbox.live { border-color: rgba(255, 111, 111, .5); animation: pulse 1.2s infinite; }
.crashmult { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { box-shadow: 0 0 30px rgba(255, 111, 111, .2); } }
.slotrow { display: flex; gap: 10px; margin: 14px 0; }
.slotreel {
  flex: 1; min-height: 100px; display: grid; place-items: center;
  font-size: 2.6rem; border-radius: 12px;
  border: 1px solid var(--line2); background: rgba(0, 0, 0, .25);
}
.bjtable { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.bjside { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.bjcard {
  display: inline-grid; place-items: center; min-width: 46px; height: 62px; margin: 4px;
  border-radius: 8px; background: #fff; color: #12211a; font-weight: 800; font-size: 1rem;
}
.bjcard.hidden { background: #1c3327; color: var(--green); }
.vprow { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.vpcard {
  flex: 1; min-width: 90px; padding: 14px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line2); background: #fff; color: #12211a;
  font-family: inherit; font-weight: 800; font-size: 1.2rem; display: flex; flex-direction: column; gap: 6px;
}
.vpcard small { font-size: .64rem; font-weight: 600; color: #4a5a4f; }
.vpcard.held { border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 220, 134, .25); }
.horserows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.horserow {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.horserow b { margin-left: auto; color: var(--amber); }
.horserow.picked { border-color: rgba(111, 199, 245, .5); background: rgba(111, 199, 245, .08); }
.horserow.winner { border-color: var(--green); background: rgba(111, 220, 134, .1); }
.plinkorow { display: flex; gap: 4px; margin: 14px 0; align-items: flex-end; }
.plinkobin {
  flex: 1; text-align: center; padding: 12px 2px; border-radius: 7px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  font-size: .72rem; font-weight: 700;
}
.plinkobin.hit { background: rgba(111, 220, 134, .2); border-color: var(--green); color: var(--green); transform: translateY(-4px); }
.tablewrap { overflow-x: auto; }
.admtable td { padding: 6px 8px; vertical-align: middle; }
.admtable input, .admtable select { min-width: 82px; width: 96px; padding: 5px 6px; }

/* ---------------- poker ---------------- */
.pokertable { overflow: hidden; perspective: 1200px; background: radial-gradient(ellipse at center, rgba(30, 90, 55, .18), rgba(0, 0, 0, .16)); }
.pokerteams { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; margin-bottom: 10px; }
.pokerboard { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin: 14px 0 18px; }
.pcard {
  display: inline-grid; place-items: center; min-width: 46px; height: 62px; padding: 0 6px;
  border-radius: 8px; background: #fff; color: #12211a; font-weight: 800; font-size: 1.05rem;
  border: 2px solid #e8f3ea;
}
.pcard.red { color: #c0392b; }
.pcard.back { background: linear-gradient(135deg, #1c3327, #12211a); color: var(--green); border-color: #2b4a38; }
.pcard.empty { background: rgba(255, 255, 255, .03); border: 1px dashed var(--line2); color: var(--muted); }
.pokerseats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.pokerseat { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.pokerseat.me { border-color: rgba(111, 220, 134, .45); background: rgba(111, 220, 134, .06); }
.pokerseat.acting { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(240, 196, 90, .15); }
.pokerseat.folded { opacity: .45; }
.pokerseat-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .82rem; }
.pokerhole { display: flex; gap: 5px; margin: 7px 0; }
.pokerhole .pcard { min-width: 36px; height: 48px; font-size: .85rem; }
.pokerinfo { margin-top: 12px; padding: 9px 11px; border-radius: 9px; border: 1px dashed var(--line2); background: rgba(255, 255, 255, .02); font-size: .82rem; }

/* ---------------- 3D casino ---------------- */
.casino3d { perspective: 1100px; }
.winprompt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid rgba(111, 220, 134, .45);
  background: linear-gradient(90deg, rgba(111, 220, 134, .16), rgba(111, 220, 134, .05));
  box-shadow: 0 0 30px rgba(111, 220, 134, .12);
}
.winprompt b { color: var(--green); font-size: 1rem; }

@keyframes deal3d {
  from { opacity: 0; transform: perspective(700px) rotateY(-88deg) translateY(-8px); }
  to { opacity: 1; transform: perspective(700px) rotateY(0) translateY(0); }
}
@keyframes coinFlip3d {
  0% { transform: rotateY(0) rotateX(0); }
  50% { transform: rotateY(720deg) rotateX(180deg) translateY(-24px); }
  100% { transform: rotateY(1440deg) rotateX(360deg) translateY(0); }
}
@keyframes diceRoll3d {
  0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
  70% { transform: rotateX(720deg) rotateY(540deg) rotateZ(180deg); }
  100% { transform: rotateX(720deg) rotateY(540deg) rotateZ(180deg); }
}
@keyframes spinWheel3d {
  0% { transform: rotateX(25deg) rotateZ(0); }
  100% { transform: rotateX(25deg) rotateZ(1440deg); }
}
@keyframes reel3d {
  0% { transform: rotateX(90deg) translateY(-10px); filter: blur(4px); }
  60% { transform: rotateX(-12deg); filter: blur(0); }
  100% { transform: rotateX(0); filter: blur(0); }
}
@keyframes plinkoDrop3d {
  0% { transform: translate(-50%, 0) scale(.8); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x, 0px)), 128px) scale(1); opacity: 1; }
}
@keyframes ballPop3d {
  from { transform: scale(.4) translateY(-10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes gallop3d {
  0% { transform: translateX(0) rotate(-2deg); }
  50% { transform: translateX(160px) rotate(2deg); }
  100% { transform: translateX(0) rotate(-2deg); }
}
@keyframes crashFloat3d {
  from { transform: translateY(0) rotate(-4deg); }
  to { transform: translateY(-14px) rotate(4deg); }
}
@keyframes cardFlip3d {
  from { transform: perspective(700px) rotateY(90deg); }
  to { transform: perspective(700px) rotateY(0); }
}

.coin-stage { display: flex; justify-content: center; margin: 18px 0 6px; perspective: 800px; }
.coin3d {
  width: 100px; height: 100px; position: relative; transform-style: preserve-3d;
  animation: coinFlip3d 1.2s ease both;
}
.coin-face {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  backface-visibility: hidden; font-weight: 800; color: #5a4300;
  background: radial-gradient(circle at 32% 28%, #fff3b0, #e8b923 45%, #8a6500 100%);
  border: 4px solid #c9a227; box-shadow: inset 0 0 20px rgba(255,255,255,.5), 0 10px 20px rgba(0,0,0,.35);
}
.coin-face.back { transform: rotateY(180deg); }

.dice-stage { display: flex; justify-content: center; margin: 18px 0; perspective: 800px; }
.dice3d {
  width: 76px; height: 76px; position: relative; transform-style: preserve-3d;
  animation: diceRoll3d 1.1s ease both;
}
.dface {
  position: absolute; width: 76px; height: 76px; border-radius: 12px;
  display: grid; place-items: center; font-size: 2rem;
  background: linear-gradient(145deg, #fff, #d8d8d8); border: 2px solid #b9b9b9;
  box-shadow: inset 0 0 12px rgba(0,0,0,.12); backface-visibility: hidden;
}
.dface.f1 { transform: translateZ(38px); }
.dface.f2 { transform: rotateY(180deg) translateZ(38px); }
.dface.f3 { transform: rotateY(90deg) translateZ(38px); }
.dface.f4 { transform: rotateY(-90deg) translateZ(38px); }
.dface.f5 { transform: rotateX(90deg) translateZ(38px); }
.dface.f6 { transform: rotateX(-90deg) translateZ(38px); }

.roulette-stage { display: flex; justify-content: center; margin: 18px 0; perspective: 900px; }
.roulette3d {
  width: 190px; height: 190px; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle at center, #1b2c22 0 18%, transparent 19%),
    repeating-conic-gradient(from 0deg, #b23a3a 0deg 9.73deg, #141414 9.73deg 19.46deg);
  border: 10px solid #8a6a32;
  box-shadow: 0 18px 35px rgba(0,0,0,.55), inset 0 0 30px rgba(0,0,0,.6);
  transform: rotateX(52deg);
  animation: spinWheel3d 2.4s cubic-bezier(.2,.7,.2,1) both;
}
.roulette3d::after {
  content: ""; position: absolute; inset: 38%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7e08a, #9c7a2e);
  box-shadow: 0 0 12px rgba(255,220,120,.6);
}
.roulette-ball {
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  position: absolute; top: 18px; left: 50%; box-shadow: 0 0 10px #fff;
  animation: spinWheel3d 2.4s cubic-bezier(.2,.7,.2,1) both;
}

.wheel3d { position: relative; width: min(330px, 100%); aspect-ratio: 1; margin: 12px auto 18px; perspective: 800px; }
.wheel-svg { width: 100%; height: 100%; display: block; transform: rotateX(10deg); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); }
.wheel-rotor { transform-origin: 180px 180px; animation: wheelSvgSpin 2.4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes wheelSvgSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(var(--spin)); }
}
.wheel-sector { stroke: rgba(8, 20, 12, .55); stroke-width: 1.5; }
.wheel-sector.win { filter: brightness(1.25); stroke: #b8ff7d; stroke-width: 3; }
.wheel-label {
  font-size: 12px; font-weight: 800; fill: #fff; text-anchor: middle; dominant-baseline: middle;
  paint-order: stroke; stroke: rgba(0, 0, 0, .5); stroke-width: 2.5px;
}
.wheel-label.small { font-size: 9px; }
.wheel-label.win { fill: #b8ff7d; }
.wheel-line { stroke: rgba(255, 255, 255, .55); stroke-width: 1; }
.wheel-hub { font-size: 22px; text-anchor: middle; dominant-baseline: middle; }
.wheel3d .wheel-pointer { top: 24px; z-index: 3; }
.wheel-disc3d {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(#6fdc86 0 12.5%, #2c7a4b 12.5% 25%, #f0c45a 25% 37.5%, #8a4b2a 37.5% 50%, #6fc7f5 50% 62.5%, #3a6b8c 62.5% 75%, #c0607a 75% 87.5%, #7a2c3a 87.5% 100%);
  border: 10px solid #9a7a3a; box-shadow: 0 18px 35px rgba(0,0,0,.5), inset 0 0 30px rgba(0,0,0,.35);
  transform: rotateX(28deg);
  animation: spinWheel3d 1.8s cubic-bezier(.2,.7,.2,1) both;
}
.wheel-pointer {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  color: var(--amber); font-size: 1.4rem; text-shadow: 0 0 10px rgba(240,196,90,.8);
}
.wheelseg { position: relative; z-index: 2; }

.hilo-card { animation: cardFlip3d .55s ease both; }
.bjcard, .vpcard, .pcard, .playcard { animation: deal3d .45s ease both; transform-style: preserve-3d; }
.slotmachine { perspective: 800px; }
.slotreel { animation: reel3d .65s ease both; transform-style: preserve-3d; }
.scratchcard { animation: deal3d .5s ease both; }
.keno-balls { display: flex; gap: 9px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.kenoball {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #08140c;
  background: radial-gradient(circle at 32% 26%, #fff, #8ff0a4 35%, #2c7a4b 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,.35), inset 0 0 10px rgba(255,255,255,.5);
  animation: ballPop3d .45s ease both;
}
.racetrack {
  display: flex; flex-direction: column; gap: 5px; margin: 12px 0; padding: 10px;
  border-radius: 12px; border: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 20px, transparent 20px 40px), rgba(0,0,0,.15);
  overflow: hidden;
}
.racelane { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--muted); }
.racelane .horse { font-size: 1.2rem; transition: transform 1.5s ease; }
.racetrack.racing .racelane .horse { animation: gallop3d 1.5s ease-in-out both; animation-delay: calc(var(--i, 0) * .06s); }
.racelane.winner { color: var(--green); }
.plinko3d { position: relative; height: 160px; max-width: 440px; margin: 10px auto; perspective: 700px; }
.plinko-pegs { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pegrow { display: flex; gap: 16px; }
.peg { width: 6px; height: 6px; border-radius: 50%; background: #8fa695; box-shadow: 0 0 5px rgba(255,255,255,.3); }
.plinko-ball {
  position: absolute; top: 0; left: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #f0c45a 45%, #8a5a00);
  box-shadow: 0 0 14px rgba(240,196,90,.8);
  animation: plinkoDrop3d 1s ease-in forwards;
}
.crashrocket { font-size: 2.4rem; text-align: center; animation: crashFloat3d .8s ease-in-out infinite alternate; }
.crashgrid {
  position: absolute; inset: 0; opacity: .18; pointer-events: none;
  background: linear-gradient(rgba(111,220,134,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(111,220,134,.3) 1px, transparent 1px);
  background-size: 28px 28px; transform: perspective(400px) rotateX(55deg); transform-origin: bottom;
}
.crashbox { position: relative; overflow: hidden; }
.cups-stage { display: flex; justify-content: center; gap: 18px; margin: 16px 0; perspective: 700px; }
.cup3d {
  position: relative; font-size: 2.5rem; text-align: center;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cup3d span { display: block; font-size: .7rem; color: var(--muted); font-weight: 700; }
.cup3d.lift { transform: translateY(-22px) rotateX(20deg); }

.scratch-stage { display: flex; justify-content: center; margin: 16px 0; }
.scratch-card {
  position: relative; width: min(560px, 100%); border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(111, 220, 134, .35);
  background: linear-gradient(180deg, #1c3327, #101c15);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45), inset 0 0 30px rgba(0, 0, 0, .25);
}
.scratch-under {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 18px; min-height: 190px;
  background: radial-gradient(circle at 50% 0%, rgba(111, 220, 134, .12), transparent 70%);
}
.scratch-symbol {
  min-height: 154px; display: grid; place-items: center;
  font-size: 3.2rem; background: #fff; border-radius: 13px;
  border: 2px solid #e8f3ea; box-shadow: inset 0 0 20px rgba(0, 0, 0, .06);
}
.scratch-card.preview .scratch-symbol { opacity: .35; font-size: 2.4rem; }
.scratch-card.revealed .scratch-symbol { animation: ballPop3d .45s ease both; }
.scratch-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair; border-radius: 16px;
}
@media (max-width: 560px) {
  .scratch-under { gap: 7px; padding: 10px; min-height: 140px; }
  .scratch-symbol { min-height: 108px; font-size: 2.2rem; }
}

@media (max-width: 1080px) {
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .burger { display: block; }
  .hstats { gap: 14px; }
  .sidebar {
    position: fixed; left: 0; top: 68px; z-index: 50;
    transform: translateX(-102%); transition: transform .2s ease;
    background: #0d1711; box-shadow: 20px 0 50px rgba(0, 0, 0, .5);
  }
  .sidebar.open { transform: none; }
  .main { padding-top: 18px; }
  .two, .three { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero { gap: 16px; padding: 18px; }
  .hero h1 { font-size: clamp(1.5rem, 4.2vw, 2.1rem); }
}
@media (max-width: 780px) {
  .hstats { display: none; }
  .brandtext { font-size: .82rem; }
  .clockbox { margin-left: auto; }
  .achievements { grid-template-columns: 1fr; }
  .hashgrid { grid-template-columns: 1fr; }
  .admform { grid-template-columns: 1fr; }
  .stagegrid, .stagegrid + .stagegrid { grid-template-columns: 1fr 1fr; }
  .tut-body { grid-template-columns: 1fr; }
  .tut-art { min-height: auto; }
  .tut-art img { max-height: 180px; }
  .tut-card { padding: 18px; }
  .roomgrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats4 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; border-radius: 16px; }
  .hero-media { flex: none; width: 100%; max-width: 100%; }
  .hero-content { max-width: 100%; }
  .hero h1 { font-size: clamp(1.55rem, 8vw, 2rem); }
  .topbar { height: 60px; padding: 0 12px; gap: 10px; }
  .sidebar { top: 60px; height: calc(100vh - 60px); }
  .hero { padding: 18px; }
  .shopgrid { grid-template-columns: 1fr; }
  .plant { gap: 10px; padding: 12px; }
  .plants { grid-template-columns: 1fr; }
  .pemoji { width: 152px; height: 152px; }
  .plant-sway .strain-badge { width: 36px; height: 36px; }
  .plant-group { padding: 8px; }
  .pagehead { align-items: flex-start; }
}
