/* Base tokens, reset, global type, and utilities. */

:root {
    --ink: #221405;
    --muted: #60492b;
    --line: #7a2b18;
    --accent: #8f2615;
    --accent-strong: #5d3210;
    --warm: #a22d16;
    --gold: #d8aa42;
    --paper: #f0d9a2;
    --text-light: #fff3cf;
    --panel-border: #682016;
    --shadow: 4px 6px 12px rgba(30, 12, 2, 0.42);
    --inset-shadow: inset 0 0 18px rgba(102, 58, 16, 0.14);
    --scrollbar-track: rgba(246, 237, 201, 0.62);
    --scrollbar-thumb: #7d321d;
    --scrollbar-thumb-hover: #5d140b;
    --scrollbar-edge: rgba(255, 249, 223, 0.78);
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

html {
    color-scheme: light;
    min-height: 100%;
    background: #0b0f14;
}

*::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

*::-webkit-scrollbar-track {
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 253, 238, 0.72), rgba(224, 204, 150, 0.48)),
        var(--scrollbar-track);
    box-shadow: inset 0 0 0 1px rgba(91, 56, 24, 0.16);
}

*::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 3px solid var(--scrollbar-edge);
    border-radius: 999px;
    background:
        linear-gradient(180deg, #b45a43, var(--scrollbar-thumb) 52%, #5d3210);
    background-clip: padding-box;
    box-shadow: inset 0 1px 0 rgba(255, 246, 205, 0.34);
}

*::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(180deg, #c16d4c, var(--scrollbar-thumb-hover) 58%, #3a1209);
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding-top: 68px;
    overflow-y: scroll;
    background: #0b0f14;
    color: var(--ink);
    font: 0.9em/1.4 "Trebuchet MS", Tahoma, Arial, sans-serif;
}

body *,
body *::before,
body *::after {
    letter-spacing: 0;
}

a {
    color: #26190e;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--warm);
}

code {
    padding: 2px 6px;
    border: 1px solid #9c7a3f;
    border-radius: 3px;
    background: #fff9df;
    color: var(--accent-strong);
    font-size: 0.9em;
}

input,
select,
textarea {
    border: 1px solid #8a6638;
    border-radius: 2px;
    background: #fff9df;
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(143, 38, 21, 0.18);
}

.shell {
    width: 100%;
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Metin2 theme fonts, tokens, and page background. */
@font-face {
    font-family: "PTSans";
    src: url("../../fonts/metin2/PT_Sans-Web-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Quattrocento";
    src: url("../../fonts/metin2/Quattrocento-Regular.ttf") format("truetype");
    font-display: swap;
}

:root {
    --m2-dark: #1f0e02;
    --m2-parchment: #f0d9a2;
    --m2-parchment-text: #f1de8e;
    --m2-crimson: #88283a;
    --m2-gold: #fece58;
}

/* --- Page background (exact Main_Page bg from MediaWiki:Common.css) ------- */
body.wiki-portal-shell {
    background: var(--wiki-page-background, url("../../media/site/Wiki_Background_25.2.png") center top / cover no-repeat fixed);
    background-color: #000000;
    color: #000000;
    font-family: "PTSans", "Trebuchet MS", "Helvetica Neue", "Nimbus Sans", "Helvetica", "Arial", sans-serif;
    font-size: 0.9em;
    line-height: 1.4;
}
