* {
    box-sizing: border-box;
}

html {
    min-width: 0;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    padding: 8px;
    background:
        radial-gradient(circle at 50% 0, rgba(51, 91, 68, .68), transparent 44%),
        linear-gradient(160deg, #0b1511 0%, #182a21 52%, #080d0b 100%);
    color: var(--nug-ink);
    font: 15px/1.4 Georgia, "Times New Roman", serif;
}

a {
    color: #24553e;
    text-underline-offset: 2px;
}

a:hover {
    color: #8a4f18;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #e2ad4f;
    outline-offset: 2px;
}

.site-frame {
    width: min(100%, 860px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #090e0c;
    outline: 1px solid rgba(213, 177, 102, .5);
    background: var(--nug-paper);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .48);
}

.hero {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-bottom: 3px double var(--nug-gold);
    background:
        linear-gradient(90deg, rgba(4, 10, 7, .96), rgba(14, 40, 29, .82) 54%, rgba(4, 10, 7, .94)),
        radial-gradient(circle at 68% 35%, #4c694c 0, transparent 38%),
        var(--nug-forest);
    color: #fff8e7;
}

.hero::before,
.hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.hero::before {
    inset: 0;
    opacity: .3;
    background:
        linear-gradient(115deg, transparent 0 45%, rgba(213, 177, 102, .16) 45% 46%, transparent 46%),
        repeating-linear-gradient(90deg, transparent 0 54px, rgba(255, 255, 255, .025) 55px);
}

.hero::after {
    right: -55px;
    bottom: -95px;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(213, 177, 102, .2);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(213, 177, 102, .035), 0 0 0 45px rgba(213, 177, 102, .025);
}

.hero-nav,
.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(213, 177, 102, .28);
    background: rgba(4, 9, 7, .36);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff8e7;
    text-decoration: none;
}

.brand:hover {
    color: #fff8e7;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #e0bd70;
    outline: 1px solid rgba(4, 9, 7, .85);
    outline-offset: -4px;
    background:
        radial-gradient(circle at 40% 32%, rgba(79, 119, 88, .45), transparent 48%),
        linear-gradient(145deg, #213b2f, #09130f);
    box-shadow:
        inset 0 0 0 2px rgba(213, 177, 102, .12),
        0 1px 3px rgba(0, 0, 0, .5);
    color: #f5d17d;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #000, 0 0 7px rgba(213, 177, 102, .2);
}

.brand-name {
    color: #f7e5b5;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: .055em;
    text-shadow: 0 2px 0 #000, 0 0 10px rgba(213, 177, 102, .12);
}

nav {
    display: flex;
    gap: 6px;
}

nav a {
    min-height: 38px;
    padding: 9px 10px 7px;
    border-bottom: 1px solid transparent;
    color: #eee4cc;
    font: 700 13px Arial, sans-serif;
    text-decoration: none;
}

nav a:hover {
    border-bottom-color: var(--nug-gold);
    color: #fff;
}

.hero-copy {
    max-width: 620px;
    padding: 14px 16px 17px;
    border-left: 2px solid rgba(213, 177, 102, .32);
}

.hero-kicker {
    margin: 0 0 3px;
    color: #e1bd6d;
    font: 700 11px/1.2 Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 4px;
    color: #fff8e7;
    font-size: clamp(23px, 5vw, 34px);
    line-height: 1.08;
    letter-spacing: -.012em;
    text-shadow: 0 2px 2px #000, 0 0 14px rgba(213, 177, 102, .09);
}

.hero-copy p:last-child {
    max-width: 560px;
    margin: 0;
    color: #d8d7ca;
    font-size: 14px;
}

main {
    padding: 10px;
    background:
        linear-gradient(rgba(242, 234, 215, .97), rgba(228, 216, 189, .97)),
        repeating-linear-gradient(0deg, transparent 0 21px, rgba(67, 57, 38, .035) 22px);
}

.notice {
    margin: 0 0 9px;
    padding: 8px 10px;
    border: 1px solid currentColor;
    border-left-width: 4px;
    background: #fffaf0;
}

.notice.error {
    color: var(--nug-danger);
}

.notice.success {
    color: var(--nug-success);
}

.rpg-section {
    min-width: 0;
    border: 1px solid var(--nug-line);
    background: rgba(255, 252, 242, .88);
}

.section-title {
    padding: 6px 9px;
    border-bottom: 1px solid #090f0c;
    background: linear-gradient(90deg, #101915, #20352b 70%, #15231d);
    color: #f4e6c4;
}

.section-title h2 {
    margin: 0;
    color: inherit;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: .02em;
}

.section-body {
    padding: 10px;
}

.section-body > :last-child {
    margin-bottom: 0;
}

.intro-body p {
    margin: 0 0 8px;
}

.style-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
    margin: 0;
    padding: 0;
    color: var(--nug-muted);
    list-style: none;
    font-size: 13px;
}

.style-list span {
    display: inline-block;
    width: 18px;
    color: #936225;
    text-align: center;
}

.entry-grid {
    display: grid;
    gap: 9px;
    margin-top: 9px;
}

.entry-panel .section-body {
    min-height: 100%;
}

form {
    display: grid;
    gap: 5px;
}

label {
    margin-top: 2px;
    color: #31332b;
    font-weight: 700;
}

input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 9px;
    border: 1px solid #8a806b;
    border-radius: 1px;
    background: #faf9f3;
    box-shadow: inset 0 1px 2px rgba(44, 35, 19, .11);
    color: var(--nug-ink);
    font: 16px Arial, sans-serif;
}

input:hover {
    border-color: #5e705f;
    background: #fdfcf7;
}

input:focus {
    border-color: #9a6e2d;
    background: #fff;
    box-shadow:
        inset 0 1px 2px rgba(44, 35, 19, .08),
        0 0 0 2px rgba(213, 177, 102, .22);
}

button,
.button-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 9px 15px;
    border: 1px solid #08120e;
    border-radius: 1px;
    background: linear-gradient(#315540, #1a382a);
    box-shadow: inset 0 1px rgba(255, 255, 255, .14);
    color: #fff8e7;
    font: 700 14px Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button-link:hover {
    border-color: #5a3515;
    background: linear-gradient(#a96f2b, #774516);
    color: #fff;
}

.captcha {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--nug-line);
    background: #fff;
}

/* ACCOUNT & AUTH V1 — a single centred entry panel.
   `.entry-grid` is the two-column login/registration pair; a recovery, reset or
   verification page has exactly one panel, so it stays one column at every
   width and is capped rather than stretched across a desktop. */
.entry-solo {
    max-width: 460px;
    margin-right: auto;
    margin-left: auto;
}

.entry-aside {
    margin: 8px 0 0;
    font-size: 13px;
}

.entry-aside a {
    color: #6a4a1d;
    text-decoration: underline;
}

.entry-aside a:hover {
    color: #8f5f1f;
}

.registration-closed {
    min-height: 132px;
    padding: 10px;
    border: 1px solid #a89774;
    border-top: 3px solid #9b7138;
    background:
        linear-gradient(105deg, rgba(168, 116, 50, .07), transparent 55%),
        #f3ead7;
    color: #3e392f;
}

.registration-closed strong {
    display: block;
    margin-bottom: 6px;
    color: #654425;
    font-size: 17px;
}

.registration-closed p {
    margin: 0 0 10px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 11px;
    border-top: 1px solid #4a3d29;
    background: #0f1713;
    color: #aaa795;
    font: 11px Arial, sans-serif;
}

@media (min-width: 680px) {
    body {
        padding: 14px;
    }

    .entry-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .entry-grid.entry-solo {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 760px) {
    body {
        background:
            linear-gradient(rgba(3, 10, 7, .54), rgba(2, 7, 5, .78)),
            url("../../imgs/bggforest.jpg") center / cover fixed no-repeat,
            #0b1511;
    }

    .hero {
        min-height: 184px;
    }

    .hero-copy {
        padding: 21px 22px 24px;
    }
}

@media (max-width: 520px) {
    body {
        padding: 5px;
    }

    .site-frame {
        outline: 0;
    }

    .hero-nav {
        align-items: flex-start;
    }

    .brand-name {
        font-size: 23px;
    }

    nav {
        flex-direction: column;
        gap: 0;
        text-align: right;
    }

    nav a {
        min-height: 34px;
        padding: 7px 4px;
    }

    .hero-copy {
        padding: 12px 12px 15px;
        border-left: 0;
    }

    main {
        padding: 7px;
    }

    .style-list {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;
        gap: 2px;
    }
}

@media (max-width: 350px) {
    .hero-nav {
        gap: 7px;
    }

    .brand {
        gap: 6px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 25px;
    }

    .brand-name {
        font-size: 21px;
    }

    nav a {
        font-size: 12px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .section-body {
        padding: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* UI SYSTEM V1: the style list carries the game's own marks instead of glyphs. */
.style-list img {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    vertical-align: middle;
}

/* ===========================================================================
   PUBLIC LANDING, KNOWLEDGE & SEO V1

   The public site — the landing page and every page under `viesas.php` — shares
   ONE stylesheet, and it is this one. There is deliberately no separate
   marketing theme: the dark forest green, the parchment content ground, the
   gold rules and the serif headings are the same tokens the game itself reads
   from `assets/css/nug-theme.css`, so the public pages look like the game a
   visitor is about to be shown rather than like an advert for it.

   Everything below is additive. The hero, `.rpg-section`, `.entry-grid`, the
   44 px control floor and the existing breakpoints are unchanged and are reused
   as-is by the new pages.
   =========================================================================== */

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 10;
    padding: 10px 14px;
    background: var(--nug-paper);
    color: var(--nug-ink);
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* A content page's hero carries a breadcrumb and a title, not a pitch, so it is
   shorter than the landing page's. */
.hero-compact {
    min-height: 0;
}

.hero-crumb {
    color: #e1bd6d;
    text-decoration: none;
}

.hero-crumb:hover {
    color: #fff;
    text-decoration: underline;
}

.hero-status {
    display: inline-block;
    margin: 8px 0 0;
    padding: 6px 10px;
    border: 1px solid rgba(213, 177, 102, .45);
    border-left-width: 3px;
    background: rgba(4, 10, 7, .42);
    color: #f0dfb4;
    font: 13px/1.35 Arial, sans-serif;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.hero-actions .button-link {
    margin-top: 0;
}

.button-primary {
    border-color: #6d4715;
    background: linear-gradient(#c08c37, #8c5f1d);
    color: #1b1206;
    font-weight: 700;
}

.button-primary:hover {
    background: linear-gradient(#d6a04a, #9c6c22);
    color: #120c04;
}

/* The secondary action is a real 44 px control, just a quieter one: on a
   pre-launch page the reading path is the primary action and login is not. */
.button-quiet {
    border-color: rgba(213, 177, 102, .55);
    background: rgba(4, 10, 7, .34);
    color: #f4e6c4;
}

.button-quiet:hover {
    border-color: #e0bd70;
    background: rgba(4, 10, 7, .55);
    color: #fff;
}

/* --- Pillar cards: one per public knowledge page ------------------------- */
.pillar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.pillar-card {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 3px 9px;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #b3a486;
    background: rgba(247, 241, 223, .8);
    color: var(--nug-ink);
    text-decoration: none;
}

.pillar-card:hover,
.pillar-card:focus-visible {
    border-color: #8a6836;
    background: #fffaee;
    color: var(--nug-ink);
    box-shadow: inset 0 0 0 1px rgba(168, 116, 50, .18);
}

.pillar-icon {
    grid-row: span 2;
    width: 24px;
    height: 24px;
}

.pillar-card strong {
    font-size: 15px;
}

.pillar-card span {
    color: var(--nug-muted);
    font: 13px/1.35 Arial, sans-serif;
    overflow-wrap: anywhere;
}

/* --- The game's own place art ------------------------------------------- */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.showcase-tile {
    margin: 0;
    border: 1px solid #b3a486;
    background: rgba(232, 220, 192, .6);
}

.showcase-tile a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.showcase-tile img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 130px;
    border-bottom: 1px solid #b3a486;
    object-fit: cover;
}

.showcase-tile figcaption {
    padding: 7px 9px;
    color: #504a3e;
    font: 700 12px/1.25 Arial, sans-serif;
}

.showcase-tile a:hover figcaption {
    color: #6a4a1d;
    text-decoration: underline;
}

.section-note {
    margin: 9px 0 0;
    color: var(--nug-muted);
    font-size: 12px;
}

.section-more {
    margin: 10px 0 0;
    font-size: 13px;
}

/* --- Content page primitives -------------------------------------------- */
.public-art {
    margin: 0 0 9px;
}

.public-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 190px;
    border: 1px solid var(--nug-line);
    object-fit: cover;
}

.rpg-section + .rpg-section,
.rpg-section + .public-art {
    margin-top: 9px;
}

.public-list,
.public-rules,
.public-related {
    margin: 0 0 9px;
    padding-left: 20px;
}

.public-list li,
.public-rules li,
.public-related li {
    margin-bottom: 5px;
}

.public-related {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-related li {
    margin: 0;
}

.public-related a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #b3a486;
    background: rgba(247, 241, 223, .8);
    text-decoration: none;
}

.public-related a:hover {
    border-color: #8a6836;
    background: #fffaee;
}

.public-contacts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px 12px;
    margin: 0;
}

.public-contacts dt {
    color: var(--nug-muted);
    font: 700 11px/1.3 Arial, sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.public-contacts dd {
    margin: 0 0 9px;
    font-size: 16px;
}

.public-contacts dd a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

/* --- The shared public footer ------------------------------------------- */
.public-footer {
    display: block;
    padding: 0;
    border-top: 1px solid #4a3d29;
    background: #0f1713;
    color: #aaa795;
}

.public-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
    padding: 4px 7px;
    border-bottom: 1px solid #2a3128;
}

.public-footer-nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0 8px;
    color: #eee4cc;
    font: 700 13px Arial, sans-serif;
    text-decoration: none;
}

.public-footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.public-footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 8px 11px;
    font: 11px Arial, sans-serif;
}

.public-footer-meta a {
    color: #d6c79f;
}

@media (min-width: 560px) {
    .pillar-grid,
    .showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-contacts {
        grid-template-columns: 160px minmax(0, 1fr);
        align-items: baseline;
    }

    .public-contacts dt {
        text-align: right;
    }
}

@media (min-width: 860px) {
    .showcase-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
