@font-face {
    font-family: 'ThroneOfDarkness';
    src: url('tos.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --night: #060604;
    --night-soft: #0b0a08;
    --wood-dark: #2b180d;
    --wood-mid: #5a341d;
    --wood-light: #7a5231;
    --wood-gold: #b59058;
    --ink: #23180f;
    --ink-soft: #4b3720;
    --parchment-dark: #ae8753;
    --parchment-mid: #d6b37d;
    --parchment-light: #efd8ab;
    --paper-line: rgba(84, 54, 23, 0.28);
    --paper-line-strong: rgba(84, 54, 23, 0.42);
    --red-accent: #7e1f19;
    --gold-soft: #8b6533;
    --shadow: rgba(0, 0, 0, 0.72);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #000;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(rgba(6, 7, 5, 0.10), rgba(4, 4, 3, 0.34)),
        url('../images/background.jpg') center top / cover fixed no-repeat,
        #050605;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", Georgia, "Times New Roman", serif;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 34%, transparent 22%, rgba(0, 0, 0, 0.18) 60%, rgba(0, 0, 0, 0.66) 100%),
        linear-gradient(90deg, rgba(0,0,0,.30), transparent 18%, transparent 82%, rgba(0,0,0,.30));
}

.page-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 165px 34px rgba(0, 0, 0, 0.95);
}

.site-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto 22px;
}

/* -------------------------------------------------------------------------
   ORNAMENTAL WOOD HEADER BAR
   ------------------------------------------------------------------------- */

.top-wood-header {
    position: relative;
    z-index: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 75px;
    background:
        radial-gradient(circle at 50% 45%, rgba(201, 155, 82, 0.10) 0 8%, transparent 18%),
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.00) 16%),
        linear-gradient(180deg, rgba(18, 7, 4, 0.06), rgba(0,0,0,0.42) 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.028) 0 2px, transparent 2px 15px),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.016) 0 1px, rgba(0,0,0,0.00) 1px 4px),
        linear-gradient(180deg, #5a2a19 0%, #391b10 24%, #261108 52%, #160904 100%);
    border-top: 1px solid #a78250;
    border-bottom: 1px solid #120703;
    box-shadow:
        inset 0 0 0 1px rgba(152, 110, 58, 0.82),
        inset 0 0 0 4px rgba(33, 13, 7, 0.94),
        inset 0 0 0 7px rgba(92, 59, 31, 0.42),
        inset 0 2px 0 rgba(255, 227, 174, 0.14),
        inset 0 -16px 24px rgba(0,0,0,0.48),
        0 8px 18px rgba(0,0,0,0.30);
    overflow: hidden;
}

.top-wood-header::before,
.top-wood-header::after {
    content: '';
    position: absolute;
    top: 9px;
    bottom: 9px;
    width: 24px;
    border: 1px solid rgba(177, 138, 81, 0.42);
    background:
        linear-gradient(180deg, rgba(205, 154, 83, 0.18), rgba(0,0,0,0.20)),
        repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 3px, transparent 3px 10px),
        linear-gradient(90deg, #241008, #6a4027 50%, #241008);
    box-shadow:
        inset 0 0 0 2px rgba(27, 10, 6, 0.88),
        inset 0 0 0 5px rgba(108, 74, 39, 0.26),
        0 0 8px rgba(0,0,0,0.20);
}

.top-wood-header::before { left: 14px; }
.top-wood-header::after { right: 14px; }

.top-wood-header .wood-emblem {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translateY(-50%) rotate(45deg);
    border: 1px solid rgba(193, 151, 84, 0.52);
    background:
        radial-gradient(circle at 50% 50%, rgba(214, 169, 94, 0.24) 0 18%, rgba(74, 21, 16, 0.24) 19% 52%, transparent 54%),
        linear-gradient(180deg, #6d402a, #2a110a 100%);
    box-shadow:
        inset 0 0 0 2px rgba(29, 12, 7, 0.90),
        inset 0 0 0 5px rgba(100, 66, 36, 0.30),
        0 0 8px rgba(0,0,0,0.24);
}

.top-wood-header .wood-emblem::before,
.top-wood-header .wood-emblem::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(197, 154, 88, 0.26);
}

.top-wood-header .wood-emblem::before {
    inset: 6px;
}

.top-wood-header .wood-emblem::after {
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(207, 165, 91, 0.24), rgba(86, 35, 23, 0.10));
}

