@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;520;650;760;820&family=Sora:wght@500;650;750;800&display=swap");

:root {
    color-scheme: dark;
    --bg: #050505;
    --ink: #090907;
    --surface: #0f0e0b;
    --surface-2: #16140f;
    --surface-3: #201c14;
    --line: #2b2923;
    --line-strong: #474139;
    --text: #fbfbf7;
    --muted: #b2aea3;
    --muted-2: #7d786d;
    --green: #30e59b;
    --green-ink: #04130d;
    --green-soft: rgba(48, 229, 155, 0.13);
    --orange: #ff9f2f;
    --orange-ink: #180d00;
    --orange-soft: rgba(255, 159, 47, 0.16);
    --danger: #ff7066;
    --danger-soft: #2a1110;
    --radius: 8px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --shadow-tight: 0 18px 48px rgba(0, 0, 0, 0.34);
    --font-body: Manrope, Avenir, "Segoe UI Variable", "Segoe UI", sans-serif;
    --font-display: Sora, Manrope, Avenir, "Segoe UI Variable", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    letter-spacing: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg);
    background-size: auto, 56px 56px, 56px 56px, auto;
    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%, rgba(0, 0, 0, 0.36)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
    opacity: 0.54;
}

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

button,
input,
select {
    font: inherit;
}

button,
a,
label {
    touch-action: manipulation;
}

button {
    border: 0;
}

.site-shell {
    min-height: 100vh;
}

.topbar {
    position: fixed;
    top: 16px;
    left: 50%;
    width: min(1220px, calc(100% - 32px));
    transform: translateX(-50%);
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(5, 5, 5, 0.74);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(22px);
}

.topbar-inner {
    width: 100%;
    min-height: 64px;
    margin: 0 auto;
    padding: 0 12px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand::before {
    content: "";
    width: 30px;
    height: 30px;
    border: 1px solid rgba(48, 229, 155, 0.7);
    border-radius: 50%;
    background: #080807;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.03);
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link,
.button,
.icon-button {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 999px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-link:hover,
.button:hover,
.icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.075);
}

.nav-link.active,
.button.primary {
    border-color: rgba(48, 229, 155, 0.72);
    background: rgba(255, 255, 255, 0.055);
    color: var(--green);
    font-weight: 800;
}

.button.primary:hover {
    background: rgba(255, 255, 255, 0.085);
}

.button.accent {
    border-color: rgba(255, 159, 47, 0.75);
    background: rgba(255, 255, 255, 0.055);
    color: var(--orange);
    font-weight: 800;
}

.button.danger {
    border-color: rgba(255, 112, 102, 0.4);
    background: var(--danger-soft);
    color: #ffd8d4;
}

.button.ghost {
    background: rgba(255, 255, 255, 0.025);
}

.button:disabled,
.icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.page {
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
    padding: 118px 0 58px;
    animation: rise-in 420ms ease both;
}

.app-grid {
    display: grid;
    grid-template-columns: minmax(0, 390px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.files-dashboard {
    grid-template-columns: minmax(310px, 0.8fr) minmax(0, 1.45fr);
    gap: 22px;
}

.files-dashboard .panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
        rgba(15, 14, 11, 0.92);
    box-shadow: var(--shadow-tight);
}

.files-dashboard #upload-panel {
    position: sticky;
    top: 104px;
}

.files-dashboard .panel-header {
    min-height: 86px;
    align-items: center;
    background: rgba(255, 255, 255, 0.025);
}

.files-dashboard .panel-header h2,
.admin-layout > section:first-child h1 {
    letter-spacing: -0.055em;
}

.files-dashboard .file-list {
    gap: 12px;
}

.files-dashboard .file-row {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.045), transparent 42%),
        rgba(7, 7, 5, 0.7);
}

.files-dashboard .file-row:hover {
    border-color: rgba(48, 229, 155, 0.45);
}

.account-page {
    display: grid;
    gap: 18px;
}

.account-hero {
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: end;
    gap: 24px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.105), transparent 29%),
        rgba(12, 11, 9, 0.84);
    box-shadow: var(--shadow-tight);
    padding: 30px;
    overflow: hidden;
}

.account-identity {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    min-width: 0;
}

