:root {
  --bg: #eff6fb;
  --bg-deep: #dde9f4;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-muted: #f6f9fc;
  --line: rgba(15, 41, 64, 0.1);
  --line-strong: rgba(15, 41, 64, 0.18);
  --ink: #102033;
  --muted: #61758c;
  --accent: #0f7fc2;
  --accent-strong: #0a5f91;
  --accent-soft: #d7eef9;
  --accent-mint: #22c55e;
  --accent-mint-soft: #def7ea;
  --success: #177b5b;
  --success-soft: #e2f6ee;
  --danger: #c2414c;
  --danger-soft: #fde8ec;
  --shadow-sm: 0 8px 24px rgba(15, 43, 63, 0.08);
  --shadow-md: 0 24px 60px rgba(15, 43, 63, 0.12);
  --shadow-lg: 0 34px 84px rgba(15, 43, 63, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --content-width: 1180px;
  --admin-sidebar-width: 308px;
  --ui-font: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display-font: "IBM Plex Sans Condensed", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono-font: "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;
  --transition: 200ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--ui-font);
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 28%),
    radial-gradient(circle at right 18%, rgba(34, 197, 94, 0.14), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 54%, var(--bg-deep) 100%);
}

body.has-media-modal {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 41, 64, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 41, 64, 0.035) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.84), transparent 82%);
  opacity: 0.38;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--ink);
  background: rgba(15, 127, 194, 0.16);
}

:focus-visible {
  outline: 3px solid rgba(15, 127, 194, 0.34);
  outline-offset: 3px;
}

.public-shell,
.admin-layout,
.admin-guest-shell {
  position: relative;
  z-index: 1;
}

.public-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.admin-guest-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.site-header,
.site-main,
.site-footer,
.admin-guest-header,
.admin-guest-main {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
}

.site-header,
.admin-guest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.site-main,
.admin-guest-main {
  padding: 28px 0 60px;
}

.site-footer {
  padding: 0 0 44px;
  color: var(--muted);
}

.site-footer p {
  margin: 6px 0 0;
}

.site-brand a,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.site-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  font-family: var(--display-font);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--accent) 0%, #083f61 100%);
  box-shadow: 0 16px 34px rgba(15, 127, 194, 0.3);
}

.site-brand-text,
.admin-brand span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-brand-text strong,
.admin-brand strong {
  font-family: var(--display-font);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.site-brand-text small,
.admin-brand small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a,
.admin-topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.72);
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.site-nav a:hover,
.admin-topbar-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.flash {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.site-main + .flash,
.site-header + .flash {
  width: min(calc(100% - 32px), var(--content-width));
}

.public-shell > .flash {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 16px auto 0;
}

.admin-main .flash,
.admin-guest-main .flash {
  margin: 0 0 18px;
}

.flash-success {
  color: var(--success);
  background: rgba(226, 246, 238, 0.92);
  border-color: rgba(23, 123, 91, 0.16);
}

.flash-error {
  color: var(--danger);
  background: rgba(253, 232, 236, 0.94);
  border-color: rgba(194, 65, 76, 0.16);
}

.hero-panel,
.detail-hero,
.login-card,
.admin-panel,
.admin-heading,
.empty-state,
.not-found,
.editor-form {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  animation: rise-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-panel::after,
.detail-hero::after,
.login-card::after,
.admin-heading::after,
.editor-form::after {
  content: "";
  position: absolute;
  inset: auto -6% -20% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 127, 194, 0.16) 0%, rgba(15, 127, 194, 0) 72%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-copy h1,
.login-copy h1,
.admin-heading h1,
.not-found h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2.6rem, 5.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-summary,
.detail-meta,
.login-copy p,
.admin-heading p,
.section-head p,
.tutorial-date,
.admin-item-meta,
.panel-header p,
.empty-state p,
.not-found p {
  color: var(--muted);
}

.hero-actions,
.form-actions,
.admin-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 16px 34px rgba(15, 127, 194, 0.28);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    opacity var(--transition);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(15, 127, 194, 0.32);
}

.button-outline {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--line-strong);
  box-shadow: none;
}

.button-outline:hover {
  box-shadow: var(--shadow-sm);
}

.button-danger {
  background: linear-gradient(135deg, #db5260 0%, #a62f3b 100%);
  box-shadow: 0 16px 34px rgba(194, 65, 76, 0.24);
}

.button-danger:hover {
  box-shadow: 0 20px 38px rgba(194, 65, 76, 0.28);
}

.button-full {
  width: 100%;
}

.button.is-loading,
.button:disabled {
  pointer-events: none;
  opacity: 0.82;
}

.button.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.82fr);
  gap: 28px;
  padding: 36px;
  margin-bottom: 34px;
}

.hero-copy {
  display: grid;
  align-content: start;
}

.hero-copy h1 {
  max-width: 10.5ch;
}

.hero-summary {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.04rem;
}

.hero-actions {
  margin-top: 28px;
}

.hero-stats,
.admin-overview {
  display: grid;
  gap: 16px;
}

.metric-card,
.admin-stat {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 249, 252, 0.9) 100%);
  box-shadow: var(--shadow-sm);
}

.metric-card strong,
.admin-stat strong {
  display: block;
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1;
}

.metric-card span,
.admin-stat p {
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  line-height: 1.05;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.tutorial-card,
.admin-item {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 252, 0.9) 100%);
  box-shadow: var(--shadow-sm);
  transition:
    transform 260ms ease,
    box-shadow 260ms ease,
    border-color 260ms ease;
}

.tutorial-card:hover,
.admin-item:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 127, 194, 0.18);
  box-shadow: 0 24px 52px rgba(15, 43, 63, 0.12);
}

.tutorial-card {
  display: flex;
  flex-direction: column;
}

.tutorial-cover-link,
.admin-item-cover-link {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 127, 194, 0.12), rgba(34, 197, 94, 0.12));
}

.tutorial-cover-link {
  aspect-ratio: 16 / 10;
}

.tutorial-cover,
.detail-cover,
.admin-item-cover,
.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-cover {
  transition: transform 320ms ease;
}

.tutorial-card:hover .tutorial-cover {
  transform: scale(1.04);
}

.tutorial-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.tutorial-card-body h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.24rem;
  line-height: 1.25;
}

.tutorial-card-body p {
  margin: 0;
  color: var(--muted);
}

.tutorial-date,
.admin-item-meta {
  font-size: 0.92rem;
}

.card-link {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent-strong);
  font-weight: 700;
}

.detail-page {
  display: grid;
  gap: 16px;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.detail-breadcrumb a:hover {
  color: var(--accent-strong);
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 20px 24px;
}

.detail-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.detail-copy h1 {
  position: relative;
  margin: 0;
  padding-left: 1.12em;
  max-width: 100%;
  font-family: var(--display-font);
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-copy h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.82em;
  height: 0.82em;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.72) 18%, rgba(255, 255, 255, 0) 44%),
    conic-gradient(from 210deg, #f7f7f8 0deg, #d0d0d3 52deg, #535357 110deg, #0f1013 185deg, #4a4a4e 246deg, #f0f0f1 325deg, #f7f7f8 360deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 2px 5px rgba(7, 16, 26, 0.14);
}

