/* AniVault - shared stylesheet
   dark theme · red accent (#ff2d20) · AnimeKai-inspired layout · no AI tropes */

:root {
    --bg:        #08080a;
    --bg-1:      #0e0e12;
    --bg-2:      #14141a;
    --card:      #111116;
    --card-hi:   #181821;
    --line:      #1d1d24;
    --line-hi:   #2a2a34;
    --ink:       #ffffff;
    --ink-2:     #c8c8d0;
    --ink-3:     #76767f;
    --ink-4:     #3b3b44;
    --red:       #ff2d20;
    --red-2:     #ff5f55;
    --red-dim:   rgba(255, 45, 32, 0.12);
    --green:     #5cdc7b;
    --yellow:    #ffc940;
    --shadow:    0 18px 40px -12px rgba(0, 0, 0, 0.55);
    --disp:      "Archivo Black", "Inter", "Arial Black", sans-serif;
    --body:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono:      ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font: 15px/1.5 var(--body);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, button, textarea, select { font-family: inherit; }
::selection { background: var(--red); color: var(--ink); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 36px); }

/* ============ TOP NAV ============ */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(8, 8, 10, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    display: flex; align-items: center; gap: 28px;
    padding: 16px 0;
}
.brand {
    display: inline-flex; align-items: baseline; gap: 4px;
    font: 400 22px/0.9 var(--disp);
    color: var(--ink);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.brand .bang {
    display: inline-block;
    background: var(--red);
    color: #000;
    padding: 0 7px 2px;
    margin-left: 3px;
    transform: rotate(-3deg) translateY(-2px);
    font: 400 17px/1 var(--disp);
    transition: transform 180ms ease;
}
.brand:hover .bang { transform: rotate(-6deg) translateY(-3px) scale(1.08); }

.nav-search {
    flex: 1; position: relative;
    max-width: 480px;
}
.nav-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    border-radius: 8px;
    color: var(--ink);
    font: 500 14px/1 var(--body);
    transition: border-color 150ms;
}
.nav-search input:focus { outline: none; border-color: var(--red); }
.nav-search::before {
    content: "⌕";
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--ink-3); font-size: 16px; pointer-events: none;
}
.nav-search .suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--card);
    border: 1px solid var(--line-hi);
    border-radius: 8px;
    max-height: 380px; overflow-y: auto;
    z-index: 5;
    display: none;
    box-shadow: var(--shadow);
}
.nav-search .suggest.on { display: block; }
.nav-search .suggest a {
    display: flex; gap: 12px; padding: 10px 12px; align-items: center;
    border-bottom: 1px solid var(--line);
    transition: background 100ms;
}
.nav-search .suggest a:hover { background: var(--card-hi); }
.nav-search .suggest a:last-child { border-bottom: none; }
.nav-search .suggest img { width: 36px; height: 50px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.nav-search .suggest .ti { font: 600 13px/1.3 var(--body); color: var(--ink); }
.nav-search .suggest .sub { font: 500 11px/1 var(--body); color: var(--ink-3); margin-top: 4px; }

.nav-links {
    display: flex; gap: 18px;
    font: 600 13px/1 var(--body);
    color: var(--ink-3);
    text-transform: lowercase;
    letter-spacing: 0.04em;
}
.nav-links a {
    transition: color 120ms;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--red); }

.nav-user {
    margin-left: auto;
    display: flex; align-items: center; gap: 12px;
}
.nav-user a.signin {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: var(--red);
    color: var(--ink);
    border-radius: 8px;
    font: 700 13px/1 var(--body);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background 150ms;
}
.nav-user a.signin:hover { background: var(--red-2); }
.nav-user .avatar-btn {
    width: 38px; height: 38px;
    background: var(--card-hi); border: 1px solid var(--line-hi);
    border-radius: 50%;
    cursor: pointer; overflow: hidden;
    display: grid; place-items: center;
    font: 700 14px/1 var(--body); color: var(--ink);
    transition: border-color 150ms;
}
.nav-user .avatar-btn:hover { border-color: var(--red); }
.nav-user .avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.nav-user .menu {
    position: absolute; right: clamp(16px, 4vw, 36px); top: 70px;
    background: var(--card);
    border: 1px solid var(--line-hi);
    border-radius: 10px;
    min-width: 220px;
    padding: 8px;
    display: none;
    z-index: 60;
    box-shadow: var(--shadow);
}
.nav-user .menu.on { display: block; }
.nav-user .menu .hdr {
    padding: 12px 14px 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}
