/* Telegram neon — VolMafia panel */
:root {
  --bg: #070b12;
  --bg2: #0c1420;
  --card: rgba(12, 22, 36, .88);
  --line: rgba(42, 171, 238, .28);
  --blue: #2aabee;
  --blue2: #1a8ad4;
  --cyan: #5ad4ff;
  --text: #e8f4ff;
  --mute: #7f9bb0;
  --ok: #5ee0a8;
  --warn: #ffb020;
  --danger: #ff5a7a;
  --bubble: #182533;
  --tg: #2aabee;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Outfit", "Manrope", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(42, 171, 238, .22), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(0, 200, 255, .12), transparent 50%),
    radial-gradient(600px 300px at 80% 100%, rgba(42, 171, 238, .08), transparent 45%),
    linear-gradient(180deg, #070b12, #0a1220 45%, #070b12);
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(42, 171, 238, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 171, 238, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  z-index: 0;
}
.orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orbs i {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: .45;
  animation: drift 16s ease-in-out infinite;
}
.orbs i:nth-child(1) { width: 280px; height: 280px; left: -40px; top: 10%; background: #2aabee; }
.orbs i:nth-child(2) { width: 220px; height: 220px; right: 8%; top: 40%; background: #5ad4ff; animation-delay: -6s; }
.orbs i:nth-child(3) { width: 180px; height: 180px; left: 40%; bottom: -40px; background: #1a8ad4; animation-delay: -11s; }
@keyframes drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(24px,-18px) scale(1.08); }
}
a { color: var(--cyan); text-decoration: none; }
h1, h2, h3 { font-family: "Sora", "Outfit", sans-serif; letter-spacing: .04em; margin: 0 0 .7rem; font-weight: 700; }
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.side {
  padding: 28px 18px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 18, 32, .95), rgba(6, 12, 22, .9));
  backdrop-filter: blur(16px);
}
.brand {
  font-family: "Sora", sans-serif; color: var(--cyan); font-size: 1.4rem; font-weight: 800;
  text-shadow: 0 0 22px rgba(42, 171, 238, .65); letter-spacing: .12em;
}
.brand small {
  display: block; color: var(--mute); font-family: Outfit, sans-serif; font-size: .68rem;
  letter-spacing: .22em; text-transform: uppercase; font-weight: 500; text-shadow: none; margin-top: 4px;
}
.nav { margin-top: 28px; display: flex; flex-direction: column; gap: 6px; }
.nav a { color: var(--text); padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; transition: .15s ease; }
.nav a:hover, .nav a.on {
  border-color: var(--line); background: rgba(42, 171, 238, .12);
  box-shadow: inset 0 0 16px rgba(42, 171, 238, .14), 0 0 18px rgba(42, 171, 238, .08); color: var(--cyan);
}
.main { padding: 28px 32px 60px; position: relative; z-index: 1; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.who { color: var(--mute); font-size: .9rem; }
.who b { color: var(--cyan); }
.langs a { margin-left: 8px; opacity: .65; }
.langs a.on { opacity: 1; color: var(--cyan); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
  box-shadow: 0 0 32px rgba(42, 171, 238, .08); backdrop-filter: blur(10px);
}
.card .k { color: var(--mute); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; }
.card .v { font-size: 1.85rem; font-family: Sora, sans-serif; color: var(--cyan); text-shadow: 0 0 16px rgba(90, 212, 255, .35); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(42, 171, 238, .12); }
th { color: var(--mute); font-weight: 600; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.btn, button, input[type=submit] {
  background: linear-gradient(180deg, var(--cyan), var(--blue)); color: #041018; border: 0;
  border-radius: 10px; padding: 9px 14px; cursor: pointer; font-weight: 700; font-family: inherit;
  box-shadow: 0 0 18px rgba(42, 171, 238, .4);
}
.btn.ghost, .ghost { background: transparent; border: 1px solid var(--line); color: var(--text); box-shadow: none; }
.btn.danger, button.danger, .danger {
  background: linear-gradient(180deg, #ff6b88, #c4123c); color: #fff; box-shadow: 0 0 14px rgba(255, 90, 122, .3);
}
input, textarea, select {
  width: 100%; background: #0a1522; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(42, 171, 238, .18);
}
label { display: block; color: var(--mute); font-size: .8rem; margin: 12px 0 6px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; border: 1px solid var(--line); }
.flash.ok { color: var(--ok); border-color: rgba(94, 224, 168, .35); }
.flash.err { color: var(--danger); border-color: rgba(255, 90, 122, .35); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-card {
  width: min(420px, 100%); padding: 32px 28px; border: 1px solid var(--line); border-radius: 22px;
  background: rgba(8, 16, 28, .92); box-shadow: 0 0 70px rgba(42, 171, 238, .22);
}
.login-card h1 { color: var(--cyan); text-shadow: 0 0 24px rgba(42, 171, 238, .55); letter-spacing: .14em; }
.login-card p { color: var(--mute); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--cyan); font-size: .75rem;
}
.owned-rank {
  display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--cyan); font-size: .75rem; margin-right: 4px;
}
.live { color: var(--ok); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acts form { display: inline-flex; gap: 6px; margin: 0; align-items: center; }
.acts select { width: auto; min-width: 150px; padding: 6px 8px; }
.acts button { padding: 6px 10px; font-size: .8rem; }
tr.dead td { opacity: .45; }
.hint { color: var(--mute); font-size: .85rem; margin: 8px 0 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.toolbar button {
  background: #102033; color: var(--cyan); box-shadow: none; border: 1px solid var(--line);
  padding: 6px 10px; font-size: .8rem;
}

.compose { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.preview-col { position: sticky; top: 12px; }
.tg-app {
  width: 100%;
  height: 680px;
  display: flex;
  flex-direction: column;
  background: #0e1621;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #1c2a3a;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Roboto", "Segoe UI", "Segoe UI Emoji", "Apple Color Emoji", system-ui, sans-serif;
}
.tg-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: #17212b;
  border-bottom: 1px solid #0e1621;
  min-height: 54px;
  flex-shrink: 0;
}
.tg-ava {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(180deg, #4db6ea, #2a9fd6);
}
.tg-peer b { display: block; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0; font-family: inherit; }
.tg-peer small { color: #6d7f8f; font-size: 13px; }
.tg-chat {
  flex: 1;
  overflow: auto;
  padding: 12px 6px 20px;
  background-color: #0e1621;
  background-image:
    radial-gradient(rgba(255,255,255,.035) 1.1px, transparent 1.2px);
  background-size: 22px 22px;
}
.tg-row { display: flex; justify-content: flex-start; padding: 4px 8px; }
.tg-col { width: 300px; max-width: 90%; min-width: 168px; }
.tg-bubble {
  position: relative;
  background: #182533;
  color: #f5f6f8;
  border-radius: 12.5px 12.5px 12.5px 4px;
  padding: 0;
  font-size: 16px;
  line-height: 20.25px;
  letter-spacing: -.01em;
  font-weight: 400;
  box-shadow: 0 1px 1px rgba(0,0,0,.28);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.tg-bubble::after {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 0;
  width: 9px;
  height: 13px;
  background: #182533;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.tg-body { padding: 4px 11px 3px; position: relative; }
.tg-bubble.has-media .tg-body { padding: 6px 11px 4px; }
.tg-bubble.has-media.no-text { overflow: hidden; }
.tg-bubble.has-media.no-text .tg-body {
  position: absolute; right: 6px; bottom: 5px; padding: 0; z-index: 2;
}
.tg-bubble.has-media.no-text .tg-html,
.tg-bubble.has-media.no-text .tg-embed { display: none; }
.tg-bubble.has-media.no-text .tg-meta {
  position: static; float: none; margin: 0;
  color: #fff; background: rgba(0,0,0,.4);
  border-radius: 10px; padding: 1px 6px 2px;
}
.tg-html { white-space: pre-wrap; }
.tg-html a { color: #6ab3f3; text-decoration: none; }
.tg-html b, .tg-html strong { font-weight: 600; }
.tg-html i, .tg-html em { font-style: italic; }
.tg-html u { text-decoration: underline; }
.tg-html s, .tg-html del { text-decoration: line-through; opacity: .85; }
.tg-time-pad {
  display: inline-block;
  width: 38px;
  height: 12px;
  vertical-align: -3px;
}
.tg-code {
  font-family: "Consolas", "Menlo", "Roboto Mono", monospace;
  font-size: 14px;
  background: rgba(0,0,0,.28);
  border-radius: 4px;
  padding: 1px 5px;
}
.tg-pre {
  background: #0e1621;
  border-radius: 6px;
  margin: 6px 0 4px;
  overflow: hidden;
}
.tg-pre-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px 2px;
  color: #8b9aa8;
  font-size: 13px;
  font-family: "Consolas", "Menlo", monospace;
}
.tg-copy {
  background: none; border: 0; color: #8b9aa8; cursor: pointer;
  box-shadow: none; padding: 0; width: auto; font-size: 14px;
}
.tg-pre-body {
  margin: 0;
  padding: 2px 10px 10px;
  font-family: "Consolas", "Menlo", "Roboto Mono", monospace;
  font-size: 13.5px;
  line-height: 1.38;
  color: #f3f6f8;
  white-space: pre-wrap;
  background: transparent;
  border: 0;
}
.tok-s { color: #e8a35c; }
.tok-k { color: #c695c6; }
.tok-c { color: #6d7f8f; }
.tg-spoiler { background: #3d4f61; color: transparent; border-radius: 3px; cursor: pointer; }
.tg-spoiler.open { color: inherit; background: rgba(61,79,97,.45); }
.tg-album {
  display: grid;
  gap: 2px;
  overflow: hidden;
  border-radius: 12.5px 12.5px 0 0;
  background: #0e1621;
}
.tg-bubble.has-media.no-text .tg-album { border-radius: 12.5px; }
.tg-album .tg-media-box,
.tg-album .tg-album-cell {
  border-radius: 0 !important;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.tg-album .tg-media {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}
.tg-album.n2 {
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 1.52 / 1;
  height: auto;
}
.tg-album.n3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1.08 / 1;
  height: auto;
  min-height: 220px;
}
.tg-album.n3 .tg-media-box:first-child,
.tg-album.n3 > :first-child { grid-row: 1 / 3; }
.tg-album.n4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 1;
  height: auto;
}
.tg-album.n5 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1.18fr 1fr;
  aspect-ratio: 1.12 / 1;
  height: auto;
}
.tg-album.n5 .tg-media-box:nth-child(1) { grid-column: 1 / 4; }
.tg-album.n5 .tg-media-box:nth-child(2) { grid-column: 4 / 7; }
.tg-album.n5 .tg-media-box:nth-child(3) { grid-column: 1 / 3; }
.tg-album.n5 .tg-media-box:nth-child(4) { grid-column: 3 / 5; }
.tg-album.n5 .tg-media-box:nth-child(5) { grid-column: 5 / 7; }
.tg-album.n6 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1.08 / 1;
  height: auto;
}
.tg-album.n7 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1.1fr 1.1fr 1fr;
  aspect-ratio: 1 / 1.12;
  height: auto;
}
.tg-album.n7 .tg-media-box:nth-child(1),
.tg-album.n7 .tg-media-box:nth-child(3) { grid-column: 1 / 4; }
.tg-album.n7 .tg-media-box:nth-child(2),
.tg-album.n7 .tg-media-box:nth-child(4) { grid-column: 4 / 7; }
.tg-album.n7 .tg-media-box:nth-child(5) { grid-column: 1 / 3; }
.tg-album.n7 .tg-media-box:nth-child(6) { grid-column: 3 / 5; }
.tg-album.n7 .tg-media-box:nth-child(7) { grid-column: 5 / 7; }
.tg-album.n8 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1.15fr 1fr 1fr;
  aspect-ratio: 1 / 1.12;
  height: auto;
}
.tg-album.n8 .tg-media-box:nth-child(1) { grid-column: 1 / 4; }
.tg-album.n8 .tg-media-box:nth-child(2) { grid-column: 4 / 7; }
.tg-album.n8 .tg-media-box:nth-child(3),
.tg-album.n8 .tg-media-box:nth-child(6) { grid-column: 1 / 3; }
.tg-album.n8 .tg-media-box:nth-child(4),
.tg-album.n8 .tg-media-box:nth-child(7) { grid-column: 3 / 5; }
.tg-album.n8 .tg-media-box:nth-child(5),
.tg-album.n8 .tg-media-box:nth-child(8) { grid-column: 5 / 7; }
.tg-album.n9 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  aspect-ratio: 1 / 1;
  height: auto;
}
.tg-album.n10 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1.1fr 1fr 1fr 1.1fr;
  aspect-ratio: 1 / 1.28;
  height: auto;
}
.tg-album.n10 .tg-media-box:nth-child(1),
.tg-album.n10 .tg-media-box:nth-child(9) { grid-column: 1 / 4; }
.tg-album.n10 .tg-media-box:nth-child(2),
.tg-album.n10 .tg-media-box:nth-child(10) { grid-column: 4 / 7; }
.tg-album.n10 .tg-media-box:nth-child(3),
.tg-album.n10 .tg-media-box:nth-child(6) { grid-column: 1 / 3; }
.tg-album.n10 .tg-media-box:nth-child(4),
.tg-album.n10 .tg-media-box:nth-child(7) { grid-column: 3 / 5; }
.tg-album.n10 .tg-media-box:nth-child(5),
.tg-album.n10 .tg-media-box:nth-child(8) { grid-column: 5 / 7; }
.media-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.media-thumb {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c1828;
}
.media-thumb img, .media-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-thumb button {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; padding: 0;
  border-radius: 50%; font-size: 13px; line-height: 1;
  background: rgba(0,0,0,.65); color: #fff;
  box-shadow: none; border: 0;
}
.tg-media-box {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12.5px 12.5px 0 0;
  background: #0b121a;
}
.tg-bubble.has-media.no-text .tg-media-box { border-radius: 12.5px; }
.tg-media {
  display: none; width: 100%; max-height: 360px; object-fit: cover;
  margin: 0; vertical-align: top;
}
.tg-media.on { display: block; }
#tg-media-slot > .tg-media-box .tg-media.on {
  height: auto;
  max-height: 360px;
  object-fit: cover;
}
.tg-play {
  position: absolute; left: 50%; top: 50%;
  width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-radius: 50%;
  background: rgba(0,0,0,.42);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  pointer-events: none;
}
.tg-play::after {
  content: "";
  position: absolute; left: 18px; top: 13px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.tg-media-badge {
  position: absolute; left: 8px; top: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}
.tg-embed {
  margin: 6px 0 2px;
  border-radius: 4px;
  overflow: hidden;
}
.tg-embed[hidden] { display: none !important; }
.tg-embed-inner {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 5px 7px 6px 9px;
  border-left: 3px solid #6ab2f2;
  background: rgba(90, 140, 180, .12);
}
.tg-embed-copy { min-width: 0; flex: 1; }
.tg-embed-site {
  font-size: 14px; font-weight: 500; color: #6ab2f2; line-height: 1.25;
}
.tg-embed-title {
  font-size: 14px; font-weight: 700; color: #fff; line-height: 1.25;
  margin-top: 1px;
}
.tg-embed-desc {
  font-size: 14px; color: #e8eef4; line-height: 1.3; margin-top: 1px;
}
.tg-embed-thumb {
  width: 48px; height: 48px; border-radius: 6px; flex-shrink: 0;
  background: #2a3d52 center / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #d7e6f5; font-weight: 800; font-size: 18px;
}
.tg-embed-action {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 8px 8px 7px;
  color: #6ab2f2;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(90, 140, 180, .08);
}
.tg-embed.invite .tg-embed-inner {
  border-left-color: #e07a9a;
  background: rgba(160, 70, 110, .18);
}
.tg-embed.invite .tg-embed-site,
.tg-embed.invite .tg-embed-action { color: #e58aa8; }
.tg-embed.invite .tg-embed-action { background: rgba(160, 70, 110, .1); border-top-color: rgba(229,138,168,.18); }
.tg-embed.invite .tg-embed-thumb {
  background: linear-gradient(160deg, #c94d78, #7a2348);
  color: #1a0810;
}
.tg-meta {
  position: absolute;
  right: 8px;
  bottom: 4px;
  display: flex; justify-content: flex-end; align-items: center; gap: 4px;
  margin: 0; color: #7392a5; font-size: 11px; line-height: 1;
  pointer-events: none;
}
.tg-kb { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.tg-kb.live {
  min-height: 48px;
  padding: 4px 0 6px;
  border-radius: 10px;
}
.tg-kb.live.drop-hot {
  outline: 1.5px dashed #4c97ff;
  background: rgba(76, 151, 255, .1);
}
.tg-kb.live.dragging .tg-kb-gap {
  height: 12px;
  background: rgba(76, 151, 255, .14);
}
.tg-kb-gap { height: 8px; border-radius: 6px; flex-shrink: 0; }
.tg-kb-gap.hot { height: 16px; background: rgba(76, 151, 255, .5); }
.tg-kb-hint {
  color: #6d7f8f;
  font-size: 13px;
  text-align: center;
  padding: 16px 10px;
  border: 1.5px dashed rgba(76, 151, 255, .4);
  border-radius: 10px;
}
.tg-btn-row { display: flex; gap: 4px; }
.tg-btn-row.hot { outline: 2px solid #4c97ff; outline-offset: 2px; border-radius: 10px; }
.tg-btn {
  position: relative;
  flex: 1; text-align: center; text-decoration: none;
  background: #182533; color: #fff;
  border: 0; border-radius: 8px;
  padding: 9px 22px 9px 10px; font-size: 14px; font-weight: 500;
  font-family: inherit;
  box-shadow: 0 1px 1px rgba(0,0,0,.22);
  min-height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.tg-kb.live .tg-btn { cursor: grab; touch-action: none; user-select: none; }
.tg-kb.live .tg-btn.dragging { opacity: .32; }
.tg-btn.hot { outline: 2px solid #4c97ff; outline-offset: 1px; }
.tg-btn-txt { display: block; line-height: 1.2; }
.tg-btn-ico {
  position: absolute; right: 7px; top: 50%;
  width: 12px; height: 12px;
  transform: translateY(-50%);
  opacity: .92;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3.2 8.8L8.6 3.4M4.2 3.4h4.4v4.4'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3.2 8.8L8.6 3.4M4.2 3.4h4.4v4.4'/></svg>") center / contain no-repeat;
}
.tg-btn:hover { filter: brightness(1.08); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.toolbar button {
  background: #102033; color: var(--cyan); box-shadow: none; border: 1px solid var(--line);
  padding: 6px 10px; font-size: .8rem;
}
.preview-col { z-index: 3; }
.preview-col .hint { margin-top: 10px; }
.brick-tray {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding-bottom: 10px;
}
.brick {
  --brick: #4c97ff;
  --brick-edge: #3373cc;
  position: relative;
  appearance: none; border: 0;
  background: var(--brick); color: #fff;
  font-weight: 700; font-size: 14px; font-family: inherit;
  padding: 10px 16px 12px;
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--brick-edge), 0 6px 12px rgba(0,0,0,.28);
  cursor: grab;
  user-select: none;
  touch-action: none;
  line-height: 1.2;
}
.brick::after {
  content: "";
  position: absolute;
  left: 14px; bottom: -7px;
  width: 16px; height: 8px;
  background: var(--brick);
  border-radius: 0 0 5px 5px;
  box-shadow: 0 3px 0 var(--brick-edge);
}
.brick:active { cursor: grabbing; }
.brick-trash {
  --brick: #ff6680;
  --brick-edge: #c94c61;
  cursor: default;
  opacity: .92;
}
.brick-trash.hot { filter: brightness(1.15); transform: scale(1.04); }
body.brick-dragging { cursor: grabbing; user-select: none; }
body.brick-dragging .brick { cursor: grabbing; }
.brick-ghost {
  position: fixed; z-index: 90; pointer-events: none;
  margin: 0; opacity: .94;
  transform: rotate(-3deg) scale(1.05);
  width: max-content; max-width: 220px;
}
.brick-edit {
  position: absolute; z-index: 50;
  width: 240px;
  background: #0c1828;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.brick-edit label { margin: 0 0 4px; font-size: .75rem; color: var(--mute); }
.brick-edit input { margin-bottom: 8px; }
.brick-edit-actions { display: flex; justify-content: space-between; gap: 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .8rem; background: #102033; cursor: pointer; }
.chip:hover { border-color: var(--danger); color: var(--danger); }
.btn-builder { display: flex; flex-direction: column; gap: 8px; }
.btn-row-edit { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; align-items: center; }
.search-box { position: relative; }
.search-hits {
  position: absolute; left: 0; right: 0; top: 100%; background: #0c1828; border: 1px solid var(--line);
  border-radius: 10px; z-index: 8; max-height: 220px; overflow: auto;
}
.search-hits button { width: 100%; text-align: left; background: transparent; color: var(--text); box-shadow: none; border-radius: 0; }
.progress { height: 10px; background: #102033; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > span {
  display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 12px rgba(42, 171, 238, .6); width: 0;
}
.checkline { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.checkline label { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--text); }
.checkline input { width: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tabs button.on { background: linear-gradient(180deg, var(--cyan), var(--blue)); color: #041018; }
.mode-switch { display: flex; gap: 8px; margin: 0 0 10px; }
.mode-switch button { flex: 1; }
.mode-switch button.on { background: linear-gradient(180deg, var(--cyan), var(--blue)); color: #041018; }
.meta-line { color: var(--mute); font-size: .85rem; margin: 6px 0; }
.hint { color: var(--mute); font-size: .78rem; margin: 6px 0 0; }
.warn { color: var(--warn); font-size: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions form { margin: 0; }
@media (max-width: 1100px) { .compose { grid-template-columns: 1fr; } .preview-col { position: static; } }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid, .row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) { .grid, .row, .btn-row-edit { grid-template-columns: 1fr; } }

.catalog-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 18px;
}
.catalog-head h1, .catalog-head h2 { margin: 0; }
.catalog-head .kicker {
  margin: 0 0 4px; letter-spacing: .22em; font-size: .68rem;
  color: var(--cyan); text-transform: uppercase; font-weight: 700;
}
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.catalog-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
}
.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(42, 171, 238, .22);
}
.product-art {
  position: relative;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 20%, rgba(42,171,238,.28), transparent 50%),
    #081018;
}
.product-art.badge-round img { border-radius: 50%; }
.product-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-row {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 16, 28, .45);
}
.product-emo {
  position: absolute; left: 10px; top: 10px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(8,16,28,.72);
  border: 1px solid var(--line); font-size: 1.1rem;
}
.product-off { position: absolute; right: 10px; top: 10px; }
.product-body { padding: 12px 14px 14px; }
.product-body h3 { margin: 0 0 4px; font-size: 1.02rem; }
.product-body p {
  margin: 0 0 10px; color: var(--mute); font-size: .82rem;
  line-height: 1.35; min-height: 2.2em;
}
.product-price { color: #ffd56a; font-weight: 800; margin-bottom: 10px; }
.product-acts { display: flex; gap: 8px; }
.product-acts form { margin: 0; }
.product-acts button { flex: 1; padding: 7px 8px; font-size: .8rem; }

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.modal.open { display: flex; }
.modal-back {
  position: absolute; inset: 0;
  background: rgba(3, 8, 16, .72);
  backdrop-filter: blur(16px);
}
.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92vh, 92dvh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, rgba(14, 28, 46, .98), rgba(8, 16, 28, .98));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px 22px 18px;
  box-shadow: 0 30px 90px rgba(42, 171, 238, .2);
}
.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 12px;
  background: transparent; color: var(--text); box-shadow: none;
  border: 1px solid var(--line); font-size: 1.2rem; line-height: 1;
}
.drop {
  display: grid; place-items: center;
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 18px;
  overflow: hidden;
  border: 1px dashed var(--line);
  background: #081018;
  margin: 8px 0 14px;
  cursor: pointer;
}
.drop img { width: 100%; height: 100%; object-fit: cover; display: none; }
.drop span {
  font-size: 2.4rem; filter: drop-shadow(0 0 12px rgba(42,171,238,.45));
}
.drop em {
  position: absolute; bottom: 8px; left: 0; right: 0;
  text-align: center; color: var(--mute); font-size: .78rem; font-style: normal;
}
.drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.drop.pack-art { aspect-ratio: 2/1; cursor: default; }
.drop.pack-art img { display: block; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
.check input { width: auto; }
.modal-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-panel.badge-wide { width: min(720px, 100%); }
.user-hero { margin-bottom: 8px; }
.user-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.inv-line { color: var(--mute); }
.owned-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.owned-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(8, 16, 28, .55);
}
.owned-chip img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
}
.owned-chip b { font-size: .85rem; }
.owned-chip em { color: var(--cyan); font-style: normal; font-size: .75rem; }
.op-pills { display: flex; gap: 8px; margin: 0 0 14px; }
.pill {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer;
}
.pill:has(input:checked) {
  border-color: var(--cyan); background: rgba(42, 171, 238, .14); color: var(--cyan);
}
.pill input { width: auto; }
textarea {
  width: 100%; min-height: 72px; resize: vertical;
  background: #081018; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font: inherit;
}
.grant-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px; margin: 8px 0 12px;
}
.grant-card {
  display: grid; gap: 6px; text-align: left;
  padding: 10px; border-radius: 18px; border: 1px solid var(--line);
  background: rgba(8, 16, 28, .6); color: var(--text); cursor: pointer;
  box-shadow: none;
}
.grant-card:hover { border-color: var(--cyan); }
.grant-art {
  position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(42,171,238,.28), #081018 60%);
  display: grid; place-items: center;
}
.grant-art img { width: 100%; height: 100%; object-fit: cover; }
.grant-art em { font-style: normal; font-size: 1.6rem; }
.grant-card strong { font-size: .85rem; }
.grant-card small { color: var(--mute); }
.grant-picked { font-weight: 700; margin: 0 0 10px; }
.rank-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rank-pick {
  width: 44px; height: 44px; border-radius: 14px; padding: 0;
  background: #102033; color: var(--text); box-shadow: none;
}
.rank-pick.on { background: var(--blue); color: #fff; }

@media (max-width: 720px) {
  .main { padding: 16px 14px 40px; min-width: 0; }
  .side { padding: 14px 14px 10px; }
  .nav {
    margin-top: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .nav a { padding: 8px 10px; font-size: .82rem; }
  .catalog-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .catalog-head .btn { width: 100%; }
  .catalog, .catalog-sm {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
  }
  .product-acts { flex-wrap: wrap; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  input, textarea, select { font-size: 16px; }
  h1 { font-size: 1.35rem; }
  .card .v { font-size: 1.4rem; }
  .modal {
    padding: 0;
    align-items: flex-end;
  }
  .modal-panel,
  .modal-panel.badge-wide {
    width: 100%;
    max-width: 100%;
    max-height: min(100vh, 100dvh);
    border-radius: 22px 22px 0 0;
    padding: 18px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .modal-x { top: 8px; right: 8px; }
  .modal-acts {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 12px -14px 0;
    padding: 12px 14px calc(4px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, rgba(8, 16, 28, .96) 28%);
  }
  .modal-acts button { flex: 1; min-width: 0; }
  .drop { aspect-ratio: 2 / 1; }
  .grant-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .user-acts .btn { flex: 1; min-width: 140px; }
}

@media (max-width: 420px) {
  .catalog, .catalog-sm { grid-template-columns: 1fr 1fr; }
  .grant-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-height: 560px) {
  .drop { aspect-ratio: 2.6 / 1; }
  .modal-panel, .modal-panel.badge-wide {
    max-height: min(100vh, 100dvh);
    padding-top: 14px;
  }
}