.detail-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  font-size: 0.95rem;
}

.tutorial-inline-media {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid rgba(15, 127, 194, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96) 0%, rgba(240, 247, 255, 0.9) 100%);
}

.tutorial-inline-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tutorial-inline-media-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 127, 194, 0.1);
}

.tutorial-inline-media-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tutorial-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tutorial-media-trigger {
  display: inline-grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 220px;
  min-height: 56px;
  padding: 8px 18px 8px 8px;
  border: 1px solid rgba(15, 41, 64, 0.08);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.98);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background-color var(--transition);
}

.tutorial-media-trigger:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 127, 194, 0.24);
  box-shadow: 0 16px 30px rgba(15, 43, 63, 0.1);
}

.tutorial-media-trigger.is-external {
  color: #fff;
  background: rgba(16, 32, 51, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
}

.tutorial-media-trigger-icon {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 12px 22px rgba(15, 127, 194, 0.2);
}

.tutorial-media-trigger-icon.is-disc {
  background:
    linear-gradient(180deg, transparent 49.2%, rgba(255, 255, 255, 0.24) 50%, transparent 50.8%),
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(255, 255, 255, 0) 42%),
    conic-gradient(
      from 270deg,
      #f6f6f7 0deg,
      #d7d7da 52deg,
      #090a0d 112deg,
      #1d1f24 180deg,
      #f1f1f2 238deg,
      #b0b1b5 294deg,
      #0a0b0f 328deg,
      #f6f6f7 360deg
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 20px rgba(7, 16, 26, 0.18);
}

.tutorial-media-trigger-icon.is-disc::before,
.tutorial-media-title-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    conic-gradient(
      from 45deg,
      rgba(255, 255, 255, 0.18) 0deg,
      rgba(255, 255, 255, 0.18) 80deg,
      rgba(0, 0, 0, 0.42) 80deg,
      rgba(0, 0, 0, 0.42) 182deg,
      rgba(255, 255, 255, 0.14) 182deg,
      rgba(255, 255, 255, 0.14) 258deg,
      rgba(0, 0, 0, 0.46) 258deg,
      rgba(0, 0, 0, 0.46) 360deg
    );
  opacity: 0.44;
}

.tutorial-media-trigger-icon.is-disc::after,
.tutorial-media-title-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 -10px 18px rgba(0, 0, 0, 0.14);
}

.tutorial-media-trigger.is-external .tutorial-media-trigger-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: none;
}

.tutorial-media-trigger-icon svg {
  width: 20px;
  height: 20px;
}

.tutorial-media-trigger-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.tutorial-media-trigger-copy strong {
  font-size: 1rem;
  line-height: 1.2;
}

.tutorial-media-trigger-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tutorial-media-trigger.is-external .tutorial-media-trigger-copy small {
  color: rgba(255, 255, 255, 0.76);
}

.tutorial-content {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  animation: rise-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tutorial-content > *:first-child {
  margin-top: 0;
}

.tutorial-content > *:last-child {
  margin-bottom: 0;
}

.tutorial-content h1,
.tutorial-content h2,
.tutorial-content h3,
.tutorial-content h4 {
  margin: 1.6em 0 0.6em;
  font-family: var(--display-font);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.tutorial-content h1::before,
.tutorial-content h2::before,
.tutorial-content h3::before,
.tutorial-content h4::before,
.field-editor .ql-editor h1::before,
.field-editor .ql-editor h2::before,
.field-editor .ql-editor h3::before,
.field-editor .ql-editor h4::before {
  content: "";
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin-right: 0.34em;
  border-radius: 50%;
  vertical-align: -0.08em;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.72) 18%, rgba(255, 255, 255, 0) 44%),
    conic-gradient(from 210deg, #f7f7f8 0deg, #d0d0d3 52deg, #535357 110deg, #0f1013 185deg, #4a4a4e 246deg, #f0f0f1 325deg, #f7f7f8 360deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 2px 5px rgba(7, 16, 26, 0.14);
}

.tutorial-content p,
.tutorial-content ul,
.tutorial-content ol,
.tutorial-content blockquote,
.tutorial-content pre {
  margin: 1em 0;
}

.tutorial-content ul,
.tutorial-content ol {
  padding-left: 1.35rem;
}

.tutorial-content ul,
.field-editor .ql-editor ul,
.editor-tips ul {
  list-style: none;
  padding-left: 0;
}

.tutorial-content ul > li,
.field-editor .ql-editor ul > li,
.editor-tips ul > li {
  position: relative;
  padding-left: 1.25rem;
}

.tutorial-content ul > li::before,
.field-editor .ql-editor ul > li::before,
.editor-tips ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.72) 18%, rgba(255, 255, 255, 0) 44%),
    conic-gradient(from 210deg, #f7f7f8 0deg, #d0d0d3 52deg, #535357 110deg, #0f1013 185deg, #4a4a4e 246deg, #f0f0f1 325deg, #f7f7f8 360deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 1px 2px rgba(7, 16, 26, 0.18);
}

