/* The Aldenreach website: old-school parchment on dark wood, from the front-page design. */
:root {
  --wood: #2b1c0e; --night: #0d0905; --gold: #e2bd62; --gold2: #f0cf78; --brass: #8a6526; --rim: #c9a24a;
  --bark: #5a3f1c; --ink: #2b1d10; --red: #7a2418; --wine: #4f150d; --cream: #efe2c2; --muted: #5c4a31;
  --parch: #ecdcb6; --panel: #1e150c; --cell: #2a1d10;
  --serif: 'Cinzel', Georgia, serif; --body: 'Crimson Pro', Georgia, serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.5;
  background-color: var(--wood);
  background-image: repeating-linear-gradient(92deg, rgba(0,0,0,.18) 0 2px, transparent 2px 9px, rgba(255,220,160,.04) 9px 11px, transparent 11px 23px);
  min-height: 100vh;
}
a { color: var(--red); }
a:hover { color: var(--wine); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 6px 10px; z-index: 9; }
.vh { position: absolute; left: -9999px; }
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; }

/* Top bar: server status and log in */
.topbar { background: var(--night); border-bottom: 1px solid #3a2410; color: #c9b48a; font-size: 15px; }
.topbar .wrap { padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; align-items: center; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #8a7a5a; margin-right: 6px; }
.dot.on { background: #6fbf6a; } .dot.off { background: #c0503a; }
.who { display: flex; gap: 16px; align-items: center; }
.who a, .who button { color: var(--gold); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* The painted header */
.hero { position: relative; height: 420px; overflow: hidden; border-bottom: 4px solid var(--night); background: #1b1830; }
.hero .sky { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.hero .title { position: absolute; left: 0; right: 0; top: 34px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 16px; text-align: center; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo span { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 900; font-size: clamp(26px, 7.4vw, 72px); line-height: 1; letter-spacing: 3px; color: var(--gold2); text-shadow: 0 2px 0 #7a4f12, 0 4px 0 #3a2208, 0 0 24px rgba(0,0,0,.6); }
.ribbon { display: inline-block; background: var(--red); color: #fff1d8; font-family: var(--serif); font-weight: 700; font-size: clamp(12px, 2.4vw, 17px); letter-spacing: 2px; padding: 6px 26px; border-top: 2px solid var(--rim); border-bottom: 2px solid var(--rim); box-shadow: 0 3px 0 #2a0c06; }
body:not([data-page="home"]) .hero { height: 230px; }
body:not([data-page="home"]) .hero .title { top: 40px; }

/* Main navigation */
.mainnav { border-top: 2px solid var(--brass); border-bottom: 3px solid var(--night); box-shadow: inset 0 1px 0 var(--bark); background: inherit; }
.mainnav .wrap { display: flex; flex-wrap: wrap; justify-content: center; }
.mainnav a { padding: 14px 22px; font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: 1px; color: var(--cream); text-decoration: none; border-right: 1px solid var(--bark); }
.mainnav a:first-child { border-left: 1px solid #1a0f04; }
.mainnav a:hover, .mainnav a.on { color: var(--gold2); background: rgba(0,0,0,.18); }

/* Buttons */
.cta { padding-top: 28px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.btn { text-decoration: none; font-family: var(--serif); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.btn.wood, button.wood { padding: 12px 22px; font-size: 17px; letter-spacing: 1px; color: #f6e7c4; background: linear-gradient(#6b4a24, #4a3015); border: 2px solid #2a1806; border-radius: 5px; box-shadow: inset 0 1px 0 #9a7444, 0 4px 0 #1a0f04; }
.btn.wood:hover { color: #fff; background: linear-gradient(#7a552b, #55381a); }
.btn.gold { gap: 14px; padding: 16px 44px; font-weight: 800; font-size: clamp(22px, 4vw, 30px); letter-spacing: 3px; color: #3a1d06; background: linear-gradient(#f6dc8e, #d9a644 55%, #b07b25); border: 3px solid #4a2a0a; border-radius: 6px; box-shadow: inset 0 2px 0 #fff3c8, inset 0 -3px 0 #8a5a18, 0 5px 0 #2a1806, 0 10px 24px rgba(0,0,0,.5); text-shadow: 0 1px 0 #fbe7a6; }
.btn.gold:hover { color: #1f0e02; filter: brightness(1.06); }
.btn.gold:active, .btn.wood:active { transform: translateY(2px); }
.btn.gold svg { width: 26px; height: 26px; fill: none; stroke: #3a1d06; stroke-width: 2.2; stroke-linecap: round; }
.btn.gold svg.flip { transform: scaleX(-1); }
.btn.small { padding: 7px 14px; font-size: 15px; }
body:not([data-page="home"]) .cta { display: none; }

/* The parchment panel */
.parch { position: relative; margin-top: 30px; background-color: var(--parch); background-image: radial-gradient(circle at 18% 12%, rgba(120,80,30,.12), transparent 40%), radial-gradient(circle at 85% 70%, rgba(120,80,30,.10), transparent 45%), radial-gradient(circle at 50% 100%, rgba(90,60,20,.14), transparent 55%); border: 6px solid #3a2410; box-shadow: 0 0 0 2px var(--rim), 0 0 0 7px #1a0f04, 0 12px 30px rgba(0,0,0,.55); padding: 26px 30px 30px; }
.parch::before, .parch::after, .parch > .c3, .parch > .c4 { content: ''; position: absolute; width: 60px; height: 60px; background: url(/site/img/corner.svg) no-repeat; background-size: 60px; pointer-events: none; }
.parch::before { top: -6px; left: -6px; }
.parch::after { top: -6px; right: -6px; transform: rotate(90deg); }
.parch > .c3 { bottom: -6px; left: -6px; transform: rotate(270deg); }
.parch > .c4 { bottom: -6px; right: -6px; transform: rotate(180deg); }
.cols { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; }
.cols > main { flex: 999 1 520px; min-width: 0; }
.cols > aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
h1.page { margin: 4px 0 0; text-align: center; font-family: var(--serif); font-weight: 800; font-size: 30px; color: var(--wine); }
.divider { display: block; height: 22px; max-width: 420px; margin: 6px auto 14px; background: url(/site/img/divider.svg) center / contain no-repeat; }
.lead { margin: 0 0 8px; text-align: center; font-size: 19px; }
h2.sec { margin: 26px 0 0; font-family: var(--serif); font-weight: 800; font-size: 24px; color: var(--wine); border-bottom: 2px solid var(--brass); padding-bottom: 6px; }
h3 { font-family: var(--serif); }

/* News */
.post { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 0; border-bottom: 1px dashed #b39a68; }
.post .pic { flex: 0 0 150px; border: 3px solid var(--bark); outline: 1px solid var(--rim); outline-offset: -6px; box-shadow: 0 3px 0 #3a2410; background: #000; align-self: flex-start; }
.post .pic img { display: block; width: 100%; height: 100px; object-fit: cover; }
.post .txt { flex: 1 1 260px; min-width: 0; }
.post.full .pic { flex-basis: 100%; }
.post.full .pic img { height: auto; max-height: 340px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { background: var(--red); color: #fff1d8; font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 2px 8px; text-transform: uppercase; }
.date { font-size: 14px; color: var(--muted); }
.post h3 { margin: 6px 0 4px; font-weight: 700; font-size: 21px; color: var(--ink); }
.post h3 a { color: inherit; text-decoration: none; }
.post p { margin: 0 0 6px; }
.more { font-weight: 700; }
.center { text-align: center; margin-top: 14px; }
.center a { font-family: var(--serif); font-weight: 700; color: var(--wine); }

/* Side boxes */
.box { position: relative; background: var(--panel); color: var(--cream); border: 3px solid var(--bark); box-shadow: 0 0 0 1px var(--rim), 0 4px 0 var(--night); padding: 6px 16px 16px; }
.box.light { background: #eadcb8; color: var(--ink); }
.box h2 { margin: 10px 0 10px; text-align: center; font-family: var(--serif); font-weight: 800; font-size: 19px; letter-spacing: 1px; color: var(--gold); }
.box.light h2 { color: var(--wine); }
.box p { margin: 0 0 10px; font-size: 15px; }
.box a { color: var(--gold); }
.box.light a { color: var(--red); }
table.worlds { width: 100%; border-collapse: collapse; font-size: 15px; }
table.worlds th { text-align: left; color: #c9b48a; font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--bark); }
table.worlds td { padding: 8px 6px; border-bottom: 1px solid #3a2a16; }
table.worlds tr:last-child td { border-bottom: 0; }
table.worlds td:last-child { text-align: right; }
table.worlds a { font-weight: 700; }
.skillgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.skillgrid a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; background: var(--cell); border: 1px solid var(--bark); border-radius: 4px; text-decoration: none; }
.skillgrid a:hover { border-color: var(--gold); background: #35260f; }
.skillgrid span { font-size: 12px; color: var(--cream); }
svg.ico { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lookup { display: flex; gap: 6px; flex-wrap: wrap; }
input, select, textarea { font: inherit; font-size: 16px; padding: 8px; border: 2px solid var(--bark); background: #fff8e6; color: var(--ink); border-radius: 0; }
.lookup input { flex: 1 1 120px; min-width: 0; }
button.go { font-family: var(--serif); font-weight: 700; font-size: 14px; padding: 8px 12px; background: var(--bark); color: #f6e7c4; border: 0; cursor: pointer; }
button.go:hover { background: #6b4a24; }

/* Explore gallery */
.explore { margin-top: 34px; }
.explore h2 { margin: 0 0 14px; text-align: center; font-family: var(--serif); font-weight: 800; font-size: 26px; letter-spacing: 1px; color: var(--gold2); text-shadow: 0 2px 0 var(--night); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery figure { margin: 0; background: var(--night); border: 3px solid var(--bark); box-shadow: 0 0 0 1px var(--rim); }
.gallery img { display: block; width: 100%; height: 170px; object-fit: cover; }
.gallery figcaption { padding: 10px 12px; font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--cream); }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .parch { padding: 22px 16px 24px; } .mainnav a { padding: 10px 12px; font-size: 14px; } .hero { height: 300px; } }

/* Tables on parchment (hiscores, world select, guide) */
table.list { width: 100%; border-collapse: collapse; font-size: 16px; }
table.list th { text-align: left; font-family: var(--serif); font-size: 14px; color: var(--wine); padding: 6px 8px; border-bottom: 2px solid var(--brass); }
table.list td { padding: 6px 8px; border-bottom: 1px dashed #c4ad7c; vertical-align: top; }
table.list td.n, table.list th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.list tr.me td { background: rgba(226,189,98,.35); font-weight: 700; }
table.list a { font-weight: 600; }
.scroll { overflow-x: auto; }
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 14px; }
.skillnav { display: flex; flex-direction: column; gap: 2px; }
.skillnav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: var(--cream); text-decoration: none; border: 1px solid transparent; }
.skillnav a:hover { background: #35260f; }
.skillnav a.on { border-color: var(--gold); background: #35260f; color: var(--gold2); }
.skillnav svg.ico { width: 22px; height: 22px; }
.note { font-size: 15px; color: var(--muted); }
.msg { min-height: 1.4em; font-size: 15px; color: var(--red); font-weight: 600; }
.msg.ok { color: #2f6b2a; }
.form { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.form label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 16px; }
.form label small { font-weight: 400; color: var(--muted); }
.form button { align-self: flex-start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: rgba(255,248,230,.6); border: 1px solid #c4ad7c; padding: 10px 12px; }
.stat b { display: block; font-family: var(--serif); font-size: 24px; color: var(--wine); }
.stat span { font-size: 14px; color: var(--muted); }

/* Guide */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs button { font-family: var(--serif); font-weight: 700; font-size: 14px; padding: 6px 12px; background: #d9c69a; color: var(--ink); border: 1px solid var(--bark); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--bark); color: #f6e7c4; }
.unlocks td:first-child { width: 4em; text-align: right; font-family: var(--serif); font-weight: 700; color: var(--wine); }
.d { color: var(--muted); font-size: .92em; }
.quest { padding: 12px 0; border-bottom: 1px dashed #b39a68; }
.quest h3 { margin: 0 0 4px; font-size: 19px; }
.quest p { margin: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.chips span { background: #d9c69a; border: 1px solid #b39a68; padding: 1px 8px; }
details.faq { border-bottom: 1px dashed #b39a68; padding: 8px 0; }
details.faq summary { cursor: pointer; font-weight: 700; }
kbd { font-family: inherit; font-size: .85em; background: #fff8e6; border: 1px solid var(--bark); border-bottom-width: 3px; padding: 0 5px; border-radius: 3px; }

.foot { margin-top: 40px; background: var(--night); border-top: 2px solid #3a2410; color: #c9b48a; font-size: 16px; }
.foot .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.foot .brand { display: flex; align-items: center; gap: 12px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--gold); }
.parch main svg.ico, .parch .lead svg.ico { stroke: var(--wine); }
table.list a { display: inline-flex; align-items: center; gap: 8px; }
h2.sec svg.ico { stroke: var(--wine); width: 28px; height: 28px; vertical-align: -4px; }
/* Membership (version 105) */
.perks { margin: 10px 0 0; padding-left: 22px; }
.perks li { margin: 6px 0; }
.offer { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.offer h3 { margin: 0; color: var(--wine); font-size: 20px; }
.offer p { margin: 6px 0 10px; font-size: 16px; }
.offer .btn.gold { font-size: 18px; padding: 10px 22px; align-self: flex-start; letter-spacing: 1px; }
.offer .btn.gold:disabled { filter: grayscale(.7) brightness(.85); cursor: not-allowed; }
.offer .lookup { align-items: center; }
.crown { color: #b8860b; }
[hidden] { display: none !important; }

/* ---- The world map (version 116) ---- */
.mapbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 10px 0 8px; }
.mapbar .tabs { margin: 0; }
.mapbar .tabs button { font-size: 13px; padding: 4px 9px; }
.maptools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 15px; }
.maptools button { width: 34px; height: 30px; font: 700 20px/1 var(--serif); background: #d9c69a; color: var(--ink); border: 1px solid var(--bark); cursor: pointer; }
.maptools label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.mapview { position: relative; height: min(72vh, 680px); min-height: 340px; background: #2c566c; border: 3px solid #3a2410; box-shadow: 0 0 0 1px var(--rim); overflow: hidden; touch-action: none; cursor: grab; }
.mapview.drag { cursor: grabbing; }
.mapview canvas { display: block; width: 100%; height: 100%; }
.maploading { position: absolute; left: 0; right: 0; top: 45%; text-align: center; color: #e8dcc0; font-size: 18px; margin: 0; }
.maptip { position: absolute; pointer-events: none; background: rgba(20,13,6,.92); color: #f6e7c4; border: 1px solid var(--brass); padding: 4px 9px; font-size: 15px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.maplegend { margin: 8px 0 0; text-align: center; }
.maptown { margin-top: 14px; padding: 12px 16px; background: rgba(255,250,235,.45); border: 1px solid #b39a68; }
.maptown h3 { margin: 0 0 4px; font-family: var(--serif); color: var(--wine); }
.maptown ul { margin: 6px 0 0; padding-left: 0; list-style: none; columns: 2 260px; font-size: 16px; }
.maptowns { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.maptowns button { text-align: left; font: inherit; font-size: 16px; padding: 8px 10px; background: rgba(255,250,235,.35); border: 1px solid #b39a68; color: var(--ink); cursor: pointer; }
.maptowns button:hover { background: rgba(255,250,235,.7); }
.maptowns small { display: block; color: var(--muted); font-size: 14px; }
