/* ═══════════════════════════════════════════════════════════
   Oakham Villa — claret & sky club site styles
   ═══════════════════════════════════════════════════════════ */

:root {
    /* AVFC-style light theme: white surfaces, claret primary, sky secondary */
    --bg:          #f2f2f2;
    --bg-card:     #ffffff;
    --bg-elevated: #ececec;
    --border:      #dcdcdc;
    --text:        #101010;
    --text-muted:  #666666;
    --accent:      #480024;
    --accent-bright: #380018;
    --accent-deep: #1d000d;
    --accent-dim:  rgba(72,0,36,.08);
    --on-accent:   #ffffff;
    --sky:         #2c72b5;
    --sky-dim:     rgba(44,114,181,.1);
    --green:       #2f9e5c;
    --green-dim:   rgba(47,158,92,.12);
    --red:         #c23b3b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; width: 100%; flex: 1; }

/* ── Top bar (claret, mirrors avfc.co.uk's header bar) ── */
.topbar {
    /* Hardcoded, not var(--accent) — --accent is shadowed below for
       children, and a var() reference here would resolve against that
       shadowed value too (custom-property cascade isn't textual-order). */
    background: #480024;
    border-bottom: 1px solid rgba(255,255,255,.12);
    position: sticky; top: 0; z-index: 50;
    padding: 0 1.25rem;
    /* Re-scope the shared tokens so every child component (links, icons,
       the account dropdown *trigger*) reads as light-on-claret without
       needing its own overrides. The dropdown panels reset these back
       to the page's light theme — see .topbar-dd-menu below. */
    --text: #ffffff;
    --text-muted: rgba(255,255,255,.75);
    --border: rgba(255,255,255,.22);
    --bg-elevated: rgba(255,255,255,.14);
    --topbar-highlight: #8fd0f2;
    color: var(--text);
}
.topbar-nav .btn-primary { background: #ffffff; color: #480024; }
.topbar-nav .btn-primary:hover { background: rgba(255,255,255,.85); }
.topbar-nav .btn-outline { border-color: rgba(255,255,255,.6); color: #ffffff; }
.topbar-nav .btn-outline:hover { background: rgba(255,255,255,.14); border-color: #ffffff; color: #ffffff; }
.topbar-inner {
    max-width: 1200px; margin: 0 auto; height: 56px;
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 1rem;
}
.topbar-inner > .topbar-brand { justify-self: start; }
.topbar-inner > .topbar-links { justify-self: center; }
.topbar-inner > .topbar-nav   { justify-self: end; }
.topbar-brand {
    font-weight: 800; font-size: 1rem; color: var(--text);
    text-decoration: none; display: flex; align-items: center; gap: .5rem;
    white-space: nowrap;
}
.topbar-nav { display: flex; align-items: center; gap: .5rem; }
.topbar-links { display: flex; align-items: stretch; height: 56px; gap: .1rem; }
.topbar-link {
    display: flex; align-items: center;
    padding: 0 .85rem;
    font-size: .84rem; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .12s, border-color .12s;
    white-space: nowrap;
}
.topbar-link:hover { color: #fff; }
.topbar-link.active { color: #fff; border-bottom-color: var(--topbar-highlight); }

/* Nav dropdowns */
.topbar-dd { position: relative; display: flex; align-items: stretch; }
.topbar-dd-btn {
    margin: 0; background: none; border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer; font-family: inherit;
}
.topbar-dd-btn.active { color: #fff; border-bottom-color: var(--topbar-highlight); }
.topbar-dd-caret { font-size: .55rem; opacity: .6; transition: transform .15s; }
.topbar-dd.open .topbar-dd-btn, .topbar-dd:hover .topbar-dd-btn { color: #fff; }
.topbar-dd.open .topbar-dd-caret { transform: rotate(180deg); }
.topbar-dd-menu {
    position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%);
    min-width: 160px; padding: .3rem; display: none;
    background: #ffffff; border: 1px solid #dcdcdc; border-radius: 10px;
    z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.18);
    animation: ddFade .13s ease;
    /* Floating panels stay light even though they hang off the claret bar. */
    --text: #101010;
    --text-muted: #666666;
    --border: #e5e5e5;
    --bg-elevated: #f2f2f2;
    --accent: #480024;
    --accent-dim: rgba(72,0,36,.08);
}
.topbar-dd.open .topbar-dd-menu,
.topbar-dd:hover .topbar-dd-menu { display: block; }
@keyframes ddFade { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.topbar-dd-menu a {
    display: block; padding: .5rem .75rem; border-radius: 7px;
    font-size: .84rem; font-weight: 600; color: var(--text-muted); text-decoration: none;
    white-space: nowrap;
}
.topbar-dd-menu a:hover { background: var(--bg-elevated); color: var(--text); }
.topbar-user {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: .22rem .8rem .22rem .28rem;
    font-size: .8rem; font-weight: 600;
    color: var(--text); text-decoration: none;
    transition: border-color .12s;
}
.topbar-user:hover { border-color: var(--topbar-highlight); }
.topbar-user img { width: 26px; height: 26px; border-radius: 6px; image-rendering: pixelated; }
.topbar-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: none; border: 1px solid transparent; cursor: pointer;
    color: var(--text-muted); transition: color .12s, background .12s, border-color .12s;
}
.topbar-icon:hover { color: #fff; background: var(--bg-elevated); border-color: var(--border); }
.topbar-bell {
    position: relative; text-decoration: none;
    font-size: 1rem; padding: .2rem .3rem;
}

/* Account dropdown */
.topbar-avatar-dd .topbar-user { position: relative; cursor: pointer; font-family: inherit; }
.topbar-avatar-badge { top: -3px; right: -3px; }
.topbar-account-menu {
    left: auto; right: 0; transform: none;
    min-width: 290px; max-width: 320px; padding: .4rem;
}
.acct-section-label {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-muted); padding: .5rem .6rem .35rem;
}
.acct-unread {
    background: var(--red); color: #fff; border-radius: 99px;
    padding: .05rem .4rem; font-size: .6rem; letter-spacing: 0;
}
.acct-clear-btn {
    background: none; border: none; cursor: pointer;
    font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: none;
    color: var(--text-muted); padding: 0; text-decoration: underline; text-underline-offset: 2px;
}
.acct-clear-btn:hover { color: var(--accent); }
.acct-empty { font-size: .8rem; color: var(--text-muted); padding: .4rem .6rem .6rem; }
.acct-notif {
    display: block; padding: .45rem .6rem; border-radius: 7px;
    text-decoration: none; color: var(--text);
}
.acct-notif:hover { background: var(--bg-elevated); }
.acct-notif.unread { border-left: 2px solid var(--accent); }
.acct-notif-msg {
    display: block; font-size: .78rem; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.acct-notif-time { display: block; font-size: .65rem; color: var(--text-muted); margin-top: 2px; }
.acct-viewall {
    display: block; padding: .4rem .6rem; font-size: .72rem; font-weight: 600;
    color: var(--accent); text-decoration: none;
}
.acct-viewall:hover { text-decoration: underline; }
.acct-divider { height: 1px; background: var(--border); margin: .35rem .3rem; }
.acct-link {
    display: block; padding: .5rem .6rem; border-radius: 7px;
    font-size: .84rem; font-weight: 600; color: var(--text-muted); text-decoration: none;
}
.acct-link:hover { background: var(--bg-elevated); color: var(--text); }
.acct-logout { color: var(--red); }

/* ── Search overlay ── */
.search-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.62);
    display: none; justify-content: center; align-items: flex-start;
    padding: 12vh 1rem 1rem;
}
.search-overlay.open { display: flex; }
.search-panel {
    width: 100%; max-width: 560px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden;
    animation: ddFade .14s ease;
}
.search-input-row {
    display: flex; align-items: center; gap: .6rem;
    padding: .85rem 1rem; border-bottom: 1px solid var(--border);
}
.search-input-row input {
    flex: 1; background: none; border: 0; padding: 0;
    color: var(--text); font-size: .95rem; font-family: inherit;
}
.search-input-row input:focus { outline: none; }
.search-esc {
    font-size: .62rem; font-weight: 700; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 5px; padding: .1rem .35rem;
}
.search-results { max-height: 56vh; overflow-y: auto; padding: .35rem; }
.search-hint { padding: 1.25rem; text-align: center; font-size: .82rem; color: var(--text-muted); }
.search-group {
    font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-muted); padding: .6rem .65rem .3rem;
}
.search-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .65rem; border-radius: 8px;
    text-decoration: none; color: var(--text);
}
.search-item:hover { background: var(--bg-elevated); }
.search-head { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; flex-shrink: 0; }
.search-icon { width: 22px; text-align: center; flex-shrink: 0; }
.search-item-main { font-size: .87rem; font-weight: 600; white-space: nowrap; }
.search-item-sub {
    font-size: .72rem; color: var(--text-muted); margin-left: auto;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%;
}
.topbar-bell-badge {
    position: absolute; top: -4px; right: -6px;
    background: var(--red); color: #fff;
    border-radius: 99px; font-size: .58rem; font-weight: 700;
    padding: 1px 4px; line-height: 1.2;
}
@media (max-width: 720px) {
    .topbar-username { display: none; }
    .topbar-inner { grid-template-columns: auto 1fr auto; }
    .topbar-links {
        gap: 0; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; justify-self: stretch;
    }
    .topbar-links::-webkit-scrollbar { display: none; }
    .topbar-link { padding: 0 .5rem; font-size: .76rem; }
}

/* ── Hero banner (claret curtain, mirrors avfc.co.uk's header treatment) ── */
.site-hero {
    position: relative;
    height: 300px;
    background-color: var(--accent-deep);
    background-size: cover;
    background-position: center;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border-bottom: 1px solid var(--accent-deep);
    overflow: hidden;
}
.site-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(29,0,13,.55) 0%, rgba(29,0,13,.3) 45%, rgba(29,0,13,.97) 100%);
}
.site-hero-title {
    position: relative;
    font-size: clamp(2.6rem, 7vw, 4.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, var(--sky) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,.8)) drop-shadow(0 1px 2px rgba(0,0,0,.9));
}
.site-hero-logo {
    position: relative;
    max-height: 62%;
    max-width: 78%;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.85));
}
.site-hero-tagline {
    position: relative;
    margin-top: .6rem;
    font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .22em;
    color: rgba(255,255,255,.75);
    text-shadow: 0 2px 8px rgba(0,0,0,.9);
}
@media (max-width: 720px) {
    .site-hero { height: 200px; }
}

