@import url("/fonts/noto-serif-sc.css");

:root {
  color-scheme: light;
  --canvas: #f4f5fb;
  --paper: #fff;
  --ink: #17182a;
  --muted: #77788a;
  --line: #e4e4ee;
  --violet: #4938ca;
  --violet-bright: #7450d8;
  --violet-soft: #efedff;
  --green: #20715c;
  --red: #a83d46;
  --heat: #f05a18;
  --heat-deep: #c93f06;
  --heat-soft: #fff0e7;
  --shadow: 0 16px 42px #29244713;
  --ui-font: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --display-font: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: var(--ui-font); line-height: 1.55; background: radial-gradient(circle at 90% 0, #7450d810, transparent 28rem), var(--canvas); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #8a7be8; outline-offset: 2px; }
[hidden] { display: none !important; }

.directory-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 34px; }
.directory-header, .brand-lockup, .admin-header, .admin-header-actions, .section-title-row, .ranking-toolbar, .panel-heading { display: flex; align-items: center; justify-content: space-between; }
.directory-header { gap: 18px; }
.directory-header:has(> :only-child) { justify-content: flex-start; }
.brand-lockup { justify-content: flex-start; gap: 10px; width: fit-content; font-weight: 850; font-size: 14px; }
.admin-entry { z-index: 2; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #dcd9ed; border-radius: 999px; padding: 9px 14px; color: #5144b4; background: #ffffffb8; font-size: 12px; font-weight: 800; transition: background .2s, transform .2s; }
.admin-entry:hover { transform: translateY(-2px); background: #fff; }
.light-entry:hover { background: #ffffff2e; border-color: #ffffff85; }
.directory-hero { position: relative; overflow: hidden; margin: 32px 0 52px; min-height: 302px; border-radius: 28px; padding: 43px clamp(24px, 7vw, 80px); color: #fff; background: linear-gradient(119deg, #2e3fc8 2%, #5440cf 52%, #8a47c7 100%); box-shadow: 0 23px 58px #4938ca2e; }
.directory-hero::before, .directory-hero::after { position: absolute; content: ""; border: 1px solid #ffffff20; border-radius: 50%; pointer-events: none; }
.directory-hero::before { width: 480px; height: 480px; top: -290px; right: -30px; box-shadow: 0 0 0 44px #ffffff08, 0 0 0 90px #ffffff06; }
.directory-hero::after { width: 330px; height: 330px; bottom: -250px; right: 20%; background: #ffffff08; }
.eyebrow, .kicker { display: block; color: #a99cf1; font-size: 10px; font-weight: 950; letter-spacing: .17em; }
.directory-hero .eyebrow { color: #d3cafd; }
.directory-hero h1 { position: relative; z-index: 1; max-width: 680px; margin: 17px 0 13px; font-family: var(--display-font); font-size: clamp(36px, 6.5vw, 64px); line-height: 1.08; letter-spacing: -.035em; }
.directory-hero h1 em { color: #e1d7ff; font-style: normal; }
.directory-hero p { position: relative; z-index: 1; margin: 0; color: #e0ddfc; font-size: 14px; }
.hero-stamp { position: absolute; right: 8%; bottom: 35px; z-index: 1; width: 86px; height: 86px; border: 1px solid #ffffff71; border-radius: 50%; display: grid; align-content: center; justify-content: center; color: #fff; text-align: center; font-family: var(--display-font); font-size: 26px; line-height: 1; transform: rotate(9deg); }
.hero-stamp small { margin-top: 6px; font-family: var(--ui-font); font-size: 9px; letter-spacing: .15em; }
.directory-section { min-height: 280px; }
.section-title-row { gap: 18px; margin-bottom: 19px; }
.section-title-row h2, .ranking-toolbar h2, .panel-heading h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.025em; }
.section-title-row .kicker, .ranking-toolbar .kicker, .panel-heading .kicker { color: #6c60cf; }
.count-note, .subtitle { color: var(--muted); font-size: 12px; }
.brand-list { display: grid; gap: 15px; }
.brand-section { padding: 17px 19px 18px; border: 1px solid var(--line); border-radius: 17px; background: #ffffffad; box-shadow: 0 8px 25px #2924470b; }
.brand-section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.brand-section-heading .kicker { color: #7772a4; font-size: 8px; }
.brand-section-heading h3 { margin: 1px 0 0; font-size: 18px; }
.event-section { padding-top: 13px; border-top: 1px solid #ecebf3; }
.event-heading { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; }
.event-heading span { color: #8e8c9e; font-size: 10px; }
.event-heading h4 { margin: 0; font-size: 13px; }
.edition-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.edition-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; padding: 20px 21px; background: #ffffffd9; box-shadow: 0 8px 25px #2924470b; transition: transform .2s, box-shadow .2s; }
.edition-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.edition-card::after { position: absolute; top: -30px; right: -29px; width: 90px; height: 90px; content: ""; border: 1px solid #dedaf570; border-radius: 50%; box-shadow: 0 0 0 15px #eeeafd55; }
.edition-card h5 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.edition-meta { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: #686586; font-size: 11px; }
.status-pill, .phase-pill { border: 1px solid #ffffff57; border-radius: 999px; padding: 5px 11px; color: #fff; background: #ffffff1e; font-size: 11px; font-weight: 850; }
.status-pill.open { border-color: #c8e9db; color: #176b53; background: #e7f7ef; }
.status-pill.closed { border-color: #e5e3eb; color: #79788a; background: #f6f5fa; }
.edition-arrow { position: absolute; right: 21px; bottom: 19px; color: var(--violet); font-size: 20px; }
.loading-box, .empty-state { display: grid; min-height: 180px; place-items: center; border: 1px dashed #d8d7e7; border-radius: 16px; color: #85869a; background: #ffffff87; text-align: center; padding: 22px; }
.site-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 44px; padding-top: 15px; border-top: 1px solid #e2e2ed; color: #8b8b9c; font-size: 10px; }

.ranking-page { background: #f4f5fb; }
.ranking-hero { position: relative; min-height: 350px; overflow: hidden; color: #fff; background: linear-gradient(120deg, #3142e6fa, #6c38ccf5), #4a43db; }
.ranking-headline { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); min-height: 350px; margin: auto; padding: 34px 0; }
.light { color: #fff; }
.hero-copy { width: min(760px, 100%); margin: 50px auto 8px; text-align: center; }
.phase-pill { display: inline-block; margin-bottom: 14px; padding: 5px 13px; letter-spacing: .1em; }
.hero-copy h1 { margin: 0; font-family: var(--display-font); font-size: clamp(33px, 5.5vw, 53px); line-height: 1.12; letter-spacing: -.035em; }
.hero-copy p { margin: 12px 0 0; color: #e1e2ff; font-size: 14px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px; border-radius: 50%; background: #8cf3cc; box-shadow: 0 0 0 4px #8cf3cc28; }
.light-entry { position: absolute; top: 34px; right: 0; color: #fff; border-color: #ffffff52; background: #ffffff1c; }
.hero-orb { position: absolute; border-radius: 50%; background: #ffffff1a; filter: blur(1px); pointer-events: none; }
.hero-orb-one { top: -190px; right: 8%; width: 480px; height: 480px; }
.hero-orb-two { bottom: -250px; left: -80px; width: 430px; height: 430px; }
.ranking-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 58px; }
.summary-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow: hidden; width: 100%; margin-top: -44px; border: 1px solid #4d43b41f; border-radius: 18px; background: #fff; box-shadow: 0 18px 60px #302d6921; }
.summary-stat { min-width: 0; padding: 19px 11px; border-left: 1px solid #ececf4; text-align: center; }
.summary-stat:first-child { border-left: 0; }
.summary-stat span { display: block; overflow: hidden; color: #77788a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.summary-stat strong { display: block; margin-top: 4px; font-size: clamp(17px, 2vw, 22px); line-height: 1.2; font-variant-numeric: tabular-nums; }
.summary-stat small { color: #9999a8; font-size: 10px; }
.featured-stat { background: linear-gradient(140deg, #fff, #fff1e8); }
.featured-stat span { color: var(--heat-deep); }
.featured-stat strong { color: var(--heat); font-weight: 900; }
.ranking-content { margin-top: 44px; }
.ranking-toolbar { align-items: end; gap: 20px; margin-bottom: 22px; }
.ranking-toolbar h2 { font-size: 25px; }
.subtitle { margin: 5px 0 0; }
.platform-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #e9e9f3; }
.platform-tabs button { min-width: 68px; padding: 8px 13px; border: 0; border-radius: 9px; color: #6d6b82; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; transition: color .18s, background .18s, box-shadow .18s; }
.platform-tabs button:hover { color: #34288c; }
.platform-tabs button.active { color: #fff; background: #5142cc; box-shadow: 0 4px 11px #5142cc37; }
.ranking-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ranking-grid.grouped { display: block; }
.platform-group + .platform-group { margin-top: 32px; }
.platform-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid #deddec; }
.platform-group-heading h3 { margin: 0; font-size: 15px; }
.platform-group-heading span { color: #858597; font-size: 10px; }
.ranking-card { display: block; overflow: hidden; min-width: 0; border: 1px solid #e3e3ee; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px #2d2c4c0f; animation: card-arrive .42s both; transition: transform .2s, box-shadow .2s; }
.ranking-card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px #2d2c4c1c; }
.ranking-card:nth-child(2) { animation-delay: .04s; }
.ranking-card:nth-child(3) { animation-delay: .08s; }
.ranking-cover { position: relative; display: grid; overflow: hidden; aspect-ratio: 16 / 9; place-items: center; color: #fff; background: linear-gradient(135deg, #393bc0, #a54acb); }
.ranking-cover::before, .ranking-cover::after { position: absolute; content: ""; border: 1px solid #ffffff49; border-radius: 50%; }
.ranking-cover::before { width: 230px; height: 230px; top: -135px; right: -20px; }
.ranking-cover::after { width: 150px; height: 150px; bottom: -110px; left: 28px; }
.ranking-cover-image { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: saturate(.82); }
.rank-number, .platform-badge { position: absolute; z-index: 2; color: #fff; background: #11112289; backdrop-filter: blur(8px); }
.rank-number { top: 12px; left: 12px; display: grid; min-width: 34px; height: 34px; place-items: center; border: 1px solid #ffffff59; border-radius: 10px; font-size: 12px; font-weight: 950; }
.rank-number.top { color: #3d2d06; background: #ffd565ed; }
.platform-badge { right: 12px; bottom: 12px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.play-button { position: absolute; z-index: 2; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #ffffffa8; border-radius: 50%; color: #fff; background: #11112299; box-shadow: 0 5px 22px #00000040; backdrop-filter: blur(8px); }
.play-button svg { width: 25px; height: 25px; margin-left: 3px; fill: currentColor; }
.ranking-card-body { padding: 15px; }
.video-title { display: -webkit-box; overflow: hidden; margin: 0; font-size: 15px; font-weight: 850; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-heading > div:first-child { min-width: 0; }
.creator-name { overflow: hidden; margin: 5px 0 0; color: #858596; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.heat-score { flex: none; color: var(--heat); text-align: right; }
.heat-score strong { display: block; font-size: 20px; font-weight: 950; line-height: 1.15; font-variant-numeric: tabular-nums; }
.heat-score small { display: block; margin-top: 3px; color: var(--heat-deep); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.view-count { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eeeef4; }
.view-count span { color: #9897a7; font-size: 10px; }
.view-count strong { color: #302a76; font-size: 19px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 9px; }
.card-stat { min-width: 0; }
.card-stat span { display: block; color: #9897a7; font-size: 9px; }
.card-stat strong { display: block; overflow: hidden; margin-top: 2px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking-footnote { display: flex; justify-content: space-between; gap: 18px; margin-top: 21px; color: #9696a6; font-size: 10px; }

.admin-shell { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 25px 0 42px; }
.admin-header { gap: 18px; margin-bottom: 22px; }
.admin-title-group { display: flex; align-items: center; gap: 14px; }
.admin-overline { padding-left: 14px; border-left: 1px solid #d8d6e5; color: #77788a; font-size: 12px; }
.admin-header-actions { gap: 8px; }
.admin-nav { display: flex; gap: 26px; margin: -7px 0 18px; padding: 0 3px; border-bottom: 1px solid #dedce8; }
.admin-nav-link { position: relative; padding: 12px 1px; border: 0; color: #888597; background: transparent; cursor: pointer; font: inherit; font-size: 14px; font-weight: 850; }
.admin-nav-link.active { color: #302a76; }
.admin-nav-link.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--heat); content: ""; }
.task-list { display: grid; gap: 12px; }
.task-card { min-width: 0; max-width: 100%; overflow: hidden; padding: 17px 18px; border: 1px solid #e4e1ed; border-radius: 12px; background: #fff; }
.task-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.task-card-heading h3 { margin: 3px 0 0; font-size: 18px; }
.task-eyebrow { color: #878397; font-size: 12px; font-weight: 750; }
.task-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.task-meta span { display: grid; gap: 3px; min-width: 0; padding: 9px 11px; border-radius: 8px; background: #faf9fd; }
.task-meta small { color: #9693a4; font-size: 11px; }
.task-meta strong { overflow: hidden; color: #464259; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-metrics { display: flex; flex-wrap: wrap; gap: 7px 20px; margin-top: 12px; color: #777388; font-size: 12px; }
.task-metrics strong { margin-left: 3px; color: #302a76; font-size: 15px; font-variant-numeric: tabular-nums; }
.task-error { margin: 11px 0 0; padding: 8px 10px; border-radius: 7px; color: #9c3434; background: #fff5f5; font-size: 12px; }
.task-items { min-width: 0; max-width: 100%; margin-top: 13px; border-top: 1px solid #ebe8f1; }
.task-items > summary { padding: 11px 0 1px; color: #6256b0; cursor: pointer; font-size: 12px; font-weight: 850; list-style: none; }
.task-items > summary::-webkit-details-marker { display: none; }
.task-items > summary::before { margin-right: 6px; content: "+"; }
.task-items[open] > summary::before { content: "−"; }
.task-item-list { display: grid; min-width: 0; gap: 8px; margin-top: 9px; }
.task-item { min-width: 0; max-width: 100%; overflow: hidden; padding: 12px; border: 1px solid #ebe8f2; border-radius: 9px; background: #fcfbff; }
.task-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-item-heading > div { display: flex; gap: 6px; }
.platform-pill, .trigger-pill { padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.platform-pill { color: #5b4dc1; background: #eeebff; }
.trigger-pill { color: #777388; background: #f0eff5; }
.status-chip.failed { color: #9c3434; background: #fff0f0; }
.task-item-title { display: block; width: 100%; max-width: 100%; overflow: hidden; margin-top: 7px; color: #343047; font-size: 13px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.task-item-meta, .task-item-metrics { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 6px; color: #898597; font-size: 11px; }
.task-item-metrics strong { color: #464259; font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; color: #817d91; font-size: 12px; }
.pagination .button:disabled { cursor: default; opacity: .45; transform: none; }
.tasks-workspace .workspace-actions { flex-wrap: wrap; }
.admin-overview { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(460px, 1.35fr); align-items: center; gap: 30px; margin-bottom: 18px; padding: 25px 28px; border: 1px solid #e1dfea; border-radius: 17px; background: linear-gradient(120deg, #fff 30%, #f5f2ff); box-shadow: 0 9px 30px #2924470b; }
.overview-heading .kicker { color: #6c60cf; }
.overview-heading h1 { margin: 5px 0 4px; font-family: var(--display-font); font-size: clamp(29px, 3.4vw, 39px); line-height: 1.15; }
.overview-heading p { margin: 0; color: #77788a; font-size: 12px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid #e7e5ef; border-radius: 12px; background: #fff; }
.admin-stats > div { min-height: 76px; padding: 13px 14px; border-left: 1px solid #ecebf2; }
.admin-stats > div:first-child { border-left: 0; }
.admin-stats span { display: block; color: #858597; font-size: 10px; }
.admin-stats strong { display: block; margin-top: 2px; font-size: 25px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.admin-workspace { padding: 23px; border: 1px solid var(--line); border-radius: 17px; background: #ffffffd9; box-shadow: var(--shadow); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.workspace-heading h2 { margin: 0; font-size: 22px; }
.workspace-heading p { margin: 3px 0 0; color: #858597; font-size: 11px; }
.workspace-actions { display: flex; align-items: end; gap: 8px; }
.brand-switcher { display: grid; gap: 4px; color: #77738d; font-size: 9px; font-weight: 850; }
.brand-switcher select { min-width: 180px; height: 38px; padding: 0 31px 0 11px; border: 1px solid #dcd9e7; border-radius: 8px; color: #29263b; background: #fff; font-size: 12px; font-weight: 800; }
.create-brand { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-bottom: 22px; padding: 14px 16px; border: 1px dashed #d9d5e9; border-radius: 11px; background: #faf9ff; }
.create-brand label { display: grid; gap: 5px; color: #6e6c80; font-size: 10px; font-weight: 800; }
.creator-panel { margin-bottom: 22px; overflow: hidden; border: 1px solid #ddd9ed; border-radius: 13px; background: #fff; }
.creator-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; padding: 16px 18px; background: linear-gradient(100deg, #f4f2ff, #fff); list-style: none; }
.creator-panel > summary::-webkit-details-marker { display: none; }
.creator-panel > summary::after { content: "›"; color: #8479c5; font-size: 22px; transition: transform .16s; }
.creator-panel[open] > summary::after { transform: rotate(90deg); }
.creator-panel > summary > span:first-child { flex: 1; min-width: 0; }
.creator-panel > summary strong { display: block; font-size: 18px; }
.creator-panel > summary small { display: block; margin-top: 2px; color: #7d7a8f; font-size: 12px; }
.creator-count { flex: none; padding: 4px 10px; border-radius: 999px; color: #5d4fbf; background: #efecff; font-size: 12px; font-weight: 850; }
.creator-panel-body { padding: 17px 18px 19px; border-top: 1px solid #e7e5ef; }
.creator-form { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.25fr) minmax(160px, 1.25fr) auto; align-items: end; gap: 10px; margin-bottom: 16px; padding: 13px; border: 1px solid #e7e4f1; border-radius: 10px; background: #faf9ff; }
.creator-form label { display: grid; gap: 5px; color: #6e6c80; font-size: 12px; font-weight: 800; }
.creator-form input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #dedee9; border-radius: 8px; color: #242438; background: #fff; font-size: 14px; }
.creator-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.creator-card { min-width: 0; padding: 13px; border: 1px solid #e8e7ef; border-radius: 10px; background: #fff; }
.creator-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.creator-card-heading strong { font-size: 15px; }
.creator-card-heading p { margin: 2px 0 0; color: #858496; font-size: 11px; }
.creator-alias-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 7px; align-items: start; margin-top: 9px; color: #716d81; font-size: 11px; }
.creator-alias-row > span { padding-top: 3px; color: #8a8799; font-weight: 800; }
.creator-alias-row > div { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.creator-chip { overflow: hidden; max-width: 100%; padding: 2px 7px; border: 1px solid #e3e0ef; border-radius: 999px; color: #4d4965; background: #f8f7fc; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.creator-empty { padding-top: 3px; color: #aaa7b6; }
.creator-edit { margin-top: 10px; border-top: 0; }
.creator-edit > summary { margin: 6px 0 0; }
.creator-edit .creator-editor { margin: 8px 0 0; grid-template-columns: minmax(120px, 1fr) auto; }
.creator-editor label:nth-child(2), .creator-editor label:nth-child(3) { grid-column: 1; }
.creator-editor .button { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: #ffffffdf; box-shadow: var(--shadow); }
.form-panel { display: grid; gap: 11px; padding: 16px; }
.step-label { color: #6b5ac8; font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.form-panel h2 { margin: -5px 0 0; font-size: 17px; }
.form-panel label, .login-card label { display: grid; gap: 6px; color: #767688; font-size: 11px; font-weight: 750; }
.form-panel input, .form-panel select, .login-card input, .record-editor input, .record-editor select, .create-brand input, .inline-form input { width: 100%; height: 41px; padding: 0 11px; border: 1px solid #dedee9; border-radius: 8px; outline: none; color: #242438; background: #fff; font-size: 12px; }
.form-panel input:focus, .form-panel select:focus, .login-card input:focus, .record-editor input:focus, .record-editor select:focus, .create-brand input:focus, .inline-form input:focus { border-color: #7669d8; box-shadow: 0 0 0 3px #6b5ac81a; }
.form-panel input::placeholder { color: #aaa9b6; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 850; transition: transform .16s, background .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: #5142c8; box-shadow: 0 5px 13px #5142c825; }
.button.primary:hover { background: #4032b3; }
.button.quiet { border-color: #dedde9; color: #56546d; background: #fff; }
.button.quiet:hover { border-color: #c4bee9; background: #f8f7ff; }
.button.danger { border-color: #edc8c8; color: #a53434; background: #fff8f8; }
.button.danger:hover { border-color: #dca7a7; background: #fff0f0; }
.button.small { min-height: 31px; padding: 0 10px; font-size: 10px; }
.button.full { width: 100%; min-height: 45px; margin-top: 4px; }
.muted { color: #89899a; font-size: 10px; }
.panel-heading { gap: 14px; margin-bottom: 14px; }
.panel-heading h2 { font-size: 20px; }
.records-list { display: grid; gap: 17px; }
.program-card { overflow: hidden; border: 1px solid #dedce8; border-radius: 13px; background: #fff; }
.program-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid #e7e5ef; background: linear-gradient(100deg, #f4f2ff, #fff); }
.program-heading h2 { margin: 1px 0 0; font-size: 23px; }
.program-heading p { margin: 3px 0 0; color: #828294; font-size: 10px; }
.entity-type { color: #7164ca; font-size: 8px; font-weight: 950; letter-spacing: .16em; }
.program-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.edit-drawer { border-top: 1px solid #efedf4; }
.edit-drawer > summary, .add-drawer > summary { display: inline-flex; align-items: center; margin: 10px 16px; color: #77738d; cursor: pointer; font-size: 10px; font-weight: 800; list-style: none; }
.edit-drawer > summary::-webkit-details-marker, .add-drawer > summary::-webkit-details-marker { display: none; }
.edit-drawer > summary::before, .add-drawer > summary::before { margin-right: 6px; content: "+"; font-size: 13px; }
.edit-drawer[open] > summary::before, .add-drawer[open] > summary::before { content: "−"; }
.edit-drawer .record-editor { margin: 0 16px 13px; }
.add-drawer { margin: 0 16px; padding-top: 1px; }
.add-drawer > summary.button { margin: 11px 0; }
.add-drawer > summary.button::before { content: "+"; }
.add-drawer[open] > summary.button::before { content: "−"; }
.inline-form { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(110px, .7fr) auto; align-items: end; gap: 8px; margin-bottom: 13px; padding: 12px; border: 1px solid #e6e3f0; border-radius: 9px; background: #f8f7fd; }
.inline-form label { display: grid; gap: 4px; color: #77738d; font-size: 9px; font-weight: 800; }
.inline-form .wide-field { grid-column: span 1; }
.inline-form small { grid-column: 1 / -1; color: #9693a6; font-size: 9px; }
.event-admin { margin: 0 14px 15px; padding: 15px; border: 1px solid #e9e7ef; border-radius: 11px; background: #fcfcff; }
.event-heading { display: flex; justify-content: space-between; gap: 12px; }
.event-heading h3 { margin: 1px 0 0; font-size: 16px; }
.event-heading p { margin: 2px 0 0; color: #858496; font-size: 10px; }
.event-admin > .edit-drawer, .event-admin > .add-drawer { margin: 7px 0 0; border-top: 0; }
.event-admin > .edit-drawer > summary, .event-admin > .add-drawer > summary { margin: 8px 0; }
.event-admin > .edit-drawer .record-editor { margin: 0 0 9px; }
.program-edition { margin-top: 12px; padding: 14px; border: 1px solid #e2e0eb; border-radius: 10px; background: #fff; }
.edition-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; }
.edition-summary::-webkit-details-marker { display: none; }
.edition-order { display: grid; flex: none; width: 27px; height: 27px; place-items: center; border-radius: 7px; color: #6759bf; background: #efecff; font-size: 9px; font-weight: 950; }
.edition-summary::after { content: "›"; flex: none; color: #8479c5; font-size: 18px; line-height: 1; transition: transform .16s; }
.edition-disclosure[open] > .edition-summary::after { transform: rotate(90deg); }
.edition-disclosure:not([open]) > .edition-body { display: none; }
.edition-summary .entity-title-row { flex: 1; }
.edition-summary strong { font-size: 15px; }
.edition-summary-meta { color: #868597; font-size: 10px; }
.edition-body { padding-top: 12px; }
.edition-admin-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.entity-title-row { display: flex; align-items: center; gap: 8px; }
.edition-admin-heading h4 { margin: 0; font-size: 14px; }
.edition-admin-heading p { margin: 3px 0 0; color: #868597; font-size: 10px; }
.status-chip { padding: 2px 7px; border-radius: 999px; font-size: 8px; font-weight: 900; }
.status-chip.open { color: #176b53; background: #e7f7ef; }
.status-chip.closed { color: #79788a; background: #efeff4; }
.text-link { flex: none; color: #5b4dc1; font-size: 10px; font-weight: 850; }
.record-editor { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(85px, .5fr) auto; align-items: end; gap: 7px; margin: 12px 0 0; padding: 10px; border-radius: 9px; background: #f6f5fb; }
.video-editor { grid-template-columns: minmax(135px, 1.35fr) minmax(100px, 1fr) minmax(85px, .55fr) auto; }
.brand-editor { grid-template-columns: minmax(120px, 1fr) auto; }
.event-editor { grid-template-columns: minmax(120px, 1fr) minmax(110px, 1fr) auto; }
.edition-editor { grid-template-columns: minmax(130px, 1.1fr) minmax(110px, 1fr) minmax(90px, .7fr) auto auto; }
.record-editor label { display: grid; gap: 4px; color: #858496; font-size: 9px; font-weight: 750; }
.record-editor input { height: 35px; font-size: 10px; }
.record-editor .finished-toggle { grid-template-columns: 16px 1fr; align-items: center; align-self: end; min-height: 35px; }
.record-editor .finished-toggle input { width: 16px; height: 16px; margin: 0; accent-color: #5544c8; }
.record-editor .button { min-height: 35px; }
.edition-settings { margin-top: 13px; padding: 14px; border: 1px solid #e2e0eb; border-radius: 9px; background: #f8f7fd; }
.edition-settings-copy { display: grid; grid-column: 1 / -1; gap: 2px; padding-bottom: 2px; }
.edition-settings-copy strong { font-size: 13px; }
.edition-settings-copy span { color: #858496; font-size: 11px; }
.edition-settings-grid { display: grid; grid-template-columns: minmax(150px, 1.15fr) minmax(120px, 1fr) minmax(100px, .7fr) auto auto; align-items: end; gap: 9px; }
.edition-settings-grid label { display: grid; gap: 5px; color: #696677; font-size: 11px; font-weight: 750; }
.edition-settings-grid input, .edition-settings-grid select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid #dddbE8; border-radius: 7px; color: #29263b; background: #fff; font-size: 12px; }
.edition-settings-grid input:focus, .edition-settings-grid select:focus { border-color: #7669d8; outline: none; box-shadow: 0 0 0 3px #6b5ac81a; }
.edition-settings-grid .finished-toggle { display: flex; align-items: center; min-height: 39px; gap: 7px; white-space: nowrap; }
.edition-settings-grid .finished-toggle input { width: 17px; height: 17px; accent-color: #5544c8; }
.video-list { display: grid; gap: 9px; margin-top: 11px; }
.video-admin-card { padding: 12px; border: 1px solid #e8e7ef; border-radius: 9px; background: #fff; }
.video-admin-top { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.admin-cover { width: 64px; height: 84px; border-radius: 6px; object-fit: cover; background: #efedf8; }
.admin-cover.placeholder { display: grid; place-items: center; color: #9290a4; font-size: 8px; text-align: center; }
.video-admin-title { min-width: 0; padding-top: 2px; }
.video-admin-title strong { display: block; overflow: hidden; font-size: 12px; font-weight: 850; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.video-admin-title p { overflow: hidden; margin: 1px 0 0; color: #69667a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.video-admin-title a { display: block; overflow: hidden; margin-top: 2px; color: #9492a3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.metric-line { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 10px; padding: 8px 10px; border-radius: 7px; color: #898697; background: #faf9fc; font-size: 9px; }
.metric-line span { white-space: nowrap; }
.metric-line strong { color: #343144; font-size: 10px; font-variant-numeric: tabular-nums; }
.heat-tag { min-width: 78px; padding: 7px 9px; border-radius: 8px; color: var(--heat-deep); background: var(--heat-soft); text-align: right; }
.heat-tag span { display: block; font-size: 8px; font-weight: 800; }
.heat-tag strong { display: block; font-size: 20px; font-weight: 950; line-height: 1.15; font-variant-numeric: tabular-nums; }
.item-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #efedf4; }
.item-tools .edit-drawer { flex: 1; min-width: 160px; border: 0; }
.item-tools .edit-drawer > summary { margin: 0; }
.item-tools .edit-drawer .record-editor { margin: 8px 0 0; }
.item-tools > .button { margin-left: auto; }
.item-tools > .button + .button { margin-left: 0; }
.video-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 7px; color: #89889a; font-size: 9px; }
.video-status.error { color: var(--red); }
.empty-note { padding: 17px 10px; border: 1px dashed #dedde8; border-radius: 8px; color: #898899; text-align: center; font-size: 10px; }
.form-message { min-height: 17px; margin: 2px 0 0; color: #77788a; font-size: 11px; }
.form-message.error { color: var(--red); }
.form-message.ok { color: var(--green); }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; display: flex; width: min(390px, calc(100vw - 32px)); align-items: flex-start; gap: 11px; padding: 14px 14px 14px 16px; border: 1px solid #cfe8dc; border-radius: 12px; color: #176b53; background: #f2fbf7; box-shadow: 0 16px 45px #1d2d2826; font-size: 13px; font-weight: 700; line-height: 1.5; animation: toast-enter .22s ease-out; }
.toast[hidden] { display: none; }
.toast.error { border-color: #f0cdcd; color: #9c3434; background: #fff5f5; }
.toast-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: #27936e; font-size: 13px; font-weight: 900; line-height: 20px; text-align: center; }
.toast-icon::before { content: "✓"; }
.toast.error .toast-icon { background: #c94e4e; }
.toast.error .toast-icon::before { content: "!"; }
.toast-text { flex: 1; padding-top: 1px; }
.toast-close { flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; color: currentColor; background: transparent; cursor: pointer; font-size: 20px; line-height: 20px; opacity: .6; }
.toast-close:hover { background: #0000000d; opacity: 1; }
.toast-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.admin-footer { margin-top: 19px; color: #8b8b9c; font-size: 10px; text-align: center; }
.login-wrap { display: grid; width: min(440px, 100%); gap: 27px; margin: 9vh auto 0; }
.login-card { display: grid; gap: 15px; padding: 26px; border: 1px solid var(--line); border-radius: 17px; background: #ffffffeb; box-shadow: var(--shadow); }
.login-card h1 { margin: -12px 0 -12px; font-size: 28px; letter-spacing: -.04em; }
.login-card > p:not(.form-message) { margin: 0; color: #858596; font-size: 12px; }
.login-card input { height: 44px; font-size: 13px; }
.not-found { display: grid; min-height: 75vh; align-content: center; justify-items: center; gap: 18px; text-align: center; }
.not-found h1 { max-width: 700px; margin: 0; font-family: var(--display-font); font-size: clamp(33px, 5vw, 55px); }

/* The admin is operated by one person, so favor readable controls over compact density. */
.admin-page { font-size: 15px; }
.admin-page .admin-overline, .admin-page .overview-heading p, .admin-page .workspace-heading p { font-size: 14px; }
.admin-page .admin-stats span { font-size: 12px; }
.admin-page .admin-stats strong { font-size: 29px; }
.admin-page .workspace-heading h2 { font-size: 26px; }
.admin-page .brand-switcher { font-size: 11px; }
.admin-page .brand-switcher select { height: 42px; font-size: 14px; }
.admin-page .create-brand label, .admin-page .inline-form label, .admin-page .record-editor label, .admin-page .edition-settings-grid label, .admin-page .form-panel label, .admin-page .login-card label { font-size: 12px; }
.admin-page .create-brand input, .admin-page .inline-form input, .admin-page .record-editor input, .admin-page .record-editor select, .admin-page .edition-settings-grid input, .admin-page .edition-settings-grid select, .admin-page .form-panel input, .admin-page .form-panel select { height: 42px; font-size: 14px; }
.admin-page .button { min-height: 40px; font-size: 13px; }
.admin-page .button.small { min-height: 34px; font-size: 12px; }
.admin-page .program-heading p, .admin-page .event-heading p, .admin-page .edition-admin-heading p { font-size: 12px; }
.admin-page .entity-type { font-size: 10px; }
.admin-page .edit-drawer > summary, .admin-page .add-drawer > summary { font-size: 12px; }
.admin-page .inline-form small, .admin-page .video-status { font-size: 11px; }
.admin-page .event-heading h3 { font-size: 18px; }
.admin-page .edition-order { width: 30px; height: 30px; font-size: 11px; }
.admin-page .edition-summary strong { font-size: 17px; }
.admin-page .edition-summary-meta, .admin-page .status-chip, .admin-page .text-link { font-size: 12px; }
.admin-page .edition-settings-copy strong { font-size: 15px; }
.admin-page .edition-settings-copy span { font-size: 12px; }
.admin-page .program-heading h2 { font-size: 27px; }
.admin-page .program-heading p { font-size: 13px; }
.admin-page .create-brand input { height: 44px; }
.admin-page .workspace-heading h2 { font-size: 28px; }
.admin-page .video-admin-title strong { font-size: 14px; }
.admin-page .video-admin-title p { font-size: 11px; }
.admin-page .video-admin-title a { font-size: 10px; }
.admin-page .metric-line { font-size: 11px; }
.admin-page .metric-line strong { font-size: 12px; }
.admin-page .heat-tag span { font-size: 10px; }
.admin-page .heat-tag strong { font-size: 23px; }
.admin-page .empty-note, .admin-page .admin-footer { font-size: 12px; }
.admin-page .toast { font-size: 14px; }
.admin-page .login-card > p:not(.form-message) { font-size: 14px; }
.admin-page .login-card input { font-size: 15px; }

@keyframes card-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 1000px) {
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-stat:nth-child(5) { border-left: 0; }
  .ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-overview { grid-template-columns: 1fr; gap: 18px; }
  .tasks-workspace .workspace-heading { align-items: stretch; flex-direction: column; }
  .creator-form { grid-template-columns: 1fr 1fr; }
  .creator-form .button { grid-column: 1 / -1; }
  .record-editor { grid-template-columns: 1fr 1fr .7fr; }
  .record-editor .button { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .directory-shell, .admin-shell { width: min(100% - 24px, 560px); }
  .directory-shell { padding-top: 16px; }
  .brand-lockup { font-size: 12px; }
  .admin-entry { padding: 8px 11px; font-size: 10px; }
  .directory-hero { min-height: 285px; margin: 22px 0 37px; padding: 36px 23px; border-radius: 20px; }
  .directory-hero h1 { font-size: clamp(37px, 10vw, 54px); }
  .directory-hero p { max-width: 255px; font-size: 12px; }
  .hero-stamp { right: 20px; bottom: 20px; width: 67px; height: 67px; font-size: 20px; }
  .hero-stamp small { font-size: 7px; }
  .section-title-row h2 { font-size: 21px; }
  .brand-section { padding: 14px; }
  .edition-cards { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 5px; margin-top: 30px; }
  .ranking-hero { min-height: 310px; }
  .ranking-headline { width: calc(100% - 36px); min-height: 310px; padding: 19px 0; }
  .hero-copy { margin-top: 59px; }
  .hero-copy h1 { font-size: clamp(31px, 8vw, 43px); }
  .hero-copy p { font-size: 12px; }
  .light-entry { top: 17px; }
  .ranking-main { width: calc(100% - 20px); }
  .summary-grid { margin-top: -34px; border-radius: 13px; }
  .summary-stat { padding: 13px 6px; }
  .summary-stat span { font-size: 9px; }
  .summary-stat strong { font-size: 17px; }
  .ranking-content { margin-top: 31px; }
  .ranking-toolbar { flex-direction: column; align-items: stretch; gap: 13px; }
  .ranking-toolbar h2 { font-size: 22px; }
  .platform-tabs { align-self: stretch; }
  .platform-tabs button { flex: 1; }
  .ranking-grid { grid-template-columns: 1fr; gap: 12px; }
  .platform-group-grid { grid-template-columns: 1fr; }
  .ranking-card { display: grid; grid-template-columns: minmax(110px, 39%) minmax(0, 1fr); }
  .ranking-cover { min-height: 132px; height: 100%; aspect-ratio: auto; }
  .rank-number { top: 8px; left: 8px; min-width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
  .platform-badge { right: 7px; bottom: 7px; padding: 4px 7px; font-size: 9px; }
  .play-button { width: 38px; height: 38px; }
  .play-button svg { width: 20px; height: 20px; }
  .ranking-card-body { align-self: center; min-width: 0; padding: 11px; }
  .video-title { font-size: 12px; }
  .creator-name { font-size: 10px; }
  .heat-score strong { font-size: 16px; }
  .view-count { margin-top: 8px; padding-top: 7px; }
  .view-count strong { font-size: 16px; }
  .card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 4px; margin-top: 7px; }
  .card-stat span { font-size: 8px; }
  .card-stat strong { font-size: 10px; }
  .ranking-footnote { flex-direction: column; gap: 5px; font-size: 9px; }
  .admin-shell { padding-top: 15px; }
  .admin-header { align-items: flex-start; margin-bottom: 16px; }
  .admin-title-group { align-items: flex-start; flex-direction: column; gap: 7px; }
  .admin-overline { padding-left: 0; border: 0; font-size: 10px; }
  .admin-header-actions { align-items: flex-end; flex-direction: column; }
  .admin-nav { margin-bottom: 14px; }
  .task-card { padding: 14px; }
  .task-meta { grid-template-columns: 1fr; }
  .admin-overview { gap: 14px; padding: 18px; border-radius: 14px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stats > div:nth-child(3) { border-left: 0; border-top: 1px solid #ecebf2; }
  .admin-stats > div:nth-child(4) { border-top: 1px solid #ecebf2; }
  .admin-workspace { padding: 14px; border-radius: 14px; }
  .workspace-heading { align-items: flex-start; }
  .workspace-actions { flex-direction: column; align-items: stretch; }
  .brand-switcher select { min-width: 145px; }
  .create-brand { grid-template-columns: 1fr; }
  .create-brand .button { width: 100%; }
  .program-heading { align-items: flex-start; flex-direction: column; padding: 14px; }
  .program-actions { width: 100%; }
  .program-actions .button { flex: 1; }
  .event-admin { margin: 0 9px 11px; padding: 11px; }
  .program-edition { padding: 10px; }
  .edition-summary { align-items: flex-start; }
  .edition-summary-meta { display: none; }
  .edition-admin-heading { flex-direction: column; gap: 5px; }
  .edition-settings { padding: 11px; }
  .edition-settings-copy { align-items: flex-start; }
  .edition-settings-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .edition-settings-copy { grid-column: 1 / -1; }
  .edition-settings-grid label:first-of-type { grid-column: 1 / -1; }
  .edition-settings-grid label:nth-of-type(2) { grid-column: 1; }
  .edition-settings-grid .finished-toggle { grid-column: 2; }
  .edition-settings-grid .button { grid-column: 1 / -1; width: 100%; }
  .record-editor { grid-template-columns: 1fr 1fr; }
  .creator-form, .creator-list { grid-template-columns: 1fr; }
  .creator-form .button { grid-column: auto; }
  .creator-edit .creator-editor { grid-template-columns: 1fr; }
  .creator-editor .button { grid-column: 1; grid-row: auto; }
  .record-editor label:nth-child(3) { grid-column: 1; }
  .record-editor .button { grid-column: 2; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form .button { width: 100%; }
  .video-admin-top { grid-template-columns: 54px minmax(0, 1fr); gap: 9px; }
  .admin-cover { width: 54px; height: 72px; }
  .heat-tag { grid-column: 2; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; padding: 6px 8px; text-align: left; }
  .heat-tag strong { font-size: 17px; }
  .metric-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-tools { align-items: stretch; }
  .item-tools .edit-drawer { flex-basis: 100%; }
  .item-tools > .button { width: 100%; margin-left: 0; }
  .login-wrap { margin-top: 6vh; }
  .toast { right: 16px; bottom: 16px; left: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
