:root {
  --bg: #f7f3e8;
  --bg-soft: rgba(255, 253, 247, 0.72);
  --card: #fffdf7;
  --card-hover: #fffef9;
  --gold: #425438;
  --gold-bright: #364630;
  --gold-deep: #293326;
  --gold-soft: rgba(66, 84, 56, 0.12);
  --gold-line: rgba(41, 51, 38, 0.14);
  --text: #293326;
  --muted: #5f6a57;
  --danger: #a9684c;
  --ok: #425438;
  --light: #dfc77e;
  --shadow: 0 1px 2px rgba(41, 51, 38, 0.04), 0 18px 40px -28px rgba(41, 51, 38, 0.22);
  --radius: 18px;
  --btn-radius: 10px;
  --on-accent: #fdfcf6;
  --soft: #e5ead9;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Cormorant Garamond", "Times New Roman", serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}

body {
  font-family: var(--serif);
  font-weight: 500;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
}

h1, h2, h3,
.brand-text h1,
.welcome-hello,
.plan-name,
.plan-price,
.detail-price,
.landing-detail-name,
.landing-detail-price,
.status-card .title,
.channel-name {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}

body::before { display: none; }

.hidden { display: none !important; }

html.browser #boot,
html.browser #app {
  display: none !important;
}

html.tests-page #boot,
html.tests-page #app,
html.tests-page #landing {
  display: none !important;
}

html.tg-app #landing {
  display: block;
}

html.tg-app.tg-workspace #landing {
  display: none !important;
}

html.tg-app:not(.tg-workspace) .app > .header,
html.tg-app:not(.tg-workspace) .app > .view,
html.tg-app:not(.tg-workspace) .app > .legal-footer {
  display: none !important;
}

html.tg-app:not(.tg-workspace) .app {
  max-width: none;
  padding: calc(8px + var(--safe-top)) 12px 0;
}

html:not(.tg-app):not(.browser) #boot,
html:not(.tg-app):not(.browser) #app {
  display: none;
}

.landing {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-top)) 24px calc(36px + var(--safe-bottom));
}

.landing-hero {
  padding-bottom: 28px;
}

#landing-home .landing-hero,
#landing-about .landing-hero,
#landing-guides .landing-hero {
  padding-bottom: 8px;
}

#landing-guides .landing-hero .plan-card.trial {
  width: 100%;
}

.welcome-card {
  margin-top: 8px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.welcome-hello {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.welcome-card p {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

.welcome-card p:last-child {
  margin-bottom: 0;
}

.welcome-who {
  margin-top: 16px !important;
  font-weight: 800;
}

.welcome-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.welcome-list li {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.about-list li {
  color: var(--text);
}

.about-card .welcome-list {
  margin-bottom: 16px;
}

.bonus-card {
  position: relative;
  margin-top: 18px;
  overflow: visible;
}

.bonus-card .welcome-hello {
  font-size: 20px;
  padding-right: 76px;
}

.bonus-card .welcome-list {
  margin-bottom: 0;
}

.bonus-guides {
  display: grid;
  gap: 0;
  margin: 4px 0 14px;
}

.bonus-guide {
  border-top: 1px solid rgba(255, 255, 255, 0.62);
}

.bonus-guide:last-of-type {
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
}

.bonus-guide summary {
  position: relative;
  display: block;
  padding: 14px 28px 14px 0;
  list-style: none;
  cursor: pointer;
}

.bonus-guide summary::-webkit-details-marker,
.bonus-guide summary::marker {
  display: none;
  content: "";
}

.bonus-guide summary strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.bonus-guide summary::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold-bright);
  border-bottom: 2px solid var(--gold-bright);
  transform: rotate(45deg);
}

.bonus-guide[open] summary::after {
  top: 20px;
  transform: rotate(-135deg);
}

.bonus-guide p {
  margin: 0 0 14px;
}

.guide-cards {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.guide-card {
  margin-top: 0;
}

.guide-card summary {
  position: relative;
  display: block;
  list-style: none;
  cursor: pointer;
}

.guide-card summary::-webkit-details-marker,
.guide-card summary::marker {
  display: none;
  content: "";
}

.guide-card summary strong {
  display: block;
  padding-right: 28px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.guide-card summary span {
  display: block;
  margin-top: 6px;
  padding-right: 28px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.guide-card summary {
  position: relative;
}

.guide-card summary::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold-bright);
  border-bottom: 2px solid var(--gold-bright);
  transform: rotate(45deg);
}

.guide-card[open] summary::after {
  top: 12px;
  transform: rotate(-135deg);
}

.guide-card-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.62);
}

.guide-card-body p {
  margin: 0 0 12px;
}

.guide-card-body .welcome-list {
  margin: 0 0 14px;
}

.guide-card-body .plan-btn {
  width: 100%;
  margin-top: 8px;
}

.choice-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.choice-actions .btn {
  width: 100%;
  margin-top: 0;
}

.choice-actions .plan-card {
  width: 100%;
}

a.plan-card {
  color: inherit;
  text-decoration: none;
}

.choice-actions .plan-card.trial,
#landing-guides .landing-hero .plan-card.trial {
  margin: 4px 0;
}

