/* LOTR+ portal frame: header with icon menu and the gold "Начать игру", parchment main column, dark sidebar with
   live blocks, footer, floating pixel items in the background. Loaded after style.css (and a page's own CSS). */
:root {
  --hdr-h: 64px;
  --side-bg: rgba(19, 15, 11, .94);
  --side-card: rgba(33, 27, 19, .92);
  --side-line: rgba(216, 178, 90, .17);
  --pin: #2b1e0f;          /* ink on parchment */
  --pin-head: #3d2608;
  --pin-muted: #6b5434;
  --pin-gold: #8a5a12;     /* gold that reads on parchment */
  --pin-line: rgba(122, 84, 24, .3);
  --card-r: 14px;
}

body.portal-frame {
  background:
    radial-gradient(ellipse 55% 45% at 50% -8%, rgba(216, 178, 90, .10), transparent 70%),
    radial-gradient(ellipse 40% 50% at 0% 40%, rgba(255, 122, 26, .05), transparent 70%),
    radial-gradient(ellipse 40% 50% at 100% 70%, rgba(216, 178, 90, .05), transparent 70%),
    linear-gradient(#0d0b08, #0a0806 60%, #080605);
  background-attachment: fixed;
}

/* ---------- header ---------- */
.ph { position: sticky; top: 0; z-index: 40; height: var(--hdr-h); flex: none;
  background: linear-gradient(180deg, rgba(16, 12, 8, .97), rgba(13, 10, 7, .93));
  border-bottom: 1px solid rgba(216, 178, 90, .2); box-shadow: 0 8px 30px rgba(0, 0, 0, .4); backdrop-filter: blur(8px); }
.ph-in { max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.ph-brand { display: flex; flex: none; align-items: center; gap: 10px; text-decoration: none; }
.ph-brand img { width: 34px; height: 34px; border-radius: 6px; image-rendering: pixelated; box-shadow: 0 0 16px rgba(246, 220, 148, .25); }
.ph-brand b { font: 600 1.45rem/1 var(--title); letter-spacing: .06em; color: var(--gold-hi); }
.ph-nav { display: flex; align-items: stretch; height: 100%; margin-left: 10px; }
.ph-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 78px; padding: 0 10px; color: #d6c6a2; text-decoration: none; font: 600 .98rem/1 var(--title); letter-spacing: .04em;
  white-space: nowrap; transition: color .15s; }
.ph-nav a svg { width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ph-nav a:hover { color: var(--gold-hi); }
.ph-nav a[aria-current="page"] { color: var(--gold-hi); }
.ph-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.ph-nav .nav-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.ph-cta { margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 18px 7px 9px; border-radius: 10px;
  color: #1a1206; text-decoration: none; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  border: 1px solid #f9e6ad; box-shadow: 0 0 0 1px #5a3f12, 0 6px 24px rgba(216, 178, 90, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .15s, filter .2s, box-shadow .2s; }
.ph-cta:hover { color: #1a1206; transform: translateY(-1px); filter: brightness(1.06);
  box-shadow: 0 0 0 1px #5a3f12, 0 10px 34px rgba(246, 220, 148, .4), inset 0 1px 0 rgba(255, 255, 255, .5); }
.ph-cta svg { width: 34px; height: 34px; flex: none; }
.ph-cta b { display: block; font: 600 1.14rem/1 var(--title); letter-spacing: .06em; }
.ph-cta small { display: block; margin-top: 3px; font: italic 600 .8rem/1.1 var(--serif); opacity: .8; }
.ph-burger { display: none; flex: none; width: 44px; height: 44px; margin-left: 4px; padding: 0; border: 1px solid rgba(216, 178, 90, .35);
  border-radius: 10px; background: rgba(216, 178, 90, .06); cursor: pointer; position: relative; }
.ph-burger span, .ph-burger span::before, .ph-burger span::after { position: absolute; left: 11px; width: 20px; height: 2px;
  background: var(--gold-hi); border-radius: 2px; transition: transform .2s, opacity .2s; content: ""; }
.ph-burger span { top: 20px; }
.ph-burger span::before { left: 0; top: -6px; }
.ph-burger span::after { left: 0; top: 6px; }
.ph.open .ph-burger span { background: transparent; }
.ph.open .ph-burger span::before { transform: translateY(6px) rotate(45deg); }
.ph.open .ph-burger span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .ph-nav a { min-width: 0; padding: 0 9px; }
}
@media (max-width: 960px) {
  .ph-burger { display: block; order: 3; }
  .ph-cta { order: 2; }
  .ph-nav { position: fixed; z-index: 39; top: var(--hdr-h); left: 0; right: 0; height: auto; margin: 0; padding: 8px 12px 14px;
    flex-direction: column; align-items: stretch; background: #110d09; border-bottom: 1px solid rgba(216, 178, 90, .25);
    box-shadow: 0 24px 40px rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .18s, transform .18s; }
  .ph.open .ph-nav { opacity: 1; pointer-events: auto; transform: none; }
  .ph-nav a { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 13px 10px; font-size: 1.15rem; border-radius: 8px; }
  .ph-nav a + a { border-top: 1px solid rgba(216, 178, 90, .08); }
  .ph-nav a[aria-current="page"] { background: rgba(216, 178, 90, .08); }
  .ph-nav a[aria-current="page"]::after { display: none; }
  .ph-nav .nav-name { max-width: none; }
}
@media (max-width: 520px) {
  :root { --hdr-h: 58px; }
  .ph-in { gap: 8px; padding: 0 10px; }
  .ph-brand b { display: none; }
  .ph-cta { padding: 6px 12px 6px 7px; gap: 7px; }
  .ph-cta svg { width: 28px; height: 28px; }
  .ph-cta small { display: none; }
  .ph-cta b { font-size: 1.02rem; }
}

/* the old header is gone from every page; full-height apps measure from the new one */
.map-page .wm { height: calc(100vh - var(--hdr-h)); height: calc(100dvh - var(--hdr-h)); }

/* ---------- floating pixel items ---------- */
.decor { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.decor i { position: absolute; display: block; width: var(--s, 56px); height: var(--s, 56px); will-change: transform; }
.decor img { width: 100%; height: 100%; image-rendering: pixelated; opacity: var(--o, .17);
  filter: sepia(1) saturate(1.6) hue-rotate(-8deg) brightness(.9) drop-shadow(0 0 10px rgba(216, 178, 90, .25));
  transform: rotate(var(--r, 0deg)); }
.decor.is-static i { transform: none !important; }
@media (max-width: 1180px) { .decor { display: none; } }

/* ---------- home top: night scene with the emblem ---------- */
.ph-hero { position: relative; isolation: isolate; overflow: hidden; height: 330px; display: grid; place-items: center; text-align: center;
  padding: 18px 16px 70px; }
.ph-hero .mountains { height: 62%; }
.ph-hero .moon { top: 14%; right: 12%; width: 70px; height: 70px; }
.ph-hero .mist { bottom: 14%; }
.ph-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; z-index: -1;
  background: linear-gradient(transparent, #0b0907); }
.emblem { display: flex; align-items: center; gap: 22px; }
.emblem .ring-badge { width: 132px; height: 132px; margin: 0; flex: none; }
.emblem .ring-badge img { inset: 27px; width: 78px; height: 78px; border-radius: 12px; }
.emblem .ring-badge text { font-size: 12px; }
.emblem-text { text-align: left; }
.emblem .eyebrow { font-size: .82rem; letter-spacing: .4em; }
.emblem h1.title { margin: 6px 0 0; font-size: clamp(3.4rem, 9vw, 5.6rem); }
@media (max-width: 560px) {
  .ph-hero { height: 270px; }
  .ph-hero .moon { width: 40px; height: 40px; top: 7%; right: 6%; }
  .emblem { flex-direction: column; gap: 6px; }
  .emblem-text { text-align: center; }
  .emblem .ring-badge { width: 104px; height: 104px; }
  .emblem .ring-badge img { inset: 21px; width: 62px; height: 62px; }
}

/* ---------- two columns: parchment main + dark sidebar ---------- */
.pl { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto 64px; padding: 0 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.pl.under-hero { margin-top: -64px; }
.pl.page-top { margin-top: 28px; }
.pl-main { min-width: 0; padding: 16px; border-radius: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; color: var(--pin);
  background:
    radial-gradient(ellipse at 18% 6%, rgba(255, 255, 255, .38), transparent 46%),
    radial-gradient(ellipse at 84% 96%, rgba(120, 80, 30, .16), transparent 52%),
    radial-gradient(circle at 50% 50%, transparent 62%, rgba(110, 70, 25, .2) 100%),
    var(--parch);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(122, 84, 24, .45), inset 0 0 0 5px var(--parch), inset 0 0 0 6px rgba(122, 84, 24, .3); }
.pl-main a { color: #7a4a0e; }
.pl-side { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 18px; background: var(--side-bg);
  border: 1px solid var(--side-line); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); }
@media (max-width: 1000px) {
  .pl { grid-template-columns: minmax(0, 1fr); }
  .pl.under-hero { margin-top: -40px; }
}
@media (max-width: 520px) {
  .pl { padding: 0 8px; gap: 14px; }
  .pl-main, .pl-side { padding: 10px; border-radius: 14px; }
}

/* inner cards of the parchment */
.pc { position: relative; padding: 24px 24px 22px; border-radius: var(--card-r); background: rgba(255, 250, 235, .5);
  border: 1px solid var(--pin-line); }
.pc-dark { color: var(--text); background:
    radial-gradient(ellipse 70% 60% at 85% 0%, rgba(216, 178, 90, .12), transparent 70%),
    linear-gradient(180deg, #221a11, #15100b); border-color: #4a3a22; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
.pc h2 { margin: 8px 0 4px; font: 600 clamp(1.7rem, 3.4vw, 2.2rem)/1.1 var(--title); color: var(--pin-head); letter-spacing: .02em; }
.pc-dark h2 { color: var(--gold-hi); }
.pc .lead { margin: 0 0 18px; color: var(--pin-muted); font-size: 1.08rem; }
.pc-dark .lead { color: var(--muted); }
.tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font: 600 .82rem/1.2 var(--title);
  letter-spacing: .14em; text-transform: uppercase; color: var(--pin-gold); background: rgba(138, 90, 18, .1); border: 1px solid rgba(138, 90, 18, .35); }
.pc-dark .tag { color: var(--gold-hi); background: rgba(216, 178, 90, .1); border-color: rgba(216, 178, 90, .35); }
.pc .btn.wide { width: 100%; margin-top: 18px; }
@media (max-width: 520px) { .pc { padding: 18px 14px 16px; } }

/* ---------- slider ---------- */
.slider { position: relative; height: 270px; border-radius: var(--card-r); overflow: hidden; color: #fff6e0; background: #120d08;
  box-shadow: inset 0 0 0 1px rgba(216, 178, 90, .25); }
.slide { position: absolute; inset: 0; display: flex; align-items: center; gap: 20px; padding: 28px 34px; opacity: 0; visibility: hidden;
  transition: opacity .7s, visibility .7s;
  background:
    linear-gradient(90deg, rgba(10, 7, 4, .92) 0%, rgba(10, 7, 4, .66) 48%, rgba(10, 7, 4, .2) 100%),
    var(--img, radial-gradient(ellipse 70% 90% at 80% 30%, var(--glow, rgba(216, 178, 90, .3)), transparent 70%)),
    linear-gradient(135deg, #1c140c, #0d0a07);
  background-size: cover; background-position: center; }
.slide.on { opacity: 1; visibility: visible; }
.slide-text { flex: 1; min-width: 0; max-width: 470px; position: relative; z-index: 1; }
.slide h3 { margin: 0 0 10px; font: 600 clamp(1.6rem, 3.2vw, 2.25rem)/1.08 var(--title); color: var(--gold-hi); letter-spacing: .02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.slide p { margin: 0; color: #e6d6b4; font-size: 1.1rem; line-height: 1.45; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.slide .btn { margin-top: 16px; }
.slide-art { flex: none; display: flex; gap: 16px; margin-left: auto; padding-right: 6px; }
.tile { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 22px; transform: rotate(var(--rot, -4deg));
  background: linear-gradient(160deg, rgba(255, 246, 212, .16), rgba(216, 178, 90, .05)), #1e160d;
  border: 1px solid rgba(246, 220, 148, .45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .55), 0 0 30px rgba(216, 178, 90, .18), inset 0 1px 0 rgba(255, 255, 255, .12); }
.tile:nth-child(2) { --rot: 5deg; margin-top: 26px; }
.tile img { width: 72px; height: 72px; image-rendering: pixelated; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.slider-dots { position: absolute; z-index: 2; left: 34px; bottom: 16px; display: flex; gap: 8px; }
.slider-dots button, .dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(246, 220, 148, .35); transition: width .25s, background .25s; }
.slider-dots button[aria-current="true"], .dots button[aria-current="true"] { width: 26px; background: var(--gold); }
@media (max-width: 680px) {
  .slider { height: 300px; }
  .slide { padding: 22px 20px 44px; align-items: flex-end; }
  .slide-art { position: absolute; top: 16px; right: 14px; gap: 8px; opacity: .9; }
  .tile { width: 70px; height: 70px; border-radius: 16px; }
  .tile img { width: 44px; height: 44px; }
  .tile:nth-child(2) { margin-top: 14px; }
  .slider-dots { left: 20px; }
}
@media (max-width: 520px) { .slide-art { display: none; } }

/* ---------- screenshot gallery ---------- */
.gal { position: relative; }
.gal-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { position: relative; scroll-snap-align: start; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; padding: 0; border: 0;
  cursor: zoom-in; background: #1b140c; box-shadow: 0 10px 24px rgba(60, 35, 10, .3), 0 0 0 1px rgba(122, 84, 24, .4); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.gal-item:hover img { transform: scale(1.04); }
.gal-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; text-align: left; color: #fff3d6;
  font: 600 1.05rem/1.2 var(--title); letter-spacing: .03em; background: linear-gradient(transparent, rgba(8, 6, 3, .85)); }
.gal-item span small { display: block; font: italic 500 .9rem/1.2 var(--serif); color: #e2cf9f; letter-spacing: 0; }
@media (max-width: 600px) { .gal-track { grid-auto-columns: 88%; } }
.arrows { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; }
.arr { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; cursor: pointer; padding: 0;
  color: var(--pin-gold); background: rgba(255, 250, 235, .7); border: 1px solid rgba(138, 90, 18, .45); font: 600 1.4rem/1 var(--title); }
.arr:hover { background: #fffaf0; color: #5a3a0c; }
.arr:disabled { opacity: .35; cursor: default; }
.pc-dark .arr { color: var(--gold-hi); background: rgba(216, 178, 90, .08); border-color: rgba(216, 178, 90, .35); }
.pc-dark .arr:hover { background: rgba(216, 178, 90, .16); color: #fff1c8; }
.dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.dots button { background: rgba(138, 90, 18, .3); }
.dots button[aria-current="true"] { background: var(--pin-gold); }
.pc-dark .dots button { background: rgba(246, 220, 148, .25); }
.pc-dark .dots button[aria-current="true"] { background: var(--gold); }

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(5, 4, 2, .9);
  backdrop-filter: blur(4px); cursor: zoom-out; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 90px); border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.lightbox p { margin: 12px 0 0; text-align: center; color: var(--gold-hi); font: 600 1.2rem/1.2 var(--title); }

/* ---------- features ---------- */
.feat-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 28px) / 3); gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 0 4px; }
.feat-track::-webkit-scrollbar { display: none; }
.feat { scroll-snap-align: start; padding: 20px 18px 18px; border-radius: 12px; background: rgba(255, 246, 220, .04);
  border: 1px solid rgba(216, 178, 90, .18); transition: border-color .2s, transform .2s, background .2s; }
.feat:hover { border-color: rgba(216, 178, 90, .45); background: rgba(255, 246, 220, .07); transform: translateY(-2px); }
.feat img { width: 46px; height: 46px; image-rendering: pixelated; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55)); }
.feat h3 { margin: 12px 0 8px; font: 600 1.32rem/1.15 var(--title); color: var(--gold-hi); }
.feat p { margin: 0; color: #d2c3a3; font-size: 1.04rem; line-height: 1.45; }
.feat-bar { height: 4px; margin-top: 14px; border-radius: 4px; background: rgba(216, 178, 90, .12); overflow: hidden; }
.feat-bar i { display: block; height: 100%; width: 30%; border-radius: 4px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
  transition: margin-left .3s, width .3s; }
@media (max-width: 860px) { .feat-track { grid-auto-columns: calc((100% - 14px) / 2); } }
@media (max-width: 560px) { .feat-track { grid-auto-columns: 84%; } }

/* ---------- great builds ---------- */
.lm-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lm { padding: 12px 14px 12px 16px; border-left: 2px solid rgba(138, 90, 18, .45); border-radius: 0 10px 10px 0; background: rgba(255, 252, 242, .45); }
.lm b { display: block; font: 600 1.22rem/1.15 var(--title); color: var(--pin-head); }
.lm small { display: block; margin-bottom: 2px; font: 600 .78rem/1.2 var(--title); letter-spacing: .14em; text-transform: uppercase; color: var(--pin-gold); }
.lm p { margin: 4px 0 0; font-size: 1.02rem; line-height: 1.4; color: #4a3519; }
.lm em { display: block; margin-top: 4px; font-size: .95rem; color: #8a5a12; }
.lm:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* no lone half-row at the end */
@media (max-width: 640px) { .lm-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- news ---------- */
.news { display: grid; gap: 14px; }
.news-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 14px; border-radius: 12px; background: rgba(255, 252, 242, .62);
  border: 1px solid var(--pin-line); box-shadow: 0 8px 20px rgba(80, 50, 15, .12); }
.news-card.no-img { grid-template-columns: minmax(0, 1fr); }
.news-img { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #2a1f12; }
.news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card h3 { margin: 0 0 6px; font: 600 1.45rem/1.15 var(--title); color: #5a3a0c; overflow-wrap: anywhere; }
.news-body { white-space: pre-line; overflow-wrap: anywhere; color: #3b2a14; font-size: 1.05rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-card.open .news-body { display: block; -webkit-line-clamp: unset; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(122, 84, 24, .35);
  color: var(--pin-muted); font: 600 .95rem/1.2 var(--serif); }
.news-meta span { display: inline-flex; align-items: center; gap: 6px; }
.news-meta svg { width: 16px; height: 16px; fill: none; stroke: var(--pin-gold); stroke-width: 1.8; }
.news-meta .btn { margin-left: auto; }
.news-empty { padding: 18px; text-align: center; color: var(--pin-muted); font-style: italic; }
@media (max-width: 680px) {
  .news-card { grid-template-columns: minmax(0, 1fr); }
  .news-img { aspect-ratio: 16 / 9; }
  .news-meta .btn { margin-left: 0; }
}
.btn.gold-ink { color: #fff4d6; background: linear-gradient(180deg, #b07a22, #8a5a12 55%, #6b440c); border-color: #d9a54a;
  box-shadow: 0 0 0 1px #4a2f0c, 0 6px 16px rgba(120, 75, 15, .3), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.gold-ink:hover { color: #fff; }

/* ---------- sidebar ---------- */
.sb { display: grid; gap: 10px; }
.sb-h { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 1.32rem/1.1 var(--title); color: var(--gold-hi); letter-spacing: .03em; }
.sb-h::before { content: ""; width: 12px; height: 12px; flex: none; border-radius: 3px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo)); box-shadow: 0 0 10px rgba(216, 178, 90, .5); }
.sb-h small { margin-left: auto; font: italic 500 .95rem/1 var(--serif); color: var(--muted); letter-spacing: 0; }
.sb-card { padding: 14px; border-radius: 12px; background: var(--side-card); border: 1px solid var(--side-line); }
.sb form { display: grid; gap: 8px; }
.sb input { padding: 10px 12px; font-size: 1.05rem; }
.sb form .btn { margin-top: 2px; }
.sb-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font: 600 1rem/1.2 var(--serif); }
.sb-links a { color: var(--gold-hi); text-decoration: none; }
.sb-links a:hover { text-decoration: underline; }
.sb .msg { font-size: .98rem; padding: 8px 10px; }
.sb .msg.err { background: rgba(226, 115, 92, .12); border-color: rgba(226, 115, 92, .45); color: #f2b3a3; }
.sb .msg.ok { background: rgba(156, 199, 122, .12); border-color: rgba(156, 199, 122, .4); color: #c7e3ae; }

/* a player's face as the game draws it: the face (8..16) and over it the hat layer (40..48: glasses, hoods);
   the width is 8 faces, so both 64x64 and the old 64x32 skins land on the same spot */
.face { display: block; flex: none; width: 1em; height: 1em; image-rendering: pixelated; background-color: #2a2015;
  background-repeat: no-repeat; background-size: 8em auto, 8em auto; background-position: -5em -1em, -1em -1em; }
.me { display: flex; align-items: flex-start; gap: 12px; }
.me .face { font-size: 48px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(216, 178, 90, .4), 0 6px 14px rgba(0, 0, 0, .5); }
.me-text { min-width: 0; flex: 1; display: grid; gap: 5px; }
.me-text b { font: 600 1.3rem/1.1 var(--title); color: var(--gold-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text .note { color: var(--muted); font-size: .98rem; }
.coins { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .98rem; white-space: nowrap; }
.coins img { width: 18px; height: 18px; image-rendering: pixelated; }
.coins img.none { opacity: .45; }
.coins span { color: #f0e2c0; font-variant-numeric: lining-nums tabular-nums; }
.sb-ranks { display: flex; flex-wrap: wrap; gap: 5px; }
.sb-rank { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 5px; border-radius: 999px; border: 1px solid;
  font: 600 .86rem/1.35 var(--title); letter-spacing: .05em; white-space: nowrap; }
.sb-rank img { width: 16px; height: 16px; image-rendering: pixelated; }
.sb-rank.leader { color: #ffe08a; background: rgba(240, 200, 60, .14); border-color: rgba(240, 200, 60, .45); }
.sb-rank.mod { color: #ecd2a8; background: rgba(170, 115, 55, .2); border-color: rgba(200, 145, 80, .5); }
.sb-rank.vip { color: #ffd76a; background: rgba(255, 196, 40, .12); border-color: rgba(214, 150, 20, .55); }
.sb-rank.vipplus { color: #1a1206; background: linear-gradient(135deg, #f6dc94, #d8b25a 55%, #b0812a); border-color: #f9e6ad; }
.me-btns { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 4px; }
.me-btns .btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; letter-spacing: .04em; }

.mon { display: grid; gap: 8px; }
.mon-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mon-top b { font: 600 1.15rem/1.15 var(--title); color: #f0e2c0; }
.mon-count { flex: none; padding: 5px 10px; border-radius: 8px; font: 600 1rem/1 var(--title); letter-spacing: .03em; font-variant-numeric: lining-nums tabular-nums;
  color: #1a1206; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.mon-count.off { color: #f2b3a3; background: rgba(226, 115, 92, .15); box-shadow: inset 0 0 0 1px rgba(226, 115, 92, .4); }
.mon-state { display: flex; align-items: center; gap: 8px; color: #d4c5a6; font-size: 1.02rem; }
.mon-state i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.mon-state.restart i { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.mon-state.down i, .mon-state.unknown i { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.mon-state.unknown i { background: #8a7a5e; box-shadow: none; }
@keyframes pulse { 50% { opacity: .35; } }
.mon-bar { height: 6px; border-radius: 6px; background: rgba(216, 178, 90, .12); overflow: hidden; }
.mon-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
  transition: width .6s; box-shadow: 0 0 10px rgba(246, 220, 148, .5); }
.mon-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .98rem; }
.mon-foot b { color: #f0e2c0; font-variant-numeric: lining-nums; }

.top { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: top; }
.top li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px;
  background: rgba(255, 246, 220, .035); }
.top li:nth-child(1) { background: linear-gradient(90deg, rgba(246, 220, 148, .16), rgba(255, 246, 220, .03)); }
.top .face { font-size: 32px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(216, 178, 90, .3); }
.top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 1.06rem/1.2 var(--serif); color: #efe0bd; }
.top b small { display: block; color: var(--muted); font: 600 .82rem/1.1 var(--title); letter-spacing: .1em; }
.top b .ico { margin-left: .3em; }
.top .hrs { font: 600 1rem/1 var(--title); color: var(--gold-hi); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.top-empty { color: var(--muted); font-style: italic; font-size: 1rem; }

.soc { position: relative; overflow: hidden; display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--side-line);
  background: radial-gradient(ellipse 90% 120% at 100% 0%, var(--brand-glow, rgba(216, 178, 90, .14)), transparent 70%), var(--side-card); }
.soc-head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.soc-ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand, #4a76a8); }
.soc-ico svg { width: 24px; height: 24px; fill: #fff; }
.soc-head b { font: 600 1.15rem/1.1 var(--title); color: #f3e5c3; }
.soc-head span { font-size: .98rem; color: var(--muted); }
.soc .btn { justify-self: start; }
.soc.vk { --brand: #4a76a8; --brand-glow: rgba(74, 118, 168, .22); }
.soc.ds { --brand: #5865f2; --brand-glow: rgba(88, 101, 242, .22); }

/* ---------- start page ---------- */
.steps-v { display: grid; gap: 14px; counter-reset: s; }
.step-v { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; padding: 18px 18px 16px; border-radius: 12px;
  background: rgba(255, 252, 242, .55); border: 1px solid var(--pin-line); }
.step-v::before { counter-increment: s; content: counter(s); grid-row: span 3; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 12px; font: 600 1.7rem/1 var(--title); color: #fff4d6; background: linear-gradient(180deg, #b07a22, #8a5a12 55%, #6b440c);
  box-shadow: 0 0 0 1px #4a2f0c, 0 8px 18px rgba(120, 75, 15, .3); }
.step-v h3 { margin: 4px 0 4px; font: 600 1.45rem/1.15 var(--title); color: var(--pin-head); }
.step-v p { margin: 0; color: #3b2a14; }
.step-v .btn { justify-self: start; margin-top: 10px; }
.step-v .downloads { grid-column: 1 / -1; margin-top: 12px; padding: clamp(16px, 3vw, 28px); }
@media (max-width: 560px) { .step-v { grid-template-columns: minmax(0, 1fr); } .step-v::before { grid-row: auto; width: 42px; height: 42px; font-size: 1.4rem; } }
.faq { display: grid; gap: 8px; }
.faq details { border-radius: 10px; background: rgba(255, 252, 242, .55); border: 1px solid var(--pin-line); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 16px; font: 600 1.18rem/1.25 var(--title); color: var(--pin-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "✦"; flex: none; color: var(--pin-gold); transition: transform .2s; }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details > div { padding: 0 16px 14px 42px; color: #3b2a14; }
.faq details > div p { margin: 0 0 8px; }
.faq code { padding: 1px 6px; border-radius: 4px; background: rgba(255, 250, 235, .9); border: 1px solid rgba(43, 30, 15, .25); font-size: .92rem; overflow-wrap: anywhere; }

/* ---------- footer ---------- */
footer.pf { flex: none; margin-top: auto; padding: 0; text-align: left; border-top: 1px solid rgba(216, 178, 90, .18);
  background: linear-gradient(180deg, rgba(16, 12, 8, .96), #0a0806); color: var(--muted); font-size: 1.02rem; }
.pf-in { max-width: 1240px; margin: 0 auto; padding: 34px 16px 18px; display: grid; gap: 26px;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.pf h4 { margin: 0 0 10px; font: 600 1.15rem/1.1 var(--title); letter-spacing: .06em; color: var(--gold-hi); }
.pf a { color: #d9c9a6; text-decoration: none; }
.pf a:hover { color: var(--gold-hi); text-decoration: underline; }
.pf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pf-brand img { width: 30px; height: 30px; border-radius: 6px; image-rendering: pixelated; }
.pf-brand b { font: 600 1.4rem/1 var(--title); color: var(--gold-hi); letter-spacing: .06em; }
.pf-about { margin: 0; line-height: 1.5; }
.pf-bottom { max-width: 1240px; margin: 0 auto; padding: 14px 16px 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  border-top: 1px solid rgba(216, 178, 90, .1); font-size: .95rem; }
.pf-bottom .runes { font-family: "Noto Sans Runic", "Segoe UI Historic", serif; color: var(--gold-lo); letter-spacing: .4em; }
@media (max-width: 860px) { .pf-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-col-about { grid-column: 1 / -1; } }
@media (max-width: 460px) { .pf-in { grid-template-columns: minmax(0, 1fr); } }

/* the web chat fills the window: no footer there, as before */
body.chat-page footer.pf { display: none; }

/* captcha line under the forms */
.pow { display: flex; align-items: center; gap: 8px; min-height: 1.4em; font: italic 500 .95rem/1.3 var(--serif); color: #7b6240; }
.pow i { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid rgba(138, 90, 18, .35); border-top-color: #8a5a12;
  animation: spin .8s linear infinite; }
.pow.ok i { animation: none; border: 0; background: #6f9a3e; box-shadow: 0 0 8px rgba(111, 154, 62, .6); }
.pow.ok i::after { content: "✓"; display: block; color: #fff; font: 700 10px/14px sans-serif; text-align: center; font-style: normal; }
.pow.err { color: #7a2412; }
.pow.err i { animation: none; border-color: #b4523c; }
.sb .pow { color: var(--muted); }
.sb .pow.ok i { background: var(--ok); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* staff panel: the news form (and the textareas of the shop form) in the panel's own dark inputs */
.admin textarea { width: 100%; padding: 10px 12px; font: 500 1.05rem/1.4 var(--serif); color: var(--text); resize: vertical;
  background: rgba(11, 10, 9, .6); border: 1px solid rgba(216, 178, 90, .3); border-radius: 4px; outline: none; }
.admin textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 178, 90, .15); background: rgba(11, 10, 9, .8); }
.news-form textarea { font: 500 1.08rem/1.45 var(--serif); }
/* eight tabs no longer fit one line at laptop widths: wrap instead of scrolling the page sideways */
@media (min-width: 761px) { body.admin .admin-tabs { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; } }
.news-pic { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.news-pic img { width: 200px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px rgba(216, 178, 90, .35); }

/* registration: nick with its check button */
.nick-row { display: flex; gap: 8px; }
.nick-row input { flex: 1; min-width: 0; }
.nick-row .btn { flex: none; margin: 0; width: auto; }
.btn.ink { color: #5a3a0c; background: rgba(255, 250, 235, .75); border-color: rgba(138, 90, 18, .55); box-shadow: none; }
.btn.ink:hover { color: #3d2608; background: #fffaf0; box-shadow: 0 4px 12px rgba(120, 75, 15, .18); }
.hint.ok { color: #3f6a1c; }
.hint.bad { color: #9a3418; }

@media (prefers-reduced-motion: reduce) {
  .slide, .gal-item img, .feat, .ph-cta { transition: none; }
}
