:root {
  --lm-fs: "Barlow", "Segoe UI", Roboto, Arial, system-ui, sans-serif;
  --lm-fd: "Anton", "Segoe UI", var(--lm-fs);

  --lm-bg: #6B0F24;
  --lm-bg2: #52091A;
  --lm-sf: #7A1230;
  --lm-sf2: #8C1A3A;
  --lm-fg: #FFF3E0;
  --lm-fgs: #FDECD1;
  --lm-mut: #E0AFA0;
  --lm-ln: rgba(255, 199, 44, 0.38);

  --lm-acc: #FFC72C;
  --lm-acc2: #2FBF5C;
  --lm-accs: rgba(255, 199, 44, 0.2);
  --lm-pri: var(--lm-acc);
  --lm-pri2: #FFDA5E;
  --lm-dgr: #FF4A38;
  --lm-fcs: #FFC72C;
  --lm-dk: #2A0D14;

  --lm-pga: #FFC72C;
  --lm-mx: 28%;
  --lm-g-reversi: #2FBF5C;
  --lm-g-c4: #FFC72C;
  --lm-g-mines: #E8791F;
  --lm-g-ws: #3B8FD9;

  --lm-sp1: 0.36rem;
  --lm-sp2: 0.68rem;
  --lm-sp3: 1.0rem;
  --lm-sp4: 1.45rem;
  --lm-sp5: 2.15rem;
  --lm-sp6: 3.25rem;

  --lm-rd1: 5px;
  --lm-rd2: 10px;
  --lm-rd3: 14px;

  --lm-gw1: 0 0 0 1px rgba(232, 163, 61, 0.28), 0 10px 26px rgba(0, 0, 0, 0.45);
  --lm-gw2: 0 0 0 2px color-mix(in srgb, var(--lm-pga) 65%, transparent);
  --lm-sh1: 0 6px 18px rgba(0, 0, 0, 0.4);
  --lm-sh2: 0 14px 40px rgba(0, 0, 0, 0.5);

  --lm-mw: 1095px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--lm-fs);
  color: var(--lm-fg);
  min-height: 100vh;
  background-color: var(--lm-bg);
  background-image:
    linear-gradient(180deg, var(--lm-bg2) 0%, var(--lm-bg) 320px),
    repeating-linear-gradient(180deg, rgba(243, 233, 220, 0.025) 0px, rgba(243, 233, 220, 0.025) 1px, transparent 1px, transparent 44px);
  background-attachment: fixed;
  background-repeat: no-repeat, repeat;
  line-height: 1.6;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.08rem);
}

h1, h2, h3, h4 { font-family: var(--lm-fd); font-weight: 400; line-height: 1.12; letter-spacing: 0.01em; color: var(--lm-fg); margin: 0 0 var(--lm-sp2); text-transform: uppercase; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.05rem); }
h3 { font-size: clamp(1.1rem, 1.0rem + 0.5vw, 1.28rem); }
p { margin: 0 0 var(--lm-sp3); font-weight: 400; }
strong, b { font-weight: 700; }

a { color: var(--lm-pri2); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--lm-acc); }

:focus-visible { outline: 3px solid var(--lm-fcs); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }

.skip-to-main { position: absolute; left: -9999px; top: 0; background: var(--lm-acc); color: var(--lm-dk); padding: var(--lm-sp2) var(--lm-sp3); z-index: 100; border-radius: 0 0 var(--lm-rd1) 0; font-weight: 700; }
.skip-to-main:focus { left: 0; }

.wrap { width: 100%; max-width: var(--lm-mw); margin: 0 auto; padding: 0 var(--lm-sp3); }