.tutorial-content a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.tutorial-content code {
  padding: 0.18em 0.46em;
  border-radius: 0.46em;
  background: rgba(15, 127, 194, 0.08);
  font-family: var(--mono-font);
  font-size: 0.92em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.tutorial-content pre,
.ql-editor pre.ql-syntax,
.tutorial-code-surface {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 18px 20px;
  border-radius: 18px;
  color: #e8f3ff;
  font-size: 0.94rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: linear-gradient(180deg, #13263a 0%, #08121d 100%);
}

.tutorial-code-block {
  margin: 1em 0;
}

.tutorial-code-surface {
  display: grid;
  gap: 2px;
}

.tutorial-code-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 10px;
  align-items: start;
  padding: 2px 0;
}

.tutorial-code-line-text {
  min-width: 0;
  font-family: var(--mono-font);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.tutorial-code-surface ::selection,
.field-editor .ql-editor pre.ql-syntax ::selection {
  color: #f7fbff;
  background: rgba(94, 167, 255, 0.38);
}

.tutorial-line-copy,
.tutorial-line-copy-placeholder {
  width: 26px;
  height: 26px;
}

.tutorial-line-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 1px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(232, 243, 255, 0.72);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.tutorial-line-copy::after {
  content: attr(data-feedback);
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  padding: 4px 8px;
  border-radius: 999px;
  color: #f7fbff;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(4px);
  background: rgba(10, 20, 32, 0.92);
  box-shadow: 0 8px 20px rgba(3, 10, 18, 0.22);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.tutorial-line-copy:hover {
  color: #f8fcff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.tutorial-line-copy:active {
  transform: translateY(0);
}

.tutorial-line-copy.is-copied {
  color: #c7ffd8;
  border-color: rgba(120, 255, 167, 0.38);
  background: rgba(49, 176, 108, 0.18);
}

.tutorial-line-copy.is-copied::after {
  background: rgba(23, 92, 54, 0.95);
}

.tutorial-line-copy.is-error {
  color: #ffd5d5;
  border-color: rgba(255, 141, 141, 0.32);
  background: rgba(185, 64, 64, 0.2);
}

.tutorial-line-copy.is-error::after {
  background: rgba(126, 36, 36, 0.95);
}

.tutorial-line-copy.is-feedback-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tutorial-line-copy-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.tutorial-line-copy-placeholder {
  display: block;
}

.tutorial-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.tutorial-content blockquote {
  padding: 16px 18px;
  color: #184665;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: rgba(215, 238, 249, 0.56);
}

.tutorial-content img {
  margin: 24px auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(15, 43, 63, 0.14);
}

.tutorial-content p,
.tutorial-content li,
.tutorial-content blockquote {
  overflow-wrap: anywhere;
}

.tutorial-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tutorial-float-links {
  position: fixed;
  right: max(16px, calc(16px + env(safe-area-inset-right)));
  bottom: max(16px, calc(16px + env(safe-area-inset-bottom)));
  z-index: 80;
  display: grid;
  gap: 12px;
  justify-items: end;
}

.tutorial-float-link {
  --tutorial-float-icon-size: 38px;
  display: grid;
  grid-template-columns: var(--tutorial-float-icon-size) minmax(0, 1fr) var(--tutorial-float-icon-size);
  align-items: center;
  gap: 12px;
  width: 236px;
  min-height: 58px;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: rgba(10, 20, 32, 0.8);
  box-shadow: 0 20px 40px rgba(7, 16, 26, 0.22);
  backdrop-filter: blur(16px);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

.tutorial-float-link::after {
  content: "";
  width: var(--tutorial-float-icon-size);
  height: var(--tutorial-float-icon-size);
}

.tutorial-float-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(7, 16, 26, 0.28);
}

.tutorial-float-link img {
  width: var(--tutorial-float-icon-size);
  height: var(--tutorial-float-icon-size);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(7, 16, 26, 0.18);
  object-fit: cover;
}

.tutorial-float-link span {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tutorial-float-link.is-telegram {
  background: linear-gradient(135deg, rgba(33, 158, 224, 0.94) 0%, rgba(13, 117, 193, 0.94) 100%);
}

.tutorial-float-link.is-bot {
  background: linear-gradient(135deg, rgba(33, 39, 50, 0.94) 0%, rgba(12, 17, 25, 0.94) 100%);
}

.tutorial-media-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 28px);
}

.tutorial-media-modal[hidden] {
  display: none !important;
}

.tutorial-media-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(4, 12, 20, 0.66);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.tutorial-media-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(100%, 1120px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(6, 13, 21, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

.tutorial-media-modal.is-open .tutorial-media-backdrop {
  opacity: 1;
}

.tutorial-media-modal.is-open .tutorial-media-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tutorial-media-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 0;
  color: #fff;
}

.tutorial-media-topbar strong {
  display: inline-flex;
  align-items: center;
  gap: 0.62em;
  min-width: 0;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
}

.tutorial-media-title-mark {
  flex: 0 0 auto;
  position: relative;
  width: 1.02em;
  height: 1.02em;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 49.2%, rgba(255, 255, 255, 0.24) 50%, transparent 50.8%),
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.74) 18%, rgba(255, 255, 255, 0) 42%),
    conic-gradient(
      from 270deg,
      #f6f6f7 0deg,
      #d7d7da 52deg,
      #090a0d 112deg,
      #1d1f24 180deg,
      #f1f1f2 238deg,
      #b0b1b5 294deg,
      #0a0b0f 328deg,
      #f6f6f7 360deg
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.28);
}

.tutorial-media-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition);
}

.tutorial-media-close:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
}

.tutorial-media-close span {
  font-size: 1.42rem;
  line-height: 1;
}

.tutorial-media-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 140px);
  border-radius: 22px;
  background: #02070c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tutorial-media-player,
.tutorial-media-player-element,
.tutorial-media-player iframe,
.tutorial-media-player video {
  width: 100%;
  height: 100%;
}

.tutorial-media-player iframe,
.tutorial-media-player video {
  border: 0;
  background: #000;
}

.tutorial-media-player video {
  object-fit: contain;
}

.tutorial-content .ql-align-center {
  text-align: center;
}

.tutorial-content .ql-align-right {
  text-align: right;
}

.tutorial-content .ql-align-justify {
  text-align: justify;
}

.empty-state,
.not-found {
  padding: 36px;
  text-align: center;
}

.empty-state h3,
.not-found h1 {
  margin-bottom: 12px;
}

.empty-state.compact {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.58);
}

.not-found {
  margin-top: 28px;
}

.admin-shell {
  background:
    radial-gradient(circle at left top, rgba(14, 165, 233, 0.16), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(34, 197, 94, 0.12), transparent 20%),
    linear-gradient(180deg, #f2f8fd 0%, #e7f0f8 100%);
}

.admin-layout {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(247, 250, 252, 0.8);
  backdrop-filter: blur(24px);
  z-index: 30;
}

.admin-sidebar-panel,
.admin-side-footer {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
}

.admin-sidebar-description {
  margin: 16px 0 0;
  color: var(--muted);
}

.admin-nav-group {
  padding: 0 4px;
}

.admin-nav-label {
  margin: 0 0 12px;
  padding-left: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.admin-nav-link:hover {
  transform: translateX(2px);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.admin-nav-link.current {
  border-color: rgba(15, 127, 194, 0.18);
  background: linear-gradient(135deg, rgba(15, 127, 194, 0.14) 0%, rgba(34, 197, 94, 0.12) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(15, 127, 194, 0.08);
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.admin-side-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.admin-user-card {
  display: grid;
  gap: 4px;
}

.admin-user-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-user-card strong {
  font-family: var(--display-font);
  font-size: 1.5rem;
  line-height: 1.05;
}

.admin-user-card small {
  color: var(--muted);
}

.admin-stage {
  min-width: 0;
  padding: 18px 22px 34px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 18px;
}

.admin-topbar-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-topbar-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-topbar-meta strong {
  font-size: 1.06rem;
}

.admin-nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  cursor: pointer;
  background: rgba(6, 16, 27, 0.42);
}

.admin-main {
  width: min(100%, 1200px);
  margin: 0 auto;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  margin-bottom: 22px;
}

.admin-heading-copy {
  max-width: 720px;
}

.admin-heading p {
  margin: 14px 0 0;
  max-width: 58ch;
}

.admin-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(15, 127, 194, 0.14);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(15, 127, 194, 0.08);
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-heading-actions {
  align-items: center;
}

.admin-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.admin-stat {
  display: grid;
  gap: 10px;
}

.admin-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--accent-strong);
  background: linear-gradient(135deg, rgba(15, 127, 194, 0.14) 0%, rgba(34, 197, 94, 0.12) 100%);
}

.admin-stat-icon svg {
  width: 22px;
  height: 22px;
}

.admin-stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-stat p {
  margin: 0;
}

.admin-panel {
  padding: 28px;
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-header h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.5rem;
  line-height: 1.1;
}

.panel-header p {
  margin: 8px 0 0;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-item {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(0, 1fr) auto;
}

.admin-item-cover-link {
  height: 100%;
}

.admin-item-cover {
  min-height: 100%;
  aspect-ratio: 16 / 10;
}

.admin-item-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
}

.admin-item-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-item-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #0f7c59;
  background: rgba(34, 197, 94, 0.12);
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-item-body h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.25rem;
  line-height: 1.2;
}

.admin-item-body p {
  margin: 0;
  color: var(--muted);
}

.admin-item-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: rgba(246, 249, 252, 0.84);
}

