/* ==========================================================================
   Aurora Daylight Editorial — Warm Clean White Design System
   ========================================================================== */

@layer reset, tokens, base, layout, components, pages;

@layer tokens {
  :root {
    --canvas: #f7f7f5;
    --paper: #ffffff;
    --paper-soft: #f1f0ec;
    --paper-hover: #fafaf8;
    --ink: #18181b;
    --ink-muted: #52525b;
    --ink-subtle: #71717a;

    --line: #e4e4e0;
    --line-strong: #d4d4ce;

    --brand: #e11d48;
    --brand-deep: #be123c;
    --brand-tint: #fff1f2;
    --brand-ring: rgba(225, 29, 72, 0.24);

    --amber: #d97706;
    --amber-tint: #fef3c7;
    --teal: #0d9488;
    --teal-tint: #ccfbf1;

    --stage-bg: #111114;
    --header-glass: rgba(255, 255, 255, 0.92);

    --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.04);
    --shadow-sm: 0 2px 10px rgba(24, 24, 27, 0.05);
    --shadow-md: 0 12px 30px rgba(24, 24, 27, 0.08);
    --shadow-lg: 0 20px 44px rgba(24, 24, 27, 0.12);

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --container-max: 1380px;
    --gutter: 10px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-display: "Kanit", "Sarabun", system-ui, -apple-system, sans-serif;
    --font-body: "Sarabun", "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;
  }

  @media (min-width: 640px) {
    :root { --gutter: 22px; }
  }
  @media (min-width: 1260px) {
    :root { --gutter: 32px; }
  }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html {
    color-scheme: light;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }
  html.is-scroll-locked { overflow: hidden; }
  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    color: var(--ink);
    font: 400 15.5px/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }
  img { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  input, textarea { font: inherit; color: inherit; }
  h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  p { margin: 0; }
  ul, ol { margin: 0; padding: 0; list-style: none; }
  svg { width: 1em; height: 1em; flex-shrink: 0; display: inline-block; }
  ::selection { background: var(--brand); color: #ffffff; }
  :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
}

@layer base {
  .ed-sprites {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .ed-skip {
    position: fixed;
    top: -64px;
    left: 16px;
    z-index: 400;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    transition: top 0.2s var(--ease);
  }
  .ed-skip:focus { top: 16px; }

  .ed-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
}

@layer layout {
  /* Sticky Top Header */
  .ed-bar {
    position: sticky;
    top: 0;
    z-index: 80;
    background: var(--header-glass);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  }
  .ed-bar.is-elevated {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
  }
  .ed-bar__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .ed-bar__left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
  }
  .ed-bar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .ed-bar__nav {
    display: none;
    align-items: center;
    gap: 4px;
  }
  @media (min-width: 1024px) {
    .ed-bar__nav { display: flex; }
  }
  .ed-bar__link {
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    transition: background 0.2s, color 0.2s;
  }
  .ed-bar__link:hover {
    background: var(--paper-soft);
    color: var(--ink);
  }
  .ed-bar__link--cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-tint);
    color: var(--brand-deep);
    font-weight: 600;
  }
  .ed-bar__link--cta:hover {
    background: var(--brand);
    color: #fff;
  }

  /* Brand */
  .ed-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .ed-brand__img {
    height: 30px;
    width: auto;
    max-width: 156px;
    object-fit: contain;
  }
  .ed-brand--muted .ed-brand__img { opacity: 0.9; }
  .ed-brand__fallback {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .ed-brand__fallback[hidden] { display: none; }
  .ed-brand__badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 12px var(--brand-ring);
  }
  .ed-brand__name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
  }

  /* Search Form */
  .ed-search {
    position: relative;
    flex: 1;
    max-width: 440px;
    display: none;
    align-items: center;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 4px 6px 4px 14px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  }
  .ed-search:focus-within {
    background: var(--paper);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
  }
  @media (min-width: 768px) {
    .ed-search { display: flex; }
  }
  .ed-search.is-open {
    display: flex;
    position: fixed;
    top: 66px;
    left: var(--gutter);
    right: var(--gutter);
    max-width: none;
    z-index: 95;
    background: var(--paper);
    box-shadow: var(--shadow-lg);
  }
  .ed-search__ico {
    color: var(--ink-subtle);
    font-size: 16px;
    margin-right: 8px;
  }
  .ed-search__input {
    width: 100%;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 5px 4px;
    color: var(--ink);
  }
  .ed-search__input::placeholder { color: var(--ink-subtle); }
  .ed-search__kbd {
    display: none;
    padding: 2px 7px;
    margin-right: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: var(--paper);
    font: 500 11px/1.2 var(--font-body);
    color: var(--ink-subtle);
  }
  @media (min-width: 1024px) {
    .ed-search__kbd { display: inline-block; }
  }
  .ed-search__btn {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: #fff;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
  }
  .ed-search__btn:hover { background: var(--brand); }

  /* Icon Buttons */
  .ed-iconbtn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 18px;
    transition: background 0.2s, border-color 0.2s;
  }
  .ed-iconbtn:hover {
    background: var(--paper);
    border-color: var(--line-strong);
  }
  @media (min-width: 768px) {
    .ed-search-toggle { display: none; }
  }
  @media (min-width: 1024px) {
    .ed-menu-toggle { display: none; }
  }

  /* Modern Editorial Subnav — Diagonal Slash Rhythm & Sharp Slanted Parallelogram States */
  .ed-strip {
    border-top: 1px solid rgba(24, 24, 27, 0.06);
    background: var(--paper);
  }
  .ed-strip__track {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .ed-strip__track::-webkit-scrollbar { display: none; }
  .ed-strip__cell {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-muted);
    white-space: nowrap;
    transition: color 0.18s var(--ease), transform 0.15s var(--ease);
  }
  .ed-strip__cell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: skewX(-18deg);
    background: transparent;
    transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
    pointer-events: none;
  }
  .ed-strip__cell:first-child { margin-left: 5px; }
  .ed-strip__cell:not(:last-child):not(.ed-strip__cell--live):not(.is-active):not(:hover)::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 50%;
    width: 1px;
    height: 11px;
    background: var(--ink);
    opacity: 0.16;
    transform: translateY(-50%) rotate(18deg);
    pointer-events: none;
  }
  .ed-strip__cell:has(+ .is-active)::after,
  .ed-strip__cell:has(+ .ed-strip__cell:hover)::after {
    opacity: 0;
  }
  .ed-strip__cell:hover { color: var(--ink); }
  .ed-strip__cell:hover::before { background: var(--paper-soft); }
  .ed-strip__cell--live {
    margin-right: 6px;
    color: var(--brand-deep);
    font-weight: 600;
  }
  .ed-strip__cell--live::before {
    background: linear-gradient(180deg, #fff5f6 0%, #ffe6ea 100%);
    border: 1px solid rgba(225, 29, 72, 0.22);
    border-left: 3px solid var(--brand);
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.1);
  }
  .ed-strip__cell--live:hover {
    color: var(--brand-deep);
    transform: translateY(-1px);
  }
  .ed-strip__cell--live:hover::before {
    background: linear-gradient(180deg, #ffeef1 0%, #ffdbe2 100%);
  }
  .ed-strip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
    flex-shrink: 0;
    animation: edPulse 2s ease-in-out infinite;
  }
  @keyframes edPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.22); }
    50% { box-shadow: 0 0 0 5px rgba(225, 29, 72, 0.08); }
  }
  .ed-strip__cell.is-active {
    color: #ffffff;
  }
  .ed-strip__cell.is-active::before {
    background: linear-gradient(180deg, #27272a 0%, #18181b 100%);
    border-left: 3px solid var(--brand);
    box-shadow: 0 3px 10px rgba(24, 24, 27, 0.16);
  }

  /* Right Slide-in Mobile Drawer */
  .ed-backdrop {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(24, 24, 27, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.25s var(--ease);
  }
  .ed-backdrop.is-on { opacity: 1; }
  .ed-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    z-index: 200;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s var(--ease);
  }
  .ed-drawer.is-open { transform: translateX(0); }
  .ed-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .ed-drawer__title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
  }
  .ed-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .ed-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-muted);
  }
  .ed-drawer__link:hover {
    background: var(--paper-soft);
    color: var(--ink);
  }
  .ed-drawer__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-subtle);
    margin-bottom: 8px;
  }
  .ed-drawer__cats {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .ed-drawer__cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    color: var(--ink-muted);
  }
  .ed-drawer__cat:hover, .ed-drawer__cat.is-active {
    background: var(--brand-tint);
    color: var(--brand-deep);
    font-weight: 600;
  }
  .ed-drawer__cat em {
    font-style: normal;
    font-size: 12px;
    color: var(--ink-subtle);
  }
  .ed-drawer__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-subtle);
  }

  /* Main Canvas */
  .ed-canvas {
    flex: 1;
    padding-top: 14px;
    padding-bottom: 36px;
  }
  @media (min-width: 640px) {
    .ed-canvas { padding-top: 22px; padding-bottom: 48px; }
  }
  @media (min-width: 960px) {
    .ed-canvas { padding-top: 28px; padding-bottom: 56px; }
  }

  /* Footer */
  .ed-foot {
    background: var(--paper-soft);
    border-top: 1px solid var(--line);
    padding: 40px 0 28px;
    color: var(--ink-muted);
  }
  .ed-foot__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
  }
  @media (min-width: 768px) {
    .ed-foot__grid { grid-template-columns: 1.5fr 0.7fr 1.4fr; }
  }
  .ed-foot__desc {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.65;
    max-width: 44ch;
  }
  .ed-foot__age {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-subtle);
  }
  .ed-age {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid var(--brand);
    color: var(--brand-deep);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
  }
  .ed-foot__heading {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
  }
  .ed-foot__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
  }
  .ed-foot__links a:hover { color: var(--brand); }
  .ed-foot__catlist {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }
  .ed-foot__catlist a {
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 13px;
    transition: border-color 0.2s, color 0.2s;
  }
  .ed-foot__catlist a:hover {
    border-color: var(--brand);
    color: var(--brand);
  }
  .ed-foot__editorial {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.75;
    color: var(--ink-subtle);
  }
  .ed-foot__bottom {
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-subtle);
  }
}