.wood-emblem-left { left: 82px; }
.wood-emblem-right { right: 82px; }
.wood-emblem-center {
    left: 50%;
    width: 46px;
    height: 46px;
    transform: translate(-50%, -50%) rotate(45deg);
}

.account-separator {
    margin: 0 5px;
    color: #8d4834;
}

/* -------------------------------------------------------------------------
   SCROLL SURFACE
   ------------------------------------------------------------------------- */

.scroll-surface {
    position: relative;
    z-index: 2;
    width: min(1340px, calc(100% - 4px));
    min-height: 100vh;
    margin: -75px auto 0;
    padding: 118px 168px 260px;
    background: url('../images/scroll-panel.png') center top / 102% 100vh no-repeat;
}

.scroll-surface::before {
    content: '';
    position: absolute;
    left: 168px;
    right: 168px;
    top: 118px;
    bottom: 255px;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.00) 12%, rgba(0,0,0,0.02) 100%),
        radial-gradient(circle at 15% 20%, rgba(112, 31, 25, 0.02), transparent 18%),
        radial-gradient(circle at 84% 76%, rgba(112, 31, 25, 0.018), transparent 18%);
}

.site-header,
.main-nav,
.content-panel,
.realm-stats,
.site-footer {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-account-links {
    position: absolute;
    top: 86px;
    right: 174px;
    z-index: 3;
    color: #71543a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.69rem;
    line-height: 1.6;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: right;
}

.scroll-account-links a {
    color: inherit;
    text-decoration: none;
}

.scroll-account-links a:hover {
    color: #8c261f;
}


/* -------------------------------------------------------------------------
   TITLE / BRANDING
   ------------------------------------------------------------------------- */

.site-header {
    min-height: 104px;
    padding: 8px 0 10px 96px;
}

.crest-mark {
    position: absolute;
    left: 0;
    top: 8px;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(58, 27, 16, 0.92) 0 44%, rgba(145, 30, 24, 0.88) 45% 57%, rgba(43, 20, 11, 0.96) 58% 100%);
    border: 1px solid rgba(139, 96, 52, 0.9);
    box-shadow:
        inset 0 0 0 3px rgba(31, 14, 8, 0.78),
        inset 0 0 15px rgba(0,0,0,0.75),
        0 3px 8px rgba(0,0,0,0.28);
}

.crest-mark::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(152, 111, 61, 0.62);
}

.crest-kanji {
    color: #e7d09a;
    font-family: "STKaiti", "KaiTi", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: 0.7px #57130f;
    text-shadow:
        1px 1px 0 rgba(145, 34, 28, 0.88),
        0 2px 4px rgba(0,0,0,0.85);
}

.site-branding {
    text-shadow: 0 1px 2px rgba(255,255,255,.07);
}

.section-eyebrow {
    color: #8e6541;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.site-title {
    margin-top: 5px;
    font-family: 'ThroneOfDarkness', 'Yu Mincho', 'Hiragino Mincho ProN', 'MS PMincho', serif;
    color: #332114;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.02em;
    -webkit-text-stroke: 0.9px rgba(118, 32, 25, 0.78);
    paint-order: stroke fill;
    text-shadow:
        1px 1px 0 rgba(148, 67, 49, 0.55),
        0 1px 0 rgba(255,255,255,0.08),
        0 2px 3px rgba(0,0,0,0.10);
}

.site-branding::after {
    content: '';
    display: block;
    width: min(420px, 88%);
    height: 7px;
    margin-top: 5px;
    background: linear-gradient(90deg, rgba(130, 35, 29, .86), rgba(101, 24, 20, .55) 44%, rgba(136, 38, 32, .82) 70%, transparent 100%);
    clip-path: polygon(0 34%, 10% 8%, 22% 48%, 36% 18%, 49% 66%, 62% 25%, 77% 59%, 100% 28%, 88% 73%, 72% 54%, 57% 89%, 42% 59%, 24% 92%, 8% 62%, 0 100%);
    opacity: .78;
}

.site-subtitle {
    margin-top: 10px;
    color: #6e5740;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------------------- */

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 6px 4px;
    margin: 10px auto 20px;
    padding: 10px 0 12px;
    border-top: 1px solid rgba(88, 56, 25, 0.34);
    border-bottom: 1px solid rgba(88, 56, 25, 0.34);
}