.plan-card.channel-cta {
  grid-template-columns: 1fr auto;
  grid-template-areas: "name price";
  align-items: center;
}

.landing-hero .brand-mark {
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
}

.landing-brand {
  font-size: clamp(42px, 9vw, 64px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 0.95;
  background: linear-gradient(180deg, #425438 0%, #364630 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-hero h1 {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.landing-lead {
  margin-top: 12px;
  max-width: 28em;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  width: fit-content;
  min-width: 220px;
  padding-left: 28px;
  padding-right: 28px;
  text-decoration: none;
}

.landing-section {
  padding-top: 36px;
}

.landing-section h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.landing-section-text {
  margin: 8px 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.guide-list {
  display: grid;
  gap: 0;
}

a.tariff-item {
  text-decoration: none;
}

.landing-guides {
  padding-top: 0;
}

.landing-guides .landing-back {
  margin-top: 12px;
  margin-bottom: 0;
  width: 100%;
}

.offer-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.offer-actions .plan-card {
  width: 100%;
  margin: 0;
}

.offer-actions .landing-cta {
  margin-top: 0;
}

.offer-doc {
  padding-top: 4px;
}

.offer-doc .offer-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.offer-doc .offer-sub {
  margin: 8px 0 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.offer-doc h2 {
  margin: 28px 0 12px;
}

.offer-doc h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.offer-doc p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.offer-doc ul {
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.offer-doc li {
  margin: 0 0 8px;
}

.offer-doc code {
  font-size: 0.92em;
}

#view-offer .landing-back {
  width: fit-content;
  margin-top: 0;
  margin-bottom: 16px;
}

.guide-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), transparent 55%),
    var(--card);
  backdrop-filter: blur(16px);
}

.guide-badge {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ok);
}

.guide-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.guide-text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 140px;
  margin-top: 16px;
  text-decoration: none;
}

.landing-guides-open {
  width: 100%;
  margin-top: 4px;
}

.tariff-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.tariff-list > .plan-card.trial,
.tariff-list > .plan-card.featured {
  margin: 4px 0;
}

.tariff-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tariff-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.tariff-item:hover,
.tariff-item:focus-visible {
  color: var(--gold-bright);
  outline: none;
}

.tariff-item strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.tariff-item span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.tariff-item b {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-bright);
  white-space: nowrap;
}

.guide-list .tariff-item b {
  font-size: 15px;
}

.landing-plan-detail {
  margin-top: 8px;
}

.landing-plan-detail .landing-back {
  margin-top: 0;
  margin-bottom: 18px;
}

.landing-plan-detail .plan-btn,
.detail-card .plan-btn {
  width: 100%;
}

.detail-card > .plan-btn:first-child {
  margin-bottom: 16px;
}

.detail-card .welcome-card {
  margin-top: 0;
  margin-bottom: 16px;
}

.landing-plan-detail .welcome-card {
  margin-top: 0;
  margin-bottom: 16px;
}

.welcome-card .landing-detail-price,
.welcome-card .detail-price {
  margin: 0 0 14px;
}

.landing-detail-name {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.landing-detail-price {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 2.05rem;
  font-weight: 600;
  line-height: 1.1;
}

.landing-detail-text {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.tariff-list.hidden,
.guide-list.hidden,
.landing-plan-detail.hidden {
  display: none;
}

.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
}

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
}

.boot p { font-size: 14px; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  background: #f4efe6;
  box-shadow: 0 8px 20px rgba(36, 84, 138, 0.2);
}

.boot .brand-mark {
  width: 88px;
  height: 88px;
}

.brand-text h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-text p,
.header .greeting {
  color: var(--muted);
}