/* ── Section label (SkyVoids-style role bar) ── */
.role-label {
    display: flex; align-items: center; gap: .55rem;
    font-size: .72rem; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent);
    margin: 1.75rem 0 .85rem;
}
.role-label::before {
    content: '';
    width: 3px; height: 15px;
    background: var(--accent);
    border-radius: 2px;
}
.role-label.red    { color: #eb9090; }
.role-label.red::before { background: var(--red); }
.role-label.muted  { color: var(--text-muted); }
.role-label.muted::before { background: var(--text-muted); }

/* ── Footer (dark claret curtain, mirrors avfc.co.uk's footer) ── */
.site-footer {
    border-top: 1px solid var(--accent-deep);
    background: var(--accent-deep);
    margin-top: 3.5rem;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,.7);
    color: var(--text);
}
.site-footer-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 1.6rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.site-footer-brand { font-weight: 800; font-size: .92rem; }
.site-footer-copy { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.site-footer-links { display: flex; gap: 1.25rem; }
.site-footer-links a {
    font-size: .8rem; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
}
.site-footer-links a:hover { color: var(--text); }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.card h1 { font-size: 1.3rem; }
.card h2 { font-size: 1rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem 1rem;
    border-radius: 7px;
    font-size: .85rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
    border: 1px solid transparent;
    transition: background .12s, border-color .12s, color .12s;
    background: var(--bg-elevated); color: var(--text);
}
.btn:hover { background: var(--border); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-bright); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }
.btn-sm { padding: .28rem .65rem; font-size: .75rem; }

/* ── Forms ── */
.form-group { margin-bottom: .9rem; }
.form-group label {
    display: block; font-size: .8rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: .3rem;
}
input[type="text"], input[type="url"], input[type="number"],
input[type="password"], textarea, select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    padding: .5rem .7rem;
    font-size: .88rem;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--accent);
}
textarea { resize: vertical; }

