/* miniblockcraft2.com: shared style of the public pages (index, products, forum, terms).
   Plan: docs/2026-11-12-site-redesign-and-products-build-plan.md · mockup: docs/2026-11-12-site-redesign-mockup.html (palette A).
   A clear, light look: white space, real bright screenshots, plain type, soft cards. */

:root {
  --bg: #ffffff; --bg-soft: #f3f7fb; --hero-bg: linear-gradient(180deg, #e7f2fd 0%, #ffffff 82%);
  --text: #0f1d2b; --muted: #546576; --line: #e2e9f0;
  --primary: #1f9d55; --primary-dark: #17844a; --on-primary: #ffffff;
  --accent: #1d7fd6; --chip: #e9f3fd; --chip-text: #1564b3;
  --band: linear-gradient(135deg, #e3f1ff 0%, #eaf8ee 100%);
  --note: #fff8e6; --note-line: #f3dfa6; --note-text: #6b4e00;
  --danger: #c0392b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.logo img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 1px 3px rgba(15, 29, 43, 0.18); }
.nav-links { display: flex; gap: 22px; list-style: none; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--primary); padding-bottom: 20px; }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  font-size: 18px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; background: none; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(31, 157, 85, 0.28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--bg); border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: #b9c7d4; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn:disabled { opacity: 0.55; cursor: default; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 14px; border-radius: 14px; background: #0f1720; color: #fff; }
.store svg { width: 24px; height: 24px; }
.store small { display: block; font-size: 10.5px; opacity: 0.75; line-height: 1.1; }
.store b { display: block; font-size: 16px; line-height: 1.2; }
.store:hover { background: #222c38; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: 54px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; margin-top: 10px; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.head p { color: var(--muted); margin-top: 8px; max-width: 620px; }

/* ---------- Hero ---------- */
.hero { background: var(--hero-bg); padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--bg);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.hero h1 { margin: 18px 0 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .actions { margin-top: 30px; }
.hero-shot { position: relative; }
.hero-shot > img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 22px;
  box-shadow: 0 2px 6px rgba(15, 29, 43, 0.08), 0 24px 60px rgba(15, 29, 43, 0.16); }
.float-card { position: absolute; left: -26px; bottom: -26px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  background: var(--bg); border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(15, 29, 43, 0.14); }
.float-card img { width: 44px; height: 44px; border-radius: 11px; }
.float-card b { display: block; font-size: 14px; }
.float-card span { font-size: 12.5px; color: var(--muted); }

/* ---------- Cards, features ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 1px 2px rgba(15, 29, 43, 0.04); }
.feature .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--chip); display: grid; place-items: center; margin-bottom: 16px; }
.feature .ico svg { width: 32px; height: 32px; }
.feature p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; height: 520px; }
.gallery figure { position: relative; border-radius: 18px; overflow: hidden; background: var(--bg-soft); }
.gallery figure:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255, 255, 255, 0.92); color: #0f1d2b; }

/* ---------- Updates ---------- */
.update .when { font-size: 13px; color: var(--muted); font-weight: 600; }
.update h3 { margin: 10px 0 8px; }
.update ul { list-style: none; color: var(--muted); font-size: 14.5px; display: grid; gap: 6px; }
.update li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: var(--primary); margin: 0 10px 2px 0; }

/* ---------- Products ---------- */
.disclosure { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--note);
  border: 1px solid var(--note-line); color: var(--note-text); font-size: 13.5px; }
.disclosure svg { width: 18px; height: 18px; flex: none; }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pgrid.wide { grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pcard { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 29, 43, 0.04); transition: box-shadow 0.15s, transform 0.15s; }
.pcard:hover { box-shadow: 0 14px 34px rgba(15, 29, 43, 0.1); transform: translateY(-2px); }
.part { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #eef4fa, #e2ebf3); }
.part img { width: 100%; height: 100%; object-fit: cover; }
.pbody { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; flex: 1; }
.pcat { font-size: 12px; font-weight: 700; color: var(--chip-text); }
.pbody h3 { font-size: 16px; overflow-wrap: anywhere; }
.pbody p { font-size: 14px; color: var(--muted); flex: 1; overflow-wrap: anywhere; }
.plink { margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 11px;
  border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); background: var(--bg); }
