/* ---------- Colours (dark is the default, the ☀ button switches to light) ---------- */
:root {
    --bg: #26272b;
    --header: #2b2c30;
    --card: #1c1d20;
    --border: #34353a;
    --title: #ffffff;
    --text: #a3a7ae;
    --muted: #8a8e96;
    --accent: #7aa7ff;
    --radius: 8px;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f1f2f4;
    --header: #ffffff;
    --card: #ffffff;
    --border: #e2e4e8;
    --title: #15171a;
    --text: #4b5058;
    --muted: #7a7f88;
    --accent: #2b5fd9;
    color-scheme: light;
}


/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--title); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
    background: var(--header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }

.main-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.main-nav a { color: var(--text); }
.main-nav a:hover, .main-nav a.active { color: var(--title); }
.nav-sep { color: var(--title); }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--text);
    cursor: pointer;
}
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active, .nav-dropdown.open .nav-dropdown-toggle { color: var(--title); }
.nav-dropdown .caret { font-size: 10px; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -14px;
    z-index: 20;
    min-width: 170px;
    padding: 8px 0;
    background: var(--header);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
/* Invisible bridge so the menu stays open while the mouse moves down to it */
.nav-dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-dropdown-menu a { display: block; padding: 6px 14px; white-space: nowrap; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu { margin-top: 12px; }

.theme-toggle, .menu-toggle {
    background: none;
    border: 0;
    color: var(--title);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: inline; }
.menu-toggle { display: none; }

/* ---------- Banner ---------- */
.banner-wrap { max-width: 1260px; margin: 0 auto; padding: 30px 20px 0; }

.banner {
    position: relative;
    min-height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background:
        radial-gradient(circle at 85% 20%, rgba(122, 167, 255, .35), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(180, 90, 255, .30), transparent 50%),
        linear-gradient(135deg, #1a1b2e, #111214);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.banner > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Picture only: show the whole image at its natural shape. */
.banner.image-only { min-height: 0; display: block; }
.banner.image-only > img { position: static; height: auto; display: block; }

/* Darken the bottom of a picture so the text stays readable. */
.banner.has-image:not(.image-only)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0) 70%);
}

.banner-text { position: relative; z-index: 1; padding: 28px 32px; }
.banner-text h1 {
    margin: 0;
    color: #fff;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
.banner-text p { margin: 8px 0 0; color: rgba(255, 255, 255, .85); font-size: 16px; }

.layout.after-banner { padding-top: 16px; }
.layout.after-banner .sidebar { margin-top: 0; }

/* ---------- Layout ---------- */
.layout {
    max-width: 1260px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 403px;
    gap: 16px;
    align-items: start;
}

.layout.full-width { grid-template-columns: minmax(0, 1fr); }

/* ---------- Post cards ---------- */
.list-heading { color: var(--title); font-size: 22px; margin: 0 0 16px; }

.card {
    display: flex;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.card:first-of-type { margin-top: 0; }

.card-image {
    flex: 0 0 280px;
    height: 160px;
    background: linear-gradient(135deg, var(--border), var(--bg));
}
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(122, 167, 255, .18), transparent 55%),
        radial-gradient(circle at 15% 85%, rgba(180, 90, 255, .15), transparent 55%);
}

.card-body {
    flex: 1;
    padding: 18px 20px 14px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card-body h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.card-body p { margin: 0; font-size: 14px; }

.date { color: var(--muted); font-size: 12px; }
.date::before { content: "\25F7"; margin-right: 5px; }
.card-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}
.comment-count { color: var(--muted); font-size: 12px; }
.comment-count:hover { color: var(--accent); }
.comment-count::before { content: "\1F5E8\FE0E"; margin-right: 5px; }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 14px;
}
.empty { background: var(--card); padding: 20px; border-radius: var(--radius); }

/* ---------- Single post ---------- */
.single {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}
/* Cover picture: shown whole, on a blurred copy of itself, so small or
   portrait images (like book covers) aren't stretched or cropped. */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background: #000;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -30px;
    background: var(--hero) center / cover;
    filter: blur(24px) brightness(.55);
}
.hero img {
    position: relative;
    display: block;
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
}
.single-body { padding: 28px 32px 32px; }
.single h1 { color: var(--title); font-size: 30px; line-height: 1.25; margin: 0 0 8px; }
.meta { display: flex; gap: 16px; align-items: center; font-size: 13px; margin-bottom: 20px; }
.meta a { color: var(--accent); }