.admin-item-actions form {
  width: 100%;
}

.admin-item-actions .button {
  width: 100%;
  min-width: 118px;
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
}

.editor-form {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.editor-main-column,
.editor-side-column {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field small {
  color: var(--muted);
  font-size: 0.92rem;
}

.field input,
.field textarea,
.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: rgba(15, 41, 64, 0.12) !important;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(15, 41, 64, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

.field input {
  min-height: 54px;
  padding: 0 16px;
}

.field input[type="file"] {
  padding: 14px 16px;
}

.field input::file-selector-button {
  margin-right: 14px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: var(--accent-strong);
  font-weight: 700;
  background: rgba(15, 127, 194, 0.1);
  cursor: pointer;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(15, 127, 194, 0.24);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(15, 127, 194, 0.34);
  box-shadow: 0 0 0 4px rgba(15, 127, 194, 0.12);
}

.field-editor {
  gap: 14px;
}

.editor-frame {
  min-height: 420px;
}

.ql-toolbar.ql-snow {
  padding: 12px 14px;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.92);
}

.ql-container.ql-snow {
  min-height: 420px;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, 0.88);
}

.ql-editor {
  min-height: 420px;
  padding: clamp(24px, 3vw, 40px);
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1.75;
}

.field-editor .ql-editor > *:first-child {
  margin-top: 0;
}

.field-editor .ql-editor > *:last-child {
  margin-bottom: 0;
}

.field-editor .ql-editor h1,
.field-editor .ql-editor h2,
.field-editor .ql-editor h3,
.field-editor .ql-editor h4 {
  margin: 1.6em 0 0.6em;
  font-family: var(--display-font);
  line-height: 1.15;
}

.field-editor .ql-editor p,
.field-editor .ql-editor ul,
.field-editor .ql-editor ol,
.field-editor .ql-editor blockquote,
.field-editor .ql-editor pre {
  margin: 1em 0;
}

.field-editor .ql-editor ul,
.field-editor .ql-editor ol {
  padding-left: 1.35rem;
}

.field-editor .ql-editor a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.field-editor .ql-editor code {
  padding: 0.18em 0.46em;
  border-radius: 0.46em;
  background: rgba(15, 127, 194, 0.08);
  font-family: var(--mono-font);
  font-size: 0.92em;
}

.field-editor .ql-editor pre.ql-syntax {
  margin: 1em 0;
}

.field-editor .ql-editor pre.ql-syntax code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.field-editor .ql-editor blockquote {
  padding: 16px 18px;
  color: #184665;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: rgba(215, 238, 249, 0.56);
}

.field-editor .ql-editor img {
  margin: 24px auto;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(15, 43, 63, 0.14);
}

.ql-snow .ql-stroke {
  stroke: var(--muted);
}

.ql-snow .ql-fill {
  fill: var(--muted);
}

.ql-snow .ql-picker {
  color: var(--muted);
}

.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-picker-label:hover,
.ql-snow .ql-picker-item:hover {
  color: var(--accent-strong);
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-picker-label:hover .ql-stroke {
  stroke: var(--accent-strong);
}

.ql-snow .ql-tooltip {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.cover-preview {
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 127, 194, 0.12) 0%, rgba(34, 197, 94, 0.12) 100%);
}

.cover-preview.is-empty {
  display: grid;
  place-items: center;
  border-style: dashed;
}

.cover-preview img {
  aspect-ratio: 16 / 10;
}

.cover-preview-placeholder {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.cover-preview-placeholder strong {
  color: var(--ink);
}

.editor-media-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 127, 194, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.editor-media-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.editor-media-card-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.12rem;
}

.editor-media-card-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.media-upload-summary {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.media-upload-summary.is-empty {
  border-style: dashed;
  background: rgba(246, 249, 252, 0.8);
}

.media-upload-summary strong {
  font-size: 0.96rem;
}

.media-upload-summary span {
  color: var(--muted);
  word-break: break-all;
}

.media-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.media-upload-actions .button {
  min-height: 44px;
  padding: 0 18px;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.checkbox-chip input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}

.checkbox-chip span {
  font-weight: 700;
}

.editor-tips {
  padding: 22px;
  border: 1px solid rgba(15, 127, 194, 0.12);
  border-radius: 24px;
  background: rgba(15, 127, 194, 0.06);
}

.editor-tips h2 {
  margin: 0 0 12px;
  font-family: var(--display-font);
  font-size: 1.14rem;
}

.editor-tips ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.form-error,
.form-error-list {
  padding: 14px 16px;
  color: var(--danger);
  border: 1px solid rgba(194, 65, 76, 0.16);
  border-radius: 16px;
  background: rgba(253, 232, 236, 0.94);
}

.form-error-list {
  margin-bottom: 18px;
}

.form-error-list p {
  margin: 0;
}

.form-error-list p + p {
  margin-top: 8px;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.92fr);
  gap: 24px;
  width: min(calc(100% - 32px), 1080px);
  margin: 48px auto 72px;
  padding: 32px;
}

.login-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.login-copy p {
  margin: 0;
  max-width: 56ch;
}

.login-copy h1 {
  max-width: 9.2ch;
}

.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-highlight {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 249, 252, 0.86) 100%);
  box-shadow: var(--shadow-sm);
}

.login-highlight strong {
  font-family: var(--display-font);
  font-size: 1rem;
  line-height: 1.1;
}

.login-highlight span {
  color: var(--muted);
  font-size: 0.92rem;
}

.login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
}