.plink:hover { border-color: var(--primary); color: var(--primary-dark); }
.plink svg { width: 15px; height: 15px; }
.see-all { font-weight: 600; color: var(--accent); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 14px;
  font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .n { font-weight: 500; opacity: 0.7; }
.skel { background: linear-gradient(90deg, #eef3f8 0%, #f7fafc 50%, #eef3f8 100%); background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.state { text-align: center; padding: 64px 24px; border: 1px dashed var(--line); border-radius: 20px; background: var(--bg); }
.state h3 { font-size: 20px; margin: 0 0 6px; }
.state p { color: var(--muted); }
.state .btn { margin-top: 18px; }

/* ---------- Community (home) ---------- */
.community { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.threads { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.threads .thread-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.threads .thread-row:last-child { border-bottom: 0; }
.threads .thread-row:hover { background: var(--bg-soft); }
.board { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--chip-text); white-space: nowrap; }
.thread-row b { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.thread-row span.meta { font-size: 13px; color: var(--muted); }
.stats { font-size: 13px; color: var(--muted); white-space: nowrap; }
.threads .state { border: 0; border-radius: 0; padding: 40px 20px; }

/* ---------- Download band, footer ---------- */
.band { background: var(--band); border-radius: 28px; padding: 48px; display: flex; align-items: center; gap: 28px; }
.band > img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 6px 18px rgba(15, 29, 43, 0.15); }
.band h2 { margin-top: 0; font-size: 30px; }
.band p { color: var(--muted); margin-top: 6px; }
.band .actions { margin-left: auto; }
footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg-soft); }
.fcols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.fcols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.fcols ul { list-style: none; display: grid; gap: 8px; font-size: 14.5px; }
.fcols a:hover { color: var(--accent); }
.fcols p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 320px; }
.fbottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Page header (products, forum) ---------- */
.page-head { background: var(--hero-bg); padding: 56px 0 8px; }
.page-head h1 { font-size: 44px; margin: 10px 0 10px; }

/* ---------- Forum page ---------- */
.forum-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.boards { list-style: none; display: grid; gap: 4px; position: sticky; top: 84px; }
.board-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.board-item:hover { background: var(--bg-soft); color: var(--text); }
.board-item.active { background: var(--chip); color: var(--chip-text); }
.forum-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.forum-toolbar .title { font-size: 20px; font-weight: 800; }
.forum-toolbar .count { font-size: 13px; color: var(--muted); }
.forum-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--bg-soft); margin-left: auto; }
.forum-tab { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.forum-tab.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(15, 29, 43, 0.1); }
.composer { display: none; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; background: var(--bg); }
.composer.active { display: grid; gap: 10px; }
.composer h4 { font-size: 15px; }
.field-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14.5px; background: var(--bg); color: var(--text); }
.field-input:focus { outline: 2px solid rgba(29, 127, 214, 0.35); border-color: var(--accent); }
textarea.field-input { min-height: 120px; resize: vertical; }
.composer-bar { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.composer-bar select { margin-right: auto; width: auto; }
.thread-list { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg); }
.thread { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.thread:last-child { border-bottom: 0; }
.thread:hover { background: var(--bg-soft); }
.avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--chip); color: var(--chip-text); font-weight: 800; }
.thread-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.thread-meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tag-pin { font-size: 11px; font-weight: 700; color: #8a5a00; background: #fff1cc; padding: 1px 7px; border-radius: 999px; margin-right: 6px; }
.thread-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.like-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 2px 4px; border-radius: 6px; }
.like-btn:hover { color: #d6336c; background: #fdeef3; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }

/* ---------- Dialogs (forum login, thread) ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(15, 29, 43, 0.45); }
.overlay.open { display: grid; }
.dialog { width: min(380px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg); border-radius: 18px; padding: 26px;
  box-shadow: 0 24px 60px rgba(15, 29, 43, 0.25); }
.dialog.wide { width: min(700px, 100%); }
.dialog h3 { font-size: 19px; margin-bottom: 6px; overflow-wrap: anywhere; }
.dialog .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.dialog .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.dialog .body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 15px; line-height: 1.65; }
.reply { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 8px; background: var(--bg-soft); }
.reply b { font-size: 13px; }
.reply div { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); margin-top: 4px; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }

/* ---------- Simple text pages ---------- */
.prose { max-width: 720px; }
.prose p { color: var(--muted); margin-top: 12px; }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .nav .wrap { gap: 12px; }
  .nav .logo { font-size: 15.5px; gap: 8px; }
  .nav .logo img { width: 30px; height: 30px; }
  .nav-links { display: none; }
  .nav-end > .btn-ghost { display: none; }   /* the home and products pages' "Log in"; the forum's Log out (in .user-chip) stays */
  .user-chip .username { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Forum, logged in: the logo shows its icon only, so the name and Log out fit (the name stays for screen readers) */
  .nav.signed-in .logo span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .menu-btn { display: inline-grid; place-items: center; }
  .nav.open .nav-links { display: grid; gap: 0; position: absolute; top: 64px; left: 0; right: 0; padding: 8px 18px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(15, 29, 43, 0.08); font-size: 16px; }
  .nav.open .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav.open .nav-links li:last-child a { border-bottom: 0; }
  .nav.open .nav-links a.active { box-shadow: none; color: var(--primary-dark); padding-bottom: 12px; }
  section { padding: 56px 0; }
  .hero { padding: 36px 0 64px; }
  .hero .wrap, .community { grid-template-columns: 1fr; gap: 32px; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .lead { font-size: 16.5px; }
  .float-card { left: 12px; bottom: -22px; }
  .grid3 { grid-template-columns: 1fr; gap: 14px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: none; height: auto; }
  .gallery figure { aspect-ratio: 4 / 3; }
  .gallery figure:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .pgrid, .pgrid.wide { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pbody { padding: 12px 12px 14px; }
  .pbody p { font-size: 13px; }
  .head { flex-direction: column; align-items: flex-start; margin-bottom: 22px; }
  .band { flex-direction: column; text-align: center; padding: 32px 22px; }
  .band .actions { margin: 6px 0 0; justify-content: center; }
  .fcols { grid-template-columns: 1fr 1fr; }
  .threads .thread-row, .thread { grid-template-columns: 1fr auto; }
  .threads .thread-row .board, .thread .avatar { display: none; }
  .page-head h1 { font-size: 34px; }
  .forum-layout { grid-template-columns: 1fr; }
  .boards { position: static; display: flex; overflow-x: auto; gap: 6px; }
  .board-item { white-space: nowrap; }
  .forum-tabs { margin-left: 0; }
}

/* Narrow phones (360 px and less): the logo's name doesn't fit beside "Get the game", so the logo shows its icon only
   (the name stays for screen readers) */
@media (max-width: 380px) {
  .nav .logo span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}