.hdr { background: var(--lm-bg2); border-bottom: 3px solid var(--lm-acc); position: sticky; top: 0; z-index: 40; }
.hdr-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--lm-sp3); min-height: 64px; }
#pn-goal { position: relative; height: 300px; background: linear-gradient(180deg, var(--lm-sf2) 0 62%, #234d23 62% 100%); border: 2px solid var(--lm-ln); border-radius: 10px; overflow: hidden; }
#pn-goal::before { content: ""; position: absolute; left: 10%; right: 10%; top: 12%; height: 46%; border: 6px solid var(--lm-fg); border-bottom: none; }
#pn-keeper { position: absolute; top: 26%; font-size: 3rem; transform: translateX(-50%); }
#pn-aim { position: absolute; top: 40%; width: 26px; height: 26px; border: 4px solid var(--lm-acc); border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.25); }
#pn-ball { position: absolute; bottom: 6%; left: 50%; font-size: 2.4rem; transform: translateX(-50%); transition: bottom 0.35s ease, left 0.35s ease; }
#pn-ball.pn-ball--fly { bottom: 46%; }
.pn-controls { display: flex; justify-content: center; margin-top: var(--lm-sp3); }
.pn-shoot { font-size: 1.15rem; padding: 0.8rem 2.4rem; }
@media (prefers-reduced-motion: reduce) { #pn-ball { transition: none; } }

#em-arena { position: relative; height: 380px; background: linear-gradient(180deg, var(--lm-sf) 0 88%, #234d23 88% 100%); border: 2px solid var(--lm-ln); border-radius: 10px; overflow: hidden; touch-action: manipulation; }
#em-ball { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; font-size: 2.6rem; line-height: 1; background: none; border: 0; cursor: pointer; padding: 0; }
#em-ball:focus-visible { outline: 3px solid var(--lm-fcs); outline-offset: 2px; border-radius: 50%; }
@media (max-width: 640px) { #em-arena { height: 300px; } #pn-goal { height: 240px; } }

.board-frame--cr { display: grid; place-items: center; }
.cr-stage { text-align: center; padding: var(--lm-sp5) var(--lm-sp4); }
.cr-target { font-family: var(--lm-fd); text-transform: uppercase; letter-spacing: 0.06em; color: var(--lm-acc); font-size: 1.15rem; margin: 0 0 var(--lm-sp3); }
.cr-display { font-family: var(--lm-fd); font-size: clamp(3.4rem, 12vw, 6.5rem); line-height: 1; color: var(--lm-fg); margin: 0 0 var(--lm-sp4); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.cr-display--hidden { color: var(--lm-mut); opacity: 0.5; }
.cr-btn { font-size: 1.15rem; padding: 0.85rem 2.6rem; }
.cr-rounds { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.cr-rounds li { padding: 0.42rem 0; border-bottom: 1px solid var(--lm-ln); color: var(--lm-mut); }
.cr-rounds li:last-child { border-bottom: none; }
.cr-rounds .cr-rounds__now, .cr-rounds li.cr-rounds__now { color: var(--lm-acc); font-weight: 700; }
.cr-rounds li.cr-rounds__done { color: var(--lm-fgs); }

.fixtures { max-width: 860px; margin: var(--lm-sp5) auto 0; border: 2px solid var(--lm-ln); border-radius: 10px; overflow: hidden; background: var(--lm-sf); }
.fixture { display: grid; grid-template-columns: 64px 1fr 1.2fr auto; gap: var(--lm-sp3); align-items: center; padding: var(--lm-sp3) var(--lm-sp4); text-decoration: none; color: var(--lm-fg); border-bottom: 1px solid var(--lm-ln); border-left: 5px solid var(--fx, var(--lm-acc)); }
.fixture:last-child { border-bottom: none; }
.fixture:hover { background: var(--lm-sf2); }
.fixture__badge { width: 56px; height: 56px; border-radius: 8px; }
.fixture__match { font-family: var(--lm-fd); text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.05rem; }
.fixture__match em { font-style: normal; color: var(--lm-acc); padding: 0 0.35em; }
.fixture__game { color: var(--lm-mut); font-size: 0.95rem; }
.fixture__go { font-family: var(--lm-fd); text-transform: uppercase; color: var(--lm-acc); letter-spacing: 0.05em; }
@media (max-width: 680px) { .fixture { grid-template-columns: 48px 1fr auto; } .fixture__game { display: none; } .fixture__badge { width: 44px; height: 44px; } }

.regulamento { max-width: 68ch; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.regulamento li { padding: var(--lm-sp3) 0; border-bottom: 1px solid var(--lm-ln); }
.regulamento li strong { color: var(--lm-acc); font-family: var(--lm-fd); font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; margin-right: 0.3em; }
.regulamento li:last-child { border-bottom: none; }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand:hover { opacity: 0.88; }
.brand__logo { height: 50px; width: auto; display: block; margin: 3px 0; }

.nv-tgl { display: none; background: transparent; border: 2px solid var(--lm-ln); border-radius: var(--lm-rd1); color: var(--lm-fg); padding: 0.5rem 0.7rem; font-size: 0.95rem; cursor: pointer; }
.nv ul { list-style: none; display: flex; align-items: center; gap: var(--lm-sp1); margin: 0; padding: 0; }
.nl { display: inline-block; padding: 0.5rem 0.7rem; border-radius: var(--lm-rd1); text-decoration: none; color: var(--lm-fgs); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.nl:hover { background: var(--lm-sf2); color: var(--lm-fg); }
.nl[aria-current="page"], .nl[aria-current="true"] { color: var(--lm-dk); background: var(--lm-acc); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.65rem 1.25rem; border-radius: var(--lm-rd1); border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: filter 0.15s ease, transform 0.05s ease, background-color 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-pri { background: var(--lm-acc); color: var(--lm-dk); border-color: var(--lm-acc); }
.btn-pri:hover { filter: brightness(1.1); color: var(--lm-dk); }
.btn-gst { background: transparent; color: var(--lm-fg); border-color: var(--lm-fg); }
.btn-gst:hover { background: rgba(243, 233, 220, 0.1); color: var(--lm-fg); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }

.hero { padding: var(--lm-sp6) 0; }
.hero__solo { max-width: 64ch; }
.hero-tag { display: inline-flex; align-items: center; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lm-acc); background: var(--lm-sf); border: 1px solid var(--lm-acc); padding: 0.32rem 0.75rem; border-radius: var(--lm-rd1); margin-bottom: var(--lm-sp3); }
.hero h1 { color: var(--lm-fg); }
.hero__lede { font-size: 1.14rem; color: var(--lm-fgs); }
.hero__cta { display: flex; justify-content: center; gap: var(--lm-sp2); flex-wrap: wrap; margin-top: var(--lm-sp4); }

/* ---- hero: centered match announcement, no scoreboard ---- */
.heroBoard__announce { max-width: 56ch; margin: 0 auto; text-align: center; }
.heroBoard__announce .hero-tag { justify-content: center; }

.section { padding: var(--lm-sp6) 0; }
.section--tint { background: var(--lm-bg2); border-block: 1px solid var(--lm-ln); }
.section__head { max-width: 62ch; margin-bottom: var(--lm-sp4); }
.sec-lbl { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lm-acc); margin-bottom: var(--lm-sp1); border-bottom: 2px solid var(--lm-acc2); display: inline-block; padding-bottom: 2px; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--lm-sp3); }
.gt { position: relative; display: flex; flex-direction: column; background: var(--lm-sf); border: 2px solid var(--lm-acc); border-left: 6px solid var(--tile-accent, var(--lm-acc)); border-radius: var(--lm-rd2); overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.gt::before {
  content: "";
  position: absolute; top: 0.55rem; left: 0.55rem;
  width: 2.3rem; height: 2.3rem; display: grid; place-items: center;
  font-family: var(--lm-fd); font-weight: 400; font-size: 1.02rem;
  color: var(--lm-acc); background: var(--lm-bg2);
  border: 2px solid var(--lm-acc); border-radius: 4px;
  z-index: 2; line-height: 1;
}
.gt:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4); color: inherit; }
.gt[href*="reversi"] { --tile-accent: var(--lm-g-reversi); }
.gt[href*="reversi"]::before { content: "04"; }
.gt[href*="conecta-4"] { --tile-accent: var(--lm-g-c4); }
.gt[href*="conecta-4"]::before { content: "12"; }
.gt[href*="campo-minado"] { --tile-accent: var(--lm-g-mines); }
.gt[href*="campo-minado"]::before { content: "23"; }
.gt[href*="caca-palavras"] { --tile-accent: var(--lm-g-ws); }
.gt[href*="caca-palavras"]::before { content: "07"; }
.gt-img { aspect-ratio: 1 / 1; background: var(--lm-bg2); }
.gt-info { padding: var(--lm-sp3); }
.gt-ttl { margin-bottom: 0.5rem; padding-bottom: 0.4rem; font-size: 1.15rem; color: var(--lm-fg); border-bottom: 2px solid var(--lm-acc2); }
.gt-meta { color: var(--lm-mut); font-size: 0.88rem; margin: 0; text-transform: uppercase; letter-spacing: 0.03em; }
.gt-soon { align-self: flex-start; margin: 0 var(--lm-sp3) var(--lm-sp3); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; color: var(--lm-dk); background: var(--lm-acc); padding: 0.2rem 0.55rem; border-radius: var(--lm-rd1); }

.feature-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--lm-sp4); }
.feature { background: var(--lm-sf); border: 1px solid var(--lm-ln); border-top: 3px solid var(--lm-acc); border-radius: var(--lm-rd2); padding: var(--lm-sp4); }
.feature h3 { color: var(--lm-pri2); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--lm-sp5); }
.prose h3 { margin-top: var(--lm-sp4); color: var(--lm-pri2); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 var(--lm-sp3); }
.prose li { margin-bottom: 0.4rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 var(--lm-sp3); }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.7rem; border: 1px solid var(--lm-ln); }
.prose th { background: var(--lm-sf2); font-family: var(--lm-fd); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; }
.prose a { color: var(--lm-acc); }