.account-identity h1 {
    margin-top: 10px;
    font-size: 54px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.avatar-frame {
    width: 136px;
    aspect-ratio: 1;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.018)),
        #080806;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.025), 0 18px 44px rgba(0, 0, 0, 0.36);
    overflow: hidden;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.avatar-frame span {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    color: var(--green);
}

.avatar-frame.small {
    width: 72px;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.025);
}

.avatar-frame.small span {
    font-size: 24px;
}

.account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.action-card {
    min-height: 98px;
    display: grid;
    align-content: space-between;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014)),
        rgba(7, 7, 5, 0.78);
    color: var(--text);
    cursor: pointer;
    padding: 14px;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(48, 229, 155, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
        rgba(7, 7, 5, 0.86);
}

.action-card span {
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.action-card strong {
    font-family: var(--font-display);
    font-size: 22px;
}

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

.favorites-showcase .panel-body {
    padding-top: 0;
}

.favorite-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.favorite-card {
    position: relative;
    min-height: 268px;
    display: grid;
    align-content: end;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012)),
        #090907;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.favorite-card:hover,
.favorite-card.drop-target {
    transform: translateY(-3px);
    border-color: rgba(48, 229, 155, 0.48);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.favorite-card.dragging {
    opacity: 0.58;
}

.favorite-card > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.02) 26%, rgba(0, 0, 0, 0.78)),
        linear-gradient(90deg, rgba(0, 0, 0, 0.56), transparent 48%);
}

.favorite-card.empty {
    border-style: dashed;
    color: var(--muted);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 12px),
        #090907;
}

.favorite-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.favorite-card-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 7px;
    padding: 16px;
}

.favorite-rank {
    color: var(--orange);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.favorite-tools {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.favorite-tool,
.favorite-imdb {
    min-width: 34px;
    min-height: 34px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(5, 5, 5, 0.74);
    backdrop-filter: blur(14px);
}

.favorite-imdb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.075);
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
    gap: 18px;
    align-items: start;
}

.account-column {
    display: grid;
    gap: 18px;
}

.avatar-picker {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 56%),
        rgba(8, 8, 6, 0.7);
    padding: 12px;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.avatar-picker:hover {
    border-color: rgba(48, 229, 155, 0.42);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.075), transparent 56%),
        rgba(8, 8, 6, 0.8);
}

.avatar-picker strong {
    display: block;
    margin-bottom: 4px;
}

.favorite-search-panel {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background: rgba(8, 8, 6, 0.62);
    padding: 14px;
}

.favorite-search-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.media-results {
    display: grid;
    gap: 10px;
}

.media-result {
    width: 100%;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.048), transparent 54%),
        rgba(8, 8, 6, 0.72);
    color: var(--text);
    padding: 12px;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.media-result:hover {
    border-color: rgba(48, 229, 155, 0.42);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.068), transparent 54%),
        rgba(8, 8, 6, 0.82);
}

.media-result-poster {
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--radius) - 2px);
    background: #080806;
    overflow: hidden;
}

.media-result-poster img,
.poster-choice img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.media-result-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 6px;
}

.media-result-copy strong {
    font-family: var(--font-display);
    font-size: 18px;
}

.media-result-copy .muted {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.media-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.66);
    padding: 18px;
}

.media-modal-card {
    width: min(860px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: auto;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.poster-choice {
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background: #080806;
    overflow: hidden;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease;
}

.poster-choice:hover {
    transform: translateY(-2px);
    border-color: rgba(48, 229, 155, 0.48);
}

.drop-zone.compact {
    min-height: 162px;
}

.panel,
.file-row,
.stat,
.empty-state,
.viewer,
.auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014)),
        var(--surface);
    box-shadow: var(--shadow);
}

.panel {
    overflow: hidden;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.panel-body {
    padding: 20px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.kicker::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--orange);
}

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

h1,
h2,
.page-title,
.auth-title,
.share-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.04em;
}

h1 {
    max-width: 880px;
    font-size: 72px;
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    font-size: 25px;
    line-height: 1.14;
}

h3 {
    font-size: 16px;
    line-height: 1.3;
    font-weight: 760;
}

.page-title {
    margin-top: 9px;
    font-size: 48px;
    line-height: 1.02;
}