.main-nav a,
.text-link,
.site-footer a {
    color: inherit;
    text-decoration: none;
}

.main-nav a {
    position: relative;
    padding: 8px 13px;
    text-align: center;
    color: #3d2717;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 999px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #37110e;
    background: linear-gradient(180deg, rgba(120, 28, 22, 0.18), rgba(96, 20, 16, 0.12));
    box-shadow: inset 0 0 0 1px rgba(111, 31, 24, 0.18), 0 1px 0 rgba(255,255,255,0.10);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(123, 30, 24, 0.95), transparent);
}

/* -------------------------------------------------------------------------
   CONTENT AREA
   ------------------------------------------------------------------------- */

.content-panel {
    min-height: 460px;
    padding: 14px 4px 0;
}

.hero-copy {
    max-width: 620px;
    margin: 0 auto 42px;
    text-align: center;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: #291a10;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", Georgia, serif;
}

h1 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 3.45rem);
    font-weight: 700;
}

h2 {
    margin-bottom: 10px;
    color: #342115;
    font-size: 1.45rem;
    font-weight: 700;
}

h3 {
    color: #4a2b17;
    font-weight: 700;
}

p {
    color: #3e2f20;
    line-height: 1.78;
}

em {
    color: #5b221f;
}

.lead {
    color: #342418;
    font-size: 1.12rem;
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(390px, 72%);
    margin: 25px auto 29px;
    color: #7f2a23;
}

.ornament span {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(135, 99, 54, 0.7) 55%, rgba(125, 31, 25, 0.65));
}

.section-heading {
    position: relative;
    margin-bottom: 28px;
    text-align: center;
}

.section-heading::before {
    content: '墨';
    position: absolute;
    left: 50%;
    top: -28px;
    transform: translateX(-50%);
    z-index: -1;
    color: rgba(44, 22, 10, 0.08);
    font-size: 6.6rem;
    line-height: 1;
}

.section-heading h1 {
    margin-top: 6px;
    margin-bottom: 0;
}

.compact-heading {
    margin-bottom: 24px;
}

/* -------------------------------------------------------------------------
   SUB-PANELS / CARDS
   ------------------------------------------------------------------------- */

.feature-grid,
.stats-page-grid,
.account-grid {
    display: grid;
    gap: 18px;
}

.feature-grid,
.stats-page-grid {
    grid-template-columns: repeat(3, 1fr);
}

.account-grid {
    grid-template-columns: repeat(2, 1fr);
}

.feature-card,
.large-stat-card,
.account-card,
.archive-panel,
.prose-panel,
.auth-panel,
.news-item,
.empty-state {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--paper-line-strong);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.05) 15%, rgba(116, 82, 36, 0.05) 100%),
        rgba(255, 247, 230, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.14),
        0 8px 16px rgba(91, 56, 20, 0.06);
}

.feature-card::after,
.large-stat-card::after,
.account-card::after,
.archive-panel::after,
.prose-panel::after,
.auth-panel::after,
.news-item::after,
.empty-state::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(132, 96, 52, 0.12);
    pointer-events: none;
}

.feature-card > *,
.large-stat-card > *,
.account-card > *,
.archive-panel > *,
.prose-panel > *,
.auth-panel > *,
.news-item > *,
.empty-state > * {
    position: relative;
    z-index: 1;
}

.feature-card {
    min-height: 220px;
    padding: 28px 24px 24px;
}

/* Full-width feature card for highlighted announcements. */
.feature-card-wide {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 0;
    padding: 24px 30px 22px;
    border-color: rgba(101, 72, 38, 0.44);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05) 18%, rgba(116, 82, 36, 0.05) 100%),
        rgba(255, 247, 230, 0.15);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.14),
        0 8px 16px rgba(91, 56, 20, 0.06);
}

.feature-card-wide::before {
    content: '告';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
    color: rgba(51, 32, 17, 0.065);
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", Georgia, serif;
    font-size: 7.2rem;
    line-height: 1;
    pointer-events: none;
}

.feature-card-wide > * {
    position: relative;
    z-index: 1;
}

.feature-card-wide h2 {
    margin-bottom: 8px;
    color: #3e291a;
}

.feature-card-wide p:last-child {
    margin-bottom: 0;
}