.lm-head { background: var(--lm-bg2); border-bottom: 1px solid var(--lm-ln); padding: var(--lm-sp5) 0; }
.lm-crumbs { font-size: 0.85rem; color: var(--lm-mut); margin-bottom: var(--lm-sp2); text-transform: uppercase; letter-spacing: 0.03em; }
.lm-crumbs a { color: var(--lm-mut); }

.callout { border: 1px solid var(--lm-ln); border-left: 4px solid var(--lm-acc); background: var(--lm-accs); border-radius: var(--lm-rd1); padding: var(--lm-sp3); margin: 0 0 var(--lm-sp4); }

.cta-mail { border: 1px solid var(--lm-ln); border-left: 4px solid var(--lm-acc); border-radius: var(--lm-rd1); padding: var(--lm-sp3); background: var(--lm-sf); max-width: 40rem; }

.ftr { background: var(--lm-bg2); border-top: 3px solid var(--lm-acc); padding: var(--lm-sp5) 0 var(--lm-sp4); margin-top: var(--lm-sp6); }
.ftr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--lm-sp4); }
.ftr h4 { font-family: var(--lm-fd); font-weight: 400; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lm-acc); margin-bottom: var(--lm-sp2); }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: 0.4rem; }
.ftr a { color: var(--lm-fgs); text-decoration: none; font-size: 0.92rem; }
.ftr a:hover { color: var(--lm-pri2); text-decoration: underline; }
.footer-baseline { margin-top: var(--lm-sp4); padding-top: var(--lm-sp3); border-top: 1px solid var(--lm-ln); color: var(--lm-mut); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--lm-sp2); }