.auth-title {
    margin-top: 8px;
    font-size: 34px;
}

.share-title {
    margin-top: 8px;
    font-size: 42px;
}

.share-meta,
.error-copy {
    margin-top: 10px;
}

.lede {
    max-width: 720px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.58;
}

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

.tiny {
    color: var(--muted-2);
    font-size: 12px;
}

.hero {
    display: grid;
    gap: 28px;
    padding: 66px 0 42px;
    border-bottom: 1px solid var(--line);
}

.hero-studio {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: end;
}

.hero-copy {
    display: grid;
    gap: 28px;
}

.hero h1,
.hero .lede,
.hero-board,
.quote-hero,
.panel {
    animation: rise-in 520ms ease both;
}

.hero-actions,
.row-actions,
.form-row,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-board {
    display: grid;
    gap: 10px;
    border-left: 2px solid var(--orange);
    padding-left: 18px;
}

.board-line {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    padding: 0 0 13px;
}

.board-line span {
    color: var(--muted-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.board-line strong {
    font-family: var(--font-display);
    font-size: 22px;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.home-feature {
    min-height: 188px;
    display: grid;
    align-content: space-between;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014)),
        rgba(12, 11, 9, 0.84);
    box-shadow: var(--shadow-tight);
    padding: 18px;
}

.home-feature strong {
    display: block;
    font-family: var(--font-display);
    font-size: 25px;
    letter-spacing: -0.04em;
}

.home-feature p {
    line-height: 1.48;
}

.stat {
    box-shadow: none;
    padding: 16px;
    transition: transform 160ms ease, border-color 160ms ease;
}

.stat:hover {
    transform: translateY(-2px);
    border-color: rgba(48, 229, 155, 0.44);
}

.stat-value {
    display: block;
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.form-stack {
    display: grid;
    gap: 14px;
}

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

.compact-field {
    margin-bottom: 14px;
}

.field span,
.label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #080806;
    color: var(--text);
    padding: 0 12px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus {
    border-color: var(--green);
    background: #0b0b08;
    box-shadow: 0 0 0 3px rgba(48, 229, 155, 0.1);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    color: var(--muted);
}

.checkbox-line input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--green);
}

.drop-zone {
    position: relative;
    min-height: 228px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        #080806;
    cursor: pointer;
    padding: 24px;
    overflow: hidden;
}

.drop-zone::after {
    content: "";
    position: absolute;
    inset: auto 18px 18px 18px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-110%);
    transition: transform 360ms ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--green);
}

.drop-zone:hover::after,
.drop-zone.dragover::after {
    transform: translateX(0);
}

.drop-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.drop-meta {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.progress {
    width: 100%;
    height: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #070706;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.52));
    transition: width 180ms ease;
}

.hidden {
    display: none !important;
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-row {
    box-shadow: none;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    animation: rise-in 260ms ease both;
    transition: transform 160ms ease, border-color 160ms ease;
}

.file-row:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 47, 0.42);
}

.file-name {
    overflow-wrap: anywhere;
    font-weight: 800;
}

.meta-line,
.pill-row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.pill {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    background: #080806;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pill.good {
    border-color: rgba(48, 229, 155, 0.38);
    color: #b4ffde;
}

.pill.warn {
    border-color: rgba(255, 159, 47, 0.42);
    color: #ffd09b;
}

.empty-state {
    box-shadow: none;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 50;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-3);
    color: var(--text);
    box-shadow: var(--shadow);
    padding: 12px 14px;
    font-size: 14px;
    animation: toast-in 180ms ease both;
}

.auth-wrap {
    min-height: calc(100vh - 74px);
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.auth-card {
    width: min(420px, calc(100vw - 32px));
    overflow: hidden;
}

.viewer {
    overflow: hidden;
}

.viewer video,
.viewer img {
    width: 100%;
    display: block;
    background: #000;
}

.viewer video {
    aspect-ratio: 16 / 9;
}

.viewer img {
    max-height: 78vh;
    object-fit: contain;
}

.viewer iframe {
    width: 100%;
    height: 78vh;
    border: 0;
    background: white;
}

.viewer pre {
    max-height: 78vh;
    overflow: auto;
    margin: 0;
    padding: 20px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text);
}

