/* Zezonic website. Dark fantasy look, mobile first, RTL and LTR. */
:root {
  --bg: #100e0c;
  --bg2: #17140f;
  --panel: #1d1914;
  --line: #3a3027;
  --gold: #e8c26a;
  --gold2: #c9993f;
  --text: #ede6d9;
  --muted: #a99f8f;
  --ok: #7ad17a;
  --bad: #e07a6a;
  --radius: 10px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(21px, 3.4vw, 26px); color: var(--gold); }
h3, .h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding: 40px 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
/* Visually hidden until focused (no off-screen offset: that widens RTL pages). */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 16px; top: 8px; z-index: 99; background: var(--gold); color: #000; padding: 6px 10px; }
html, body { overflow-x: hidden; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(16, 14, 12, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 22px; letter-spacing: 3px; color: var(--gold); }
.brand:hover { text-decoration: none; }
.brand.small { font-size: 18px; }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-inline-start: auto; }
.nav a, .linkbtn { color: var(--text); font-size: 15px; padding: 6px 2px; }
.nav a.on { color: var(--gold); }
.nav a.lang { color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; }
.nav-sep { width: 1px; height: 20px; background: var(--line); }
.nav-toggle, .burger { display: none; }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; }
.linkbtn:hover { color: var(--gold); }
.inline { display: inline; margin: 0; }
.status-strip { border-top: 1px solid var(--line); background: var(--bg2); font-size: 13px; color: var(--muted); padding: 3px 0; }
.status-strip a { color: var(--muted); }
.dot, .on-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); vertical-align: middle; }

