
/* ── fonts ── */
@font-face {
    font-family: 'bookinsanity_remakeregular';
    src: url('../fonts/bookinsanity-baltic.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'scaly_sans_capsregular';
    src: url('../fonts/scaly-sans-caps-baltic.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'nodesto_caps_condensedregular';
    src: url('../fonts/nodesto-caps-firebolt-reduced.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'mr_eaves_sc_remakemedium_baltic';
    src: url('../fonts/mreaves-baltic.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'scaly_sans_remakeregular';
    src: url('../fonts/scaly-sans-baltic.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'MonaspiceNeNerdFont';
    src: url('../fonts/nerdfont-reduced.woff2?v=2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ── reset ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; touch-action: pan-x pan-y; }

/* ── tokens ── */
:root {
    /* ═══════════════════════════════════════════════
       FIREBO.LT — COMPLETE DESIGN TOKEN PALETTE
       ═══════════════════════════════════════════════ */

    /* ── FOUNDATIONS (unchanged) ── */
    --bg:             #d3bb95;
    --bg-warm:        #FAF7EA;
    --surface:        #efe7cf;
    --surface-light:  #f5f1e2;

    /* ── CHROME (unchanged) ── */
    --header-bg:      #713535;
    --footer-bg:      #713535;

    /* ── BORDERS (refined) ── */
    --border:         #c49a62;       /* slightly warmer, more golden */
    --border-light:   #ddd3b0;      /* kept */
    --border-ornate:  #a08050;      /* for card frames & decorative edges */

    /* ── TEXT (unchanged) ── */
    --text:           #444444;
    --text-heading:   #58180D;
    --text-muted:     #6b5a48;
    --text-faint:     #9b8a72;

    /* ── GOLD SYSTEM ── */
    --gold:           #c9a84c;      /* richer, less grey — true antique gold */
    --gold-dark:      #a07c2a;      /* deep burnished gold, not orange */
    --gold-glow:      rgba(201, 168, 76, 0.12); /* subtle gold tint for backgrounds */
    --gold-bright:    #d4b65c;      /* for hover states on gold elements */

    /* ── PRIMARY ACCENT (forest/adventure green) ── */
    --accent:         #547d6a;      /* kept — your forest green works perfectly */
    --accent-hover:   #64947e;      /* kept */
    --accent-soft:    rgba(84, 125, 106, 0.10); /* for subtle green backgrounds */

    /* ── HEADER / CRIMSON FAMILY ── */
    --crimson:        #713535;      /* = header-bg, the anchor red */
    --crimson-light:  #8c4242;      /* for hover states in header area */
    --crimson-soft:   rgba(113, 53, 53, 0.08);  /* for subtle red tints */

    /* ── BUTTONS ── */
    --btn-hero-bg:    #c9a56a;      /* kept — this is your gold button */
    --btn-hero-hover: #d4b072;      /* warmer lift on hover */
    --btn:            #c0978b;      /* */
    --btn-hover:      #ceaea4;      /*  */
    --btn-play:       #547d6a;      /* accent */
    --btn-play-hover: #64947e;      /*  */
    --btn-play-text:  #d8e5df;      /*  */
    --btn-host:       #8b5e73;      /*  */
    --btn-host-hover: #a4788d;      /*  */
    --btn-host-text:  #decfd6;      /*  */

    /* ── TAG / BADGE COLORS ── */
    /* In-Person: earthy forest */
    --tag-inperson:       #2d5a3d;
    --tag-inperson-border:#3a7550;
    --tag-inperson-bg:    rgba(45, 90, 61, 0.08);

    /* Online: deep ink blue */
    --tag-online:         #2a4a7a;
    --tag-online-border:  #4a6a9a;
    --tag-online-bg:      rgba(42, 74, 122, 0.08);

    /* Free: burnished gold */
    --tag-free:           #8a6d20;
    --tag-free-border:    #c9a84c;
    --tag-free-bg:        rgba(201, 168, 76, 0.10);

    /* Paid: subdued blood */
    --tag-paid:           #8b2020;
    --tag-paid-border:    #a83232;
    --tag-paid-text:      #efbbbb;
    --tag-paid-bg:        rgba(139, 32, 32, 0.06);

    /* Players Wanted: urgent crimson */
    --tag-players:        #8b2020;
    --tag-players-border: rgba(139, 32, 32, 0.15);
    --tag-players-bg:     rgba(139, 32, 32, 0.06);

    /* Fonts */
    --font-body:    'bookinsanity_remakeregular', Georgia, serif;
    --font-heading: 'mr_eaves_sc_remakemedium_baltic', Georgia, serif;
    --font-title:   'nodesto_caps_condensedregular', Impact, sans-serif;
    --font-ui:      'scaly_sans_remakeregular', Verdana, Geneva, sans-serif;
    --font-caps:    'scaly_sans_capsregular', Verdana, Geneva, sans-serif;
    --font-mono:    ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, Monaco, 'Courier New', monospace;
    --font-glyphs:  'MonaspiceNeNerdFont';

    /* ── SHADOWS ── */
    --shadow:         1px 4px 14px rgba(0,0,0,.15);
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
    --shadow-warm:    rgba(44, 24, 16, 0.15);
    --shadow-deep:    rgba(44, 24, 16, 0.30);

    /* ── RADIUS ── */
    --radius:         2px;
    --radius-lg:      4px;
}

/* ── base ── */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 3em; padding-right: 3em; }
li, li p { margin: 0; }

/* ── links ── */
a:link, a:visited { color: var(--text); text-decoration: underline; }
a:active { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-heading); text-decoration: underline; }

/* ── header ── */
header {
    background: var(--header-bg);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 60px;
}

/* ── logo ── */
.site-logo {
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo:link, .site-logo:visited { text-decoration: none; }
.site-logo h1 {
    font-family: var(--font-title);
    color: var(--text-heading);
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 3px rgba(0,0,0,.2);
    letter-spacing: .02em;
    text-decoration: none;
}

.header-logo-img {
    height: 44px;
    margin: 0 -6px -4px;
    vertical-align: middle;
}

.glyph {
    color: var(--bg);
    font-family: var(--font-glyphs);
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* hero */
.hero {
	position: relative;
	text-align: center;
	padding: 1.25rem 2rem 2rem;
	margin-bottom: 0.5rem;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(201,173,106,.12) 0%, transparent 60%),
		radial-gradient(ellipse at 50% 100%, rgba(201,173,106,.08) 0%, transparent 50%);
}

.hero-bar {
	position: absolute;
	left: 12px;
	right: 12px;
	height: 2px;
	background: linear-gradient(90deg, transparent 0%, var(--gold) 15%, var(--gold-dark) 50%, var(--gold) 85%, transparent 100%);
	opacity: 0.5;
}
.hero-bar:first-child { top: 8px; }
.hero-bar:last-child  { bottom: 8px; }


.hero-tagline {
	font-family: var(--font-heading);
	font-style: italic;
	font-size: .82rem;
	color: var(--gold-dark);
	margin: 0.6rem 0 0;
	letter-spacing: 0.02em;
}

.hero-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 1.25rem auto;
	max-width: 280px;
}
.hero-divider span {
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
	opacity: 0.5;
}
.hero-diamond { color: var(--gold-dark); opacity: 0.5; flex-shrink: 0; }

.badges { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 0; }

/* ── nav ── */
nav {
    display: flex;
    align-items: center;
    gap: .1rem;
    flex: 1;
}
nav > a, .dropdown > summary {
    font-family: var(--font-caps);
    font-size: .82rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: .35rem .7rem;
    border-radius: var(--radius);
    transition: background .15s, color .15s;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}
nav > a:link, nav > a:visited { color: var(--text-muted); text-decoration: none; }
nav > a:hover, .dropdown > summary:hover {
    background: rgba(0,0,0,.06);
    color: var(--text-heading);
    text-decoration: none;
}

/* ── header right ── */
.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

/* ── Button ── */
.btn-header {
    font-family: var(--font-caps);
    font-size: .78rem;
    padding: .3rem .85rem;
    border-radius: var(--radius);
    color: var(--bg);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    display: inline-block;
}
.btn-header:link, .btn-header:visited { color: var(--bg); text-decoration: none; }
.btn-header:hover { border-color: var(--text-heading); color: var(--bg); background: rgba(0,0,0,.05); text-decoration: none; }


.btn-hero {
    font-family: var(--font-caps);
    font-size: .9rem;
    padding: .5rem 2rem;
    border-radius: var(--radius);
    color: var(--text-heading);
    background: var(--btn-hero-bg);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-hero:link, .btn-hero:visited { color: var(--text-heading); text-decoration: none; }
.btn-hero:hover {
    background: var(--btn-hero-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.12);
    color: var(--text-heading);
    text-decoration: none;
}
.btn-hero:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.08); }


.btn-host {  /* ── host, create game ── */
    font-family: var(--font-caps);
    font-size: .78rem;
    color: var(--btn-host-text);
    padding: .3rem .85rem;
    border: var(--btn-host);
    border-radius: var(--radius);
    background: var(--btn-host);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: background .2s, transform .15s, box-shadow .2s;
    display: inline-block;
}
.btn-host:link, .btn-host:visited { color: var(--btn-host-text); text-decoration: none; }
.btn-host:hover {
    background: var(--btn-host-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: var(--surface-light);
    text-decoration: none;
}
.btn-host:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.08); }


.btn-play { /* ── play, join game ── */
    font-family: var(--font-caps);
    font-size: .78rem;
    color: var(--btn-play-text);
    padding: .3rem .85rem;
    border: var(--btn-play);
    border-radius: var(--radius);
    background: var(--btn-play);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: background .2s, transform .15s, box-shadow .2s;
    display: inline-block;
}
.btn-play:link, .btn-play:visited { color: var(--btn-play-text); text-decoration: none; }
.btn-play:hover {
    background: var(--btn-play-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: var(--surface-light);
    text-decoration: none;
}
.btn-play:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.08); }


.btn { /* ── generic button ── */
    font-family: var(--font-caps);
    font-size: .70rem;
    color: var(--text-muted);
    padding: .1rem .85rem;
    border: 1px solid var(--gold-glow);
    border-radius: var(--radius);
    background: var(--btn);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: background .2s, transform .15s, box-shadow .2s;
    display: inline-block;
}
.btn:link, .btn:visited { color: var(--text-muted); text-decoration: none; }
.btn:hover {
    background: var(--btn-hover);
    box-shadow: var(--shadow);
    color: var(--text-muted);
    text-decoration: none;
}
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.08); }


