:root {
  color-scheme: dark;
  --bg: #0D0A09;
  --bg-2: #141010;
  --surface: #1C1715;
  --surface-2: #241D1A;
  --line: rgba(255,255,255,.07);
  --accent: #FF4D2E;
  --accent-2: #FF8A3D;
  --grad: linear-gradient(135deg, #FF4D2E 0%, #FF8A3D 100%);
  --text: #F5F0EC;
  --muted: #9A8E88;
  --muted-2: #6E635E;
  --radius: 18px;
  --nav-h: 64px;
  --app-h: 100vh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
}

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: var(--app-h);
  background: var(--bg);
  overflow: hidden;
}

/* ===== VIEWS ===== */
.view {
  position: absolute;
  inset: 0;
  bottom: var(--nav-h);
  display: none;
  flex-direction: column;
  padding-top: var(--safe-top);
}
.view.active { display: flex; animation: viewIn .28s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 20px;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px;
  min-height: 56px;
}
.topbar-title { font-size: 26px; font-weight: 800; flex: 1; letter-spacing: -.5px; }
.list-view .topbar-title, .detail-view .topbar-title { font-size: 20px; text-align: center; }
.topbar-spacer { flex: 1; }

.icon-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .15s, background .2s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn.ghost { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.12); backdrop-filter: blur(4px); }
.icon-btn svg { width: 20px; height: 20px; }

