/* The Opera Game page. Sits on top of ../../assets/styles.css, in the radio's
   night colours, with the board in the desk's walnut and cream. */
body.og {
  --ground: #0A1633; --text: #E9F0FC;
  --muted: rgba(233, 240, 252, .75); --faint: rgba(233, 240, 252, .66);
  --accent: #3B8AF7; --accent-strong: #3B8AF7; --fill: rgba(59, 138, 247, .09);
  --line: rgba(59, 138, 247, .32); --hairline: rgba(59, 138, 247, .16);
  --card-border: rgba(59, 138, 247, .30); --chip-border: rgba(59, 138, 247, .24);
  --logo-fix: none;
  --og-gold: #E9B95C; --og-light: #d9c69c; --og-dark: #7a5236;
  color-scheme: dark;
  background: var(--ground);
  color: var(--text);
}
body.og::before { display: none; }
.og header { padding-block: .9rem; }
.og-brandtag { font-weight: 600; color: var(--og-gold); }

.og-main { padding-block: clamp(2rem, 5vw, 3.5rem) 3rem; }
.og-kicker { color: var(--accent); letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .6rem; }
.og-main h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 .8rem; letter-spacing: -.02em; }
.og-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 44rem; margin: 0 0 2.4rem; }
.og-main h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 0 0 .9rem; letter-spacing: -.01em; }
.og-story { max-width: 44rem; margin: 0 0 2.6rem; }
.og-story p { font-family: "Newsreader", Georgia, serif; font-size: 1.12rem; line-height: 1.65; margin: 0 0 1rem; color: var(--text); }
.og-story a, .og-back { color: var(--og-gold); }

.og-viewer { margin: 0 0 3rem; }
.og-hint { color: var(--faint); margin: 0 0 1.2rem; }
.og-layout { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.og-boardcol { min-width: 0; }
.og-players { font-size: .78rem; letter-spacing: .06em; color: var(--muted); margin: .4rem 0; }
.og-white::before, .og-black::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .45em; vertical-align: -.05em; }
.og-white::before { background: #f6efdf; } .og-black::before { background: #15161f; box-shadow: 0 0 0 1px #6a70a0; }

.og-board {
  display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1;
  border: 10px solid #2a2c33; border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px #4d515c;
  background: #2a2c33;
}
.og-sq {
  position: relative; display: grid; place-items: center; aspect-ratio: 1;
  font-size: clamp(1.4rem, 6.4vw, 2.6rem); line-height: 1; user-select: none;
  font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols 2", "Apple Symbols", serif;
}
.og-sq.is-light { background: var(--og-light); } .og-sq.is-dark { background: var(--og-dark); }
.og-sq.is-white { color: #fbf6ea; text-shadow: 0 0 1px #2a1a12, 0 0 1px #2a1a12, 0 1px 1px #2a1a12, 0 2px 3px rgba(0, 0, 0, .35); }
.og-sq.is-black { color: #15161f; text-shadow: 0 0 1px #6a70a0, 0 2px 3px rgba(0, 0, 0, .35); }
.og-sq.is-last::after { content: ""; position: absolute; inset: 0; background: rgba(255, 59, 42, .28); box-shadow: inset 0 0 0 2px rgba(255, 59, 42, .7); pointer-events: none; }
.og-sq.is-mate { box-shadow: inset 0 0 0 3px #ff3b2a; background-image: radial-gradient(circle, rgba(255, 59, 42, .45), transparent 70%); }
.og-sq[data-rank]::before, .og-sq[data-file]::before { position: absolute; font: 600 .6rem/1 "Company31 Mono", monospace; color: rgba(42, 26, 18, .65); text-shadow: none; }
.og-sq[data-rank]::before { content: attr(data-rank); top: 3px; left: 3px; }
.og-sq[data-file]::before { content: attr(data-file); bottom: 3px; right: 4px; }
.og-sq[data-rank][data-file]::before { content: attr(data-rank); }   /* a1: the rank only */

.og-controls { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.og-controls button {
  flex: 1 1 0; min-width: 3rem; min-height: 44px; border-radius: 10px; border: 1px solid var(--card-border);
  background: var(--fill); color: var(--text); font: inherit; font-size: 1rem; cursor: pointer;
}
.og-controls #og-play { flex: 2 1 0; background: var(--og-gold); color: #1a1206; border-color: transparent; font-weight: 600; }
.og-controls button:hover { border-color: var(--accent); }
.og-controls button:focus-visible, .og-moves button:focus-visible { outline: 2px solid #ffb347; outline-offset: 2px; }

.og-notecol { min-width: 0; }
.og-movename { color: var(--og-gold); font-size: 1.1rem; margin: .2rem 0 .5rem; text-transform: none; letter-spacing: .02em; }
.og-note { font-family: "Newsreader", Georgia, serif; font-size: 1.15rem; line-height: 1.6; min-height: 7.5em; margin: 0 0 1.2rem; }
.og-moves {
  text-transform: none; letter-spacing: normal;
  list-style: decimal; margin: 0; padding: .6rem .6rem .6rem 2.6rem; max-height: 22rem; overflow: auto;
  border: 1px solid var(--card-border); border-radius: 12px; background: rgba(6, 13, 34, .5); font-size: .95rem;
}
.og-moves li { padding: .15rem 0; color: var(--faint); }
.og-moves button {
  min-width: 5.2rem; padding: .25rem .45rem; margin-right: .35rem; border-radius: 6px; border: 0;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.og-moves button:hover { background: var(--fill); }
.og-moves button.is-on { background: rgba(233, 185, 92, .18); color: var(--og-gold); }

@media (max-width: 820px) {
  .og-layout { grid-template-columns: 1fr; }
  .og-boardcol { max-width: 30rem; }
  .og-note { min-height: 0; }
  .og-moves { max-height: 14rem; }
}