.btn-filter{
    font-family: var(--font-caps);
    font-size: .70rem;
    color: var(--text-muted);
    padding: .1rem .85rem;
    border: 1px solid var(--gold-glow);
    border-radius: var(--radius);
    background: var(--gold-glow);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: background .2s, transform .15s, box-shadow .2s;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    appearance: none;
}
.btn-filter:link, .btn-filter:visited { color: var(--text-muted); text-decoration: none; }
.btn-filter:hover {
    background: var(--gold-glow);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: var(--text-muted);
    text-decoration: none;
}
.btn-filter:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.08); }


/* ── dropdown ── */
.dropdown { position: relative; }
.dropdown summary { display: flex; align-items: center; gap: .3rem; }
.dropdown summary::after { content: "▾"; font-size: .65rem; color: var(--surface); }
.dropdown[open] > summary { background: rgba(0,0,0,.06); color: var(--text-heading); }
.dropdown-menu-right, .dropdown-menu-left {
    position: absolute;
    top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: .4rem;
    z-index: 200;
    max-height: clamp(300px, 55vh, 360px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-warm);
}
.dropdown-menu-right { left: 0; }
.dropdown-menu-left  { right: 0; }
.dropdown-menu-right a, .dropdown-menu-left a {
    display: block;
    padding: .38rem .6rem;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: .83rem;
    color: var(--text);
    text-decoration: none;
    transition: background .12s;
}
.dropdown-menu-right a:link, .dropdown-menu-right a:visited,
.dropdown-menu-left a:link,  .dropdown-menu-left a:visited { color: var(--text); text-decoration: none; }
.dropdown-menu-right a:hover, .dropdown-menu-left a:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu-right hr, .dropdown-menu-left hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: .4rem 0;
}
.dropdown-note {
    font-family: var(--font-ui);
    font-size: .7rem;
    color: var(--text-faint);
    padding: .4rem .6rem .2rem;
    display: block;
}

