:root {
  --bg: #12161c;
  --bg-deep: #0c0f13;
  --ink: #f4f7fb;
  --muted: #8b95a3;
  --accent: #2fe0c8;
  --accent-2: #7af0df;
  --accent-ink: #032824;
  --accent-dim: rgba(47, 224, 200, 0.18);
  --star: #ffc857;
  --violet: #7c6cff;
  --line: rgba(255, 255, 255, 0.08);
  --panel: rgba(36, 43, 54, 0.92);
  --panel-2: #2c3542;
  --panel-solid: #242b36;
  --ok: #3dde7a;
  --ok-ink: #04210c;
  --ok-glow: rgba(61, 222, 122, 0.35);
  --danger: #ff5d55;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
  --tabbar-bottom: 10px;
  --tabbar-gap: 10px;
  /* reserved band under scrollport so content never sits under the dock */
  --bottom-clearance: calc(var(--tabbar-h) + var(--tabbar-bottom) + var(--tabbar-gap) + var(--safe-b));
  --display: "Outfit", system-ui, sans-serif;
  --ui: "Sora", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 22px;
  --radius-sm: 16px;
  --gold: var(--accent);
  --gold-2: var(--accent-2);
  --gold-dim: var(--accent-dim);
  --yellow: var(--accent);
  --yellow-2: var(--accent-2);
  --yellow-ink: var(--accent-ink);
  --yellow-dim: var(--accent-dim);
  --mono: var(--ui);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: var(--app-vh, var(--tg-viewport-stable-height, 100dvh));
  color: var(--ink);
  font-family: var(--ui);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(70% 45% at 15% 0%, rgba(124, 108, 255, 0.22), transparent 55%),
    radial-gradient(80% 50% at 90% 8%, rgba(47, 224, 200, 0.2), transparent 52%),
    radial-gradient(60% 40% at 50% 100%, rgba(255, 200, 87, 0.08), transparent 50%),
    linear-gradient(165deg, #1a2030 0%, var(--bg) 42%, var(--bg-deep) 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: floaty 12s ease-in-out infinite alternate;
}
.blob-a {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -40px;
  background: rgba(47, 224, 200, 0.45);
}
.blob-b {
  width: 180px;
  height: 180px;
  top: 18%;
  left: -70px;
  background: rgba(124, 108, 255, 0.4);
  animation-delay: -3s;
}
.blob-c {
  width: 160px;
  height: 160px;
  bottom: 18%;
  right: -50px;
  background: rgba(255, 200, 87, 0.22);
  animation-delay: -6s;
}
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.cursor-ember {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cursor-ember.is-on {
  opacity: 1;
}
.orbit, .veins, .stamp-bg, .seal, .top { display: none !important; }

#app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  margin: 0 auto;
  padding: 14px 14px calc(8px + var(--safe-b));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 10px;
}

.boot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40vh;
  text-align: center;
}

.brand-mark {
  font-family: var(--display);
  font-size: clamp(40px, 12vw, 52px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  background: linear-gradient(120deg, #fff 10%, var(--accent-2) 45%, var(--star) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 24px rgba(47, 224, 200, 0.25));
}
.brand-mark-sm {
  font-size: 28px;
  margin-bottom: 10px;
  text-align: center;
}

.view.hidden, .panel.hidden, .hidden { display: none !important; }

#shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 8px;
  box-sizing: border-box;
}
#shell.shell-in {
  animation: fadeRise 0.36s var(--ease) both;
}
#shell.shell-out {
  animation: fadeDrop 0.18s ease both;
}

.view {
  width: 100%;
}
.view.is-active {
  position: relative;
  z-index: 1;
}
.view.is-swiping {
  z-index: 6;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  border-radius: 0 18px 18px 0;
  will-change: transform;
}
html.swipe-back-on #shell {
  overscroll-behavior-x: none;
}
.view.view-enter {
  animation: viewFadeIn 0.22s ease both;
}
.view.is-leaving {
  animation: none;
}

@keyframes viewFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
h1::before, h1::after { content: none; display: none; }

.hello {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.home-hero {
  margin-bottom: 6px;
}

.home-promo-banner {
  display: block;
  margin: 4px 0 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #f4f4f2;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s ease;
}
.home-promo-banner:active {
  transform: scale(0.985);
}
.home-promo-banner-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 360;
  object-fit: cover;
  object-position: center;
  vertical-align: top;
}

.profile-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 4px 0 16px;
  text-align: center;
}
.profile-avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 10px 22px rgba(47, 180, 255, 0.28));
}
.profile-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.profile-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.profile-avatar {
  position: absolute;
  z-index: 1;
  /* photo sits on top of the crown area; star tips stay as frame */
  inset: 22%;
  width: auto;
  height: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: #0b141c;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
  pointer-events: none;
}
.profile-avatar:not(.has-photo) #profile-avatar-letter {
  opacity: 0;
}
.profile-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  background: transparent;
}
.profile-avatar.has-photo .profile-avatar-img {
  opacity: 1;
}
.profile-avatar.has-photo #profile-avatar-letter {
  opacity: 0;
}
#profile-avatar-letter {
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}
.profile-name {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.profile-handle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.muted, .hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.subh {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}

/* —— Balance card —— */
.signal {
  position: relative;
  margin: 0 0 14px;
  padding: 20px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(160deg, rgba(47, 224, 200, 0.16), transparent 45%),
    linear-gradient(320deg, rgba(124, 108, 255, 0.12), transparent 40%),
    rgba(28, 34, 44, 0.92);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: none;
  backdrop-filter: blur(16px);
}
.signal-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 224, 200, 0.35), transparent 68%);
  animation: drift 7s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.signal::before { display: none; }
.signal-compact { padding: 14px; }
.signal-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  z-index: 1;
}
.signal-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.signal-live em {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(61, 222, 122, 0.5);
  animation: ping 1.8s ease-out infinite;
  font-style: normal;
}
.signal-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.signal-amount {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 4px 0 16px;
}
.signal-currency {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--star);
  margin-top: 10px;
}
.signal-sum {
  font-family: var(--display);
  font-size: clamp(42px, 12vw, 54px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 8px 30px rgba(47, 224, 200, 0.2);
}

.wallet-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 14px;
}
.wallet-pill {
  display: grid;
  gap: 4px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 22, 28, 0.45);
}
.wallet-pill-k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.wallet-pill strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.bento {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bento-tile {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px;
  text-align: left;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-width: 0;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.bento-tile.static { cursor: default; }
.bento-tile:not(.static):active { transform: scale(0.98); }
.bento-tile.gold {
  border-color: rgba(47, 224, 200, 0.35);
  background: linear-gradient(160deg, rgba(47, 224, 200, 0.18), rgba(0, 0, 0, 0.15));
}
.bento-tile.action {
  border-color: rgba(61, 222, 122, 0.35);
  background: linear-gradient(160deg, rgba(61, 222, 122, 0.14), rgba(0, 0, 0, 0.15));
}
.bento-k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.bento-tile strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bento-hint {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 650;
}

/* —— Buttons —— */
.btn,
button.primary,
.btn-link.primary,
.cta-deal,
.action-btn,
.chip,
.tab,
.menu-row,
.choice-btn,
.bento-tile,
button.back {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.btn,
button.primary:not(.chip),
button.secondary:not(.chip),
.btn-link.primary {
  appearance: none;
  width: 100%;
  min-height: 50px;
  height: 50px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition:
    transform 0.22s var(--ease),
    filter 0.22s ease,
    opacity 0.22s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}
.btn:active,
button.primary:not(.chip):active,
button.secondary:not(.chip):active,
.btn-link.primary:active {
  transform: scale(0.97);
}
.btn:disabled,
button.primary:not(.chip):disabled,
button.secondary:not(.chip):disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn.primary,
button.primary:not(.chip),
.btn-link.primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #1fc4ad);
  color: var(--accent-ink);
  /* без большого glow — иначе под кнопкой «пятно» */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn.secondary,
button.secondary:not(.chip) {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  box-shadow: none;
}
.btn.danger {
  border-color: rgba(255, 93, 85, 0.35);
  background: rgba(255, 93, 85, 0.14);
  color: #ffb4ae;
}
.btn.ok {
  border: 0;
  color: var(--ok-ink);
  background: linear-gradient(135deg, #57e98f, var(--ok));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-deal {
  appearance: none;
  width: 100%;
  margin: 2px 0 12px;
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, var(--accent-2), var(--accent) 60%, #18b9a3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  position: relative;
  z-index: 2;
  overflow: hidden;
  transition: transform 0.22s var(--ease), filter 0.22s ease, box-shadow 0.25s ease;
}
.cta-deal > * {
  position: relative;
  z-index: 1;
}
.cta-deal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: shine 3.8s ease-in-out infinite;
}
.cta-arrow {
  display: none;
}
.cta-deal:active {
  transform: scale(0.97);
  filter: brightness(0.97);
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
  position: relative;
  z-index: 2;
}
.action-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 12px;
  min-height: 50px;
  height: 50px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.22s var(--ease), border-color 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(10px);
}
.action-btn.ghost {
  /* перебиваем глобальный .ghost (иначе кнопка становится «голым» текстом) */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--ink) !important;
  padding: 0 12px !important;
  border-radius: 16px;
  min-height: 50px;
  height: 50px;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-btn:active { transform: scale(0.97); }
.action-btn.wide {
  grid-column: 1 / -1;
}

.home-deals {
  margin-top: 18px;
}
.home-deals .index-head { margin-bottom: 10px; }
.home-deals-all {
  font-size: 13px;
  font-weight: 650;
  flex-shrink: 0;
  color: var(--accent);
}
.home-deals-list { gap: 8px; }

.market-home-gate {
  margin-top: 4px;
  margin-bottom: 4px;
}
.market-home-gate .market-cats-entry {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(22, 26, 34, 0.92);
  min-height: 54px;
}
.market-home-gate .market-cats-entry:active {
  background: rgba(255, 255, 255, 0.05);
}
.market-cat-list {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 26, 34, 0.92);
}
.market-cat-list-lg {
  margin-bottom: 18px;
}
.market-cat {
  appearance: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  min-height: 52px;
  padding: 0 14px;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--ui);
  background: transparent;
  position: relative;
  overflow: visible;
  transition: background 0.18s ease;
}
.market-cat:last-child {
  border-bottom: 0;
}
.market-cat::before { display: none; }
.market-cat:active {
  transform: none;
  background: rgba(255, 255, 255, 0.05);
}
.market-cat-ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: rgba(244, 247, 251, 0.92);
}
.market-cat-ico svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.market-cat strong {
  display: block;
  position: static;
  flex: 1;
  min-width: 0;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: rgba(244, 247, 251, 0.96);
}
.market-cat span.market-cat-hint {
  display: none;
}
.market-cat .market-cat-chev {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  margin-left: auto;
  padding-left: 8px;
}
.market-cat.tone-accounts,
.market-cat.tone-items,
.market-cat.tone-services,
.market-cat.tone-digital,
.market-cat.tone-currency,
.market-cat.tone-keys,
.market-cat.tone-soft,
.market-cat.tone-it,
.market-cat.tone-trade,
.market-cat.tone-learn,
.market-cat.tone-arbitrage,
.market-cat.tone-exchange,
.market-cat.tone-sim,
.market-cat.tone-buyup,
.market-cat.tone-freebies {
  --cat-bg: transparent;
  --cat-glow: transparent;
}

.market-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.market-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.market-hero h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.market-hero-copy .muted {
  margin: 0;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.45;
}
.market-sell-fab {
  appearance: none;
  flex-shrink: 0;
  width: 64px;
  min-height: 64px;
  border-radius: 18px;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  font-family: var(--ui);
  box-shadow: 0 10px 28px rgba(47, 224, 200, 0.28);
  transition: transform 0.22s var(--ease);
}
.market-sell-fab span {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.market-sell-fab em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.market-sell-fab:active { transform: scale(0.96); }

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.market-all-cats-btn {
  appearance: none;
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.12);
  color: #dffcf6;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s ease;
}
.market-all-cats-btn:active {
  transform: scale(0.97);
  background: rgba(47, 224, 200, 0.2);
}
.market-all-cats-ico {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #2fe0c8;
}
.market-all-cats-ico svg {
  width: 18px;
  height: 18px;
}
.market-search {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.market-search input {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  padding: 0 14px;
  outline: none;
}
.market-search input:focus {
  border-color: rgba(47, 224, 200, 0.45);
}

.market-cats-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}
.market-cats-overlay.hidden {
  display: none;
}
.market-cats-backdrop {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.62);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.market-cats-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(47, 224, 200, 0.08), transparent 28%),
    #141a22;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: marketCatsIn 0.28s var(--ease) both;
}
@keyframes marketCatsIn {
  from {
    transform: translateY(18px);
    opacity: 0.4;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.market-cats-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.market-cats-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.market-cats-close {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.market-cats-close:active {
  transform: scale(0.96);
}
.market-cats-overlay .market-cat-list {
  margin: 0;
}
.market-cats-overlay .market-cat.is-on {
  background: rgba(47, 224, 200, 0.1);
}
.market-cats-overlay .market-cat.is-on strong {
  color: #2fe0c8;
}
body.market-cats-open {
  overflow: hidden;
}

.market-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 2px 0;
}
.market-view-modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.market-view-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.market-view-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.market-view-btn svg path,
.market-view-btn svg rect,
.market-view-btn svg circle {
  fill: none;
  stroke: currentColor;
}
.market-view-btn svg circle {
  fill: currentColor;
  stroke: none;
}
.market-view-btn.is-on {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}
.market-view-btn:active {
  transform: scale(0.96);
}
.market-viewbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
}
.market-price-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  max-width: 118px;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.market-price-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.55);
}
.market-price-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-price-btn.is-on {
  color: #2fe0c8;
}
.market-price-btn.is-on svg {
  color: #2fe0c8;
}
.market-price-btn:active {
  background: rgba(255, 255, 255, 0.06);
}
.market-price-hint {
  margin: 0 0 12px;
}
.market-filters-sheet {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
}
.market-price-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}
.market-price-actions .btn {
  width: 100%;
}

.market-sort-wrap {
  position: relative;
  flex: 0 0 auto;
}
.market-sort-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.market-sort-btn svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
}
.market-sort-btn.is-open,
.market-sort-btn:active {
  background: rgba(255, 255, 255, 0.06);
}
.market-sort-caret {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
}
.market-sort-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 168px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #171d27;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 2px;
}
.market-sort-menu.hidden {
  display: none;
}
.market-sort-opt {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}
.market-sort-opt.is-on {
  background: rgba(47, 224, 200, 0.12);
  color: #2fe0c8;
}
.market-sort-opt:active {
  background: rgba(255, 255, 255, 0.06);
}

.market-filters {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 32, 0.72);
  display: grid;
  gap: 10px;
}
.market-filters-row {
  display: grid;
  gap: 6px;
}
.market-filters-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.market-filters .filters {
  margin: 0;
  flex-wrap: wrap;
}
.market-price-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.market-price-field {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.market-price-field input {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  padding: 0 12px;
  outline: none;
}
.market-price-field input:focus {
  border-color: rgba(47, 224, 200, 0.45);
}
.market-price-field input::-webkit-outer-spin-button,
.market-price-field input::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.market-price-field input[type="number"],
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.market-price-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  flex: 0 0 auto;
}
.market-price-presets {
  margin: 0;
}
.market-price-presets .chip.active {
  border-color: rgba(47, 224, 200, 0.55);
  color: #2fe0c8;
}

.market-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.market-feed.is-list {
  grid-template-columns: 1fr;
  gap: 8px;
}
.market-feed.is-grid {
  grid-template-columns: 1fr 1fr;
}
.market-feed.is-list .market-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  border-radius: 16px;
}
.market-feed.is-list .market-card-media {
  width: 112px;
  flex: 0 0 112px;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}
.market-feed.is-list .market-card-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.market-feed.is-list .market-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-feed.is-list .market-card-badge {
  display: none;
}
.market-card {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: rgba(28, 34, 44, 0.88);
  font-family: var(--ui);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.2s var(--ease), border-color 0.2s ease;
}
.market-card:active { transform: scale(0.98); }
.market-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.06), transparent),
    var(--lot-bg, #1a2230);
  overflow: hidden;
}
.market-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-card-media .lot-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.85;
}
.market-card-media .lot-fallback .market-cat-ico,
.market-item-gallery .lot-fallback .market-cat-ico {
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.55);
}
.market-card-media .lot-fallback .market-cat-ico svg,
.market-item-gallery .lot-fallback .market-cat-ico svg {
  width: 40px;
  height: 40px;
}
.market-card-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(8, 12, 16, 0.72);
  backdrop-filter: blur(8px);
  color: var(--accent-2);
}
.market-card-promo {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #081018;
  background: linear-gradient(135deg, #7dffc8, #2fe0c8);
  box-shadow: 0 4px 14px rgba(47, 224, 200, 0.35);
}
.market-card-promo.is-vip {
  background: linear-gradient(135deg, #ffd56a, #f0a020);
  box-shadow: 0 4px 14px rgba(240, 160, 32, 0.4);
}
.market-card.is-promoted {
  border-color: rgba(47, 224, 200, 0.45);
  box-shadow: 0 0 0 1px rgba(47, 224, 200, 0.22), 0 10px 28px rgba(0, 0, 0, 0.28);
}
.market-card.is-promoted .market-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(47, 224, 200, 0.12), transparent 42%);
}
.market-card-qty {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(47, 224, 200, 0.2);
  color: #2fe0c8;
}
.market-card-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.market-card-price {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-2);
}
.market-card-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-card-meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.market-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.market-soon {
  min-height: min(58vh, 480px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 36px 18px 48px;
}
.market-soon .market-kicker {
  margin: 0;
}
.market-soon-mark {
  width: 56px;
  height: 56px;
  margin: 6px 0 2px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  box-shadow: 0 12px 28px rgba(47, 224, 200, 0.28);
}
.market-soon-mark svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.market-soon h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.market-soon .muted {
  margin: 0;
  max-width: 28ch;
  font-size: 14px;
  line-height: 1.45;
}

.market-item-gallery {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #171d26;
  margin-bottom: 14px;
}
.market-item-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-item-gallery .lot-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 56px;
  background: linear-gradient(145deg, #1c2834, #121820);
}
.market-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: -4px 0 14px;
  scrollbar-width: none;
}
.market-thumbs::-webkit-scrollbar { display: none; }
.market-thumbs button {
  appearance: none;
  border: 1px solid transparent;
  padding: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: #1a2230;
}
.market-thumbs button.is-on {
  border-color: var(--accent);
}
.market-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-item-price {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-2);
  margin: 0 0 6px;
}
.market-item-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.market-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 12px 0 10px;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.market-seller:active {
  transform: scale(0.99);
}
.market-seller-av {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(47,224,200,0.35), rgba(124,108,255,0.35));
  flex-shrink: 0;
}
.market-seller strong { display: block; font-size: 14px; }
.market-seller span { font-size: 12px; color: var(--muted); }
.market-seller-go {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
}
.market-item-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.market-tool-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 24, 32, 0.72);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.market-promo-pack.is-picked {
  border-color: rgba(47, 224, 200, 0.55);
  box-shadow: 0 0 0 1px rgba(47, 224, 200, 0.25);
}
.market-tool-report {
  opacity: 0.85;
}
.market-tool-btn:active {
  transform: scale(0.97);
}
.market-card-fav {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  color: #ff8eaa;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.market-item-desc {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(244, 247, 251, 0.88);
  margin: 0 0 16px;
}
.market-item-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.market-mine-tabs {
  margin: 0 0 12px;
}
.market-card.is-archived {
  opacity: 0.78;
}
.market-card-archive {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(20, 24, 32, 0.82);
}
.market-status-chip.is-archived {
  color: #f4f7fb;
  background: rgba(255, 255, 255, 0.16);
}
.market-status-chip {
  width: auto !important;
  height: auto !important;
  padding: 7px 12px !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0;
}
.market-status-chip.is-top {
  color: #081018;
  background: linear-gradient(135deg, #7dffc8, #2fe0c8);
}
.market-status-chip.is-vip {
  color: #1a1205;
  background: linear-gradient(135deg, #ffd56a, #f0a020);
}
.market-promo-packs {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.market-promo-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 24, 32, 0.88);
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.market-promo-pack:active {
  transform: scale(0.98);
}
.market-promo-pack.is-vip {
  border-color: rgba(240, 160, 32, 0.45);
  background: linear-gradient(135deg, rgba(240, 160, 32, 0.14), rgba(20, 24, 32, 0.92));
}
.market-promo-pack-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.market-promo-pack-main strong {
  font-size: 14px;
  font-weight: 700;
}
.market-promo-pack-main span {
  font-size: 12px;
  color: rgba(244, 247, 251, 0.62);
  line-height: 1.35;
}
.market-promo-pack-price {
  flex-shrink: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-2);
}
.market-promo-pack.is-vip .market-promo-pack-price {
  color: #ffd56a;
}
.market-promo-status {
  margin-top: 12px;
  font-size: 12px;
}
.market-buy-box {
  display: grid;
  gap: 12px;
}
.market-buy-qty {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 32, 0.72);
}
.market-buy-qty[hidden] {
  display: none;
}
.market-buy-qty-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.market-buy-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
}
.market-buy-step {
  appearance: none;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}
.market-buy-step:active {
  transform: scale(0.96);
}
.market-buy-stepper input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.market-buy-stepper input::-webkit-outer-spin-button,
.market-buy-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.market-buy-total {
  font-size: 13px;
}
.market-buy-total strong {
  color: #2fe0c8;
  font-weight: 800;
}