@layer components {
  /* Buttons */
  .ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    font-family: var(--font-display);
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: 0 4px 14px var(--brand-ring);
    transition: background 0.2s, transform 0.15s;
  }
  .ed-btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
  .ed-btn:disabled { opacity: 0.55; pointer-events: none; }
  .ed-btn--outline {
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-xs);
  }
  .ed-btn--outline:hover {
    background: var(--paper-soft);
    border-color: var(--ink);
  }

  /* Section Header */
  .ed-sec { margin-top: 24px; }
  @media (min-width: 640px) {
    .ed-sec { margin-top: 36px; }
  }
  .ed-sec__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  @media (min-width: 640px) {
    .ed-sec__head {
      gap: 12px;
      margin-bottom: 16px;
      padding-bottom: 10px;
    }
  }
  .ed-sec__title {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  @media (min-width: 640px) {
    .ed-sec__title { font-size: 20px; gap: 10px; }
  }
  .ed-sec__title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--brand);
  }
  .ed-sec__more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--brand-deep);
  }
  .ed-sec__more:hover { text-decoration: underline; }

  /* Video Grid */
  .ed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  @media (min-width: 640px) {
    .ed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  }
  @media (min-width: 1080px) {
    .ed-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  }
  .ed-grid--dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media (min-width: 640px) {
    .ed-grid--dense { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  /* Video Card (Article + Figure + Separate Title/Category) */
  .ed-item {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
  }
  @media (min-width: 640px) {
    .ed-item { border-radius: var(--radius-md); }
  }
  .ed-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
  }
  .ed-item__frame {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    background: var(--paper-soft);
    overflow: hidden;
  }
  .ed-item__frame.is-empty::after {
    content: "18+";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--ink-subtle);
  }
  .ed-item__media {
    display: block;
    width: 100%;
    height: 100%;
  }
  .ed-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s var(--ease);
  }
  .ed-item:hover .ed-item__media img { transform: scale(1.04); }
  .ed-item__veil {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(24, 24, 27, 0.22);
    opacity: 0;
    transition: opacity 0.22s;
    pointer-events: none;
  }
  .ed-item__veil > svg {
    width: 44px;
    height: 44px;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand);
    box-shadow: var(--shadow-md);
  }
  .ed-item:hover .ed-item__veil { opacity: 1; }
  .ed-item__len {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(24, 24, 27, 0.82);
    color: #fff;
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    pointer-events: none;
  }
  @media (min-width: 640px) {
    .ed-item__len {
      top: 8px;
      left: 8px;
      padding: 2px 8px;
      border-radius: 6px;
      font-size: 11.5px;
    }
  }
  .ed-item__content {
    padding: 8px 9px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }
  @media (min-width: 640px) {
    .ed-item__content { padding: 12px 13px 13px; gap: 6px; }
  }
  .ed-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 11px;
  }
  @media (min-width: 640px) {
    .ed-item__top { gap: 8px; font-size: 12px; }
  }
  .ed-item__cat {
    color: var(--brand-deep);
    background: var(--brand-tint);
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 10.5px;
    max-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  @media (min-width: 640px) {
    .ed-item__cat { padding: 1px 8px; font-size: 11.5px; max-width: 140px; }
  }
  .ed-item__cat:hover { background: var(--brand); color: #fff; }
  .ed-item__date { color: var(--ink-subtle); white-space: nowrap; }
  .ed-item__title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.36;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  @media (min-width: 640px) {
    .ed-item__title { font-size: 14.5px; line-height: 1.42; }
  }
  .ed-item__title a:hover { color: var(--brand); }
  .ed-item__stats {
    margin-top: auto;
    padding-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--ink-subtle);
  }
  @media (min-width: 640px) {
    .ed-item__stats { padding-top: 4px; gap: 10px; font-size: 12.5px; }
  }
  .ed-item__stats span { display: inline-flex; align-items: center; gap: 4px; }

  /* Breadcrumb */
  .ed-crumb {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--ink-subtle);
  }
  @media (min-width: 640px) {
    .ed-crumb { margin-bottom: 16px; font-size: 13.5px; }
  }
  .ed-crumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .ed-crumb li { display: inline-flex; align-items: center; gap: 6px; }
  .ed-crumb a:hover { color: var(--brand); }
  .ed-crumb__cur { color: var(--ink); font-weight: 500; }

  /* Page Masthead Header (Open Typographic Editorial Header, Non-Card) */
  .ed-banner {
    position: relative;
    padding: 4px 0 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-strong);
  }
  .ed-banner::after {
    content: "";
    position: absolute;
    left: 2px;
    bottom: -2px;
    width: 56px;
    height: 3px;
    background: var(--brand);
    transform: skewX(-18deg);
  }
  @media (min-width: 640px) {
    .ed-banner {
      padding: 6px 0 18px;
      margin-bottom: 24px;
    }
  }
  .ed-banner__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
  }
  .ed-banner__lead {
    min-width: 0;
  }
  .ed-banner__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-deep);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .ed-banner__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 20px;
    background: var(--brand);
    color: #ffffff;
    font-size: 12px;
    transform: skewX(-18deg);
  }
  .ed-banner__ico svg { transform: skewX(18deg); }
  .ed-banner__title {
    font-size: clamp(22px, 2.8vw, 31px);
    line-height: 1.22;
    letter-spacing: -0.02em;
    margin-top: 6px;
  }
  .ed-banner__note {
    margin-top: 6px;
    color: var(--ink-muted);
    font-size: 14.5px;
    max-width: 68ch;
  }
  .ed-banner__stats {
    display: flex;
    align-items: baseline;
    gap: 16px;
  }
  .ed-stat {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-subtle);
  }
  .ed-stat:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -9px;
    top: 50%;
    width: 1px;
    height: 12px;
    background: var(--ink);
    opacity: 0.18;
    transform: translateY(-50%) rotate(18deg);
  }
  .ed-stat strong {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
  }

  /* Pagination */
  .ed-pager {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ed-pager__nums { display: flex; align-items: center; gap: 6px; }
  .ed-pager__btn, .ed-pager__num {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--paper);
    border: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    justify-content: center;
    transition: all 0.18s;
  }
  .ed-pager__btn:hover, .ed-pager__num:hover {
    border-color: var(--ink);
    color: var(--ink);
  }
  .ed-pager__num.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
  }
  .ed-pager__btn.is-disabled { opacity: 0.42; pointer-events: none; }
  .ed-pager__gap { color: var(--ink-subtle); padding: 0 4px; }

  /* Category Directory Cards */
  .ed-catgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  @media (min-width: 768px) {
    .ed-catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  }
  .ed-catbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    background: var(--paper);
    border: 1px solid var(--line);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  }
  @media (min-width: 640px) {
    .ed-catbox { gap: 10px; padding: 14px 16px; border-radius: var(--radius-md); }
  }
  .ed-catbox:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
  }
  .ed-catbox__name {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
  }
  .ed-catbox__count {
    display: block;
    font-size: 12.5px;
    color: var(--ink-subtle);
    margin-top: 2px;
  }
  .ed-catbox__arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--paper-soft);
    color: var(--ink-muted);
    flex-shrink: 0;
  }
  .ed-catbox:hover .ed-catbox__arrow {
    background: var(--brand);
    color: #fff;
  }

  /* Tag Cloud */
  .ed-tags { display: flex; flex-wrap: wrap; gap: 6px; }
  @media (min-width: 640px) {
    .ed-tags { gap: 8px; }
  }
  .ed-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-muted);
    transition: all 0.18s;
  }
  @media (min-width: 640px) {
    .ed-tag { padding: 6px 13px; font-size: 13.5px; }
  }
  .ed-tag::before {
    content: "#";
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--brand);
    opacity: 0.72;
  }
  .ed-tag:hover {
    border-color: var(--brand);
    background: var(--brand-tint);
    color: var(--brand-deep);
  }

  /* Empty State */
  .ed-empty {
    text-align: center;
    padding: 48px 20px;
    background: var(--paper);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
  }
  .ed-empty__art { width: 108px; height: 80px; margin: 0 auto 14px; color: var(--ink-subtle); }
  .ed-empty__title { font-size: 20px; margin-bottom: 6px; }
  .ed-empty__text { color: var(--ink-muted); font-size: 14.5px; margin-bottom: 18px; }

  /* Toast */
  .ed-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 300;
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.2s, transform 0.2s var(--ease);
  }
  .ed-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
}