/* ── layout ── */
main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── sections ── */
section {
    background: var(--surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: .5rem;
}

section#main{background:none;border:none;padding:0}
section section { border: 1px solid var(--border-light); box-shadow: none; }
section section section { border: none; padding: 0; }
section > hr { margin-top: .75rem; border: none; border-top: 1px solid var(--border-light); }
section > img { margin-top: .75rem; max-width: 100%; }

/* ── typography ── */
h1 {
    font-family: var(--font-title);
    color: var(--text-heading);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: .02em;
    margin-bottom: .5rem;
}
h2 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: .5rem;
}
h3 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 800;
    font-size: 1.15rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: .2rem;
    margin-bottom: .4rem;
    margin-top: .75rem;
}
h4 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 800;
    font-size: 1rem;
    margin-top: .5rem;
    margin-bottom: .3rem;
}
h5 {
    font-family: var(--font-caps);
    font-weight: 900;
    font-size: .95rem;
    color: var(--text);
    margin-top: .5rem;
}
p { margin-top: .5rem; margin-bottom: .5rem; font-family: var(--font-body); font-size: 1rem; color: var(--text); }
strong { font-weight: 900; }
em { font-style: italic; }
code {
    background: #EEEEEE;
    border: 1px solid #cfcfc4;
    border-radius: 3px;
    font-family: var(--font-mono);
    color: #8b0000;
    padding: 0 3px;
    font-size: .875em;
}
pre {
    font-family: var(--font-mono);
    color: var(--text);
    font-size: .875em;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    line-height: 1.05;
    margin: .75rem 0 0;
}
blockquote {
    font-family: var(--font-ui);
    font-size: .95rem;
    box-sizing: border-box;
    margin: .75rem 0;
    padding: .5rem 1rem;
    background: #e3d1b0;
    border-top: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    box-shadow: var(--shadow-sm);
}