.faq { display: grid; gap: 0; border-top: 1px solid var(--lm-ln); }
.qa-i { border: 0; border-bottom: 1px solid var(--lm-ln); background: transparent; border-radius: 0; overflow: visible; }
.qa-q { width: 100%; text-align: left; font: inherit; font-family: var(--lm-fd); font-weight: 400; letter-spacing: 0.01em; font-size: 1.04rem; text-transform: none; padding: 0.9rem 0.1rem; background: transparent; border: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--lm-sp2); color: var(--lm-fg); }
.qa-q:hover { color: var(--lm-acc); }
.qa-sgn { color: var(--lm-acc); font-weight: 800; font-family: var(--lm-fs); flex-shrink: 0; }
.qa-a { padding: 0 0.1rem 1.1rem; color: var(--lm-fgs); }
.qa-a[hidden] { display: none; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--lm-sp4); align-items: start; }
.game-panel { display: grid; gap: var(--lm-sp3); }
.panel-card { background: var(--lm-sf); border: 1px solid var(--lm-ln); border-radius: var(--lm-rd2); padding: var(--lm-sp3); }
.quick-card { border-left: 4px solid var(--lm-pga); }
.status-line { font-family: var(--lm-fd); font-weight: 400; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.01em; margin: 0 0 0.3rem; color: var(--lm-pri2); }
.status-sub { color: var(--lm-mut); margin: 0; font-size: 0.9rem; }
.control-row { display: flex; flex-wrap: wrap; gap: var(--lm-sp2); align-items: center; }
.control-row + .control-row { margin-top: var(--lm-sp2); }
.field-inline { display: grid; gap: 0.3rem; flex: 1 1 120px; }
.field-inline label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--lm-mut); }
.field-inline select { font: inherit; color: var(--lm-fg); background: var(--lm-bg2); border: 1px solid var(--lm-ln); border-radius: var(--lm-rd1); padding: 0.5rem; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--lm-sp2); text-align: center; }
.score-grid div { background: var(--lm-bg2); border: 1px solid var(--lm-ln); border-radius: var(--lm-rd1); padding: var(--lm-sp2); }
.score-grid strong { display: block; font-family: var(--lm-fd); font-weight: 400; font-size: 1.5rem; color: var(--lm-pga); }
.score-grid span { font-size: 0.72rem; color: var(--lm-mut); text-transform: uppercase; letter-spacing: 0.05em; }
.metric-row { display: flex; gap: var(--lm-sp2); }
.metric { flex: 1; background: var(--lm-bg2); border: 1px solid var(--lm-ln); border-radius: var(--lm-rd1); padding: var(--lm-sp2); text-align: center; }
.metric strong { display: block; font-family: var(--lm-fd); font-weight: 400; font-size: 1.35rem; color: var(--lm-pga); }
.metric span { font-size: 0.7rem; color: var(--lm-mut); text-transform: uppercase; letter-spacing: 0.05em; }
.mini-diagram { background: var(--lm-sf); border: 1px solid var(--lm-ln); border-radius: var(--lm-rd1); padding: var(--lm-sp2); }

