/*
 * Logged-out pages (homepage, login) in the redesign's look:
 * wood top bar, cream cards, dark footer. Self-contained - these pages do not
 * load the graphics pack or css/layout.css.
 * Markup: Templates/layout/outgame_top.tpl / outgame_bottom.tpl.
 */

:root {
    --og-wood: #2b1d12;
    --og-wood-2: #4a3220;
    --og-gold: #b8862b;
    --og-gold-2: #f0d9a0;
    --og-bg: #e9dcc0;
    --og-cream: #f7efdc;
    --og-cream-2: #e6d3a8;
    --og-line: #d6c39b;
    --og-ink: #2a2118;
    --og-muted: #6b5a45;
    --og-link: #8a5a12;
    --og-page: min(1180px, 100% - 32px);
}

html, body.og {
    margin: 0;
    padding: 0;
}

body.og {
    background: var(--og-bg);
    color: var(--og-ink);
    font-family: "Source Sans 3", "Segoe UI", Verdana, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.og a { color: var(--og-link); }
body.og a:hover { color: var(--og-wood); }

/* ---------- top bar ---------- */

.og-bar {
    background: var(--og-wood);
    border-bottom: 3px solid var(--og-gold);
}

.og-bar-inner {
    box-sizing: border-box;
    width: var(--og-page);
    margin: 0 auto;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

body.og a.og-logo,
body.og a.og-logo:visited {
    font-family: "Cinzel", Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--og-gold-2);
    text-decoration: none;
    margin-right: auto;
}

.og-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

body.og .og-nav a,
body.og .og-nav a:visited {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--og-gold-2);
    text-decoration: none;
    font-weight: 600;
}