.share-heading {
    padding-left: 0;
    padding-right: 0;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
}

.admin-layout {
    display: grid;
    gap: 20px;
}

.admin-layout > section:first-child {
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(15, 14, 11, 0.76);
    box-shadow: var(--shadow-tight);
    padding: 24px;
}

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

.admin-grid .stat {
    min-height: 104px;
    display: grid;
    align-content: space-between;
    border-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014)),
        rgba(11, 10, 8, 0.82);
}

.table-list {
    display: grid;
    gap: 10px;
}

.user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(9, 9, 7, 0.72);
}

.activity-row {
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.quotes-page {
    display: grid;
    gap: 24px;
}

.quote-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    min-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.014)),
        rgba(12, 11, 9, 0.76);
    box-shadow: var(--shadow-tight);
    padding: 34px;
}

.quote-counts {
    min-width: 250px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quote-counts div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 14, 11, 0.76);
    padding: 14px;
}

.quote-counts strong {
    display: block;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 32px;
}

.quote-layout {
    display: grid;
    grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.quote-library {
    position: sticky;
    top: 90px;
}

.collection-list {
    display: grid;
    gap: 12px;
    max-height: calc(100vh - 292px);
    overflow: auto;
    padding-right: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.collection-list::-webkit-scrollbar {
    display: none;
}

.collection-card {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 142px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
    align-items: stretch;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0a0907;
    color: var(--text);
    padding: 12px;
    overflow: hidden;
    cursor: pointer;
    animation: rise-in 260ms ease both;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.collection-card::before,
.collection-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.collection-card::before {
    background: var(--collection-backdrop, linear-gradient(90deg, rgba(255, 255, 255, 0.045), transparent 38%));
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    transform: scale(1.018);
    transition: opacity 180ms ease, transform 220ms ease;
}

.collection-card::after {
    background: linear-gradient(90deg, rgba(8, 8, 6, 0.96), rgba(8, 8, 6, 0.68));
    transition: opacity 180ms ease;
}

.collection-card:hover,
.collection-card.active {
    border-color: rgba(48, 229, 155, 0.56);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.collection-card:hover::before,
.collection-card.active::before {
    opacity: 0.68;
    transform: scale(1.045);
}

.collection-card:hover::after,
.collection-card.active::after {
    opacity: 0.92;
}

.collection-poster {
    position: relative;
    z-index: 1;
    min-height: 118px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--radius) - 2px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015)),
        #080806;
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease;
}

.collection-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.collection-details {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    align-content: end;
    gap: 8px;
}

.collection-card strong {
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1.1;
}

.collection-meta,
.collection-card small {
    color: var(--muted);
    font-size: 13px;
}

.collection-card small {
    color: var(--muted-2);
}

.quote-workbench {
    display: grid;
    gap: 18px;
}

.selected-banner {
    position: relative;
    min-height: 246px;
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: end;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(7, 7, 5, 0.92), rgba(7, 7, 5, 0.55)),
        var(--selected-backdrop, linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012))),
        #080806;
    background-size: cover;
    background-position: center;
}

.selected-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.28));
}

.selected-banner img {
    position: relative;
    z-index: 1;
    width: 126px;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.selected-banner-copy {
    position: relative;
    z-index: 1;
    max-width: 680px;
    display: grid;
    gap: 9px;
}

.selected-banner-copy strong {
    font-family: var(--font-display);
    font-size: 35px;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.selected-banner-copy p {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.quote-workbench-head {
    align-items: flex-start;
}

.quote-workbench-head > div {
    min-width: 0;
}

.quote-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
}

.quote-fact {
    min-height: 42px;
    min-width: 86px;
    display: inline-grid;
    align-content: center;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014)),
        rgba(8, 8, 6, 0.72);
    padding: 8px 11px;
}

.quote-fact.primary {
    border-color: rgba(48, 229, 155, 0.34);
    background:
        linear-gradient(180deg, rgba(48, 229, 155, 0.105), rgba(255, 255, 255, 0.014)),
        rgba(8, 8, 6, 0.78);
}

.quote-fact span {
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    line-height: 1;
    text-transform: uppercase;
}

