/* Kaldris website, shared styles (mockup v0.306). Plain CSS, no external fonts or CDNs. */
:root {
  --bg: #14100c;
  --stone: #2a1f16;
  --stone-2: #3a2a1c;
  --gold: #e8b84a;
  --gold-line: #c9a14a;
  --parch: #d6c8a4;
  --parch-2: #c9b98f;
  --ink: #1a1208;
  --btn: #5a3a22;
  --btn-line: #7a5a3a;
  --muted: #a99a7a;
  --green: #6fbf5a;
  --red: #c4553c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: #e6d8b8;
  background-color: var(--bg);
}
/* (v0.307, Tim: "the same background we used for the launcher ... kind of faded in the background")
   The launcher's picture (R2 site/background.png), blurred and darkened behind everything, with the
   old vignette on top; panels and the wiki parchment stay opaque so all text reads as before. */
body::before {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 60%),
    linear-gradient(rgba(20, 16, 12, 0.35), rgba(20, 16, 12, 0.35)),
    url(/background.png) center / cover no-repeat,
    var(--bg);
  filter: blur(5px) brightness(0.42) saturate(0.85);
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 6px; display: block; }
.brand .brand-logo { width: auto; height: 60px; border-radius: 0; }
.wordmark { font-weight: bold; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 0 #000; }

/* ---------- panels, buttons, inputs ---------- */
.panel { background: var(--stone); border: 2px solid var(--gold-line); border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.btn {
  display: inline-block; cursor: pointer;
  background: var(--btn); color: var(--gold); border: 2px solid var(--btn-line); border-radius: 6px;
  padding: 10px 20px; font: bold 1rem Georgia, serif; letter-spacing: 0.04em; text-align: center;
}
.btn:hover { background: #6b4528; text-decoration: none; border-color: var(--gold-line); }
.btn.big { font-size: 1.35rem; padding: 16px 38px; letter-spacing: 0.1em; text-transform: uppercase; }
.btn.small { padding: 6px 14px; font-size: 0.9rem; }
.btn.ghost { background: transparent; }
input[type=text], input[type=password], input[type=search] {
  width: 100%; padding: 11px 12px; font: 1rem Georgia, serif;
  color: #f0e4c4; background: #1a130d; border: 2px solid var(--btn-line); border-radius: 6px;
}
input:focus { outline: none; border-color: var(--gold); }
input::placeholder { color: #8a7a5c; }
label { display: block; margin: 0 0 6px; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small-note { font-size: 0.85rem; color: var(--muted); }

/* ---------- login page ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login { width: 100%; max-width: 400px; padding: 36px 32px 28px; text-align: center; }
.login .logo { width: 96px; height: 96px; border-radius: 14px; display: block; margin: 0 auto 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6); }
.login .logo-wide { display: block; width: min(100%, 300px); height: auto; margin: 0 auto 26px; }
.login .wordmark { font-size: 1.9rem; display: block; margin-bottom: 26px; padding-left: 0.28em; }
.login form { text-align: left; }
.field { margin-bottom: 16px; }
.login .btn { width: 100%; margin-top: 6px; }
.login .signup { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid #4a3822; }
.login .signup p { margin: 0 0 4px; }
.footer-links { margin-top: 22px; font-size: 0.85rem; color: var(--muted); }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold); }
.site-foot { text-align: center; padding: 8px 16px 72px; font-size: 0.85rem; color: var(--muted); }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--gold); }
a.head { color: inherit; text-decoration: none; }
a.head:hover h2 { text-decoration: underline; }
.sidebar h3 a { color: inherit; }

/* ---------- top bar (home + wiki) ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px; padding: 10px 24px;
  background: var(--stone); border-bottom: 2px solid var(--gold-line);
  position: sticky; top: 0; z-index: 10;
}
.topbar .wordmark { font-size: 1.15rem; }
.topbar .spacer { flex: 1; }
.topbar .search { flex: 0 1 360px; }
.topbar .search input { padding: 8px 12px; }
.userbox { display: flex; align-items: center; gap: 12px; }
.user { color: #f0e4c4; font-size: 1rem; cursor: default; }
.menu-btn { display: none; }

/* ---------- home ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; margin-bottom: 24px; background: linear-gradient(180deg, var(--stone-2), var(--stone)); }
.hero h1 { margin: 0 0 6px; font-size: 1.7rem; color: var(--gold); letter-spacing: 0.06em; }
.hero p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { display: flex; flex-direction: column; padding: 22px 22px 20px; }
.tile .head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tile svg { width: 30px; height: 30px; flex: none; stroke: var(--gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile h2 { margin: 0; font-size: 1.2rem; color: var(--gold); }
.tile p { margin: 0 0 14px; color: #cdbf9f; line-height: 1.45; }
.tile .action { margin-top: auto; align-self: flex-start; }
.tile.wide { grid-column: span 2; }
/* (v0.307, Tim: "make the block server status smaller and put account settings underneath it") The
   third column stacks a slim Server status over Account; Report is a bar across the whole row. */
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack .tile:last-child { flex: 1; }
.tile.compact { padding: 14px 22px; }
.tile.compact .head { margin-bottom: 6px; }
.tile.compact .head svg { width: 24px; height: 24px; }
.tile.bar { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 22px; }
.tile.bar .head, .tile.bar p { margin: 0; }
.tile.bar .action { margin: 0 0 0 auto; align-self: center; }
.article h2.clear { clear: both; }
.tile form { margin-top: 4px; display: flex; gap: 8px; }
.tile form input { flex: 1; min-width: 0; }
.news { list-style: none; margin: 0 0 14px; padding: 0; }
.news li { padding: 8px 0; border-top: 1px solid #4a3822; font-size: 0.92rem; line-height: 1.4; color: #cdbf9f; }
.news li:first-child { border-top: 0; padding-top: 0; }
.news b { color: var(--gold); margin-right: 6px; }
.status { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #f0e4c4; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex: none; }
.pill { display: inline-block; padding: 2px 10px; border: 1px solid var(--btn-line); border-radius: 12px; font-size: 0.8rem; color: var(--muted); }

/* ---------- wiki ---------- */
.wiki { display: flex; align-items: flex-start; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 24px; }
.sidebar { flex: 0 0 220px; padding: 16px 14px; position: sticky; top: 76px; }
.sidebar h3 { margin: 0 0 10px; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar > ul > li > a, .sidebar > ul > li > span { display: block; padding: 7px 10px; border-radius: 5px; color: #e6d8b8; }
.sidebar > ul > li > a:hover { background: var(--stone-2); text-decoration: none; }
.sidebar .open > a { color: var(--gold); font-weight: bold; }
.sidebar .sub { margin: 2px 0 6px 12px; padding-left: 8px; border-left: 2px solid #4a3822; }
.sidebar .sub a { display: block; padding: 4px 8px; font-size: 0.93rem; color: #cdbf9f; border-radius: 4px; }
.sidebar .sub a:hover { color: var(--gold); text-decoration: none; }
.sidebar .sub a.current { background: var(--gold); color: var(--ink); font-weight: bold; }
.sidebar .soon { color: #6d5f48; cursor: default; }
.sidebar .soon em { font-size: 0.75rem; margin-left: 6px; font-style: normal; border: 1px solid #5a4a34; border-radius: 10px; padding: 0 6px; }

.article { flex: 1; min-width: 0; background: var(--parch); color: var(--ink); border: 2px solid var(--gold-line); border-radius: 8px; padding: 26px 34px 34px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); line-height: 1.6; }
.article::after { content: ""; display: block; clear: both; }
.crumbs { font-size: 0.88rem; color: #5a4a2a; margin-bottom: 4px; }
.crumbs a { color: #6b4a14; }
.article h1 { margin: 0 0 14px; font-size: 2.3rem; color: var(--ink); border-bottom: 2px solid var(--gold-line); padding-bottom: 6px; }
.article h2 { margin: 28px 0 10px; font-size: 1.45rem; color: #4a2f0c; border-bottom: 1px solid #a8956a; padding-bottom: 3px; }
.article p { margin: 0 0 12px; }
.article ul { margin: 0 0 12px; padding-left: 22px; }
.article li { margin-bottom: 5px; }
.article a { color: #6b3a0c; text-decoration: underline; }
.infobox { float: right; width: 300px; margin: 0 0 16px 24px; background: #e4d8b8; border: 2px solid #8a6a2a; border-radius: 6px; font-size: 0.93rem; line-height: 1.4; }
.infobox .title { background: var(--stone-2); color: var(--gold); text-align: center; font-weight: bold; padding: 8px; letter-spacing: 0.06em; border-radius: 4px 4px 0 0; }
.infobox .pic { background: #0e1a12; text-align: center; padding: 8px; border-bottom: 2px solid #8a6a2a; }
.infobox .pic img { display: block; margin: 0 auto; width: auto; max-width: 100%; height: auto; max-height: 360px; border-radius: 3px; image-rendering: auto; }  /* natural aspect: square renders are never cropped */
.infobox .pic img, .article .pic img { cursor: zoom-in; }
.zoom-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.zoom-overlay img { max-width: 92vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; image-rendering: auto; border-radius: 3px; }
.infobox .pic small { display: block; margin-top: 4px; color: #9fb09f; font-size: 0.78rem; }
.infobox table { width: 100%; border-collapse: collapse; }
.infobox th { text-align: left; width: 42%; padding: 6px 10px; background: #d2c49c; color: #3a2a10; vertical-align: top; border-top: 1px solid #b8a578; }
.infobox td { padding: 6px 10px; border-top: 1px solid #b8a578; vertical-align: top; }
.infobox .sec th { background: var(--stone-2); color: var(--gold); text-align: center; width: auto; letter-spacing: 0.08em; font-size: 0.8rem; text-transform: uppercase; }
.tablewrap { overflow-x: auto; margin-bottom: 14px; }
table.data { width: 100%; border-collapse: collapse; background: #e4d8b8; border: 2px solid #8a6a2a; font-size: 0.95rem; line-height: 1.45; }
table.data th { background: var(--stone-2); color: var(--gold); text-align: left; padding: 8px 10px; white-space: nowrap; }
table.data td { padding: 8px 10px; border-top: 1px solid #b8a578; vertical-align: top; }
table.data tr:nth-child(even) td { background: #dccfac; }
table.data img { width: 32px; height: 32px; display: block; image-rendering: pixelated; }
table.data td:first-child { white-space: nowrap; }
/* Privacy/cookies tables: sentences in both columns, so let them wrap (the nowrap above is for wiki names). */
table.data.prose td:first-child { white-space: normal; width: 45%; }
table.data td.icon { width: 48px; padding: 6px 8px; }
.ph { width: 32px; height: 32px; border: 2px dashed #8a6a2a; border-radius: 4px; background: #cdbf98; }
.tag { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 0.8rem; font-weight: bold; color: #fff; }
.tag.melee { background: #8a3a22; } .tag.ranged { background: #3a6a2a; } .tag.move { background: #a8641a; } .tag.mark { background: #8a2a2a; } .tag.adds { background: #5a3a7a; }
.seealso { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.seealso li { margin: 0; }
.seealso a { display: block; padding: 6px 14px; border: 1px solid #8a6a2a; border-radius: 16px; background: #e4d8b8; text-decoration: none; }
.seealso a:hover { background: var(--gold); }
.note { background: #e4d8b8; border-left: 4px solid #8a6a2a; padding: 8px 14px; margin: 0 0 14px; border-radius: 0 4px 4px 0; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .stack { grid-column: 1 / -1; flex-direction: row; }
  .stack .tile { flex: 1; }
  .wiki { flex-direction: column; align-items: stretch; padding: 14px 12px; gap: 14px; }
  .sidebar { flex: none; width: 100%; position: static; }
}
@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
  .topbar .wordmark { font-size: 1rem; letter-spacing: 0.2em; }
  .brand img { width: 30px; height: 30px; }
  .page { padding: 16px 12px 32px; }
  .grid { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .stack { flex-direction: column; }
  .hero { flex-direction: column; align-items: stretch; text-align: center; padding: 22px 18px; }
  .hero .btn.big { padding: 16px 12px; }
  .login { padding: 28px 20px 22px; }
  .topbar .search { order: 5; flex: 1 1 100%; }
  .menu-btn { display: inline-block; order: 6; flex: 1 1 100%; }
  .sidebar { display: none; }
  .sidebar.open-menu { display: block; }
  .article { padding: 18px 16px 24px; }
  .article h1 { font-size: 1.8rem; }
  .infobox { float: none; width: 100%; margin: 0 0 18px; }
  .userbox .user { font-size: 0.95rem; }
}
.article .muted { color: #5a4a2a; }

/* ---------- wiki additions (v0.307) ---------- */
.topbar .search { position: relative; }
.topbar .search .results { display: none; position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--stone); border: 2px solid var(--gold-line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); overflow: hidden; z-index: 20; }
.topbar .search .results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; color: #e6d8b8; border-top: 1px solid #4a3822; }
.topbar .search .results a:first-child { border-top: 0; }
.topbar .search .results a:hover { background: var(--stone-2); text-decoration: none; color: var(--gold); }
.topbar .search .results em { font-style: normal; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; align-self: center; }
form.inline { display: inline; margin: 0; }
.infobox .pic.itempic { padding: 14px; }
.infobox .pic .pic-ph { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #6f8a70; font-size: 0.85rem; border: 2px dashed #2f4a36; border-radius: 3px; }
.ico { width: 24px; height: 24px; vertical-align: middle; image-rendering: pixelated; }
.ico32 { width: 32px; height: 32px; display: block; image-rendering: pixelated; }
.ico96 { width: 96px; height: 96px; margin: 0 auto; display: block; image-rendering: pixelated; }
.ph { display: inline-block; border: 2px solid #5a4a2a; border-radius: 4px; vertical-align: middle; }
.ph.ico { width: 22px; height: 22px; } .ph.ico32 { width: 32px; height: 32px; } .ph.ico96 { width: 96px; height: 96px; border-radius: 10px; }
.itemline { display: inline-flex; align-items: center; gap: 8px; }
table.data td.icon img, table.data td.icon .ph { margin: 0; }
.article .examine { color: #4a3a1a; margin-top: -6px; }
.article h3 { margin: 18px 0 8px; font-size: 1.15rem; color: #4a2f0c; }
.article table.data a { color: #6b3a0c; }
.article .tag { color: #fff; text-decoration: none; }
.tag.magic { background: #3a4a9a; }
.article h2.clear { clear: both; }
.article table.data th a { color: var(--gold); }

/* ---------- account security (v0.308): authenticator, password, email, forgot/reset ---------- */
.panel.pad + .panel.pad { margin-top: 18px; }
.panel.pad h2 { margin: 0 0 10px; color: var(--gold); font-size: 1.25rem; }
.pill.on { color: #9fd68a; border-color: #4f7a3f; }
.ok { color: #9fd68a; min-height: 1.2em; margin: 4px 0 8px; font-size: 0.9rem; }
.qr { width: 220px; max-width: 100%; margin: 10px 0; padding: 0; border: 4px solid #fff; border-radius: 4px; background: #fff; line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; }
code { font-family: Consolas, "Courier New", monospace; letter-spacing: 0.06em; color: var(--gold); background: #1a130d; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
pre.codes { margin: 10px 0; padding: 12px 14px; background: #1a130d; border: 2px solid var(--btn-line); border-radius: 6px; color: var(--gold); font: 1.05rem Consolas, "Courier New", monospace; letter-spacing: 0.08em; columns: 2; column-gap: 24px; }
.codesbox { margin-top: 14px; padding-top: 12px; border-top: 1px solid #4a3822; }
.login .forgot { margin: 14px 0 0; text-align: center; font-size: 0.9rem; }
.login .auth-h { margin: 0 0 8px; color: var(--gold); font-size: 1.2rem; }
.login .auth-note { margin: 0 0 16px; text-align: left; }
.login .field .small-note { display: block; margin-top: 4px; }
/* (v0.308) The hidden attribute always wins: rules like .row{display:flex} would otherwise keep hidden rows on screen. */
[hidden] { display: none !important; }
/* No right-click save, drag-out or long-press menu on pictures (casual copying only; Tim 2026-10-18) */
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