body.og .og-nav a:hover { background: var(--og-wood-2); color: #fff; }
body.og .og-nav a.is-active { background: var(--og-wood-2); color: #fff; }
body.og .og-nav a.og-nav-cta { background: var(--og-gold); color: var(--og-wood); }
body.og .og-nav a.og-nav-cta:hover { background: var(--og-gold-2); }

/* ---------- page ---------- */

.og-main {
    flex: 1 0 auto;
    box-sizing: border-box;
    width: var(--og-page);
    margin: 22px auto 30px;
}

.og-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.og-stack { display: flex; flex-direction: column; gap: 22px; }

.og-card {
    background: var(--og-cream);
    border: 1px solid var(--og-line);
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 1px 3px rgba(43, 29, 18, 0.08);
}

.og-card h1,
.og-card h2 {
    margin: 0 0 12px;
    font-family: "Cinzel", Georgia, "Times New Roman", serif;
    color: var(--og-ink);
}

.og-card h1 { font-size: 28px; }
.og-card h2 { font-size: 19px; }
.og-card p { margin: 0 0 10px; }
.og-muted { color: var(--og-muted); font-size: 13px; }

/* buttons */
.og-btn,
body.og a.og-btn,
body.og a.og-btn:visited,
button.og-btn {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #8a6a22;
    border-radius: 999px;
    background: var(--og-cream);
    color: var(--og-wood);
    font: 700 15px "Source Sans 3", "Segoe UI", Verdana, Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.og-btn:hover { background: var(--og-gold-2); }
.og-btn.og-btn-gold,
body.og a.og-btn.og-btn-gold,
body.og a.og-btn.og-btn-gold:visited { background: var(--og-gold); border-color: #7a5a1a; color: var(--og-wood); }
.og-btn.og-btn-gold:hover { background: #cf9d3a; }
.og-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* messages */
.og-error {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #c98a6a;
    border-radius: 8px;
    background: #f6dccd;
    color: #7a2a12;
}
.og-error a { color: #7a2a12; font-weight: 700; }

/* ---------- homepage ---------- */

.og-hero {
    position: relative;
    border: 1px solid var(--og-line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 22px;
    background: #bfe0f5;
}

.og-hero img.og-hero-art {
    display: block;
    width: 100%;
    height: auto;
}

/* the signpost in the art is the register link */
.og-hero a.og-hero-sign {
    position: absolute;
    left: 37.6%;
    top: 69.5%;
    width: 15%;
    height: 15.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-decoration: none;
    font-family: "Cinzel", Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: clamp(11px, 1.35vw, 18px);
    color: var(--og-wood);
    line-height: 1.1;
}
.og-hero a.og-hero-sign small {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: clamp(9px, 0.9vw, 12px);
    font-weight: 600;
    color: var(--og-muted);
}
.og-hero a.og-hero-sign:hover { color: #7a2a12; }

.og-hero-title {
    position: absolute;
    left: 3%;
    top: 8%;
    max-width: 46%;
}
.og-hero-title h1 {
    margin: 0;
    font-family: "Cinzel", Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 3.4vw, 44px);
    color: var(--og-wood);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.og-hero-title p {
    margin: 4px 0 0;
    font-size: clamp(12px, 1.3vw, 17px);
    font-weight: 600;
    color: var(--og-wood-2);
}

.og-about ul { margin: 6px 0 12px; padding-left: 20px; }
.og-about li { margin-bottom: 4px; }

.og-stats { width: 100%; border-collapse: collapse; }
.og-stats th,
.og-stats td { padding: 6px 4px; border-bottom: 1px solid var(--og-cream-2); text-align: left; }
.og-stats td { text-align: right; font-weight: 700; }
.og-stats tr:last-child th,
.og-stats tr:last-child td { border-bottom: 0; }

.og-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.og-shots a { display: block; border: 1px solid var(--og-line); border-radius: 8px; overflow: hidden; background: #fff; }
.og-shots img { display: block; width: 100%; height: auto; }
.og-shots a:hover { border-color: var(--og-gold); }

.og-news { font-size: 14px; }
.og-news table { width: 100%; }

/* screenshot viewer */
.og-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 13, 8, 0.75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.og-lightbox[hidden] { display: none; }
.og-lightbox-box { position: relative; max-width: min(900px, 100%); max-height: 100%; overflow: auto; background: var(--og-cream); border: 2px solid var(--og-gold); border-radius: 12px; padding: 16px 20px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
.og-lightbox-box h3 { margin: 0 40px 10px 0; font-family: "Cinzel", Georgia, serif; }
.og-lightbox-box img { display: block; max-width: 100%; height: auto; margin: 0 auto 10px; border-radius: 8px; border: 1px solid var(--og-line); }
.og-lightbox-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--og-gold); background: var(--og-wood); color: var(--og-gold-2); font-size: 20px; line-height: 26px; cursor: pointer; }
.og-lightbox-box .og-btn-row { justify-content: center; }

/* ---------- info pages (manual, tutorial, rules, terms, imprint) ---------- */

.og-doc { overflow-wrap: anywhere; }
.og-doc h1 { margin-bottom: 8px; }
.og-doc h2, .og-doc h3, .og-doc h4 { font-family: "Cinzel", Georgia, serif; color: var(--og-ink); margin: 18px 0 8px; }
.og-doc h3.pop, .og-doc .popgreen { color: var(--og-ink) !important; font-size: 17px; }
.og-doc p.submenu { padding: 8px 12px; background: var(--og-cream-2); border-radius: 8px; }
.og-doc p.submenu a { font-weight: 700; }
.og-doc strong[style], .og-doc b[style], .og-doc span[style*="color"] { color: var(--og-link) !important; }
.og-doc img { max-width: 100%; height: auto; vertical-align: middle; }
/* the manual/tutorial art is drawn on white: blend it onto the card (as the village map does in game) */
.og-doc img { mix-blend-mode: multiply; }
.og-doc img[align="left"] { margin: 0 16px 8px 0; }
.og-doc img[align="right"] { margin: 0 0 8px 16px; }
.og-doc table { border-collapse: collapse; margin: 8px 0 14px; max-width: 100%; }
.og-doc table td, .og-doc table th { padding: 4px 6px; border-bottom: 1px solid var(--og-cream-2); vertical-align: top; }
.og-doc table thead th, .og-doc table thead td, .og-doc table tr.top th, .og-doc table th[colspan] { background: var(--og-cream-2); font-weight: 700; }
.og-doc table.table_data { width: 100%; font-size: 13px; }
.og-doc table.table_data td { text-align: center; }
.og-doc table.tutorial_table { width: 100%; }
.og-doc table.tutorial_table td.visual { width: 50%; text-align: center; font-weight: 600; }
.og-doc table.tutorial_table td.visual img { display: block; margin: 0 auto 6px; border-radius: 8px; border: 1px solid var(--og-line); }
.og-doc table#tutorial_nav { width: 100%; }
.og-doc table#tutorial_nav td { border: 0; }
.og-doc table#tutorial_nav td.nav_next { text-align: right; }
.og-doc table#tutorial_nav a { display: inline-block; padding: 6px 16px; border: 1px solid #8a6a22; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--og-wood); background: var(--og-cream); }
.og-doc table#tutorial_nav a:hover { background: var(--og-gold-2); }
.og-doc p.question { margin: 16px 0 4px; font-weight: 700; color: var(--og-ink); }
.og-doc p.answer { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--og-cream-2); overflow: hidden; }
.og-doc ul.rules, .og-doc ul.rules ul { padding-left: 20px; }
.og-doc ul.rules li { margin: 6px 0; }
.og-doc .terms-box { line-height: 1.55; }
.og-doc .characteristics { padding-left: 20px; }
/* ---------- classic content (activation, password, logout templates) ---------- */

/* the old sprite headings render as empty images without the pack */
.og-classic h1 img[class], .og-classic h5 img[class], .og-classic img.roman { display: none; }
.og-classic h5:empty, .og-classic h1:empty { display: none; }
.og-classic h6 { font-size: 16px; margin: 10px 0 6px; font-family: "Cinzel", Georgia, serif; }
.og-classic input.text {
    box-sizing: border-box;
    width: min(320px, 100%);
    padding: 8px 10px;
    border: 1px solid var(--og-line);
    border-radius: 8px;
    background: #fffdf7;
    font: 15px "Source Sans 3", "Segoe UI", Verdana, Arial, sans-serif;
}
.og-classic .important, .og-classic .e { font-weight: 700; }
.og-classic table th { text-align: left; padding-right: 14px; }

/* image buttons (tzbuttons.js wraps them) and the old text buttons */
body.og .tz-btn,
body.og button.trav_buttons {
    position: relative;
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #8a6a22;
    border-radius: 999px;
    background: var(--og-gold);
    color: var(--og-wood);
    font: 700 15px "Source Sans 3", "Segoe UI", Verdana, Arial, sans-serif;
    cursor: pointer;
    overflow: hidden;
}
body.og .tz-btn:hover,
body.og button.trav_buttons:hover { background: #cf9d3a; }
/* the original image input is stretched invisibly over the text button */
body.og .tz-ibtn > input[type="image"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* ---------- server info (Templates/News/newsbox1.tpl) ---------- */

.og-serverinfo h5 { display: none; }
.og-serverinfo .news table { width: 100%; border-collapse: collapse; }
.og-serverinfo .news td { padding: 5px 4px; border-bottom: 1px solid var(--og-cream-2); font-size: 14px; }
.og-serverinfo .news tr:last-child td { border-bottom: 0; }
.og-serverinfo .news font { color: inherit !important; }
.og-serverinfo br { display: none; }

/* ---------- login ---------- */

.og-form { display: grid; grid-template-columns: 140px minmax(0, 320px); gap: 10px 14px; align-items: center; margin: 16px 0; }
.og-form label { font-weight: 700; }
.og-form input.text {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--og-line);
    border-radius: 8px;
    background: #fffdf7;
    color: var(--og-ink);
    font: 15px "Source Sans 3", "Segoe UI", Verdana, Arial, sans-serif;
}
.og-form input.text:focus { outline: 2px solid var(--og-gold-2); border-color: var(--og-gold); }
.og-form .error { grid-column: 2; color: #a3361c; font-size: 13px; font-weight: 700; }
.og-form .error:empty { display: none; }
.og-countdown { font-size: 28px; font-weight: 700; text-align: center; font-family: "Cinzel", Georgia, serif; }

/* ---------- footer ---------- */

.og-footer {
    flex-shrink: 0;
    background: var(--og-wood);
    border-top: 3px solid var(--og-gold);
    color: var(--og-gold-2);
    font-size: 13px;
}
.og-footer-inner {
    box-sizing: border-box;
    width: var(--og-page);
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    justify-content: space-between;
}
body.og .og-footer a, body.og .og-footer a:visited { color: var(--og-gold-2); text-decoration: none; }
body.og .og-footer a:hover { color: #fff; }
.og-footer-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
    .og-grid { grid-template-columns: minmax(0, 1fr); }
    .og-form { grid-template-columns: minmax(0, 1fr); }
    .og-form .error { grid-column: 1; }
    .og-hero-title { max-width: 70%; }
}

@media (max-width: 700px) {
    .og-hero a.og-hero-sign small, .og-hero-title p { display: none; }
    .og-hero a.og-hero-sign { font-size: 9px; }
}

/* local rebrand: wordmark with a small tagline */
body.og a.og-logo, body.og a.og-logo:visited { display: inline-flex; flex-direction: column; line-height: 1.05; }
body.og a.og-logo .og-logo-tag { font-family: "Source Sans 3", "Segoe UI", sans-serif; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-top: 3px; }