/* Mini Kingdoms — website. The look of the game: wood bars, parchment cards, gold buttons, pixel art. */
@font-face { font-family: 'Cairo'; font-weight: 500; font-display: swap; src: url(/play/assets/fonts/cairo-arabic-500-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 500; font-display: swap; src: url(/play/assets/fonts/cairo-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url(/play/assets/fonts/cairo-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url(/play/assets/fonts/cairo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Reem Kufi'; font-weight: 700; font-display: swap; src: url(/play/assets/fonts/reem-kufi-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Reem Kufi'; font-weight: 700; font-display: swap; src: url(/play/assets/fonts/reem-kufi-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --ink: #2b1d12; --ink-soft: #5a4330; --panel: #f3e3bf; --panel-dark: #5e3b1c; --card: #fffaf0; --card-edge: #b98a55;
  --bar: #3a2414; --bar-edge: #1c120c; --bar-ink: #fff3dc; --gold-1: #ffe9a8; --gold-2: #e8b547; --gold-3: #a86f1c; --gold-4: #5c3a0c;
  --green: #7cc35a; --green-d: #2f5d22; --blue: #6fb8e8; --blue-d: #1f4f78; --red: #c0392b; --ally: #2a7fc9;
  --page: #2a1a0c; --shadow: 0 4px 0 rgba(0,0,0,.25);
  --title-font: 'Reem Kufi', 'Cairo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); line-height: 1.75; font-size: 16.5px;
  background: var(--page) url(/play/assets/ui/wood.png) repeat; background-size: 256px; }
img { max-width: 100%; height: auto; }
a { color: #8a3d12; }
a:hover { color: #c0392b; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bar); border-bottom: 3px solid var(--bar-edge); box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.top .in { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff3cf; text-decoration: none; font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
.brand:hover { color: #fff; }
nav.main { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
nav.main a { color: var(--bar-ink); text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 6px 10px; border-radius: 8px; }
nav.main a:hover, nav.main a.on { background: rgba(255,255,255,.12); color: #ffe9a8; }
.lang { color: var(--bar-ink); font-weight: 700; font-size: 13px; text-decoration: none; border: 1.5px solid rgba(255,255,255,.3); border-radius: 8px; padding: 3px 9px; white-space: nowrap; }
.menu-btn { display: none; background: none; border: 0; color: #fff3cf; font-size: 26px; cursor: pointer; padding: 0 4px; }
@media (max-width: 920px) {
  .menu-btn { display: block; }
  nav.main { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--bar); flex-direction: column; padding: 8px 16px 14px; border-bottom: 3px solid var(--bar-edge); }
  nav.main.open { display: flex; }
  .top .in { position: relative; }
  .brand { flex: 1; min-width: 0; }
}
@media (max-width: 480px) { .brand span { display: none; } .top .in { gap: 10px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  padding: 10px 22px; border-radius: 12px; border: 2px solid var(--panel-dark); background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--panel-dark); transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--panel-dark); }
.btn.gold { background: linear-gradient(#ffe9a8, #e8b547 55%, #c98d2a); border-color: var(--gold-4); box-shadow: 0 4px 0 var(--gold-4); color: #3a2406; }
.btn.green { background: var(--green); border-color: var(--green-d); box-shadow: 0 4px 0 var(--green-d); color: #10240a; }
.btn.blue { background: var(--blue); border-color: var(--blue-d); box-shadow: 0 4px 0 var(--blue-d); color: #0b2236; }
.btn.big { font-size: 20px; padding: 13px 30px; }
.btn.sm { font-size: 14px; padding: 6px 14px; }
.top .btn { padding: 5px 14px; font-size: 14.5px; box-shadow: 0 3px 0 var(--gold-4); white-space: nowrap; }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff3dc; text-align: center; overflow: hidden; border-bottom: 4px solid var(--bar-edge); }
.hero .bg { position: absolute; inset: -60px 0 -20px; background-size: cover; background-position: center 65%; filter: saturate(1.05); }
.hero .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(20,12,6,.35), rgba(20,12,6,.72)); }
.hero .in { position: relative; max-width: 900px; margin: 0 auto; padding: 56px 16px 60px; }
.hero h1 { font-family: var(--title-font); font-size: clamp(34px, 7vw, 60px); margin: 8px 0 6px; line-height: 1.2; color: #fff3cf; text-shadow: 0 3px 0 #3a2208, 0 6px 14px rgba(0,0,0,.6); }
.hero p.lead { font-size: clamp(16px, 2.6vw, 20px); font-weight: 700; margin: 0 auto 26px; max-width: 640px; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.hero .emblem { width: 92px; height: 92px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.5)); }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .keeps { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.hero .keeps img { width: 54px; filter: drop-shadow(0 4px 2px rgba(0,0,0,.45)); }
.page-head { text-align: center; color: #fff3cf; padding: 34px 16px 26px; }
.page-head h1 { font-family: var(--title-font); margin: 0; font-size: clamp(28px, 5vw, 42px); text-shadow: 0 3px 0 #1c120c; line-height: 1.3; }
.page-head p { margin: 6px auto 0; max-width: 700px; color: var(--bar-ink); opacity: .9; font-weight: 700; }
.crumbs { font-size: 13px; color: var(--bar-ink); opacity: .75; margin-bottom: 6px; }
.crumbs a { color: var(--gold-1); }

/* ---------- content ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }
.sheet { background: var(--panel) url(/play/assets/ui/parchment.png); background-size: 512px; border: 3px solid var(--panel-dark); border-radius: 16px;
  box-shadow: 0 6px 0 var(--panel-dark), 0 12px 30px rgba(0,0,0,.35); padding: 26px clamp(16px, 4vw, 40px); margin: 0 auto 26px; }
.sheet.narrow { max-width: 860px; }
.sheet h2 { font-family: var(--title-font); font-size: 25px; margin: 26px 0 8px; line-height: 1.35; color: #3a2208; }
.sheet h2:first-child { margin-top: 0; }
.sheet h3 { font-size: 19px; margin: 20px 0 4px; color: #4a2c10; }
.sheet p, .sheet li { color: var(--ink); }
.sheet ul, .sheet ol { padding-inline-start: 24px; }
.sheet li { margin: 4px 0; }
.sheet figure { margin: 18px 0; }
.sheet figure img { border-radius: 10px; border: 3px solid var(--panel-dark); display: block; }
.sheet figcaption { font-size: 13.5px; color: var(--ink-soft); margin-top: 5px; text-align: center; font-weight: 700; }
.tip { background: #fff4cf; border: 2px dashed var(--gold-3); border-radius: 12px; padding: 10px 14px; margin: 14px 0; }
.tip b:first-child { color: #8a5a12; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.card { background: var(--card); border: 2px solid var(--card-edge); border-radius: 14px; padding: 14px; box-shadow: 0 3px 0 var(--card-edge); }
.card h3 { margin: 4px 0 2px; font-size: 18px; }
.card p { margin: 4px 0; font-size: 15px; }
.card .pic { display: flex; align-items: center; justify-content: center; gap: 10px; background: #e8f0d0; border-radius: 10px; min-height: 110px; padding: 8px; }
.card .pic img { width: 88px; }
.card .pic.big img { width: 120px; }
a.card { text-decoration: none; color: inherit; display: block; transition: transform .1s; }
a.card:hover { transform: translateY(-3px); }
.stats { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; padding: 0; list-style: none; }
.stats li { background: #f1e3c2; border: 1px solid var(--card-edge); border-radius: 8px; padding: 1px 8px; font-size: 13px; font-weight: 700; margin: 0; }
.cost { font-size: 13.5px; font-weight: 700; color: #6b4a1e; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 0 7px; background: #e6d3a6; margin-inline-end: 4px; }
.tag.orc { background: #d9e8c2; } .tag.good { background: #d6efc8; } .tag.bad { background: #f6d4cc; }
.features { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.feature { background: var(--card); border: 2px solid var(--card-edge); border-radius: 14px; padding: 16px; text-align: center; }
.feature .ic { font-size: 34px; line-height: 1.2; }
.feature h3 { margin: 6px 0 4px; font-size: 18px; }
.feature p { margin: 0; font-size: 15px; }
.shots { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.shots img { border-radius: 12px; border: 3px solid var(--panel-dark); width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.cta-band { text-align: center; padding: 10px 0 4px; }
.toc { background: var(--card); border: 2px solid var(--card-edge); border-radius: 12px; padding: 10px 16px; margin: 0 0 18px; }
.toc b { display: block; margin-bottom: 4px; }
.toc ol { margin: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--card); border-radius: 10px; overflow: hidden; margin: 12px 0; }
table.data th, table.data td { border: 1px solid #d9c49a; padding: 6px 8px; text-align: start; }
table.data th { background: #e9d6aa; }
.table-wrap { overflow-x: auto; }
.faq details { background: var(--card); border: 2px solid var(--card-edge); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 17px; }
.faq details p { margin: 8px 0 2px; }
.article-meta { font-size: 13.5px; color: var(--ink-soft); font-weight: 700; margin: -4px 0 14px; }

/* ---------- ad spaces ---------- */
.ad { margin: 0 auto 26px; max-width: 1180px; text-align: center; min-height: 0; }
.ad ins { display: block; }
.ad .ad-label { font-size: 11px; color: var(--bar-ink); opacity: .6; margin-bottom: 2px; }
.sheet .ad .ad-label { color: var(--ink-soft); }
.ad-preview .ad { min-height: 100px; border: 2px dashed #e8b547; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #e8b547; font-weight: 700; }
.ad-preview .ad::before { content: attr(data-name); }

/* ---------- footer ---------- */
footer.foot { background: var(--bar); border-top: 3px solid var(--bar-edge); color: var(--bar-ink); padding: 26px 16px 34px; }
footer .in { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
footer h4 { margin: 0 0 6px; color: #ffe9a8; }
footer a { color: var(--bar-ink); text-decoration: none; display: block; padding: 2px 0; font-size: 14.5px; }
footer a:hover { color: #ffe9a8; }
footer button.link { background: none; border: 0; color: var(--bar-ink); font: inherit; font-size: 14.5px; padding: 2px 0; cursor: pointer; text-align: start; }
footer .copy { grid-column: 1 / -1; font-size: 13px; opacity: .7; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .sheet { border-radius: 12px; }
  .hero .in { padding: 40px 16px 44px; }
  .hero .keeps img { width: 40px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } a.card, .btn { transition: none; } }