/* Formal Japanese record-book treatment for the service-status ledger. */
.service-ledger {
    padding: 25px 30px 27px;
    background:
        linear-gradient(rgba(75, 48, 25, 0.18), rgba(75, 48, 25, 0.18)) 68px 16px / 1px calc(100% - 32px) no-repeat,
        repeating-linear-gradient(
            0deg,
            transparent 0 35px,
            rgba(77, 51, 27, 0.085) 35px 36px
        ),
        linear-gradient(90deg, rgba(85, 57, 28, 0.025), transparent 12%, transparent 88%, rgba(85, 57, 28, 0.025)),
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.04) 20%, rgba(112, 77, 35, 0.045) 100%),
        rgba(255, 247, 230, 0.13);
    border-color: rgba(84, 55, 28, 0.50);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.12),
        inset 0 0 24px rgba(77, 48, 20, 0.04),
        0 8px 16px rgba(91, 56, 20, 0.05);
}

.service-ledger::before {
    content: none;
}

/* Match the inset frame used by the other note / feature panels. */
.service-ledger::after {
    content: '';
    position: absolute;
    inset: 8px;
    z-index: 0;
    border: 1px solid rgba(132, 96, 52, 0.12);
    background: none;
    pointer-events: none;
}

.ledger-calligraphy {
    position: absolute;
    left: 19px;
    top: 24px;
    z-index: 1;
    width: 34px;
    color: rgba(45, 29, 17, 0.52);
    font-family: "STKaiti", "KaiTi", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 1.42rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.06em;
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.ledger-heading,
.ledger-rule,
.ledger-records {
    margin-left: 57px;
}

.ledger-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 56px;
}

.ledger-heading h2 {
    margin: 2px 0 0;
    color: #2d1d12;
    font-size: 1.58rem;
    letter-spacing: 0.02em;
}

.ledger-eyebrow {
    display: block;
    color: #745737;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ledger-seal {
    width: 40px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: rgba(109, 24, 19, 0.68);
    border: 2px solid rgba(115, 26, 20, 0.62);
    font-family: "STKaiti", "KaiTi", "Yu Mincho", serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    transform: rotate(-2deg);
    opacity: 0.74;
}

.ledger-rule {
    height: 3px;
    margin-top: 7px;
    margin-bottom: 7px;
    background:
        linear-gradient(180deg,
            rgba(65, 42, 21, 0.52) 0 1px,
            transparent 1px 2px,
            rgba(65, 42, 21, 0.22) 2px 3px
        );
}

.ledger-records {
    margin-top: 0;
    margin-bottom: 0;
}

.ledger-record {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 18px;
    min-height: 38px;
    padding: 9px 4px 8px;
    border-bottom: 1px solid rgba(74, 48, 25, 0.20);
}

.ledger-record:last-child {
    border-bottom: 0;
}

.ledger-record dt,
.ledger-record dd {
    margin: 0;
}

.ledger-record dt {
    color: #47311f;
    font-size: 0.94rem;
    letter-spacing: 0.025em;
}

.ledger-record dd {
    min-width: 84px;
    color: #25170d;
    font-family: "STKaiti", "KaiTi", "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: 1.13rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: right;
}

.ledger-record dd::before {
    content: '・';
    margin-right: 8px;
    color: rgba(70, 45, 22, 0.38);
}

.ledger-record .ledger-online {
    color: #334525;
}

@media (max-width: 620px) {
    .service-ledger {
        padding-left: 21px;
        padding-right: 21px;
    }

    .service-ledger::after,
    .ledger-calligraphy {
        display: none;
    }

    .ledger-heading,
    .ledger-rule,
    .ledger-records {
        margin-left: 0;
    }

    .ledger-record {
        gap: 10px;
    }
}

.feature-number {
    position: absolute;
    right: 16px;
    top: 8px;
    color: rgba(51, 32, 17, 0.10);
    font-size: 5.8rem;
    line-height: 1;
}

.text-link {
    display: inline-block;
    margin-top: 4px;
    color: #6a251f;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.text-link:hover {
    color: #8d2b25;
}

.news-list {
    display: grid;
    gap: 18px;
}

.news-item,
.archive-panel,
.prose-panel,
.empty-state {
    padding: 28px 30px;
}

.news-meta {
    margin-bottom: 10px;
    color: #745433;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.news-meta span {
    color: #8a2c25;
    padding: 0 4px;
}

.news-body {
    color: #3d2c1f;
    line-height: 1.74;
}

.archive-list {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--paper-line);
    border-bottom: 1px solid var(--paper-line);
}