@layer pages {
  /* Homepage Editorial Showcase */
  .ed-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  @media (min-width: 640px) {
    .ed-showcase { gap: 20px; }
  }
  @media (min-width: 960px) {
    .ed-showcase { grid-template-columns: 1.55fr 1fr; align-items: stretch; }
  }
  .ed-lead {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
  }
  @media (min-width: 640px) {
    .ed-lead { border-radius: var(--radius-lg); }
  }
  .ed-lead__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--paper-soft);
    overflow: hidden;
  }
  .ed-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
  .ed-lead:hover .ed-lead__media img { transform: scale(1.03); }
  .ed-lead__play {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-size: 20px;
    box-shadow: var(--shadow-md);
  }
  .ed-lead__body {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
  }
  @media (min-width: 640px) {
    .ed-lead__body { padding: 18px 20px 20px; gap: 10px; }
  }
  .ed-lead__badges { display: flex; flex-wrap: wrap; gap: 8px; }
  .ed-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
  }
  .ed-badge--brand { background: var(--brand-tint); color: var(--brand-deep); }
  .ed-badge--teal { background: var(--teal-tint); color: #115e59; }
  .ed-lead__h1 { font-size: clamp(20px, 2.2vw, 26px); color: var(--ink); }
  .ed-lead__desc { font-size: 14px; color: var(--ink-muted); line-height: 1.6; }
  .ed-lead__feature {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .ed-lead__vtitle {
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 600;
    color: var(--ink);
    display: block;
    margin-bottom: 4px;
  }
  .ed-lead__vtitle:hover { color: var(--brand); }
  .ed-lead__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--ink-subtle);
  }
  .ed-lead__meta span { display: inline-flex; align-items: center; gap: 4px; }

  /* Right Editorial Picks Column */
  .ed-picks {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 13px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  @media (min-width: 640px) {
    .ed-picks { border-radius: var(--radius-lg); padding: 18px; gap: 12px; }
  }
  .ed-picks__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }
  .ed-picks__title { font-size: 17px; }
  .ed-picks__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .ed-pick {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 12px;
    align-items: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.18s;
  }
  .ed-pick:hover { background: var(--paper-soft); }
  .ed-pick__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--paper-soft);
  }
  .ed-pick__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .ed-pick__dur {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(24, 24, 27, 0.84);
    color: #fff;
    font-size: 10.5px;
  }
  .ed-pick__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ed-pick:hover .ed-pick__name { color: var(--brand); }
  .ed-pick__meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-subtle);
    display: flex;
    gap: 8px;
  }

  .ed-intro {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
  }
  .ed-intro h1 { font-size: 26px; margin-bottom: 8px; }
  .ed-intro p { color: var(--ink-muted); }

  /* Watch / Play Page */
  .ed-theater {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  @media (min-width: 640px) {
    .ed-theater { gap: 20px; }
  }
  @media (min-width: 1080px) {
    .ed-theater {
      grid-template-columns: minmax(0, 1fr) 336px;
      gap: 20px 24px;
      align-items: start;
    }
    .ed-theater__stage { grid-column: 1; grid-row: 1; }
    .ed-theater__main { grid-column: 1; grid-row: 2; }
    .ed-theater__side { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
    .ed-theater.is-wide .ed-theater__stage { grid-column: 1 / -1; grid-row: 1; }
    .ed-theater.is-wide .ed-theater__main { grid-column: 1; grid-row: 2; }
    .ed-theater.is-wide .ed-theater__side { grid-column: 2; grid-row: 2; }
  }

  .ed-stage-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow: var(--shadow-sm);
    width: min(100%, calc(76vh * 16 / 9 + 10px));
    margin: 0 auto;
  }
  @media (min-width: 640px) {
    .ed-stage-card {
      border-radius: var(--radius-lg);
      padding: 8px;
      box-shadow: var(--shadow-md);
      width: min(100%, calc(76vh * 16 / 9 + 18px));
    }
  }
  .ed-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--stage-bg);
  }
  .ed-player__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .ed-player__trigger {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(17, 17, 20, 0.36);
    color: #fff;
    transition: background 0.2s;
  }
  .ed-player__trigger:hover { background: rgba(17, 17, 20, 0.5); }
  .ed-player__orb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-size: 26px;
    box-shadow: 0 10px 28px rgba(225, 29, 72, 0.48);
    transition: transform 0.2s var(--ease);
  }
  .ed-player__trigger:hover .ed-player__orb { transform: scale(1.07); }
  .ed-player__hint {
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: rgba(17, 17, 20, 0.72);
    font-family: var(--font-display);
    font-size: 13.5px;
  }
  .ed-player__dur {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(17, 17, 20, 0.8);
    color: #fff;
    font-size: 12.5px;
  }
  .ed-player__spin {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 4;
    margin: auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    animation: edSpin 0.8s linear infinite;
  }
  .ed-player.is-loading .ed-player__trigger { display: none; }
  .ed-player.is-loading .ed-player__spin { display: block; }
  .ed-player.is-ready .ed-player__poster,
  .ed-player.is-ready .ed-player__trigger,
  .ed-player.is-ready .ed-player__dur,
  .ed-player.is-ready .ed-player__spin { display: none; }
  .ed-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
  .ed-player__fail {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #e4e4e7;
    font-size: 15px;
  }
  @keyframes edSpin { to { transform: rotate(360deg); } }

  /* Video Details Panel */
  .ed-detail {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-xs);
  }
  @media (min-width: 640px) {
    .ed-detail { border-radius: var(--radius-lg); padding: 20px 22px; }
  }
  .ed-detail__title { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; }
  .ed-detail__bar {
    margin-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .ed-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: var(--ink-muted);
  }
  .ed-facts span { display: inline-flex; align-items: center; gap: 5px; }
  .ed-facts__cat {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--brand-tint);
    color: var(--brand-deep);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
  }
  .ed-acts { display: flex; flex-wrap: wrap; gap: 8px; }
  .ed-act {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--paper-soft);
    border: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    transition: all 0.18s;
  }
  .ed-act:hover { border-color: var(--ink); background: var(--paper); }
  .ed-act[aria-pressed="true"], .ed-act.is-active {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-deep);
    --heart-fill: currentColor;
  }
  .ed-detail__desc { margin-top: 14px; font-size: 14.5px; color: var(--ink-muted); line-height: 1.7; }
  .ed-detail__tags { margin-top: 14px; }

  /* Charts / Ranking Sidebar — Dossier Folder Index Tabs */
  .ed-charts {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
  }
  @media (min-width: 640px) {
    .ed-charts { border-radius: var(--radius-lg); }
  }
  @media (min-width: 1080px) {
    .ed-charts { position: sticky; top: 122px; }
  }
  .ed-charts__top {
    background: var(--paper-soft);
    border-bottom: 1px solid var(--line);
    padding: 13px 12px 0;
  }
  @media (min-width: 640px) {
    .ed-charts__top { padding: 16px 16px 0; }
  }
  .ed-charts__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }
  .ed-charts__kicker {
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--brand);
    order: 2;
  }
  .ed-charts__title { font-size: 17px; order: 1; }
  .ed-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .ed-tab {
    position: relative;
    padding: 9px 6px 8px;
    border-radius: 10px 10px 0 0;
    border: 1px solid transparent;
    border-bottom: 0;
    margin-bottom: -1px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-subtle);
    text-align: center;
    transition: color 0.18s, background 0.18s;
  }
  .ed-tab:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.55);
  }
  .ed-tab.is-active {
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    border-color: var(--line);
    border-bottom: 1px solid var(--paper);
    box-shadow: inset 0 3px 0 var(--brand);
  }
  .ed-tab.is-active span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .ed-tab.is-active span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand);
  }
  .ed-charts__body {
    padding: 12px 10px 14px;
  }
  @media (min-width: 640px) {
    .ed-charts__body { padding: 14px 14px 16px; }
  }
  .ed-ranklist { display: flex; flex-direction: column; gap: 10px; }
  .ed-ranklist[hidden] { display: none; }
  .ed-rankrow {
    display: grid;
    grid-template-columns: 24px 102px 1fr;
    gap: 10px;
    align-items: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.18s;
  }
  .ed-rankrow:hover { background: var(--paper-soft); }
  .ed-rankrow__no {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    background: var(--paper-soft);
    color: var(--ink-muted);
  }
  .ed-ranklist li:nth-child(1) .ed-rankrow__no { background: var(--brand); color: #fff; }
  .ed-ranklist li:nth-child(2) .ed-rankrow__no { background: var(--amber); color: #fff; }
  .ed-ranklist li:nth-child(3) .ed-rankrow__no { background: var(--ink); color: #fff; }
  .ed-rankrow__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: var(--paper-soft);
  }
  .ed-rankrow__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .ed-rankrow__dur {
    position: absolute;
    bottom: 3px;
    right: 3px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(24, 24, 27, 0.82);
    color: #fff;
    font-size: 10px;
  }
  .ed-rankrow__name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ed-rankrow:hover .ed-rankrow__name { color: var(--brand); }
  .ed-rankrow__meta {
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--ink-subtle);
    display: flex;
    gap: 8px;
  }
  .ed-rankrow__meta span { display: inline-flex; align-items: center; gap: 3px; }
  .ed-rank-empty { padding: 20px 0; text-align: center; font-size: 13.5px; color: var(--ink-subtle); }

  .ed-center-foot { margin-top: 22px; text-align: center; }

  /* Comments Section — Open Editorial Discussion Thread (Non-Card) */
  .ed-discuss {
    margin-top: 28px;
    padding: 0;
  }
  @media (min-width: 640px) {
    .ed-discuss { margin-top: 38px; }
  }
  .ed-discuss__count {
    font-size: 13px;
    font-weight: 600;
    padding: 1px 8px;
    background: var(--ink);
    color: #fff;
    font-variant-numeric: tabular-nums;
    transform: skewX(-18deg);
  }
  .ed-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line-strong);
    margin-bottom: 4px;
  }
  .ed-post .ed-form {
    margin: 6px 0 12px 46px;
    padding: 6px 0 6px 14px;
    border-bottom: 0;
    border-left: 2px solid var(--brand);
  }
  .ed-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .ed-form__replybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--brand-deep);
  }
  .ed-form__replybar[hidden] { display: none; }
  .ed-form__cancel { font-weight: 600; text-decoration: underline; }
  .ed-form__input, .ed-form__textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .ed-form__input:focus, .ed-form__textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
  }
  .ed-form__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .ed-form__tip { font-size: 12.5px; color: var(--ink-subtle); }
  .ed-form__left.is-low { color: var(--brand); font-weight: 600; }

  .ed-thread { display: flex; flex-direction: column; gap: 0; }
  .ed-thread > .ed-post { border-bottom: 1px solid var(--line); }
  .ed-thread > .ed-post:last-child { border-bottom: 0; }
  .ed-post__box {
    display: flex;
    gap: 12px;
    padding: 14px 0;
  }
  .ed-post.is-staff > .ed-post__box {
    padding-left: 12px;
    border-left: 3px solid var(--brand);
    background: linear-gradient(90deg, rgba(225, 29, 72, 0.055) 0%, transparent 75%);
  }
  .ed-post.is-pending > .ed-post__box { opacity: 0.72; }
  .ed-post__ava {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13.5px;
    color: #fff;
    background: hsl(var(--h, 210), 65%, 45%);
  }
  .ed-post__body { flex: 1; min-width: 0; }
  .ed-post__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
  }
  .ed-post__name { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
  .ed-post__badge {
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
  }
  .ed-post__wait {
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--amber-tint);
    color: #92400e;
    font-size: 11px;
  }
  .ed-post__meta time { color: var(--ink-subtle); font-size: 12px; }
  .ed-post__text { margin-top: 4px; font-size: 14.5px; color: var(--ink); line-height: 1.6; word-break: break-word; }
  .ed-post__at { color: var(--brand-deep); font-weight: 600; }
  .ed-post__reply {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-subtle);
  }
  .ed-post__reply:hover { color: var(--brand); }
  .ed-post__children {
    margin: 0 0 10px 17px;
    padding-left: 16px;
    border-left: 1.5px solid var(--line-strong);
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .ed-post__children .ed-post__box { padding: 9px 0; }
  .ed-post__children .ed-post__ava { width: 28px; height: 28px; font-size: 12px; }
  .ed-discuss__note { text-align: center; color: var(--ink-subtle); font-size: 14px; padding: 18px 0; }

  /* About / Contact / Search / 404 */
  .ed-prose {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  @media (min-width: 768px) {
    .ed-prose { grid-template-columns: repeat(2, 1fr); }
  }
  .ed-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-xs);
  }
  .ed-panel h2 { font-size: 18px; margin-bottom: 10px; }
  .ed-panel p { color: var(--ink-muted); font-size: 14.5px; line-height: 1.75; }
  .ed-features { display: flex; flex-direction: column; gap: 10px; }
  .ed-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--ink-muted);
  }
  .ed-features svg { color: var(--brand); font-size: 18px; }

  .ed-contact-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  @media (min-width: 900px) {
    .ed-contact-wrap { grid-template-columns: 1.35fr 1fr; }
  }
  .ed-contact-form {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .ed-field label {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
  }
  .ed-field input, .ed-field textarea {
    width: 100%;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--paper-soft);
    outline: none;
  }
  .ed-field textarea { min-height: 120px; resize: vertical; }
  .ed-field input:focus, .ed-field textarea:focus {
    background: var(--paper);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
  }
  .ed-infostack { display: flex; flex-direction: column; gap: 14px; }
  .ed-infocard {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
  }
  .ed-infocard__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
  }
  .ed-infocard__head svg { color: var(--brand); font-size: 18px; }
  .ed-infocard__head h3 { font-size: 16px; }
  .ed-infocard p { font-size: 14px; color: var(--ink-muted); }

  .ed-searchbox-inline {
    margin-top: 16px;
    display: flex;
    max-width: 520px;
  }

  .ed-notfound {
    max-width: 560px;
    margin: 24px auto;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    box-shadow: var(--shadow-sm);
  }
  .ed-notfound__code {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: var(--brand);
    margin-bottom: 10px;
  }
  .ed-notfound__title { font-size: 24px; margin-bottom: 8px; }
  .ed-notfound__text { color: var(--ink-muted); margin-bottom: 22px; }
  .ed-notfound__acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
  .ed-notfound__search { display: flex; margin: 0 auto; max-width: 420px; }
}