.nav-user .menu .hdr .name { font: 700 14px/1 var(--body); color: var(--ink); margin-bottom: 6px; }
.nav-user .menu .hdr .email { font: 500 12px/1 var(--body); color: var(--ink-3); }
.nav-user .menu a, .nav-user .menu button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: none; border: none; color: var(--ink-2);
    font: 500 13px/1 var(--body); text-align: left; width: 100%;
    border-radius: 6px; cursor: pointer;
    transition: background 100ms, color 100ms;
}
.nav-user .menu a:hover, .nav-user .menu button:hover { background: var(--card-hi); color: var(--ink); }
.nav-user .menu .sep { height: 1px; background: var(--line); margin: 6px 0; }

@media (max-width: 920px) {
    .nav-links { display: none; }
    .nav-search { max-width: none; }
}

/* ============ HERO ============ */
.hero {
    position: relative;
    padding: 56px 0 56px;
    overflow: hidden;
}
.hero-mosaic {
    position: absolute; inset: 0;
    background: var(--bg-1);
    overflow: hidden;
    z-index: 0;
}
.hero-mosaic .strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, 160px);
    gap: 4px;
    height: 100%;
    opacity: 0.22;
    filter: saturate(1.3);
    transform: translateY(-4%);
}
.hero-mosaic .strip img {
    width: 100%; height: 100%; object-fit: cover;
}
.hero-mosaic::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(8,8,10,0.2) 0%, rgba(8,8,10,0.8) 70%, var(--bg) 100%),
        radial-gradient(60% 60% at 50% 50%, transparent 0%, var(--bg) 100%);
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 720px; margin: 0 auto;
    text-align: center;
}
.hero h1 {
    font: 400 clamp(36px, 6vw, 68px)/1.0 var(--disp);
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 18px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.hero h1 .red { color: var(--red); }
.hero p {
    font: 400 16px/1.5 var(--body);
    color: var(--ink-2);
    margin-bottom: 32px;
}
.hero-search {
    position: relative;
    max-width: 580px; margin: 0 auto;
}
.hero-search input {
    width: 100%;
    padding: 18px 22px 18px 54px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    border-radius: 12px;
    color: var(--ink);
    font: 500 16px/1 var(--body);
    transition: border-color 150ms, transform 150ms;
}
.hero-search input:focus {
    outline: none; border-color: var(--red);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(255, 45, 32, 0.16);
}
.hero-search::before {
    content: "⌕";
    position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
    color: var(--ink-3); font-size: 20px; pointer-events: none;
}

/* ============ SECTION HEADER ============ */
.sec {
    padding: 36px 0 24px;
}
.sec-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 22px;
}
.sec-head h2 {
    font: 400 24px/1 var(--disp);
    letter-spacing: -0.015em;
    color: var(--ink);
    text-transform: uppercase;
}
.sec-head h2 .red { color: var(--red); }
.sec-head .more {
    font: 600 12px/1 var(--body);
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 150ms;
}
.sec-head .more:hover { color: var(--red); }

/* ============ ANIME CARD GRID ============ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px 14px;
}
.card-anime {
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 200ms ease, box-shadow 200ms ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.card-anime:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.6);
    border-color: var(--line-hi);
}
.card-anime .poster {
    aspect-ratio: 7 / 10;
    width: 100%;
    background: var(--bg-2);
    overflow: hidden;
    position: relative;
}
.card-anime .poster img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 400ms ease;
}
.card-anime:hover .poster img { transform: scale(1.04); }
.card-anime .poster .badges {
    position: absolute; top: 8px; left: 8px;
    display: flex; gap: 4px; flex-wrap: wrap;
}
.card-anime .badge {
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid var(--line-hi);
    color: var(--ink);
    padding: 3px 7px;
    border-radius: 4px;
    font: 700 10px/1 var(--body);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.card-anime .badge.sub { background: rgba(92, 220, 123, 0.16); border-color: rgba(92, 220, 123, 0.5); color: var(--green); }
.card-anime .badge.dub { background: rgba(255, 45, 32, 0.16); border-color: rgba(255, 45, 32, 0.5); color: var(--red-2); }
.card-anime .info {
    padding: 10px 12px 14px;
}
.card-anime .ti {
    font: 600 13.5px/1.35 var(--body);
    color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.card-anime:hover .ti { color: var(--red-2); }
.card-anime .meta {
    font: 500 11.5px/1 var(--body);
    color: var(--ink-3);
    display: flex; gap: 8px; align-items: center;
}
.card-anime .meta .dot { color: var(--ink-4); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    font: 700 13px/1 var(--body);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 150ms;
    border: none; cursor: pointer;
}
.btn-primary {
    background: var(--red);
    color: var(--ink);
}
.btn-primary:hover { background: var(--red-2); }
.btn-secondary {
    background: var(--card-hi);
    color: var(--ink);
    border: 1px solid var(--line-hi);
}
.btn-secondary:hover { border-color: var(--red); color: var(--red-2); }
.btn-ghost {
    background: transparent;
    color: var(--ink-2);
    border: 1px solid var(--line-hi);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ FORMS ============ */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font: 600 12px/1 var(--body);
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    border-radius: 8px;
    color: var(--ink);
    font: 500 14px/1.4 var(--body);
    transition: border-color 150ms;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--red);
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint {
    font: 500 12px/1.4 var(--body);
    color: var(--ink-3);
    margin-top: 6px;
}
.field .err {
    font: 600 12px/1.4 var(--body);
    color: var(--red-2);
    margin-top: 6px;
}

