@layer base, interface, pages, responsive;

@layer base {
  :root {
    color-scheme: light;
    --ink: #232525;
    --secondary: #54575a;
    --line: #e9e8e6;
    --paper: #fff;
    --soft: #f7f7f6;
    --cream: #f7f3eb;
    --accent: #a32a31;
    --accent-dark: #842127;
    --accent-light: #fbf0ef;
    --ui: "Be Vietnam Pro", "Segoe UI", sans-serif;
    --display: "Lora Variable", Georgia, serif;
    font: 400 16px/1.55 var(--ui);
    color: var(--ink);
    background: var(--paper);
  }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
  main { flex: 1; }
  h1, h2, h3, p { margin: 0; }
  a { color: inherit; text-decoration: none; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  button:disabled { cursor: wait; opacity: .72; }
  img, video { display: block; max-width: 100%; }
  svg { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
  [data-icon] { display: inline-grid; place-items: center; flex: none; }
  [hidden] { display: none !important; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  main:focus-visible { outline-offset: -4px; }
  :target { scroll-margin-top: 90px; }
  .wrap { width: min(1200px, 100% - 96px); margin-inline: auto; }
  .visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .skip-link:focus { position: absolute; z-index: 9; left: 16px; background: var(--paper); border: 1px solid var(--accent); border-radius: 6px; padding: 10px 15px; }
}

@layer interface {
  .topbar { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
  .bar-inner { min-height: 74px; display: grid; grid-template-columns: minmax(195px, 1fr) minmax(250px, 415px) minmax(135px, 1fr); align-items: center; gap: 24px; }
  .brand { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; font-weight: 700; font-size: .96rem; letter-spacing: -.035em; white-space: nowrap; }
  .search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); overflow: hidden; }
  .search:focus-within { border-color: #dcaeb0; }
  .search input { min-width: 0; width: 100%; border: none; background: none; padding: 0 0 0 14px; height: 44px; font-size: .9rem; }
  .search input::placeholder { color: #676a6b; }
  .search button { width: 46px; height: 44px; border: 0; background: transparent; color: var(--secondary); }
  .search input:focus-visible, .search button:focus-visible { outline-offset: -3px; }
  .search button:hover { color: var(--accent); background: var(--accent-light); }
  .button { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 8px 15px; font-size: .87rem; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background .18s, color .18s, border-color .18s, transform .18s; }
  .button:hover { transform: translateY(-1px); }
  .button:active { transform: translateY(1px); }
  .primary { color: #fff; background: var(--accent); }
  .primary:hover { background: var(--accent-dark); }
  .subtle { color: var(--ink); background: var(--paper); border-color: var(--line); }
  .subtle:hover { color: var(--accent); border-color: #dcaeb0; background: var(--accent-light); }
  .fanpage { justify-self: end; }
  .fanpage [data-icon] { color: #0866ff; }
  .footer { border-top: 1px solid var(--line); background: var(--soft); }
  .footer-inner { min-height: 87px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .admin-link { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; color: var(--secondary); font-size: .85rem; }
  .admin-link:hover, .text-button:hover, .back-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
  .toast { position: fixed; z-index: 8; inset: auto 24px 24px auto; max-width: calc(100% - 48px); border-radius: 8px; background: #252222; color: white; padding: 12px 18px; font-size: .9rem; box-shadow: 0 8px 32px #21191b25; }
  .empty { grid-column: 1 / -1; padding: 46px 20px; border: 1px dashed #d5ceca; border-radius: 12px; background: var(--soft); text-align: center; color: var(--secondary); }
  .empty h2, .empty h3 { color: var(--ink); margin-bottom: 7px; }
  .empty .button { margin-top: 16px; }
  .missing { margin-block: 54px; }
}

@layer pages {
  .hero { --hero-title-size: clamp(2.95rem, 5.3vw, 5.15rem); position: relative; isolation: isolate; overflow: hidden; background: #faf7f0; }
  .hero-cover { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; padding-left: 30%; object-fit: cover; object-position: 65% 46%; filter: blur(2px) saturate(.88); pointer-events: none; }
  .hero::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(90deg, #faf7f0 0%, #faf7f0 26%, #faf7f0f4 38%, #faf7f0ac 52%, #faf7f039 72%, #faf7f012 100%); }
  .hero-inner { position: relative; z-index: 2; min-height: 442px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 56px 61px; }
  .m-enter .hero[data-enter] .hero-inner { animation: enter .65s ease-out both; }
  @keyframes enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
  .hero-label { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; color: #6c4240; font-size: .81rem; font-weight: 700; }
  .hero-label span { display: inline-block; width: 20px; height: 1px; background: var(--accent); }
  .hero h1 { font: 600 var(--hero-title-size)/1.09 var(--display); letter-spacing: -.072em; color: #252723; }
  .hero-slogan { color: var(--accent); font: italic 500 calc(.71 * var(--hero-title-size))/1.09 var(--display); letter-spacing: -.07em; margin-top: 5px; max-width: min(100%, 700px); overflow-wrap: anywhere; }
  .hero-lead { max-width: min(100%, 420px); overflow-wrap: anywhere; margin: 21px 0 26px; color: #484742; line-height: 1.7; }
  .hero .button { min-height: 47px; padding-inline: 16px 19px; }
  .channel-nav { border-block: 1px solid var(--line); }
  .channel-tabs { display: flex; gap: 27px; }
  .tab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 59px; padding-inline: 3px; font-size: .89rem; font-weight: 600; color: var(--secondary); }
  .tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .18s; }
  .tab:hover, .tab.active { color: var(--accent); }
  .tab.active::after, .tab:hover::after { transform: scaleX(1); }
  .library, .about { padding-block: 31px 63px; }
  .library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .library h2, .about h2 { font: 600 clamp(1.7rem, 2.45vw, 2.3rem)/1.2 var(--display); letter-spacing: -.065em; }
  .sort { display: grid; grid-template-columns: 16px 1fr 13px; align-items: center; gap: 6px; position: relative; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--secondary); font-size: .82rem; font-weight: 600; white-space: nowrap; }
  .sort select { grid-column: 2; padding: 0 17px 0 24px; margin-inline: -24px -18px; height: 44px; cursor: pointer; border: 0; background: none; appearance: none; color: var(--ink); }
  .sort [data-icon] { pointer-events: none; }
  .sort .chv { grid-column: 3; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 15px 0 21px; }
  .chip { border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--secondary); padding: 7px 13px; min-height: 38px; font-weight: 600; font-size: .81rem; transition: background .18s, color .18s; white-space: nowrap; }
  .chip:hover { color: var(--accent); background: var(--accent-light); }
  .chip[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
  .results { color: var(--secondary); font-size: .91rem; margin-bottom: 15px; }
  .video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
  .video-card { min-width: 0; display: block; transition: transform .18s; border-radius: 10px; }
  .video-card:hover { transform: translateY(-2px); }
  .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #eae6e0; }
  .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s; }
  .video-card:hover img { transform: scale(1.025); }
  .duration { position: absolute; bottom: 8px; right: 8px; border-radius: 4px; background: #201c1b; color: #fff; padding: 2px 6px; font-size: .79rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; }
  .card-copy { min-width: 0; padding-top: 10px; }
  .card-title { color: var(--ink); font-size: 1.02rem; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .video-card:hover .card-title { color: var(--accent); }
  .card-meta { color: var(--secondary); margin-top: 4px; font-size: .82rem; line-height: 1.5; }
  .card-category { color: var(--accent); font-weight: 600; }
  .load-more { display: grid; place-items: center; margin-top: 30px; }
  .about h2, .about p { overflow-wrap: anywhere; }
  .about p { max-width: 570px; margin: 15px 0 22px; color: var(--secondary); white-space: pre-wrap; }

  .sources-page { padding-block: 35px 62px; max-width: 820px; }
  .sources-page h1 { font: 600 clamp(1.75rem, 4.2vw, 2.65rem)/1.18 var(--display); letter-spacing: -.055em; }
  .sources-page .panel, .sources-page > p { margin-top: 16px; }
  .sources-page h2 { font: 600 1.25rem/1.3 var(--display); overflow-wrap: anywhere; }
  .sources-page ul { margin: 10px 0 0; padding-left: 20px; color: var(--secondary); overflow-wrap: anywhere; }
  .sources-page h1 { overflow-wrap: anywhere; }
  .sources-page .source-note { margin-top: 10px; color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
  .sources-page .sources-license-heading { margin-top: 28px; }
  .sources-page li + li { margin-top: 6px; }
  .sources-page a { text-decoration: underline; text-underline-offset: 3px; }
  .sources-page a:hover { color: var(--accent); }

  .watch { padding-block: 23px 62px; }
  .back-link { display: inline-flex; align-items: center; gap: 7px; width: fit-content; min-height: 43px; color: var(--secondary); font-size: .88rem; font-weight: 600; margin-bottom: 10px; }
  .watch-grid { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(266px, 1fr); gap: 27px; align-items: start; }
  .watch-grid.solo { grid-template-columns: minmax(0, 880px); }
  .watch-main { min-width: 0; }
  .player { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #151313; }
  .player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
  .big-play { position: relative; padding: 0; align-self: center; justify-self: center; z-index: 1; width: 72px; height: 55px; font-size: 1.35rem; color: white; border-radius: 13px; border: 0; background: var(--accent); box-shadow: 0 4px 24px #0005; transition: transform .18s, background .18s; }
  .big-play:hover { transform: scale(1.05); background: var(--accent-dark); }
  .watch-category { margin-top: 17px; color: var(--accent); font-size: .83rem; font-weight: 700; }
  .video-title { margin-top: 4px; font: 600 clamp(1.7rem, 3.3vw, 2.65rem)/1.22 var(--display); letter-spacing: -.046em; overflow-wrap: anywhere; }
  .video-credit-list { display: grid; gap: 4px; margin: 8px 0 0; color: var(--secondary); font-size: .91rem; overflow-wrap: anywhere; }
  .video-credit-list > div { display: flex; flex-wrap: wrap; column-gap: 8px; }
  .video-credit-list dd { margin: 0; color: var(--ink); font-weight: 600; }
  .video-credit-list :is(dt, dd) { min-width: 0; }
  .watch-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 16px 17px; }
  .watch-channel { min-width: 0; }
  .watch-brand { font-size: .91rem; font-weight: 700; }
  .watch-brand:hover { color: var(--accent); }
  .video-meta { font-size: .79rem; color: var(--secondary); }
  .description { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px 17px 15px; }
  .description:not([open]) { padding-bottom: 3px; }
  .description summary { min-height: 44px; cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; }
  .description summary::-webkit-details-marker { display: none; }
  .description[open] summary [data-icon] { transform: rotate(180deg); }
  .video-description { white-space: pre-wrap; overflow-wrap: anywhere; }
  .credits { padding-top: 13px; margin-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--secondary); }
  .credits p + p { margin-top: 5px; }
  .credits a { text-decoration: underline; text-underline-offset: 3px; }
  .credits a:hover { color: var(--accent); }
  .related h2 { font: 600 1.45rem/1.3 var(--display); letter-spacing: -.06em; margin-bottom: 13px; }
  .related-list { display: grid; gap: 12px; }
  .related .video-card { display: grid; grid-template-columns: minmax(93px, .95fr) minmax(0, 1fr); gap: 10px; align-items: start; }
  .related .thumb { border-radius: 7px; }
  .related .card-copy { padding: 0; }
  .related .card-title { font-size: .87rem; }
  .related .card-meta { font-size: .73rem; }
  .related .duration { font-size: .71rem; right: 5px; bottom: 5px; padding: 1px 4px; }
  .video-error { margin-top: 12px; }

  .login-wrap { display: grid; place-items: center; min-height: 68vh; padding-block: 46px; }
  .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 22px; box-shadow: 0 6px 30px #2e242106; min-width: 0; }
  .login-panel { width: min(100%, 475px); padding: 34px; }
  .panel-icon { width: 48px; height: 48px; color: var(--accent); background: var(--accent-light); border-radius: 10px; font-size: 1.1rem; margin-bottom: 17px; }
  .login-panel h1, .studio-head h1 { font: 600 clamp(1.75rem, 4.2vw, 2.65rem)/1.18 var(--display); letter-spacing: -.055em; }
  .login-panel p, .studio-head p { color: var(--secondary); margin-top: 8px; }
  .login-panel form { margin-top: 24px; }
  .stack { display: flex; flex-direction: column; gap: 7px; }
  .stack label { margin-top: 7px; font-weight: 600; font-size: .91rem; }
  .stack input, .stack select, .stack textarea { width: 100%; border: 1px solid #ddd9d6; border-radius: 8px; padding: 9px 11px; min-height: 44px; background: var(--paper); }
  .stack textarea { resize: vertical; }
  .video-credit-editor { min-width: 0; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
  .video-credit-editor legend { padding-inline: 4px; font-weight: 600; font-size: .91rem; }
  .video-credit-row { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
  .video-credit-inputs { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 8px; }
  .video-credit-inputs label { min-width: 0; }
  .video-credit-inputs input { margin-top: 4px; }
  .video-credit-actions { display: flex; flex-wrap: wrap; gap: 5px; }
  .video-credit-editor .add-credit { margin-top: 8px; }
  .stack [type="file"] { font-size: .82rem; overflow: hidden; }
  .stack [type="file"]::file-selector-button { margin-right: 9px; color: var(--accent); border: 0; border-radius: 5px; padding: 3px 7px; background: var(--accent-light); font-weight: 600; cursor: pointer; }
  .stack small, .optional { color: var(--secondary); font-weight: 400; font-size: .78rem; }
  .stack [type="submit"] { margin-top: 12px; }
  .login-panel [type="submit"] { width: 100%; }
  .form-message { padding: 9px 11px; color: #26543c; background: #eaf6ed; border-radius: 7px; font-size: .86rem; }
  .form-message.error { color: var(--accent-dark); background: var(--accent-light); }
  .studio { padding-block: 35px 62px; }
  .studio-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
  .studio-actions, .site-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .site-fields { margin: 0; }
  .site-fields legend { padding-inline: 5px; font: 600 1.25rem/1.3 var(--display); }
  .site-form-actions { margin-top: 18px; }
  .sources-form-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
  .source-entry { border-top: 1px solid var(--line); padding: 10px 0 14px; }
  .source-entry :is(input, textarea) { display: block; margin-top: 4px; }
  .source-entry .remove-source { align-self: flex-start; }
  .studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: start; gap: 20px; }
  .editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
  .editor-head h2, .delete-dialog h2 { font: 600 1.45rem/1.25 var(--display); letter-spacing: -.045em; }
  .text-button { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 3px 5px; border: 0; background: none; font-size: .82rem; font-weight: 600; color: var(--secondary); }
  .text-button.danger { color: var(--accent); }
  .admin-count { color: var(--secondary); font-size: .84rem; white-space: nowrap; }
  .admin-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
  .admin-row:first-child { border-top: none; }
  .admin-row img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--soft); }
  .admin-row-title { font-size: .87rem; font-weight: 700; overflow-wrap: anywhere; }
  .admin-row-title:hover { color: var(--accent); }
  .admin-row .card-meta { font-size: .74rem; }
  .admin-actions { display: flex; gap: 3px; }
  .upload-progress { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding-top: 8px; color: var(--secondary); font-size: .83rem; }
  progress { width: 100%; min-width: 0; accent-color: var(--accent); }
  .delete-dialog { max-width: min(420px, calc(100% - 32px)); color: var(--ink); }
  .delete-dialog::backdrop { background: #23222265; }
  .delete-dialog p { margin-top: 11px; overflow-wrap: anywhere; }
  .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
}

@layer responsive {
  @media (max-width: 1024px) {
    .wrap { width: calc(100% - 64px); }
    .hero-inner { min-height: 409px; }
    .hero-cover { padding-left: 23%; }
    .watch-grid { gap: 19px; }
    .admin-row { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; }
  }
  @media (max-width: 800px) {
    .bar-inner { grid-template-columns: auto minmax(145px, 1fr) auto; gap: 14px; }
    .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
    .watch-grid, .studio-grid { grid-template-columns: 1fr; }
    .related-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-cover { padding-left: 12%; }
    .hero::after { background: linear-gradient(90deg, #faf7f0 0%, #faf7f0 18%, #faf7f0ed 33%, #faf7f0b8 51%, #faf7f049 80%, #faf7f024 100%); }
  }
  @media (max-width: 560px) {
    .wrap { width: calc(100% - 36px); }
    :target { scroll-margin-top: 126px; }
    .bar-inner { grid-template-columns: 1fr auto; gap: 8px 9px; padding-block: 9px; }
    .search { grid-column: 1 / -1; grid-row: 2; }
    .fanpage { grid-column: 2; grid-row: 1; min-height: 44px; padding-inline: 10px; font-size: .79rem; }
    .brand { font-size: .89rem; }
    .search input, .search button { height: 44px; }
    .search input, .stack input:not([type="file"]), .stack textarea, .stack select { font-size: 1rem; }
    .hero-cover { height: 87%; padding-left: 0; object-position: 59% 4%; }
    .hero::after { background: linear-gradient(180deg, #faf7f00d 0%, #faf7f04b 21%, #faf7f0df 45%, #faf7f0 71%), linear-gradient(90deg, #faf7f04b, #faf7f000 90%); }
    .hero-inner { min-height: 450px; padding-top: 155px; padding-bottom: 29px; justify-content: end; }
    .hero { --hero-title-size: clamp(2.48rem, 10.4vw, 3.35rem); }
    .hero h1 { letter-spacing: -.076em; }
    .hero-slogan { font-size: calc(.76 * var(--hero-title-size)); margin-top: 4px; }
    .hero-label { font-size: .76rem; padding-bottom: 9px; }
    .hero-lead { margin: 14px 0 17px; font-size: .95rem; line-height: 1.55; }
    .hero .button { min-height: 44px; }
    .channel-tabs { gap: 22px; }
    .tab { min-height: 52px; }
    .library, .about { padding-block: 24px 42px; }
    .library-head { flex-wrap: wrap; gap: 7px; }
    .sort { padding-inline: 8px; gap: 5px; }
    .sort select { margin-inline: -20px -17px; padding-left: 20px; }
    .chips { flex-wrap: nowrap; overflow-x: auto; padding-block: 12px 13px; margin-inline: -2px; padding-inline: 2px; scrollbar-width: thin; }
    .chip { min-height: 44px; }
    .video-grid { grid-template-columns: 1fr; gap: 23px; }
    .watch { padding-block: 13px 42px; }
    .watch-grid { gap: 23px; }
    .watch-meta-row { align-items: flex-start; }
    .watch-meta-row .share-button { padding-inline: 9px; }
    .related-list { grid-template-columns: 1fr; }
    .related .video-card { grid-template-columns: minmax(105px, 39%) minmax(0, 1fr); }
    .related .card-title { font-size: .94rem; }
    .panel, .login-panel { padding: 17px; }
    .video-credit-inputs { grid-template-columns: 1fr; gap: 0; }
    .studio-head { align-items: flex-start; flex-wrap: wrap; }
    .studio { padding-block: 25px 42px; }
    .footer-inner { min-height: 68px; flex-wrap: wrap; gap: 0 12px; padding-block: 7px; }
    .footer .brand { font-size: .83rem; }
    .admin-link { font-size: .81rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}

@layer pages {
  .posts-section { padding-block: 32px 62px; }
  .posts-column { width: min(100%, 740px); margin-inline: auto; }
  .posts-column h2 { margin: 0 0 18px; font: 600 clamp(1.7rem, 2.45vw, 2.3rem)/1.2 var(--display); letter-spacing: -.055em; }
  #posts-feed { display: grid; gap: 18px; }
  .post-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .post-copy { padding: 20px 22px 16px; overflow-wrap: anywhere; }
  .post-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 11px; margin-bottom: 11px; }
  .post-source { color: var(--accent); font-size: .86rem; font-weight: 700; }
  .post-date { color: var(--secondary); font-size: .79rem; }
  .post-copy h3 { margin-bottom: 8px; font: 600 1.43rem/1.28 var(--display); }
  .post-copy h3 a:hover { color: var(--accent); }
  .post-body { color: var(--ink); white-space: pre-wrap; }
  .post-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; background: #f7f4ee; }
  .post-gallery a { display: block; overflow: hidden; }
  .post-gallery a:only-child { grid-column: 1 / -1; }
  .post-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s; }
  .post-gallery a:only-child img { max-height: 570px; aspect-ratio: auto; object-fit: contain; }
  .post-gallery a:hover img { transform: scale(1.02); }
  .post-gallery a:focus-visible { outline-offset: -3px; }
  .post-metrics { padding: 10px 22px; color: var(--secondary); font-size: .83rem; }
  .post-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
  .post-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 47px; border: 0; background: #fff; font-size: .87rem; font-weight: 650; }
  .post-action + .post-action { border-left: 1px solid var(--line); }
  .post-action:hover, .post-action[aria-pressed="true"] { color: var(--accent); background: #fbf2f1; }
  .post-action[aria-pressed="true"] svg { fill: currentColor; }
  .post-action:focus-visible { outline-offset: -3px; }
  .admin-post-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .admin-post-row .admin-row-title { overflow-wrap: anywhere; min-width: 0; }
  .post-remove-images { display: flex; align-items: center; gap: 6px; }
  .stack .post-remove-images input { width: 18px; min-height: 18px; }
  #post-image-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
  #post-image-preview img { width: 68px; height: 56px; object-fit: cover; border-radius: 4px; }
}
@layer responsive {
  @media (max-width: 560px) {
    .channel-tabs { gap: 12px; }
    .post-copy { padding: 16px; }
    .post-metrics { padding-inline: 16px; }
    .posts-section { padding-block: 24px 42px; }
  }
  @media (max-width: 370px) {
    .channel-tabs .tab { gap: 4px; font-size: .82rem; }
  }
}