.header { margin-bottom: 20px; }

.greeting {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.4;
}

.admin-chrome {
  margin-bottom: 18px;
}

.view-mode-toggle {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid var(--gold-line);
  border-radius: var(--btn-radius);
  background: var(--card);
  color: var(--gold-bright);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.admin-chrome .tabs {
  margin-bottom: 0;
}

.tabs {
  display: flex;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: var(--btn-radius);
  background: var(--bg-soft);
  border: 1px solid var(--gold-line);
  backdrop-filter: blur(12px);
}

.tab {
  flex: 1;
  padding: 11px 8px;
  border: none;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  color: var(--on-accent);
  background: #425438;
}

.section-head {
  margin: 8px 0 12px;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.section-head p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.status-card,
.card {
  background: var(--card);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.status-card {
  display: grid;
  gap: 6px;
}

.status-card .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.status-card .title {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}

.status-card .hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.status-card .status-action {
  width: 100%;
  margin-top: 16px;
}

.status-card.active {
  background: var(--soft, #e5ead9);
  border-color: rgba(66, 84, 56, 0.28);
}

.status-card.pending { border-color: rgba(223, 199, 126, 0.9); }
.status-card.expired,
.status-card.empty { border-color: rgba(41, 51, 38, 0.18); }
.status-card.expired .label,
.status-card.empty .label { color: var(--muted); }

.plans { display: grid; gap: 10px; }

.plan-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name price"
    "meta price"
    "action action";
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  padding: 16px 16px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.plan-card:active { transform: scale(0.985); }

details.plan-card {
  display: block;
}

details.plan-card:active {
  transform: none;
}

details.plan-card > summary {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name price"
    "meta price"
    "action action";
  align-items: center;
  gap: 2px 12px;
  list-style: none;
  cursor: pointer;
}

details.plan-card > summary::-webkit-details-marker,
details.plan-card > summary::marker {
  display: none;
  content: "";
}

.tariff-card-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.62);
}

.tariff-card-body p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.tariff-card-body p:last-of-type {
  margin-bottom: 16px;
}

.tariff-card-body .plan-btn {
  margin-top: 4px;
}

.plan-card:hover,
.plan-card:focus-visible {
  outline: none;
  background: var(--card-hover);
  border-color: var(--gold);
}

@property --featured-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.plan-card.featured {
  border: 3px solid #14532d;
  background:
    linear-gradient(135deg, rgba(220, 252, 231, 0.7), transparent 42%),
    var(--card);
  box-shadow:
    0 0 0 1px rgba(20, 83, 45, 0.45),
    0 0 18px rgba(34, 197, 94, 0.28);
  animation: trial-glow 1.8s ease-in-out infinite;
}

.plan-card.featured::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 3px;
  pointer-events: none;
  z-index: 2;
  background: conic-gradient(
    from var(--featured-angle),
    #14532d 0 48%,
    #15803d 58%,
    #ffffff 66%,
    #bbf7d0 71%,
    #ffffff 76%,
    #4ade80 84%,
    #14532d 92% 100%
  );
  filter: drop-shadow(0 0 5px rgba(187, 247, 208, 0.95)) drop-shadow(0 0 12px rgba(34, 197, 94, 0.85));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: featured-orbit 1.7s linear infinite;
}

.plan-card.featured .badge {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  color: #07331c;
}

.bonus-card {
  border: 3px solid #143044;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 42%),
    var(--card);
  box-shadow:
    0 0 0 1px rgba(20, 48, 68, 0.45),
    0 0 18px rgba(20, 48, 68, 0.28);
  animation: featured-glow 1.8s ease-in-out infinite;
}

.bonus-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 3px;
  pointer-events: none;
  z-index: 2;
  background: conic-gradient(
    from var(--featured-angle),
    #143044 0 48%,
    #2f5f8f 58%,
    #ffffff 66%,
    #d6f0ff 71%,
    #ffffff 76%,
    #4aa3e6 84%,
    #143044 92% 100%
  );
  filter: drop-shadow(0 0 5px rgba(214, 240, 255, 0.95)) drop-shadow(0 0 12px rgba(74, 163, 230, 0.85));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: featured-orbit 1.7s linear infinite;
}

@keyframes featured-orbit {
  to { --featured-angle: 360deg; }
}

@keyframes featured-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(20, 48, 68, 0.4),
      0 0 10px rgba(20, 48, 68, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(74, 163, 230, 0.7),
      0 0 22px rgba(214, 240, 255, 0.7);
  }
}

