:root {
  color-scheme: light;
  --ink: #14212b;
  --muted: #637381;
  --line: #dbe5ec;
  --surface: #ffffff;
  --soft: #f3f6f8;
  --accent: #0f8b8d;
  --accent-dark: #0a6769;
  --accent-soft: #e7f5f5;
  --warn: #b85c00;
  --ok: #1f7a4d;
  --danger: #c83232;
  --shadow: 0 12px 32px rgba(20, 33, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 8px 22px rgba(20, 33, 43, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}

.brand span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 17px;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  font-size: 14px;
}

.nav-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfc;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

nav a:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

nav a.active {
  color: white;
  background: var(--accent);
}

.admin-nav {
  border-color: #c8dce2;
  background: #eef6f7;
}

.lang-link {
  border: 1px solid var(--line);
  background: white;
}

.hero {
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(42px, 6vw, 72px) 7vw clamp(36px, 5vw, 56px);
  background:
    linear-gradient(120deg, rgba(15, 139, 141, 0.92), rgba(23, 32, 38, 0.82)),
    url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  color: white;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  margin-bottom: 18px;
}

.lead {
  max-width: 650px;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.55;
}

.status-panel,
.panel,
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-panel {
  color: var(--ink);
  padding: 24px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.featured-product-card + .status-panel {
  display: none;
}

.featured-product-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.featured-product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.featured-product-card figcaption {
  padding: 12px 14px;
  color: white;
  font-size: 14px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.62);
}

.featured-product-placeholder {
  min-height: 260px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.featured-product-placeholder strong {
  font-size: 22px;
}

.featured-product-placeholder span {
  line-height: 1.5;
  opacity: 0.9;
}

.status-panel span,
table span {
  color: var(--muted);
  font-size: 13px;
}

.section,
.admin {
  padding: 48px 7vw;
}

.admin {
  padding-top: 34px;
}

.admin-mode {
  background:
    linear-gradient(180deg, rgba(231, 245, 245, 0.72), rgba(243, 246, 248, 0) 280px),
    var(--soft);
}

.admin-mode .topbar {
  min-height: 64px;
  padding: 10px clamp(16px, 3vw, 32px);
  gap: 14px;
}

.admin-mode .brand span {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.admin-mode nav {
  gap: 8px;
  font-size: 13px;
}

.admin-mode .nav-group {
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
}

.admin-mode nav a {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 6px;
}

.admin-mode .admin-nav {
  order: 3;
  width: 100%;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-mode .admin {
  width: min(1780px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 36px) 44px;
}

.customer-mode {
  background:
    linear-gradient(180deg, rgba(231, 245, 245, 0.7), rgba(243, 246, 248, 0) 260px),
    var(--soft);
}

.customer-mode .topbar {
  min-height: 64px;
  padding: 10px clamp(14px, 3vw, 28px);
  gap: 14px;
}

.customer-mode .brand span {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.customer-mode nav {
  gap: 8px;
  font-size: 13px;
}

.customer-mode .nav-group {
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
}

.customer-mode nav a {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 6px;
}

.customer-mode .admin {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px clamp(14px, 3vw, 32px) 44px;
}

.customer-mode .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
  margin-bottom: 18px;
}

.customer-mode .section-head h1 {
  margin-bottom: 4px;
  font-size: clamp(28px, 3vw, 38px);
}

.customer-mode .section-head p {
  margin-bottom: 0;
}

.admin-mode .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
  margin-bottom: 18px;
}

.admin-mode .section-head h1 {
  margin-bottom: 4px;
  font-size: clamp(28px, 3vw, 36px);
}

.admin-mode .section-head p {
  margin-bottom: 0;
}

.admin-mode .panel,
.admin-mode .payment {
  padding: 20px;
}

.customer-mode .panel,
.customer-mode .payment {
  padding: 18px;
}

.admin-mode .panel h2,
.admin-mode .table-section h2 {
  font-size: 22px;
}

.customer-mode .panel h2,
.customer-mode .table-section h2 {
  font-size: 22px;
}

.section-head {
  max-width: 880px;
  margin-bottom: 24px;
}

.section-head h1,
.section-head h2 {
  font-size: 34px;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--muted);
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.plan {
  display: grid;
  align-content: start;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(20, 33, 43, 0.06);
}

.plan h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.price {
  font-size: 28px;
  font-weight: 800;
  margin: 14px 0;
}

dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  margin: 0 0 20px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 700;
}

input,
button,
.input-select {
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
}

input,
.input-select {
  border: 1px solid var(--line);
  padding: 0 12px;
  margin-bottom: 10px;
  background: white;
}

input[name="quantity"] {
  max-width: 150px;
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

input[readonly] {
  background: #eef3f5;
  color: var(--ink);
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.password-field {
  position: relative;
  margin-bottom: 10px;
}

.password-field input {
  width: 100%;
  padding-right: 76px;
  margin-bottom: 0;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: auto;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: #eef6ff;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.password-toggle:hover {
  background: #dbeafe;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  color: var(--ink);
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

button {
  border: 0;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

.form-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.form-note a {
  color: var(--accent-dark);
  font-weight: 700;
}

.notice {
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 700;
}

.notice.success {
  background: #dcfce7;
  color: #166534;
}

.notice.error {
  background: #fee2e2;
  color: #991b1b;
}

.narrow,
.login {
  width: min(620px, calc(100vw - 32px));
  margin: 56px auto;
}

.login {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
}

.panel,
.payment {
  padding: 28px;
}

.panel,
.table-wrap,
.stat-card {
  box-shadow: var(--shadow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.stat-card {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 34px;
  line-height: 1;
  color: var(--accent-dark);
}

.admin-mode .stats-grid {
  gap: 10px;
  margin-bottom: 16px;
}

.customer-mode .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-mode .stat-card {
  min-height: 92px;
  padding: 14px;
  border-radius: 7px;
}

.customer-mode .stat-card {
  min-height: 92px;
  padding: 14px;
  border-radius: 7px;
}

.admin-mode .stat-card strong {
  margin: 8px 0 4px;
  font-size: 28px;
}

.customer-mode .stat-card strong {
  margin: 8px 0 4px;
  font-size: 28px;
}

.admin-mode .stat-card span,
.admin-mode .stat-card small {
  font-size: 12px;
}

.customer-mode .stat-card span,
.customer-mode .stat-card small {
  font-size: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-mode .admin-grid {
  grid-template-columns: minmax(280px, 400px) minmax(320px, 1fr);
  gap: 14px;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px 120px 130px;
  gap: 10px;
  align-items: start;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.account-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px 120px 130px;
  gap: 10px;
  align-items: start;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.guide-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 120px 130px;
  gap: 10px;
  align-items: start;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.plan-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 150px 130px;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.admin-filters input,
.admin-filters .input-select,
.admin-filters button,
.account-filters input,
.account-filters .input-select,
.account-filters button,
.guide-filters input,
.guide-filters .input-select,
.guide-filters button,
.plan-filters input,
.plan-filters .input-select,
.plan-filters button {
  margin-bottom: 0;
}

.admin-mode .admin-filters,
.admin-mode .account-filters,
.admin-mode .guide-filters,
.admin-mode .plan-filters {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(20, 33, 43, 0.06);
}

.customer-mode .account-filters,
.customer-mode .guide-filters {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(20, 33, 43, 0.06);
}

.customer-mode .account-filters {
  grid-template-columns: minmax(220px, 1fr) 160px 160px 110px 120px;
}

.customer-mode .guide-filters {
  grid-template-columns: minmax(220px, 1fr) 110px 120px;
}

.admin-mode input,
.admin-mode textarea,
.admin-mode .input-select {
  border-color: #cfdde6;
}

.admin-mode input,
.admin-mode button,
.admin-mode .input-select {
  min-height: 40px;
}

.customer-mode input,
.customer-mode button,
.customer-mode .input-select {
  min-height: 40px;
}

.admin-mode textarea {
  min-height: 120px;
}

.admin-mode .field-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.customer-mode .field-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.admin-mode .form-note {
  margin: 8px 0 10px;
  font-size: 13px;
}

.panel h2 {
  margin-bottom: 16px;
}

.featured-image-preview {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.featured-image-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.featured-image-preview p {
  color: var(--muted);
  font-weight: 700;
}

.storefront-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.storefront-image-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.storefront-image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: white;
}

.storefront-image-card strong,
.storefront-image-card span {
  display: block;
}

.storefront-image-card strong {
  color: var(--ink);
  font-size: 14px;
}

.storefront-image-card span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.storefront-image-meta-form {
  display: grid;
  gap: 6px;
}

.storefront-image-meta-form input,
.storefront-image-meta-form button {
  margin-bottom: 0;
}

.storefront-hero-grid {
  margin-bottom: 18px;
}

.storefront-hero-grid textarea {
  min-height: 96px;
}

.storefront-hero-preview {
  color: white;
  background:
    linear-gradient(120deg, rgba(15, 139, 141, 0.92), rgba(23, 32, 38, 0.82)),
    url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
}

.storefront-hero-preview h1 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: 42px;
  line-height: 1.05;
}

.storefront-hero-preview p:not(.eyebrow) {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.5;
}

.inline-form {
  width: 142px;
}

.inline-form button {
  min-height: 36px;
  font-size: 13px;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 118px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.admin-mode .button-link,
.admin-mode button,
.admin-mode .secondary-button {
  border-radius: 6px;
  font-size: 13px;
}

.admin-mode .button-link {
  min-height: 34px;
  padding: 0 11px;
}

.admin-mode .inline-form {
  width: auto;
}

.admin-mode .inline-form button {
  width: auto;
  min-width: 96px;
  padding: 0 12px;
}

.license-copy-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.license-copy-row code {
  overflow-wrap: anywhere;
}

.license-key-stack {
  display: grid;
  gap: 6px;
}

.payment-resume {
  display: grid;
  gap: 8px;
  align-items: start;
}

.payment-resume .button-link {
  width: max-content;
  padding: 0 12px;
}

.plan-compact-table {
  min-width: 900px;
}

.plan-compact-table th:nth-child(1) {
  width: 38%;
}

.plan-compact-table th:nth-child(2) {
  width: 34%;
}

.plan-compact-table th:nth-child(3) {
  width: 120px;
}

.plan-compact-table th:nth-child(4) {
  width: 210px;
}

.plan-compact-table td {
  vertical-align: top;
}

.plan-compact-table strong {
  font-size: 15px;
}

.compact-muted {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.plan-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.plan-meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.plan-action-row .button-link,
.plan-action-row button {
  width: auto;
  min-width: 88px;
  padding: 0 12px;
}

.plan-action-row .inline-form {
  width: auto;
}

.copy-license {
  width: auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: #eaf2ff;
  color: #2554d8;
  border: 1px solid #b8d3ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.copy-license:hover {
  background: #dbeafe;
}

.secondary-action {
  background: #eaf2ff;
  color: #2554d8;
  border: 1px solid #b8d3ff;
}

.danger-action {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.danger-action:hover {
  background: #fecaca;
}

.secondary-button {
  min-height: 40px;
  margin: 0 0 10px;
  background: #eaf2ff;
  color: #2554d8;
  border: 1px solid #b8d3ff;
}

.secondary-button:hover {
  background: #dbeafe;
}

.rich-editor {
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f5f8fa;
}

.editor-toolbar button,
.editor-upload {
  width: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #cbddea;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.editor-toolbar button:hover,
.editor-upload:hover {
  background: #eaf2ff;
}

.youtube-insert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.youtube-insert-row[hidden] {
  display: none;
}

.youtube-insert-row input,
.youtube-insert-row button {
  margin-bottom: 0;
}

.editor-surface {
  min-height: 260px;
  padding: 14px;
  line-height: 1.6;
  outline: none;
}

.editor-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.editor-surface [data-editor-marker] {
  display: inline-block;
  width: 0;
  height: 1em;
  overflow: hidden;
  vertical-align: text-bottom;
}

.editor-surface img,
.guide-article img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.editor-surface img,
.editor-surface .video-embed {
  cursor: pointer;
}

.editor-surface .code-block {
  margin: 12px 0;
}

.editor-surface .selected-media {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.media-remove-button {
  position: absolute;
  z-index: 5;
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(20, 33, 43, 0.16);
}

.media-remove-button:hover {
  background: #fecaca;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.editor-surface .video-embed iframe {
  pointer-events: none;
}

.editor-surface .video-embed::after {
  content: "YouTube";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.guide-form-page {
  width: min(920px, calc(100vw - 32px));
}

.guide-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.update-list {
  display: grid;
  gap: 12px;
}

.update-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.update-platform-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.update-platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.update-platform-head h2 {
  margin: 0;
  font-size: 22px;
}

.update-platform-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef7ff;
  color: var(--blue);
  font-weight: 900;
}

.update-platform-panel .update-list {
  gap: 10px;
}

.update-platform-panel .update-card {
  grid-template-columns: 1fr;
  padding: 14px;
  box-shadow: none;
}

.update-platform-panel .update-download {
  width: max-content;
}

.update-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.update-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.update-title-row h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.update-title-row h3 {
  margin: 0;
  font-size: 18px;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--accent-dark);
  border: 1px solid #b9e7e8;
  font-size: 12px;
  font-weight: 900;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef7ff;
  color: var(--blue);
  border: 1px solid #c7dcff;
  font-size: 12px;
  font-weight: 900;
}

.update-notes {
  margin-top: 10px;
  color: var(--ink);
  line-height: 1.6;
}

.update-notes p:last-child,
.update-notes ul:last-child {
  margin-bottom: 0;
}

.update-download {
  min-width: 112px;
  padding: 0 14px;
}

.update-admin-table {
  min-width: 980px;
}

.update-admin-table td:nth-child(4) {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.guide-card,
.guide-article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.guide-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
}

.admin-mode .guide-card {
  padding: 14px 16px;
  gap: 12px;
}

.guide-card h2 {
  margin-bottom: 4px;
  font-size: 19px;
}

.admin-mode .guide-card h2 {
  font-size: 17px;
}

.guide-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 260px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-mode .guide-card-meta {
  min-width: 220px;
  gap: 8px;
}

.guide-media-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2554d8;
  font-size: 12px;
  font-weight: 800;
}

.guide-view-link {
  width: auto;
  min-width: 86px;
  padding: 0 14px;
}

.guide-article {
  line-height: 1.7;
}

.guide-article ul {
  padding-left: 22px;
}

.guide-date {
  color: var(--muted);
  font-size: 13px;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.55;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.pager > div {
  display: flex;
  gap: 8px;
}

.pager .button-link {
  min-width: 82px;
}

pre {
  padding: 16px;
  overflow-x: auto;
  background: #172026;
  color: white;
  border-radius: 8px;
}

.code-snippet {
  position: relative;
  margin: 16px 0;
}

.code-snippet pre {
  margin: 0;
  padding-top: 44px;
}

.code-snippet code,
.code-block code {
  color: inherit;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  min-height: 30px;
  background: #eaf2ff;
}

.table-section {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  box-shadow: var(--shadow);
}

.admin-mode .table-section {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
}

.table-section h2 {
  margin-bottom: 12px;
}

.table-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-mode .table-title-row {
  margin-bottom: 10px;
}

.admin-mode .table-title-row span {
  font-size: 13px;
}

.table-title-row h2 {
  margin-bottom: 0;
}

.table-title-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-mode table {
  font-size: 14px;
}

.customer-mode table {
  min-width: 760px;
  font-size: 14px;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-mode th,
.admin-mode td {
  padding: 10px 12px;
}

.customer-mode th,
.customer-mode td {
  padding: 10px 12px;
}

th {
  font-size: 13px;
  color: var(--muted);
  background: #f5f8fa;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-mode th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #f1f6f8;
}

.customer-mode th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #f1f6f8;
}

.admin-mode td {
  line-height: 1.35;
}

.customer-mode td {
  line-height: 1.35;
}

.admin-mode td code {
  word-break: break-all;
}

.customer-mode td code {
  word-break: break-all;
}

tbody tr:hover {
  background: #fbfefe;
}

.badge {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: white;
  background: var(--muted);
}

.admin-mode .badge {
  min-width: 64px;
  padding: 4px 8px;
  font-size: 11px;
}

.customer-mode .badge {
  min-width: 64px;
  padding: 4px 8px;
  font-size: 11px;
}

.badge.paid,
.badge.active {
  background: var(--ok);
}

.badge.pending {
  background: var(--warn);
}

.badge.expired {
  background: #991b1b;
}

.badge.inactive {
  background: var(--muted);
}

code {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 34px 18px 28px;
    gap: 22px;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .lead {
    font-size: 17px;
  }

  .featured-product-card img,
  .featured-product-placeholder {
    max-height: 260px;
  }

  .plans {
    grid-template-columns: 1fr;
  }

  .section,
  .admin {
    padding: 28px 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
    gap: 10px;
  }

  .admin-mode .topbar {
    padding: 10px 12px;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .admin-mode nav {
    width: 100%;
  }

  .nav-group {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .public-mode .nav-group,
  .customer-mode .nav-group {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .customer-mode .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-mode .admin-nav {
    flex-wrap: nowrap;
  }

  .admin-mode .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .guide-list {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-filters {
    grid-template-columns: 1fr;
  }

  .account-filters {
    grid-template-columns: 1fr;
  }

  .customer-mode .account-filters,
  .customer-mode .guide-filters {
    grid-template-columns: 1fr;
  }

  .guide-filters {
    grid-template-columns: 1fr;
  }

  .plan-filters {
    grid-template-columns: 1fr;
  }

  .guide-card {
    grid-template-columns: 1fr;
  }

  .update-card {
    grid-template-columns: 1fr;
  }

  .update-platform-grid {
    grid-template-columns: 1fr;
  }

  .guide-card-meta {
    justify-content: flex-start;
    min-width: 0;
    flex-wrap: wrap;
  }

  .pager {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 15px;
  }

  nav a {
    min-height: 32px;
    padding: 0 9px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    margin-bottom: 12px;
  }

  .featured-product-card figcaption {
    padding: 10px 12px;
  }

  .section-head h1,
  .section-head h2 {
    font-size: 28px;
  }

  .plan {
    padding: 16px;
  }

  .price {
    font-size: 25px;
  }

  dl {
    grid-template-columns: 82px 1fr;
  }

  input[name="quantity"] {
    max-width: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .table-section {
    margin-left: -8px;
    margin-right: -8px;
  }

  .table-title-row,
  .pager {
    padding-left: 8px;
    padding-right: 8px;
  }
}