/* ── special content boxes ── */
.note {
    font-family: var(--font-ui);
    font-size: .95rem;
    margin: .75rem 0;
    padding: .5rem .75rem;
    background: #E0E5C1;
    border-top: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    box-shadow: var(--shadow-sm);
}
.warning {
    font-family: var(--font-ui);
    font-size: .95rem;
    margin: .75rem 0;
    padding: .5rem .75rem;
    background: #F9B4B4;
    border-top: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    box-shadow: var(--shadow-sm);
}
.descriptive {
    display: block;
    font-family: var(--font-ui);
    font-size: .95rem;
    margin: .75rem 0;
    padding: .5rem .75rem;
    background: var(--bg-warm);
    border-left: 2px solid var(--text);
    position: relative;
}
.descriptive::before, .descriptive::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text);
    border-radius: 50%;
    left: -4px;
}
.descriptive::before { top: -2px; }
.descriptive::after  { bottom: -2px; }

/* ── tables ── */
table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; min-width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: .9rem; margin-top: .75rem; }
thead { border-bottom: 2px solid var(--gold); }
th { font-family: var(--font-caps); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-heading); text-align: left; padding: .5rem .75rem; font-weight: normal; }
td { padding: .4rem .75rem; color: var(--text); border-bottom: 1px solid var(--border-light); }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(odd) { background: #E0E5C1; }
tbody tr:hover { background: #d6dab0; }

/* ── forms ── */
form { margin-top: .75rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
    font-family: var(--font-caps);
    font-size: .9rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
}
.form-group p, .form-group em { font-size: .8rem; color: var(--text-faint); font-style: normal; font-family: var(--font-ui); margin: 0; }
.form-group :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=datetime-local], textarea),
input.form-text-input {
    font-family: var(--font-ui);
    font-size: .9rem;
    color: var(--text);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .45rem .7rem;
    width: 100%;
    outline: none;
    appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-group select {
    font-family: var(--font-ui);
    font-size: .9rem;
    color: var(--text);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .45rem .7rem;
    width: 100%;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-group :is(input[type=text], input[type=email], input[type=password], textarea):hover,
input.form-text-input:hover, .form-group select:hover { border-color: var(--gold-dark); }
.form-group :is(input[type=text], input[type=email], input[type=password], textarea):focus,
input.form-text-input:focus, .form-group select:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(201,173,106,.25);
}
.form-group input[type=checkbox] {
    width: auto;
    flex: 0 0 auto;
    margin-right: 8px;
    vertical-align: middle;
    accent-color: var(--accent);
}
.form-group :is(input, select, textarea):disabled { opacity: .5; cursor: not-allowed; }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-group input[type=submit], input.form-submit-button {
    font-family: var(--font-caps);
    font-size: .78rem;
    padding: .4rem .85rem;
    background: var(--btn);
    color: var(--text-muted);
    border: 1px solid var(--gold-glow);
    border-radius: var(--radius);
    cursor: pointer;
    appearance: none;
    width: auto;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
}
.form-group input[type=submit]:hover, input.form-submit-button:hover { 
    background: var(--btn-hover);
    box-shadow: var(--shadow);
    color: var(--text-muted);
    text-decoration: none;
}
.form-group input[type=submit]:active, input.form-submit-button:active { transform: scale(.98); }
form p { margin-top: .2rem; margin-bottom: .2rem; }

/* ── dialog buttons ── */
.dialog-button {
    display: inline-block;
    padding: .45rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-family: var(--font-caps);
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s;
}
a.dialog-button:link, a.dialog-button:visited, a.dialog-button:active { color: #fff; text-decoration: none; }
a.dialog-button:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }

/* ── footer ── */
footer {
    background: var(--footer-bg);
    border-top: 2px solid var(--border);
    padding: 1.25rem 1.25rem;
}
.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
footer p { font-family: var(--font-ui); font-size: .78rem; color: var(--bg); margin: 0; }
.footer-links { gap: 1rem; }
.footer-links a { font-family: var(--font-ui); font-size: .78rem; color: var(--surface); text-decoration: none; }
.footer-links a:link, .footer-links a:visited { color: var(--bg); text-decoration: none; }
.footer-links a:hover { color: var(--bg); text-decoration: none; }

/* ── article header/footer ── */
article header {
    text-align: center;
    font-family: var(--font-ui);
    font-size: .95rem;
    margin: 1em 0;
    padding: .5em;
    background: #dcb99c;
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--text);
}
article footer {
    text-align: center;
    font-family: var(--font-ui);
    font-size: .85rem;
    margin: .75rem 0;
    padding: .75rem;
    background: #dcb99c;
    box-shadow: var(--shadow-sm);
}
article footer p { margin: .2rem 0; font-size: .85rem; }