.market-photo-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.market-photo-previews {
  display: flex;
  gap: 10px;
}
.market-photo-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.market-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-photo-thumb button {
  appearance: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.market-photo-add {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.market-photo-add span {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.market-photo-add em {
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
}
.market-photo-add input { display: none; }
.market-sell-cats {
  margin-top: 8px;
}
.market-sell-cats .choice-btn {
  min-height: 64px;
}
.msell-exchange {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.msell-exchange-note {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.35;
}
.msell-exchange.hidden { display: none; }
.msell-side-grid {
  margin-top: 8px;
  grid-template-columns: 1fr 1fr;
}
.msell-side-grid .choice-btn {
  min-height: 52px;
  flex-direction: column;
  gap: 2px;
}
.msell-side-grid .choice-btn span {
  font-size: 11px;
  font-weight: 500;
}
.market-card-ex-side {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text, #fff);
  background: rgba(255, 255, 255, 0.12);
}
.msell-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
}
.msell-minmax {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.msell-minmax.hidden { display: none; }
.msell-minmax .field { margin: 0; }
.msell-minmax .field > span:first-child {
  white-space: nowrap;
}
.msell-minmax .field-note {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.3;
}
@media (max-width: 380px) {
  .msell-minmax { grid-template-columns: 1fr; }
}
.msell-ccy-field > span {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted, #9aa);
}
.msell-ccy-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.msell-ccy-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #fff);
  border-radius: 12px;
  min-height: 42px;
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.msell-ccy-chip.is-on {
  border-color: rgba(61, 184, 160, 0.55);
  background: rgba(61, 184, 160, 0.16);
  color: #dff8f0;
}
.msell-ccy-chip:active {
  transform: scale(0.98);
}
.msell-swap {
  appearance: none;
  align-self: center;
  margin-top: 22px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted, #9aa);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.msell-swap:active {
  transform: scale(0.96);
}
.market-ex-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}
.market-ex-filters.hidden { display: none; }
.market-ex-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.market-ex-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.market-ex-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market-card-ex {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent, #7dd3a0);
}
.market-card-ex-detail {
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
}

/* BestChange-style exchange rows */
.market-card.market-card-exrow {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 12px 14px 10px;
  min-height: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}
.market-card.market-card-exrow.is-promoted {
  border-color: rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.06);
}
.market-feed.is-list .market-card.market-card-exrow,
.market-feed.is-grid .market-card.market-card-exrow {
  flex-direction: column;
}
.market-feed.is-grid .market-card.market-card-exrow {
  grid-column: 1 / -1;
}
.exrow-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  margin-bottom: 2px;
}
.exrow-top:empty {
  display: none;
}
.exrow-promo,
.exrow-archive {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(47, 224, 200, 0.18);
  color: #2fe0c8;
}
.exrow-promo.is-vip {
  background: rgba(255, 196, 80, 0.2);
  color: #ffc450;
}
.exrow-archive {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}
.exrow-fav {
  margin-left: auto;
  color: #ff6b8a;
  font-size: 12px;
}
.exrow-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.exrow-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.exrow-side.is-get {
  text-align: right;
  align-items: flex-end;
}
.exrow-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.exrow-amt {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text, #fff);
  line-height: 1.15;
  word-break: break-word;
}
.exrow-side.is-get .exrow-amt {
  color: var(--accent-2, #2fe0c8);
}
.exrow-ccy {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.exrow-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.exrow-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.exrow-rate {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent, #7dd3a0);
}
.exrow-rate.is-empty {
  color: var(--muted);
  font-weight: 500;
}
.exrow-method {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #fff);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.market-card.market-card-exrow .market-card-meta {
  margin-top: 8px;
  padding-top: 0;
}

/* Compact lot rows (same language as exchange) */
.market-card.market-card-mrow {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 12px 14px 10px;
  min-height: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}
.market-card.market-card-mrow.is-promoted {
  border-color: rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.06);
}
.market-feed.is-list .market-card.market-card-mrow,
.market-feed.is-grid .market-card.market-card-mrow {
  flex-direction: column;
}
.market-feed.is-grid .market-card.market-card-mrow {
  grid-column: 1 / -1;
}
.mrow-pair {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 12px;
  align-items: center;
}
.mrow-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mrow-price {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-2, #2fe0c8);
  line-height: 1.15;
}
.mrow-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text, #fff);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mrow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.mrow-cat,
.mrow-qty {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.mrow-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.mrow-thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.mrow-thumb.is-empty .market-cat-ico {
  width: 22px;
  height: 22px;
  opacity: 0.75;
}
.market-card.market-card-mrow .market-card-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.market-ex-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.market-ex-pair {
  font-size: 16px;
}
.market-ex-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.market-ex-line span {
  color: var(--muted);
  flex-shrink: 0;
}
.market-ex-line em {
  font-style: normal;
  text-align: right;
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 360px) {
  .market-feed.is-grid { grid-template-columns: 1fr; }
}

.index-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}
.index-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.menu-list {
  display: grid;
  gap: 0;
  border-radius: var(--radius);
  background: rgba(36, 43, 54, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}
.menu-list + .menu-list { margin-top: 12px; }
.menu-row, .btn-link, a.menu-row {
  appearance: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.menu-list > :last-child { border-bottom: 0; }
.index-list .menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}
.menu-ico.blue { background: #3b82f6; }
.menu-ico.teal { background: #14b8a6; }
.menu-ico.purple { background: #8b5cf6; }
.menu-ico.orange { background: #f59e0b; }
.menu-ico.green { background: #22c55e; }
.menu-ico.pink { background: #ec4899; }
.menu-ico.slate { background: #64748b; }
.menu-row b {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  min-width: 1.5em;
}
.menu-row i {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.28);
  border-top: 2px solid rgba(255, 255, 255, 0.28);
  transform: rotate(45deg);
  opacity: 0.65;
  margin-left: auto;
  flex-shrink: 0;
}
.menu-row:active { background: rgba(255, 255, 255, 0.04); }
.menu-row:hover, .menu-row.selected {
  color: var(--ink);
  background: rgba(45, 212, 191, 0.06);
}
.menu-row.selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.actions > .btn,
.actions > button.primary,
.actions > button.secondary {
  width: 100%;
  min-height: 50px;
  height: 50px;
}

button.back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
button.back:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(45, 212, 191, 0.35);
}
button:disabled { opacity: 0.45; cursor: default; }

.chip {
  appearance: none;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s ease;
}
.chip.active {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: none;
}
.chip.accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 0;
  margin-top: 8px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: none;
}
.chip:active { transform: scale(0.96); }
.chip.green {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
}

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.view-head h1 { margin: 0; }
.view-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.wallet-chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 12px;
}
.wallet-chip {
  appearance: none;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 13px 14px;
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 22, 28, 0.55);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.wallet-chip strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wallet-chip span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.wallet-chip.active {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.16), rgba(45, 212, 191, 0.05));
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.1);
}
.wallet-chip.active span {
  color: color-mix(in srgb, var(--ink) 70%, var(--accent-2));
}
.wallet-chip:active {
  transform: scale(0.985);
}
#rep-filters {
  margin-top: 4px;
}
#rep-filters .chip[data-rep-filter="positive"].active {
  border-color: rgba(52, 199, 89, 0.45);
  color: var(--ok);
}
#rep-filters .chip[data-rep-filter="negative"].active {
  border-color: rgba(255, 69, 58, 0.45);
  color: var(--danger);
}

.field {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.field-hint {
  font-weight: 500;
  opacity: 0.75;
}
.field input,
.field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.search-row button.primary,
.search-row button.secondary,
.search-row .btn {
  width: auto;
  min-width: 100px;
  height: 50px;
  min-height: 50px;
  white-space: nowrap;
}

.radio-group {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 4px;
}
.choice-grid-soft {
  margin-top: 4px;
}
.choice-btn {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  min-height: 68px;
  background: rgba(18, 22, 28, 0.55);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 5px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.choice-btn strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.choice-btn span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.choice-btn.active {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0.04));
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.1);
}
.choice-btn.pos-choice.active {
  border-color: rgba(52, 199, 89, 0.5);
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.14), rgba(52, 199, 89, 0.04));
  box-shadow: none;
}
.choice-btn.neg-choice.active {
  border-color: rgba(255, 69, 58, 0.45);
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.12), rgba(255, 69, 58, 0.04));
  box-shadow: none;
}
.choice-btn:active { transform: scale(0.985); }
.field-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.result, .notice, .rep-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 0;
  background: var(--panel);
  font-size: 13px;
  line-height: 1.5;
}
.result a { color: var(--accent-2); }
#wd-result,
#dep-result,
#blago-result,
#deal-topup {
  margin-top: 14px;
  padding: 0;
  background: transparent;
  border: 0;
}
#wd-result > .wd-item,
#dep-result > .wd-item,
#blago-result > .wd-item,
#deal-topup > .wd-item { margin: 0; }
.wd-check-paid {
  margin-top: 10px;
}
.notice {
  margin: 0 0 14px;
  color: #baf7c8;
  background: rgba(52, 199, 89, 0.1);
}
.notice .chip.accent {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
}
.review-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: rgba(45, 212, 191, 0.08);
  overflow: hidden;
}
.review-cta-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.review-cta-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.review-cta-text span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.review-cta .review-cta-btn,
button.review-cta-btn {
  appearance: none;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 96px;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  z-index: 2;
}

.list { display: grid; gap: 8px; }

#view-support.support-view.is-active,
#view-exchange-order.support-view.is-active {
  display: flex !important;
  flex-direction: column;
  height: calc(100dvh - var(--bottom-clearance) - 28px);
  max-height: calc(100dvh - var(--bottom-clearance) - 28px);
  min-height: 0;
  gap: 0;
  overflow: hidden;
}
#shell.shell-support,
#shell.shell-exchange-order {
  overflow: hidden;
  padding-bottom: 0;
}
.support-top {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.support-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}
.support-top .support-nav-btn,
.support-top .support-back,
.support-top .support-close-btn {
  appearance: none;
  width: auto;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  margin: 0;
  padding: 0 13px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.support-top .support-back {
  color: var(--accent-2);
  border-color: rgba(47, 224, 200, 0.32);
  background: rgba(47, 224, 200, 0.12);
}
.support-top .support-close-btn {
  margin-left: auto;
  color: #ff9b94;
  border-color: rgba(255, 93, 85, 0.42);
  background: rgba(255, 93, 85, 0.14);
}
.support-top .support-close-btn.hidden {
  display: none;
}
.support-top h1 { margin: 0; font-size: 22px; }
.support-top .muted { margin: 2px 0 0; font-size: 12px; }
.support-review {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.support-review strong { font-size: 15px; }
.support-review .muted { margin: 0; font-size: 12px; }
.support-stars {
  display: flex;
  gap: 6px;
}
.support-stars button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-2);
  color: #5a6573;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.support-stars button.on {
  color: #ffc857;
  background: rgba(255, 200, 87, 0.14);
}
.support-review textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-deep);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.support-review-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
}
.support-closed {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(61, 222, 122, 0.28);
  background: rgba(61, 222, 122, 0.1);
  color: #baf7c8;
  font-size: 13px;
}
.support-closed p { margin: 0; }
.support-thread {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(47, 224, 200, 0.06);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(47, 224, 200, 0.06), transparent 55%),
    rgba(0, 0, 0, 0.28);
  align-content: start;
}
.support-thread .muted {
  margin: auto;
  text-align: center;
}
.support-bubble {
  max-width: 82%;
  padding: 8px 11px 6px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.support-bubble.mine {
  align-self: flex-end;
  background: #2a8f7a;
  color: #f4fffb;
  border: 1px solid rgba(122, 240, 223, 0.45);
  border-bottom-right-radius: 5px;
}
.support-bubble.theirs {
  align-self: flex-start;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-left-radius: 5px;
}
.support-bubble .support-who {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
  opacity: 0.85;
  -webkit-user-select: none;
  user-select: none;
}
.support-bubble.mine .support-who { color: #c8ffe9; }
.support-bubble.theirs .support-who { color: var(--accent); }
.support-bubble .support-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}
.support-bubble .support-text a.support-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-user-select: text;
  user-select: text;
}
.support-bubble.mine .support-text a.support-link {
  color: #c8ffe9;
}
.support-bubble .support-meta {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
  -webkit-user-select: none;
  user-select: none;
}
.support-bubble img.support-shot {
  display: block;
  max-width: min(240px, 70vw);
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 12px;
  margin: 2px 0 4px;
  object-fit: cover;
  background: #0c0f13;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: zoom-in;
}
.support-bubble .support-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 4px;
  font-size: 13px;
  opacity: 0.9;
}
.support-preview {
  flex: 0 0 auto;
  position: relative;
  margin-top: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}