.quote-fact strong {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.quote-search-form {
    display: grid;
    grid-template-columns: minmax(132px, 170px) minmax(190px, 270px) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.quote-field {
    grid-column: 1 / 4;
    grid-row: 2;
}

.quote-field input {
    min-height: 50px;
    font-size: 18px;
}

.quote-search-form .button {
    grid-column: 4;
    grid-row: 2;
    min-height: 50px;
}

.quote-results {
    display: grid;
    gap: 12px;
}

.pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.pagination-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.quote-result {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 48%),
        #0a0907;
    padding: 16px;
    animation: rise-in 280ms ease both;
    transition: transform 160ms ease, border-color 160ms ease;
}

.quote-result:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 47, 0.5);
}

.quote-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.quote-result-meta span {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.quote-result-meta strong {
    color: var(--muted);
    font-size: 13px;
}

.quote-line {
    font-family: var(--font-display);
    font-size: 25px;
    line-height: 1.24;
}

.quote-context-preview {
    display: grid;
    gap: 6px;
    color: var(--muted-2);
    font-size: 14px;
    line-height: 1.4;
}

.quote-context-preview span {
    overflow-wrap: anywhere;
}

.transcript-heading {
    align-items: center;
}

.transcript-panel {
    position: relative;
}

.return-to-quote {
    width: max-content;
}

.context-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.transcript-list {
    max-height: 72vh;
    overflow: auto;
    padding: 12px;
    scroll-behavior: smooth;
}

.transcript-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    border-left: 2px solid transparent;
    border-radius: var(--radius);
    padding: 12px;
    color: var(--muted);
}

.transcript-row + .transcript-row {
    border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.transcript-row.active {
    border-left-color: var(--green);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
}

.transcript-time {
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
}

.transcript-row p {
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.quote-start {
    min-height: 220px;
    display: grid;
    place-items: center;
}

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

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, 8px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 980px) {
    .account-hero,
    .account-grid,
    .files-dashboard,
    .hero-studio,
    .quote-hero,
    .quote-layout,
    .quote-search-form {
        grid-template-columns: 1fr;
    }

    .quote-library {
        position: static;
    }

    .files-dashboard #upload-panel {
        position: static;
    }

    .favorite-preview,
    .account-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quote-field,
    .quote-search-form .button {
        grid-column: auto;
        grid-row: auto;
    }

    .collection-list {
        max-height: none;
    }

    .collection-card {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .selected-banner {
        grid-template-columns: 96px minmax(0, 1fr);
        min-height: 210px;
    }

    .selected-banner img {
        width: 96px;
    }
}

@media (max-width: 860px) {
    .topbar {
        top: 10px;
        width: calc(100% - 20px);
        border-radius: 20px;
    }

    .topbar-inner {
        min-height: auto;
        padding: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .page {
        padding-top: 162px;
    }

    .nav {
        width: 100%;
    }

    .nav-link,
    .nav .button {
        flex: 1 1 auto;
    }

    h1 {
        font-size: 46px;
    }

    .account-identity h1 {
        font-size: 38px;
    }

    .page-title,
    .share-title {
        font-size: 34px;
    }

    .app-grid,
    .status-strip,
    .home-feature-grid,
    .account-actions,
    .admin-grid,
    .quote-counts {
        grid-template-columns: 1fr;
    }

    .account-hero {
        min-height: auto;
    }

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

    .avatar-frame {
        width: 112px;
    }

    .file-row,
    .user-row {
        grid-template-columns: 1fr;
    }

    .row-actions {
        width: 100%;
    }

    .row-actions .button {
        flex: 1 1 150px;
    }

    .transcript-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .page {
        width: min(100% - 24px, 1220px);
    }

    .topbar-inner {
        width: 100%;
    }

    .nav-link,
    .button,
    .icon-button {
        padding: 0 12px;
    }

    .panel-header,
    .panel-body {
        padding: 16px;
    }

    .quote-line {
        font-size: 21px;
    }

    .selected-banner {
        grid-template-columns: 1fr;
    }

    .selected-banner img {
        width: 92px;
    }

    .favorite-preview,
    .account-stats,
    .favorite-search-head,
    .media-result {
        grid-template-columns: 1fr;
    }

    .favorite-card {
        min-height: 238px;
    }

    .media-result-poster {
        width: 92px;
    }
}