.login-form {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 252, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .admin-item {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-item-actions {
    flex-direction: row;
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .hero-panel,
  .detail-hero,
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-highlights {
    grid-template-columns: 1fr;
  }

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

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    height: auto;
    backdrop-filter: blur(18px);
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
  }

  body.admin-nav-open {
    overflow: hidden;
  }

  body.admin-nav-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-nav-toggle {
    display: inline-flex;
  }

  .admin-layout .admin-topbar-link {
    display: none;
  }

  .admin-stage {
    padding: 16px 16px 28px;
  }

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

  .password-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header,
  .admin-guest-header,
  .admin-heading,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

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

@media (max-width: 720px) {
  body::before {
    opacity: 0.24;
  }

  .site-header,
  .site-main,
  .site-footer,
  .admin-guest-header,
  .admin-guest-main {
    width: min(calc(100% - 20px), var(--content-width));
  }

  .site-header,
  .admin-guest-header {
    margin-top: 12px;
    padding: 16px 18px;
  }

  .hero-panel,
  .detail-hero,
  .login-card,
  .admin-panel,
  .admin-heading,
  .editor-form,
  .empty-state,
  .not-found {
    padding: 22px;
    border-radius: 24px;
  }

  .hero-panel,
  .detail-hero,
  .login-card,
  .admin-panel,
  .admin-heading,
  .editor-form,
  .empty-state,
  .not-found {
    backdrop-filter: blur(14px);
  }

  .hero-copy h1,
  .login-copy h1,
  .admin-heading h1,
  .not-found h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .detail-copy h1 {
    max-width: none;
    font-size: clamp(1.2rem, 5.4vw, 1.5rem);
    line-height: 1.15;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  .detail-hero {
    gap: 10px;
    padding: 18px 20px;
  }

  .tutorial-content {
    backdrop-filter: blur(12px);
  }

  .tutorial-media-dialog {
    width: min(100%, 760px);
    max-height: calc(100dvh - 20px);
    border-radius: 24px;
  }

  .tutorial-media-actions {
    width: 100%;
  }

  .tutorial-media-trigger {
    min-width: 0;
  }

  .tutorial-media-stage {
    aspect-ratio: auto;
    height: min(calc((100vw - 64px) * 0.5625), calc(100dvh - 112px));
    max-height: calc(100dvh - 112px);
  }

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

  .admin-item-actions {
    flex-direction: column;
    padding: 20px;
  }

  .admin-item-cover {
    aspect-ratio: 16 / 9;
  }

  .admin-item-actions form,
  .admin-item-actions .button {
    width: 100%;
  }

  .admin-topbar {
    padding-bottom: 14px;
  }

  .admin-topbar-meta strong {
    font-size: 1rem;
  }

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

  .login-form {
    padding: 22px;
  }

  .tutorial-float-links {
    right: max(12px, calc(12px + env(safe-area-inset-right)));
    bottom: max(12px, calc(12px + env(safe-area-inset-bottom)));
  }

  .tutorial-float-link {
    --tutorial-float-icon-size: 36px;
    width: 220px;
    min-height: 52px;
    padding: 8px 14px 8px 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 32px rgba(7, 16, 26, 0.22);
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .form-actions,
  .admin-heading-actions {
    flex-direction: column;
  }

  .hero-actions .button,
  .form-actions .button,
  .admin-heading-actions .button,
  .site-nav a {
    width: 100%;
  }

  .login-meta span,
  .admin-chip {
    width: 100%;
    justify-content: center;
  }

  .detail-meta {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .tutorial-inline-media {
    padding: 16px;
  }

  .tutorial-inline-media-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tutorial-media-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tutorial-media-trigger {
    width: 100%;
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 52px;
    padding: 8px 14px 8px 8px;
  }

  .tutorial-media-trigger-icon {
    width: 40px;
    height: 40px;
  }

  .tutorial-media-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    gap: 10px;
    padding: 10px;
  }

  .tutorial-media-topbar {
    gap: 10px;
    padding: 2px 2px 0;
  }

  .tutorial-media-topbar strong {
    gap: 0.56em;
    font-size: 0.94rem;
  }

  .tutorial-media-close {
    width: 36px;
    height: 36px;
  }

  .tutorial-media-stage {
    height: min(calc((100vw - 32px) * 0.5625), calc(100dvh - 88px));
    min-height: 0;
    max-height: calc(100dvh - 88px);
  }

  .tutorial-media-backdrop {
    backdrop-filter: blur(8px);
  }

  .tutorial-content {
    padding: 16px 14px;
    animation: none;
  }

  .tutorial-content pre,
  .ql-editor pre.ql-syntax,
  .tutorial-code-surface {
    padding: 14px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.6;
  }

  .editor-media-card-head,
  .media-upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .media-upload-actions .button,
  .checkbox-chip {
    width: 100%;
  }

  .tutorial-code-surface {
    padding: 16px;
  }

  .tutorial-code-line {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 8px;
  }

  .tutorial-line-copy,
  .tutorial-line-copy-placeholder {
    width: 24px;
    height: 24px;
  }

  .tutorial-line-copy::after {
    right: calc(100% + 6px);
    padding: 4px 7px;
    font-size: 0.68rem;
  }

  .tutorial-line-copy-icon {
    width: 12px;
    height: 12px;
  }

  .tutorial-float-links {
    right: max(10px, calc(10px + env(safe-area-inset-right)));
    bottom: max(10px, calc(10px + env(safe-area-inset-bottom)));
    gap: 10px;
  }

  .tutorial-float-link {
    --tutorial-float-icon-size: 32px;
    width: 198px;
    min-height: 46px;
    padding: 6px 10px 6px 6px;
    gap: 8px;
    border-radius: 18px;
  }

  .tutorial-float-link span {
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .tutorial-float-links {
    gap: 8px;
  }

  .tutorial-float-link {
    --tutorial-float-icon-size: 32px;
    width: auto;
    min-height: 42px;
    padding: 5px;
    border-radius: 999px;
  }

  .tutorial-float-link span {
    display: none;
  }
}

/* Admin refresh */
.admin-shell {
  --admin-deep: #0c1626;
  --admin-deep-strong: #08101b;
  --admin-ink-soft: #e6eef7;
  --admin-ink-muted: rgba(220, 231, 243, 0.68);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18), transparent 28%),
    linear-gradient(180deg, #edf5fc 0%, #e3edf6 48%, #dbe7f2 100%);
}

.admin-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.58), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(37, 99, 235, 0.08), transparent 22%);
}

.admin-shell .admin-layout,
.admin-shell .admin-guest-shell {
  position: relative;
  z-index: 1;
}

.admin-shell .admin-guest-header {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(12, 22, 38, 0.82);
  box-shadow: 0 24px 56px rgba(8, 17, 31, 0.22);
}

.admin-shell .admin-guest-header .admin-brand strong,
.admin-shell .admin-guest-header .admin-brand small,
.admin-shell .admin-guest-header .admin-topbar-link {
  color: #eef4fa;
}

.admin-shell .admin-layout {
  grid-template-columns: 336px minmax(0, 1fr);
}

.admin-shell .admin-sidebar {
  gap: 18px;
  padding: 18px;
  border-right: 1px solid rgba(102, 118, 148, 0.16);
  color: #eef4fa;
  background: linear-gradient(180deg, rgba(9, 17, 29, 0.96) 0%, rgba(15, 25, 41, 0.92) 100%);
  box-shadow: 20px 0 48px rgba(8, 17, 31, 0.16);
}

.admin-shell .admin-sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 220px;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 58%);
}

.admin-shell .admin-sidebar-panel,
.admin-shell .admin-side-footer {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: none;
}