/* ── Tables ── */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: .6rem .9rem; text-align: left; }
th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted); border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,.2);
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* ── Admin: user access toggles + actions (kept to two tidy rows) ── */
.user-actions { display: flex; flex-direction: column; gap: .45rem; min-width: 230px; }
.access-toggle-group { display: flex; gap: .3rem; flex-wrap: wrap; }
.access-toggle {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: 99px;
    border: 1px solid var(--border); background: transparent;
    font-size: .68rem; font-weight: 700; color: var(--text-muted);
    cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.access-toggle:hover { background: var(--bg-elevated); color: var(--text); }
.access-toggle.council.active  { background: rgba(125,184,224,.15); color: #7db8e0; border-color: rgba(125,184,224,.4); }
.access-toggle.steward.active  { background: var(--green-dim); color: #7dcf99; border-color: rgba(78,163,106,.4); }
.access-toggle.approved.active { background: rgba(78,163,106,.15); color: #7dcf99; border-color: rgba(78,163,106,.4); }
.access-toggle.admin.active    { background: var(--accent-dim); color: var(--accent); border-color: rgba(232,199,79,.4); }
.user-actions-manage { display: flex; gap: .35rem; padding-top: .45rem; border-top: 1px dashed var(--border); }

/* ── Alerts ── */
.alert {
    padding: .6rem .9rem; border-radius: 8px;
    font-size: .85rem; margin-bottom: 1rem;
    border: 1px solid;
}
.alert-success { background: rgba(78,163,106,.12); border-color: rgba(78,163,106,.4); color: #7dcf99; }
.alert-error   { background: rgba(224,96,96,.12);  border-color: rgba(224,96,96,.4);  color: #eb9090; }

/* ── Interactive map (Leaflet) ── */
.leaflet-map-container { height: 70vh; min-height: 420px; background: #0d0e11; }
.leaflet-map-container.town-map-placing { cursor: crosshair !important; }
.leaflet-container { background: #0d0e11 !important; font-family: inherit; }
.leaflet-image-layer { image-rendering: pixelated; }

/* Leaflet positions these icon elements itself via an inline transform
   (translate3d) on the outer .leaflet-marker-icon div, so the outer div is
   left alone. Zoom-responsive sizing lives on an inner wrapper instead —
   its pixel width/height/font-size are set directly from JS on every zoom
   change (see updateMarkerScale() below) rather than through CSS calc(),
   so it can't fight Leaflet's own transform and doesn't depend on custom
   -property/calc() support. The outer div centers the inner one via flex,
   so the icon stays pinned to its map coordinate — "stationary" — as it
   grows or shrinks. */
.oak-marker-center { display: flex; align-items: center; justify-content: center; }

.town-map-head {
    position: relative;
    border-radius: 4px;
    border: 3px solid var(--accent);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.5);
    transition: width .1s linear, height .1s linear;
}
.town-map-head:hover { transform: scale(1.25); z-index: 1000 !important; }
.town-map-head img {
    width: 100%; height: 100%;
    border-radius: 2px; image-rendering: pixelated; display: block;
}
/* Household pin (multiple residents sharing a house) */
.town-map-house { border-color: var(--accent) !important; }
.town-map-count {
    position: absolute; bottom: -5px; right: -5px;
    background: var(--accent); color: var(--on-accent);
    font-size: .58rem; font-weight: 800; line-height: 1;
    border-radius: 99px; padding: 2px 4px;
    border: 1px solid rgba(0,0,0,.4);
}
/* Waypoints */
.town-map-wp {
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; cursor: pointer;
    background: rgba(15,16,19,.85);
    border: 2px solid var(--accent);
    box-shadow: 0 1px 5px rgba(0,0,0,.6);
    transition: width .1s linear, height .1s linear, font-size .1s linear;
}
.town-map-wp:hover { transform: scale(1.25); z-index: 1000 !important; }
.map-toggle {
    display: inline-flex; align-items: center; gap: .3rem;
    color: var(--text-muted); cursor: pointer; user-select: none;
}
.map-toggle input { accent-color: var(--accent); cursor: pointer; }

/* Free text labels drawn on the map (CivMap-style place names). Font-size
   is set directly from JS, same mechanism as marker icons above. */
.map-label { white-space: nowrap; pointer-events: auto; cursor: pointer; }
.oak-scale-text { display: inline-block; transition: font-size .1s linear; }
.map-label span {
    font-weight: 700; letter-spacing: .02em;
    text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 8px rgba(0,0,0,.6);
}

/* Leaflet popup chrome, themed to match the rest of the site */
.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text) !important;
    box-shadow: 0 8px 26px rgba(0,0,0,.55);
}
.leaflet-popup-content { margin: .75rem; min-width: 190px; }
.leaflet-popup-tip { background: var(--bg-card) !important; border: 1px solid var(--border); }
.leaflet-popup-close-button { color: var(--text-muted) !important; }
.leaflet-popup-close-button:hover { color: var(--text) !important; }

/* Leaflet zoom control, themed to match */
.leaflet-bar { border: 1px solid var(--border) !important; }
.leaflet-bar a {
    background: var(--bg-card) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
}
.leaflet-bar a:hover { background: var(--bg-elevated) !important; }
.leaflet-bar a.leaflet-disabled { background: var(--bg-card) !important; color: var(--text-muted) !important; }
.town-popup-member {
    display: flex; align-items: center; gap: .4rem;
    padding: .18rem 0;
}
.town-popup-member img { width: 20px; height: 20px; border-radius: 3px; image-rendering: pixelated; flex-shrink: 0; }
.town-popup-member a { font-weight: 600; text-decoration: none; }
.town-popup-member a:hover { text-decoration: underline; }
.town-popup-addr { font-size: .68rem; color: var(--text-muted); margin-left: auto; }
.town-popup-x {
    background: none; border: 0; cursor: pointer; padding: 0 .2rem;
    color: var(--text-muted); font-size: .8rem; line-height: 1;
}
.town-popup-x:hover { color: var(--red); }
.town-popup-actions {
    display: flex; gap: .35rem; flex-wrap: wrap;
    margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border);
}
.town-popup-actions .btn { font-size: .68rem; padding: .2rem .45rem; }

/* Waypoint symbol picker */
.wp-symbols { display: flex; flex-wrap: wrap; gap: .3rem; }
.wp-symbol {
    width: 34px; height: 34px; font-size: 16px; cursor: pointer;
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .12s, background .12s;
}
.wp-symbol:hover { background: var(--bg-elevated); }
.wp-symbol.selected { border-color: var(--accent); background: var(--accent-dim); }

/* ── Task board ── */
.board {
    display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: .5rem;
}
.board-col {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: .6rem; min-width: 220px;
}
.board-col-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .2rem .3rem .6rem; font-size: .82rem; font-weight: 700;
}
.board-col-title { display: flex; align-items: center; gap: .45rem; }
.board-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.board-count {
    font-size: .68rem; font-weight: 700; color: var(--text-muted);
    background: var(--bg-elevated); border-radius: 99px; padding: .05rem .4rem;
}
.board-cards { display: flex; flex-direction: column; gap: .5rem; min-height: 60px; border-radius: 8px; transition: background .12s; }
.board-cards.drop-target { background: rgba(232,199,79,.07); outline: 1px dashed rgba(232,199,79,.4); }
.task-card {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 8px; padding: .6rem .7rem; cursor: grab;
    transition: border-color .12s, transform .12s;
}
.task-card:hover { border-color: var(--accent); }
.task-card.dragging { opacity: .45; cursor: grabbing; }
.task-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .35rem; }
.task-tag {
    font-size: .6rem; font-weight: 700; color: #fff;
    border-radius: 4px; padding: .08rem .35rem;
}
.task-title { font-size: .87rem; font-weight: 600; line-height: 1.35; }
.task-desc {
    font-size: .74rem; color: var(--text-muted); margin-top: .25rem; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-foot {
    display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
    margin-top: .55rem; font-size: .68rem; color: var(--text-muted);
}
.task-due { display: inline-flex; align-items: center; gap: .2rem; }
.task-due.soon { color: #e8c477; }
.task-due.overdue { color: #eb9090; font-weight: 700; }
.task-assignee { display: inline-flex; align-items: center; gap: .28rem; }
.task-assignee img { width: 16px; height: 16px; border-radius: 3px; image-rendering: pixelated; }
.task-edit { margin-left: auto; text-decoration: none; color: var(--text-muted); font-size: .85rem; }
.task-edit:hover { color: var(--accent); }
@media (max-width: 860px) {
    .board { grid-template-columns: repeat(4, 240px); }
}

/* ── Events ── */
.event-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden; margin-bottom: 1rem;
    display: flex;
}
.event-past { opacity: .6; }
.event-img { flex-shrink: 0; width: 180px; background: #000; }
.event-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-body { padding: 1.1rem 1.25rem; flex: 1; min-width: 0; }
.event-when { font-size: .82rem; font-weight: 600; color: var(--accent); }
.event-live {
    font-size: .62rem; font-weight: 800; letter-spacing: .06em;
    color: #fff; background: var(--red);
    border-radius: 99px; padding: .12rem .45rem; margin-left: .4rem;
    vertical-align: middle;
}
.event-countdown { font-size: .75rem; font-weight: 700; color: #e8c477; }
.event-countdown.live { color: var(--red); }
@media (max-width: 640px) {
    .event-card { flex-direction: column; }
    .event-img { width: 100%; height: 150px; }
}
.town-popup-header {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .5rem; padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}
.town-popup-avatar {
    width: 40px; height: 40px;
    border-radius: 4px; border: 2px solid var(--accent);
    image-rendering: pixelated;
}
.town-popup-info { font-size: .8rem; line-height: 1.6; }
.town-popup-label { color: var(--text-muted); font-size: .75rem; }

/* Place resident modal */
.town-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 2000; /* above Leaflet's own panes/controls, which run up to z-index:1000 */
    display: flex; align-items: center; justify-content: center;
}
.town-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    max-width: 360px; width: 90%;
    max-height: 60vh; overflow-y: auto;
}
.town-place-list { display: flex; flex-direction: column; gap: .25rem; }
.town-place-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .4rem .6rem;
    border-radius: 6px; cursor: pointer;
    font-size: .85rem;
    transition: background .15s;
}
.town-place-item:hover { background: var(--bg-elevated); }

/* ── Minecraft chest GUI ── */
.oak-chest-wrap { display: flex; justify-content: center; padding: 1.25rem 0; }
.oak-chest {
    background: #c6c6c6;
    border: 3px solid;
    border-color: #ffffff #555555 #555555 #ffffff;
    border-radius: 3px;
    padding: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.oak-chest-title {
    font-family: 'Courier New', monospace;
    font-weight: 700; color: #3f3f3f;
    font-size: .85rem; padding: 2px 4px 6px;
}
.oak-chest-grid {
    display: grid;
    grid-template-columns: repeat(9, 44px);
    grid-auto-rows: 44px;
    gap: 3px;
}
.oak-slot {
    background: #8b8b8b;
    border: 2px solid;
    border-color: #373737 #ffffff #ffffff #373737;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.oak-slot img {
    width: 32px; height: 32px;
    image-rendering: pixelated; object-fit: contain;
    pointer-events: none;
}
.oak-slot.oak-filled { cursor: pointer; }
.oak-slot.oak-filled:hover { background: #a0a0a0; }
.oak-slot-qty {
    position: absolute; right: 1px; bottom: 0;
    font-family: 'Courier New', monospace;
    font-weight: 700; font-size: .85rem;
    color: #fff; text-shadow: 1.5px 1.5px 0 #3f3f3f;
    pointer-events: none; line-height: 1;
}
/* Minecraft-style tooltip */
.oak-tooltip {
    position: fixed; z-index: 9999;
    pointer-events: none;
    background: rgba(16,0,16,.95);
    border: 2px solid #270a56;
    outline: 1px solid rgba(16,0,16,.95);
    border-radius: 2px;
    padding: 6px 9px;
    max-width: 260px;
    display: none;
    font-family: 'Courier New', monospace;
    font-weight: 700; line-height: 1.35;
}
.oak-tooltip-name { color: #ffffff; font-size: .85rem; white-space: nowrap; }
.oak-tooltip-desc { color: #a8a8a8; font-size: .75rem; margin-top: 2px; }
.oak-tooltip-qty  { color: #5555ff; font-size: .72rem; margin-top: 3px; }

/* Admin mini chest */
.oaka-mini-chest {
    display: grid;
    grid-template-columns: repeat(9, 36px);
    grid-auto-rows: 36px;
    gap: 3px;
    background: #c6c6c6;
    border: 3px solid;
    border-color: #ffffff #555555 #555555 #ffffff;
    border-radius: 3px;
    padding: 6px;
    width: fit-content;
}
.oaka-mini-slot {
    background: #8b8b8b;
    border: 2px solid;
    border-color: #373737 #ffffff #ffffff #373737;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-size: .55rem;
    color: rgba(0,0,0,.35);
    font-weight: 700;
}
.oaka-mini-slot img { width: 26px; height: 26px; image-rendering: pixelated; object-fit: contain; }
.oaka-mini-slot:hover { background: #a0a0a0; }
.oaka-mini-slot.oaka-editing { outline: 2px solid #22c55e; }
.oaka-mini-qty {
    position: absolute; right: 0; bottom: -1px;
    font-family: 'Courier New', monospace;
    font-weight: 700; font-size: .7rem;
    color: #fff; text-shadow: 1px 1px 0 #3f3f3f;
    line-height: 1;
}

/* ── Checklist ── */
.oak-check-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .7rem .9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: .5rem;
    cursor: pointer;
    transition: background .12s, opacity .12s;
    user-select: none;
}
.oak-check-item:hover { background: rgba(255,255,255,.03); }
.oak-check-item.oak-done { opacity: .45; }
.oak-check-item.oak-done .oak-check-label { text-decoration: line-through; }
.oak-check-box {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    color: #22c55e;
    margin-top: 1px;
}
.oak-check-item.oak-done .oak-check-box { border-color: #22c55e; }
.oak-check-label { font-weight: 600; font-size: .9rem; }
.oak-check-desc { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* ── Copy cards ── */
.oak-copy-code {
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,.35);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .55rem .8rem;
    font-size: .9rem;
    word-break: break-all;
    flex: 1;
}
.oak-rules-text {
    white-space: pre-wrap;
    font-size: .85rem;
    line-height: 1.6;
}
.settle-msg-box {
    white-space: pre-wrap;
    background: rgba(0,0,0,.35);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .75rem .9rem;
    font-size: .85rem;
    line-height: 1.6;
    flex: 1;
}

/* ── Landing page ── */
.landing-intro {
    text-align: center;
    padding: 1.5rem 1.5rem 2.5rem;
}
.landing-kicker {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .2em;
    color: var(--accent); margin-bottom: .75rem;
}
.landing-sub {
    max-width: 640px; margin: 0 auto 1.75rem;
    color: var(--text-muted); font-size: 1.02rem; line-height: 1.65;
}
.landing-cta-row { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: .7rem 1.5rem; font-size: .95rem; border-radius: 9px; }
.landing-stats {
    display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap;
    margin-top: 2.5rem;
}
.landing-stat { text-align: center; }
.landing-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.landing-stat-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

.landing-section-title {
    text-align: center; font-size: 1.35rem; font-weight: 800; margin-bottom: .4rem;
}
.landing-section-sub {
    text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 1.75rem;
}
.landing-benefits {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    margin-bottom: 2.5rem;
}
.landing-benefit {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.25rem;
}
.landing-benefit-icon { font-size: 1.6rem; margin-bottom: .5rem; }
.landing-benefit-title { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.landing-benefit-text { font-size: .82rem; color: var(--text-muted); line-height: 1.55; }

.landing-banner {
    background: linear-gradient(135deg, rgba(78,163,106,.12), rgba(78,163,106,.04));
    border: 1px solid rgba(78,163,106,.35);
    border-radius: 12px; padding: 2rem;
    text-align: center; margin-bottom: 2.5rem;
}

/* ── Tutorials ── */
.tut-layout { display: grid; grid-template-columns: 210px 1fr; gap: 1.5rem; align-items: start; }
.tut-sidenav {
    position: sticky; top: calc(56px + 1rem);
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: .5rem;
    display: flex; flex-direction: column; gap: 2px;
}
.tut-sidenav a {
    padding: .5rem .75rem; border-radius: 7px;
    font-size: .82rem; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    transition: background .12s, color .12s;
}
.tut-sidenav a:hover { background: var(--bg-elevated); color: var(--text); }
.tut-sidenav a.active { background: var(--accent-dim); color: var(--accent); }
.tut-content h2 { font-size: 1.25rem; margin-bottom: .75rem; scroll-margin-top: 1rem; }
.tut-content h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
.tut-content p { font-size: .88rem; line-height: 1.7; color: var(--text); margin-bottom: .75rem; }
.tut-content ul, .tut-content ol { font-size: .88rem; line-height: 1.7; margin: 0 0 .75rem 1.25rem; }
.tut-content li { margin-bottom: .25rem; }
.tut-cmd {
    font-family: 'Courier New', monospace; font-weight: 700;
    background: rgba(0,0,0,.35); border: 1px solid var(--border);
    border-radius: 5px; padding: .1rem .4rem; font-size: .82rem;
    white-space: nowrap;
}
.tut-tip {
    background: var(--green-dim); border: 1px solid rgba(78,163,106,.35);
    border-radius: 8px; padding: .7rem .9rem;
    font-size: .82rem; line-height: 1.6; margin-bottom: .75rem;
}
.tut-warn {
    background: rgba(224,96,96,.08); border: 1px solid rgba(224,96,96,.35);
    border-radius: 8px; padding: .7rem .9rem;
    font-size: .82rem; line-height: 1.6; margin-bottom: .75rem;
}
.tut-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-bottom: .75rem; }
.tut-table th, .tut-table td { padding: .45rem .7rem; border: 1px solid var(--border); text-align: left; }
.tut-table th { background: rgba(0,0,0,.2); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }

/* ── Council ── */
.council-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.council-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.4rem; text-align: center;
}
.council-avatar {
    width: 72px; height: 72px; border-radius: 10px;
    border: 2px solid var(--accent);
    image-rendering: pixelated; margin-bottom: .7rem;
}
.council-name { font-weight: 700; font-size: 1rem; }
.council-pronouns { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }
.council-nation {
    display: inline-block; margin-top: .5rem;
    font-size: .7rem; font-weight: 600;
    background: var(--accent-dim); color: var(--accent);
    border-radius: 99px; padding: .15rem .6rem;
}
.council-bio { font-size: .8rem; color: var(--text-muted); line-height: 1.6; margin-top: .7rem; }

/* Town Steward — same card, dialled down to green (no vote, junior to council) */
.steward-card { border-color: rgba(78,163,106,.3); }
.steward-avatar { border-color: #7dcf99; }
.steward-badge {
    display: inline-block; margin-top: .4rem;
    font-size: .68rem; font-weight: 700;
    background: var(--green-dim); color: #7dcf99;
    border-radius: 99px; padding: .15rem .6rem;
}
.steward-term { font-size: .68rem; color: var(--text-muted); margin-top: .6rem; }

/* ── Policies ── */
.policy-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.25rem; margin-bottom: 1.25rem;
}
.policy-status {
    display: inline-block; font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    border-radius: 99px; padding: .18rem .6rem;
}
.policy-status.open     { background: var(--accent-dim); color: var(--accent); }
.policy-status.passed   { background: rgba(78,163,106,.2); color: #7dcf99; }
.policy-status.rejected { background: rgba(224,96,96,.15); color: #eb9090; }
.policy-status.tied     { background: rgba(240,180,60,.12); color: #e8c477; }
.policy-title-link { color: inherit; text-decoration: none; }
.policy-title-link:hover { color: var(--accent); }
.policy-scope {
    display: inline-block; font-size: .68rem; font-weight: 600;
    color: var(--text-muted); border: 1px solid var(--border);
    border-radius: 99px; padding: .18rem .6rem;
}
.policy-body { font-size: .87rem; line-height: 1.65; white-space: pre-wrap; margin: .75rem 0; }
.policy-bar {
    height: 10px; border-radius: 99px; overflow: hidden;
    background: rgba(224,96,96,.35);
    display: flex; margin: .5rem 0 .3rem;
}
.policy-bar-yes { background: var(--green); height: 100%; }

/* Council electorate bar — aye from left, nay from right, majority line at midpoint */
.policy-elect {
    position: relative; height: 14px; border-radius: 99px; overflow: hidden;
    background: var(--bg-elevated); margin: .55rem 0 .5rem;
}
.policy-elect-yes { position: absolute; left: 0; top: 0; height: 100%; background: var(--green); transition: width .2s; }
.policy-elect-no  { position: absolute; right: 0; top: 0; height: 100%; background: #e07060; transition: width .2s; }
.policy-elect-abstain { position: absolute; top: 0; height: 100%; background: repeating-linear-gradient(135deg, var(--text-muted) 0, var(--text-muted) 3px, transparent 3px, transparent 6px); opacity: .5; transition: width .2s, left .2s; }
.policy-elect-line {
    position: absolute; top: -3px; bottom: -3px; width: 2px;
    background: var(--accent); transform: translateX(-50%); z-index: 2;
    box-shadow: 0 0 0 1px rgba(0,0,0,.4);
}
.policy-elect-line span {
    position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
    font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent); white-space: nowrap;
}
.policy-deadline { font-size: .75rem; color: var(--text-muted); margin-top: .9rem; }
.policy-countdown { font-weight: 700; color: #e8c477; }

/* ── Policy detail page: embedded doc (left) + info (right) ── */
.policy-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.25rem; align-items: start; }
.policy-doc-frame { width: 100%; height: 82vh; min-height: 480px; border: none; display: block; background: #fff; }
@media (max-width: 860px) {
    .policy-detail-layout { grid-template-columns: 1fr; }
    .policy-doc-frame { height: 60vh; }
}

/* ── Official council statements — glowing "engraved" quote card ── */
.statements { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.1rem; }
.statement-card {
    display: flex; gap: 1rem; align-items: flex-start;
    background: linear-gradient(160deg, rgba(232,199,79,.09), rgba(232,199,79,.02));
    border: 1px solid rgba(232,199,79,.35);
    border-radius: 12px; padding: 1rem 1.2rem;
    box-shadow: 0 0 22px rgba(232,199,79,.15), inset 0 0 30px rgba(232,199,79,.04);
}
.statement-avatar {
    width: 48px; height: 48px; border-radius: 8px;
    border: 2px solid var(--accent); image-rendering: pixelated;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(232,199,79,.55);
}
.statement-body { flex: 1; min-width: 0; }
.statement-label {
    font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent); margin-bottom: .45rem;
}
.statement-quote {
    display: flex; align-items: flex-start; gap: .35rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem; line-height: 1.6; font-style: italic;
    color: #fff5d6;
    text-shadow: 0 0 12px rgba(232,199,79,.55), 0 0 2px rgba(232,199,79,.3);
}
.statement-quote-mark {
    flex-shrink: 0;
    font-family: Georgia, serif; font-size: 2.2rem; font-weight: 700; font-style: normal;
    line-height: .6;
    color: var(--accent);
    text-shadow: 0 0 16px rgba(232,199,79,.75);
}
.statement-quote-text { flex: 1; min-width: 0; }
.statement-quote-end { font-size: 1.3rem; color: var(--accent); margin-left: .15rem; font-style: normal; }
.statement-meta { font-size: .72rem; color: var(--text-muted); margin-top: .65rem; letter-spacing: .01em; }
.statement-meta strong { color: var(--accent-bright); }
.statement-delete {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: .7rem; margin-left: .4rem; padding: 0 .2rem;
}
.statement-delete:hover { color: var(--red); }
.statement-form { margin-top: 1.1rem; }
.statement-form textarea { font-size: .85rem; }

/* ── Join page ── */
.join-step {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem;
}
.join-step-num {
    flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent-dim); color: var(--accent);
    border: 1px solid rgba(232,199,79,.4);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .95rem;
}
.join-step-title { font-weight: 700; font-size: .98rem; margin-bottom: .3rem; }
.join-step-text { font-size: .87rem; color: var(--text-muted); line-height: 1.65; }
.join-step-text strong { color: var(--text); }
.join-kv {
    display: inline-block;
    font-family: 'Courier New', monospace; font-weight: 700;
    background: rgba(0,0,0,.35); border: 1px solid var(--border);
    border-radius: 5px; padding: .08rem .45rem; font-size: .82rem;
    color: var(--accent-bright); white-space: nowrap;
}

/* ── Villa result row (clickable, links to /villa/result/{id}) ── */
.villa-result-row {
    display: flex; align-items: center; gap: .7rem; padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none; color: inherit;
    margin: 0 -.4rem; padding-left: .4rem; padding-right: .4rem; border-radius: 6px;
}
.villa-result-row:hover { background: var(--bg-elevated); }

/* ── Fixtures/results rows (fotmob-style single match list) ── */
.fx-list {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
}
.fx-row2 {
    display: grid; grid-template-columns: 90px 1fr 140px;
    align-items: center; gap: .75rem;
    padding: .85rem 1.1rem; border-bottom: 1px solid var(--border);
}
.fx-row2:last-child { border-bottom: none; }
a.fx-row2-link { text-decoration: none; color: inherit; }
a.fx-row2-link:hover { background: var(--bg-elevated); }
.fx-row2-date { font-size: .78rem; color: var(--text-muted); }
.fx-row2-center {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: .6rem; min-width: 0;
}
.fx-row2-team { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .88rem; min-width: 0; }
.fx-row2-team-home { justify-content: flex-end; text-align: right; }
.fx-row2-team-away { justify-content: flex-start; text-align: left; }
.fx-row2-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row2-badge { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; flex-shrink: 0; font-size: .9rem; }
.fx-row2-mid { min-width: 64px; text-align: center; }
.fx-row2-score {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 52px; padding: .25rem .5rem; border-radius: 6px;
    font-weight: 800; font-size: .82rem; color: #fff;
}
.fx-row2-time { font-size: .82rem; font-weight: 700; color: var(--text-muted); }
.fx-row2-comp { font-size: .75rem; color: var(--text-muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
    .fx-row2 { grid-template-columns: 52px 1fr; }
    .fx-row2-comp { display: none; }
    .fx-row2-name { max-width: 90px; }
}

/* Clickable player rows/tiles linking to /member/{username} */
.villa-player-row {
    display: flex; align-items: center; gap: .6rem; padding: .4rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none; color: inherit;
    margin: 0 -.4rem; padding-left: .4rem; padding-right: .4rem; border-radius: 6px;
}
.villa-player-row:hover { background: var(--bg-elevated); }

/* ── Header sponsor (villa.php, top-right, inline with the title block) ── */
.villa-header-sponsor {
    display: flex; align-items: center; gap: .6rem; padding: .4rem .7rem;
    border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elevated);
    text-decoration: none; color: inherit; transition: border-color .12s;
}
a.villa-header-sponsor:hover { border-color: var(--accent); }

/* ── Interactive squad card (villa.php) ── */
.villa-squad-strip {
    display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .9rem; margin-bottom: 1rem;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.villa-squad-strip::-webkit-scrollbar { height: 6px; }
.villa-squad-strip::-webkit-scrollbar-track { background: transparent; }
.villa-squad-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.villa-squad-strip::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.villa-squad-tile2 {
    display: flex; align-items: center; gap: .6rem; flex-shrink: 0;
    width: 190px; padding: .55rem .7rem;
    border: 1px solid var(--border); border-radius: 8px; background: transparent;
    cursor: pointer; text-align: left; transition: border-color .12s, background .12s;
    font: inherit; color: inherit;
}
.villa-squad-tile2:hover { border-color: var(--accent); background: var(--bg-elevated); }
.villa-squad-tile2.active { border-color: var(--accent); background: var(--accent-dim); }
.villa-squad-tile2-info { min-width: 0; }
.villa-squad-tile2-name { font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.villa-squad-tile2-num { color: var(--text-muted); font-weight: 700; }
.villa-squad-tile2-pos { font-size: .72rem; color: var(--text-muted); }
.villa-squad-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.villa-squad-grid2 .villa-squad-tile2 { width: auto; }
.villa-squad-tile2-former { text-decoration: none; opacity: .82; filter: grayscale(.35); }
.villa-squad-tile2-former:hover { opacity: 1; filter: none; }
.villa-squad-tile2-transfer { font-size: .68rem; color: var(--accent); font-weight: 600; margin-top: .1rem; }
.villa-cap-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent);
    font-size: .62rem; font-weight: 800; flex-shrink: 0;
}

.villa-player-detail {
    display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap;
    padding-top: 1rem; border-top: 1px solid var(--border);
}
.villa-player-detail-skin {
    flex-shrink: 0; width: 170px; display: flex; justify-content: center;
}
.villa-player-detail-info { flex: 1; min-width: 220px; }
.villa-detail-stats { display: flex; gap: 1.5rem; }
.villa-detail-stat-val { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.villa-detail-stat-label { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.villa-detail-bio { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin-top: .9rem; max-width: 46ch; }
.villa-player-sponsor {
    display: flex; align-items: center; gap: .55rem; margin-top: 1rem; padding: .5rem .7rem;
    border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elevated);
    text-decoration: none; color: inherit; width: fit-content; transition: border-color .12s;
}
a.villa-player-sponsor:hover { border-color: var(--accent); }
@media (max-width: 640px) {
    .villa-player-detail { flex-direction: column; align-items: center; text-align: center; }
    .villa-detail-stats { justify-content: center; }
    .villa-detail-bio { max-width: none; }
}

/* ── Snapshot bar (last result / next fixture highlight cards) ── */
.villa-snapshot { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.villa-snapshot-card {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.1rem 1.3rem; text-decoration: none; color: inherit; transition: border-color .12s;
}
a.villa-snapshot-card:hover { border-color: var(--accent); }
.villa-snapshot-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .3rem; }
.villa-snapshot-main { font-size: 1.05rem; font-weight: 700; }
.villa-snapshot-sub { font-size: .75rem; color: var(--text-muted); margin-top: .3rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.villa-snapshot-result-badge {
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; color: #0b0c0e;
}
.villa-snapshot-countdown { font-size: .78rem; font-weight: 700; color: var(--accent); flex-shrink: 0; text-align: right; }
@media (max-width: 640px) { .villa-snapshot { grid-template-columns: 1fr; } }

/* Competition tag — a filled pill (as opposed to .policy-scope's outline
   style) shown on results/fixtures across the Villa pages. */
.villa-comp-tag {
    display: inline-block; font-size: .68rem; font-weight: 700;
    color: var(--accent); background: var(--accent-dim);
    border-radius: 99px; padding: .18rem .6rem; white-space: nowrap;
}

/* ── Fact cards (player profile stat tiles) ── */
.fact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.fact-card {
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
    padding: .85rem .7rem; text-align: center;
}
.fact-card-icon { font-size: 1.1rem; margin-bottom: .25rem; }
.fact-card-val { font-size: 1.2rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.fact-card-label { font-size: .64rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .2rem; }

/* ── Villa homepage layout ── */
.vh-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
.vh-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.vh-side { min-width: 0; }
@media (max-width: 900px) { .vh-layout { grid-template-columns: 1fr; } }

.vh-squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.vh-player-card {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
    padding: 1rem .6rem; text-decoration: none; color: var(--text); transition: border-color .12s, transform .12s;
}
.vh-player-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.vh-player-card-name { font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: .3rem; }
.vh-player-card-meta { font-size: .7rem; color: var(--text-muted); }

.vh-tweet-embed { border-radius: 10px; overflow: hidden; }

/* ── Featured articles (1 big + 2 small) ── */
.vh-featured-articles { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; align-items: stretch; }
.vh-article-big {
    position: relative; border-radius: 12px; overflow: hidden; min-height: 320px;
    display: flex; align-items: flex-end; text-decoration: none; color: #fff;
    background-size: cover; background-position: center; background-color: var(--accent-deep);
}
.vh-article-big::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.88) 100%);
}
.vh-article-big-ph {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 3rem; opacity: .5;
}
.vh-article-big-ph img { width: 80px; height: 80px; object-fit: contain; }
.vh-article-big-body { position: relative; padding: 1.25rem; }
.vh-article-big-title { font-size: 1.4rem; font-weight: 800; line-height: 1.25; margin-bottom: .4rem; }
.vh-article-big-meta { font-size: .78rem; opacity: .88; }

.vh-article-small-col { display: flex; flex-direction: column; gap: .9rem; }
.vh-article-small { display: flex; gap: .7rem; text-decoration: none; color: var(--text); }
.vh-article-small-img {
    width: 92px; height: 70px; flex-shrink: 0; border-radius: 8px;
    background-size: cover; background-position: center; background-color: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.vh-article-small-img img { width: 32px; height: 32px; object-fit: contain; opacity: .6; }
.vh-article-small-title { font-size: .85rem; font-weight: 700; line-height: 1.3; }
.vh-article-small:hover .vh-article-small-title { color: var(--accent); }
.vh-article-small-meta { font-size: .68rem; color: var(--text-muted); margin-top: .3rem; }
.vh-article-small-more { font-size: .78rem; font-weight: 600; margin-top: auto; }
@media (max-width: 800px) {
    .vh-featured-articles { grid-template-columns: 1fr; }
    .vh-article-big { min-height: 220px; }
}

/* ── Club store ── */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.store-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; display: flex; flex-direction: column;
}
.store-card-img { width: 100%; aspect-ratio: 1/1; background: var(--bg-elevated); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.store-card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.store-card-name { font-weight: 700; font-size: .95rem; }
.store-card-desc { font-size: .78rem; color: var(--text-muted); flex: 1; }
.store-card-price { font-weight: 800; color: var(--accent); font-size: 1.05rem; }

/* Date section headings on the full results archive (/villa/results) */
.villa-results-date-group {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-muted); margin: 1.5rem 0 .5rem;
}
.villa-results-date-group:first-child { margin-top: 0; }

/* ── Jobs board ── */
.job-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden; margin-bottom: 1rem;
}
.job-images {
    display: flex; gap: 2px; max-height: 180px; overflow: hidden;
    background: #000;
}
.job-images a { flex: 1; min-width: 0; }
.job-images img { width: 100%; height: 180px; object-fit: cover; display: block; }
.job-main { padding: 1.1rem 1.25rem; }
.job-pay {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: 1.15rem; font-weight: 800; color: #6fd6e8;
    background: rgba(111,214,232,.08); border: 1px solid rgba(111,214,232,.25);
    border-radius: 8px; padding: .3rem .7rem;
    white-space: nowrap;
}
.job-status {
    display: inline-block; font-size: .66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    border-radius: 99px; padding: .15rem .55rem;
}
.job-status.open      { background: var(--accent-dim); color: var(--accent); }
.job-status.claimed   { background: rgba(125,184,224,.12); color: #7db8e0; }
.job-status.completed { background: var(--green-dim); color: #7dcf99; }

/* ── Properties ── */
.prop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--prop-min, 260px), 1fr));
    gap: 1rem;
}
.prop-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
    display: flex; flex-direction: column;
}
.prop-img img { width: 100%; height: 150px; object-fit: cover; display: block; }
.prop-card-link { text-decoration: none; color: var(--text); transition: border-color .12s, transform .12s; }
.prop-card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.prop-filter { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.prop-filter-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .9rem; border-radius: 99px;
    font-size: .82rem; font-weight: 600; cursor: pointer;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
    transition: color .12s, border-color .12s, background .12s;
}
.prop-filter-btn:hover { color: var(--text); }
.prop-filter-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.prop-filter-count {
    font-size: .7rem; font-weight: 700;
    background: var(--bg-elevated); border-radius: 99px; padding: .02rem .4rem;
}
.prop-filter-btn.active .prop-filter-count { background: rgba(232,199,79,.2); color: var(--accent); }
.prop-body { padding: .9rem 1rem; }
.prop-name { font-weight: 700; font-size: .95rem; }
.prop-type {
    font-size: .64rem; font-weight: 700; white-space: nowrap;
    border-radius: 99px; padding: .16rem .55rem;
}
.prop-type.residential { background: var(--green-dim); color: #7dcf99; }
.prop-type.commerce    { background: var(--accent-dim); color: var(--accent); }
.prop-coords {
    font-family: 'Courier New', monospace; font-weight: 700;
    font-size: .78rem; color: var(--text-muted); margin-top: .35rem;
}
.prop-desc { font-size: .8rem; color: var(--text-muted); line-height: 1.55; margin-top: .4rem; }

/* ── Tutorials index ── */
.tut-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.tut-index-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.25rem;
    text-decoration: none; color: var(--text);
    display: flex; flex-direction: column;
    transition: border-color .12s, transform .12s;
}
.tut-index-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tut-index-num {
    font-size: .64rem; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--accent); margin-bottom: .5rem;
}
.tut-index-icon { font-size: 1.7rem; margin-bottom: .4rem; }
.tut-index-title { font-weight: 700; font-size: .98rem; margin-bottom: .35rem; }
.tut-index-excerpt { font-size: .8rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.tut-index-read { font-size: .76rem; font-weight: 700; color: var(--accent); margin-top: .8rem; }

/* ── Town Hall stats ── */
.hall-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.hall-stat {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: .9rem 1rem;
    text-align: center;
}
.hall-stat-val { font-size: 1.45rem; font-weight: 800; color: var(--accent); }
.hall-stat-label {
    font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-muted); margin-top: 2px;
}

/* ── Member profile ── */
.member-head {
    display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem; margin: .6rem 0 1.25rem;
}
.member-skin {
    flex-shrink: 0; width: 180px; height: 280px;
    display: flex; align-items: center; justify-content: center;
}
.member-skin canvas { cursor: grab; }
.member-id { flex: 1; min-width: 240px; }
.member-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .6rem; margin: .5rem 0;
}
.member-fact { display: flex; flex-direction: column; gap: 1px; }
.member-fact-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.member-fact span:last-child { font-size: .9rem; font-weight: 600; }
.member-contact { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.member-note {
    border-radius: 10px; padding: .85rem 1rem; margin-bottom: .75rem;
    border: 1px solid rgba(255,255,255,.08); color: #fff;
}
.member-reply {
    background: rgba(0,0,0,.22); border-radius: 7px;
    padding: .5rem .7rem; margin-top: .5rem; margin-left: 1rem;
}

/* Activity heatmap */
.act-year { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.act-year:last-of-type { margin-bottom: .25rem; }
.act-year-label {
    flex-shrink: 0; width: 34px; padding-top: 18px;
    font-size: .8rem; font-weight: 800; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.act-scroll { overflow-x: auto; padding-bottom: .35rem; min-width: 0; }
.act-months {
    display: grid; gap: 3px;
    margin-left: 32px; margin-bottom: 4px;
    font-size: .68rem; color: var(--text-muted); font-weight: 600;
}
.act-months span { white-space: nowrap; }
.act-body { display: flex; gap: 5px; }
.act-daylabels {
    display: grid; grid-template-rows: repeat(7, 13px); gap: 3px;
    width: 27px; flex-shrink: 0;
    font-size: .62rem; color: var(--text-muted); font-weight: 600;
}
.act-daylabels span { line-height: 13px; }
.act-grid {
    display: grid; grid-template-rows: repeat(7, 13px);
    grid-auto-flow: column; gap: 3px;
}
.act-cell {
    width: 13px; height: 13px; border-radius: 2px;
    background: var(--bg-elevated);
}
.act-cell[data-date] { cursor: pointer; }
.act-cell[data-date]:hover { outline: 1px solid var(--accent); outline-offset: 1px; }
.act-pad { background: transparent !important; }
.act-l0 { background: var(--bg-elevated); }
.act-l1 { background: #0e4429; }
.act-l2 { background: #196c34; }
.act-l3 { background: #27a745; }
.act-l4 { background: #4ee36a; }
.act-footer {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: .5rem;
    margin-top: .7rem; font-size: .72rem; color: var(--text-muted);
}
.act-legend { display: flex; align-items: center; gap: .3rem; }
.act-tip {
    position: fixed; z-index: 9999; display: none; pointer-events: none;
    background: #1a1a1a; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 7px;
    padding: .4rem .6rem; box-shadow: 0 8px 22px rgba(0,0,0,.35);
    font-size: .75rem; line-height: 1.35; white-space: nowrap;
}
.act-tip strong { display: block; color: #fff; font-weight: 700; }
.act-tip span { color: var(--text-muted); }

/* ── Admin panel ── */
.admin-layout {
    display: grid; grid-template-columns: 210px 1fr;
    gap: 1.5rem; align-items: start;
}
.admin-nav {
    position: sticky; top: calc(56px + 1rem);
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: .6rem;
}
.admin-nav-group {
    font-size: .62rem; font-weight: 800; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text-muted);
    padding: .7rem .6rem .3rem;
}
.admin-nav a {
    display: flex; align-items: center; justify-content: space-between; gap: .4rem;
    padding: .45rem .6rem; border-radius: 7px;
    font-size: .84rem; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    transition: background .12s, color .12s;
}
.admin-nav a:hover { background: var(--bg-elevated); color: var(--text); }
.admin-nav a.active { background: var(--accent-dim); color: var(--accent); }
.admin-nav-count {
    font-size: .66rem; font-weight: 700;
    background: var(--bg-elevated); border-radius: 99px;
    padding: .05rem .45rem; color: var(--text-muted);
}
.admin-nav a.active .admin-nav-count { background: rgba(232,199,79,.18); color: var(--accent); }
.admin-nav-alert {
    font-size: .66rem; font-weight: 700;
    background: var(--red); color: #fff;
    border-radius: 99px; padding: .05rem .45rem;
}
@media (max-width: 860px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-nav { position: static; display: flex; flex-wrap: wrap; gap: 2px; }
    .admin-nav-group { width: 100%; padding: .5rem .4rem .2rem; }
}

/* ── Notifications ── */
.notif-item {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .8rem 1rem; border: 1px solid var(--border);
    border-radius: 8px; margin-bottom: .5rem;
    text-decoration: none; color: var(--text);
    transition: background .12s;
}
.notif-item:hover { background: var(--bg-elevated); }
.notif-item.unread { border-left: 3px solid var(--accent); background: rgba(78,163,106,.05); }
.notif-msg { font-size: .87rem; line-height: 1.5; }
.notif-time { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ── Responsive ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
/* Page-level grids behave like a .card block: their children zero their own
   margin, so the grid carries the bottom spacing. Scoped to direct children
   of .wrap so grid2 used as a form-field row inside a card stays tight. */
.wrap > .grid2 { margin-bottom: 1.25rem; }
.wrap > .grid2:last-child { margin-bottom: 0; }
/* Equal-height columns (used where both cards are peers, e.g. profiles) */
.grid2-even { align-items: stretch; }
.grid2-even > .card { display: flex; flex-direction: column; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
@media (max-width: 860px) {
    .grid2 { grid-template-columns: 1fr; }
    .grid3 { grid-template-columns: 1fr; }
    .oak-chest-grid { grid-template-columns: repeat(9, 34px); grid-auto-rows: 34px; }
    .oak-slot img { width: 24px; height: 24px; }
    .landing-benefits { grid-template-columns: 1fr; }
    .tut-layout { grid-template-columns: 1fr; }
    .tut-sidenav { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ── Oakham Villa admin ── */
.ov-admin-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.4rem; margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border); border-radius: 10px;
}
.ov-admin-badge { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.ov-admin-badge-ph { width: 44px; height: 44px; font-size: 1.8rem; line-height: 44px; text-align: center; flex-shrink: 0; }
.ov-admin-title { font-size: 1.25rem; font-weight: 700; }
.ov-admin-title small { font-size: .72rem; font-weight: 400; color: var(--text-muted); margin-left: .5rem; }
.ov-admin-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.ov-tabs {
    display: flex; gap: 2px; margin-bottom: 1.25rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 10px; padding: 4px; overflow-x: auto;
}
.ov-tab-link {
    display: flex; align-items: center; gap: .4rem;
    padding: .5rem 1.05rem; border-radius: 7px;
    font-size: .8rem; font-weight: 600; text-decoration: none;
    color: var(--text-muted); white-space: nowrap;
    transition: background .15s, color .15s;
}
.ov-tab-link:hover { background: var(--bg); color: var(--text); }
.ov-tab-link.active { background: var(--accent); color: var(--on-accent); }
.ov-tab-count {
    font-size: .64rem; background: rgba(255,255,255,.15);
    border-radius: 99px; padding: .05rem .45rem; font-weight: 700;
}
.ov-tab-link:not(.active) .ov-tab-count { background: var(--bg); color: var(--text-muted); }

.ov-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 1.25rem; overflow: hidden; }
.ov-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .8rem 1.2rem; border-bottom: 1px solid var(--border); background: rgba(0,0,0,.15);
}
.ov-card-header h3 { font-size: .92rem; font-weight: 700; margin: 0; }
.ov-card-body { padding: 1.2rem; }

.ov-form-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .75rem; }
.ov-form-row .form-group { flex: 1; min-width: 120px; margin-bottom: 0; }
.ov-form-row .form-group.wide { flex: 2; }
.ov-form-row .form-group.narrow { flex: 0 0 100px; }

.ov-sub-panel { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ov-sub-panel-hdr {
    padding: .6rem 1rem; background: rgba(0,0,0,.2); border-bottom: 1px solid var(--border);
    font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
}
.ov-sub-panel-body { padding: .9rem; }
.ov-sub-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .8rem; }
.ov-sub-item {
    display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem;
    background: var(--bg); border: 1px solid var(--border); border-radius: 7px; font-size: .84rem;
}
.ov-sub-item-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-sub-item-meta { font-size: .72rem; color: var(--text-muted); flex-shrink: 0; }
.ov-sub-add-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.ov-sub-add-row .form-group { margin-bottom: 0; flex: 1; min-width: 100px; }
.ov-sub-add-row .form-group.wide { flex: 2; }
.ov-sub-add-row .form-group.narrow { flex: 0 0 80px; }
.ov-sub-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: .75rem; padding: .2rem .4rem; flex-shrink: 0; }
.ov-sub-remove:hover { color: var(--red); }
.ov-side-label { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .35rem; }

.ov-badge { display: inline-block; padding: .1rem .4rem; border-radius: 3px; font-size: .62rem; font-weight: 700; }
.ov-badge-home { background: rgba(74,144,217,.15); color: #4a90d9; border: 1px solid rgba(74,144,217,.3); }
.ov-badge-away { background: rgba(201,168,76,.12); color: #c9a84c; border: 1px solid rgba(201,168,76,.25); }
.ov-badge-sub { background: rgba(255,255,255,.06); color: var(--text-muted); border: 1px solid var(--border); }
.ov-badge-coach { background: var(--accent-dim); color: var(--accent); }
.ov-badge-captain { background: rgba(125,184,224,.15); color: #7db8e0; }

.ov-came-on {
    display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
    font-size: .72rem; font-weight: 600; user-select: none; color: var(--text-muted);
}
.ov-came-on.on { color: #5dbb7d; }
.ov-came-on input { accent-color: #5dbb7d; width: 14px; height: 14px; cursor: pointer; }

.ov-live {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .6rem; font-weight: 700; color: #ff4444;
    border: 1px solid rgba(255,68,68,.4); border-radius: 3px; padding: .05rem .35rem; margin-left: .4rem;
}
.ov-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ff4444; animation: ovBlink 1s infinite; }

/* ── Villa stats: horizontal bar rows (penalty reasons, scoring minutes, etc) ── */
.ovs-bar-row { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.ovs-bar-label { width: 92px; font-size: .74rem; color: var(--text-muted); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovs-bar-track { flex: 1; height: 9px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; }
.ovs-bar-fill { height: 100%; background: var(--accent); border-radius: 99px; }
.ovs-bar-count { width: 32px; text-align: right; font-size: .78rem; font-weight: 700; color: var(--text); flex-shrink: 0; }

/* ── Villa News — Ghost-style article grid & post page ── */
.ghost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.ghost-grid-compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.ghost-card {
    display: flex; flex-direction: column;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; text-decoration: none; color: inherit;
    transition: border-color .15s, transform .15s;
}
.ghost-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ghost-card-cover {
    height: 150px; background-size: cover; background-position: center; background-color: var(--bg-elevated);
    flex-shrink: 0;
}
.ghost-card-cover-ph { display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.ghost-card-cover-ph img { width: 44px; height: 44px; object-fit: contain; }
.ghost-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.ghost-card-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0; }
.ghost-card-excerpt { font-size: .82rem; color: var(--text-muted); line-height: 1.55; margin: 0; flex: 1; }
.ghost-card-meta { font-size: .7rem; color: var(--text-muted); display: flex; align-items: center; gap: .35rem; margin-top: .3rem; }
.ghost-dot { opacity: .5; }

.ghost-post { max-width: 720px; margin: 0 auto; }
.ghost-post-header { text-align: center; margin-bottom: 1.5rem; }
.ghost-post-title {
    font-family: Georgia, 'Times New Roman', serif; font-size: 2rem; font-weight: 700;
    line-height: 1.2; margin: .75rem 0 .6rem;
}
.ghost-post-meta { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.ghost-post-meta a { color: var(--text-muted); }
.ghost-post-meta a:hover { color: var(--accent); }
.ghost-post-cover {
    width: 100%; height: 340px; background-size: cover; background-position: center;
    border-radius: 12px; margin-bottom: 1.75rem;
}
.ghost-post-content {
    font-family: Georgia, 'Times New Roman', serif; font-size: 1.08rem; line-height: 1.8;
    color: var(--text); margin-bottom: 2rem;
}

.ghost-embeds { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.ghost-result-embed {
    display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; color: inherit; transition: border-color .15s;
}
.ghost-result-embed:hover { border-color: var(--accent); }
.ghost-result-embed-info { flex: 1; min-width: 0; }
.ghost-result-embed-title { font-weight: 700; font-size: .92rem; }
.ghost-result-embed-meta { font-size: .74rem; color: var(--text-muted); margin-top: 2px; }
.ghost-result-embed-arrow { color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }

.ghost-player-cards { display: flex; flex-wrap: wrap; gap: .75rem; padding: 0 .2rem; }
.ghost-player-card {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    width: 96px; padding: .8rem .5rem; text-align: center;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
.ghost-player-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ghost-player-card-name { font-size: .74rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ghost-player-card-stat { font-size: .68rem; color: var(--accent); font-weight: 700; }

@media (max-width: 640px) {
    .ghost-post-title { font-size: 1.5rem; }
    .ghost-post-cover { height: 220px; }
}
@keyframes ovBlink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ── Lyrean Cup ── */
.lc-rec-w, .lc-rec-l {
    cursor: help; border-bottom: 1px dotted var(--text-muted); font-weight: 700;
}
.lc-rec-w { color: #7dcf99; }
.lc-rec-l { color: #eb9090; }
/* Picks a team's own row out of an embedded standings table (e.g. Oakham
   Villa's row when the Lyrean Cup table is shown on the Villa page). */
.lc-row-highlight { background: var(--accent-dim); }
.lc-row-highlight td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ── Competitions hub ── */
.comp-hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.comp-hub-card { text-decoration: none; color: inherit; text-align: center; transition: border-color .12s, transform .12s; }
.comp-hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.comp-hub-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.comp-hub-title { font-size: 1.15rem; margin-bottom: .4rem; }
.comp-hub-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: .9rem; }
.comp-hub-meta { font-size: .78rem; font-weight: 700; color: var(--accent); }

/* ── IHL standings zone shading ── */
.ihl-zone-promo td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.ihl-zone-playoff td:first-child { box-shadow: inset 3px 0 0 var(--sky); }
.ihl-zone-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .74rem; color: var(--text-muted); margin-top: .6rem; }
.ihl-zone-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.ihl-zone-legend .ihl-zone-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lc-popover {
    position: fixed; z-index: 400;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: .5rem .6rem; min-width: 180px; max-width: 260px;
    box-shadow: 0 8px 26px rgba(0,0,0,.55); font-size: .76rem;
}
.lc-popover-row { display: flex; align-items: center; gap: .4rem; padding: .2rem 0; white-space: nowrap; }
.lc-popover-row + .lc-popover-row { border-top: 1px dashed var(--border); }
.lc-popover-w { color: #7dcf99; font-weight: 700; }
.lc-popover-l { color: #eb9090; font-weight: 700; }
.lc-popover-date { margin-left: auto; color: var(--text-muted); font-size: .68rem; }

/* Team grid (teams list page) */
.lc-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.lc-team-card {
    display: block; border-radius: 12px; overflow: hidden; text-decoration: none; color: #fff;
    min-height: 150px; position: relative; transition: transform .15s;
}
.lc-team-card:hover { transform: translateY(-2px); }
.lc-team-card-overlay {
    background: linear-gradient(180deg, rgba(11,12,14,.15) 0%, rgba(11,12,14,.55) 55%, rgba(11,12,14,.9) 100%);
    height: 100%; min-height: 150px; padding: 1rem; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .4rem; text-align: center;
}
.lc-team-card-icon { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.lc-team-card-emoji { font-size: 2.4rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.lc-team-card-name { font-weight: 800; font-size: 1.05rem; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.lc-team-card-roster { font-size: .7rem; opacity: .85; text-shadow: 0 1px 3px rgba(0,0,0,.8); }

/* Team detail hero */
.lc-hero { border-radius: 12px; overflow: hidden; margin: .9rem 0 1.25rem; }
.lc-hero-overlay {
    background: linear-gradient(180deg, rgba(11,12,14,.2) 0%, rgba(11,12,14,.6) 60%, rgba(11,12,14,.92) 100%);
    min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .5rem; padding: 1.5rem;
}
.lc-hero-icon { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 10px rgba(0,0,0,.7)); }
.lc-hero-emoji { font-size: 3.2rem; filter: drop-shadow(0 3px 10px rgba(0,0,0,.7)); }
.lc-hero-title { font-size: 1.9rem; font-weight: 900; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.85); margin: 0; }
.lc-hero-record { font-size: .82rem; font-weight: 700; color: #fff; opacity: .9; text-shadow: 0 1px 4px rgba(0,0,0,.85); }

/* Scheduling fixture header + vote grid (mirrors CivDB's IHL scheduling look) */
.lc-fx-header-overlay {
    background: linear-gradient(180deg, rgba(11,12,14,.15) 0%, rgba(11,12,14,.55) 60%, rgba(11,12,14,.88) 100%);
    padding: 1.1rem 1.25rem; min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.lc-fx-team { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: 1.05rem; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.7); flex: 1; min-width: 0; text-align: center; }
.lc-fx-team img { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.lc-fx-team span { font-size: 2rem; line-height: 1; }
.lc-fx-vs { font-size: .7rem; font-weight: 800; color: #fff; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }

.lc-whoami { padding: 0 0 .5rem; }
.lc-whoami-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); margin-bottom: .4rem; }
.lc-whoami-chips { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Free-text "who are you" identity — used where there's no stored roster
   to pick from (e.g. an opponent team on the Villa scheduling page). */
.vsched-typein { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.vsched-name-input {
    width: auto; max-width: 240px; padding: .35rem .6rem; font-size: .82rem;
    background: var(--bg); border: 1px solid var(--border); border-radius: 7px; color: var(--text);
}
.vsched-whoami-active { margin-top: .4rem; font-size: .78rem; font-weight: 600; color: var(--accent); }
.lc-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .7rem .3rem .4rem; border-radius: 99px;
    background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
    font-size: .8rem; font-weight: 600; cursor: pointer; transition: border-color .12s, background .12s;
}
.lc-chip img { width: 20px; height: 20px; border-radius: 4px; image-rendering: pixelated; }
.lc-chip:hover { background: var(--bg); }
.lc-chip.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

.lc-tz-picker {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: 1rem; font-size: .82rem; color: var(--text-muted);
}
.lc-tz-picker select {
    width: auto; padding: .35rem .6rem; font-size: .8rem;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 7px; color: var(--text);
}

/* Slot cards — each proposed time is its own card that wraps in a responsive
   grid, so a long list of times never forces horizontal/page scrolling. */
.lc-slot-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .7rem; margin-top: .9rem;
}
.lc-slot-card {
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: .8rem .9rem; display: flex; flex-direction: column; gap: .6rem;
}
.lc-slot-time { font-weight: 700; font-size: .88rem; }
.lc-slot-myvote { display: flex; flex-direction: column; }
.lc-vote-hint { font-size: .74rem; color: var(--text-muted); font-style: italic; }
.lc-vote-form { display: flex; flex-direction: column; gap: .35rem; }
.lc-vote-btn {
    width: 100%; padding: .45rem .5rem; border-radius: 7px; border: 1px solid var(--border);
    background: var(--bg-elevated); color: var(--text-muted); cursor: pointer;
    font-weight: 700; font-size: .78rem; text-align: center;
    transition: background .12s, color .12s, border-color .12s;
}
.lc-vote-btn.yes:hover, .lc-vote-btn.yes.active { background: rgba(78,163,106,.2); color: #7dcf99; border-color: rgba(78,163,106,.4); }
.lc-vote-btn.maybe:hover, .lc-vote-btn.maybe.active { background: rgba(232,196,119,.2); color: #e8c477; border-color: rgba(232,196,119,.4); }
.lc-vote-btn.no:hover, .lc-vote-btn.no.active { background: rgba(224,96,96,.2); color: #eb9090; border-color: rgba(224,96,96,.4); }

.lc-slot-responses { display: flex; flex-direction: column; gap: .3rem; padding-top: .5rem; border-top: 1px dashed var(--border); }
.lc-resp-group { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.lc-resp-label { font-size: .68rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.lc-resp-yes .lc-resp-label { color: #7dcf99; }
.lc-resp-maybe .lc-resp-label { color: #e8c477; }
.lc-resp-no .lc-resp-label { color: #eb9090; }
.lc-resp-avatars { display: flex; gap: .2rem; flex-wrap: wrap; }
.lc-resp-avatars img { width: 20px; height: 20px; border-radius: 4px; image-rendering: pixelated; }

.lc-roster-details { margin-top: 1rem; }
.lc-roster-details summary {
    cursor: pointer; list-style: none; font-size: .8rem; font-weight: 700; color: var(--text-muted);
}
.lc-roster-details summary::-webkit-details-marker { display: none; }
.lc-roster-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.lc-roster-chip {
    font-size: .72rem; padding: .2rem .55rem; border-radius: 99px;
    background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted);
}

@media (max-width: 640px) {
    .lc-slot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .lc-tz-picker { flex-wrap: wrap; }
    .lc-fx-header-overlay { gap: .5rem; padding: .9rem .75rem; min-height: 110px; }
    .lc-fx-team { font-size: .85rem; }
    .lc-fx-team img { width: 30px; height: 30px; }
    .lc-fx-team span { font-size: 1.4rem; }
    .lc-chip { padding: .25rem .55rem .25rem .3rem; font-size: .74rem; }
    .lc-chip img { width: 17px; height: 17px; }
}

/* Top scorers, gold/silver/bronze for the top 3 */
.lc-scorers { display: flex; flex-direction: column; gap: .4rem; }
.lc-scorer-row {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .7rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.lc-scorer-row img { width: 28px; height: 28px; border-radius: 5px; image-rendering: pixelated; flex-shrink: 0; }
.lc-scorer-rank { width: 26px; text-align: center; font-weight: 800; font-size: .88rem; color: var(--text-muted); flex-shrink: 0; }
.lc-scorer-name { flex: 1; min-width: 0; font-weight: 600; font-size: .88rem; display: flex; flex-direction: column; }
.lc-scorer-team { font-size: .68rem; color: var(--text-muted); font-weight: 400; }
.lc-scorer-goals { font-weight: 800; font-size: 1rem; color: var(--accent); flex-shrink: 0; }
.lc-scorer-gold, .lc-scorer-silver, .lc-scorer-bronze { border-width: 1px; }
.lc-scorer-gold .lc-scorer-rank, .lc-scorer-silver .lc-scorer-rank, .lc-scorer-bronze .lc-scorer-rank { font-size: 1.35rem; }
.lc-scorer-gold   { border-color: rgba(232,199,79,.5);  background: linear-gradient(135deg, rgba(232,199,79,.12), rgba(232,199,79,.02)); }
.lc-scorer-silver { border-color: rgba(197,197,205,.5); background: linear-gradient(135deg, rgba(197,197,205,.12), rgba(197,197,205,.02)); }
.lc-scorer-bronze { border-color: rgba(205,127,50,.5);  background: linear-gradient(135deg, rgba(205,127,50,.14), rgba(205,127,50,.02)); }

/* League officials */
.lc-officials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.lc-official-card {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .7rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.lc-official-card img { width: 40px; height: 40px; border-radius: 6px; image-rendering: pixelated; flex-shrink: 0; }
.lc-official-name { font-weight: 700; font-size: .9rem; }
.lc-official-titles { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.lc-title-chip {
    font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: .12rem .5rem; border-radius: 99px;
    background: var(--accent-dim); color: var(--accent);
}

/* Rules accordion — native <details>/<summary>, no JS needed */
.lc-rules-accordion { display: flex; flex-direction: column; gap: .5rem; }
.lc-rule-details {
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 0; overflow: hidden;
}
.lc-rule-details summary {
    cursor: pointer; list-style: none; padding: .7rem .9rem;
    font-weight: 700; font-size: .9rem; color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
    transition: background .12s;
}
.lc-rule-details summary::-webkit-details-marker { display: none; }
.lc-rule-details summary::after {
    content: '▾'; color: var(--text-muted); font-size: .8rem;
    transition: transform .15s;
}
.lc-rule-details[open] summary::after { transform: rotate(180deg); }
.lc-rule-details summary:hover { background: var(--bg-elevated); }
.lc-rule-details .oak-rules-text { padding: 0 .9rem .9rem; margin: 0; }

/* ── Settlement wizard (/settle) ── */
.settle-wrap { max-width: 780px; margin: 0 auto; }
.settle-wrap .card { margin-bottom: 1.25rem; }
.settle-progress {
    display: flex; align-items: flex-start; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: .25rem;
}
.settle-dot {
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    flex-shrink: 0; width: 74px; cursor: default;
}
.settle-dot.done { cursor: pointer; }
.settle-dot-num {
    width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; background: var(--bg-elevated); color: var(--text-muted);
    border: 1px solid var(--border);
}
.settle-dot.active .settle-dot-num { background: var(--accent); color: #1a1500; border-color: var(--accent); }
.settle-dot.done .settle-dot-num { background: var(--green); color: #fff; border-color: var(--green); }
.settle-dot-label { font-size: .62rem; color: var(--text-muted); text-align: center; line-height: 1.2; }
.settle-dot.active .settle-dot-label { color: var(--text); font-weight: 600; }
.settle-dot-line { flex: 1; height: 1px; background: var(--border); margin-top: 13px; min-width: 8px; }

.settle-err { color: var(--red); font-size: .8rem; margin: .5rem 0 0; }
.settle-box {
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px;
    padding: .75rem .9rem; margin-bottom: .9rem;
}
.settle-box-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .4rem; }
.settle-check {
    display: flex; align-items: center; gap: .55rem; cursor: pointer;
    font-size: .85rem; padding: .5rem 0;
}
.settle-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.settle-tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.settle-tag {
    background: var(--accent-dim); color: var(--accent); border-radius: 6px;
    padding: .3rem .65rem; font-size: .8rem; font-weight: 600;
}
.settle-tag-cmd { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.settle-warn { color: #eb9090; font-size: .8rem; background: rgba(224,96,96,.08); border: 1px solid rgba(224,96,96,.25); border-radius: 8px; padding: .6rem .8rem; margin-top: .75rem; }
.settle-steps-list { padding-left: 1.2rem; font-size: .85rem; line-height: 1.9; color: var(--text); }
.settle-plot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.settle-plot-card {
    border: 2px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer;
    transition: border-color .12s, transform .12s; background: var(--bg-elevated);
}
.settle-plot-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.settle-plot-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.settle-plot-card img { width: 100%; height: 80px; object-fit: cover; display: block; }
.settle-plot-name { font-size: .82rem; font-weight: 600; padding: .5rem .6rem 0; }
.settle-plot-coords { font-size: .7rem; color: var(--text-muted); padding: .1rem .6rem .5rem; }
.settle-actions {
    display: flex; justify-content: space-between; gap: .75rem;
    position: sticky; bottom: 1rem; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: .75rem 1rem; box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

/* ── Settlement Process (admin tab) ── */
.settle-chart { display: flex; flex-direction: column; gap: .5rem; }
.settle-chart-row { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: .6rem; }
.settle-chart-label { font-size: .75rem; color: var(--text-muted); text-align: right; }
.settle-chart-track { height: 10px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; }
.settle-chart-bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width .2s; }
.settle-chart-count { font-size: .75rem; color: var(--text-muted); }
.settle-warn-badge {
    display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 600;
    color: #eb9090; background: rgba(224,96,96,.1); border: 1px solid rgba(224,96,96,.3);
    border-radius: 99px; padding: .1rem .5rem; text-decoration: none; white-space: nowrap;
}
.settle-warn-badge:hover { background: rgba(224,96,96,.2); }