.archive-list li {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 4px;
    border-bottom: 1px solid var(--paper-line);
}

.archive-list li:last-child {
    border-bottom: 0;
}

.archive-list em {
    color: #6f5d44;
    font-size: 0.88rem;
}

/* -------------------------------------------------------------------------
   TABLES / STATS
   ------------------------------------------------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--paper-line-strong);
    background: rgba(255, 252, 246, 0.18);
}

th,
td {
    padding: 12px 14px;
    border-right: 1px solid var(--paper-line);
    border-bottom: 1px solid var(--paper-line);
    text-align: left;
    color: #362719;
}

th:last-child,
td:last-child {
    border-right: 0;
}

tbody tr:last-child td {
    border-bottom: 0;
}

th {
    color: #4a2d1b;
    background: rgba(125, 90, 45, 0.10);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.large-stat-card {
    padding: 28px 24px;
    text-align: center;
}

.large-stat-card span,
.account-card-label,
.realm-stat-label,
.realm-stat-caption {
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
}

.large-stat-card span,
.account-card-label,
.realm-stat-label {
    color: #74522e;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.large-stat-card strong,
.account-card strong,
.realm-stat strong {
    display: block;
    color: #291a10;
    font-weight: 700;
}

.large-stat-card strong {
    margin: 10px 0 12px;
    font-size: 2.9rem;
}

.account-card {
    padding: 24px;
}

.account-card strong {
    margin-top: 8px;
    font-size: 1.12rem;
}

.account-note {
    margin-top: 20px;
}

.realm-stats {
    display: grid;
    grid-template-columns: 1fr 1px 1fr 1px 1fr;
    align-items: center;
    gap: 0;
    margin-top: 28px;
    padding: 18px 0 0;
    border-top: 1px solid rgba(88, 56, 25, 0.34);
}

.realm-stat {
    text-align: center;
}

.realm-stat strong {
    margin: 5px 0 3px;
    font-size: 2rem;
}

.realm-stat-caption {
    color: #74624c;
    font-size: 0.58rem;
    letter-spacing: 0.09em;
}

.realm-stat-divider {
    width: 1px;
    height: 52px;
    background: linear-gradient(transparent, rgba(112, 81, 43, 0.58), transparent);
}

/* -------------------------------------------------------------------------
   FORMS
   ------------------------------------------------------------------------- */

.auth-panel {
    max-width: 540px;
    margin: 0 auto;
    padding: 30px;
}

.auth-form {
    display: grid;
    gap: 9px;
}

.auth-form label {
    margin-top: 8px;
    color: #5d4228;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #291a10;
    background: rgba(255, 249, 238, 0.72);
    border: 1px solid rgba(105, 75, 38, 0.46);
    outline: none;
    box-shadow: inset 0 1px 4px rgba(110, 77, 36, 0.10);
}

.auth-form input:focus {
    border-color: rgba(119, 43, 35, 0.55);
    box-shadow:
        inset 0 1px 4px rgba(110, 77, 36, 0.10),
        0 0 0 1px rgba(119, 43, 35, 0.10);
}

.password-row {
    display: grid;
    grid-template-columns: 1fr auto;
}