/* ── responsive ── */
@media (max-width: 700px) {
    .header-inner { gap: .75rem; }
    .site-logo h1 { font-size: 32px; }
    .header-logo-img { height: 36px; }
    main { padding: 1rem .75rem; }
    section { padding: 1rem 1rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .hero { padding: 1rem 1.25rem 1.5rem; }
}
@media (max-width: 480px) {
    header nav > a { display: none; }
    header nav > a.nav-browse { display: block; }
    .hero { padding: .75rem 1rem 1.25rem; }
    .badges { gap: .35rem; }
    .btn-hero { font-size: .78rem; padding: .35rem .75rem; }
}

/* ── user avatars & extended profile ── */
.usr-avatar {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: 2px;
}
.usr-profile-avatar { margin-bottom: 1rem; }
.usr-profile-avatar .usr-avatar { width: 128px; height: 128px; }

.usr-ext-view { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; margin: 1rem 0; font-size: .9rem; }
.usr-ext-view dt { color: var(--text-muted); }
.usr-ext-view dd { margin: 0; }

/* Extended profile edit form */
.usr-ext { max-width: 640px; }
.usr-ext-section { margin-bottom: 1.25rem; }
.usr-ext-section-label { display: block; font-weight: 600; font-size: .875rem; color: var(--text-muted); margin-bottom: .4rem; }
.usr-ext-avatar-wrap { margin-bottom: .5rem; }
.usr-ext-avatar-wrap .usr-avatar { width: 80px; height: 80px; }
.usr-ext-checkbox { display: flex; align-items: center; gap: .4rem; font-size: .875rem; margin-bottom: .5rem; }
.usr-ext-hint { font-size: .8rem; color: var(--text-muted); margin: .25rem 0 0; }
.usr-ext-errors { background: #fff0f0; border: 1px solid #e57373; padding: .6rem 1rem; margin-bottom: 1rem; }
.usr-ext-errors li { color: #c62828; font-size: .9rem; }
.usr-ext-success { color: #2e7d32; margin-bottom: 1rem; }
.usr-ext-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.usr-ext-field label { font-size: .875rem; font-weight: 600; color: var(--text-muted); }
.usr-ext-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.usr-ext-actions a { color: var(--text-muted); font-size: .9rem; text-decoration: none; }
.usr-ext-actions a:hover { text-decoration: underline; }

/* ── multilingual field label editor ── */
.uext-lang-inputs { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .5rem; }
.uext-lang-row { display: flex; align-items: center; gap: .4rem; }
.uext-lang-code { font-family: monospace; font-size: .8rem; color: var(--text-muted); min-width: 4.5rem; }

/* ── analytics module ── */
.analytics-period-form { margin-bottom: 1.5rem; }
.analytics-presets { display: flex; gap: .4rem; margin-bottom: .75rem; flex-wrap: wrap; }
.analytics-presets a { font-size: .8rem; padding: .2rem .55rem; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; text-decoration: none; color: var(--text-muted); }
.analytics-presets a:hover { background: var(--bg); color: var(--accent); }
.analytics-date-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.analytics-date-row input[type="date"] { font-size: .875rem; padding: .25rem .4rem; border: 1px solid var(--border); background: var(--surface-light); border-radius: 3px; color: var(--text); }
.analytics-period-label { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.analytics-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin-bottom: 1.75rem; }
.analytics-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: .75rem 1rem; display: flex; flex-direction: column; }
.analytics-card-muted { opacity: .55; }
.analytics-card-value { font-size: 1.6rem; font-weight: 700; color: var(--text-heading); line-height: 1.1; }
.analytics-card-label { font-size: .72rem; color: var(--text-muted); margin-top: .3rem; text-transform: uppercase; letter-spacing: .03em; }
.analytics-bar-table .analytics-row-label { min-width: 0; }
.analytics-bar-wrap { height: 3px; background: var(--border-light); border-radius: 2px; margin-bottom: .3rem; overflow: hidden; }
.analytics-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width .15s; }
.analytics-row-text { font-size: .8rem; word-break: break-all; }
.analytics-col-count { text-align: right; width: 4.5rem; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .875rem; }
.analytics-country-code { font-size: .72rem; color: var(--text-muted); font-family: var(--font-mono); }
.analytics-note { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── admin module ── */
.admin-payload-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.admin-payload-list li { border-bottom: 1px solid var(--border); }
.admin-payload-list li:last-child { border-bottom: none; }
.admin-payload-list a { display: block; padding: .6rem .4rem; text-decoration: none; color: var(--accent); font-size: .95rem; }
.admin-payload-list a:hover { text-decoration: underline; }
.admin-warning { background: var(--crimson-soft); border: 1px solid var(--crimson); color: var(--crimson); padding: .6rem 1rem; border-radius: 3px; font-size: .875rem; margin-bottom: 1.25rem; }
.admin-field { margin-bottom: 1.25rem; }
.admin-field label { display: block; font-size: .875rem; font-weight: 600; color: var(--text-muted); margin-bottom: .35rem; }
.admin-field input[type="text"] { width: 100%; max-width: 36rem; font-size: .875rem; padding: .3rem .5rem; border: 1px solid var(--border); background: var(--surface-light); border-radius: 3px; color: var(--text); }
.admin-hint { font-size: .8rem; color: var(--text-faint); margin-top: .3rem; }
.admin-actions { margin-top: 1.5rem; }

/* ── restrictor admin ── */
.restrictor-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: .4rem; margin-bottom: 1.5rem; }
.restrictor-country-row { display: flex; flex-direction: column; gap: .2rem; padding: .3rem .4rem; border-radius: 3px; }
.restrictor-country-row:hover { background: var(--gold-glow); }
.restrictor-country-label { display: flex; align-items: center; gap: .4rem; font-size: .875rem; cursor: pointer; }
.restrictor-flag { font-size: 1.3em; line-height: 1; flex-shrink: 0; }
.restrictor-reason { width: 100%; font-size: .8rem; padding: .2rem .4rem; border: 1px solid var(--border-light); background: var(--surface-light); border-radius: 3px; color: var(--text); box-sizing: border-box; }
.analytics-drill-link { text-decoration: none; color: inherit; }
.analytics-drill-link:hover { text-decoration: underline; color: var(--accent); }
.analytics-back { margin-bottom: 1rem; font-size: .875rem; }
.analytics-back a { color: var(--text-muted); text-decoration: none; }
.analytics-back a:hover { text-decoration: underline; color: var(--accent); }