/* ===== HOME / HERO ===== */
.home-view { padding-top: 0; }
.hero {
  position: relative;
  height: 52%;
  min-height: 300px;
  overflow: hidden;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
.hero-photo {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 35%, rgba(255,90,40,.30) 0%, rgba(120,30,10,.18) 38%, transparent 70%),
    linear-gradient(180deg, #1a0f0a 0%, #0d0806 100%);
  /* To use a real photo: set background-image url here */
}
.hero-bottles {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background:
    repeating-linear-gradient(90deg,
      rgba(255,150,90,.10) 0px, rgba(255,150,90,.10) 5px,
      transparent 5px, transparent 11px,
      rgba(200,90,40,.07) 11px, rgba(200,90,40,.07) 15px,
      transparent 15px, transparent 22px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
  opacity: .55;
}
.hero-glow {
  position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,40,.45) 0%, transparent 65%);
  filter: blur(6px);
}
.hero-lamp {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 70px;
}
.hero-lamp::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 2px; height: 26px; background: #2a1c14;
}
.hero-lamp::after {
  content: ''; position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 30px;
  background: radial-gradient(circle at 50% 0%, #2a1810, #15100c);
  border-radius: 0 0 40px 40px;
  box-shadow: 0 18px 40px 6px rgba(255,120,50,.45);
}
.hero-neon {
  position: absolute; top: 32%; left: 50%; transform: translateX(-50%);
  font-family: 'Pacifico', cursive;
  font-size: clamp(34px, 12vw, 52px);
  line-height: .95; text-align: center; color: #ff6a3d;
  text-shadow:
    0 0 6px #ff4d2e, 0 0 14px #ff4d2e, 0 0 28px rgba(255,80,40,.9),
    0 0 48px rgba(255,80,40,.6);
  animation: flicker 5s infinite;
}
@keyframes flicker { 0%,97%,100%{opacity:1} 98%{opacity:.7} 99%{opacity:.95} }

.hero-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(14px + var(--safe-top)) 18px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-logo { width: 30px; height: 30px; color: var(--accent); display: inline-flex; }
.hero-logo svg { width: 30px; height: 30px; }

.home-body { padding: 26px 22px 0; }
.home-title { font-size: 30px; font-weight: 800; line-height: 1.12; letter-spacing: -.5px; }
.home-title .accent {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.home-sub { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 12px 0 26px; max-width: 340px; }

.btn-primary {
  width: 100%; background: var(--grad); color: #fff; border: none;
  height: 58px; border-radius: 16px; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  cursor: pointer; transition: transform .15s, box-shadow .3s;
  box-shadow: 0 10px 30px rgba(255,77,46,.35); margin-bottom: 14px;
}
.btn-primary:active { transform: scale(.98); }
.btn-secondary {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  height: 58px; border-radius: 16px; font-size: 17px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  cursor: pointer; transition: transform .15s;
}
.btn-secondary:active { transform: scale(.98); }
.arrow svg, .star-ico svg { width: 20px; height: 20px; }

/* ===== SEARCH ===== */
.search-wrap {
  display: none; align-items: center; gap: 8px; margin: 0 18px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 14px; height: 48px;
}
.search-wrap.open { display: flex; }
.search-ico { display: inline-flex; color: var(--muted); }
.search-ico svg { width: 18px; height: 18px; }
.search-input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 15px; font-family: inherit; height: 100%; }
.search-input::placeholder { color: var(--muted-2); }
.search-clear { background: rgba(255,255,255,.08); border: none; color: var(--muted); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.search-clear svg { width: 12px; height: 12px; }

/* ===== CATEGORY LIST ===== */
.cat-list { padding: 6px 18px 8px; display: flex; flex-direction: column; gap: 12px; }
.cat-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: transform .15s, border-color .25s;
}
.cat-card:active { transform: scale(.985); }
.cat-icon {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cat-icon svg { width: 26px; height: 26px; }
.cat-info { flex: 1; min-width: 0; }
.cat-name { font-size: 17px; font-weight: 700; }
.cat-count { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cat-chevron { color: var(--muted-2); display: inline-flex; }
.cat-chevron svg { width: 18px; height: 18px; }

/* ===== DISABLED CARD + SOON BADGE ===== */
.cat-card.disabled { opacity: .5; cursor: not-allowed; }
.cat-card.disabled:active { transform: none; }
.soon-badge {
  background: rgba(255,138,61,.15); border: 1px solid rgba(255,138,61,.5); color: var(--accent-2);
  padding: 4px 10px; border-radius: 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}

/* ===== ACCORDION (img2vid categories) ===== */
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acc-head {
  width: 100%; background: none; border: none; color: var(--text); cursor: pointer;
  display: flex; align-items: center; gap: 14px; padding: 16px;
}
.acc-head:active { background: var(--surface-2); }
.acc-icon { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,77,46,.13); color: var(--accent); }
.acc-icon svg { width: 22px; height: 22px; }
.acc-info { flex: 1; text-align: left; min-width: 0; }
.acc-name { font-size: 16px; font-weight: 700; }
.acc-count { font-size: 13px; color: var(--muted); margin-top: 2px; }
.acc-chev { color: var(--muted-2); display: inline-flex; transition: transform .25s; }
.acc-chev svg { width: 20px; height: 20px; }
.acc.open .acc-chev { transform: rotate(90deg); }
.acc-body { display: none; padding: 0 12px 12px; flex-direction: column; gap: 10px; }
.acc.open .acc-body { display: flex; animation: viewIn .25s ease; }

/* ===== PROMPT LIST ===== */
.prompt-list { padding: 8px 18px; display: flex; flex-direction: column; gap: 12px; }
.section-head { font-size: 13px; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: 1px; margin: 12px 2px 2px; }
.prompt-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: transform .15s, border-color .25s;
  display: flex; align-items: flex-start; gap: 12px;
}
.prompt-card:active { transform: scale(.985); }
.prompt-card .pc-main { flex: 1; min-width: 0; }
.prompt-card .pc-title { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.prompt-card .pc-text { font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-card .pc-chev { color: var(--muted-2); align-self: center; display: inline-flex; }
.prompt-card .pc-chev svg { width: 18px; height: 18px; }

/* ===== DETAIL ===== */
.detail-body { padding: 4px 22px 24px; }
.detail-tagrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tag-chip {
  background: rgba(255,77,46,.16); color: var(--accent); border: 1px solid rgba(255,77,46,.3);
  padding: 6px 14px; border-radius: 10px; font-size: 13px; font-weight: 700;
}
.star-btn { background: none; border: none; color: var(--muted); cursor: pointer; display: inline-flex; padding: 4px; }
.star-btn svg { width: 26px; height: 26px; }
.star-btn.on { color: var(--accent-2); }
.detail-title { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.detail-desc { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 12px 0 18px; }
.meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.meta-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--text);
}
.meta-chip svg { width: 18px; height: 18px; color: var(--muted); }
.detail-label { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.prompt-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; font-size: 14px; line-height: 1.6; color: #D9D0CB; white-space: pre-wrap; word-break: break-word;
  margin-bottom: 22px;
}
.btn-copy {
  width: 100%; background: var(--grad); color: #fff; border: none;
  height: 56px; border-radius: 16px; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; transition: transform .15s; box-shadow: 0 10px 28px rgba(255,77,46,.32); margin-bottom: 14px;
}
.btn-copy:active { transform: scale(.98); }
.btn-copy.copied { background: linear-gradient(135deg,#22c55e,#16a34a); }
.btn-copy svg { width: 18px; height: 18px; }
.similar-btn {
  width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  height: 56px; border-radius: 16px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; cursor: pointer; transition: transform .15s;
}
.similar-btn:active { transform: scale(.98); }
.similar-btn svg { width: 18px; height: 18px; color: var(--muted); }
.similar-list { margin-top: 12px; display: none; flex-direction: column; gap: 10px; }
.similar-list.open { display: flex; }

/* ===== PROFILE ===== */
.profile-body { padding: 8px 18px; }
.profile-hint { color: var(--muted); font-size: 14px; margin: 4px 2px 16px; }

/* ===== EMPTY ===== */
.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty .ico { display: inline-flex; color: var(--muted-2); margin-bottom: 12px; }
.empty .ico svg { width: 46px; height: 46px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; align-items: stretch;
  background: rgba(13,10,9,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1; background: none; border: none; cursor: pointer; color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: color .2s;
}
.nav-item.active { color: var(--accent); }
.nav-ico svg { width: 24px; height: 24px; }
.nav-label { font-size: 11px; font-weight: 600; }

/* ===== TOAST ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + var(--safe-bottom)); transform: translateX(-50%) translateY(16px);
  background: rgba(34,197,94,.96); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.45); max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== WIP PLACARD (profile) ===== */
.wip-wrap { text-align: center; padding: 72px 24px; display: flex; flex-direction: column; align-items: center; }
.wip-ico { display: inline-flex; color: var(--accent); margin-bottom: 14px; }
.wip-ico svg { width: 52px; height: 52px; }
.wip-badge {
  background: rgba(255,138,61,.15); border: 1px solid rgba(255,138,61,.5); color: var(--accent-2);
  padding: 5px 14px; border-radius: 9px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.wip-title { font-size: 22px; font-weight: 800; }
.wip-sub { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* ===== TELEGRAM BIND + STATUS (v0.4 - test) ===== */
.auth-intro { text-align: center; padding: 24px 0 18px; }
.auth-intro .big-ico { display: inline-flex; color: var(--accent); margin-bottom: 10px; }
.auth-intro .big-ico svg { width: 48px; height: 48px; }
.auth-intro h3 { font-size: 22px; font-weight: 800; }
.auth-intro p { font-size: 14px; color: var(--muted); margin-top: 6px; }

.btn-tg-auth {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--grad); color: #fff; border: none; border-radius: 14px;
  padding: 15px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px;
  transition: transform .15s, filter .2s;
}
.btn-tg-auth:active { transform: scale(.97); }
.btn-tg-auth svg { width: 20px; height: 20px; }
.auth-note { font-size: 12px; color: var(--muted-2); text-align: center; margin-top: 14px; line-height: 1.5; }

.account-head { display: flex; align-items: center; gap: 14px; padding: 6px 2px 18px; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 24px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-meta { min-width: 0; flex: 1; }
.account-name { font-size: 19px; font-weight: 800; }
.account-sub { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-id { color: var(--muted-2); font-size: 12px; }
.provider-chip { background: rgba(255,138,61,.15); border: 1px solid rgba(255,138,61,.4); color: var(--accent-2); padding: 2px 8px; border-radius: 7px; font-size: 11px; font-weight: 700; }

.status-row { margin-top: 8px; }
.status-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  letter-spacing: .2px;
}
.status-chip.vip {
  background: rgba(255,77,46,.16); border: 1px solid rgba(255,77,46,.5); color: #FF4D2E;
}
.status-chip.regular {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: var(--text);
}
.status-chip.guest {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.status-chip.none {
  background: var(--surface-2); color: var(--muted-2); border: 1px solid var(--line);
}
.status-note { font-size: 12px; color: var(--muted-2); margin-top: 8px; line-height: 1.4; }

.stats-row { display: flex; gap: 12px; margin-bottom: 20px; }
.stat-box { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.stat-num { font-size: 24px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

.section-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 6px 2px 12px; }
.btn-signout {
  width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--accent);
  border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 20px;
}
.btn-signout:active { transform: scale(.97); }

.tg-bind-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px 18px;
  text-align: center;
  margin-bottom: 8px;
}
.tg-bind-card .linked-ico { margin: 0 auto 12px; }
.linked-ico {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.linked-ico.tg { background: rgba(52,168,224,.18); color: #34a8e0; }
.linked-ico svg { width: 22px; height: 22px; }
.tg-bind-title { font-size: 20px; font-weight: 800; }
.tg-bind-sub { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.tg-bind-hint { font-size: 12px; color: var(--muted-2); margin-top: 10px; line-height: 1.4; }

.status-pill {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 800; letter-spacing: .3px;
}
.status-pill.vip {
  background: rgba(255,77,46,.16); color: #FF4D2E;
  border: 1px solid rgba(255,77,46,.5);
}
.status-pill.regular {
  background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.18);
}
.status-pill.guest,
.status-pill.none {
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line);
}

/* ===== OWNER CABINET (profile only; not a nav item) ===== */
.btn-cabinet {
  display: inline-block;
  margin: 4px 0 10px;
  background: none;
  border: none;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  padding: 2px 0;
}
.btn-cabinet:active { color: var(--muted); }
.btn-cabinet-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 10px;
}
.cab-head { font-size: 20px; font-weight: 800; margin: 0 0 12px; }
.cab-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.cab-title { font-size: 15px; font-weight: 700; }
.cab-cat { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.cab-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.cab-min, .cab-reg, .cab-gst, .cab-free {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}
.cab-save {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.cab-save:active { transform: scale(.98); }

/* ===== OWNER CABINET + FREE TIER (v0.4 - test) ===== */
.status-chip.free {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.cabinet-view .topbar-title { font-size: 20px; text-align: center; }

.cabinet-entry { margin: 4px 0 16px; }
.cabinet-link {
  background: none; border: none; color: var(--muted-2);
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; cursor: pointer; padding: 4px 0;
  font-family: inherit;
}
.cabinet-link:active { color: var(--accent-2); }

.cabinet-body { padding: 4px 18px 24px; display: flex; flex-direction: column; gap: 12px; }

.cab-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.cab-card .pc-title { font-size: 16px; font-weight: 700; }
.cab-meta { font-size: 13px; color: var(--muted); }

.cab-field { display: flex; flex-direction: column; gap: 6px; }
.cab-field label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
}
.cab-field input,
.cab-field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; font-family: inherit;
}
.cab-field textarea { min-height: 90px; resize: vertical; }

.cab-save, .cab-add {
  width: 100%; background: var(--grad); color: #fff; border: none;
  border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.cab-save:active, .cab-add:active { transform: scale(.97); }

.cab-seed {
  width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  border-radius: 14px; padding: 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.cab-seed:active { transform: scale(.97); }


.cab-input, .cab-textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  width: 100%;
}
.cab-textarea { font-weight: 500; line-height: 1.45; resize: vertical; min-height: 96px; }
.cab-new { margin-top: 16px; }
.cab-input::placeholder, .cab-textarea::placeholder { color: var(--muted-2); font-weight: 500; }

/* ===== CONTEST (owner preview; plaque hidden unless I_AM_OWNER) ===== */
.contest-plaque[hidden] { display: none !important; }
.contest-plaque { margin: -6px 0 18px; }
.plaque-btn {
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, #3a2a1c 0%, #1c140e 100%);
  border: 1px solid rgba(224, 162, 60, .38);
  border-radius: 14px;
  padding: 12px 16px 14px;
  color: #e0a23c;
  cursor: pointer;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 210, 140, .16), 0 8px 18px rgba(0,0,0,.28);
}
.plaque-btn:active { transform: scale(.98); }
.plaque-kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #c9a36a;
}
.plaque-title {
  display: block;
  font-family: 'Pacifico', cursive;
  font-size: 22px;
  line-height: 1.15;
  color: #ffb25a;
  margin-top: 2px;
  text-shadow: 0 0 10px rgba(255, 140, 60, .35);
}
.plaque-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

.contest-view .topbar-title { font-size: 22px; text-align: center; }
.contest-body { padding: 4px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.contest-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.contest-rules, .contest-pos { font-size: 14px; color: var(--muted); line-height: 1.5; }
.contest-empty { font-size: 14px; color: var(--muted-2); }
.invite-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 10px;
  color: var(--text);
}
.contest-board { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.contest-board li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 12px;
  font-size: 14px; font-weight: 600;
}
.board-nick { color: var(--text); }
.board-score { color: var(--accent-2); }
.prize-list { display: flex; flex-direction: column; gap: 8px; }
.prize-slot {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(224, 162, 60, .35);
  border-radius: 12px;
}
.prize-place {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(224, 162, 60, .15); color: #e0a23c;
  font-size: 12px; font-weight: 800;
}
.prize-title { font-size: 13px; color: var(--muted); }
.contest-webhook {
  width: 100%;
  background: none;
  border: none;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0 4px;
  font-family: inherit;
}
.contest-webhook:active { color: var(--muted); }
.prize-slot.prize-special {
  border-color: var(--accent);
  background: rgba(255, 77, 46, 0.08);
  flex-wrap: wrap;
}
.prize-slot.prize-special .prize-place {
  background: var(--accent);
  color: #0D0A09;
}
.prize-slot.prize-special .prize-note {
  width: 100%;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.prize-slot.prize-special.unlocked .prize-note { color: #fff; }

ol.contest-rules {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
ol.contest-rules li { margin: 0 0 8px; }
.contest-cycle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