@property --trial-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.plan-card.trial {
  border: 3px solid #14532d;
  background:
    linear-gradient(135deg, rgba(220, 252, 231, 0.7), transparent 42%),
    var(--card);
  box-shadow:
    0 0 0 1px rgba(20, 83, 45, 0.45),
    0 0 18px rgba(34, 197, 94, 0.28);
  animation: trial-glow 1.8s ease-in-out infinite;
}

.plan-card.trial::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 3px;
  pointer-events: none;
  z-index: 2;
  background: conic-gradient(
    from var(--trial-angle),
    #14532d 0 48%,
    #15803d 58%,
    #ffffff 66%,
    #bbf7d0 71%,
    #ffffff 76%,
    #4ade80 84%,
    #14532d 92% 100%
  );
  filter: drop-shadow(0 0 5px rgba(187, 247, 208, 0.95)) drop-shadow(0 0 12px rgba(34, 197, 94, 0.85));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: trial-orbit 1.7s linear infinite;
}

.plan-card.trial .badge {
  background: linear-gradient(180deg, #4ade80, #16a34a);
  color: #07331c;
}

@keyframes trial-orbit {
  to { --trial-angle: 360deg; }
}

@keyframes trial-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(20, 83, 45, 0.4),
      0 0 10px rgba(22, 163, 74, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(74, 222, 128, 0.75),
      0 0 22px rgba(187, 247, 208, 0.7);
  }
}

.plan-card.test {
  opacity: 0.88;
  border-style: dashed;
}

.plan-name {
  grid-area: name;
  font-size: 16px;
  font-weight: 700;
}

.plan-meta {
  grid-area: meta;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
}

.plan-price {
  grid-area: price;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
}

.plan-action {
  grid-area: action;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.plan-card.plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

a.plan-card.plan-btn {
  color: var(--text);
}

.badge {
  position: absolute;
  top: -8px;
  right: 14px;
  z-index: 3;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: #425438;
}

.detail-card h3.welcome-hello {
  font-size: 22px;
  margin-bottom: 12px;
}

.detail-price {
  color: var(--text);
  font-weight: 600;
  font-size: 2.05rem;
  line-height: 1.1;
  margin-bottom: 12px;
}

.detail-text {
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 18px;
}

.detail-card .stat-label {
  margin-bottom: 8px;
}

.detail-card .field {
  margin-bottom: 16px;
}

.btn {
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
  margin-top: 12px;
  border: none;
  border-radius: var(--btn-radius);
  background: #425438;
  color: var(--on-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px -14px rgba(41, 51, 38, 0.55);
}

.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: rgba(255, 255, 255, 0.55);
  color: var(--gold-bright);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.card .btn.secondary,
.guide-card .guide-btn,
.detail-card .btn.secondary {
  background: rgba(155, 184, 214, 0.38);
  border-color: rgba(58, 110, 165, 0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(224, 139, 122, 0.45);
  box-shadow: none;
}

.admin-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 84px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.admin-tile.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.admin-tile-icon {
  color: var(--gold);
  font-size: 18px;
}

.admin-tile-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.admin-tile-count {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
}

.admin-panel { min-height: 72px; }

.content-guide {
  margin-top: 4px;
}

.content-guide + .content-guide {
  margin-top: 16px;
}

.content-guide .stat-grid {
  margin-top: 8px;
}

.content-pie-wrap {
  margin: 8px 0 14px;
  padding: 14px 12px 10px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  text-align: center;
}

.content-pie {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.content-pie-total {
  fill: var(--text);
  font-size: 11px;
  font-weight: 800;
  font-family: var(--serif);
}

.content-pie-caption {
  fill: var(--muted);
  font-size: 5.2px;
  font-family: var(--serif);
}

.content-pie-hint {
  margin-top: 8px;
  text-align: center;
}

.content-swatch {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  flex-shrink: 0;
}

.content-share {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}

.content-guide-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.content-guide-title .content-swatch {
  margin-top: 7px;
}

.admin-panel-text,
.stat-label {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--gold-line);
  background: var(--bg-soft);
}

.channel-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-bright);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--card-hover);
}

.channel-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.channel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.channel-username {
  color: var(--gold);
  font-size: 14px;
}

.channel-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-subtitle {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
}

.admin-panel > .admin-subtitle:first-child {
  margin-top: 0;
}

