:root {
  --bg0: #07080a;
  --bg1: #101218;
  --card: #16181e;
  --line: rgba(180, 200, 220, .10);
  --text: #e8eef5;
  --mute: #8a96a8;
  --acc: #9ec4e8;
  --acc2: #5ecf9a;
  --warn: #ffb05c;
  --danger: #ff6b6b;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 58px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0c1018 0%, #07080a 55%, #050608 100%);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.app-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  position: relative;
  z-index: 2;
}
#main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}
body[data-weather="gloom"] {
  background: linear-gradient(180deg, #08090c 0%, #040506 100%);
  filter: saturate(.72) brightness(.92);
}
body[data-weather="rain"],
body[data-weather="storm"] {
  background: linear-gradient(180deg, #0a0e14 0%, #06080c 100%);
}
body[data-weather="embers"] {
  background: linear-gradient(180deg, #1a0e0a 0%, #0a0605 55%, #050304 100%);
}
body[data-weather="matrix"] {
  background: linear-gradient(180deg, #040a06 0%, #020403 100%);
}
body[data-weather="neon"] {
  background: linear-gradient(180deg, #0a0614 0%, #05040a 100%);
}
body[data-weather="fog"] {
  background: linear-gradient(180deg, #12151c 0%, #0a0c10 100%);
}
body[data-weather="stars"] {
  background: linear-gradient(180deg, #050812 0%, #02040a 100%);
}
body[data-weather="confetti"] {
  background: linear-gradient(180deg, #101018 0%, #08080e 100%);
}
body[data-weather="petals"] {
  background: linear-gradient(180deg, #140e12 0%, #0a0709 100%);
}
.mono, .code, .pill.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
  font-weight: 700;
  letter-spacing: 0 !important;
  font-stretch: normal;
  font-synthesis: none;
  transform: none !important;
  text-transform: none;
}
.weather {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.weather .flake,
.weather .drop,
.weather .p,
.weather .bolt,
.weather .fogball,
.weather .star,
.weather .orb,
.weather .petal {
  position: absolute;
  top: -12px;
  color: rgba(235, 245, 255, .92);
  animation: fall linear infinite;
  font-size: 12px;
  opacity: .78;
  user-select: none;
  will-change: transform, opacity;
  text-shadow: 0 0 6px rgba(180, 210, 255, .35);
}
.weather .drop {
  width: 1.5px;
  height: 14px;
  background: linear-gradient(180deg, rgba(180,210,255,.05), rgba(160,190,230,.55));
  color: transparent;
  border-radius: 1px;
  text-shadow: none;
}
.weather .drop.heavy {
  width: 2px; height: 18px;
  background: linear-gradient(180deg, transparent, rgba(170,200,255,.7));
  animation-name: fallHard;
}
.weather .ember {
  top: auto; bottom: -10px;
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle, #ffd080 0%, #ff6a2a 55%, transparent 70%);
  box-shadow: 0 0 10px rgba(255,120,40,.55);
  animation: riseEmber linear infinite;
  color: transparent; text-shadow: none;
}
.weather .bit {
  top: -20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 700;
  color: #3dff8a;
  text-shadow: 0 0 8px rgba(61,255,138,.55);
  animation: fallMatrix linear infinite;
}
.weather .conf {
  width: 7px; height: 10px; border-radius: 2px;
  color: transparent; text-shadow: none;
  animation: fallSpin linear infinite;
}
.weather .fogball {
  top: 20%;
  width: 140px; height: 70px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(180,200,220,.14), transparent 70%);
  filter: blur(8px);
  animation: driftFog ease-in-out infinite;
  color: transparent; text-shadow: none;
}
.weather .star {
  top: auto;
  width: 3px; height: 3px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,.85);
  animation: twinkle ease-in-out infinite;
  color: transparent; text-shadow: none;
}
.weather .shoot {
  top: -5%;
  width: 70px; height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  border-radius: 2px;
  animation: shoot linear infinite;
  color: transparent; text-shadow: none;
  transform-origin: left center;
}
.weather .orb {
  top: auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,120,255,.85), rgba(80,160,255,.1) 70%, transparent);
  box-shadow: 0 0 18px rgba(180,100,255,.45);
  animation: floatOrb ease-in-out infinite;
  color: transparent; text-shadow: none;
}
.weather .petal {
  font-size: 14px;
  animation: fallDrift linear infinite;
  filter: saturate(1.2);
}
.weather .bolt {
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background: rgba(220,235,255,.0);
  animation: flashBolt 5s ease-in-out infinite;
  color: transparent; text-shadow: none;
}
body[data-weather="gloom"] .weather::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, transparent 30%, rgba(0,0,0,.45) 100%),
    linear-gradient(180deg, rgba(20,30,50,.2), rgba(0,0,0,.35));
}
@keyframes fall {
  0% { transform: translateY(-10px) translateX(0); opacity: 0; }
  10% { opacity: .7; }
  100% { transform: translateY(110vh) translateX(18px); opacity: 0; }
}
@keyframes fallHard {
  0% { transform: translateY(-10px) translateX(0) rotate(12deg); opacity: 0; }
  8% { opacity: .85; }
  100% { transform: translateY(115vh) translateX(-24px) rotate(12deg); opacity: 0; }
}
@keyframes riseEmber {
  0% { transform: translateY(0) translateX(0) scale(.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-110vh) translateX(30px) scale(.2); opacity: 0; }
}
@keyframes fallMatrix {
  0% { transform: translateY(-20px); opacity: 0; }
  8% { opacity: .9; }
  100% { transform: translateY(110vh); opacity: 0; }
}
@keyframes fallSpin {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}
@keyframes driftFog {
  0%, 100% { transform: translateX(-20px) scale(1); opacity: .35; }
  50% { transform: translateX(40px) scale(1.15); opacity: .55; }
}
@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.35); }
}
@keyframes shoot {
  0% { transform: translate(-10vw, 0) rotate(18deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate(110vw, 55vh) rotate(18deg); opacity: 0; }
}
@keyframes floatOrb {
  0%, 100% { transform: translateY(0) scale(1); opacity: .55; }
  50% { transform: translateY(-28px) scale(1.15); opacity: .95; }
}
@keyframes fallDrift {
  0% { transform: translateY(-10px) translateX(0) rotate(0deg); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: translateY(110vh) translateX(60px) rotate(260deg); opacity: 0; }
}
@keyframes flashBolt {
  0%, 88%, 92%, 96%, 100% { background: rgba(220,235,255,0); }
  90%, 94% { background: rgba(220,235,255,.18); }
}
.top, .toast, .err { position: relative; z-index: 2; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; gap: 8px; flex-shrink: 0;
}
.top-right { display: flex; align-items: center; gap: 6px; }
.bell {
  position: relative; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text);
  border-radius: 10px; width: 36px; height: 36px;
  font-size: .95rem; cursor: pointer; font-family: inherit;
}
.bell-n {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #e04555; color: #fff;
  font-size: .58rem; font-weight: 800; display: grid; place-items: center;
}
.notif-screen { padding-bottom: 8px; }
.notif-screen-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.notif-screen-head h2 {
  margin: 0; font-family: Syne, Manrope, sans-serif;
  font-weight: 800; font-size: 1.15rem;
}
.notif-readall {
  border: 1px solid var(--line); background: transparent; color: var(--mute);
  border-radius: 8px; padding: 6px 10px; font-family: inherit;
  font-size: .68rem; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.notif-list { display: flex; flex-direction: column; gap: 7px; }
.notif-item {
  display: flex; align-items: stretch; gap: 4px;
  border: 1px solid rgba(180,200,220,.1);
  background: linear-gradient(180deg, #1a1e28, #12151c); color: var(--text);
  border-radius: 14px; padding: 4px 4px 4px 0; font-family: inherit;
}
.notif-item.unread {
  border-color: rgba(94,207,154,.4);
  box-shadow: inset 3px 0 0 rgba(94,207,154,.55);
}
.notif-main {
  flex: 1; min-width: 0; text-align: left;
  border: 0; background: transparent; color: inherit;
  padding: 10px 8px 10px 13px; cursor: pointer; font-family: inherit;
}
.notif-item b { display: block; font-size: .84rem; margin-bottom: 5px; }
.notif-item .notif-body {
  display: block; font-size: .72rem; color: var(--mute);
  line-height: 1.45; white-space: pre-wrap;
}
.notif-del {
  flex-shrink: 0; width: 36px; border: 0; background: transparent;
  color: var(--mute); font-size: 1.15rem; font-weight: 700;
  cursor: pointer; border-radius: 10px; font-family: inherit;
}
.notif-del:active { color: #e04555; background: rgba(224,69,85,.12); }
.back-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: .72rem;
  cursor: pointer;
  flex-shrink: 0;
}
.back-btn[hidden] { display: none; }
.brand {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em;
  flex: 1; min-width: 0;
}
.brand span { color: var(--acc2); }
.pill {
  font-size: .72rem; font-weight: 700; color: var(--acc);
  border: 1px solid rgba(158,196,232,.28);
  background: rgba(158,196,232,.08);
  padding: 6px 11px; border-radius: 999px; max-width: 46vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .01em; line-height: 1.2;
  flex-shrink: 0;
}
.pill.mono {
  font-size: .74rem;
  letter-spacing: .02em !important;
}
.home-wallet {
  border-radius: 16px;
  border: 1px solid rgba(180, 200, 220, .14);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(158,196,232,.12), transparent 45%),
    linear-gradient(155deg, #1c2534, #0e121a 72%);
  padding: 12px 14px; margin-bottom: 8px;
}
.hw-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hw-label { color: var(--mute); font-size: .68rem; font-weight: 600; }
.hw-bal {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em;
  margin-top: 2px;
  background: linear-gradient(180deg, #f2f7fc, #9ec4e8);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hw-lvl { text-align: right; min-width: 78px; }
.hw-lvl .xp-track.slim { margin-top: 6px; height: 5px; }
.hw-lvl .xp-txt { margin-top: 3px; font-size: .58rem; text-align: right; }
.hw-meta {
  margin-top: 8px; font-size: .68rem; color: var(--mute);
  font-family: "JetBrains Mono", monospace; line-height: 1.35;
}
.lvl-badge {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  min-width: 68px;
  padding: 5px 10px 6px;
  border-radius: 10px;
  background: rgba(78, 184, 201, .12);
  border: 1px solid rgba(78, 184, 201, .42);
  color: #bfeef5;
  line-height: 1;
  vertical-align: top;
  box-sizing: border-box;
}
.lvl-badge .lvl-k {
  font-family: Manrope, sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(191, 238, 245, .72);
  transform: none;
}
.lvl-badge .lvl-n {
  font-family: "JetBrains Mono", monospace;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #e7f8fb;
  font-variant-numeric: tabular-nums;
}
.xp-track {
  height: 7px; border-radius: 999px; overflow: hidden; margin-top: 10px;
  background: rgba(0,0,0,.4); border: 1px solid var(--line);
}
.xp-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #5a84b0, #b6d6f5);
  transition: width .35s ease;
}
.xp-txt {
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem; color: var(--mute); margin-top: 5px; text-align: right;
}
.home-next { margin-bottom: 8px; }
.home-tip {
  font-size: .8rem; line-height: 1.4; font-weight: 700; color: #d5deea;
  padding: 12px 13px; border-radius: 14px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(78,184,201,.10), transparent 55%),
    rgba(158,196,232,.06);
  border: 1px solid rgba(180,200,220,.14);
}
.home-tip.tip-ok { border-color: rgba(90,200,140,.35); color: #b8e0c8; }
.home-tip.tip-hot { border-color: rgba(230,170,80,.4); color: #e8d4a8; }
.home-row2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px; width: 100%;
}
.home-clan-bar {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 0 0 10px; padding: 12px 13px; text-align: left;
  border: 1px solid rgba(180, 200, 220, .12);
  background: linear-gradient(160deg, #1a2230, #12161e);
  border-radius: 14px; color: var(--text); font-family: inherit; cursor: pointer;
}
.home-clan-bar:active { transform: scale(.98); }
.home-clan-bar .hcb-l { min-width: 0; }
.ht-k { font-size: .62rem; font-weight: 700; color: var(--mute); letter-spacing: .03em; text-transform: uppercase; }
.ht-v { font-size: .88rem; font-weight: 800; margin-top: 2px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-s { font-size: .7rem; color: var(--mute); font-weight: 600; white-space: nowrap; }
.home-pulse {
  display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.home-pulse:empty { display: none; }
.home-pulse span {
  flex: 1 0 auto; min-width: 88px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(180,200,220,.08);
}
.home-pulse b {
  font-family: "JetBrains Mono", monospace;
  font-size: .78rem; font-weight: 700; color: var(--acc2);
}
.home-pulse i {
  font-style: normal; color: var(--mute); font-size: .58rem; font-weight: 600;
}
.home-sec { margin-bottom: 4px; }
.home-sec-h {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 0 5px;
}
.home-sec-h h2 { margin: 0; }
.linkish {
  border: none; background: none; color: var(--acc);
  font-family: inherit; font-size: .72rem; font-weight: 700;
  cursor: pointer; padding: 4px 2px;
}
.empty.soft { opacity: .7; font-size: .74rem; padding: 10px; }
.mcard.compact { padding: 8px 10px; }
h2 {
  font-size: .78rem; margin: 10px 0 6px; font-weight: 800;
  letter-spacing: .02em; color: #c8d4e2;
}
.home-hub { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.home-hub:empty { display: none; }
.hub-event, .hub-contract {
  width: 100%; text-align: left; cursor: pointer;
  border-radius: 12px; padding: 10px 12px;
  font-family: inherit; color: var(--text);
  border: 1px solid rgba(180, 200, 220, .12);
  background: linear-gradient(160deg, #1a2230, #12161e);
}
.hub-event {
  font-size: .78rem; font-weight: 700;
  border-color: rgba(90, 200, 140, .28);
  background: linear-gradient(160deg, #1a2a24, #121a16);
  color: #c8ecd8;
}
.hub-event[hidden], .hub-contract[hidden] { display: none !important; }
.hub-contract .hc-top {
  display: flex; justify-content: space-between; gap: 8px;
  align-items: baseline; margin-bottom: 7px;
}
.hub-contract .hc-title {
  font-size: .74rem; font-weight: 800; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-contract .hc-meta {
  flex-shrink: 0; font-size: .62rem; font-weight: 700;
  font-family: "JetBrains Mono", monospace; color: var(--mute);
}
.hub-contract .hc-bar {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(0,0,0,.35); border: 1px solid var(--line);
}
.hub-contract .hc-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #2f8fa3, #4eb8c9);
  transition: width .3s ease;
}
.hub-contract.done .hc-bar i {
  background: linear-gradient(90deg, #2fbf78, #4adf9a);
}
.home-actions {
  display: grid; grid-template-columns: 1fr; gap: 7px;
  margin: 0 0 10px;
}
.home-actions .home-create {
  width: 100%; margin: 0;
  background: linear-gradient(180deg, #3aa9bc 0%, #2a7f92 100%);
  color: #061218;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 3px 0 rgba(0,0,0,.28);
}
.home-actions .home-create .create-cta-title { font-size: .92rem; }
.home-actions .ha-soft {
  border: 1px solid rgba(180, 200, 220, .12);
  background: linear-gradient(180deg, #1a1e28, #14171e);
  color: var(--text); border-radius: 12px; padding: 11px 10px;
  font-family: inherit; font-weight: 800; font-size: .78rem; cursor: pointer;
}
.home-actions .ha-soft.go {
  border-color: rgba(94,207,154,.35);
  background: linear-gradient(180deg, #1f3a30, #152820);
  color: #b8f0d0;
}
.home-actions button.dim { opacity: .45; }
.home-actions .ha-soft:active { transform: scale(.97); }
.more-hub {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;
}
.more-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  border: 1px solid rgba(180, 200, 220, .12);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(78,184,201,.10), transparent 55%),
    linear-gradient(180deg, #1c222c, #141820);
  color: var(--text);
  border-radius: 14px; padding: 12px 11px; font-family: inherit;
  text-align: left; cursor: pointer;
  min-height: 78px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.more-card:active { transform: scale(.97); }
.more-card .ico { font-size: 1.15rem; line-height: 1; }
.more-card .lab { font-weight: 800; font-size: .78rem; }
.more-card .st {
  font-size: .62rem; font-weight: 700; color: var(--mute);
  font-family: "JetBrains Mono", monospace;
}
.more-card .st.go { color: var(--acc2); }
.more-card .st.warn { color: var(--warn); }
.more-card.wide { grid-column: 1 / -1; }
.more-detail {
  border: 1px solid rgba(180, 200, 220, .12);
  background: linear-gradient(180deg, #171b24, #12151c);
  border-radius: 14px; padding: 14px; margin-bottom: 8px;
}
.more-detail:empty { display: none; }
.more-detail .md-h { font-weight: 800; font-size: .92rem; margin: 0 0 6px; }
.more-detail .md-p { color: var(--mute); font-size: .78rem; line-height: 1.45; margin: 0 0 10px; }
.more-detail .md-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: "JetBrains Mono", monospace; font-size: .78rem; margin-bottom: 6px;
}
.more-detail .cta-mini {
  width: 100%; margin-top: 8px; border: 0; border-radius: 12px;
  padding: 11px 12px; font-family: inherit; font-weight: 800;
  background: linear-gradient(180deg, #3aa9bc, #2a7f92); color: #061218; cursor: pointer;
}
.more-detail .cta-mini:disabled { opacity: .45; }
.create-cta {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; padding: 12px 14px; margin-bottom: 8px; border: none;
  border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, #7eb6e8 0%, #4f8fc4 100%);
  color: #061018;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 0 rgba(0,0,0,.25);
}
.create-cta-title { font-family: inherit; font-weight: 800; font-size: .9rem; }
.create-cta-hint {
  font-size: .65rem; font-weight: 600; opacity: .78;
  font-family: "JetBrains Mono", monospace;
}
.create-cta:active { transform: scale(.985); opacity: .95; }
.list { display: flex; flex-direction: column; gap: 6px; }
.deal, .mcard, .shop-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 11px;
  background: linear-gradient(180deg, #1a1d25, #14161c);
  border: 1px solid rgba(180, 200, 220, .11);
  border-radius: 12px;
}
.deal .l, .mcard .l, .shop-item .l {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1;
}
.deal .l b, .mcard .l b, .shop-item .l b { font-size: .84rem; font-weight: 700; }
.deal small, .mcard small, .shop-item small {
  color: var(--mute); font-size: .68rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0;
}
.deal .r, .shop-item .r {
  font-family: "JetBrains Mono", monospace;
  color: var(--acc2); font-weight: 700; font-size: .84rem; white-space: nowrap;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(94,207,154,.08);
}
.mcard .art {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1f2937, #334155);
}
.mcard .art img { width: 28px; height: 28px; }
.mcard .meta { text-align: right; }
.mcard .meta .bal {
  font-family: "JetBrains Mono", monospace; color: var(--acc2);
  font-weight: 700; font-size: .8rem;
}
.mcard .meta .ch { color: var(--warn); font-size: .68rem; }
.mcard { cursor: pointer; }
.shop-item button {
  border: 0; border-radius: 10px; padding: 8px 10px;
  background: linear-gradient(135deg, #6a90b8, #9ec4e8);
  color: #0a1018; font-weight: 800; font-size: .72rem;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.shop-item button:disabled { opacity: .45; }
.shop-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.shop-bal {
  font-family: "JetBrains Mono", monospace; font-weight: 700;
  color: var(--acc2); font-size: 1.05rem;
}
.shop-back {
  border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--text); border-radius: 10px; padding: 7px 10px;
  font-family: inherit; font-weight: 700; font-size: .72rem; cursor: pointer;
}
.shop-back[hidden] { display: none; }
.shop-tip {
  margin: 0 0 8px; padding: 9px 11px; border-radius: 12px;
  font-size: .74rem; line-height: 1.35; color: #b8e0c8;
  background: rgba(90, 200, 140, .08);
  border: 1px solid rgba(90, 200, 140, .28);
}
.shop-tip[hidden] { display: none; }
.shop-grid.hub {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.shop-tile {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 14px 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, #2a3340 0%, #1c2430 100%);
  color: var(--text); font-family: inherit; font-weight: 800; font-size: .82rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.25);
  text-align: left;
}
.shop-tile .st-ico {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(78,184,201,.12); border: 1px solid rgba(78,184,201,.22);
}
.shop-tile .st-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-tile .st-t { font-size: .8rem; font-weight: 800; }
.shop-tile .st-h { font-size: .62rem; font-weight: 600; color: var(--mute); line-height: 1.25; }
.shop-tile .st-badge {
  flex-shrink: 0; font-size: .58rem; font-weight: 800;
  padding: 4px 7px; border-radius: 999px;
  background: rgba(74, 223, 154, .16); color: #9be7c0;
  border: 1px solid rgba(74, 223, 154, .35);
}
.shop-grid.list { display: flex; flex-direction: column; gap: 8px; }
.shop-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: 14px;
  background: linear-gradient(180deg, #1c2230, #141922);
  border: 1px solid rgba(180,200,220,.12);
}
.shop-card.muted { opacity: .7; }
.shop-card .sc-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.25rem;
  background: rgba(78,184,201,.1); border: 1px solid rgba(78,184,201,.2);
}
.shop-card .sc-body { flex: 1; min-width: 0; }
.shop-card .sc-body b { display: block; font-size: .86rem; font-weight: 800; }
.shop-card .sc-body small {
  display: block; margin-top: 2px; color: var(--mute);
  font-size: .66rem; font-family: "JetBrains Mono", monospace;
}
.shop-card .sc-body p {
  margin: 5px 0 0; color: #b7c4d4; font-size: .72rem; line-height: 1.35;
}
.shop-card .sc-buys {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.sc-buy {
  border: 0; border-radius: 10px; padding: 8px 10px; cursor: pointer;
  background: linear-gradient(135deg, #3aa9bc, #4eb8c9);
  color: #061218; font-weight: 800; font-size: .72rem; font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 rgba(0,0,0,.25);
}
.sc-buy.solo { align-self: center; flex-shrink: 0; }
.sc-buy:active { transform: scale(.97); }
.pop { animation: popIn .35s ease both; }
.shop-grid.hub .shop-tile:nth-child(2) { animation-delay: .04s; }
.shop-grid.hub .shop-tile:nth-child(3) { animation-delay: .08s; }
.shop-grid.hub .shop-tile:nth-child(4) { animation-delay: .12s; }
.shop-grid.list .shop-card:nth-child(2) { animation-delay: .05s; }
.shop-grid.list .shop-card:nth-child(3) { animation-delay: .1s; }
.shop-grid.list .shop-card:nth-child(4) { animation-delay: .15s; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.shop-tile .st-a { color: var(--acc2); font-size: 1rem; }
.shop-tile:active { transform: scale(.97); }
.shop-grid.list {
  display: flex; flex-direction: column; gap: 6px;
}
.shop-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 12px; border-radius: 12px;
  background: linear-gradient(180deg, #1a1d25, #14161c);
  border: 1px solid rgba(180, 200, 220, .11);
  color: var(--text); font-family: inherit; width: 100%;
  text-align: left; cursor: default;
}
button.shop-row { cursor: pointer; }
.shop-row .l { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.shop-row .l b { font-size: .82rem; font-weight: 800; }
.shop-row .l small { color: var(--mute); font-size: .66rem; }
.shop-row.muted { opacity: .7; }
.shop-row .tag {
  font-size: .68rem; font-weight: 800; color: var(--mute);
  padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.05);
}
.shop-row button[data-buy] {
  border: 0; border-radius: 10px; padding: 8px 10px;
  background: linear-gradient(135deg, #6a90b8, #9ec4e8);
  color: #0a1018; font-weight: 800; font-size: .72rem;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.tabs {
  display: flex; gap: 4px; overflow-x: auto; margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.tabs[hidden] { display: none; }
.tabs button {
  flex: 0 0 auto; border: 1px solid var(--line); background: transparent;
  color: var(--mute); border-radius: 999px; padding: 6px 10px;
  font-family: inherit; font-weight: 700; font-size: .68rem; cursor: pointer;
}
.tabs button.on {
  background: rgba(158,196,232,.14); color: var(--acc);
  border-color: rgba(158,196,232,.35);
}
.panel {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: var(--card); font-size: .92rem; line-height: 1.5;
  color: #c5d0db; white-space: pre-wrap;
}
.panel.big { font-size: 1rem; line-height: 1.55; padding: 16px; min-height: 48vh; }
.panel:empty { display: none; }
.help-hero {
  position: relative; overflow: hidden;
  border: 1px solid rgba(180, 200, 220, .12);
  border-radius: 16px; padding: 14px 14px 12px; margin-bottom: 10px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(78,184,201,.16), transparent 55%),
    linear-gradient(155deg, #1a2230, #10141c 72%);
}
.help-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.06) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: helpShine 3.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes helpShine {
  0%, 55% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}
.help-hero-title {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800; font-size: 1.15rem; margin-bottom: 4px;
  background: linear-gradient(90deg, #e8f6fa, #9fd7e4 55%, #e8f6fa);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: helpTextFlow 5s linear infinite;
}
@keyframes helpTextFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.help-hero-lead {
  color: var(--mute); font-size: .78rem; line-height: 1.45; max-width: 36ch;
}
.help-tabs { margin-bottom: 10px; }
.help-panel { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.help-card {
  border: 1px solid rgba(180, 200, 220, .12);
  border-radius: 14px; padding: 12px 13px;
  background: linear-gradient(180deg, #171b24, #12151c);
  opacity: 0; transform: translateY(8px);
  animation: helpReveal .42s ease forwards;
  animation-delay: var(--d, 0s);
}
.help-card.reveal { will-change: transform, opacity; }
@keyframes helpReveal {
  to { opacity: 1; transform: translateY(0); }
}
.help-card.tone-warn {
  border-color: rgba(232, 176, 98, .28);
  background: linear-gradient(180deg, #241c14, #16120e);
}
.help-card.tone-ok {
  border-color: rgba(94, 207, 154, .16);
}
.hc-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.hc-ico {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(78,184,201,.12); font-size: .85rem;
}
.hc-top b { font-size: .86rem; font-weight: 800; }
.hc-list {
  margin: 0; padding: 0 0 0 1.05rem;
  color: #c9d5e2; font-size: .78rem; line-height: 1.45;
}
.hc-list li { margin-bottom: 4px; }
.hc-list li::marker { color: rgba(158,196,232,.55); }
.hc-body {
  white-space: pre-wrap; color: #c9d5e2; font-size: .8rem; line-height: 1.5;
}
.help-foot {
  margin-top: 2px; padding: 10px 12px; border-radius: 12px;
  font-size: .72rem; color: var(--mute);
  border: 1px dashed rgba(180, 200, 220, .18);
  opacity: 0; animation: helpReveal .42s ease forwards;
  animation-delay: .35s;
}
body[data-weather="aurora"] #weather { opacity: .45; }
body[data-weather="aurora"]::before,
body[data-weather="neon"]::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
body[data-weather="aurora"]::before {
  background:
    radial-gradient(60% 40% at 20% 10%, rgba(78,184,201,.20), transparent 60%),
    radial-gradient(50% 35% at 80% 20%, rgba(120,140,255,.16), transparent 55%),
    radial-gradient(40% 30% at 50% 90%, rgba(94,207,154,.12), transparent 50%);
  animation: auroraShift 10s ease-in-out infinite alternate;
}
body[data-weather="neon"]::before {
  background:
    radial-gradient(45% 35% at 15% 20%, rgba(255,60,200,.16), transparent 60%),
    radial-gradient(40% 30% at 85% 25%, rgba(60,180,255,.14), transparent 55%),
    radial-gradient(35% 28% at 50% 85%, rgba(180,80,255,.12), transparent 50%);
  animation: neonPulse 4.5s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  from { filter: hue-rotate(0deg) saturate(1); transform: scale(1); }
  to { filter: hue-rotate(28deg) saturate(1.15); transform: scale(1.04); }
}
@keyframes neonPulse {
  from { filter: hue-rotate(0deg) brightness(1); opacity: .85; }
  to { filter: hue-rotate(40deg) brightness(1.2); opacity: 1; }
}
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.rank-row .n {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: .75rem;
  background: rgba(158,196,232,.12); color: var(--acc);
}
.rank-row .l { flex: 1; min-width: 0; }
.rank-row .l b {
  display: block; font-size: .95rem; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-row .l small { color: var(--mute); font-size: .72rem; }
.rank-row .r {
  font-family: "JetBrains Mono", monospace;
  color: var(--acc2); font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.mgmt-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0;
}
.mgmt-grid button, .sub-actions button {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 12px; padding: 12px 10px; font-family: inherit;
  font-weight: 700; font-size: .82rem; cursor: pointer; text-align: left;
}
.mgmt-grid button:active { transform: scale(.98); }
.clan-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(78,184,201,.12), transparent 50%),
    linear-gradient(155deg, #1a2230, #10141c 70%);
  margin-bottom: 10px;
}
.clan-card .h {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800; font-size: 1.15rem; margin-bottom: 4px;
}
.clan-card .meta { color: var(--mute); font-size: .78rem; margin-bottom: 10px; }
.clan-card .statline {
  font-size: .88rem; line-height: 1.55; color: #d5deea;
}
.clan-tip {
  margin-bottom: 8px; padding: 10px 12px; border-radius: 12px;
  font-size: .76rem; font-weight: 700; line-height: 1.35; color: #c8ecd8;
  border: 1px solid rgba(90, 200, 140, .25);
  background: linear-gradient(160deg, #1a2a24, #121a16);
}
.clan-quick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px;
}
.clan-quick button {
  border: 1px solid rgba(180,200,220,.14); background: #1c2630; color: var(--text);
  border-radius: 10px; padding: 9px 8px; font-family: inherit;
  font-weight: 700; font-size: .72rem; cursor: pointer;
}
.clan-donate-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin: 0 0 8px;
}
.clan-donate-row .donate-p {
  border: 1px solid rgba(94,207,154,.22);
  background: rgba(94,207,154,.08); color: var(--acc2);
  border-radius: 10px; padding: 9px 4px; font-family: inherit;
  font-weight: 800; font-size: .72rem; cursor: pointer;
}
.mgmt-grid .act-hint {
  display: block; font-size: .62rem; font-weight: 600;
  color: var(--mute); line-height: 1.25; margin-top: 2px;
}
.mini-pay {
  margin-left: 4px; border: 1px solid rgba(180,200,220,.2);
  background: #1c2630; color: var(--acc); border-radius: 7px;
  padding: 2px 6px; font-size: .62rem; font-weight: 800; cursor: pointer;
}
.clan-form {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  background: linear-gradient(180deg, #171b24, #12151c);
  margin-bottom: 10px;
}
.clan-form label {
  display: block; font-weight: 800; font-size: .82rem; margin-bottom: 8px;
}
.clan-form input {
  width: 100%; box-sizing: border-box; margin-bottom: 8px;
  border: 1px solid rgba(180, 200, 220, .16);
  background: #0e1218; color: var(--text);
  border-radius: 10px; padding: 10px 11px;
  font-family: inherit; font-size: .85rem;
}
.clan-form .clan-go {
  width: 100%; border: 0; border-radius: 12px; padding: 11px;
  font-family: inherit; font-weight: 800; cursor: pointer;
  background: linear-gradient(180deg, #3aa9bc, #2a7f92); color: #061218;
}
.clan-form .clan-go.soft {
  background: linear-gradient(180deg, #2a3340, #1c232d); color: var(--text);
  border: 1px solid rgba(180, 200, 220, .14);
}
.set-list { display: flex; flex-direction: column; gap: 10px; }
.set-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px;
  background: linear-gradient(180deg, #1a1e28, #14171e);
}
.set-card .sh { font-weight: 800; font-size: .84rem; margin-bottom: 4px; }
.set-card .sd { color: var(--mute); font-size: .72rem; line-height: 1.4; margin-bottom: 10px; }
.set-card .sr {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.set-card .sv {
  font-family: "JetBrains Mono", monospace; font-size: .78rem; font-weight: 700;
}
.set-card button {
  border: 1px solid rgba(180, 200, 220, .14);
  background: #1c2630; color: var(--text);
  border-radius: 10px; padding: 8px 11px;
  font-family: inherit; font-weight: 700; font-size: .72rem; cursor: pointer;
}
.set-card button:disabled { opacity: .4; }
.set-card button.on {
  background: rgba(94,207,154,.14); color: var(--acc2);
  border-color: rgba(94,207,154,.28);
}
.sheet-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: end center;
  background: rgba(0,0,0,.55); padding: 14px;
}
.sheet-modal[hidden] { display: none !important; }
.sheet-modal-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, #1c222c, #12161d);
  border: 1px solid rgba(180, 200, 220, .16);
  border-radius: 16px; padding: 14px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.45);
}
.sheet-modal-title { font-weight: 800; font-size: .95rem; margin-bottom: 4px; }
.sheet-modal-hint { color: var(--mute); font-size: .72rem; margin-bottom: 10px; }
.sheet-modal-card input {
  width: 100%; box-sizing: border-box; margin-bottom: 8px;
  border: 1px solid rgba(180, 200, 220, .16);
  background: #0e1218; color: var(--text);
  border-radius: 10px; padding: 11px 12px;
  font-family: inherit; font-size: .9rem;
}
.sheet-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.sheet-modal-actions button {
  border-radius: 12px; padding: 11px; font-family: inherit; font-weight: 800;
  cursor: pointer; border: 1px solid rgba(180, 200, 220, .14);
}
#sheetCancel { background: #1a2028; color: var(--text); }
#sheetOk { background: linear-gradient(180deg, #3aa9bc, #2a7f92); color: #061218; border: 0; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--acc2); margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(94,207,154,.55);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94,207,154,.45); }
  70% { box-shadow: 0 0 0 8px rgba(94,207,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,207,154,0); }
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.skin {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 10px; cursor: pointer; position: relative;
}
.skin.on { border-color: rgba(94,207,154,.7); }
.skin .lock {
  position: absolute; top: 8px; right: 8px; font-size: .6rem;
  background: rgba(0,0,0,.55); color: var(--mute); padding: 2px 5px; border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
}
.preview { height: 56px; border-radius: 10px; margin-bottom: 8px; }
.skin.mint .preview { background: linear-gradient(135deg, #0f3d36, #5eead4); }
.skin.slate .preview { background: linear-gradient(135deg, #1e293b, #94a3b8); }
.skin.sand .preview { background: linear-gradient(135deg, #3f2e1a, #d4af78); }
.skin.navy .preview { background: linear-gradient(135deg, #0b1f4a, #5b8cff); }
.skin.blood .preview { background: linear-gradient(135deg, #3b0d12, #dc4650); }
.skin.gold .preview { background: linear-gradient(135deg, #3d2e08, #ffc846); }
.skin.ice .preview { background: linear-gradient(135deg, #0e2438, #a0d2ff); }
.skin.ember .preview { background: linear-gradient(135deg, #3a1808, #ff783c); }
.skin.violet .preview { background: linear-gradient(135deg, #24103a, #aa6eff); }
.skin.obsidian .preview { background: linear-gradient(135deg, #121214, #5a5a64); }
.skin.toxic .preview { background: linear-gradient(135deg, #142808, #78ff50); }
.skin.royal .preview { background: linear-gradient(135deg, #2a2208, #ffd778); }
.skin b { display: block; font-size: .8rem; }
.skin span { color: var(--mute); font-size: .65rem; }
.cta {
  width: 100%; margin-top: 10px; border: 0;
  background: linear-gradient(135deg, #6a90b8, #9ec4e8);
  color: #0a1018; border-radius: 12px; padding: 12px;
  font-family: inherit; font-weight: 800; cursor: pointer;
}
.empty {
  text-align: center; color: var(--mute); padding: 20px 10px;
  border: 1px dashed var(--line); border-radius: 12px; font-size: .78rem;
}
.err {
  background: rgba(255,92,106,.12); border: 1px solid rgba(255,92,106,.35);
  color: #ffb4bb; padding: 8px 10px; border-radius: 10px;
  font-size: .72rem; margin-bottom: 8px; display: none;
}
.err.on { display: block; }
.screen { display: none; }
.screen.on { display: block; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.nav {
  position: relative;
  flex-shrink: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin: 0 8px calc(8px + var(--safe-b));
  padding: 6px; border-radius: 18px; height: var(--nav-h);
  background: rgba(10,12,16,.96);
  border: 1px solid rgba(180, 200, 220, .14);
  box-shadow: 0 -4px 24px rgba(0,0,0,.35);
  backdrop-filter: blur(14px); z-index: 20;
}
.nav button {
  border: 0; background: transparent; color: var(--mute);
  font-family: inherit; font-weight: 700; font-size: .72rem;
  border-radius: 12px; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav button.on {
  background: rgba(158,196,232,.16); color: #c5ddf5;
  box-shadow: inset 0 0 0 1px rgba(158,196,232,.2);
}
.nav.hidden { display: none !important; }
body.nav-hidden .nav { display: none !important; }
body.nav-hidden #main { padding-bottom: 16px; }
.skel {
  height: 44px; border-radius: 12px;
  background: #16181e;
  border: 1px solid var(--line);
}
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + var(--safe-b));
  transform: translateX(-50%) translateY(12px); opacity: 0;
  background: #10141c; border: 1px solid var(--line); color: var(--text);
  padding: 8px 12px; border-radius: 10px; font-size: .75rem; font-weight: 600;
  transition: .2s; z-index: 40; pointer-events: none; max-width: 90vw;
  text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.card-sheet {
  position: relative;
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, #161b24, #0a0c10);
  overflow: hidden;
  padding-bottom: calc(72px + var(--safe-b));
  min-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
}
.cover-banner {
  position: relative;
  width: 100%;
  height: min(36vw, 168px);
  min-height: 120px;
  max-height: 180px;
  background: #05070a;
  overflow: hidden;
  flex-shrink: 0;
}
.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  background: #05070a;
}
.left-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  text-align: center;
  background: rgba(6, 8, 12, .92);
  backdrop-filter: blur(6px);
}
.left-overlay[hidden] { display: none; }
.left-icon { font-size: 2.4rem; line-height: 1; }
.left-title {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800; font-size: 1.15rem; color: #ffb4bb;
}
.left-code { font-size: .9rem; color: var(--mute); }
.left-reason {
  margin: 4px 0 8px; max-width: 100%;
  white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: .72rem; color: #c5d0db;
  line-height: 1.35; max-height: 40vh; overflow: auto;
}
.left-overlay .cta { width: auto; min-width: 160px; margin-top: 4px; }
.chance-pill {
  position: absolute; right: 8px; bottom: 8px;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: .75rem;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px); padding: 5px 9px; border-radius: 12px;
  color: var(--warn);
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  line-height: 1.1;
}
.chance-pill .ch-sub {
  font-size: .52rem; font-weight: 600; color: rgba(255,220,160,.75);
  font-family: Manrope, sans-serif;
}
.card-head {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 12px 4px; align-items: flex-start;
}
.card-head .code {
  font-size: .92rem;
  letter-spacing: 0;
}
.card-head .sub { color: var(--mute); font-size: .68rem; margin-top: 1px; }
.card-bal {
  font-family: "JetBrains Mono", monospace; font-weight: 700;
  color: var(--acc2); font-size: .95rem; white-space: nowrap;
}
.card-meta {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px;
}
.chip {
  font-size: .62rem; color: var(--mute); border: 1px solid var(--line);
  padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.03);
}
.sms-box {
  margin: 0 10px 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(91,140,255,.12); border: 1px solid rgba(91,140,255,.25);
  color: #d5e2ff; font-size: .72rem; line-height: 1.35;
}
.sms-label {
  font-size: .6rem; font-weight: 800; color: #9db4ff; margin-bottom: 4px;
  text-transform: uppercase;
}
.sms-body { white-space: pre-wrap; word-break: break-word; }
.feed-item {
  border-radius: 8px; padding: 7px 9px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
}
.feed-title { font-size: .65rem; font-weight: 800; color: var(--acc); margin-bottom: 2px; }
.feed-item.fail .feed-title { color: var(--danger); }
.feed-text {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: .68rem; color: #c5d0db; line-height: 1.3;
}
.phase-bar {
  margin: 0 10px 8px; padding: 8px 12px; border-radius: 12px;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em;
  display: flex; align-items: center; gap: 8px;
}
.phase-bar[hidden] { display: none; }
.phase-bar .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.phase-bar.warm {
  background: rgba(47,143,163,.16); border: 1px solid rgba(78,184,201,.35); color: #9fd8e4;
}
.phase-bar.warm .dot { background: #4eb8c9; box-shadow: 0 0 8px #4eb8c9; }
.phase-bar.ready {
  background: rgba(47,191,120,.14); border: 1px solid rgba(62,207,142,.35); color: #9eecc0;
}
.phase-bar.ready .dot { background: #3ecf8e; box-shadow: 0 0 8px #3ecf8e; }
.phase-bar.approve {
  background: rgba(79,143,196,.18); border: 1px solid rgba(126,182,232,.4); color: #c5ddf5;
}
.phase-bar.approve .dot { background: #7eb6e8; box-shadow: 0 0 8px #7eb6e8; }
.phase-bar.wait {
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--mute);
}
.phase-bar.wait .dot { background: #6a7a8c; }

.card-dock {
  margin-top: auto;
  padding: 8px 10px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.35) 18%, rgba(8,10,14,.92));
  border-top: 1px solid rgba(255,255,255,.06);
}
.sec-lbl {
  font-size: .62rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #7a8799;
  margin: 2px 2px 6px;
}
.sec-lbl[hidden] { display: none; }
.actions-hero {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 8px;
  margin-bottom: 10px;
}
.actions-hero.solo { grid-template-columns: 1fr; }
.act-hero {
  border: none; border-radius: 16px;
  font-family: inherit; font-weight: 800; font-size: .9rem;
  padding: 16px 12px; cursor: pointer; color: #071018;
  background: linear-gradient(180deg, #4adf9a 0%, #2fbf78 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 0 rgba(0,0,0,.28);
}
.act-hero.warm {
  background: linear-gradient(180deg, #4eb8c9 0%, #2f8fa3 100%);
  color: #061218;
}
.act-hero.primary {
  background: linear-gradient(180deg, #8ec4f0 0%, #4f8fc4 100%);
  color: #061018;
}
.act-hero.danger {
  background: linear-gradient(180deg, #ff7a7a 0%, #e04555 100%);
  color: #fff;
}
.act-hero.wait { background: #243041; color: var(--mute); box-shadow: none; }
.act-hero:active { transform: translateY(1px); opacity: .92; }
.act-hero:disabled { opacity: .45; pointer-events: none; }

.tools {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin-bottom: 7px;
}
.tool {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: linear-gradient(180deg, #2c3644 0%, #1a222e 100%);
  color: var(--text);
  font-family: inherit; font-weight: 800; font-size: .78rem;
  padding: 11px 8px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 2px 0 rgba(0,0,0,.3);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center;
}
.tool .t { line-height: 1.15; }
.tool .h {
  font-size: .58rem; font-weight: 600; color: #8a96a8;
  letter-spacing: 0; text-transform: none;
}
.tool:active { transform: scale(.97); }
.tool:disabled { opacity: .4; pointer-events: none; }
.tool.op { border-color: rgba(120,160,255,.28); }
.tool.warm {
  background: linear-gradient(180deg, #2f6f7c 0%, #1e4a54 100%);
  border-color: transparent; color: #dff6fa;
}
.tool.warm .h { color: rgba(223,246,250,.7); }

.risk-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin-bottom: 7px;
}
.risk-row:empty { display: none; margin: 0; }
.risk {
  border: none; border-radius: 14px;
  font-family: inherit; font-weight: 800; font-size: .76rem;
  padding: 12px 8px; cursor: pointer;
  background: linear-gradient(180deg, #3a4558 0%, #252e3c 100%);
  color: #e8eef5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.28);
}
.risk.tap {
  background: linear-gradient(180deg, #3fd48f 0%, #28a86a 100%);
  color: #061810;
}
.risk.danger {
  background: linear-gradient(180deg, #5a3038 0%, #3a2028 100%);
  border: 1px solid rgba(255,107,107,.35); color: #ffb4bb;
}
.risk:active { transform: scale(.97); }
.risk.solo { grid-column: 1 / -1; }

.dock-foot {
  display: flex; align-items: stretch; gap: 7px;
}
.dock-foot:empty { display: none; }
.dock-more {
  flex: 1; border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 11px;
  background: rgba(255,255,255,.04); color: var(--mute);
  font-family: inherit; font-weight: 800; font-size: .74rem; cursor: pointer;
}
.dock-more:active { background: rgba(255,255,255,.08); }
.dock-trash {
  width: 46px; flex-shrink: 0;
  border: 1px solid rgba(255,107,107,.3);
  border-radius: 12px; padding: 11px 0;
  background: rgba(90,48,56,.35); color: #ffb4bb;
  font-size: .95rem; cursor: pointer;
}
.dock-trash:active { transform: scale(.96); }

.more-sheet {
  position: absolute; inset: 0; z-index: 6;
  background: rgba(6,8,12,.94);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  padding: 12px 12px calc(16px + var(--safe-b));
}
.more-sheet[hidden] { display: none; }
.more-sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.more-sheet-head b {
  font-family: Syne, Manrope, sans-serif; font-size: 1.05rem;
}
.more-sheet-head button {
  border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--text); border-radius: 10px; padding: 7px 12px;
  font-family: inherit; font-weight: 700; font-size: .75rem; cursor: pointer;
}
.more-sheet-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  overflow-y: auto; flex: 1;
  align-content: start;
}
.more-sheet-grid .tool {
  padding: 14px 8px; font-size: .8rem;
  min-height: 0;
}
.more-sheet-grid .tool.wide { grid-column: 1 / -1; }
.more-sheet-grid .tool.art {
  padding: 0;
  gap: 0;
  overflow: hidden;
  align-items: stretch;
  background: linear-gradient(180deg, #1c2430 0%, #121820 100%);
  border: 1px solid rgba(180, 200, 220, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 3px 0 rgba(0,0,0,.35);
  transition: transform .12s ease, border-color .15s ease;
}
.more-sheet-grid .tool.art:active { transform: scale(.97); }
.more-sheet-grid .tool.art .art {
  display: grid; place-items: center;
  width: 100%;
  aspect-ratio: 1.15 / 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(78,184,201,.18), transparent 62%),
    linear-gradient(180deg, #1a3038 0%, #101820 100%);
}
.more-sheet-grid .tool.art .art .glyph {
  font-size: 2.15rem;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
  animation: glyphPop .55s ease both;
}
@keyframes glyphPop {
  from { opacity: 0; transform: translateY(6px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.more-sheet-grid .tool.art.tone-warm .art {
  background:
    radial-gradient(90% 70% at 50% 28%, rgba(78,184,201,.28), transparent 60%),
    linear-gradient(180deg, #234850 0%, #132228 100%);
}
.more-sheet-grid .tool.art.tone-op .art {
  background:
    radial-gradient(90% 70% at 50% 28%, rgba(120,160,255,.22), transparent 60%),
    linear-gradient(180deg, #243048 0%, #141c2a 100%);
}
.more-sheet-grid .tool.art .t {
  padding: 9px 10px 2px;
  font-size: .8rem;
  line-height: 1.2;
  font-weight: 800;
}
.more-sheet-grid .tool.art .h {
  padding: 0 10px 11px;
  font-size: .62rem;
  font-weight: 600;
  color: rgba(200, 214, 226, .72);
}
.more-sheet-grid .tool.art.tone-warm {
  border-color: rgba(120, 200, 210, .22);
  color: #e7f8fb;
}
.home-actions .home-create {
  animation: ctaPulse 2.6s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 3px 0 rgba(0,0,0,.28); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 3px 0 rgba(0,0,0,.28), 0 0 0 4px rgba(78,184,201,.12); }
}

.actions { display: none; }
.act { display: none; }

.feed { margin: 0 10px 8px; display: flex; flex-direction: column; gap: 5px; max-height: 72px; overflow: auto; }

.fx { pointer-events: none; position: fixed; inset: 0; z-index: 50; overflow: hidden; }
.fx .coin {
  position: absolute; font-size: 16px; animation: rise 800ms ease-out forwards; opacity: 0;
}
@keyframes rise {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-100px) scale(1.05); opacity: 0; }
}
.fx.flash::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(94,207,154,.12); animation: flash .3s ease;
}
.fx.flash-bad::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(255,92,106,.15); animation: flash .3s ease;
}
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.card-sheet.shake { animation: shake .3s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (min-width: 420px) {
  .cover-banner { height: min(32vw, 180px); min-height: 140px; }
}
@media (max-height: 640px) {
  .cover-banner { height: min(28vw, 120px); min-height: 96px; }
  .act-hero { padding: 13px 10px; font-size: .84rem; }
}