.prose { font-size: 16px; line-height: 1.75; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--title); line-height: 1.3; margin: 1.6em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose img { height: auto; border-radius: 6px; }
.prose blockquote {
    margin: 1.2em 0;
    padding: 4px 18px;
    border-left: 3px solid var(--accent);
    color: var(--title);
}
.prose pre { background: var(--bg); padding: 14px; border-radius: 6px; overflow-x: auto; }
.prose code { font-size: .9em; }
.prose iframe, .video { max-width: 100%; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.2em 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.prose iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }

.tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--bg);
    color: var(--text);
}

/* ---------- Comments ---------- */
.comments {
    background: var(--card);
    border-radius: var(--radius);
    margin-top: 16px;
    padding: 24px 32px 32px;
}
.comments-title { color: var(--title); font-size: 20px; margin: 0 0 8px; }

.thread { border-top: 1px solid var(--border); padding: 18px 0 4px; }
.replies { margin-left: 24px; padding-left: 16px; border-left: 2px solid var(--border); }
.replies .comment { padding-top: 10px; }

.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.comment-head strong { color: var(--title); }
.badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1px 8px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
}
.comment-text { font-size: 15px; overflow-wrap: anywhere; }
.comment-text p { margin: 6px 0; }

.reply-link, .link-button, .cancel-reply {
    background: none;
    border: 0;
    padding: 0;
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.reply-link { margin-bottom: 10px; }

.comments-closed { color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; }

.comment-form { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 12px; }
.comment-form h3 { color: var(--title); margin: 0 0 12px; font-size: 17px; }
.comment-form label { display: block; font-size: 13px; margin: 12px 0 4px; }
.comment-form input[type="text"],
.comment-form input[type="password"],
.comment-form textarea {
    width: 100%;
    background: var(--bg);
    color: var(--title);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}
.comment-form textarea { resize: vertical; min-height: 110px; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); }
.comment-form button[type="submit"], .comment-form button[value="login"], .comment-form button[value="hash"], .admin-actions button {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 9px 18px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.comment-form button[value="login"], .comment-form button[value="hash"] { margin-top: 12px; }
.replying-to { font-size: 14px; margin: 0; }
.notice { padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.notice.ok { background: rgba(60, 180, 110, .15); color: var(--title); }
.notice.error { background: rgba(230, 70, 70, .15); color: var(--title); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Admin dashboard */
.admin-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.admin-nav a { color: var(--text); }
.admin-nav a:hover { color: var(--title); }
.admin-nav form { margin: 0; }
.admin-nav .link-button { font-size: 14px; }
.admin-page .logo .badge { vertical-align: middle; margin-left: 6px; }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.admin-wrap h2 { color: var(--title); font-size: 18px; margin: 28px 0 12px; }
.admin-wrap .panel h2 { margin-top: 0; }
.admin-wrap .notice { margin: 0 0 12px; }
.admin-wrap code { font-size: 13px; }
.admin-title { color: var(--title); font-size: 26px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 24px;
}
.login-panel { max-width: 400px; margin: 60px auto; }
.login-panel h1 { color: var(--title); font-size: 22px; margin: 0 0 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stat-grid.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--text);
}
a.stat-card:hover { border-color: var(--accent); color: var(--text); }
.stat-card.attention { border-color: #e0a526; }
.stat-card.attention .stat-value { color: #e0a526; }
.stat-label { font-size: 13px; }
.stat-value { color: var(--title); font-size: 32px; font-weight: 700; line-height: 1.1; }
.stat-grid.small .stat-value { font-size: 24px; }
.stat-sub { color: var(--muted); font-size: 12px; }
.hash-form { max-width: 400px; border-top: 0; padding-top: 0; }
.hash-output {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    font-size: 13px;
    color: var(--title);
    user-select: all;
}
.admin-comment { border-top: 1px solid var(--border); padding: 14px 0; }
.admin-comment .comment-head span { color: var(--muted); }
.admin-comment .comment-head a { color: var(--accent); }
.admin-actions { display: flex; gap: 8px; margin-top: 6px; }
.admin-actions button { padding: 6px 14px; font-size: 13px; }
.admin-actions .danger { background: transparent; color: #e5484d; border: 1px solid #e5484d; }
.login { max-width: 320px; border-top: 0; }

/* ---------- Gallery ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.album-card {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.album-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--border); }
.album-info { display: block; padding: 12px 16px 14px; }
.album-info strong { display: block; font-size: 16px; line-height: 1.3; }
.album-info small { color: var(--muted); font-size: 13px; }
.album-card:hover strong { color: var(--accent); }

.scene-banner { border-radius: var(--radius); margin-bottom: 16px; }
.scene-banner img { max-height: 300px; }
.album-head { margin-bottom: 16px; }
.album-head .list-heading { margin: 6px 0 0; }
.album-head p { margin: 2px 0 0; font-size: 13px; }
.back-link { color: var(--accent); font-size: 14px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.photo { display: block; border-radius: 6px; overflow: hidden; background: var(--card); }
.photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.photo:hover img { transform: scale(1.04); }
.photo-caption { display: block; padding: 6px 8px; font-size: 13px; line-height: 1.35; color: var(--title); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .92);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); object-fit: contain; }
.lightbox button {
    position: absolute;
    background: none;
    border: 0;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    padding: 12px 18px;
    cursor: pointer;
    opacity: .75;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 34px; left: 60px; right: 60px; text-align: center; color: #fff; font-size: 15px; text-shadow: 0 1px 3px #000; }
.lb-caption:empty { display: none; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: 13px; }
.lightbox-open { overflow: hidden; }

/* ---------- Current games ---------- */
.game { margin-top: 16px; scroll-margin-top: 16px; }
.game-group { margin: 0 0 4px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.game-title { color: var(--title); font-size: 28px; line-height: 1.25; margin: 0 0 8px; }
.game .meta { flex-wrap: wrap; }
.characters-title { color: var(--title); font-size: 20px; margin: 32px 0 16px; padding-top: 24px; border-top: 1px solid var(--border); }
.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.character { background: var(--bg); border-radius: var(--radius); overflow: hidden; }
.character-image {
    position: relative;
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--border), var(--bg));
    color: var(--muted);
    font-size: 56px;
    font-weight: 600;
}
.character-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.character-status {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.character-body { padding: 14px 16px 16px; }
.character-body h4 { color: var(--title); font-size: 18px; margin: 0 0 2px; }
.character-role { margin: 0; font-size: 14px; color: var(--title); }
.character-player { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.character-body .prose { font-size: 14px; line-height: 1.6; margin-top: 10px; }
.character-body .prose p { margin: 0 0 .6em; }
.character-body .prose p:last-child { margin-bottom: 0; }

/* ---------- Geek profiles ---------- */
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.jump-links a { background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 14px; }

.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-letter {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #8a5cf5);
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}
.avatar-big { width: 96px; height: 96px; font-size: 40px; }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.profile-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    padding: 20px;
    color: var(--text);
}
.profile-card:hover { color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.profile-card-head { display: flex; align-items: center; gap: 14px; }
.profile-card-head strong { display: block; color: var(--title); font-size: 18px; }
.profile-card-head small { display: block; color: var(--muted); font-size: 13px; }
.profile-now { display: flex; flex-direction: column; gap: 10px; }
.now-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--title); min-width: 0; }
.now-item small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }
.now-game { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--bg); }
.now-book { width: 32px; height: 48px; object-fit: cover; border-radius: 3px; flex-shrink: 0; margin: 0 30px; }
.profile-card-link { margin-top: auto; color: var(--accent); font-size: 14px; }

.profile-head { display: flex; align-items: center; gap: 20px; margin: 12px 0 16px; }
.profile-head h1 { color: var(--title); font-size: 30px; margin: 0; line-height: 1.2; }
.profile-tagline { margin: 4px 0 0; color: var(--muted); }
.profile-head .jump-links { margin: 12px 0 0; }

.profile-section {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    padding: 20px 24px 24px;
    margin-top: 16px;
    scroll-margin-top: 16px;
}
.section-title { color: var(--title); font-size: 22px; margin: 0 0 16px; }
.profile-section p { margin: 0; }
.profile-section.prose p + p { margin-top: .8em; }

.history-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 32px; }
.history-title { color: var(--title); font-size: 16px; margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.history li:last-child { border-bottom: 0; }
.history li > :last-child { min-width: 0; }
.history a, .history strong { display: block; color: var(--title); font-size: 15px; font-weight: 600; }
.history a:hover { color: var(--accent); }
.history small { display: block; color: var(--muted); font-size: 13px; }
.history-game { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--bg); }
.history-book { width: 48px; height: 72px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }

.book-blank { display: block; background: linear-gradient(135deg, var(--border), var(--bg)); }
.book-feature { display: flex; gap: 24px; align-items: flex-start; }
.book-feature + .book-feature { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.book-cover { width: 150px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.book-info { flex: 1; min-width: 0; }
.book-info h3 { margin: 0; font-size: 24px; line-height: 1.25; }
.book-author { color: var(--title); margin-top: 4px !important; }
.book-facts { color: var(--muted); font-size: 13px; margin-top: 6px !important; }
.book-description { font-size: 14px; line-height: 1.65; margin-top: 12px !important; }
.book-note { font-size: 14px; line-height: 1.6; margin-top: 10px; }
.book-info .book-note { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--title); }
.book-note p + p { margin-top: .6em !important; }
.stars { display: block; color: #f5b83d; font-size: 14px; letter-spacing: 1px; margin-top: 2px; }
.stars-off { color: var(--border); }

.steam-game { display: flex; gap: 24px; align-items: flex-start; }
.steam-art {
    flex: 0 0 320px;
    aspect-ratio: 460 / 215;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--border), var(--bg));
}
.steam-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.steam-info { flex: 1; min-width: 0; }
.steam-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.steam-info h3 { margin: 0 0 14px; font-size: 24px; line-height: 1.25; }
.steam-stats { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0 0 16px; }
.steam-stats dt { font-size: 12px; color: var(--muted); }
.steam-stats dd { margin: 0; font-size: 18px; font-weight: 600; color: var(--title); }
.steam-progress { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.steam-progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.steam-percent { font-size: 13px; color: var(--muted); margin-top: 6px !important; }

.ach-grid {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
}
.ach-grid img, .ach-blank {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    background: var(--bg);
}
.ach-blank { display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.ach-grid .locked { opacity: .4; }
.steam-more summary { cursor: pointer; color: var(--accent); font-size: 14px; margin-top: 14px; }

/* ---------- Roleplay: diary entries, games and the Players page ---------- */
.card-kicker { margin: 0 0 4px !important; font-size: 12px !important; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.card-author { margin-right: auto; font-size: 13px; color: var(--title); }
.card-author small { color: var(--muted); }
.card-image img { object-position: center 30%; }

.single .game-group a { color: var(--muted); }
.single .game-group a:hover { color: var(--accent); }
.byline { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.byline .avatar { width: 48px; height: 48px; font-size: 20px; }
.byline strong { display: block; color: var(--title); font-size: 16px; line-height: 1.3; }
.byline small { display: block; color: var(--muted); font-size: 13px; }
.post-notice { margin: 0 0 16px; }

.game-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.game-links a { background: var(--bg); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.game-links a span { color: var(--muted); margin-left: 4px; }
.game-links .write-button { background: var(--accent); color: #fff; }
.game-links .write-button:hover { color: #fff; opacity: .9; }

.past-heading { margin-top: 32px; }
.past-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.past-game { display: flex; gap: 16px; background: var(--card); border-radius: var(--radius); padding: 16px; }
.past-game img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.past-game h3 { color: var(--title); margin: 0; font-size: 18px; }
.past-game h3 a { color: inherit; text-decoration: none; }
.past-game h3 a:hover { color: var(--accent); }
.past-game p { margin: 2px 0 0; font-size: 13px; }
.past-game .game-links { margin-top: 12px; }
.past-game .game-links a { font-size: 13px; padding: 4px 12px; }

.write-widget { display: block; padding: 16px 20px; background: var(--accent); color: #fff; }
.write-widget:hover { color: #fff; opacity: .92; }
.write-widget strong { display: block; font-size: 16px; }
.write-widget small { display: block; font-size: 13px; opacity: .85; }
.game-icon { background: var(--accent); font-size: 28px; font-weight: 700; }

.write-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.write-head form { margin: 0; }
.write-form { margin-bottom: 16px; }
.write-form label { display: block; font-size: 13px; margin: 14px 0 4px; }
.write-form input[type="text"],
.write-form input[type="date"],
.write-form select,
.write-form textarea {
    width: 100%;
    background: var(--bg);
    color: var(--title);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}
.write-form select:disabled { opacity: .7; }
.write-form textarea { resize: vertical; min-height: 320px; font-size: 16px; line-height: 1.7; }
.write-form input:focus, .write-form select:focus, .write-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.write-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.write-row label { margin-top: 0; }
.write-row > div { margin-top: 14px; }
.write-help { margin-top: 8px; font-size: 13px; }
.write-help summary { cursor: pointer; color: var(--accent); }
.write-help p { margin: 6px 0 0; }
.write-buttons { display: flex; align-items: center; gap: 14px; }
.write-buttons a { color: var(--accent); font-size: 14px; }
.write-form button[value="save"] {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 10px 22px;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}
.write-form .danger { background: transparent; color: #e5484d; border: 1px solid #e5484d; border-radius: 6px; padding: 9px 16px; font: inherit; font-size: 14px; cursor: pointer; }

/* ---------- Characters page ---------- */
.category-links { margin-top: -4px; }
.my-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.my-categories button { background: var(--bg); color: var(--title); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font: inherit; cursor: pointer; }
.my-categories button:hover, .my-categories button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.characters-link { color: var(--accent); font-size: 14px; margin-right: 16px; }
.jump-links a[aria-current] { background: var(--accent); color: #fff; }
.character-edit-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 16px; }
.character-edit { margin: 0; background: var(--card); }
.character-edit .character-body > label:first-of-type { margin-top: 10px; }
.character-edit textarea { min-height: 120px; font-size: 14px; line-height: 1.6; }
.character-edit .notice { margin: 8px 0 0; }
.character-edit .write-buttons { margin-top: 14px; flex-wrap: wrap; }
.character-new { border: 2px dashed var(--border); }
.picture-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.write-form .picture-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}
.picture-button:hover { background: var(--accent); }
.picture-input:focus-visible + .picture-button { outline: 2px solid var(--accent); }

.write-recent li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; }
.write-recent li > a:first-child { flex: 1 1 260px; }
.write-recent small { font-size: 12px; }
.write-recent .edit-link { color: var(--accent); font-size: 13px; }

.write-form [hidden] { display: none !important; }

/* Play by post */
.scene-panel { margin-top: 16px; }
.scene-panel .section-title a { color: var(--title); }
.scene-panel .section-title a:hover { color: var(--accent); }
.scene-list { list-style: none; margin: 0; padding: 0; }
.scene-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.scene-list li:last-child { border-bottom: 0; }
.scene-list li > a { flex: 1 1 260px; font-size: 16px; font-weight: 600; }
.scene-list small a { color: var(--muted); }
.scene-list small a:hover { color: var(--accent); }
.scene-closed { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 1px 8px; border-radius: 99px; background: var(--border); color: var(--text); vertical-align: middle; }
.scene-pages { margin: 0 0 16px; }
.scene-posts + .scene-pages { margin: 16px 0 0; }
.scene-post {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    margin-top: 12px;
    overflow: hidden;
    scroll-margin-top: 60px;
}
.scene-post:first-child { margin-top: 0; }
.scene-post:target { box-shadow: 0 0 0 2px var(--accent); }
.scene-post-who { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 14px; border-right: 1px solid var(--border); }
.scene-post-who .avatar { width: 72px; height: 72px; font-size: 30px; }
.scene-post-who strong { display: block; color: var(--title); font-size: 15px; line-height: 1.3; }
.scene-post-who small { display: block; color: var(--muted); font-size: 12px; }
.scene-post.by-gm .scene-post-who { background: rgba(122, 167, 255, .08); }
.scene-post-body { padding: 14px 22px 18px; min-width: 0; }
.scene-post-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; margin-bottom: 6px; }
.scene-post-meta a { color: var(--muted); }
.scene-post-meta .edit-link { color: var(--accent); margin-left: auto; }
.scene-post .prose { font-size: 15px; overflow-wrap: anywhere; }
.scene-post .prose p { margin: 0 0 .8em; }
.scene-post .prose > :last-child { margin-bottom: 0; }
.scene-reply { margin: 20px 0 0; }
.write-button { display: inline-block; background: var(--accent); color: #fff; border-radius: 6px; padding: 9px 18px; font-size: 14px; }
.write-button:hover { color: #fff; opacity: .9; }
.latest-scenes li small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 12px; margin-top: -16px; }

.widget {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.widget ul { list-style: none; margin: 0; padding: 0; }

.search input {
    width: 100%;
    background: var(--card);
    color: var(--title);
    border: 0;
    padding: 12px;
    font: inherit;
    font-size: 14px;
    outline: none;
}
.search input::placeholder { color: var(--title); }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }

.widget-title {
    margin: 0;
    padding: 16px 20px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.recent li { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.recent li:last-child { border-bottom: 0; }
.recent a { display: block; font-size: 14px; }

.network { padding: 12px 0; }
.network a { display: flex; align-items: center; gap: 12px; padding: 12px 24px; }
.network img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.network strong { display: block; font-size: 16px; }
.network small { color: var(--muted); font-size: 14px; }
.social-icon { width: 64px; height: 64px; border-radius: 4px; flex-shrink: 0; display: grid; place-items: center; background: #f26522; color: #fff; }

.site-footer { text-align: center; padding: 10px 20px 30px; font-size: 13px; color: var(--muted); }

/* ---------- Tablet / phone ---------- */
@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { margin-top: 0; }
}

@media (max-width: 760px) {
    .header-inner { padding: 0 16px; }
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0 16px;
    }
    .menu-open .main-nav { display: flex; }
    .nav-sep { display: none; }
    .admin-wrap { padding: 16px; }
    .panel { padding: 16px; }
    .admin-nav { gap: 14px; }
    .nav-dropdown-menu {
        position: static;
        margin: 8px 0 0;
        padding: 0 0 0 14px;
        background: none;
        border: 0;
        box-shadow: none;
    }
    .nav-dropdown-menu::before { display: none; }
    .nav-dropdown-menu a { padding: 4px 0; }

    .layout { padding: 16px; }
    .banner-wrap { padding: 16px 16px 0; }
    .banner { min-height: 150px; }
    .banner-text { padding: 20px; }
    .banner-text h1 { font-size: 28px; }
    .banner-text p { font-size: 14px; }
    .card { flex-direction: column; }
    .card-image { flex-basis: auto; height: 180px; }
    .single-body { padding: 20px 16px 24px; }
    .single h1 { font-size: 24px; }
    .comments { padding: 20px 16px 24px; }
    .replies { margin-left: 8px; padding-left: 12px; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
    .lightbox img { max-width: 100vw; max-height: calc(100vh - 100px); }
    .lb-prev, .lb-next { top: auto; bottom: 0; transform: none; }
    .game-title { font-size: 22px; }
    .past-games { grid-template-columns: 1fr; }
    .scene-post { grid-template-columns: 1fr; }
    .scene-post-who { flex-direction: row; text-align: left; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
    .scene-post-who .avatar { width: 44px; height: 44px; font-size: 20px; }
    .scene-post-body { padding: 12px 16px 16px; }
    .write-form textarea { min-height: 260px; }
    .character-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .profile-section { padding: 16px 16px 20px; }
    .profile-head h1 { font-size: 24px; }
    .avatar-big { width: 72px; height: 72px; font-size: 30px; }
    .book-feature { gap: 16px; }
    .book-cover { width: 96px; }
    .book-info h3 { font-size: 19px; }
    .steam-game { flex-direction: column; gap: 16px; }
    .steam-art { flex-basis: auto; width: 100%; }
    .steam-info h3 { font-size: 20px; }
    .ach-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
}