.reveal-password {
    min-width: 68px;
    color: #ebd5a9;
    background: linear-gradient(#6d4628, #3f2212);
    border: 1px solid #6d4a29;
    border-left: 0;
    cursor: pointer;
}

.primary-button {
    margin-top: 18px;
    min-height: 46px;
    color: #f0dfb1;
    background:
        linear-gradient(180deg, #7d231d, #5d1713 48%, #3e0f0d);
    border: 1px solid #7b3127;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: inset 0 1px rgba(255,255,255,.12), 0 4px 10px rgba(0,0,0,.14);
}

.primary-button:hover {
    color: #fff1c8;
    background: linear-gradient(#922923, #651915);
}

.form-errors {
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid rgba(127, 44, 37, 0.42);
    background: rgba(145, 66, 53, 0.10);
}

.form-errors p {
    margin: 0;
    color: #5b221e;
}

.site-footer {
    padding: 14px 0 0;
    text-align: center;
}

.site-footer p {
    margin: 3px 0;
    color: #64513d;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.67rem;
}

/* -------------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------------- */

@media (max-width: 980px) {
    .scroll-surface {
        width: min(1220px, calc(100% - 8px));
        padding-left: 132px;
        padding-right: 132px;
        padding-bottom: 230px;
        background-size: 102% 100vh;
    }

    .scroll-surface::before {
        left: 132px;
        right: 132px;
        bottom: 228px;
    }

    .scroll-account-links {
        right: 136px;
    }
}

@media (max-width: 860px) {
    .site-shell {
        width: 100%;
    }

    .scroll-surface {
        width: min(1080px, calc(100% - 6px));
        min-height: 100vh;
        margin: -58px auto 0;
        padding: 104px 98px 208px;
        background-size: 102% 100vh;
    }

    .scroll-surface::before {
        left: 96px;
        right: 96px;
        top: 104px;
        bottom: 204px;
    }

    .scroll-account-links {
        top: 76px;
        right: 100px;
        font-size: 0.64rem;
    }

    .site-header {
        padding-left: 88px;
    }

    .site-title {
        font-size: clamp(2.15rem, 6vw, 3.7rem);
    }

    .feature-grid,
    .stats-page-grid,
    .account-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    body {
        background-attachment: scroll;
    }

    .site-shell {
        width: 100%;
    }

    .top-wood-header {
        height: 75px;
    }

    .top-wood-header::before,
    .top-wood-header::after {
        left: 8px;
        right: auto;
        width: 12px;
    }

    .top-wood-header::after {
        left: auto;
        right: 8px;
    }

    .wood-emblem-left { left: 26px; }
    .wood-emblem-right { right: 26px; }

    .scroll-surface {
        width: calc(100% - 4px);
        min-height: 100vh;
        margin: -32px auto 0;
        padding: 82px 42px 150px;
        background-size: 104% 100vh;
    }

    .scroll-surface::before {
        left: 40px;
        right: 40px;
        top: 82px;
        bottom: 146px;
    }

    .scroll-account-links {
        position: static;
        margin: 0 auto 10px;
        text-align: center;
        font-size: 0.62rem;
    }

    .site-header {
        min-height: auto;
        padding: 0 0 10px 0;
        text-align: center;
    }

    .crest-mark {
        position: relative;
        left: auto;
        top: auto;
        margin: 0 auto 14px;
    }

    .site-branding::after {
        margin-left: auto;
        margin-right: auto;
    }

    .main-nav a {
        font-size: 0.70rem;
        padding-left: 10px;
        padding-right: 10px;
    }

    .content-panel {
        padding-top: 8px;
    }

    .news-item,
    .archive-panel,
    .prose-panel,
    .empty-state,
    .feature-card,
    .large-stat-card,
    .account-card,
    .auth-panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .realm-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .realm-stat-divider {
        width: 68%;
        height: 1px;
        margin: 0 auto;
    }
}


/* -------------------------------------------------------------------------
   DOWNLOAD ARCHIVE
   ------------------------------------------------------------------------- */

.download-archive {
    padding-top: 24px;
    padding-bottom: 26px;
}

.download-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: rgba(255, 252, 246, 0.10);
    border: 1px solid rgba(84, 54, 23, 0.34);
}

.download-table th,
.download-table td {
    padding: 13px 15px;
    border-right: 0;
    border-bottom: 1px solid rgba(84, 54, 23, 0.22);
    vertical-align: middle;
}

.download-table thead th {
    color: #5c4229;
    background: rgba(111, 77, 37, 0.07);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.download-table thead th:last-child,
.download-table tbody td:last-child {
    width: 130px;
    text-align: right;
}

.download-table tbody tr:last-child td {
    border-bottom: 0;
}

.download-title {
    color: #342216;
    font-size: 1rem;
    font-weight: 600;
}

.download-action {
    white-space: nowrap;
    text-align: right;
}

.download-link {
    display: inline-block;
    color: #721b16;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 120ms ease, text-shadow 120ms ease;
}

.download-link:hover,
.download-link:focus-visible {
    color: #4b0d0a;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-shadow: 0 0 7px rgba(114, 27, 22, 0.15);
}

.download-empty {
    margin: 0;
    padding: 10px 0;
    text-align: center;
    color: #69543d;
    font-style: italic;
}

@media (max-width: 620px) {
    .download-table th,
    .download-table td {
        padding-left: 10px;
        padding-right: 10px;
    }

    .download-table thead th:last-child,
    .download-table tbody td:last-child {
        width: 105px;
    }

    .download-link {
        font-size: 0.66rem;
        letter-spacing: 0.07em;
    }
}