.board-frame { border-radius: var(--lm-rd2); padding: clamp(8px, 2.4vw, 16px); border: 2px solid var(--lm-acc); container-type: inline-size; }
.board-frame--reversi { background: #16301F; }
.board-frame--c4 { background: #1E3524; }
.board-frame--mines { background: #2A1017; }
.board-frame--ws { background: var(--lm-bg2); border-color: var(--lm-ln); }

#reversi-board, #c4-board, #mines-board, #ws-board { display: grid; width: 100%; }
#reversi-board { grid-template-columns: repeat(8, 1fr); gap: 2px; aspect-ratio: 1 / 1; }
.rev-cell { position: relative; border: 0; margin: 0; padding: 0; background: #235133; aspect-ratio: 1 / 1; display: grid; place-items: center; cursor: pointer; }
.rev-cell:disabled { cursor: default; }
.rev-cell--hint::after { content: ""; width: 26%; height: 26%; border-radius: 50%; background: rgba(232, 163, 61, 0.85); }
.rev-disc { width: 80%; height: 80%; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.rev-disc--you { background: radial-gradient(circle at 35% 30%, #3a1420, #1a0509 70%); border: 2px solid #1a0509; }
.rev-disc--foe { background: radial-gradient(circle at 35% 30%, #fff9ee, #f3e9dc 70%); border: 2px solid var(--lm-acc); }

#c4-board { grid-template-columns: repeat(7, 1fr); gap: clamp(4px, 1.4cqw, 10px); aspect-ratio: 7 / 6; }
.c4-cell { position: relative; border: 0; margin: 0; padding: 0; background: transparent; aspect-ratio: 1 / 1; cursor: pointer; }
.c4-cell::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: #142218; box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6); }
.c4-token { position: absolute; inset: 8%; border-radius: 50%; z-index: 1; }
.c4-token--you { background: radial-gradient(circle at 35% 30%, #e2645a, #b8362c 70%); border: 2px solid #7c1f18; }
.c4-token--foe { background: radial-gradient(circle at 35% 30%, #f3d385, #e8a33d 70%); border: 2px solid #a56a1f; }
.c4-cell--win .c4-token { outline: 3px solid var(--lm-fg); outline-offset: -3px; }

#mines-board { gap: 3px; }
.mine-cell { aspect-ratio: 1 / 1; border: 0; border-radius: 3px; background: #401A24; color: var(--lm-fg); font-weight: 800; cursor: pointer; display: grid; place-items: center; line-height: 1; font-size: calc(58cqw / var(--mines-cols, 9)); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.3), inset 2px 2px 0 rgba(232, 163, 61, 0.16); }
.mine-cell--open { background: #2A1017; box-shadow: inset 0 0 0 1px var(--lm-ln); }
.mine-cell--mine { background: var(--lm-dgr); color: var(--lm-dk); }
.mine-cell--flag { color: var(--lm-acc); }
.mine-cell--n1 { color: #6FB1D9; }
.mine-cell--n2 { color: #5C9468; }
.mine-cell--n3 { color: #E8A33D; }
.mine-cell--n4 { color: #B98BD9; }
.mine-cell--n5 { color: #D9C36B; }
.mine-cell--n6 { color: #4FB3A6; }
.mine-cell--n7 { color: #D9748F; }
.mine-cell--n8 { color: #CBA79D; }

#ws-board { grid-template-columns: repeat(12, 1fr); gap: 2px; }
.ws-cell { aspect-ratio: 1 / 1; border: 0; border-radius: 3px; background: #3A0F18; color: var(--lm-fg); font-weight: 800; text-transform: uppercase; cursor: pointer; line-height: 1; font-size: calc(56cqw / var(--ws-cols, 12)); }
.ws-cell--start { background: var(--lm-acc); color: var(--lm-dk); }
.ws-cell--found { background: var(--lm-g-ws); color: var(--lm-dk); text-decoration: line-through; }
.ws-words { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.ws-word { padding: 0.25rem 0.65rem; border: 1px solid var(--lm-ln); border-radius: var(--lm-rd1); font-weight: 700; font-size: 0.9rem; }
.ws-word--found { background: var(--lm-g-ws); color: var(--lm-dk); text-decoration: line-through; border-color: transparent; }

.game-reversi { --lm-pga: var(--lm-g-reversi); }
.game-c4 { --lm-pga: var(--lm-g-c4); }
.game-mines { --lm-pga: var(--lm-g-mines); }
.game-ws { --lm-pga: var(--lm-g-ws); }

.lm-bar { position: fixed; left: 50%; bottom: var(--lm-sp3); transform: translateX(-50%); width: min(720px, calc(100% - 2 * var(--lm-sp3))); background: var(--lm-sf); border: 2px solid var(--lm-acc); border-radius: var(--lm-rd2); box-shadow: var(--lm-sh2); padding: var(--lm-sp3); z-index: 60; }
.lm-bar[hidden] { display: none; }
.lm-bar p { font-size: 0.92rem; margin-bottom: var(--lm-sp2); }
.consent-actions { display: flex; flex-wrap: wrap; gap: var(--lm-sp2); }
.lm-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--lm-sp3); background: rgba(20, 5, 9, 0.78); }
.lm-modal[hidden] { display: none; }
.lm-modal-panel { background: var(--lm-sf); border-radius: var(--lm-rd3); border: 2px solid var(--lm-acc); max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; padding: var(--lm-sp4); box-shadow: var(--lm-sh2); }
.consent-option { display: flex; gap: var(--lm-sp2); align-items: flex-start; border: 1px solid var(--lm-ln); border-radius: var(--lm-rd1); padding: var(--lm-sp2); margin-bottom: var(--lm-sp2); }
.consent-option input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--lm-acc); }
.consent-option label { font-weight: 700; }
.consent-option p { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--lm-mut); }
.lm-modal-actions { display: flex; flex-wrap: wrap; gap: var(--lm-sp2); margin-top: var(--lm-sp3); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

kbd { background: var(--lm-sf2); border: 1px solid var(--lm-ln); border-radius: 4px; padding: 0.05em 0.4em; font-size: 0.9em; }

@media (max-width: 860px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-panel { order: 2; }
}
@media (max-width: 680px) {
  .nv-tgl { display: inline-block; }
  .nv { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--lm-bg2); border-bottom: 3px solid var(--lm-acc); padding: var(--lm-sp2) var(--lm-sp3); }
  .nv-open { display: block; }
  .nv ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nl { display: block; }
  .footer-baseline { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
.wrap.prose::after { content: ""; display: table; clear: both; }
.howto-figure { float: right; width: min(42%, 260px); margin: 0.3rem 0 var(--lm-sp3, 1.0rem) var(--lm-sp4, 1.45rem); border-radius: var(--lm-rd2, 10px); overflow: hidden; border: 2px solid var(--lm-acc); box-shadow: var(--lm-sh1, 0 8px 22px rgba(0,0,0,0.35)); }
.howto-figure img { width: 100%; height: auto; display: block; }
@media (max-width: 640px) { .howto-figure { float: none; width: 100%; max-width: 340px; margin: 0 auto var(--lm-sp3, 1.0rem); } }

/* Scoreboard hero graphic (homepage signature element) */
.scoreboard { background: var(--lm-bg2); border: 3px solid var(--lm-acc); border-radius: var(--lm-rd2); padding: var(--lm-sp4); box-shadow: var(--lm-sh2); }
.scoreboard__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--lm-sp2); border-bottom: 2px solid var(--lm-acc2); padding-bottom: var(--lm-sp2); margin-bottom: var(--lm-sp3); }
.scoreboard__head span:first-child { font-family: var(--lm-fd); font-weight: 400; font-size: 1rem; letter-spacing: 0.04em; color: var(--lm-fg); text-transform: uppercase; }
.scoreboard__sub { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lm-mut); }
.scoreboard__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--lm-sp3); }
.sb-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; background: var(--lm-bg); border: 2px solid var(--lm-acc); border-radius: var(--lm-rd1); padding: var(--lm-sp2); }
.sb-art { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; display: block; }
.sb-num { position: absolute; top: 0.5rem; left: 0.5rem; font-family: var(--lm-fd); font-weight: 400; font-size: 1rem; line-height: 1; color: var(--lm-dk); background: var(--lm-acc); padding: 0.15rem 0.4rem; border-radius: 4px; }
.sb-lbl { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--lm-fgs); text-align: center; }