.admin-shell .admin-sidebar-panel-primary {
  position: relative;
  overflow: hidden;
}

.admin-shell .admin-sidebar-panel-primary::after {
  content: "";
  position: absolute;
  inset: auto -40px -56px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0));
  pointer-events: none;
}

.admin-shell .admin-sidebar .site-brand-mark {
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.22);
}

.admin-shell .admin-sidebar .admin-brand strong,
.admin-shell .admin-user-card strong,
.admin-shell .admin-session-note strong {
  color: #fff;
}

.admin-shell .admin-sidebar .admin-brand small,
.admin-shell .admin-sidebar-description,
.admin-shell .admin-nav-label,
.admin-shell .admin-user-label,
.admin-shell .admin-user-card small,
.admin-shell .admin-session-note p {
  color: var(--admin-ink-muted);
}

.admin-shell .admin-sidebar-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-shell .admin-status-pill,
.admin-shell .login-signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-shell .admin-status-pill {
  color: var(--admin-ink-soft);
  background: rgba(255, 255, 255, 0.06);
}

.admin-shell .admin-status-pill.is-live,
.admin-shell .login-signal-pill.is-live {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.12);
}

.admin-shell .admin-sidebar-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.admin-shell .admin-sidebar-points span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #dce7f4;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
}

.admin-shell .admin-nav-link {
  color: #eef4fa;
  background: transparent;
}

.admin-shell .admin-nav-link .nav-icon {
  color: #83d5ff;
  background: rgba(56, 189, 248, 0.12);
}

.admin-shell .admin-nav-link:hover {
  transform: translateX(6px);
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.admin-shell .admin-nav-link.current {
  border-color: rgba(56, 189, 248, 0.22);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(16, 185, 129, 0.12) 100%);
  box-shadow: 0 12px 30px rgba(3, 10, 18, 0.22);
}

.admin-shell .admin-session-note {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-shell .admin-session-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.admin-shell .admin-session-note p {
  margin: 0;
  font-size: 0.9rem;
}

.admin-shell .admin-side-footer .button-outline {
  color: #eef4fa;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.admin-shell .admin-side-footer .button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-shell .admin-stage {
  padding: 22px 24px 40px;
}

.admin-shell .admin-topbar {
  position: sticky;
  top: 16px;
  z-index: 18;
  padding: 16px 20px;
  margin-bottom: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 20px 52px rgba(13, 31, 52, 0.12);
  backdrop-filter: blur(18px);
}

.admin-shell .admin-topbar-meta {
  gap: 6px;
}

.admin-shell .admin-topbar-meta strong {
  font-family: var(--display-font);
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.admin-shell .admin-topbar-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-shell .admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.admin-shell .admin-panel,
.admin-shell .admin-heading,
.admin-shell .editor-form,
.admin-shell .login-card {
  border-color: rgba(106, 126, 152, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 249, 252, 0.86) 100%);
  box-shadow: 0 28px 64px rgba(13, 31, 52, 0.12);
}

.admin-shell .admin-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: stretch;
  gap: 18px;
  padding: 34px;
}

.admin-shell .admin-heading h1 {
  font-size: clamp(2.4rem, 4.2vw, 4.4rem);
}

.admin-shell .admin-heading p {
  font-size: 1rem;
}

.admin-shell .admin-heading-side {
  display: grid;
}

.admin-shell .admin-spotlight {
  display: grid;
  align-content: start;
  gap: 12px;
  height: 100%;
  padding: 22px;
  border: 1px solid rgba(15, 127, 194, 0.14);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(10, 95, 145, 0.08) 0%, rgba(34, 197, 94, 0.1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.admin-shell .admin-spotlight-label,
.admin-shell .admin-security-kicker,
.admin-shell .login-console-label {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-shell .admin-spotlight strong,
.admin-shell .admin-security-card strong,
.admin-shell .login-console-card strong {
  font-family: var(--display-font);
  font-size: 1.38rem;
  line-height: 1.08;
}

.admin-shell .admin-spotlight p,
.admin-shell .admin-security-card p,
.admin-shell .login-console-card p {
  margin: 0;
  color: var(--muted);
}

.admin-shell .admin-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-shell .admin-stat {
  min-height: 190px;
  align-content: start;
}

.admin-shell .admin-stat strong {
  font-size: clamp(1.9rem, 2.7vw, 2.6rem);
}

.admin-shell .admin-stat:nth-child(1) .admin-stat-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(14, 165, 233, 0.08) 100%);
}

.admin-shell .admin-stat:nth-child(2) .admin-stat-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.admin-shell .admin-stat:nth-child(3) .admin-stat-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(249, 115, 22, 0.08) 100%);
}

.admin-shell .admin-stat:nth-child(4) .admin-stat-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.admin-shell .admin-panel-header {
  align-items: center;
}

.admin-shell .admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.admin-shell .admin-toolbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: min(100%, 320px);
  padding: 0 14px;
  border: 1px solid rgba(15, 41, 64, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-shell .admin-toolbar-search-icon {
  display: inline-flex;
  color: var(--muted);
}

.admin-shell .admin-toolbar-search-icon svg {
  width: 18px;
  height: 18px;
}

.admin-shell .admin-toolbar-search input {
  width: min(100%, 260px);
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-shell .admin-toolbar-search input:focus {
  box-shadow: none;
}

.admin-shell .admin-toolbar-search:focus-within {
  border-color: rgba(15, 127, 194, 0.24);
  box-shadow: 0 0 0 4px rgba(15, 127, 194, 0.1);
}

.admin-shell .admin-toolbar-result {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--accent-strong);
  font-weight: 700;
  background: rgba(15, 127, 194, 0.08);
}

.admin-shell .admin-list {
  gap: 18px;
}

.admin-shell .admin-item {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) 214px;
  align-items: stretch;
}

.admin-shell .admin-item-cover {
  aspect-ratio: 16 / 11;
}

.admin-shell .admin-item-topline {
  gap: 8px 10px;
}

.admin-shell .admin-item-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.admin-shell .admin-item-tag.is-video {
  color: #0f7c59;
  background: rgba(34, 197, 94, 0.12);
}

.admin-shell .admin-item-body h3 {
  font-size: 1.35rem;
}

.admin-shell .admin-item-linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-shell .admin-item-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.85rem;
}

.admin-shell .admin-item-actions {
  gap: 10px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(240, 245, 250, 0.92) 100%);
}

.admin-shell .admin-filter-empty {
  margin-top: 18px;
}

.admin-shell .admin-security-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.28fr);
  gap: 18px;
}