/* ============ AUTH PAGE ============ */
.auth-shell {
    min-height: calc(100vh - 70px);
    display: grid; place-items: center;
    padding: 48px 16px;
}
.auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 36px 32px 32px;
    width: 100%; max-width: 440px;
    box-shadow: var(--shadow);
}
.auth-card h1 {
    font: 400 28px/1 var(--disp);
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}
.auth-card .sub {
    font: 500 14px/1.5 var(--body);
    color: var(--ink-3);
    margin-bottom: 28px;
}
.auth-tabs {
    display: flex; gap: 4px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tabs button {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--ink-3);
    font: 700 13px/1 var(--body);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    transition: all 150ms;
}
.auth-tabs button.on {
    background: var(--card-hi);
    color: var(--ink);
}
.auth-foot {
    margin-top: 16px;
    font: 500 12px/1.5 var(--body);
    color: var(--ink-3);
    text-align: center;
}
.auth-foot a { color: var(--red-2); }

/* ============ SERIES DETAIL ============ */
.series-hero {
    position: relative;
    padding: 40px 0 36px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
}
.series-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: flex-start;
}
.series-poster {
    aspect-ratio: 7 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-2);
    box-shadow: var(--shadow);
}
.series-poster img { width: 100%; height: 100%; object-fit: cover; }
.series-info h1 {
    font: 400 clamp(24px, 4vw, 36px)/1.05 var(--disp);
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 16px;
}
.series-meta {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 18px;
    font: 600 12px/1 var(--body);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.series-meta span {
    padding: 5px 10px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    color: var(--ink-2);
    border-radius: 4px;
}
.series-meta .rating {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red-2);
}
.series-desc {
    font: 400 15px/1.65 var(--body);
    color: var(--ink-2);
    margin-bottom: 24px;
    max-width: 720px;
}
.series-actions {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px;
}
.rating-widget {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    border-radius: 10px;
    max-width: 480px;
}
.rating-widget .stars {
    display: flex; gap: 4px;
    font-size: 24px;
    cursor: pointer;
    user-select: none;
}
.rating-widget .star {
    color: var(--ink-4);
    transition: color 100ms, transform 100ms;
}
.rating-widget .star:hover { transform: scale(1.15); }
.rating-widget .star.filled { color: var(--yellow); }
.rating-widget .star.hover { color: var(--red-2); }
.rating-widget .agg {
    font: 600 13px/1.3 var(--body);
    color: var(--ink-2);
}
.rating-widget .agg b { color: var(--ink); font: 700 16px/1 var(--body); }

@media (max-width: 720px) {
    .series-grid { grid-template-columns: 1fr; }
    .series-poster { max-width: 220px; margin: 0 auto; }
}

/* ============ EPISODES LIST (on series page) ============ */
.eps-section {
    padding: 36px 0 64px;
}
.eps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.eps-list .ep {
    aspect-ratio: 16 / 11;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-2);
    font: 700 16px/1 var(--body);
    display: grid; place-items: center;
    cursor: pointer;
    transition: all 120ms;
    position: relative;
}
.eps-list .ep:hover {
    border-color: var(--red);
    color: var(--ink);
    background: var(--card-hi);
}
.eps-list .ep.watched { color: var(--ink-3); }
.eps-list .ep.watched::after {
    content: "✓";
    position: absolute; top: 4px; right: 6px;
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
}
.eps-list .ep .num { font-size: 15px; }
.eps-list .ep.continuing {
    border-color: var(--red);
    background: var(--red-dim);
    color: var(--red-2);
}
.eps-list .ep.continuing::after {
    content: "▶";
    position: absolute; top: 4px; right: 6px;
    font-size: 10px;
    color: var(--red);
}