@media (max-width: 980px) {
  .burger { display: flex; flex-direction: column; gap: 5px; margin-inline-start: auto; cursor: pointer; padding: 10px 4px; }
  .burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 60px; flex-direction: column; align-items: stretch; gap: 0;
         background: var(--bg2); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav a, .nav .inline, .nav .linkbtn { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: start; }
  .nav .btn-small { margin-top: 10px; text-align: center; }
  .nav a.lang { margin-top: 10px; text-align: center; }
  .nav-sep { display: none; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

/* Buttons */
.btn { display: inline-block; background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #1a1208; font-weight: 700;
       border: 0; border-radius: 8px; padding: 12px 22px; cursor: pointer; font: inherit; font-weight: 700; text-align: center; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-small { padding: 6px 14px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold2); }
.btn-danger { background: #8a2e24; color: #fff; }
.nav .btn { color: #1a1208; }

/* Hero */
.hero { position: relative; min-height: min(78vh, 640px); display: flex; align-items: flex-end;
        background: url("/static/img/hero.jpg") center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 3%, rgba(16,14,12,.45) 50%, rgba(16,14,12,.2)); }
.hero-in { position: relative; z-index: 1; padding: 48px 16px; }
.hero h1 { font-family: "Cinzel", Georgia, serif; font-size: clamp(46px, 11vw, 96px); letter-spacing: 6px; color: var(--gold); margin: 0; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.lead { font-size: clamp(17px, 2.6vw, 21px); max-width: 640px; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Cards and layout */
.cards { display: grid; gap: 16px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 16px; overflow: hidden; }
.card > *:not(img):not(a:first-child) { padding-inline: 16px; }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: 12px; }
.card time { display: block; color: var(--muted); font-size: 13px; }
form.card { padding: 18px; }
form.card > * { padding-inline: 0 !important; }
.narrow-card { max-width: 520px; }
.two-col { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.steps { padding-inline-start: 22px; }
.steps li { margin-bottom: 10px; }
.mini-rank { padding-inline-start: 22px; }
.mini-rank span { color: var(--muted); font-size: 14px; }
.more { font-weight: 600; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery img { border-radius: 8px; border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.prose p { font-size: 17px; }
.prose img.wide { border-radius: var(--radius); margin: 8px 0 20px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.toc a { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 4px 14px; font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.tabs a { border: 1px solid var(--line); border-radius: 20px; padding: 4px 14px; color: var(--text); }
.tabs a.on { border-color: var(--gold); color: var(--gold); }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Downloads */
.downloads { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 16px 0 24px; }
.dl { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); }
.dl:hover { border-color: var(--gold); text-decoration: none; }
.dl b { display: block; font-size: 21px; color: var(--gold); }
.dl span { color: var(--muted); font-size: 14px; }
.dl.off { opacity: .55; }

/* Forms */
.form { display: grid; gap: 14px; max-width: 520px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form small { color: var(--muted); font-weight: 400; }
input, select { width: 100%; background: #0c0b09; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
                padding: 11px 12px; font: inherit; font-size: 16px; }
input:focus, select:focus { outline: 2px solid var(--gold2); border-color: transparent; }
input[type=radio] { width: auto; }
fieldset.vocations { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.vocations legend { padding: 0 6px; font-weight: 600; }
.voc-pick { display: flex !important; align-items: center; gap: 6px; font-weight: 400 !important; background: var(--bg2);
            border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; cursor: pointer; }
.voc-pick:has(input:checked) { border-color: var(--gold); color: var(--gold); }
.search, .filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.search input { flex: 1 1 220px; }
.filters label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.flash { border-radius: 8px; padding: 10px 14px; margin: 16px 0; }
.flash-ok { background: #1e3320; border: 1px solid #3d6b40; }
.flash-error { background: #3a1d19; border: 1px solid #7a3a30; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 420px; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--bg2); color: var(--muted); font-weight: 600; font-size: 14px; }
tbody tr:hover { background: rgba(232, 194, 106, .05); }
table.kv { min-width: 0; }
table.kv th { width: 38%; }
table.kv td { white-space: normal; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg2); margin-top: 40px; }
.foot { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding-top: 28px; padding-bottom: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-content: start; }
.foot p { color: var(--muted); font-size: 14px; }
.copy { text-align: center; color: var(--muted); font-size: 13px; padding: 12px 16px 24px; margin: 0; }

/* Houses, auctions and the map viewer */
.warn { color: #e8a33a; }
.small { font-size: 13px; }
ul.rules { padding-inline-start: 22px; color: var(--muted); }
ul.rules li { margin-bottom: 4px; }
canvas.zmap { width: 100%; display: block; border: 1px solid var(--line); border-radius: var(--radius); background: #0c0b09; touch-action: none; cursor: default; }
canvas.zmap.big { cursor: grab; }
.map-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.legend { color: var(--muted); font-size: 14px; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; margin-inline-end: 4px; }
.sw.free { background: #7ad17a; } .sw.auction { background: #e8a33a; } .sw.owned { background: #9a8f80; }

/* Coins and store */
.balance { font-size: 18px; }
.packages { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 18px 0; }
.pkg { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 20px 14px !important; }
.pkg img { width: 72px; height: 72px; margin: 0 !important; aspect-ratio: auto; }
.pkg-coins { font-size: 30px; color: var(--gold); font-family: "Cinzel", Georgia, serif; }
.pkg-price { font-size: 22px; font-weight: 700; }
.store-item { display: flex; flex-direction: column; gap: 10px; padding: 16px !important; }
.store-head { display: flex; align-items: center; gap: 12px; }
.store-head img { width: 56px; height: 56px; margin: 0 !important; aspect-ratio: auto; }
.store-head h2 { margin: 0; color: var(--text); }
.card.soon { opacity: .75; padding: 16px !important; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pkg .btn { width: 100%; margin-top: 4px; }
.store-item .btn { width: 100%; }

/* Map viewer v2 */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: var(--panel); color: var(--text); border: 0; border-inline-end: 1px solid var(--line); padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.seg button:last-child { border-inline-end: 0; }
.seg button.on, .seg button:hover { background: var(--gold2); color: #1a1208; }
.map-box { position: relative; }
.map-tip { position: absolute; z-index: 5; pointer-events: none; background: rgba(10,9,8,.92); border: 1px solid var(--gold2); color: var(--text);
           padding: 6px 10px; border-radius: 6px; font-size: 13px; max-width: 320px; }
.lg { display: inline-block; width: 14px; height: 14px; vertical-align: middle; margin-inline-end: 4px; }
.lg.temple { background: #e8c26a; border-radius: 50% 50% 2px 2px; }
.lg.depot { background: #9b6a35; border: 1px solid #f3d27e; }
.lg.npc { background: #4fc3ff; border-radius: 50%; }
.lg.cave { background: #111; border: 2px solid #ffdc00; transform: rotate(45deg) scale(.8); }
.sw.mine { background: #e8c26a; }