.admin-shell .admin-security-card,
.admin-shell .admin-password-form {
  padding: 22px;
  border: 1px solid rgba(15, 41, 64, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.admin-shell .admin-security-card {
  display: grid;
  gap: 14px;
}

.admin-shell .admin-security-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.admin-shell .admin-password-form {
  align-items: end;
}

.admin-shell .field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-shell .field-counter {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-shell .field-counter.is-warning {
  color: var(--accent-strong);
}

.admin-shell .field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-shell .field-input-wrap input {
  padding-right: 72px;
}

.admin-shell .field-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(15, 41, 64, 0.12);
  border-radius: 999px;
  color: var(--accent-strong);
  cursor: pointer;
  transform: translateY(-50%);
  background: rgba(15, 127, 194, 0.08);
  font-size: 0.84rem;
  font-weight: 700;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.admin-shell .field-toggle:hover {
  border-color: rgba(15, 127, 194, 0.18);
  background: rgba(15, 127, 194, 0.12);
}

.admin-shell .field-input-wrap:focus-within .field-toggle {
  border-color: rgba(15, 127, 194, 0.22);
}

.admin-shell .editor-form {
  padding: 30px;
}

.admin-shell .editor-section,
.admin-shell .editor-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(106, 126, 152, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.admin-shell .editor-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-shell .editor-section-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.24rem;
  line-height: 1.1;
}

.admin-shell .editor-section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-shell .editor-section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(15, 127, 194, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-shell .editor-summary-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(93, 234, 255, 0.16);
  border-radius: 26px;
  color: #eef5fc;
  background: linear-gradient(180deg, rgba(8, 19, 34, 0.96) 0%, rgba(15, 31, 50, 0.92) 100%);
  box-shadow: 0 24px 48px rgba(7, 15, 26, 0.22);
}

.admin-shell .editor-summary-card .eyebrow {
  margin-bottom: 8px;
  color: #8ad7ff;
}

.admin-shell .editor-summary-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.46rem;
  line-height: 1.08;
}

.admin-shell .editor-summary-head p {
  margin: 10px 0 0;
  color: rgba(231, 242, 252, 0.74);
}

.admin-shell .editor-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-shell .editor-summary-metric {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.admin-shell .editor-summary-metric span {
  display: block;
  color: rgba(231, 242, 252, 0.68);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-shell .editor-summary-metric strong {
  display: block;
  margin-top: 8px;
  font-family: var(--display-font);
  font-size: 1.06rem;
}

.admin-shell .editor-summary-actions {
  display: grid;
  gap: 10px;
}

.admin-shell .editor-summary-actions .button-outline {
  color: #f5fbff;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.admin-shell .editor-summary-actions .button-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-shell .editor-card .cover-preview {
  min-height: 220px;
}

.admin-shell .editor-card.editor-tips {
  background: linear-gradient(180deg, rgba(15, 127, 194, 0.08) 0%, rgba(255, 255, 255, 0.76) 100%);
}

.admin-shell .editor-card.editor-tips ul {
  margin: 0;
}

.admin-shell .login-card {
  width: min(calc(100% - 32px), 1180px);
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 28px;
  margin: 18px auto 48px;
  padding: 36px;
}

.admin-shell .admin-guest-main {
  display: grid;
  align-content: center;
  padding: 30px 0 56px;
}

.admin-shell .login-copy {
  gap: 22px;
}

.admin-shell .login-copy-head {
  display: grid;
  gap: 16px;
}

.admin-shell .login-copy h1 {
  max-width: 10.5ch;
}

.admin-shell .login-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-shell .login-signal-pill {
  color: var(--accent-strong);
  background: rgba(15, 127, 194, 0.08);
}

.admin-shell .login-highlights {
  gap: 16px;
}

.admin-shell .login-highlight {
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: start;
  padding: 20px;
}

.admin-shell .login-highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--accent-strong);
  background: linear-gradient(135deg, rgba(15, 127, 194, 0.14) 0%, rgba(34, 197, 94, 0.12) 100%);
}

.admin-shell .login-highlight-icon svg {
  width: 20px;
  height: 20px;
}

.admin-shell .login-highlight > strong {
  grid-column: 2;
  font-size: 1.04rem;
}

.admin-shell .login-highlight > strong + span {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-shell .login-console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-shell .login-console-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(15, 41, 64, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
}

.admin-shell .login-form {
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 252, 0.92) 100%);
  box-shadow:
    0 24px 50px rgba(13, 31, 52, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-shell .login-form-head {
  display: grid;
  gap: 10px;
}

.admin-shell .login-form-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.68rem;
  line-height: 1.08;
}

.admin-shell .login-form-head p {
  margin: 0;
  color: var(--muted);
}

.admin-shell .login-form-footer {
  display: grid;
  gap: 12px;
}

@media (max-width: 1180px) {
  .admin-shell .admin-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .admin-item {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-shell .admin-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

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

@media (max-width: 1040px) {
  .admin-shell .login-card {
    grid-template-columns: 1fr;
  }

  .admin-shell .login-console-grid,
  .admin-shell .admin-heading {
    grid-template-columns: 1fr;
  }

  .admin-shell .admin-sidebar {
    width: min(88vw, 332px);
  }

  .admin-shell .admin-stage {
    padding: 16px 16px 32px;
  }
}

@media (max-width: 900px) {
  .admin-shell .admin-panel-header {
    align-items: stretch;
  }

  .admin-shell .admin-toolbar {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .admin-shell .admin-toolbar-search {
    flex: 1 1 280px;
  }
}

@media (max-width: 720px) {
  .admin-shell .admin-guest-main {
    padding: 22px 0 40px;
  }

  .admin-shell .login-card {
    margin: 10px auto 24px;
    padding: 22px;
  }

  .admin-shell .login-copy h1 {
    max-width: none;
    font-size: clamp(2.2rem, 9vw, 3.4rem);
  }

  .admin-shell .admin-panel,
  .admin-shell .admin-heading,
  .admin-shell .editor-form {
    padding: 22px;
    border-radius: 24px;
  }

  .admin-shell .admin-topbar {
    gap: 12px;
    padding: 14px 16px;
    border-radius: 22px;
  }

  .admin-shell .admin-heading h1 {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .admin-shell .admin-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-shell .admin-topbar-actions .button {
    flex: 1 1 auto;
  }

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

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

  .admin-shell .admin-item-actions {
    grid-column: auto;
    flex-direction: column;
    padding: 20px;
  }

  .admin-shell .admin-item-actions form,
  .admin-shell .admin-item-actions .button {
    width: 100%;
  }

  .admin-shell .admin-item-link {
    white-space: normal;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 16px;
  }

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

@media (max-width: 480px) {
  .admin-shell .login-signal-pill,
  .admin-shell .admin-toolbar-result {
    width: 100%;
    justify-content: center;
  }

  .admin-shell .login-form,
  .admin-shell .admin-password-form {
    padding: 20px;
  }

  .admin-shell .field-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .admin-shell .field-toggle {
    min-height: 32px;
    padding: 0 10px;
  }

  .admin-shell .admin-topbar-actions .button,
  .admin-shell .admin-topbar-actions .admin-topbar-link {
    width: 100%;
  }
}

.detail-meta-item {
  display: inline-flex;
  align-items: center;
}

.admin-login-page {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.1), transparent 22%),
    radial-gradient(circle at top right, rgba(15, 127, 194, 0.12), transparent 24%),
    linear-gradient(180deg, #0f172a 0%, #111b2f 100%);
}

.admin-login-page::before {
  opacity: 0;
}

.admin-login-page .admin-guest-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.admin-login-page .admin-guest-header {
  width: min(calc(100% - 32px), 430px);
  margin-top: 18px;
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.48);
  box-shadow: none;
}

.admin-login-page .admin-brand strong,
.admin-login-page .admin-brand small,
.admin-login-page .admin-topbar-link {
  color: #eef4ff;
}

.admin-login-page .admin-guest-main {
  display: grid;
  align-content: center;
  padding: 16px 0 48px;
}

.admin-login-page .login-card {
  width: min(calc(100% - 32px), 430px);
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0 auto;
  padding: 26px;
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(248, 251, 249, 0.64) 0%, rgba(247, 249, 247, 0.46) 100%);
  box-shadow: 0 28px 60px rgba(15, 25, 19, 0.16);
  backdrop-filter: blur(18px);
}

.admin-login-page .login-card::after {
  display: none;
}

.admin-login-page .login-branding {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-login-page .login-branding-mark {
  flex-shrink: 0;
}

.admin-login-page .login-branding-mark .site-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.admin-login-page .login-branding-copy {
  display: grid;
  gap: 8px;
}

.admin-login-page .login-branding-copy .eyebrow {
  margin-bottom: 0;
}

.admin-login-page .login-branding-copy h1 {
  max-width: none;
  margin: 0;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.admin-login-page .login-branding-copy p {
  margin: 0;
  color: rgba(16, 32, 51, 0.68);
}

.admin-login-page .login-form {
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-login-page .field {
  gap: 8px;
}

.admin-login-page .field span {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.admin-login-page .field input {
  min-height: 52px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.admin-login-page .field input:focus {
  border-color: rgba(15, 122, 86, 0.42);
  box-shadow: 0 0 0 4px rgba(15, 122, 86, 0.1);
}

.admin-login-page .field-input-wrap input {
  padding-right: 72px;
}

.admin-login-page .field-toggle {
  border-color: rgba(19, 32, 24, 0.1);
  background: rgba(255, 255, 255, 0.52);
}

.admin-login-page .button {
  min-height: 52px;
  border-radius: 18px;
  box-shadow: 0 18px 30px rgba(15, 122, 86, 0.24);
}

.admin-login-page .login-note {
  color: rgba(16, 32, 51, 0.62);
  font-size: 0.9rem;
  text-align: center;
}

.admin-shell .admin-layout {
  grid-template-columns: 252px minmax(0, 1fr);
}

.admin-shell .admin-sidebar {
  gap: 14px;
  padding: 18px 14px;
}

.admin-shell .admin-sidebar::before,
.admin-shell .admin-sidebar-panel-primary::after {
  display: none;
}

.admin-shell .admin-sidebar-panel,
.admin-shell .admin-side-footer {
  padding: 16px;
  border-radius: 20px;
}

.admin-shell .admin-sidebar-description {
  margin-top: 10px;
  font-size: 0.92rem;
}

.admin-shell .admin-nav {
  gap: 8px;
}

.admin-shell .admin-nav-link {
  min-height: 46px;
  border-radius: 14px;
}

.admin-shell .admin-nav-link:hover {
  transform: translateX(4px);
}

.admin-shell .admin-user-card strong {
  font-size: 1.3rem;
}

.admin-shell .admin-stage {
  padding: 18px 20px 28px;
}

.admin-shell .admin-topbar {
  position: static;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.admin-shell .admin-topbar-meta {
  gap: 2px;
}

.admin-shell .admin-topbar-meta strong {
  font-size: 1.06rem;
}

.admin-shell .admin-topbar-actions {
  gap: 10px;
}

.admin-shell .admin-heading {
  align-items: flex-end;
  gap: 18px;
  padding: 24px 26px;
}

.admin-shell .admin-heading h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.admin-shell .admin-heading p {
  margin-top: 10px;
}

.admin-shell .admin-chip-row {
  margin-top: 16px;
}

.admin-shell .admin-chip {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.admin-shell .admin-panel {
  padding: 20px 22px;
  margin-bottom: 16px;
}

.admin-shell .panel-header {
  margin-bottom: 16px;
}

.admin-shell .panel-header h2 {
  font-size: 1.28rem;
}

.admin-shell .admin-toolbar {
  gap: 10px;
}

.admin-shell .admin-toolbar-search {
  min-height: 44px;
  min-width: min(100%, 280px);
}

.admin-shell .admin-toolbar-search input {
  width: min(100%, 220px);
}

.admin-shell .admin-toolbar-result {
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.admin-shell .admin-list {
  gap: 12px;
}

.admin-shell .admin-item {
  grid-template-columns: 170px minmax(0, 1fr) auto;
  border-radius: 20px;
}

.admin-shell .admin-item-cover {
  aspect-ratio: 16 / 10;
}

.admin-shell .admin-item-body {
  gap: 8px;
  padding: 16px 18px;
}

.admin-shell .admin-item-body h3 {
  font-size: 1.08rem;
}

.admin-shell .admin-item-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.92rem;
}

.admin-shell .admin-item-tag {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.admin-shell .admin-item-actions {
  gap: 8px;
  padding: 16px;
  background: rgba(246, 249, 252, 0.88);
}

.admin-shell .admin-item-actions .button {
  min-height: 42px;
  padding: 0 16px;
}

.admin-shell .admin-password-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-shell .password-grid {
  gap: 12px;
}

.admin-shell .editor-form {
  padding: 20px 22px;
}

.admin-shell .editor-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.admin-shell .editor-main-column,
.admin-shell .editor-side-column {
  gap: 16px;
}

.admin-shell .editor-card {
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
}

.admin-shell .editor-media-card {
  padding: 16px;
}

.admin-shell .editor-media-card-head {
  gap: 10px;
}

.admin-shell .cover-preview {
  min-height: 200px;
  border-radius: 20px;
}

@media (max-width: 1040px) {
  .admin-shell .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-shell .admin-sidebar {
    width: min(84vw, 296px);
  }

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

@media (max-width: 720px) {
  .detail-meta {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .detail-meta-item {
    display: block;
  }

  .admin-login-page .admin-guest-header,
  .admin-login-page .login-card {
    width: min(calc(100% - 20px), 430px);
  }

  .admin-login-page .login-card {
    padding: 22px;
  }

  .admin-login-page .login-branding {
    align-items: flex-start;
  }

  .admin-login-page .login-branding-copy h1 {
    font-size: 1.7rem;
  }

  .admin-shell .admin-stage {
    padding: 16px 16px 24px;
  }

  .admin-shell .admin-heading,
  .admin-shell .admin-panel,
  .admin-shell .editor-form {
    padding: 18px;
    border-radius: 22px;
  }

  .admin-shell .admin-heading {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .admin-shell .admin-item-actions {
    flex-direction: column;
    padding: 16px;
  }

  .admin-shell .admin-item-actions form,
  .admin-shell .admin-item-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