/* ============ WATCH PAGE ============ */
.watch-shell {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    padding: 24px 0 64px;
}
.watch-player {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
}
.watch-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.watch-side {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    max-height: 580px;
    overflow-y: auto;
}
.watch-side .head {
    font: 700 13px/1 var(--body);
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.watch-side .ep-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.watch-side .ep-list a {
    padding: 10px 4px;
    text-align: center;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink-2);
    font: 700 13px/1 var(--body);
    transition: all 120ms;
}
.watch-side .ep-list a:hover { border-color: var(--red); color: var(--ink); }
.watch-side .ep-list a.on {
    background: var(--red);
    border-color: var(--red);
    color: var(--ink);
}
.watch-meta {
    padding: 14px 0;
}
.watch-meta h1 {
    font: 700 22px/1.2 var(--body);
    margin-bottom: 6px;
}
.watch-meta .sub-info {
    font: 500 13px/1 var(--body);
    color: var(--ink-3);
    margin-bottom: 12px;
}
.watch-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
    padding: 12px 0 0;
}

@media (max-width: 920px) {
    .watch-shell { grid-template-columns: 1fr; }
    .watch-side { max-height: 320px; }
}

/* ============ PROFILE PAGE ============ */
.profile-shell {
    padding: 36px 0 64px;
}
.profile-header {
    display: flex; align-items: center; gap: 24px;
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.profile-avatar {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 2px solid var(--line-hi);
    overflow: hidden;
    display: grid; place-items: center;
    font: 700 36px/1 var(--disp);
    color: var(--ink-3);
    flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-id {
    flex: 1; min-width: 200px;
}
.profile-id h1 {
    font: 700 24px/1.1 var(--body);
    margin-bottom: 6px;
    word-break: break-word;
}
.profile-id .email { font: 500 13px/1 var(--body); color: var(--ink-3); margin-bottom: 8px; }
.profile-id .bio { font: 500 14px/1.5 var(--body); color: var(--ink-2); margin-top: 8px; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
}
.stat-card .val {
    font: 400 28px/1 var(--disp);
    color: var(--ink);
    margin-bottom: 4px;
}
.stat-card .val .red { color: var(--red); }
.stat-card .lbl {
    font: 600 11px/1 var(--body);
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.profile-tabs {
    display: flex; gap: 4px;
    background: var(--bg-2);
    border: 1px solid var(--line-hi);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.profile-tabs button {
    flex: 1;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--ink-3);
    font: 700 13px/1 var(--body);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    transition: all 150ms;
    white-space: nowrap;
}
.profile-tabs button.on {
    background: var(--card-hi);
    color: var(--ink);
}
.profile-pane { display: none; }
.profile-pane.on { display: block; }

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.history-row {
    display: flex; gap: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    transition: border-color 150ms;
    cursor: pointer;
}
.history-row:hover { border-color: var(--red); }
.history-row .thumb {
    width: 68px; height: 96px;
    flex-shrink: 0;
    background: var(--bg-2);
    border-radius: 4px; overflow: hidden;
}
.history-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-row .info { flex: 1; min-width: 0; }
.history-row .info .ti { font: 600 14px/1.3 var(--body); color: var(--ink); margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.history-row .info .ep { font: 500 12px/1 var(--body); color: var(--ink-3); margin-bottom: 8px; }
.history-row .info .bar {
    height: 3px; background: var(--bg-2); border-radius: 2px; overflow: hidden;
    margin-bottom: 6px;
}
.history-row .info .bar .fill { height: 100%; background: var(--red); border-radius: 2px; }
.history-row .info .when { font: 500 11px/1 var(--body); color: var(--ink-3); }

/* ============ FOOTER ============ */
footer.site {
    border-top: 1px solid var(--line);
    padding: 32px 0;
    margin-top: 80px;
    color: var(--ink-3);
    font: 500 12px/1.4 var(--body);
}
footer.site .row {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
footer.site a { color: var(--ink-2); }
footer.site a:hover { color: var(--red); }
footer.site .sig {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

/* ============ EMPTY / LOADING / TOAST ============ */
.empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--ink-3);
}
.empty h3 {
    font: 700 18px/1.2 var(--body);
    color: var(--ink-2);
    margin-bottom: 6px;
}
.skel {
    background: linear-gradient(90deg, var(--card) 25%, var(--card-hi) 50%, var(--card) 75%);
    background-size: 200% 100%;
    animation: skel 1.2s infinite linear;
    border-radius: 6px;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--card);
    border: 1px solid var(--line-hi);
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
    font: 600 13px/1 var(--body);
    color: var(--ink);
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 200ms;
}
.toast.on { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
