body {
  background-color: #000000;
  font-family: 'Fira Sans', sans-serif;
  font-size: 20px;
  color: #EEEEEE;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  line-height: 1.6;
}
a:link, a:visited { color: #EFEFEF; }

h1 {
  font-size: 2em;
  font-weight: 700;
  border-bottom: 2px solid #444;
  padding-bottom: 12px;
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}
h2 {
  font-size: 1.3em;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  color: #FFD700;
}
h3 {
  font-size: 1em;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #AAAAAA;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
p { margin: 0 0 16px; }

.answer-box {
  display: inline-block;
  background-color: #1a1a1a;
  border-radius: 6px;
  padding: 6px 20px;
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #FFD700;
  margin: 8px 0 24px;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.answer-box .spoiler-text { visibility: hidden; }
.answer-box .spoiler-cover {
  position: absolute;
  inset: 0;
  background-color: #333;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}
.answer-box.revealed .spoiler-cover { opacity: 0; pointer-events: none; }
.answer-box.revealed .spoiler-text { visibility: visible; }

.inline-spoiler {
  background-color: #333;
  color: transparent;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 1px 4px;
}
.inline-spoiler.revealed {
  background-color: transparent;
  color: inherit;
}

table {
  border-collapse: collapse;
  font-size: 0.8em;
  width: 100%;
  margin: 24px 0;
}
thead tr {
  background-color: #1e1e1e;
  color: #AAAAAA;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
th, td {
  border: 1px solid #333;
  padding: 8px 8px;
  text-align: center;
}
tbody tr:nth-child(even) { background-color: #0d0d0d; }
td.extract {
  font-weight: 700;
  color: #FFD700;
  text-align: center;
  letter-spacing: 0.1em;
}

.wsgrid {
  border-collapse: collapse;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.wsgrid td {
  width: 36px;
  height: 36px;
  text-align: center;
  border: 1px solid #333;
  color: #EEEEEE;
}
.wsgrid td.hl {
  background-color: #2a2200;
  color: #FFD700;
}
.grid-label {
  margin-top: 8px;
  font-size: 0.7em;
  color: #AAAAAA;
  letter-spacing: 0.08em;
}
.hl-word {
  color: #FFD700;
  font-weight: 700;
}

.funfact {
  background-color: #111;
  border-left: 4px solid #555;
  padding: 16px 20px;
  margin-top: 32px;
  font-size: 0.8em;
  color: #AAAAAA;
  border-radius: 0 4px 4px 0;
}
.funfact strong { color: #CCCCCC; }

code {
  font-family: monospace;
  background-color: #1a1a1a;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.85em;
  color: #FFD700;
}

hr {
  border: none;
  border-top: 1px solid #222;
  margin: 48px 0;
}
svg {
    width: 100%;
    height: auto;
    border: 1px solid #333;
    background: black;
}

.vcell polygon {
    fill: none;
    stroke: #ccc;
    stroke-width: 0.002;
}

.grid line {
    stroke: #222;
    stroke-width: 0.001;
}

.outline {
    fill: none;
    stroke: #fff;
    stroke-width: 0.003;
}

.vedge line {
    stroke: #999;
    stroke-width: 0.002;
}

.vedge line.infinite {
    stroke: #666;
    stroke-width: 0.003;
    stroke-dasharray: 0.01, 0.01;
    paint-order: stroke;
}

.vedge line.infinite-mask {
    stroke: black;
    stroke-width: 0.004;
}

.sites circle {
    fill: #FFD700;
}

.masyu-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin: 40px 0;
}
.masyu-wrap .grid-container {
  border: 3px solid #8b6914;
  padding: 4px;
  background: #120d04;
  box-shadow: 0 0 60px rgba(139,105,20,0.25), inset 0 0 20px rgba(0,0,0,0.6);
}
.masyu-wrap table {
  border-collapse: collapse;
  font-size: 1em;
  width: auto;
  margin: 0;
}
.masyu-wrap td {
  width: 42px;
  height: 42px;
  position: relative;
  padding: 0;
  border: 1px solid #2a1e08;
  text-align: center;
}
.masyu-wrap td.black {
  background: #0a0704;
  border-color: #150f05;
}
.masyu-wrap td.letter {
  background: #231809;
  border-color: #3a2a10;
}
.masyu-wrap .cell-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier Prime', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: #FFD700;
  z-index: 2;
}
.masyu-wrap .line-h {
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: #5a3e10;
  z-index: 1;
}
.masyu-wrap .line-v {
  position: absolute;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #5a3e10;
  z-index: 1;
}

s {
  text-decoration: : line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #FFD700;
}