.support-preview img {
  display: block;
  max-height: 96px;
  max-width: 100%;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.support-preview-x {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.support-composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 8px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.support-composer.ex-order-composer {
  grid-template-columns: 1fr 42px;
}
.support-attach {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}
.support-attach input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.support-composer textarea {
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  resize: none;
  border: 0;
  border-radius: 14px;
  background: var(--bg-deep);
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  box-sizing: border-box;
}
.support-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}
.support-send:disabled {
  opacity: 0.5;
  cursor: default;
}
.deal, .entry, .wd-item {
  padding: 14px;
  border-radius: var(--radius);
  border: 0;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font: inherit;
  transition: background 0.2s ease;
}
.deal-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 6px;
}
.deal-amount {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-2);
}
.deal-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
}
.deal-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.deal-card-id {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.deal-card-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.deal-card-meta {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}
.deal-card-pay,
.deal-card-cp {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.deal-card-pay {
  color: color-mix(in srgb, var(--ink) 68%, var(--accent-2));
}
.deal-card-terms {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.deal-card-terms span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.deal-card-terms p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  white-space: pre-wrap;
  word-break: break-word;
}
.deal-tip {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.42);
}
.deal-tip-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffe08a;
}
.deal-tip ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, #ffe08a);
}
.deal-tip li::marker {
  color: #ffc107;
}
.deal-tip.compact {
  margin: 10px 0 12px;
}
.deal-tip.compact p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, #ffe08a);
}
.deal.tone-success {
  box-shadow: inset 3px 0 0 var(--ok);
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.1), var(--panel) 40%);
}
.deal.tone-danger {
  box-shadow: inset 3px 0 0 var(--danger);
  background: linear-gradient(90deg, rgba(255, 69, 58, 0.1), var(--panel) 40%);
}
.deal.tone-warn {
  box-shadow: inset 3px 0 0 var(--star);
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.1), var(--panel) 40%);
}
.deal.tone-wait {
  box-shadow: inset 3px 0 0 var(--accent);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.1), var(--panel) 40%);
}
.deal.tone-work {
  box-shadow: inset 3px 0 0 #5ab0ff;
  background: linear-gradient(90deg, rgba(90, 176, 255, 0.1), var(--panel) 40%);
}
.deal.tone-muted { opacity: 0.92; }
.deal .row, .wd-item .row, .entry .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.meta { color: var(--muted); font-size: 12px; }
.wd-item {
  cursor: default;
}
.wd-item.tone-success,
.wd-item.tone-in {
  box-shadow: inset 3px 0 0 var(--ok);
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.12), var(--panel) 42%);
}
.wd-item.tone-out {
  box-shadow: inset 3px 0 0 var(--danger);
  background: linear-gradient(90deg, rgba(255, 69, 58, 0.12), var(--panel) 42%);
}
.wd-item.tone-danger {
  box-shadow: inset 3px 0 0 #ff8a3d;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.14), var(--panel) 42%);
}
.wd-item.tone-warn,
.wd-item.tone-wait {
  box-shadow: inset 3px 0 0 var(--star);
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.12), var(--panel) 42%);
}
.wd-item.tone-work {
  box-shadow: inset 3px 0 0 #5ab0ff;
  background: linear-gradient(90deg, rgba(90, 176, 255, 0.12), var(--panel) 42%);
}
.wd-item.tone-muted {
  box-shadow: inset 3px 0 0 rgba(160, 170, 185, 0.55);
  background: linear-gradient(90deg, rgba(160, 170, 185, 0.1), var(--panel) 42%);
  opacity: 0.95;
}
.hist-amt {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.hist-amt.in { color: #57e98f; }
.hist-amt.out { color: #ff6b61; }
.hist-card.tone-wait .hist-amt.in,
.hist-card.tone-wait .hist-amt.out { color: #ffd666; }
.hist-card.tone-danger .hist-amt { color: #ff8a3d; }
.hist-card.tone-muted .hist-amt { color: var(--muted); }
.wd-item .deal-status-row {
  margin: 6px 0 2px;
  align-items: flex-start;
}
.wd-item .deal-status-row .meta {
  text-align: right;
  line-height: 1.35;
}
.wd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.wd-actions .btn {
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
}
.wd-check-url {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  word-break: break-all;
  user-select: text;
}
.wd-wait {
  margin-top: 8px;
}
.terms { font-size: 13px; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.deal-terms-block {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.deal-terms-block .cp-kicker {
  margin-bottom: 8px;
}
.deal-terms-body {
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  white-space: pre-wrap;
  word-break: break-word;
}
.confirm-terms {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.confirm-terms .cp-kicker { margin-bottom: 8px; }
.confirm-warn {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 69, 58, 0.1);
  border: 1.5px solid rgba(255, 69, 58, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 69, 58, 0.22);
}
.confirm-warn-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff6b63;
}
.confirm-warn .confirm-body {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 92%, #ff6b63);
}
.pos { color: var(--ok); }
.neg { color: var(--danger); }

.deal-detail h2 {
  margin: 10px 0 6px;
  font-size: 18px;
  font-weight: 700;
}
.deal-detail .amount {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 6px 0 10px;
  color: var(--accent-2);
}
.deal-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.pay-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pay-banner {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.22);
}
.pay-banner strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.pay-banner .meta {
  margin: 6px 0 0;
}
.party-status {
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
}
.party-status-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}
.party-status-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.party-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.party-chip-mark {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.party-chip-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.party-chip-state {
  font-size: 11px;
  color: var(--muted);
}
.party-chip.is-done {
  border-color: rgba(61, 222, 122, 0.35);
  background: rgba(61, 222, 122, 0.1);
}
.party-chip.is-done .party-chip-mark {
  color: var(--ok-ink);
  background: var(--ok);
}
.party-chip.is-done .party-chip-state {
  color: #8fe6ad;
}
.party-chip.is-wait .party-chip-mark {
  color: #6a7380;
  background: rgba(255, 255, 255, 0.08);
}
.cp-block {
  margin: 14px 0 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--line);
}
.cp-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}
.cp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.user-link.cp-name {
  appearance: none;
  border: 1px solid rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.12);
  color: var(--accent-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-link.cp-name:active {
  transform: scale(0.98);
}
.cp-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.cp-chip:active {
  transform: scale(0.98);
}
.cp-chip:disabled {
  opacity: 0.45;
  cursor: default;
}
.deal-actions { display: grid; gap: 10px; margin-top: 14px; }
.deal-actions .btn { width: 100%; }
.deal-confirm { margin-top: 14px; }
.confirm-sheet {
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.12), transparent 55%), var(--panel);
  animation: viewIn 0.35s var(--ease) both;
}
.deal-confirm:not(.hidden) {
  animation: viewIn 0.3s var(--ease) both;
}
.confirm-sheet.confirm-danger {
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.12), transparent 55%), var(--panel);
}
.confirm-sheet h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  font-weight: 750;
}
.confirm-body {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.confirm-actions .btn { width: 100%; }
.dispute-side-actions {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}
.dispute-side-actions .btn { width: 100%; }
.deal-detail {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel);
}
.deal-detail.tone-success {
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-danger {
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-warn {
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-wait {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-work {
  background: linear-gradient(180deg, rgba(90, 176, 255, 0.1), transparent 40%), var(--panel);
}
.status-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}
.notice-warn {
  color: #ffe9a0 !important;
  background: rgba(255, 193, 7, 0.1) !important;
}

.dispute-panel, .dispute-open {
  margin-top: 18px;
  padding-top: 4px;
}
.dispute-open .btn { margin-top: 4px; }
.dispute-thread {
  margin: 10px 0 12px;
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}
.dispute-msg {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel-2);
  font-size: 13px;
  line-height: 1.45;
}
.dispute-msg.dispute-me {
  background: rgba(52, 199, 89, 0.12);
  margin-left: 18px;
}
.dispute-msg.dispute-arbiter {
  background: rgba(45, 212, 191, 0.12);
  margin-right: 18px;
}
.dispute-msg.dispute-peer {
  background: rgba(255, 255, 255, 0.06);
  margin-right: 18px;
}
.dispute-msg.dispute-system {
  opacity: 0.85;
  font-size: 12px;
}
.market-deal-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.1);
}
.market-deal-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.purchase-card {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.purchase-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}
.purchase-thumb-empty {
  background: rgba(255, 255, 255, 0.06);
}
.purchase-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.purchase-body .money {
  color: var(--accent, #2dd4bf);
  font-weight: 700;
}
.market-buy-confirm {
  margin-top: 12px;
}
.market-buy-confirm.hidden {
  display: none;
}
.market-buy-sheet .market-buy-confirm-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 12px;
}
.market-buy-confirm-photo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}
.market-buy-confirm-photo.is-empty {
  display: block;
}
.market-buy-confirm-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.market-buy-confirm-meta strong {
  font-size: 15px;
  line-height: 1.3;
}
.market-buy-confirm-sum {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent, #2dd4bf);
  margin: 0 0 12px;
}
.market-buy-wallet {
  margin: 0 0 14px;
}
.market-buy-wallet .cp-kicker {
  margin-bottom: 8px;
}
.deal-detail .dispute-panel {
  margin-top: 14px;
  margin-bottom: 4px;
}
.deal-detail .dispute-panel.hidden {
  display: none;
}
#btn-close-deal-chat {
  margin-top: 10px;
  width: 100%;
}
.dispute-meta-block {
  margin: 10px 0 4px;
  display: grid;
  gap: 8px;
}
.deal-detail .deal-actions {
  margin-top: 12px;
}
.dispute-who {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 700;
}
.dispute-media {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.dispute-shot-wrap {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f141a;
  max-width: 100%;
  cursor: zoom-in;
}
.dispute-shot-wrap.is-ready:active {
  transform: scale(0.99);
}
.dispute-shot {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #0f141a;
  pointer-events: none;
}
.dispute-shot-wrap:has(video.dispute-shot) {
  cursor: default;
}
video.dispute-shot {
  pointer-events: auto;
}
.dispute-composer { display: grid; gap: 10px; }
.dispute-composer textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  padding: 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.dispute-tools {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: stretch;
}
.dispute-file-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent, #2dd4bf) 55%, var(--line));
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent, #2dd4bf);
  font-family: var(--ui);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.dispute-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dispute-tools .btn {
  width: 100%;
  margin: 0;
}
.dispute-attach-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dispute-attach-previews.hidden {
  display: none;
}
.dispute-attach-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.dispute-attach-item img,
.dispute-attach-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dispute-attach-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.dispute-attach-add {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent, #2dd4bf) 55%, var(--line));
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent, #2dd4bf);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}
.dispute-attach-add input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  max-width: 100%;
}
.status-pill.status-lg {
  margin-bottom: 2px;
  padding: 7px 14px 7px 11px;
  font-size: 12px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-pill.tone-success,
.status-pill.tone-in {
  color: #baf7c8;
  background: rgba(52, 199, 89, 0.12);
}
.status-pill.tone-success .status-dot,
.status-pill.tone-in .status-dot { background: #34c759; }
.status-pill.tone-out {
  color: #ffb4ae;
  background: rgba(255, 69, 58, 0.14);
}
.status-pill.tone-out .status-dot { background: #ff453a; }
.status-pill.tone-danger {
  color: #ffd0a8;
  background: rgba(255, 138, 61, 0.14);
}
.status-pill.tone-danger .status-dot { background: #ff8a3d; }
.status-pill.tone-warn,
.status-pill.tone-wait {
  color: #ffe5a3;
  background: rgba(255, 193, 7, 0.14);
}
.status-pill.tone-warn .status-dot,
.status-pill.tone-wait .status-dot {
  background: var(--star);
  animation: status-pulse 1.6s ease-in-out infinite;
}
.status-pill.tone-work {
  color: #bfe3ff;
  background: rgba(90, 176, 255, 0.12);
}
.status-pill.tone-work .status-dot {
  background: #5ab0ff;
  animation: status-pulse 1.5s ease-in-out infinite;
}
.status-pill.tone-muted { color: var(--muted); }
@keyframes status-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.rep-stats { display: grid; gap: 6px; margin-top: 8px; font-size: 13px; }

/* —— Major floating tabbar —— */
.tabbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  flex: 0 0 auto;
  width: 100%;
  height: var(--tabbar-h);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  padding: 6px;
  background: rgba(18, 22, 30, 0.96);
  backdrop-filter: blur(24px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  z-index: 40;
  pointer-events: auto;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(47, 224, 200, 0.06) inset;
}
.tab-pill {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 16px rgba(47, 224, 200, 0.4);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate(0, 0);
  transition:
    transform 0.38s var(--ease),
    width 0.38s var(--ease),
    height 0.38s var(--ease),
    opacity 0.2s ease;
  will-change: transform;
}
.tab-pill.is-ready {
  opacity: 1;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 2px;
  border-radius: 16px;
  cursor: pointer;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  z-index: 1;
  transition: color 0.28s var(--ease), transform 0.2s var(--ease);
}
.tab > span:last-child {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 0;
  line-height: 1.15;
}
.tab-ico {
  width: 34px;
  height: 28px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  transition:
    background 0.28s var(--ease),
    color 0.28s var(--ease);
}
.tab-ico svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab.active {
  color: var(--muted);
  background: transparent;
}
.tab.active .tab-ico {
  color: var(--accent-ink);
  background: transparent;
}
.tab.active span:last-child {
  color: var(--accent-2);
  transition: color 0.28s var(--ease);
}
.tab:active { transform: scale(0.96); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 24px + var(--safe-b));
  transform: translateX(-50%) translateY(8px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  max-width: min(90vw, 360px);
  text-align: center;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
}
.toast.toast-in {
  animation: toastIn 0.35s var(--ease) both;
}
.toast.toast-out {
  animation: toastOut 0.28s ease both;
}

#shell.hidden ~ .tabbar {
  display: none;
}

.gate {
  margin-top: 28px;
  text-align: center;
  opacity: 1;
}
.gate.gate-in {
  animation: fadeRise 0.45s var(--ease) both;
}
.gate.gate-out {
  animation: fadeDrop 0.2s ease both;
}
.gate .brand-mark {
  margin-bottom: 18px;
}
.gate h1 {
  font-size: 24px;
}
.gate .actions { margin-top: 14px; }

.ghost:not(.action-btn) {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.user-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.35);
  text-underline-offset: 2px;
}
.rep-card-wrap {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #1a212b;
  min-height: 0;
  position: relative;
  aspect-ratio: 16 / 10;
}
.rep-card-wrap.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(47, 224, 200, 0.08) 45%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: cardShine 1.1s ease-in-out infinite;
}
.rep-card-wrap.is-failed {
  min-height: 72px;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
}
.rep-card-wrap.is-failed::before {
  content: "Карточка не загрузилась";
  color: var(--muted);
  font-size: 12px;
}
.rep-card-wrap.has-img {
  aspect-ratio: auto;
  min-height: 0;
}
.rep-card-wrap.has-img::after,
.rep-card-wrap.has-img::before {
  display: none;
}
.rep-card-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.rep-card-img.is-pending {
  opacity: 0;
  position: absolute;
}
@keyframes cardShine {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}
.entry-has-photo { cursor: pointer; }
.entry.is-openable { cursor: pointer; }
.entry.is-openable:active { transform: scale(0.99); }
.entry-proof {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}
.entry-media {
  margin-top: 10px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f141a;
  min-height: 120px;
}
.entry-media.is-ready {
  cursor: zoom-in;
}
.entry-media.is-ready:active {
  transform: scale(0.995);
}
.entry-shot {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #0f141a;
  pointer-events: none;
}
.entry-media-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(8, 12, 16, 0.72);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.entry-media-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  touch-action: none;
  overscroll-behavior: none;
}
.media-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.media-lightbox.hidden {
  display: none;
}
.media-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: max(48px, env(safe-area-inset-top)) 12px max(40px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.media-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  background: transparent;
}
.media-lightbox-x {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.media-lightbox-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  pointer-events: none;
}
.support-shot {
  cursor: zoom-in;
}
.rep-entry-detail {
  display: grid;
  gap: 12px;
}
.rep-entry-detail .rep-entry-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.rep-entry-actions {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
}
#view-rep-entry {
  padding-bottom: calc(88px + var(--safe-b));
}
#view-rep-entry .rep-entry-actions .btn {
  min-height: 44px;
}
.rep-dispute-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}
.rep-dispute-photos:empty { display: none; }
.rep-dispute-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12161b;
}
.rep-dispute-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rep-dispute-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.rep-dispute-actions {
  display: grid;
  gap: 8px;
}
.rep-dispute-attach {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.rep-name { display: block; margin-bottom: 6px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes viewOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.99); }
}
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDrop {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(6px); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(61, 222, 122, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(61, 222, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 222, 122, 0); }
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-16px, 20px); }
}
@keyframes floaty {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(18px) scale(1.06); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

/* --- Exchange preview (deep-link only) --- */
#view-exchange,
#view-exchange-req,
#view-exchange-terms {
  display: grid;
  gap: 14px;
  align-content: start;
}
#view-exchange-req > button.back,
#view-exchange-terms > button.back {
  width: auto;
  max-width: max-content;
  justify-self: start;
  margin: 0;
}
.ex-top {
  display: grid;
  gap: 4px;
  margin: 0;
}
.ex-title {
  margin: 0;
  font-family: var(--display, var(--ui));
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ex-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.ex-wallet-field {
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}
.ex-wallet-field .cp-kicker {
  display: block;
  margin: 0 0 10px;
}
.ex-wallet-field .choice-grid {
  margin: 0;
  gap: 8px;
}
.ex-wallet-field .choice-btn {
  min-height: 58px;
  padding: 11px 12px;
  border-radius: 14px;
}
.ex-stack {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
}
.ex-pane {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}
.ex-pane[data-side="to"] {
  border-color: rgba(47, 224, 200, 0.22);
  background:
    linear-gradient(165deg, rgba(47, 224, 200, 0.1), rgba(255, 255, 255, 0.02));
}
.ex-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ex-max,
.ex-est {
  appearance: none;
  border: 0;
  background: rgba(47, 224, 200, 0.14);
  color: var(--accent-2);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.ex-est {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: default;
}
.ex-pane-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.ex-pane-body-solo {
  grid-template-columns: minmax(0, 1fr);
}
.ex-amount {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--display, var(--ui));
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.05;
  padding: 0;
  outline: none;
}
.ex-amount-out {
  color: var(--accent-2);
}
.ex-amount::placeholder {
  color: rgba(244, 247, 251, 0.28);
}
.ex-asset {
  appearance: none;
  max-width: 132px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    rgba(0, 0, 0, 0.28)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237af0df' d='M1.1 1.2 6 6.1l4.9-4.9'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 0 30px 0 12px;
}
.ex-bal {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.ex-swap {
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #171c24;
  color: var(--accent-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}
.ex-swap:active {
  transform: translate(-50%, -50%) scale(0.94) rotate(180deg);
}
.ex-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #171c24;
  color: var(--accent-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ex-asset-fixed {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.12);
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ex-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
.ex-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.ex-meta-row strong {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}
.ex-cta {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  font-weight: 750;
}
.ex-cta:disabled {
  opacity: 0.55;
}
.ex-hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.ex-step-top {
  display: grid;
  gap: 4px;
  margin: 0 0 4px;
}
.ex-step-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ex-step-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.ex-form {
  display: grid;
  gap: 12px;
}
.ex-form .field {
  margin: 0;
}
.ex-form input,
.ex-select {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 22, 28, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 0 14px;
  outline: none;
}
.ex-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ex-bank-grid .ex-bank-btn {
  appearance: none;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 22, 28, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ex-bank-grid .ex-bank-btn.active {
  border-color: rgba(47, 224, 200, 0.55);
  background: rgba(47, 224, 200, 0.14);
  color: var(--accent-2);
}
.ex-bank-grid .ex-bank-btn:active {
  transform: scale(0.98);
}
.ex-dd-field {
  position: relative;
}
.ex-dd-trigger {
  appearance: none;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    rgba(18, 22, 28, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237af0df' d='M1.1 1.2 6 6.1l4.9-4.9'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  padding: 0 36px 0 14px;
  cursor: pointer;
}
.ex-dd-trigger[aria-expanded="true"] {
  border-color: rgba(47, 224, 200, 0.45);
}
.ex-dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a2029;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  -webkit-overflow-scrolling: touch;
}
.ex-dd-menu.hidden {
  display: none;
}
.ex-dd-option {
  appearance: none;
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 12px;
  cursor: pointer;
}
.ex-dd-option:active,
.ex-dd-option.active {
  background: rgba(47, 224, 200, 0.14);
  color: var(--accent-2);
}
.ex-form input::placeholder {
  color: rgba(244, 247, 251, 0.32);
  font-weight: 500;
}
.ex-terms-box {
  max-height: min(42vh, 340px);
  overflow: auto;
  padding: 14px 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 22, 0.85);
  color: rgba(244, 247, 251, 0.88);
  font-size: 13px;
  line-height: 1.45;
  -webkit-overflow-scrolling: touch;
}
.ex-terms-box ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.ex-terms-box li {
  padding-left: 2px;
}
.ex-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ex-agree input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-2, #2fe0c8);
  flex: 0 0 auto;
}
.ex-terms-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
  color: var(--muted);
}
.ex-terms-summary strong {
  color: var(--ink);
  font-weight: 700;
}
#shell.shell-exchange {
  padding-bottom: 28px;
}
#shell.shell-exchange.shell-exchange-order {
  padding-bottom: 0;
}
#shell.shell-exchange ~ #tabbar,
body:has(#shell.shell-exchange) #tabbar {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .view, .view.is-active, .view.is-leaving, .view.view-enter,
  .signal, .cta-deal, .signal-live em, .home-hero,
  .status-pill .status-dot, .blob, .cta-deal::after,
  .signal-glow, .toast.toast-in, .toast.toast-out,
  #shell.shell-in, #shell.shell-out, .gate.gate-in, .gate.gate-out,
  .confirm-sheet,
  .ex-swap {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ex-swap {
    transform: translate(-50%, -50%) !important;
  }
  .tab-pill {
    transition: none !important;
  }
}

/* —— QR pay: raised centre button —— */
#tabbar.tabbar {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px minmax(0, 1fr) minmax(0, 1fr);
  overflow: visible;
}
.tab-qr {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tab-qr-ring {
  width: 62px;
  height: 62px;
  margin-top: -30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border: 5px solid #12161e;
  box-shadow:
    0 0 0 3px rgba(47, 224, 200, 0.55),
    0 10px 24px rgba(47, 224, 200, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tab-qr-ring svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab-qr:active .tab-qr-ring {
  transform: scale(0.93);
}
.qr-panel {
  padding-bottom: calc(18px + var(--safe-b));
}
.qr-panel #qr-body {
  padding: 4px 16px 6px;
  display: grid;
  gap: 12px;
}
.qr-amount-big {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.qr-rows {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.qr-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.qr-rows span {
  color: var(--muted);
}
.qr-wallets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.qr-wallet {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.qr-wallet span {
  font-size: 12px;
  color: var(--muted);
}
.qr-wallet b {
  font-size: 16px;
}
.qr-wallet.is-active {
  border-color: var(--accent, #4f8cff);
  background: rgba(79, 140, 255, 0.12);
}
.qr-wallet.is-low b {
  color: var(--muted);
}
.qr-status {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-weight: 650;
  text-align: center;
}
.qr-status.is-ok { color: var(--accent-2); }
.qr-status.is-bad { color: #ff8a8a; }
.qr-panel input {
  width: 100%;
  box-sizing: border-box;
}

/* Shared community feed */
.tab-community { transform: translateY(-5px); gap: 3px; color: var(--accent-2); font-size: 10px; letter-spacing: .07em; }
.tab-community .tab-ico { width: 50px; height: 38px; border-radius: 15px; color: #082521; background: linear-gradient(135deg,var(--accent-2),var(--accent)); box-shadow: 0 5px 20px #2fe0c82b; }
.tab-community .tab-ico svg { width: 24px; height: 24px; }
.tab-community.active .tab-ico { box-shadow: 0 0 0 3px #2fe0c824,0 5px 20px #2fe0c83d; }
#shell.shell-community { overflow: hidden; padding-bottom: 0; }
html.community-open #app { padding: 0 0 calc(8px + var(--safe-b)); gap: 0; }
html.community-open #tabbar { width: calc(100% - 20px); margin: 8px auto 0; }
html.community-open,html.community-open body { height: var(--community-vh,var(--app-vh)) !important; min-height: 0; }

/* Telegram-style dialog (Night palette) */
.tgc,.tgc-menu-layer,.tgc-profile-layer {
  --tgc-bg: #0e1621; --tgc-panel: #17212b; --tgc-in: #182533; --tgc-out: #2b5278;
  --tgc-text: #f5f5f5; --tgc-hint: #708499; --tgc-out-hint: #7da8d3; --tgc-link: #6ab3f3; --tgc-accent: #5eb5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}
.tgc {
  height: 100%; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: var(--tgc-bg); color: var(--tgc-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; -webkit-tap-highlight-color: transparent;
}
.tgc-header { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; padding: calc(8px + var(--safe-t, 0px)) 10px 8px 12px; background: var(--tgc-panel); box-shadow: 0 1px 0 #0000004d; position: relative; z-index: 4; }
.tgc-chat-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #72d5fd, #2a9ef1); }
.tgc-chat-avatar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tgc-head-text { min-width: 0; flex: 1; }
.tgc-head-text h1 { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.tgc .community-status { margin: 1px 0 0; padding: 0; min-height: 0; font-size: 13.5px; line-height: 1.3; color: var(--tgc-hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc .community-status.is-error { color: var(--tgc-hint); }
.tgc .community-status.is-error::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: tgcSpin .8s linear infinite; }
.tgc .community-header-actions { display: flex; gap: 2px; }
.tgc .tgc-head-btn { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; color: #aab8c5; display: grid; place-items: center; cursor: pointer; }
.tgc .tgc-head-btn:active { background: #ffffff12; }
.tgc .tgc-head-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tgc-pinned { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 7px 12px; background: var(--tgc-panel); border-top: 1px solid #0000002e; position: relative; z-index: 3; box-shadow: 0 1px 0 #0000004d; }
.tgc-pinned-bar { width: 2px; align-self: stretch; border-radius: 2px; background: var(--tgc-accent); }
.tgc-pinned>div { min-width: 0; flex: 1; }
.tgc-pinned strong,.tgc-pinned span { display: block; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-pinned strong { color: var(--tgc-accent); font-weight: 600; }.tgc-pinned>div span { color: var(--tgc-hint); }
.tgc-pinned button { border: 0; border-radius: 14px; padding: 6px 12px; background: var(--tgc-accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

.tgc-thread {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; position: relative;
  padding: 8px 8px 10px; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent;
  background-color: transparent; z-index: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 22c4-6 12-6 16 0s-4 12-8 14c-4-2-12-8-8-14Z'/%3E%3Ccircle cx='96' cy='26' r='7'/%3E%3Cpath d='M128 14l4 8 9 1-6.5 6 1.5 9-8-4.3-8 4.3 1.5-9-6.5-6 9-1Z'/%3E%3Cpath d='M48 70h22l-4 14H52Z'/%3E%3Cpath d='M58 70v-6'/%3E%3Cpath d='M112 66c8 0 14 6 14 13'/%3E%3Cpath d='M112 74c4 0 7 3 7 6'/%3E%3Ccircle cx='112' cy='84' r='2'/%3E%3Cpath d='M14 112l12-8 12 8-12 8Z'/%3E%3Cpath d='M74 118c0-6 10-6 10 0 0 6-10 10-10 10s-10-4-10-10c0-6 10-6 10 0Z'/%3E%3Crect x='118' y='110' width='22' height='16' rx='4'/%3E%3Cpath d='M118 116h22'/%3E%3Cpath d='M30 150c6-6 14-6 20 0'/%3E%3Cpath d='M100 146l8 6 10-12'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: local;
}
#community-messages,.tgc-day-group { display: flex; flex-direction: column; }

.tgc-day { align-self: center; position: sticky; top: 4px; z-index: 2; margin: 10px 0 8px; padding: 3px 10px; border-radius: 12px; background: #1b2a3acc; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #e8eef4; font-size: 13.5px; font-weight: 500; line-height: 1.35; pointer-events: none; }

.tgc-msg { display: flex; align-items: flex-end; gap: 6px; position: relative; margin-top: 2px; padding-left: 0; max-width: 100%; scroll-margin: 60px; }
.tgc-msg.is-first { margin-top: 8px; }
.tgc-msg.is-mine { justify-content: flex-end; }
.tgc-avatar { width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 0; border-radius: 50%; color: #fff; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .02em; display: grid; place-items: center; cursor: pointer; background: linear-gradient(160deg, color-mix(in srgb, var(--tgc-ava) 70%, #fff), var(--tgc-ava)); background-color: var(--tgc-ava); }
.tgc-msg:not(.is-last) .tgc-avatar { visibility: hidden; height: 0; }
.tgc-bubble { position: relative; min-width: 64px; max-width: min(82%, 420px); padding: 6px 9px 6px 10px; border-radius: 16px; --tgc-bubble: var(--tgc-in); background: var(--tgc-bubble); box-shadow: 0 1px 1px #00000033; overflow-wrap: anywhere; word-break: break-word; cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.tgc-msg.is-mine .tgc-bubble { --tgc-bubble: var(--tgc-out); }
.tgc-msg:not(.is-mine) .tgc-bubble { border-top-left-radius: 16px; }
.tgc-msg:not(.is-mine):not(.is-first) .tgc-bubble { border-top-left-radius: 6px; }
.tgc-msg:not(.is-mine):not(.is-last) .tgc-bubble { border-bottom-left-radius: 6px; }
.tgc-msg.is-mine:not(.is-first) .tgc-bubble { border-top-right-radius: 6px; }
.tgc-msg.is-mine:not(.is-last) .tgc-bubble { border-bottom-right-radius: 6px; }
.tgc-msg.is-last:not(.is-mine) .tgc-bubble { border-bottom-left-radius: 0; }
.tgc-msg.is-last.is-mine .tgc-bubble { border-bottom-right-radius: 0; }
.tgc-msg.is-last .tgc-bubble::before { content: ""; position: absolute; bottom: 0; width: 10px; height: 17px; pointer-events: none; }
.tgc-msg.is-last:not(.is-mine) .tgc-bubble::before { left: -9px; background: radial-gradient(10px 17px at 0 0, transparent 94%, var(--tgc-bubble) 100%); }
.tgc-msg.is-last.is-mine .tgc-bubble::before { right: -9px; background: radial-gradient(10px 17px at 100% 0, transparent 94%, var(--tgc-bubble) 100%); }
.tgc-msg.is-mine { padding-right: 9px; }
.tgc-msg:not(.is-mine) { padding-right: 36px; }
.tgc-msg:not(.is-mine) .tgc-bubble { margin-left: 6px; }
.tgc-bubble.is-pressed { filter: brightness(1.18); transform: scale(.985); }

.tgc-name-row { display: flex; align-items: baseline; gap: 8px; margin: 0 0 2px; min-width: 0; }
.tgc-msg:not(.is-first) .tgc-name-row { display: none; }
.tgc-name { min-width: 0; padding: 0; border: 0; background: none; color: var(--tgc-name); font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-badge { margin-left: auto; flex-shrink: 0; color: var(--tgc-hint); font-size: 12.5px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }

.tgc-quote { display: flex; flex-direction: column; width: 100%; min-width: 0; margin: 2px 0 4px; padding: 4px 8px 4px 9px; border: 0; border-left: 3px solid var(--tgc-q); border-radius: 6px; background: #ffffff0d; background: color-mix(in srgb, var(--tgc-q) 14%, transparent); text-align: left; font: inherit; cursor: pointer; }
.tgc-msg.is-mine .tgc-quote { --tgc-q: #9fd0ff; }
.tgc-quote strong,.tgc-quote span { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 1.3; }
.tgc-quote strong { color: var(--tgc-q); font-weight: 600; }
.tgc-quote span { color: #e4ebf2; }

.tgc-text { margin: 0; white-space: pre-wrap; line-height: 1.38; font-size: 15.5px; color: var(--tgc-text); }
.tgc-spacer { display: inline-block; width: 44px; height: 1px; }
.tgc-msg.is-mine .tgc-spacer { width: 62px; }
.tgc-msg.is-removed .tgc-text { color: var(--tgc-hint); font-style: italic; }
.tgc-link { color: var(--tgc-link); text-decoration: none; }
.tgc-msg.is-mine .tgc-link { color: #b8dcff; text-decoration: underline; text-decoration-color: #b8dcff66; }
.tgc-time { position: absolute; right: 9px; bottom: 5px; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; line-height: 1; color: var(--tgc-hint); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.tgc-msg.is-mine .tgc-time { color: var(--tgc-out-hint); }
.tgc-checks { width: 17px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: #8fd0ff; }
.tgc-msg.no-text .tgc-time { position: static; float: right; margin: 2px 0 0 10px; }
.tgc-msg.no-text .tgc-bubble::after { content: ""; display: block; clear: both; }

.tgc-msg.is-jumbo .tgc-bubble,.tgc-msg.is-sticker .tgc-bubble { background: none; box-shadow: none; padding: 0 0 18px; }
.tgc-msg.is-jumbo .tgc-bubble::before,.tgc-msg.is-sticker .tgc-bubble::before { display: none; }
.tgc-msg.is-jumbo .tgc-text { font-size: 44px; line-height: 1.15; }
.tgc-msg.is-jumbo .tgc-text .community-custom-emoji { width: 1.15em; height: 1.15em; vertical-align: -.15em; }
.tgc-msg.is-jumbo .tgc-spacer { display: none; }
.tgc-msg.is-jumbo .tgc-time,.tgc-msg.is-sticker .tgc-time { position: absolute; right: 0; bottom: 0; float: none; margin: 0; padding: 3px 7px; border-radius: 10px; background: #0b141d99; color: #fff; }
.tgc-msg.is-jumbo .tgc-name-row,.tgc-msg.is-sticker .tgc-name-row { display: none; }

.tgc-media:empty { display: none; }
.tgc-media { margin: 2px 0 4px; }
.tgc-file { display: flex; align-items: center; gap: 11px; width: 100%; min-width: 210px; padding: 3px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tgc-file-ico { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--tgc-accent); }
.tgc-msg.is-mine .tgc-file-ico { background: #ffffff; color: var(--tgc-out); }
.tgc-file-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tgc-file.is-loading .tgc-file-ico { animation: tgcPulse 1s ease-in-out infinite; }
.tgc-file-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
.tgc-file-text strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-file-text small { font-size: 13px; color: var(--tgc-hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-msg.is-mine .tgc-file-text small { color: var(--tgc-out-hint); }
.tgc-media video,.tgc-media img { display: block; max-width: 100%; max-height: 300px; border-radius: 12px; margin: 2px 0; }
.tgc-media audio { display: block; width: 250px; max-width: 100%; margin: 4px 0; }
.tgc-media a { display: inline-block; padding: 8px 0; color: var(--tgc-link); font-size: 14px; }
.tgc-msg.is-sticker .tgc-media img,.tgc-msg.is-sticker .tgc-media video { width: 160px; height: 160px; object-fit: contain; border-radius: 0; max-height: none; }
.tgc-sticker-ph { width: 160px; height: 160px; border-radius: 22px; background: #ffffff08; display: grid; place-items: center; color: var(--tgc-hint); font-size: 13px; }

.tgc-swipe-ico { position: absolute; right: -40px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; display: grid; place-items: center; background: #0b141d99; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; pointer-events: none; }
.tgc-swipe-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tgc-msg.is-swiping .tgc-swipe-ico { opacity: .55; }
.tgc-msg.is-swipe-ready .tgc-swipe-ico { opacity: 1; transform: scale(1); }
.tgc-msg.is-flash .tgc-bubble { animation: tgcFlash 1.3s ease; }

.tgc .community-older { display: block; margin: 4px auto 6px; padding: 5px 12px; border: 0; border-radius: 12px; background: #1b2a3acc; color: #e8eef4; font: inherit; font-size: 13px; cursor: pointer; }
.tgc-empty { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tgc-empty-card { max-width: 260px; padding: 18px 20px; border-radius: 18px; background: #1b2a3acc; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-align: center; color: #e8eef4; }
.tgc-empty-ico { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; background: #ffffff12; }
.tgc-empty-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tgc-empty-card strong { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.tgc-empty-card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #b9c6d2; }

.tgc-fab { position: absolute; right: 12px; bottom: 74px; z-index: 6; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--tgc-panel); color: #aab8c5; display: grid; place-items: center; box-shadow: 0 2px 8px #00000066; cursor: pointer; }
.tgc-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tgc-fab-badge { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--tgc-accent); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 22px; text-align: center; }

.tgc-bottom { flex: 0 0 auto; background: var(--tgc-panel); position: relative; z-index: 4; box-shadow: 0 -1px 0 #0000004d; }
.tgc-reply { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 8px 3px 12px; border: 0; }
.tgc-reply-ico { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: var(--tgc-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tgc-reply>div { min-width: 0; flex: 1; padding-left: 9px; border-left: 2px solid var(--tgc-name, var(--tgc-accent)); }
.tgc-reply strong,.tgc-reply span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; line-height: 1.3; }
.tgc-reply strong { color: var(--tgc-name, var(--tgc-accent)); font-weight: 600; margin: 0; }
.tgc-reply span { color: #c9d4de; }
.tgc-reply>button { width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--tgc-hint); font-size: 26px; line-height: 1; cursor: pointer; }
.tgc .community-error { margin: 0; padding: 6px 14px 0; color: #ff8a80; font-size: 13px; }
.tgc-compose { display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px 7px 10px; margin: 0; border: 0; border-radius: 0; background: none; }
.tgc-input { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; background: #242f3d; }
.tgc-input textarea { width: 100%; min-width: 0; resize: none; max-height: 132px; padding: 9px 0; margin: 0; border: 0; outline: none; background: none; box-shadow: none; border-radius: 0; color: var(--tgc-text); font: inherit; font-size: 16px; line-height: 1.38; }
.tgc-input textarea::placeholder { color: #6c7883; }
.tgc-input textarea:disabled { opacity: 1; }
.tgc-send { width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: #6c7883; background: transparent; cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.tgc-send.is-ready { background: var(--tgc-accent); color: #fff; }
.tgc-send.is-ready:active { transform: scale(.92); }
.tgc-send.is-sending { opacity: 1; color: #fff !important; background: var(--tgc-accent) !important; box-shadow: 0 0 0 3px #3489e355; }
.tgc-send.is-sending svg { opacity: .55; }
.tgc-send:disabled { cursor: default; }
.tgc-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.tgc-menu-layer { position: fixed; inset: 0; z-index: 120; }
.tgc-menu-backdrop { position: absolute; inset: 0; border: 0; padding: 0; background: #0000004d; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: default; }
.tgc-menu-layer .tgc-menu-preview { position: absolute; margin: 0; pointer-events: none; color: var(--tgc-text); animation: tgcLift .16s ease-out; }
.tgc-menu-layer .tgc-menu-preview .tgc-swipe-ico { display: none; }
.tgc-menu { position: absolute; min-width: 218px; padding: 6px 0; border-radius: 14px; background: #1f2b38f2; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 34px #00000080; animation: tgcMenuIn .16s ease-out; transform-origin: top left; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
.tgc-menu button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding: 0 16px; border: 0; background: none; color: #f2f5f8; font: inherit; font-size: 15.5px; text-align: left; cursor: pointer; }
.tgc-menu button:active { background: #ffffff12; }
.tgc-menu button svg { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #aab8c5; }
.tgc-menu button.is-danger,.tgc-menu button.is-danger svg { color: #ff6b6b; }

/* —— Visual polish: living wallpaper, glass panels, premium prefixes —— */
/* clip, not hidden: the oversized ::before glow must not make the dialog scrollable, or iOS scrolls it on focus. */
.tgc { isolation: isolate; overflow: clip; }
html.community-typing #tabbar { display: none; }
html.community-typing.community-open #app { padding-bottom: 0; }
.tgc::before {
  content: ""; position: absolute; inset: -35%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(36% 28% at 22% 24%, #1f5a6ab0, transparent 70%),
    radial-gradient(32% 28% at 80% 28%, #3b3182a8, transparent 70%),
    radial-gradient(38% 32% at 28% 78%, #17506a9e, transparent 70%),
    radial-gradient(34% 30% at 82% 80%, #4d2b6ea0, transparent 70%),
    #0b141e;
  transition: transform 1.2s cubic-bezier(.3,.7,.2,1);
}
.tgc[data-wall="1"]::before { transform: translate3d(7%, -5%, 0) rotate(9deg); }
.tgc[data-wall="2"]::before { transform: translate3d(-4%, 6%, 0) rotate(-7deg) scale(1.04); }
.tgc[data-wall="3"]::before { transform: translate3d(-7%, -3%, 0) rotate(14deg); }
.tgc-header { background: #17212bc7; backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 1px 0 #ffffff0b, 0 10px 26px -18px #000; }
.tgc-pinned { background: #17212bbd; backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); }
.tgc-bottom { background: #17212bcc; backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 -1px 0 #ffffff0b; }
.tgc-chat-avatar { box-shadow: 0 0 0 2px #ffffff12, 0 6px 16px -6px #2a9ef1; }
.tgc-input { background: #0d1620b8; box-shadow: inset 0 0 0 1px #ffffff10; transition: box-shadow .2s ease; }
.tgc-input:focus-within { box-shadow: inset 0 0 0 1px #5eb5f770, 0 0 0 3px #5eb5f716; }
.tgc-send.is-ready { background: linear-gradient(140deg, #72c6ff, #3489e3); box-shadow: 0 6px 16px -6px #3489e3; }
.tgc-send.is-ready svg { animation: tgcSendIn .28s cubic-bezier(.2,.9,.3,1.3); }
.tgc-day { background: #0f1a26a8; backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); box-shadow: 0 1px 2px #00000040; }
.tgc .community-older,.tgc-empty-card { background: #0f1a26b0; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tgc-fab { background: #17212be6; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 4px 14px #00000073, inset 0 0 0 1px #ffffff0d; }
.tgc-fab-badge { background: linear-gradient(140deg, #72c6ff, #3489e3); box-shadow: 0 2px 8px -2px #3489e3; }

.tgc-bubble { background: linear-gradient(180deg, var(--tgc-bubble-top, var(--tgc-bubble)), var(--tgc-bubble)); box-shadow: 0 1px 2px #00000045; }
.tgc-msg:not(.is-mine) .tgc-bubble { --tgc-bubble-top: #1c2b3c; }
.tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #2b5278; --tgc-bubble-top: #386aa2; }
.tgc-msg.is-mention .tgc-bubble { --tgc-bubble-top: #213a57; box-shadow: inset 3px 0 0 #5eb5f7, 0 1px 2px #00000045; }
.tgc-avatar { box-shadow: 0 1px 3px #00000059; }
.tgc-msg.is-new .tgc-bubble { animation: tgcBubbleIn .34s cubic-bezier(.2,.9,.3,1.15) both; transform-origin: 0 100%; }
.tgc-msg.is-new.is-mine .tgc-bubble { transform-origin: 100% 100%; }
.tgc-msg.is-new .tgc-avatar { animation: tgcFade .3s ease both; }

.tgc-name { display: inline-flex; align-items: center; gap: 3px; }
.tgc-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgc-verified { width: 16px; height: 16px; flex: 0 0 16px; }
.tgc-verified-bg { fill: #5eb5f7; }
.tgc-verified-check { fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

.tgc-badge {
  margin-left: auto; flex-shrink: 0; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 3px; max-width: 54%;
  padding: 2px 8px 2px 6px; border-radius: 10px;
  color: var(--pi, #fff); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; white-space: nowrap;
  background: linear-gradient(120deg, var(--p1), var(--p2));
  box-shadow: inset 0 0 0 1px #ffffff30, 0 2px 10px -3px var(--p2);
  text-shadow: 0 1px 1px #00000040;
}
.tgc-badge.is-light { text-shadow: 0 1px 0 #ffffff59; }
.tgc-name-row { flex-wrap: wrap; row-gap: 3px; column-gap: 8px; }
.tgc-name-row .tgc-badge { max-width: 100%; white-space: normal; }
.tgc-badge > span { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.tgc-badge svg { width: 11px; height: 11px; flex: 0 0 11px; fill: currentColor; filter: drop-shadow(0 0 2px #ffffff80); }
.tgc-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 32%, #ffffff70 48%, transparent 64%); transform: translateX(-130%); animation: tgcShine 5s ease-in-out infinite; pointer-events: none; }
.tgc-badge.is-large { margin: 9px auto 0; max-width: 90%; padding: 4px 12px 4px 10px; border-radius: 12px; font-size: 13px; }
.tgc-badge.is-large svg { width: 13px; height: 13px; flex-basis: 13px; }

.tgc-profile-layer .tgc-profile { background: #17212b; background: radial-gradient(130% 260px at 50% -40px, color-mix(in srgb, var(--tgc-cover, #5eb5f7) 62%, transparent), transparent 72%), linear-gradient(180deg, color-mix(in srgb, var(--tgc-cover, #5eb5f7) 22%, #17212b), #17212b 260px); }
.tgc-profile-hero h2 { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tgc-profile-hero h2 > span { overflow-wrap: anywhere; }
.tgc-profile-hero h2 .tgc-verified { width: 21px; height: 21px; flex-basis: 21px; }
.tgc-profile-prefix { display: flex; justify-content: center; width: 100%; }
.tgc-profile-prefix:empty { display: none; }
.tgc-profile-layer .tgc-profile-avatar { box-shadow: 0 0 0 4px #ffffff14, 0 14px 34px -10px #000; }
.tgc-profile-layer .tgc-profile-actions button { background: #ffffff0d; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tgc-profile-layer .tgc-profile-info { background: #ffffff0a; }

@keyframes tgcShine { 0%, 64% { transform: translateX(-130%); } 84%, 100% { transform: translateX(130%); } }
@keyframes tgcBubbleIn { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes tgcSendIn { from { transform: translateY(6px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tgc-badge::after,.tgc-msg.is-new .tgc-bubble,.tgc-msg.is-new .tgc-avatar,.tgc-send.is-ready svg { animation: none; }
  .tgc::before { transition: none; }
}

.tgc-avatar.has-photo,.tgc-profile-avatar.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; color: transparent; }

.tgc-profile-layer { position: fixed; inset: 0; z-index: 125; display: flex; align-items: flex-end; justify-content: center; }
.tgc-profile-backdrop { position: absolute; inset: 0; border: 0; padding: 0; background: #00000080; cursor: default; animation: tgcFade .2s ease; }
.tgc-profile { position: relative; width: min(100%, 460px); max-height: calc(92% - var(--safe-t, 0px)); overflow-y: auto; overscroll-behavior: contain; padding: 8px 0 calc(16px + var(--safe-b)); border-radius: 18px 18px 0 0; background: #17212b; color: var(--tgc-text); box-shadow: 0 -10px 40px #00000080; animation: tgcSheetIn .26s cubic-bezier(.2,.9,.3,1); }
.tgc-profile-grab { width: 38px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: #ffffff2e; }
.tgc-profile-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #ffffff10; color: #aab8c5; font-size: 24px; line-height: 1; cursor: pointer; }
.tgc-profile-hero { display: flex; flex-direction: column; align-items: center; padding: 12px 20px 16px; text-align: center; }
.tgc-profile-avatar { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px; color: #fff; font-size: 40px; font-weight: 600; background: linear-gradient(160deg, color-mix(in srgb, var(--tgc-ava) 70%, #fff), var(--tgc-ava)); background-color: var(--tgc-ava); box-shadow: 0 6px 24px #0006; }
.tgc-profile-hero h2 { margin: 0; max-width: 100%; font-size: 21px; font-weight: 600; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.tgc-profile-hero p { margin: 4px 0 0; font-size: 14px; color: var(--tgc-hint); }
.tgc-profile-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 14px 14px; }
.tgc-profile-actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 9px; border: 0; border-radius: 12px; background: #232e3c; color: var(--tgc-accent); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.tgc-profile-actions button:active { background: #2b3949; }
.tgc-profile-actions button.is-disabled { color: #5d6c7b; }
.tgc-profile-actions svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tgc-profile-info { margin: 0 14px; border-radius: 12px; background: #232e3c; overflow: hidden; }
.tgc-profile-info:empty { display: none; }
.tgc-info-row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid #ffffff0d; background: none; color: var(--tgc-text); font: inherit; text-align: left; cursor: default; }
.tgc-info-row:last-child { border-bottom: 0; }
.tgc-info-row[data-profile-copy] { cursor: pointer; }
.tgc-info-row[data-profile-copy]:active { background: #ffffff0a; }
.tgc-info-row strong { font-size: 15.5px; font-weight: 400; overflow-wrap: anywhere; }
.tgc-info-row small { font-size: 13px; color: var(--tgc-hint); }
.tgc-info-row.is-link strong { color: var(--tgc-link); }
.tgc-info-row.is-danger strong { color: #ff6b6b; }
@keyframes tgcSheetIn { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@keyframes tgcFade { from { opacity: 0; } to { opacity: 1; } }

/* —— Batch 1: header, selection, unread, composer helpers, settings, viewer —— */
.tgc-head-main { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tgc-head-main .tgc-head-text { display: block; }
.tgc-head-title { display: block; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc .community-status { display: block; }
.tgc-text { font-size: var(--tgc-fs, 15.5px); }
.tgc-select-bar { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--safe-t, 0px)) 8px 8px; background: var(--tgc-panel); }
.tgc-select-bar strong { flex: 1; font-size: 16.5px; font-weight: 600; padding-left: 4px; }
.tgc .tgc-head-btn.is-danger { color: #ff6b6b; }
.tgc.is-selecting .tgc-msg { cursor: pointer; padding-left: 36px; transition: background-color .15s; }
.tgc.is-selecting .tgc-msg.is-mine { padding-left: 36px; }
.tgc.is-selecting .tgc-msg::before { content: ""; position: absolute; left: 6px; bottom: 7px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ffffff8c; box-sizing: border-box; }
.tgc.is-selecting .tgc-msg.is-selected { background: #5eb5f71c; }
.tgc.is-selecting .tgc-msg.is-selected::before { border-color: var(--tgc-accent); background: var(--tgc-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.tgc.is-selecting .tgc-bubble,.tgc.is-selecting .tgc-bubble * { pointer-events: none; }
.tgc-unread-sep { margin: 10px -8px 6px; padding: 5px 0; text-align: center; background: #0f1a26b8; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #8fc6f5; font-size: 13.5px; font-weight: 500; }

.tgc-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.tgc-sk { display: flex; align-items: flex-end; gap: 8px; }
.tgc-sk.is-mine { justify-content: flex-end; padding-right: 9px; }
.tgc-sk-ava { width: 36px; height: 36px; flex: none; border-radius: 50%; }
.tgc-sk b { display: block; height: 40px; border-radius: 16px; }
.tgc-sk-ava,.tgc-sk b { background: linear-gradient(90deg, #ffffff0c 25%, #ffffff1f 37%, #ffffff0c 63%); background-size: 400% 100%; animation: tgcSk 1.4s ease infinite; }

.tgc-fab { bottom: calc(var(--tgc-bottom-h, 58px) + 14px); }
.tgc-fab-mention { bottom: calc(var(--tgc-bottom-h, 58px) + 70px); color: var(--tgc-accent); }
.tgc-fab-mention .tgc-fab-badge { top: -6px; }

.tgc-suggest { max-height: 228px; overflow-y: auto; overscroll-behavior: contain; border-bottom: 1px solid #ffffff0d; padding: 4px 0; }
.tgc-suggest-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 6px 14px; border: 0; background: none; color: var(--tgc-text); font: inherit; text-align: left; cursor: pointer; }
.tgc-suggest-item:active { background: #ffffff0d; }
.tgc-suggest-item .tgc-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 13px; }
.tgc-suggest-text { min-width: 0; display: flex; flex-direction: column; }
.tgc-suggest-text strong { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-suggest-text small { font-size: 13px; color: var(--tgc-hint); }

.tgc-templates { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px 2px; scrollbar-width: none; }
.tgc-templates::-webkit-scrollbar { display: none; }
.tgc-chip { display: inline-flex; align-items: center; flex: none; border-radius: 16px; background: #ffffff12; color: var(--tgc-text); font-size: 13.5px; }
.tgc-chip button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tgc-chip > button:first-child { padding: 7px 4px 7px 12px; }
.tgc-chip-x { padding: 7px 10px 7px 4px; color: var(--tgc-hint) !important; font-size: 15px !important; }
.tgc-chip-add { padding: 7px 12px; border: 0; color: var(--tgc-accent); cursor: pointer; font: inherit; }

.tgc-input { padding: 0 4px; gap: 2px; }
.tgc-input textarea { padding-left: 4px; padding-right: 4px; }
.tgc-input-btn { width: 34px; height: 34px; flex: none; align-self: flex-end; margin-bottom: 3px; padding: 0; border: 0; border-radius: 50%; background: none; color: #7f91a4; display: grid; place-items: center; cursor: pointer; }
.tgc-input-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tgc-input-btn.is-active { color: var(--tgc-accent); }
.tgc-counter { align-self: flex-end; margin-bottom: 11px; font-size: 12px; color: var(--tgc-hint); font-variant-numeric: tabular-nums; }
.tgc-counter.is-limit { color: #ff6b6b; }

.tgc-emoji { height: 264px; display: flex; flex-direction: column; border-top: 1px solid #ffffff0d; }
.tgc-emoji-tabs { display: flex; gap: 2px; padding: 6px 8px; flex: none; border-bottom: 1px solid #ffffff0a; }
.tgc-emoji-tabs button { width: 40px; height: 34px; border: 0; border-radius: 10px; background: none; font-size: 19px; cursor: pointer; filter: grayscale(.6); opacity: .7; }
.tgc-emoji-tabs button.is-active { background: #ffffff14; filter: none; opacity: 1; }
.tgc-emoji-grid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); align-content: start; padding: 6px 8px calc(8px + var(--safe-b)); }
.tgc-emoji-grid button { height: 44px; border: 0; border-radius: 10px; background: none; font-size: 27px; line-height: 1; cursor: pointer; }
.tgc-emoji-grid button:active { background: #ffffff14; transform: scale(.9); }

.tgc-profile-layer .tgc-profile-actions { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0 10px 14px; }
.tgc-profile-layer .tgc-profile-actions button { font-size: 11.5px; padding: 10px 2px 9px; }

.tgc-info-avatar { background: linear-gradient(160deg, #72d5fd, #2a9ef1); color: #fff; }
.tgc-info-avatar svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tgc-settings { padding: 0 14px 6px; }
.tgc-settings h3 { display: flex; justify-content: space-between; margin: 16px 4px 8px; font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--tgc-hint); }
.tgc-settings h3 span { color: var(--tgc-accent); text-transform: none; }
.tgc-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tgc-swatches button { position: relative; height: 72px; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px #ffffff1a; }
.tgc-swatches button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; font-size: 10.5px; font-weight: 600; color: #fff; background: #0006; }
.tgc-swatches button.is-active { box-shadow: 0 0 0 2px var(--tgc-panel), 0 0 0 4px var(--tgc-accent); }
.tgc-swatches.is-round { grid-template-columns: repeat(6, 1fr); justify-items: center; }
.tgc-swatches.is-round button { width: 40px; height: 40px; border-radius: 50%; }
.tgc-segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: #ffffff0d; }
.tgc-segment button { padding: 9px 4px; border: 0; border-radius: 9px; background: none; color: var(--tgc-text); font: inherit; font-size: 13px; cursor: pointer; }
.tgc-segment button.is-active { background: var(--tgc-accent); color: #fff; font-weight: 600; }
.tgc-range { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; background: #ffffff0a; color: var(--tgc-hint); }
.tgc-range input { flex: 1; accent-color: var(--tgc-accent); }
.tgc-toggles { margin-top: 14px; border-radius: 12px; background: #ffffff0a; overflow: hidden; }
.tgc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #ffffff0d; font-size: 15px; cursor: pointer; }
.tgc-toggle:last-child { border-bottom: 0; }
.tgc-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tgc-toggle i { position: relative; width: 44px; height: 26px; flex: none; border-radius: 13px; background: #ffffff26; transition: background-color .2s; }
.tgc-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0005; transition: transform .2s; }
.tgc-toggle input:checked + i { background: var(--tgc-accent); }
.tgc-toggle input:checked + i::after { transform: translateX(18px); }
.tgc-settings-link { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 13px 16px; border: 0; border-radius: 12px; background: #ffffff0a; color: var(--tgc-accent); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.tgc-settings-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.tgc-video-thumb { position: relative; display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; max-width: 100%; cursor: pointer; }
.tgc-video-thumb video { display: block; max-width: 100%; max-height: 300px; margin: 0; border-radius: 0; }
.tgc-video-thumb.is-round { width: 200px; height: 200px; border-radius: 50%; }
.tgc-video-thumb.is-round video { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.tgc-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center; background: #0009; color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tgc-play svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }
.tgc-viewer { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; background: rgba(0, 0, 0, var(--tgc-viewer-bg, 1)); color: #fff; opacity: 0; transition: opacity .18s ease; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.tgc-viewer.is-open { opacity: 1; }
.tgc-viewer-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t, 0px)) 10px 10px; background: linear-gradient(#000a, transparent); position: relative; z-index: 2; }
.tgc-viewer-btn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #ffffff1a; color: #fff; display: grid; place-items: center; cursor: pointer; }
.tgc-viewer-btn svg,.tgc-viewer-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tgc-viewer-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tgc-viewer-meta strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-viewer-meta span,.tgc-viewer-count { font-size: 13px; color: #ffffffb3; }
.tgc-viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 calc(12px + var(--safe-b)); touch-action: pan-y; }
.tgc-viewer-stage video { max-width: 100%; max-height: 100%; }
.tgc-viewer-loading { width: 44px; height: 44px; border: 3px solid #ffffff33; border-top-color: #fff; border-radius: 50%; animation: tgcSpin .8s linear infinite; }
.tgc-viewer-error { color: #ffffffb3; font-size: 15px; padding: 20px; text-align: center; }
.tgc-viewer-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; background: #ffffff1f; color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.tgc-viewer-nav.is-prev { left: 10px; } .tgc-viewer-nav.is-next { right: 10px; }
.tgc-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 140; pointer-events: none; display: none; }
.tgc-confetti.is-on { display: block; }

.tgc-avatar[class*="ring-"],.tgc-profile-avatar[class*="ring-"] { position: relative; overflow: visible; }
.tgc-avatar[class*="ring-"]::after,.tgc-profile-avatar[class*="ring-"]::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; padding: 2px; background: var(--ring); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.tgc-profile-avatar[class*="ring-"]::after { inset: -5px; padding: 3px; }
.ring-gold { --ring: conic-gradient(from 0deg, #ffe48a, #f39a2e, #ffd36b, #f39a2e, #ffe48a); }
.ring-vip { --ring: conic-gradient(from 0deg, #ffe38f, #c77dff, #5cc0ff, #c77dff, #ffe38f); }
.ring-admin { --ring: conic-gradient(from 0deg, #8fd3ff, #3489e3, #8fd3ff, #3489e3, #8fd3ff); }
.ring-vip::after,.ring-gold::after { animation: tgcRing 6s linear infinite; }

.tgc-msg.is-new.is-mine .tgc-bubble { animation: tgcFly .4s cubic-bezier(.2,.9,.3,1.08) both; }

/* Wallpapers */
.tgc[data-wallpaper="ocean"]::before { background: radial-gradient(36% 28% at 20% 22%, #12608ab0, transparent 70%), radial-gradient(32% 28% at 82% 30%, #1b7b8fa8, transparent 70%), radial-gradient(38% 32% at 26% 80%, #0f4f7aa0, transparent 70%), radial-gradient(34% 30% at 84% 82%, #164a8aa0, transparent 70%), #08131f; }
.tgc[data-wallpaper="sunset"]::before { background: radial-gradient(36% 28% at 22% 24%, #8a2c5ab0, transparent 70%), radial-gradient(32% 28% at 80% 28%, #a8513aa8, transparent 70%), radial-gradient(38% 32% at 28% 78%, #5b2a6e9e, transparent 70%), radial-gradient(34% 30% at 82% 80%, #8a3a50a0, transparent 70%), #140b16; }
.tgc[data-wallpaper="forest"]::before { background: radial-gradient(36% 28% at 22% 24%, #1d6a48b0, transparent 70%), radial-gradient(32% 28% at 80% 28%, #3b7a3aa8, transparent 70%), radial-gradient(38% 32% at 28% 78%, #145a4e9e, transparent 70%), radial-gradient(34% 30% at 82% 80%, #2d5a2aa0, transparent 70%), #08140f; }
.tgc[data-wallpaper="midnight"]::before { background: radial-gradient(40% 30% at 30% 30%, #1a2240a0, transparent 70%), radial-gradient(40% 30% at 70% 75%, #161c34a0, transparent 70%), #06090f; }
.tgc.no-pattern .tgc-thread { background-image: none; }

/* Outgoing bubble colours */
[data-bubble="violet"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #55399e; --tgc-bubble-top: #7352c4; }
[data-bubble="green"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #24624a; --tgc-bubble-top: #328560; }
[data-bubble="orange"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #8f4a1f; --tgc-bubble-top: #b8642c; }
[data-bubble="pink"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #833463; --tgc-bubble-top: #a8457a; }
[data-bubble="teal"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #1a6470; --tgc-bubble-top: #22808a; }

/* Light theme */
.tgc.is-light,.tgc-menu-layer.is-light,.tgc-profile-layer.is-light {
  --tgc-bg: #dfe7d4; --tgc-panel: #ffffff; --tgc-in: #ffffff; --tgc-out: #e2f8cf;
  --tgc-text: #0f1419; --tgc-hint: #8b99a7; --tgc-out-hint: #4f9b62; --tgc-link: #168acd; --tgc-accent: #3390ec;
}
.tgc.is-light::before { background: radial-gradient(38% 30% at 20% 22%, #c7e3b8, transparent 70%), radial-gradient(34% 30% at 82% 28%, #e8e8a8, transparent 70%), radial-gradient(40% 34% at 26% 80%, #b2dccd, transparent 70%), radial-gradient(36% 32% at 84% 82%, #ecd9a6, transparent 70%), #d7e4c8; }
.tgc.is-light[data-wallpaper="ocean"]::before { background: radial-gradient(38% 30% at 20% 22%, #b9dcf2, transparent 70%), radial-gradient(34% 30% at 82% 28%, #c3ecf0, transparent 70%), radial-gradient(40% 34% at 26% 80%, #a9cfe8, transparent 70%), radial-gradient(36% 32% at 84% 82%, #c6d8f5, transparent 70%), #cfe3ef; }
.tgc.is-light[data-wallpaper="sunset"]::before { background: radial-gradient(38% 30% at 20% 22%, #f6c9d9, transparent 70%), radial-gradient(34% 30% at 82% 28%, #fbd9be, transparent 70%), radial-gradient(40% 34% at 26% 80%, #e6c8ef, transparent 70%), radial-gradient(36% 32% at 84% 82%, #f7cfc4, transparent 70%), #f1dbe0; }
.tgc.is-light[data-wallpaper="forest"]::before { background: radial-gradient(38% 30% at 20% 22%, #bfe4c9, transparent 70%), radial-gradient(34% 30% at 82% 28%, #d6ebb8, transparent 70%), radial-gradient(40% 34% at 26% 80%, #b4ddd0, transparent 70%), radial-gradient(36% 32% at 84% 82%, #cfe3b0, transparent 70%), #d3e6cf; }
.tgc.is-light[data-wallpaper="midnight"]::before { background: radial-gradient(40% 30% at 30% 30%, #dfe4ee, transparent 70%), radial-gradient(40% 30% at 70% 75%, #e6e9f0, transparent 70%), #eef1f5; }
.tgc.is-light .tgc-thread { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23000000' stroke-opacity='.075' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 22c4-6 12-6 16 0s-4 12-8 14c-4-2-12-8-8-14Z'/%3E%3Ccircle cx='96' cy='26' r='7'/%3E%3Cpath d='M128 14l4 8 9 1-6.5 6 1.5 9-8-4.3-8 4.3 1.5-9-6.5-6 9-1Z'/%3E%3Cpath d='M48 70h22l-4 14H52Z'/%3E%3Cpath d='M58 70v-6'/%3E%3Cpath d='M112 66c8 0 14 6 14 13'/%3E%3Cpath d='M112 74c4 0 7 3 7 6'/%3E%3Ccircle cx='112' cy='84' r='2'/%3E%3Cpath d='M14 112l12-8 12 8-12 8Z'/%3E%3Cpath d='M74 118c0-6 10-6 10 0 0 6-10 10-10 10s-10-4-10-10c0-6 10-6 10 0Z'/%3E%3Crect x='118' y='110' width='22' height='16' rx='4'/%3E%3Cpath d='M118 116h22'/%3E%3Cpath d='M30 150c6-6 14-6 20 0'/%3E%3Cpath d='M100 146l8 6 10-12'/%3E%3C/g%3E%3C/svg%3E"); }
.tgc.is-light.no-pattern .tgc-thread { background-image: none; }
.tgc.is-light .tgc-header,.tgc.is-light .tgc-pinned,.tgc.is-light .tgc-bottom { background: #ffffffdb; box-shadow: 0 1px 0 #0000000f; }
.tgc.is-light .tgc-select-bar { background: #fff; }
.tgc.is-light .tgc-head-title { color: #0f1419; }
.tgc.is-light .tgc-head-btn,.tgc.is-light .tgc-input-btn { color: #8b99a7; }
.tgc.is-light .tgc-input { background: #f1f3f5; box-shadow: inset 0 0 0 1px #0000000d; }
.tgc.is-light .tgc-input textarea::placeholder { color: #9aa6b2; }
.tgc.is-light .tgc-send:not(.is-ready) { color: #9aa6b2; }
.tgc.is-light .tgc-day,.tgc.is-light .community-older,.tgc.is-light .tgc-empty-card,.tgc.is-light .tgc-unread-sep { background: #3a4d3a52; color: #fff; }
.tgc.is-light .tgc-empty-card p { color: #f6f8f4; }
.is-light .tgc-msg:not(.is-mine) .tgc-bubble { --tgc-bubble: #ffffff; --tgc-bubble-top: #ffffff; box-shadow: 0 1px 1px #0000001f; }
.is-light .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #e2f8cf; --tgc-bubble-top: #effdde; box-shadow: 0 1px 1px #0000001f; }
.is-light[data-bubble="blue"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #d4e6fd; --tgc-bubble-top: #e3efff; }
.is-light[data-bubble="violet"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #e0d4ff; --tgc-bubble-top: #ece4ff; }
.is-light[data-bubble="green"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #e2f8cf; --tgc-bubble-top: #effdde; }
.is-light[data-bubble="orange"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #ffe1c4; --tgc-bubble-top: #ffeedd; }
.is-light[data-bubble="pink"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #ffd6e8; --tgc-bubble-top: #ffe6f1; }
.is-light[data-bubble="teal"] .tgc-msg.is-mine .tgc-bubble { --tgc-bubble: #cdefeb; --tgc-bubble-top: #e0f7f5; }
.is-light .tgc-msg.is-mention .tgc-bubble { --tgc-bubble-top: #e6f2ff; }
.is-light .tgc-msg.is-mine .tgc-link { color: #168acd; text-decoration: none; }
.is-light .tgc-checks { color: #4f9b62; }
.is-light .tgc-quote span { color: #2d3a46; }
.is-light .tgc-msg.is-mine .tgc-quote { --tgc-q: #4f9b62; }
.is-light .tgc-msg.is-mine .tgc-file-ico { background: #4f9b62; color: #fff; }
.tgc.is-light .tgc-reply span { color: #4a5866; }
.tgc.is-light .tgc-fab { background: #fffffff2; color: #8b99a7; box-shadow: 0 2px 8px #00000026; }
.tgc.is-light .tgc-chip { background: #0000000d; }
.tgc.is-light .tgc-emoji-tabs button.is-active,.tgc.is-light .tgc-emoji-grid button:active { background: #0000000d; }
.tgc.is-light .tgc-suggest,.tgc.is-light .tgc-emoji { border-color: #0000000d; }
.tgc.is-light .tgc-sk-ava,.tgc.is-light .tgc-sk b { background: linear-gradient(90deg, #ffffff80 25%, #ffffffd0 37%, #ffffff80 63%); background-size: 400% 100%; }
.tgc.is-light.is-selecting .tgc-msg::before { border-color: #0000004d; background-color: #ffffffb3; }
.tgc-menu-layer.is-light .tgc-menu { background: #fffffff0; box-shadow: 0 10px 34px #0000002e; }
.tgc-menu-layer.is-light .tgc-menu button { color: #0f1419; }
.tgc-menu-layer.is-light .tgc-menu button svg { color: #8b99a7; }
.tgc-menu-layer.is-light .tgc-menu button.is-danger,.tgc-menu-layer.is-light .tgc-menu button.is-danger svg { color: #e53935; }
.tgc-profile-layer.is-light .tgc-profile { background: #fff; background: radial-gradient(130% 260px at 50% -40px, color-mix(in srgb, var(--tgc-cover, #3390ec) 40%, transparent), transparent 72%), #fff; color: #0f1419; }
.tgc-profile-layer.is-light .tgc-info-sheet { background: #f4f6f8; }
.tgc-profile-layer.is-light .tgc-profile-hero h2 { color: #0f1419; }
.tgc-profile-layer.is-light .tgc-profile-actions button,.tgc-profile-layer.is-light .tgc-profile-info,.tgc-profile-layer.is-light .tgc-toggles,.tgc-profile-layer.is-light .tgc-range,.tgc-profile-layer.is-light .tgc-settings-link,.tgc-profile-layer.is-light .tgc-segment { background: #0000000a; }
.tgc-profile-layer.is-light .tgc-info-row,.tgc-profile-layer.is-light .tgc-toggle { border-color: #0000000d; }
.tgc-profile-layer.is-light .tgc-profile-close { background: #0000000d; color: #707579; }
.tgc-profile-layer.is-light .tgc-toggle i { background: #0000001f; }

html.tgc-no-effects .tgc-badge::after,html.tgc-no-effects .tgc-msg.is-new .tgc-bubble,html.tgc-no-effects .tgc-msg.is-new .tgc-avatar,html.tgc-no-effects .ring-vip::after,html.tgc-no-effects .ring-gold::after { animation: none; }
html.tgc-no-effects .tgc::before { transition: none; }

/* —— Batch 2: formatting, reactions, photos, pins, composer modes, uploads —— */
.tgc-text b,.tgc-quote b { font-weight: 650; }
.tgc-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 5px; border-radius: 5px; background: #ffffff14; color: #8fd3ff; white-space: pre-wrap; }
.tgc-blockquote { display: block; margin: 3px 0; padding: 2px 0 2px 9px; border-left: 3px solid var(--tgc-name, var(--tgc-accent)); }
.tgc-spoiler { color: transparent; border-radius: 4px; cursor: pointer; background-image: radial-gradient(circle, #ffffffb0 .9px, transparent 1.3px), radial-gradient(circle, #ffffff70 .7px, transparent 1.1px); background-size: 5px 5px, 7px 7px; background-position: 0 0, 2px 3px; animation: tgcSpoil 1.2s linear infinite; -webkit-user-select: none; user-select: none; text-shadow: none; transition: color .25s; }
.tgc-spoiler .community-custom-emoji { opacity: 0; }
.tgc-spoiler.is-revealed { color: inherit; background: none; animation: none; cursor: text; -webkit-user-select: text; user-select: text; }
.tgc-spoiler.is-revealed .community-custom-emoji { opacity: 1; }
.tgc-format-spoiler { letter-spacing: -1px; opacity: .8; }

.tgc-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 1px; padding-right: 58px; }
.tgc-msg.has-edited .tgc-reactions { padding-right: 112px; }
.tgc-react { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px 0 6px; border: 0; border-radius: 14px; background: #ffffff17; color: var(--tgc-text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: transform .12s, background-color .15s; }
.tgc-react:active { transform: scale(.92); }
.tgc-react.is-mine { background: var(--tgc-accent); color: #fff; }
.tgc-msg.is-mine .tgc-react { background: #ffffff21; }
.tgc-msg.is-mine .tgc-react.is-mine { background: #ffffffe0; color: #2b5278; }
.tgc-react-emoji { font-size: 17px; line-height: 1; display: inline-flex; }
.tgc-react-emoji .community-custom-emoji { width: 20px; height: 20px; vertical-align: middle; }
.tgc-react-faces { display: inline-flex; padding-left: 2px; }
.tgc-react-faces .tgc-avatar { width: 20px; height: 20px; flex: 0 0 20px; margin-left: -6px; font-size: 0; box-shadow: 0 0 0 1.5px var(--tgc-bubble, #182533); visibility: visible !important; }
.tgc-react-faces .tgc-avatar:first-child { margin-left: 0; }
.tgc-msg.is-jumbo .tgc-reactions,.tgc-msg.is-sticker .tgc-reactions { padding-right: 0; margin-top: 4px; }
.tgc-burst { position: absolute; left: 50%; top: 50%; z-index: 3; font-size: 54px; line-height: 1; pointer-events: none; transform: translate(-50%, -50%); animation: tgcBurst .85s cubic-bezier(.2,.9,.3,1.2) forwards; filter: drop-shadow(0 6px 14px #0007); }

.tgc-edited { margin-right: 4px; font-size: 11.5px; }
.tgc-msg.has-edited .tgc-spacer { width: 100px; }
.tgc-msg.is-mine.has-edited .tgc-spacer { width: 118px; }

.tgc-msg.is-photo .tgc-bubble { padding: 3px; min-width: 120px; }
.tgc-msg.is-photo .tgc-name-row { padding: 3px 7px 3px; margin: 0; }
.tgc-msg.is-photo .tgc-quote { margin: 2px 4px 4px; width: auto; }
.tgc-msg.is-photo .tgc-media { margin: 0; }
.tgc-photo { display: block; width: min(300px, 68vw); aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 13px; overflow: hidden; background: #ffffff0d linear-gradient(90deg, #ffffff08 25%, #ffffff1a 37%, #ffffff08 63%); background-size: 400% 100%; animation: tgcSk 1.4s ease infinite; cursor: zoom-in; }
.tgc-photo.is-loaded { aspect-ratio: auto; background: none; animation: none; }
.tgc-photo.is-failed { animation: none; }
.tgc-photo img { display: block; width: 100%; max-height: 380px; object-fit: cover; }
.tgc-msg.is-photo:not(.is-last) .tgc-photo,.tgc-msg.is-photo .tgc-photo { border-radius: 13px; }
.tgc-msg.is-photo .tgc-text { padding: 5px 7px 3px; }
.tgc-msg.is-photo.no-text .tgc-time { position: absolute; right: 10px; bottom: 9px; float: none; margin: 0; padding: 2px 7px; border-radius: 10px; background: #0b141d99; color: #fff; }
.tgc-msg.is-photo.no-text .tgc-checks { color: #fff; }
.tgc-msg.is-photo .tgc-reactions { padding: 0 58px 2px 5px; }

.tgc-pinbar { cursor: pointer; }
.tgc-pinbar strong { color: var(--tgc-accent); }
.tgc-pinbar .tgc-pin-x { width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--tgc-hint); font-size: 22px; font-weight: 400; line-height: 1; cursor: pointer; }

.tgc-format { display: flex; gap: 5px; padding: 7px 10px 0; }
.tgc-format button { min-width: 42px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: #ffffff12; color: var(--tgc-text); font: inherit; font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.tgc-format button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tgc-format code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.tgc-edit strong { color: var(--tgc-accent) !important; }
.tgc-reply.is-quote span { font-style: italic; }

.tgc-attach { display: flex; align-items: center; gap: 11px; padding: 8px 8px 2px 12px; }
.tgc-attach-thumb { width: 48px; height: 48px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--tgc-accent); color: #fff; }
.tgc-attach-thumb img,.tgc-attach-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tgc-attach-thumb svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tgc-attach-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tgc-attach-info strong { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-attach-info small { font-size: 12.5px; color: var(--tgc-hint); }
.tgc-attach-progress { display: none; height: 3px; margin-top: 4px; border-radius: 2px; background: #ffffff1a; overflow: hidden; }
.tgc-attach.is-uploading .tgc-attach-progress { display: block; }
.tgc-attach-progress i { display: block; height: 100%; width: 0; background: var(--tgc-accent); transition: width .2s; }
.tgc-attach > button { width: 34px; height: 34px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--tgc-hint); font-size: 24px; cursor: pointer; }
.tgc-attach-menu { position: absolute; right: 54px; bottom: calc(100% - 4px); z-index: 8; min-width: 210px; padding: 6px 0; border-radius: 14px; background: #1f2b38f5; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 30px #00000080; animation: tgcMenuIn .16s ease-out; transform-origin: bottom right; }
.tgc-attach-menu button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 44px; padding: 0 16px; border: 0; background: none; color: var(--tgc-text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.tgc-attach-menu button:active { background: #ffffff12; }
.tgc-attach-menu svg { width: 22px; height: 22px; fill: none; stroke: var(--tgc-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tgc-recorder { display: flex; align-items: center; gap: 10px; padding: 10px 14px 2px; font-size: 15px; font-variant-numeric: tabular-nums; }
.tgc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a5f; animation: tgcPulse 1s ease-in-out infinite; }
.tgc-rec-hint { flex: 1; color: var(--tgc-hint); font-size: 13.5px; }
.tgc-rec-cancel { border: 0; background: none; color: #ff6b6b; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.tgc.is-recording .tgc-input { opacity: .35; pointer-events: none; }
.tgc.is-recording .tgc-send { background: #ff5a5f !important; color: #fff !important; box-shadow: 0 0 0 6px #ff5a5f33; animation: tgcRecRing 1.4s ease-in-out infinite; }
.tgc-send svg { display: none; }
.tgc-send[data-mode="send"] .tgc-send-arrow,.tgc-send[data-mode="mic"] .tgc-send-mic,.tgc-send[data-mode="edit"] .tgc-send-check,.tgc-send:not([data-mode]) .tgc-send-arrow { display: block; }
.tgc-send[data-mode="mic"]:not(:disabled) { color: #9fb1c2; }

.tgc-menu-reactions { position: absolute; z-index: 2; display: flex; gap: 2px; padding: 5px 6px; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; border-radius: 26px; background: #1f2b38f2; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 28px #00000080; animation: tgcMenuIn .18s ease-out; }
.tgc-menu-reactions::-webkit-scrollbar { display: none; }
.tgc-menu-reactions button { width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: transform .12s; }
.tgc-menu-reactions button:active { transform: scale(1.25); }
.tgc-menu-reactions button.is-mine { background: #ffffff1f; }
.tgc-menu-reactions .community-custom-emoji { width: 28px; height: 28px; }

.tgc-sheet-title { margin: 2px 50px 12px; font-size: 17px; font-weight: 600; text-align: center; }
.tgc-sheet-body { padding: 0 4px 8px; min-height: 64px; }
.tgc-sheet-loading { margin: 18px auto; }
.tgc-sheet-empty,.tgc-sheet-hint { margin: 6px 16px 12px; text-align: center; color: var(--tgc-hint); font-size: 14px; }
.tgc-who-emoji { margin-left: auto; font-size: 21px; }
.tgc-quote-source { margin: 0 10px 12px; padding: 12px 14px; max-height: 45vh; overflow-y: auto; border-radius: 12px; background: #ffffff0a; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.4; -webkit-user-select: text; user-select: text; }
.tgc-sheet-action { display: block; width: calc(100% - 20px); margin: 0 10px; padding: 13px; border: 0; border-radius: 12px; background: var(--tgc-accent); color: #fff; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; }

.is-light .tgc-code { background: #0000000d; color: #1f6fb2; }
.is-light .tgc-spoiler:not(.is-revealed) { background-image: radial-gradient(circle, #00000080 .9px, transparent 1.3px), radial-gradient(circle, #0000004d .7px, transparent 1.1px); }
.is-light .tgc-react { background: #0000000f; }
.is-light .tgc-msg.is-mine .tgc-react { background: #0000000f; }
.is-light .tgc-react.is-mine,.is-light .tgc-msg.is-mine .tgc-react.is-mine { background: var(--tgc-accent); color: #fff; }
.is-light .tgc-react-faces .tgc-avatar { box-shadow: 0 0 0 1.5px #fff; }
.tgc.is-light .tgc-format button { background: #0000000d; }
.tgc.is-light .tgc-attach-menu,.tgc-menu-layer.is-light .tgc-menu-reactions { background: #fffffff2; box-shadow: 0 10px 30px #0000002e; }
.tgc.is-light .tgc-attach-menu button:active { background: #0000000a; }
.tgc-profile-layer.is-light .tgc-quote-source { background: #0000000a; }
.tgc-profile-layer.is-light .tgc-sheet { background: #fff; }

/* —— Batch 3: presence, typing, receipts, views —— */
.tgc-spacer { width: var(--tgc-meta-w, 44px) !important; }
.tgc-reactions { padding-right: calc(var(--tgc-meta-w, 44px) + 12px) !important; }
.tgc-msg.is-jumbo .tgc-reactions,.tgc-msg.is-sticker .tgc-reactions { padding-right: 0 !important; }
.tgc-msg.is-photo .tgc-reactions { padding-left: 5px; }
.tgc-views { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.tgc-views:empty,.tgc-ticks:empty { display: none; }
.tgc-eye { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tgc-ticks { display: inline-flex; }
.tgc-ticks:not(.is-read) .tgc-checks { color: var(--tgc-out-hint); }
.tgc-avatar.is-online::before { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #4cd964; box-shadow: 0 0 0 2px var(--tgc-bg); z-index: 1; }
.tgc-avatar { position: relative; }
.tgc .community-status.is-typing { color: var(--tgc-accent); }
.tgc-typing { display: inline-flex; align-items: center; gap: 3px; margin-right: 5px; vertical-align: 1px; }
.tgc-typing i { width: 4.5px; height: 4.5px; border-radius: 50%; background: currentColor; animation: tgcTyping 1.2s ease-in-out infinite; }
.tgc-typing i:nth-child(2) { animation-delay: .15s; }
.tgc-typing i:nth-child(3) { animation-delay: .3s; }
#community-profile-sub.is-online { color: var(--tgc-accent); }
/* —— Chat photo —— */
.tgc-chat-avatar.has-logo, .tgc-info-avatar.has-logo { overflow: hidden; padding: 0; background: #fff !important; box-shadow: 0 0 0 1px #ffffff26 !important; }
.tgc-chat-avatar.has-logo img, .tgc-info-avatar.has-logo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tgc.is-light .tgc-chat-avatar.has-logo, .tgc-profile-layer.is-light .tgc-info-avatar.has-logo { box-shadow: 0 0 0 1px #0000001f !important; }

/* —— Auto-post —— */
.tgc .community-header-actions { gap: 0; }
.tgc .community-header-actions .tgc-head-btn { width: 32px; }
.tgc .community-header-actions .tgc-auto-btn { width: auto; height: 30px; margin-right: 2px; }
.tgc-auto-btn { position: relative; width: auto !important; min-width: 0; padding: 0 7px !important; border-radius: 9px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; }
.tgc-auto-btn span { line-height: 1; }
.tgc-auto-btn i { position: absolute; top: 5px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #4cd964; box-shadow: 0 0 0 2px var(--tgc-head-bg, #000); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.2,1.4,.4,1); }
.tgc-auto-btn.is-on i { opacity: 1; transform: none; }
.tgc-auto { padding-bottom: 6px; }
.tgc-auto-status { display: flex; align-items: center; gap: 10px; margin: 0 10px 10px; padding: 12px 14px; border-radius: 14px; background: #ffffff0d; box-shadow: inset 0 0 0 1.5px #ffffff26; font-size: 14.5px; }
.tgc-auto-status i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--tgc-hint); }
.tgc-auto-status.is-on i { background: #4cd964; box-shadow: 0 0 0 4px #4cd96433; animation: tgcAutoPulse 1.8s ease-in-out infinite; }
@keyframes tgcAutoPulse { 50% { box-shadow: 0 0 0 7px #4cd96400; } }
.tgc-auto-error { margin: -2px 14px 10px; font-size: 13px; color: #ff6b6b; }
.tgc-auto-note { margin-top: -2px; }
.tgc-auto-preview { margin: 0 10px 12px; padding: 10px 13px; border-radius: 14px 14px 14px 5px; background: var(--tgc-in, #ffffff12); font-size: 15px; line-height: 1.38; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.tgc-auto-source { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; }
.tgc-auto-source b { font-size: 14.5px; }
.tgc-auto-source small { font-size: 11.5px; font-weight: 500; color: var(--tgc-hint); }
.tgc-auto-editor { margin: 0 10px 10px; }
.tgc-auto-editor textarea { display: block; width: 100%; min-height: 110px; padding: 11px 13px; border: 0; border-radius: 12px; background: #ffffff0d; color: var(--tgc-text); font: inherit; font-size: 16px; line-height: 1.35; resize: vertical; outline: none; box-shadow: inset 0 0 0 1.5px #ffffff2e; }
.tgc-auto-editor .tgc-sheet-hint { margin: 8px 2px 10px; }
.tgc-auto-editor .tgc-admin-options { margin: 0; }
.tgc-auto-lock { margin-top: 0; }
.tgc-auto-foot { margin-top: 12px; }
.tgc-auto-tag { margin-right: 5px; padding: 0 4px; border-radius: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; line-height: 14px; box-shadow: inset 0 0 0 1px currentColor; opacity: .8; }
.tgc-profile-layer.is-light .tgc-auto-status,.tgc-profile-layer.is-light .tgc-auto-editor textarea { background: #0000000a; box-shadow: inset 0 0 0 1.5px #0000002e; }
.tgc-profile-layer.is-light .tgc-auto-preview { background: #0000000a; }
.tgc-auto-photo { margin: 0 10px 10px; border-radius: 14px; overflow: hidden; background: var(--tgc-in, #ffffff12); max-height: 260px; display: flex; justify-content: center; }
.tgc-auto-photo img { display: block; max-width: 100%; max-height: 260px; object-fit: contain; }

/* —— Premium emoji without Telegram Premium —— */
.tgc-premium-pick { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.tgc-premium-pick:active { transform: scale(.88); background: #ffffff14; }
.tgc-premium-pick .community-custom-emoji { width: 30px !important; height: 30px !important; }
.tgc-premium-note { grid-column: 1 / -1; margin: 2px 4px 6px; font-size: 12px; line-height: 1.35; color: var(--tgc-hint); }
.tgc-emoji-tabs .is-premium { font-weight: 800; }
.tgc-auto-premium-label { margin-top: 10px; }
.tgc-auto-premium { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 42px); grid-auto-columns: 42px; gap: 4px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.tgc-auto-premium::-webkit-scrollbar { display: none; }

/* —— Anti-spam settings —— */
.tgc-filters { padding-bottom: 8px; }
.tgc-filters .tgc-toggles { margin: 0 10px 12px; }
.tgc-filter-rule span { display: flex; flex-direction: column; gap: 2px; }
.tgc-filter-rule small { font-size: 12px; color: var(--tgc-hint); }
.tgc-filter-add { display: flex; gap: 8px; margin: 0 10px 10px; }
.tgc-filter-add input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: #ffffff0d; color: var(--tgc-text); font: inherit; font-size: 15px; outline: none; box-shadow: inset 0 0 0 1.5px #ffffff2e; }
.tgc-filter-add .tgc-admin-opt { flex: none; min-height: 44px; padding: 0 14px; }
.tgc-filter-words { margin: 0 10px 12px; max-height: 320px; overflow: auto; border-radius: 12px; box-shadow: inset 0 0 0 1.5px #ffffff1f; }
.tgc-filter-word { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-bottom: 1px solid #ffffff0d; font-size: 14px; }
.tgc-filter-word span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tgc-filter-word.is-off span { opacity: .45; text-decoration: line-through; }
.tgc-filter-word button { flex: none; min-width: 44px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: #ffffff12; color: var(--tgc-text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tgc-filter-word button.is-del { min-width: 30px; padding: 0; color: #ff6b6b; font-size: 18px; }
.tgc-filter-allow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 12px 12px; }
.tgc-filter-allow button { margin-left: 4px; border: 0; background: none; color: inherit; font-size: 14px; cursor: pointer; }
.tgc-log-dot.is-flag { background: #ffb340; }
.tgc-profile-layer.is-light .tgc-filter-add input,.tgc-profile-layer.is-light .tgc-filter-word button { background: #0000000a; box-shadow: inset 0 0 0 1.5px #0000002e; }
.tgc-profile-layer.is-light .tgc-filter-words { box-shadow: inset 0 0 0 1.5px #0000001f; }
.tgc-profile-layer.is-light .tgc-filter-word { border-color: #0000000d; }

/* —— Staff tools —— */
.tgc-admin { margin: 14px 14px 0; }
.tgc-admin-title { margin: 0 4px 8px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--tgc-hint); }
.tgc-admin-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.tgc-admin-tag { padding: 4px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; background: #ffffff10; color: var(--tgc-text); box-shadow: inset 0 0 0 1px #ffffff26; }
.tgc-admin-tag.is-danger { color: #ff6b6b; box-shadow: inset 0 0 0 1px #ff6b6b66; }
.tgc-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tgc-admin-btn { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border: 0; border-radius: 14px; background: #ffffff0d; color: var(--tgc-text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1.5px #ffffff26; transition: transform .15s cubic-bezier(.2,1.3,.4,1), background-color .15s; }
.tgc-admin-btn:active { transform: scale(.96); background: #ffffff1a; }
.tgc-admin-btn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tgc-admin-btn.is-danger { color: #ff6b6b; box-shadow: inset 0 0 0 1.5px #ff6b6b55; }
.tgc-admin-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 10px 10px; }
.tgc-admin-options.is-row { grid-template-columns: repeat(3, 1fr); }
.tgc-admin-opt { min-height: 46px; padding: 8px; border: 0; border-radius: 12px; background: #ffffff0d; color: var(--tgc-text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1.5px #ffffff26; transition: transform .15s cubic-bezier(.2,1.3,.4,1); }
.tgc-admin-opt:active { transform: scale(.95); }
.tgc-admin-opt.is-active { background: var(--tgc-accent); color: var(--tgc-bg, #000); box-shadow: none; }
.tgc-admin-field { margin: 0 10px 12px; }
.tgc-admin-field input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 0; background: #ffffff0d; color: var(--tgc-text); font: inherit; font-size: 16px; box-shadow: inset 0 0 0 1.5px #ffffff2e; outline: none; }
.tgc-admin-label { margin: 0 14px 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--tgc-hint); }
.tgc-admin-check { display: flex; align-items: center; gap: 10px; margin: 0 14px 12px; font-size: 15px; }
.tgc-admin-check input { width: 20px; height: 20px; accent-color: var(--tgc-accent); }
.tgc-sheet-action + .tgc-sheet-action { margin-top: 8px; }
.tgc-sheet-action.is-secondary { background: #ffffff10; color: var(--tgc-text); box-shadow: inset 0 0 0 1.5px #ffffff2e; }
.tgc-sheet-action.is-danger { background: transparent; color: #ff6b6b; box-shadow: inset 0 0 0 1.5px #ff6b6b66; }
.tgc-sheet-body .tgc-toggles { margin: 0 10px 12px; }
.tgc-log-row { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #ffffff0d; }
.tgc-log-row strong { display: block; font-size: 14.5px; }
.tgc-log-row small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--tgc-hint); }
.tgc-log-dot { width: 8px; height: 8px; flex: none; margin-top: 7px; border-radius: 50%; background: var(--tgc-hint); }
.tgc-log-dot.is-ban,.tgc-log-dot.is-mute,.tgc-log-dot.is-delmute,.tgc-log-dot.is-purge { background: #ff6b6b; }
.tgc-log-dot.is-unban,.tgc-log-dot.is-unmute { background: #4cd964; }
.tgc-profile-layer.is-light .tgc-admin-tag,.tgc-profile-layer.is-light .tgc-admin-btn,.tgc-profile-layer.is-light .tgc-admin-opt,.tgc-profile-layer.is-light .tgc-admin-field input,.tgc-profile-layer.is-light .tgc-sheet-action.is-secondary { background: #0000000a; box-shadow: inset 0 0 0 1.5px #0000002e; }
.tgc-profile-layer.is-light .tgc-admin-opt.is-active { background: var(--tgc-accent); color: #fff; box-shadow: none; }
.tgc-profile-layer.is-light .tgc-log-row { border-color: #0000000d; }

/* —— Batch 4: search, calendar, commands —— */
.tgc-search-bar { gap: 6px; }
.tgc-search-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 19px; background: #0d1620b8; box-shadow: inset 0 0 0 1px #ffffff10; }
.tgc-search-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; box-shadow: none; color: var(--tgc-text); font: inherit; font-size: 16px; }
.tgc-search-field input::placeholder { color: #6c7883; }
.tgc-search-chip { flex: none; max-width: 45%; padding: 3px 8px; border-radius: 10px; background: var(--tgc-accent); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tgc-search-chip::after { content: " ×"; }
.tgc-date-btn { position: relative; overflow: hidden; }
.tgc-date-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tgc-search-results { position: absolute; left: 0; right: 0; top: calc(56px + var(--safe-t, 0px)); bottom: 0; z-index: 5; overflow-y: auto; overscroll-behavior: contain; background: var(--tgc-panel); padding: 4px 0 calc(12px + var(--safe-b)); }
.tgc-search-count { margin: 8px 16px 4px; font-size: 13px; color: var(--tgc-hint); }
.tgc-search-item { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 9px 14px; border: 0; border-bottom: 1px solid #ffffff0a; background: none; color: var(--tgc-text); font: inherit; text-align: left; cursor: pointer; }
.tgc-search-item:active { background: #ffffff0a; }
.tgc-search-item .tgc-avatar { width: 42px; height: 42px; flex-basis: 42px; }
.tgc-search-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tgc-search-head { display: flex; justify-content: space-between; gap: 8px; }
.tgc-search-head strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-search-head small { flex: none; font-size: 12.5px; color: var(--tgc-hint); }
.tgc-search-body { font-size: 14.5px; line-height: 1.35; color: #c9d4de; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tgc-search-body mark { background: #5eb5f740; color: var(--tgc-text); border-radius: 3px; padding: 0 1px; }
.tgc-search-more { display: block; margin: 12px auto; padding: 9px 18px; border: 0; border-radius: 16px; background: #ffffff12; color: var(--tgc-accent); font: inherit; font-size: 14px; cursor: pointer; }
.tgc-cmd-ico { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ffffff12; color: var(--tgc-accent); font-size: 18px; font-weight: 700; }
.tgc-cmd-item em,.tgc-help-row em { font-style: normal; color: var(--tgc-hint); font-weight: 400; }
.tgc-help-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-bottom: 1px solid #ffffff0a; }
.tgc-help-row strong { font-size: 15px; }
.tgc-help-row small { font-size: 13px; color: var(--tgc-hint); }
.tgc.is-light .tgc-search-field { background: #f1f3f5; box-shadow: inset 0 0 0 1px #0000000d; }
.tgc.is-light .tgc-search-body { color: #4a5866; }
.tgc.is-light .tgc-search-item,.tgc-profile-layer.is-light .tgc-help-row { border-color: #0000000a; }
.tgc.is-light .tgc-search-more,.tgc.is-light .tgc-cmd-ico { background: #0000000d; }

/* —— Motion polish: spring sheets, staggered content, smooth close —— */
.tgc-profile-layer,.tgc-menu-layer { --tgc-spring: cubic-bezier(.22, 1, .36, 1); }
.tgc-profile-layer .tgc-profile { animation: tgcSheetIn .42s var(--tgc-spring) backwards; will-change: transform; }
.tgc-profile-layer .tgc-profile-backdrop { animation: tgcFade .28s ease backwards; }
.tgc-profile-layer.is-closing,.tgc-menu-layer.is-closing { pointer-events: none; }
.tgc-profile-layer.is-closing .tgc-profile { animation: tgcSheetOut .2s cubic-bezier(.4, 0, 1, 1) both; }
.tgc-profile-layer.is-closing .tgc-profile-backdrop,.tgc-menu-layer.is-closing .tgc-menu-backdrop { animation: tgcFadeOut .2s ease both; }
.tgc-profile-layer .tgc-profile-avatar { animation: tgcPop .5s cubic-bezier(.2, 1.3, .4, 1) .04s backwards; }
.tgc-profile-layer .tgc-profile-hero h2,.tgc-profile-layer .tgc-profile-prefix,.tgc-profile-layer .tgc-profile-hero p { animation: tgcRise .4s var(--tgc-spring) backwards; }
.tgc-profile-layer .tgc-profile-hero h2 { animation-delay: .08s; }
.tgc-profile-layer .tgc-profile-prefix { animation-delay: .11s; }
.tgc-profile-layer .tgc-profile-hero p { animation-delay: .13s; }
.tgc-profile-layer .tgc-profile-actions button { animation: tgcRise .42s var(--tgc-spring) backwards; }
.tgc-profile-layer .tgc-profile-actions button:nth-child(1) { animation-delay: .12s; }
.tgc-profile-layer .tgc-profile-actions button:nth-child(2) { animation-delay: .15s; }
.tgc-profile-layer .tgc-profile-actions button:nth-child(3) { animation-delay: .18s; }
.tgc-profile-layer .tgc-profile-actions button:nth-child(4) { animation-delay: .21s; }
.tgc-profile-layer .tgc-profile-actions button:nth-child(5) { animation-delay: .24s; }
.tgc-profile-layer .tgc-info-row,.tgc-profile-layer .tgc-settings > *,.tgc-profile-layer .tgc-sheet-body > * { animation: tgcRise .42s var(--tgc-spring) backwards; }
.tgc-profile-layer .tgc-info-row:nth-child(1),.tgc-profile-layer .tgc-settings > :nth-child(-n+2) { animation-delay: .16s; }
.tgc-profile-layer .tgc-info-row:nth-child(2),.tgc-profile-layer .tgc-settings > :nth-child(3),.tgc-profile-layer .tgc-settings > :nth-child(4) { animation-delay: .2s; }
.tgc-profile-layer .tgc-info-row:nth-child(3),.tgc-profile-layer .tgc-settings > :nth-child(5),.tgc-profile-layer .tgc-settings > :nth-child(6) { animation-delay: .24s; }
.tgc-profile-layer .tgc-info-row:nth-child(n+4),.tgc-profile-layer .tgc-settings > :nth-child(n+7) { animation-delay: .28s; }
.tgc-profile-layer .tgc-profile-actions button,.tgc-info-row[data-profile-copy],.tgc-info-row[data-profile-messages],.tgc-swatches button,.tgc-segment button { transition: transform .15s var(--tgc-spring), background-color .15s, box-shadow .2s; }
.tgc-profile-layer .tgc-profile-actions button:active,.tgc-swatches button:active { transform: scale(.94); }
.tgc-info-row[data-profile-copy]:active,.tgc-info-row[data-profile-messages]:active { transform: scale(.985); }

.tgc-menu { animation-duration: .24s; animation-timing-function: cubic-bezier(.2, 1.1, .3, 1); }
.tgc-menu button { animation: tgcItemIn .26s var(--tgc-spring) backwards; }
.tgc-menu button:nth-child(2) { animation-delay: .02s; } .tgc-menu button:nth-child(3) { animation-delay: .04s; }
.tgc-menu button:nth-child(4) { animation-delay: .06s; } .tgc-menu button:nth-child(5) { animation-delay: .08s; }
.tgc-menu button:nth-child(6) { animation-delay: .1s; } .tgc-menu button:nth-child(n+7) { animation-delay: .12s; }
.tgc-menu-reactions button { animation: tgcPop .38s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.tgc-menu-reactions button:nth-child(2) { animation-delay: .02s; } .tgc-menu-reactions button:nth-child(3) { animation-delay: .04s; }
.tgc-menu-reactions button:nth-child(4) { animation-delay: .06s; } .tgc-menu-reactions button:nth-child(5) { animation-delay: .08s; }
.tgc-menu-reactions button:nth-child(6) { animation-delay: .1s; } .tgc-menu-reactions button:nth-child(n+7) { animation-delay: .12s; }
.tgc-menu-layer.is-closing .tgc-menu,.tgc-menu-layer.is-closing .tgc-menu-reactions { animation: tgcMenuOut .16s ease both; }
.tgc-menu-layer.is-closing .tgc-menu-preview { animation: tgcFadeOut .18s ease both; }
.tgc-menu-layer .tgc-menu-preview { animation: tgcLift .26s var(--tgc-spring) backwards; }

.tgc-fab { transition: opacity .2s ease, transform .28s cubic-bezier(.2, 1.3, .4, 1), visibility 0s; }
.tgc-fab.hidden { display: grid !important; opacity: 0; transform: scale(.4) translateY(12px); pointer-events: none; visibility: hidden; transition: opacity .16s ease, transform .2s ease, visibility 0s .2s; }
.tgc-fab:active { transform: scale(.9); }
.tgc-fab-badge { transition: transform .2s cubic-bezier(.2, 1.4, .4, 1); }

.tgc-reply,.tgc-attach,.tgc-format,.tgc-templates,.tgc-suggest,.tgc-recorder { animation: tgcBarIn .24s var(--tgc-spring, cubic-bezier(.22, 1, .36, 1)) backwards; }
.tgc-emoji { animation: tgcPanelIn .3s cubic-bezier(.22, 1, .36, 1) backwards; }
.tgc-attach-menu { animation-duration: .22s; animation-timing-function: cubic-bezier(.2, 1.2, .3, 1); }
.tgc-pinbar,.tgc-search-results { animation: tgcBarIn .26s cubic-bezier(.22, 1, .36, 1) backwards; }
.tgc-search-bar,.tgc-select-bar { animation: tgcFade .18s ease backwards; }
.tgc-search-item { animation: tgcRise .32s cubic-bezier(.22, 1, .36, 1) backwards; }
.tgc-send svg { animation: tgcIconSwap .22s cubic-bezier(.2, 1.3, .4, 1); }
.tgc-input-btn,.tgc-head-btn,.tgc-send { transition: transform .15s cubic-bezier(.2, 1.3, .4, 1), background-color .15s, color .15s; }
.tgc-input-btn:active,.tgc-head-btn:active { transform: scale(.88); }
.tgc-chip,.tgc-react { transition: transform .15s cubic-bezier(.2, 1.3, .4, 1), background-color .18s, color .18s; }
.tgc-chip:active { transform: scale(.94); }
.tgc-react.is-pop { animation: tgcPop .42s cubic-bezier(.2, 1.5, .4, 1); }

.tgc-photo img,.tgc-video-thumb video,.tgc-media img,.tgc-media video { animation: tgcFade .3s ease backwards; }
.tgc-avatar.has-photo,.tgc-profile-avatar.has-photo { animation: tgcFade .3s ease backwards; }
.tgc-profile-layer .tgc-profile-avatar.has-photo { animation: tgcPop .5s cubic-bezier(.2, 1.3, .4, 1) backwards; }
#community-messages.is-ready { animation: tgcFade .28s ease backwards; }
.tgc-msg.is-swiping { transition: none; }
.tgc-msg { transition: background-color .2s; }
.tgc-bubble { transition: transform .18s cubic-bezier(.2, 1.3, .4, 1), filter .15s ease; }
.tgc-day { transition: opacity .2s; }

html.tgc-no-effects .tgc *,html.tgc-no-effects .tgc-profile-layer *,html.tgc-no-effects .tgc-menu-layer * { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) {
  .tgc *,.tgc-profile-layer *,.tgc-menu-layer * { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
@keyframes tgcSheetOut { to { transform: translate3d(0, 100%, 0); } }
@keyframes tgcFadeOut { to { opacity: 0; } }
@keyframes tgcPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes tgcRise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@keyframes tgcItemIn { from { opacity: 0; transform: translate3d(0, -6px, 0); } to { opacity: 1; transform: none; } }
@keyframes tgcMenuOut { to { opacity: 0; transform: scale(.92); } }
@keyframes tgcBarIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@keyframes tgcPanelIn { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
@keyframes tgcIconSwap { from { opacity: 0; transform: scale(.5) rotate(-30deg); } to { opacity: 1; transform: none; } }

@keyframes tgcTyping { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@keyframes tgcSpoil { to { background-position: 5px 5px, 9px -4px; } }
@keyframes tgcBurst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 35% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -120%) scale(.9); } }
@keyframes tgcRecRing { 50% { box-shadow: 0 0 0 11px #ff5a5f22; } }

@keyframes tgcSk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes tgcRing { to { transform: rotate(360deg); } }
@keyframes tgcFly { from { opacity: .2; transform: translate3d(-14px, 52px, 0) scale(.88); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }

@keyframes tgcSpin { to { transform: rotate(360deg); } }
@keyframes tgcPulse { 50% { opacity: .55; } }
@keyframes tgcFlash { 0%,35% { box-shadow: 0 0 0 100vmax #5eb5f71f, 0 1px 1px #0003; filter: brightness(1.25); } 100% { box-shadow: 0 1px 1px #0003; filter: none; } }
@keyframes tgcLift { from { transform: scale(.97); } to { transform: none; } }
@keyframes tgcMenuIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tgc-menu,.tgc-msg.is-flash .tgc-bubble,.tgc .community-status.is-error::before { animation: none; } }

/* Contact is opened after viewing the participant's reputation. */
.rep-telegram-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 11px 13px; margin: 13px 0 16px; border-radius: 13px; border: 1px solid #2fe0c83b; background: #2fe0c80b; color: #9aebdb; font-size: 13px; font-weight: 650; text-decoration: none; }
.rep-telegram-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rep-telegram-link>span:last-child { margin-left: auto; font-size: 18px; }
.rep-telegram-link:active { background: #2fe0c81a; }
.rep-contact-note { font-size: 11px; color: var(--muted); margin: 10px 0 15px; }

.community-header-actions { display: flex; align-items: center; gap: 7px; }
.community-referrals-open { display: flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px; border: 1px solid #ffffff24; border-radius: 13px; background: #ffffff06; color: #e9edf4; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.community-referral-overlay { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.community-referral-backdrop { position: absolute; inset: 0; border: 0; background: #050a12b3; backdrop-filter: blur(7px); cursor: pointer; }
.community-referral-panel { position: relative; width: min(100%,460px); max-height: calc(90% - var(--safe-t)); display: flex; flex-direction: column; background: #16212c; border: 1px solid #ffffff18; border-bottom: 0; border-radius: 26px 26px 0 0; padding: 21px 18px calc(22px + var(--safe-b)); box-shadow: 0 -12px 60px #0007; }
.community-referral-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; flex-shrink: 0; }
.community-referral-head h2 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.community-referral-head button { border: 1px solid #ffffff14; border-radius: 11px; width: 33px; height: 33px; background: #ffffff05; color: var(--muted); font-size: 23px; cursor: pointer; }
#community-referrals-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.community-ref-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.community-ref-stats>div { display: grid; gap: 6px; padding: 14px; border: 1px solid #2fe0c824; background: #2fe0c805; border-radius: 16px; }
.community-ref-stats span { font-size: 11px; color: #a2b4c3; }.community-ref-stats strong { font-size: 32px; color: #9aebdb; letter-spacing: -.05em; }
#community-referrals-body h3 { font-size: 14px; margin: 0 0 8px; }
.community-ref-hint,.community-ref-footnote { font-size: 11px; line-height: 1.6; color: #93a6b6; margin: 0 0 14px; }
.community-invite { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 12px; border: 1px solid #ffffff10; border-radius: 12px; background: #ffffff03; margin-bottom: 9px; }
.community-invite>div { min-width: 0; }.community-invite strong,.community-invite span { display: block; overflow-wrap: anywhere; font-size: 11px; }.community-invite span { color: var(--muted); margin-top: 4px; font-size: 10px; }
.community-invite-copy { max-width: 115px; flex-shrink: 0; border: 0; border-radius: 8px; padding: 8px; font: inherit; font-size: 10px; color: #9aebdb; background: #2fe0c80b; cursor: pointer; }
#community-referrals-body .community-top-title { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; }.community-top-title>span { color: var(--muted); font-size: 10px; font-weight: 500; }
.community-top-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 3px; border: 0; border-bottom: 1px solid #ffffff0c; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.community-top-place { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: 1px solid #ffc85727; border-radius: 10px; color: #ffd58a; font-size: 12px; background: #ffc85708; }
.community-top-name { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }.community-top-name small { display: block; margin-top: 4px; font-size: 9px; color: var(--muted); }.community-top-row>strong { margin-left: auto; font-size: 19px; color: #9aebdb; }
.community-ref-footnote { margin-top: 17px; margin-bottom: 0; font-size: 10px; }.community-ref-empty { padding: 22px 10px; text-align: center; color: var(--muted); font-size: 12px; }

.ui-line-icon { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.community-custom-emoji { display:inline-block; width:1.35em; height:1.35em; vertical-align:-.28em; overflow:hidden; line-height:1; }
.community-custom-emoji img,.community-custom-emoji video,.community-custom-emoji canvas { width:100%!important; height:100%!important; object-fit:contain; display:block; }
.community-custom-emoji.is-monochrome { filter:brightness(0) invert(1); }
.community-custom-emoji.is-unavailable { font-size:.75em; border:1px solid currentColor; border-radius:3px; text-align:center; vertical-align:middle; }

/* —— Staff disputes (arbiter panel) —— */
/* Keyboard: use --staff-dispute-vh (visualViewport) so 100dvh / Telegram
   viewportChanged do not fight and reflow the whole sheet. */
html.staff-dispute-open,
html.staff-dispute-open body {
  height: var(--staff-dispute-vh, var(--app-vh, 100dvh)) !important;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
html.staff-dispute-open #app {
  overflow-x: hidden;
  width: 100%;
  max-width: min(440px, 100%);
  padding-bottom: calc(8px + var(--safe-b, 0px));
}
#shell.shell-staff-dispute {
  overflow: hidden;
  overflow-x: hidden;
  padding-bottom: 0;
  width: 100%;
  max-width: 100%;
  overscroll-behavior: none;
}
#view-staff-dispute.staff-dispute-view.is-active {
  display: flex !important;
  flex-direction: column;
  height: calc(
    var(--staff-dispute-vh, var(--app-vh, 100dvh)) - 18px - var(--safe-t, 0px) -
      var(--safe-b, 0px)
  );
  max-height: calc(
    var(--staff-dispute-vh, var(--app-vh, 100dvh)) - 18px - var(--safe-t, 0px) -
      var(--safe-b, 0px)
  );
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 0;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  box-sizing: border-box;
}
.staff-disputes-tabs { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.staff-disputes-list { display: grid; gap: 10px; }
.staff-dispute-card {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 14px 14px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card, #141820) 92%, transparent);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.staff-dispute-card:active { transform: scale(0.99); }
.staff-dispute-card .sd-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.staff-dispute-card .sd-id { font-weight: 700; letter-spacing: -0.02em; }
.staff-dispute-card .sd-amt { font-weight: 700; color: #9aebdb; }
.staff-dispute-card .sd-meta { font-size: 12px; color: var(--muted); line-height: 1.45; }
.staff-dispute-card .sd-desc {
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.staff-dispute-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.staff-dispute-head-text { min-width: 0; }
.staff-dispute-head-text h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-dispute-head-text .muted {
  margin: 2px 0 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-dispute-summary {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  margin: 0 0 8px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--card, #141820) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.staff-dispute-summary.is-collapsed {
  display: none;
}
.staff-dispute-summary .sd-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.staff-dispute-summary .sd-row span { color: var(--muted); }
.staff-dispute-summary .sd-reason {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.staff-dispute-thread {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 2px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.staff-msg {
  display: grid;
  gap: 4px;
  max-width: min(88%, 420px);
  padding: 10px 12px;
  border-radius: 14px;
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.staff-msg .who {
  font-size: 11px;
  opacity: 0.75;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.staff-msg .staff-msg-time,
.dispute-msg .dispute-msg-time {
  font-size: 10px;
  opacity: 0.85;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dispute-msg .dispute-who {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.staff-msg .staff-media .staff-shot:not([src]),
.staff-msg .staff-media img:not([src]) {
  min-height: 96px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.staff-msg.staff-buyer { background: #2f6fed22; border: 1px solid #2f6fed44; align-self: flex-start; }
.staff-msg.staff-seller { background: #ff9f4322; border: 1px solid #ff9f4344; align-self: flex-start; }
.staff-msg.staff-arbiter {
  align-self: flex-end;
  background: #2fe0c818;
  border: 1px solid #2fe0c833;
}
.staff-msg.staff-system,
.staff-msg.staff-peer {
  align-self: center;
  max-width: 94%;
  background: transparent;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  border: 0;
}
.staff-msg .staff-media { margin-top: 6px; }
.staff-msg .staff-media img,
.staff-msg .staff-media video {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  max-height: 260px;
}
.staff-decide-top {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 8px 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel, #161b22) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.staff-decide-label {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.staff-dispute-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  background: color-mix(in srgb, var(--bg, #0b0f14) 92%, transparent);
  box-sizing: border-box;
}
.staff-decide-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.staff-decide-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  min-height: 40px;
  padding: 9px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel, #161b22) 100%, transparent);
  line-height: 1.2;
}
.staff-decide-btn.is-buyer {
  background: #2f6fed;
  color: #fff;
}
.staff-decide-btn.is-seller {
  background: #ff9f43;
  color: #1a1208;
}
.staff-decide-btn.is-soft {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
}
.staff-split-panel {
  display: grid;
  gap: 10px;
  padding: 8px 0 2px;
}
.staff-split-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.staff-split-grid .chip { justify-content: center; width: 100%; }
.staff-split-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.staff-dispute-composer {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.staff-target-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.staff-target-row::-webkit-scrollbar { display: none; }
.staff-target-label {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}
.staff-target-row .chip {
  flex: 0 0 auto;
  padding: 7px 11px;
  font-size: 12px;
}
.staff-compose-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: end;
  width: 100%;
}
.staff-attach-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel-2, color-mix(in srgb, var(--ink) 8%, transparent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
  color: var(--ink);
}
.staff-attach-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.staff-compose-row textarea {
  min-height: 42px;
  max-height: 110px;
  resize: none;
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 0;
  background: var(--bg-deep, color-mix(in srgb, var(--bg, #0b0f14) 80%, #000));
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  /* 16px: iOS otherwise auto-zooms focused inputs (<16) and breaks layout width. */
  font-size: 16px;
  line-height: 1.35;
  box-sizing: border-box;
  touch-action: manipulation;
}
.staff-send-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink, #04120f);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}
.staff-send-btn:disabled { opacity: 0.5; cursor: default; }
.staff-dispute-view.closed #staff-decide-top,
.staff-dispute-view.closed #staff-dispute-composer { display: none !important; }
.staff-dispute-view.closed #staff-dispute-inactive { display: block !important; padding: 8px 4px 12px; }

/* —— Wide windows: Telegram Desktop or an expanded Mini App —— */
@media (min-width: 620px) {
  #app { max-width: 760px; padding-inline: 20px; }
  html.community-open #app { max-width: none; }
  #tabbar.tabbar, html.community-open #tabbar { max-width: 520px; margin-inline: auto; }
  .tgc-bubble { max-width: min(72%, 560px); }
}
@media (min-width: 1000px) {
  #app { max-width: 900px; }
  html.community-open #app { max-width: 1100px; }
  .tgc-bubble { max-width: min(62%, 640px); }
}
/* —— Telegram fullscreen: content starts below the notch and Telegram's floating Close / ⋯ buttons —— */
html.tg-fullscreen #app { padding-top: calc(14px + var(--safe-t, 0px)); }
html.tg-fullscreen .market-mode #app, html.tg-fullscreen.market-mode #app { padding-top: calc(14px + var(--safe-t, 0px)); }
html.tg-fullscreen.community-open #app { padding-top: 0; }
/* Name and prefix share one line: the prefix stays whole, a long name gets the ellipsis first. */
.tgc-name-row { flex-wrap: nowrap; }
.tgc-name-row .tgc-name { flex: 0 1 auto; min-width: 4.5em; }
.tgc-name-row .tgc-badge { flex: 0 0 auto; min-width: 0; max-width: calc(100% - 4.5em - 8px); white-space: nowrap; }
.tgc-name-row .tgc-badge > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
/* —— Seller shop page (cinematic studio) —— */
.shop-view { padding: 0; margin: 0 -6px; }
.shop-root {
  --shop-bg: #f3f1ec;
  --shop-fg: #1d1d1f;
  --shop-muted: #6e6e73;
  --shop-accent: #1d1d1f;
  --shop-panel: #ffffffef;
  --shop-line: #00000012;
  --shop-shadow: 0 12px 32px #00000012;
  --shop-radius: 22px;
  --shop-font: "Outfit", "Sora", sans-serif;
  --shop-on-accent: #fff;
  position: relative;
  min-height: 72vh;
  padding: 16px 14px 40px;
  border-radius: 28px;
  overflow: hidden;
  color: var(--shop-fg);
  background: var(--shop-bg);
  font-family: var(--shop-font);
}
.shop-root.font-modern { --shop-font: "Outfit", "Sora", sans-serif; }
.shop-root.font-display { --shop-font: "Sora", "Outfit", sans-serif; letter-spacing: -.02em; }
.shop-root.font-clean { --shop-font: "Outfit", ui-rounded, sans-serif; }
.shop-root.radius-sm { --shop-radius: 12px; }
.shop-root.radius-md { --shop-radius: 16px; }
.shop-root.radius-lg { --shop-radius: 22px; }
.shop-root.radius-xl { --shop-radius: 30px; }
.shop-root.theme-cinema { --shop-bg:#14110d; --shop-fg:#f7f1e5; --shop-muted:#b7aa94; --shop-panel:#221c15e8; --shop-accent:#f5c518; --shop-on-accent:#1a1408; }
.shop-root.theme-hub { --shop-bg:#0e0f12; --shop-fg:#f5f5f7; --shop-muted:#9a968c; --shop-panel:#17181ce8; --shop-accent:#ffd60a; --shop-on-accent:#161200; }
.shop-root.theme-aurora { --shop-bg:#07141f; --shop-fg:#e8fbff; --shop-muted:#8bb8c4; --shop-panel:#0d2230e8; --shop-accent:#5eead4; --shop-on-accent:#04201c; }
.shop-root.theme-noir { --shop-bg:#090909; --shop-fg:#f4f4f5; --shop-muted:#a1a1aa; --shop-panel:#151515e8; --shop-accent:#fafafa; --shop-on-accent:#111; }
.shop-root.theme-sunset { --shop-bg:#1a0f0c; --shop-fg:#ffe8dc; --shop-muted:#c9a08f; --shop-panel:#2a1712e8; --shop-accent:#ff7a45; --shop-on-accent:#2a0f08; }
.shop-root.theme-mint { --shop-bg:#071611; --shop-fg:#e8fff4; --shop-muted:#8fb8a6; --shop-panel:#0e241ce8; --shop-accent:#34d399; --shop-on-accent:#052016; }
.shop-root.theme-volt { --shop-bg:#10140a; --shop-fg:#f4ffe0; --shop-muted:#a5b878; --shop-panel:#1a2110e8; --shop-accent:#c8f531; --shop-on-accent:#1a2208; }
.shop-root.theme-paper { --shop-bg:#efe7d8; --shop-fg:#1d1d1f; --shop-muted:#6f675c; --shop-panel:#fffaf1ef; --shop-line:#00000014; --shop-accent:#1d1d1f; --shop-on-accent:#fff; --shop-shadow:0 14px 40px #00000018; }
.shop-root.theme-ocean { --shop-bg:#071525; --shop-fg:#eaf6ff; --shop-muted:#8eb0c8; --shop-panel:#0d2236e8; --shop-accent:#38bdf8; --shop-on-accent:#042033; }
.shop-root.theme-night { --shop-bg:#0b1220; --shop-fg:#eef3ff; --shop-muted:#91a0bd; --shop-panel:#162033e8; --shop-accent:#64d2ff; --shop-on-accent:#041820; }
.shop-root.theme-snow { --shop-bg:#f3f1ec; --shop-fg:#1d1d1f; --shop-muted:#6e6e73; --shop-panel:#ffffffef; --shop-line:#00000012; --shop-accent:#111; --shop-on-accent:#fff; --shop-shadow:0 14px 36px #00000014; }
.shop-root.theme-graphite { --shop-bg:#1c1c1e; --shop-fg:#f5f5f7; --shop-muted:#a1a1a6; --shop-panel:#2c2c2ee8; --shop-accent:#ffd60a; --shop-on-accent:#1a1600; }
.shop-root.theme-ink { --shop-bg:#0a0a0a; --shop-fg:#f5f5f7; --shop-muted:#9a9a9f; --shop-panel:#151515e8; --shop-accent:#ffd60a; --shop-on-accent:#1a1600; }

.shop-bg, .shop-orb { position: absolute; pointer-events: none; z-index: 0; }
.shop-bg { inset: 0; transition: opacity .35s ease; }
.shop-root.bg-soft .shop-bg {
  background:
    radial-gradient(100% 70% at 0% 0%, color-mix(in srgb, var(--shop-accent) 22%, transparent), transparent 55%),
    radial-gradient(80% 50% at 100% 10%, #ffffff14, transparent 50%);
}
.shop-root.bg-mesh .shop-bg {
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--shop-accent) 34%, transparent), transparent 42%),
    radial-gradient(circle at 88% 8%, #ffffff20, transparent 38%),
    radial-gradient(circle at 70% 78%, color-mix(in srgb, var(--shop-accent) 18%, transparent), transparent 46%);
}
.shop-root.bg-beam .shop-bg {
  background:
    conic-gradient(from 210deg at 20% -10%, color-mix(in srgb, var(--shop-accent) 35%, transparent), transparent 28%, transparent 70%, color-mix(in srgb, var(--shop-accent) 18%, transparent)),
    linear-gradient(180deg, transparent, var(--shop-bg));
}
.shop-root.bg-waves .shop-bg {
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--shop-accent) 18%, transparent), transparent 42%),
    repeating-linear-gradient(-16deg, #ffffff12 0 8px, transparent 8px 20px);
}
.shop-root.bg-solid .shop-bg { background: color-mix(in srgb, var(--shop-accent) 12%, var(--shop-bg)); }
.shop-root.bg-photo .shop-bg {
  background-size: cover; background-position: center top;
  filter: saturate(1.08) contrast(1.05);
}
.shop-root.bg-photo .shop-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #00000066 0%, #00000030 40%, var(--shop-bg) 88%);
}
.shop-orb {
  width: 220px; height: 220px; border-radius: 50%; filter: blur(40px); opacity: .45;
  animation: shopFloat 8s ease-in-out infinite alternate;
}
.shop-orb-a { top: -60px; right: -40px; background: color-mix(in srgb, var(--shop-accent) 55%, transparent); }
.shop-orb-b { left: -70px; top: 180px; width: 180px; height: 180px; background: #ffffff18; animation-delay: -2.5s; }

.shop-stage, .shop-block, .shop-empty, .shop-foot { position: relative; z-index: 1; }
.shop-stage {
  margin: 0 0 18px; padding: 18px 16px 16px;
  border-radius: calc(var(--shop-radius) + 6px);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--shop-accent) 14%, transparent), transparent 42%),
    var(--shop-panel);
  border: 1px solid var(--shop-line);
  box-shadow: var(--shop-shadow);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  animation: shopRise .6s cubic-bezier(.22,1,.36,1) both;
}
.shop-stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.shop-kicker {
  margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--shop-accent);
}
.shop-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 750;
  background: color-mix(in srgb, var(--shop-accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--shop-accent) 35%, transparent);
  color: var(--shop-fg);
}
.shop-status.tone-star { background:#ffffff1a; border-color:#ffffff33; }
.shop-status.tone-fire { background:#ff3b301f; border-color:#ff3b3055; color:#ff8f7a; }
.shop-status.tone-bolt { background:#ffd60a22; border-color:#ffd60a55; color:#ffe56a; }
.shop-status.tone-gem { background:#64d2ff22; border-color:#64d2ff55; color:#9ae0ff; }
.shop-status.tone-shield { background:#34d39922; border-color:#34d39955; color:#7dffc4; }
.shop-status.tone-crown, .shop-status.tone-legend {
  background: linear-gradient(135deg, #f5c51833, #ff7a4533);
  border-color: #f5c51866; color: #ffe08a;
}
.shop-status.tone-spark { background:#ffffff14; border-color:#ffffff28; }
.shop-status-mark { font-size: 13px; line-height: 1; }
.shop-identity { display: flex; gap: 14px; align-items: center; }
.shop-avatar {
  width: 82px; height: 82px; flex: 0 0 auto;
  border-radius: calc(var(--shop-radius) - 2px);
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--shop-accent) 55%, #fff), color-mix(in srgb, var(--shop-accent) 20%, #000));
  display: grid; place-items: center;
  font-weight: 800; font-size: 30px; color: var(--shop-on-accent);
  box-shadow: 0 10px 30px #00000055, inset 0 0 0 1px #ffffff22;
  animation: shopPop .55s cubic-bezier(.22,1,.36,1) both;
}
.shop-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-name {
  margin: 0; font-size: clamp(30px, 8vw, 44px);
  font-weight: 800; letter-spacing: -.045em; line-height: 1.02;
  color: var(--shop-nick, var(--shop-fg));
}
.shop-flair-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-flair {
  display: inline-grid; place-items: center;
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px;
  background: #fff; border: 1px solid #00000014;
  font-size: 15px; font-weight: 800; box-shadow: 0 4px 12px #00000010;
  animation: shopPop .7s .08s cubic-bezier(.22,1,.36,1) both;
}
.shop-flair.is-lg { min-width: 38px; height: 38px; font-size: 18px; }
.shop-flair.badge-star { color: #1d1d1f; background: #fff; }
.shop-flair.badge-fire {
  color: #ff3b30; background: linear-gradient(145deg, #ff7a45, #ff3b30);
  color: #fff; border-color: #ff3b3055; box-shadow: 0 0 16px #ff3b3055;
}
.shop-flair.badge-fire_bright {
  color: #fff; background: linear-gradient(145deg, #ffd060, #ff4d1a);
  border-color: #ffb02088; box-shadow: 0 0 22px #ff6a2088;
  min-width: 38px; height: 38px; font-size: 18px;
}
.shop-flair.badge-hub, .shop-flair.badge-crown {
  color: #1a1400; background: linear-gradient(180deg, #ffe56a, #f5c518);
  border-color: #f5c51899; box-shadow: 0 0 18px #f5c51866;
}
.shop-flair.badge-lock {
  color: #e8f7ff; background: linear-gradient(145deg, #64d2ff, #2f7de0);
  border-color: #64d2ff88; box-shadow: 0 0 20px #64d2ff77;
  animation: shopLockShine 2.4s ease-in-out infinite;
}
@keyframes shopLockShine {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 14px #64d2ff55; }
  50% { filter: brightness(1.18); box-shadow: 0 0 26px #64d2ffaa; }
}
.shop-prefix {
  margin: 8px 0 0; font-size: 13.5px; font-weight: 750;
  color: var(--shop-wall-accent, var(--shop-accent));
  letter-spacing: -.01em;
}
.shop-headline {
  margin: 6px 0 0; font-size: 15.5px; font-weight: 550; color: var(--shop-muted); line-height: 1.35;
}
.shop-since {
  margin: 8px 0 0; font-size: 13px; font-weight: 650; color: var(--shop-muted);
}
.shop-status-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 750;
  background: #fff; border: 1px solid #00000012; color: var(--shop-fg);
}
.shop-status-pill.tone-fire { background:#fff1ee; border-color:#ff3b3030; color:#c0392b; }
.shop-status-pill.tone-crown, .shop-status-pill.tone-legend {
  background:#fff8e8; border-color:#f5c51855; color:#8a6a00;
}
.shop-status-pill.tone-star { background:#fff; color:#1d1d1f; }
.shop-bio {
  margin: 14px 0 0; font-size: 14.5px; line-height: 1.5;
  color: color-mix(in srgb, var(--shop-fg) 84%, transparent);
}
.shop-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 16px;
}
@media (max-width: 420px) {
  .shop-stats { grid-template-columns: repeat(2, 1fr); }
}
.shop-stat {
  padding: 10px 10px 9px; border-radius: 16px; text-align: center;
  background: color-mix(in srgb, var(--shop-fg) 5%, transparent);
  border: 1px solid var(--shop-line);
}
.shop-stat b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.shop-stat span { display: block; margin-top: 2px; font-size: 11px; color: var(--shop-muted); font-weight: 650; }
.shop-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.shop-action {
  border: 0; cursor: pointer; font: inherit; font-weight: 750;
  border-radius: 999px; padding: 11px 16px;
  transition: transform .15s ease, filter .15s ease;
}
.shop-action:active { transform: scale(.97); }
.shop-action.primary { background: var(--shop-accent); color: var(--shop-on-accent); box-shadow: 0 10px 28px color-mix(in srgb, var(--shop-accent) 35%, transparent); }
.shop-action.ghost {
  background: color-mix(in srgb, var(--shop-fg) 7%, transparent);
  color: var(--shop-fg); box-shadow: inset 0 0 0 1px var(--shop-line);
}

.shop-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 8px 2px 12px; }
.shop-section-title {
  margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--shop-muted);
}
.shop-section-hint { font-size: 12px; color: var(--shop-muted); }
.shop-services, .shop-listings { display: grid; gap: 12px; }
.shop-root.layout-cards .shop-services { grid-template-columns: 1fr; }
.shop-root.layout-rail .shop-services {
  grid-auto-flow: column; grid-auto-columns: minmax(230px, 80%);
  overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shop-root.layout-tiles .shop-services,
.shop-root.layout-tiles .shop-listings { grid-template-columns: 1fr 1fr; gap: 10px; }

.shop-service, .shop-listing {
  background: var(--shop-panel);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  overflow: hidden;
  box-shadow: var(--shop-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: shopRise .5s cubic-bezier(.22,1,.36,1) both;
  scroll-snap-align: start;
  transition: transform .2s ease, border-color .2s ease;
}
.shop-service:active, .shop-listing:active { transform: translateY(1px); }
.shop-service-media, .shop-listing-media {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--shop-accent) 22%, transparent), transparent 55%),
    color-mix(in srgb, var(--shop-fg) 4%, transparent);
  overflow: hidden;
}
.shop-service-media img, .shop-listing-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.02); transition: transform .5s ease;
}
.shop-service:active .shop-service-media img { transform: scale(1.06); }
.shop-service-body, .shop-listing-body { padding: 14px 14px 13px; }
.shop-service h3, .shop-listing h3 {
  margin: 0 0 4px; font-size: 16px; font-weight: 780; letter-spacing: -.02em;
}
.shop-service .price, .shop-listing .price {
  color: var(--shop-accent); font-weight: 780; font-size: 14px;
}
.shop-service .note, .shop-listing .note {
  margin: 8px 0 0; color: var(--shop-muted); font-size: 13px; line-height: 1.4;
}
.shop-listing button {
  margin-top: 12px; border: 0; border-radius: 999px; padding: 9px 13px;
  background: color-mix(in srgb, var(--shop-accent) 16%, transparent);
  color: var(--shop-fg); font-weight: 750; cursor: pointer;
}
.shop-root.layout-tiles .shop-service-media { aspect-ratio: 1 / 1; }
.shop-root.layout-tiles .shop-service h3 { font-size: 14px; }

.shop-empty { padding: 10px 0 4px; }
.shop-empty-card {
  text-align: center; padding: 30px 18px;
  border-radius: var(--shop-radius); background: var(--shop-panel);
  border: 1px dashed color-mix(in srgb, var(--shop-accent) 35%, transparent);
}
.shop-empty-title { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.shop-empty-text { margin: 0; color: var(--shop-muted); font-size: 14px; line-height: 1.45; }
.shop-foot {
  margin-top: 24px; text-align: center; font-size: 12px; color: var(--shop-muted); opacity: .9;
}
.shop-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.shop-status-pick {
  border: 0; border-radius: 16px; padding: 12px 10px; text-align: left; cursor: pointer;
  background: #fff; box-shadow: inset 0 0 0 1px #00000012; color: #1d1d1f;
  display: grid; gap: 2px;
}
.shop-status-pick.is-on { outline: 2px solid #1d1d1f; outline-offset: 1px; }
.shop-status-pick.is-locked { opacity: .48; filter: grayscale(.35); }
.shop-status-pick b { font-size: 14px; }
.shop-status-pick small { color: #8e8e93; font-size: 11px; line-height: 1.3; }
.shop-nick-swatches, .shop-wall-swatches {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 16px;
}
.shop-nick-swatch, .shop-wall-swatch {
  border: 0; border-radius: 14px; min-height: 52px; cursor: pointer;
  box-shadow: inset 0 0 0 1px #00000018; position: relative; overflow: hidden;
  font: inherit; font-size: 11px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px #00000088;
}
.shop-nick-swatch { background: var(--nc, #f5f5f7); color: #111; text-shadow: none; }
.shop-nick-swatch span, .shop-wall-swatch span {
  position: absolute; left: 8px; bottom: 6px; right: 8px;
}
.shop-nick-swatch.is-on, .shop-wall-swatch.is-on {
  outline: 2px solid #f5c518; outline-offset: 1px;
}
/* Studio editor */
.shop-studio {
  position: fixed; inset: 0; z-index: 90;
  background: #00000066; display: flex; align-items: flex-end; justify-content: center;
  padding: 10px; backdrop-filter: blur(8px);
}
.shop-studio-sheet {
  width: min(560px, 100%); max-height: min(92vh, 820px); overflow: auto;
  background: #f7f7f8; color: #1d1d1f;
  border-radius: 28px 28px 18px 18px;
  padding: 16px 16px 18px;
  box-shadow: 0 -24px 80px #00000040;
  font-family: "Outfit", "Sora", sans-serif;
  animation: shopSheet .35s cubic-bezier(.22,1,.36,1) both;
}
.shop-studio-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.shop-studio-kicker { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8e8e93; }
.shop-studio-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.shop-icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #e5e5ea; color: #1d1d1f; font-size: 16px; cursor: pointer;
}
.shop-studio-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin: 0 0 14px; padding: 4px; background: #e8e8ed; border-radius: 16px;
}
.shop-tab {
  border: 0; border-radius: 12px; padding: 10px 6px; background: transparent;
  color: #6e6e73; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.shop-tab.is-on { background: #fff; color: #1d1d1f; box-shadow: 0 4px 14px #00000014; }
.shop-pane { display: none; }
.shop-pane.is-on { display: block; animation: shopRise .28s ease both; }
.shop-label { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: #6e6e73; }
.shop-field { display: grid; gap: 6px; margin: 0 0 12px; font-size: 13px; color: #6e6e73; font-weight: 600; }
.shop-field input, .shop-field textarea {
  border: 1px solid #00000012; background: #fff; color: #1d1d1f;
  border-radius: 14px; padding: 12px 12px; font: inherit; font-weight: 500;
}
.shop-field-inline { grid-template-columns: 1fr auto; align-items: center; }
.shop-field-inline input[type="color"] {
  width: 48px; height: 40px; padding: 4px; border-radius: 12px; cursor: pointer;
}
.shop-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; color: #1d1d1f; font-weight: 600; font-size: 14px; }
.shop-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.shop-swatch {
  border: 0; border-radius: 16px; min-height: 58px; padding: 8px;
  background:
    linear-gradient(145deg, var(--sw2, #fff) 0 26%, transparent 26%),
    linear-gradient(160deg, var(--sw), color-mix(in srgb, var(--sw) 72%, #000));
  box-shadow: inset 0 0 0 1px #00000014; color: #1d1d1f; font-weight: 750; font-size: 11px;
  cursor: pointer; text-align: left;
}
.shop-swatch span {
  display: inline-block; padding: 3px 7px; border-radius: 999px; background: #ffffffd0;
}
.shop-swatch.is-on { outline: 2px solid #1d1d1f; outline-offset: 2px; }
.shop-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.shop-chip {
  border: 0; border-radius: 999px; padding: 9px 12px; background: #fff;
  box-shadow: inset 0 0 0 1px #00000012; color: #1d1d1f; font-weight: 700; cursor: pointer;
}
.shop-chip.is-on { background: #1d1d1f; color: #fff; box-shadow: none; }
.shop-chip.accent { background: #1d1d1f; color: #fff; }
.shop-upload-row { margin: 0 0 12px; }
.shop-upload-card {
  width: 100%; border: 0; border-radius: 18px; padding: 12px; background: #fff;
  box-shadow: inset 0 0 0 1px #00000012; display: grid; gap: 8px; text-align: left;
  font-weight: 700; color: #1d1d1f; cursor: pointer;
}
.shop-upload-card.tall .shop-upload-preview.cover { height: 120px; }
.shop-upload-preview {
  display: grid; place-items: center; height: 72px; border-radius: 14px;
  background: #f2f2f7; color: #8e8e93; overflow: hidden; background-size: cover; background-position: center;
}
.shop-upload-preview.has-img { color: transparent; }
.shop-text-btn {
  border: 0; background: transparent; color: #8e8e93; font-weight: 650; cursor: pointer; padding: 4px 0 10px;
}
.shop-studio-subhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.shop-studio-subhead h3 { margin: 0; font-size: 18px; }
.shop-hint { margin: 0 0 12px; color: #8e8e93; font-size: 13px; }
.shop-svc-card {
  background: #fff; border-radius: 18px; padding: 12px; margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px #00000010; display: grid; gap: 8px;
}
.shop-svc-top { display: grid; grid-template-columns: 72px 1fr auto; gap: 8px; align-items: start; }
.shop-svc-photo {
  width: 72px; height: 72px; border: 0; border-radius: 14px; background: #f2f2f7;
  background-size: cover; background-position: center; color: #8e8e93; font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.shop-svc-fields { display: grid; gap: 6px; }
.shop-svc-fields input, .shop-svc-card textarea {
  width: 100%; border: 1px solid #00000012; border-radius: 12px; padding: 10px 11px;
  background: #fafafa; font: inherit; color: #1d1d1f;
}
.shop-studio-foot { position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(#f7f7f800, #f7f7f8 30%); }
.shop-save-btn {
  width: 100%; border: 0; border-radius: 16px; padding: 14px 16px;
  background: #1d1d1f; color: #fff; font: inherit; font-weight: 800; cursor: pointer;
}
.shop-edit-error { color: #ff3b30; min-height: 1.2em; margin: 0 0 8px; font-size: 13px; }

@keyframes shopRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes shopSheet {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes shopPop {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: none; }
}
@keyframes shopFloat {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(12px, 18px, 0); }
}
@media (max-width: 420px) {
  .shop-root.layout-tiles .shop-services,
  .shop-root.layout-tiles .shop-listings { grid-template-columns: 1fr 1fr; }
  .shop-swatches { grid-template-columns: repeat(4, 1fr); }
  .shop-svc-top { grid-template-columns: 64px 1fr auto; }
}

/* —— Seller page mockup (dark business card) —— */
.shop-view { padding: 0 0 18px; margin: 0 -4px; }
.shop-root {
  --shop-bg: #0a0a0c;
  --shop-fg: #f5f5f7;
  --shop-muted: #9a9aa2;
  --shop-accent: #b48cff;
  --shop-wall-accent: #b48cff;
  --shop-nick: #ffffff;
  --shop-panel: #121218f2;
  --shop-line: #ffffff18;
  --shop-shadow: 0 18px 48px #00000066;
  --shop-radius: 24px;
  --shop-on-accent: #0a0a0c;
  background: #050507;
  color: var(--shop-fg);
  padding: 10px 8px 28px;
  border-radius: 0;
  min-height: 70vh;
}
.shop-bg {
  inset: -8% -12%;
  background-size: cover;
  opacity: 1;
  filter: none;
}
.shop-panel {
  position: relative;
  z-index: 1;
  margin: 6px 2px 0;
  padding: 22px 18px 18px;
  border-radius: 28px;
  background: linear-gradient(165deg, #1a1a22ee 0%, #0e0e14f5 55%, #0a0a10f8 100%);
  border: 1px solid #ffffff14;
  box-shadow: var(--shop-shadow);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  animation: shopRise .55s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden;
}
.shop-logo {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 64px;
  height: auto;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  pointer-events: none;
  z-index: 2;
  background: transparent !important;
  object-fit: contain;
}
.shop-brand {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--shop-wall-accent, var(--shop-accent));
}
.shop-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-right: 72px;
}
.shop-name {
  margin: 0;
  font-size: clamp(28px, 7.5vw, 40px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  color: var(--shop-nick, #fff);
}
.shop-flair-row { display: inline-flex; align-items: center; gap: 6px; }
.shop-flair {
  min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; background: transparent; border: 0;
  box-shadow: none; font-size: 18px; color: #fff;
}
.shop-flair.badge-star { color: #fff; background: transparent; }
.shop-flair.badge-fire,
.shop-flair.badge-fire_bright {
  color: #fff;
  background: linear-gradient(145deg, #ff7a45, #ff3b30);
  box-shadow: 0 0 16px #ff3b3066;
}
.shop-flair.badge-hub {
  background: linear-gradient(180deg, #ffe56a, #f5c518);
  color: #1a1400;
  box-shadow: 0 0 18px #f5c51877;
}
.shop-flair.badge-lock {
  background: linear-gradient(145deg, #64d2ff, #2f7de0);
  color: #e8f7ff;
  box-shadow: 0 0 18px #64d2ff88;
}
.shop-prefix {
  margin: 10px 0 0;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--shop-wall-accent, #b48cff);
}
.shop-headline, .shop-bio {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--shop-muted);
  font-weight: 500;
}
.shop-bio { margin-top: 6px; }
.shop-hero-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.shop-action {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 780;
  border: 0;
  cursor: pointer;
}
.shop-action.primary {
  background: #fff;
  color: #0a0a0c;
  box-shadow: 0 10px 28px #ffffff22;
}
.shop-action.ghost {
  background: transparent;
  color: #f5f5f7;
  box-shadow: inset 0 0 0 1.5px #ffffff55;
}
.shop-section-title {
  color: #8e8e96;
  letter-spacing: .16em;
}
.shop-service, .shop-listing, .shop-empty-card {
  background: #ffffff0d;
  border: 1px solid #ffffff16;
  box-shadow: none;
  color: var(--shop-fg);
}
.shop-service .price, .shop-listing .price {
  color: var(--shop-wall-accent, #b48cff);
}
.shop-service h3, .shop-listing h3 { color: #fff; }
.shop-service .note, .shop-listing .note, .shop-empty-text { color: #9a9aa2; }
.shop-since {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: #9a9aa2;
}
.shop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 14px;
  padding: 12px 4px 4px;
  border-top: 1px solid #ffffff14;
}
.shop-stat {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 6px;
  position: relative;
}
.shop-stat + .shop-stat::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 1px; background: #ffffff18;
}
.shop-stat-ico {
  display: block;
  color: #d7c2ff;
  font-size: 12px;
  margin-bottom: 4px;
}
.shop-stat b {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.02em;
  color: #ffffff !important;
  text-shadow: 0 0 18px #ffffff33;
}
.shop-stat:first-child b,
.shop-stat:nth-child(3) b {
  color: #f0e6ff !important;
  text-shadow: 0 0 20px #c4a0ff66;
}
.shop-stat span { color: #b0b0b8; font-size: 11.5px; font-weight: 650; }
.shop-status-pill {
  margin-top: 12px;
  background: #ffffff10;
  border-color: #ffffff20;
  color: #fff;
}
.shop-foot { display: none; }
.shop-avatar.hidden { display: none !important; }

/* —— HUB Garant deal widget —— */
.gw-view { padding: 0; margin: 0 -6px; min-height: 72vh; }
.gw-shell {
  --gw-bg: #0d1520;
  --gw-soft: #1c2a40;
  --gw-accent: #f0852e;
  --gw-text: #f5f7fb;
  --gw-muted: #9eb0c8;
  --gw-line: #ffffff14;
  position: relative;
  padding: 12px 12px 28px;
  border-radius: 28px;
  overflow: hidden;
  color: var(--gw-text);
  background:
    radial-gradient(80% 50% at 10% 0%, #1a3a55aa, transparent 55%),
    radial-gradient(70% 45% at 90% 20%, #24385888, transparent 50%),
    var(--gw-bg);
  font-family: "Outfit", "Sora", ui-rounded, sans-serif;
}
.gw-shell::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; opacity: .1;
  background-image:
    radial-gradient(circle at 12% 18%, #9fd4ff33 0 1px, transparent 2px),
    radial-gradient(circle at 78% 30%, #9fd4ff22 0 1.5px, transparent 3px),
    radial-gradient(circle at 30% 72%, #9fd4ff28 0 1px, transparent 2px);
  background-size: 120px 120px, 160px 160px, 100px 100px;
}
.gw-top {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.gw-back {
  width: 40px; height: 40px; border: 0; border-radius: 14px;
  background: var(--gw-soft); color: var(--gw-text);
  font-size: 20px; font-weight: 700; cursor: pointer;
}
.gw-kicker {
  margin: 0; font-size: 11px; font-weight: 750; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gw-accent);
}
.gw-brand h1 {
  margin: 2px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em;
}
.gw-widget {
  position: relative; z-index: 1;
  padding: 14px 12px 14px; border-radius: 26px;
  background: linear-gradient(180deg, #18263ad9, #121c2bf2);
  border: 1px solid var(--gw-line);
  box-shadow: 0 18px 48px #00000055;
  backdrop-filter: blur(16px);
}
.gw-cats {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.gw-cats::-webkit-scrollbar { display: none; }
.gw-cat {
  flex: 0 0 auto; border: 0; border-radius: 999px;
  padding: 10px 16px; font: inherit; font-weight: 750; font-size: 14px;
  background: var(--gw-soft); color: var(--gw-muted); cursor: pointer;
}
.gw-cat.is-on { background: var(--gw-accent); color: #1a1008; }
.gw-product {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center;
  margin: 14px 0 12px; padding: 12px; border-radius: 20px;
  background: var(--gw-soft); border: 1px solid var(--gw-line);
}
.gw-product-ico {
  width: 72px; height: 72px; border-radius: 18px;
  display: grid; place-items: center; color: var(--gw-accent);
  background: linear-gradient(145deg, #2a3f5c, #1a283c);
}
.gw-product-ico svg { width: 40px; height: 40px; }
.gw-product-copy h2 {
  margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.03em;
}
.gw-product-copy p {
  margin: 4px 0 0; font-size: 13.5px; color: var(--gw-muted); line-height: 1.35;
}
.gw-section { margin-bottom: 12px; }
.gw-section-title {
  margin: 0 0 8px; font-size: 11px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gw-accent);
}
.gw-sizes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px;
}
.gw-size {
  border: 0; border-radius: 16px; padding: 12px 8px; cursor: pointer;
  background: var(--gw-soft); color: var(--gw-text); font: inherit;
  display: grid; gap: 2px; justify-items: center;
}
.gw-size b { font-size: 16px; font-weight: 800; }
.gw-size span { font-size: 12px; color: var(--gw-muted); font-weight: 650; }
.gw-size.is-on { background: var(--gw-accent); color: #1a1008; }
.gw-size.is-on span { color: #3a220e; }
.gw-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-opt {
  border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer;
  background: var(--gw-soft); color: var(--gw-muted); font: inherit;
  font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.gw-opt.is-on { background: var(--gw-accent); color: #1a1008; }
.gw-opt .plus { opacity: .85; font-weight: 650; }
.gw-field {
  display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: var(--gw-muted);
}
.gw-field input, .gw-field textarea {
  width: 100%; border: 0; border-radius: 14px; padding: 12px 14px;
  background: #0f1826; color: var(--gw-text); font: inherit; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--gw-line);
}
.gw-field textarea { resize: vertical; min-height: 84px; }
.gw-tip {
  margin: 4px 0 12px; padding: 10px 12px; border-radius: 14px;
  background: #ffffff0a; color: var(--gw-muted); font-size: 12.5px; line-height: 1.4;
}
.gw-footer { margin-top: 4px; }
.gw-order {
  width: 100%; border: 0; border-radius: 16px; padding: 15px 16px; cursor: pointer;
  background: var(--gw-accent); color: #1a1008;
  font: inherit; font-size: 16px; font-weight: 800;
  box-shadow: 0 12px 28px #f0852e44;
}
.gw-order:active { filter: brightness(.96); }
.gw-order:disabled { opacity: .55; cursor: wait; }

/* Compact garant Mini App over chat (mode=compact) */
html.gw-compact #tabbar { display: none !important; }
html.gw-compact #shell { padding-bottom: 8px; }
html.gw-compact .gw-view { min-height: auto; margin: 0; }
html.gw-compact .gw-shell {
  border-radius: 22px 22px 0 0;
  min-height: calc(var(--app-vh, 70vh) - 12px);
  padding-bottom: calc(16px + var(--safe-b, 0px));
}
html.gw-compact .gw-back { display: none; }