.health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.health-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.health-ok {
  color: var(--ok);
  background: rgba(42, 143, 123, 0.12);
}

.health-warn {
  color: var(--gold-bright);
  background: rgba(58, 110, 165, 0.12);
}

.health-bad {
  color: var(--danger);
  background: rgba(224, 139, 122, 0.12);
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gold-line);
  font-size: 14px;
}

.health-row:last-child {
  border-bottom: none;
}

.metric-chart {
  margin: 10px 0 14px;
  padding: 12px 10px 8px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.metric-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.metric-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 2px 0 4px;
}

.metric-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.metric-legend i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
}

.metric-svg {
  display: block;
  width: 100%;
  height: auto;
}

.metric-svg .metric-axis {
  fill: #4d6f8c;
  font-size: 9px;
  font-family: var(--serif);
}

.metric-now {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.spark-block {
  margin: 8px 0 12px;
  color: var(--gold);
}

.sparkline {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 4px;
}

.stat .health-badge {
  font-size: 13px;
}

.payment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.payment-row-hit {
  display: block;
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.payment-row-hit:active {
  border-color: var(--gold);
}

.payment-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.payment-row-head strong {
  font-size: 14px;
  line-height: 1.35;
}

.payment-row-sum {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.payment-row-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.payment-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.payment-status-paid {
  color: var(--on-accent);
  background: var(--ok);
}

.payment-status-pending {
  color: var(--text);
  background: var(--light);
}

.payment-status-failed {
  color: var(--on-accent);
  background: var(--danger);
}

.payment-status-expired {
  color: var(--on-accent);
  background: var(--muted);
}

.payment-link {
  color: var(--gold);
  text-decoration: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.stat {
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid rgba(58, 110, 165, 0.16);
}

button.stat {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

button.stat:active {
  transform: scale(0.98);
}

.stat-more {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
}

.stat-hint {
  margin-top: 10px;
}

.stat-list {
  margin-top: 8px;
}

.stat-row {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stat-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-row-head strong,
.user-card .stat-row-head strong {
  display: block;
  min-width: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
}

.stat-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.user-channel-status {
  margin: 10px 0 12px;
}

.channel-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.channel-flag.is-in {
  color: var(--on-accent);
  background: var(--ok);
}

.channel-flag.is-out {
  color: var(--muted);
  background: rgba(77, 111, 140, 0.16);
}

.channel-flag.is-large {
  font-size: 13px;
  padding: 8px 14px;
}

.channel-flag.is-in::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--on-accent);
}

.stat-row .stat-label {
  font-size: 12px;
}

.stat-row.is-static {
  cursor: default;
}

.stat-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.stat-pager .btn {
  min-width: 64px;
  padding: 8px 12px;
}

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-bright);
}

.user-card strong {
  display: block;
}

.link-row,
.user-card {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.field, select.field {
  width: 100%;
  padding: 13px 16px;
  margin: 8px 0;
  border-radius: 18px;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.field::placeholder { color: var(--muted); }
.field:focus {
  outline: 2px solid rgba(58, 110, 165, 0.4);
  outline-offset: 1px;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 20;
  padding: 12px 16px;
  border-radius: var(--btn-radius);
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(58, 110, 165, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.grant-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.grant-mode {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: var(--btn-radius);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.grant-mode.active {
  color: var(--on-accent);
  border-color: transparent;
  background: #425438;
}

.grant-result {
  margin-top: 16px;
}

.grant-message {
  min-height: 180px;
  resize: vertical;
  line-height: 1.45;
}

.grant-result .btn.secondary {
  width: 100%;
  margin-top: 10px;
}

.legal-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  text-align: center;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(30, 61, 92, 0.48);
  letter-spacing: 0.01em;
}

.legal-footer-link {
  display: inline-block;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: rgba(30, 61, 92, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 0 0 14px;
}

.legal-footer-nav .legal-footer-link {
  margin: 0;
}

.legal-footer-link:active {
  color: var(--gold-bright);
}

.legal-footer p {
  margin: 0;
}

.legal-footer-title {
  margin-bottom: 4px !important;
  font-size: 11px;
  font-weight: 500;
  color: rgba(30, 61, 92, 0.62);
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--gold-bright); }
  .plan-card, .btn { transition: none; }
  .plan-card.featured,
  .plan-card.featured::before,
  .plan-card.trial,
  .plan-card.trial::before,
  .bonus-card,
  .bonus-card::before { animation: none; }
}
