.hero h1 { margin-top: 24px; }
.sheet { padding-top: 28px; padding-bottom: 32px; }
.calculator { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); border-radius: 16px; overflow: hidden; border: 1px solid #c8bdd0; margin-bottom: 10px; }
.inputs, .results { padding: clamp(20px, 4vw, 40px); }
.inputs { background: #fffdf9; }
.inputs h2, .results h2 { font-size: 23px; }
.inputs label { display: block; font-size: 14px; font-weight: bold; margin: 15px 0 4px; }
.inputs select, .inputs input { color: #241c2a; background: white; border: 1px solid #91899a; border-radius: 5px; font: inherit; width: 100%; padding: 8px; }
:focus-visible { outline: 3px solid #986025; outline-offset: 3px; }
#error { font-size: 14px; color: #83232c; }
#error:empty { margin: 0; }
.results { background: #30243c; color: #faf6f0; }
.main-value span { display: block; font-size: clamp(34px, 6vw, 72px); letter-spacing: -.055em; font-weight: bold; color: #e1ff66; line-height: 1.2; overflow-wrap: anywhere; }
.main-value { container-type: inline-size; }
.main-value span { font-size: clamp(24px, 17cqw, 68px); white-space: nowrap; }
.main-value span.long-chance { font-size: clamp(20px, 14cqw, 48px); }
.main-value small { color: #e3d6eb; }
.results dl { margin-bottom: 0; }
.results dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 7px 0; border-top: 1px solid #65566e; }
.results dt { font-size: 14px; }
.results dd { font-weight: bold; margin: 0 0 0 auto; overflow-wrap: anywhere; }
.note, caption { font-size: 14px; color: #584f5d; }
.payouts { margin: 22px 0 32px; }
.payouts summary { cursor: pointer; color: #583586; font-weight: bold; padding: 8px 0; }
caption { padding: 10px; text-align: left; background: #fffdf9; }
.selected { background: #f0f7d8; }
article { max-width: 760px; }
article h2 { margin-top: 28px; }
article a { color: #583586; }
@media (max-width: 640px) { .calculator { grid-template-columns: minmax(0, 1fr); } }

.board-preview {
  margin: 0;
  padding: clamp(18px, 2.3vw, 28px);
  background: #211c2b;
  color: #fbf8ff;
}
.board-preview h2 { margin: 0 0 12px; font-size: 23px; }
.board-modes {
  display: inline-flex; gap: 2px; margin: 0 0 14px; padding: 3px;
  background: #17131f; border: 1px solid #554b60; border-radius: 8px;
}
.board-modes legend, .board-modes input {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%);
}
.board-modes label { position: relative; cursor: pointer; }
.board-modes span {
  display: block; padding: 5px 12px; border-radius: 5px; font-size: 13px;
  font-weight: bold; color: #dbd3e2;
}
.board-modes input:checked + span { background: #56475e; color: white; }
.board-modes input:focus-visible + span { outline: 2px solid #deff79; outline-offset: 1px; }
.mine-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; max-width: 360px; }
.board-tile {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 18%;
  background: #19161e; border: 1px solid #403a48;
}
.board-tile i { display: block; position: relative; }
.board-tile:is([data-state="found"], [data-state="unpicked"]) i {
  width: 61%; height: 48%;
  clip-path: polygon(18% 0, 81% 0, 100% 32%, 51% 100%, 0 32%);
  background: conic-gradient(from 0deg at 50% 32%, #96ff66 0deg 62deg, #39e700 62deg 94deg, #0da32b 94deg 180deg, #1edc27 180deg 266deg, #b2ff86 266deg 305deg, #56f529 305deg);
}
.board-tile[data-state="found"] { background: #203327; border-color: #577e51; }
.board-tile[data-state="unpicked"] i { opacity: .31; transform: scale(.83); filter: saturate(.55); }
.board-tile:is([data-state="mine"], [data-state="triggered"]) i {
  width: 47%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, #ffb59b 0 8%, #ff5760 14%, #e62251 54%, #8f1645 87%);
  box-shadow: inset 0 -2px 0 #861d46;
}
.board-tile:is([data-state="mine"], [data-state="triggered"]) i::after {
  content: ""; position: absolute; width: 31%; height: 32%; left: 67%; top: -15%;
  border-top: 2px solid #ffd66f; border-left: 2px solid #ffd66f; border-radius: 80% 0 0;
}
.board-tile[data-state="triggered"] { background: #632339; border: 2px solid #ffbc8f; }
.board-tile[data-state="triggered"] i::before {
  content: ""; position: absolute; inset: 20%; background: #ffe289;
  clip-path: polygon(50% 0,60% 35%,100% 20%,74% 54%,100% 77%,61% 73%,43% 100%,38% 68%,0 66%,28% 48%,14% 20%,42% 34%);
}
.board-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 8px; font-size: 12px; }
.board-key > span { display: inline-flex; align-items: center; gap: 3px; }
.board-key i { width: 9px; height: 9px; margin-right: 2px; transform: rotate(45deg); }
.key-found { background: #6cf34c; }
.key-unpicked { border: 1px solid #8a9b88; }
.board-key .key-mine { border-radius: 50%; background: #ff646f; }
.board-preview figcaption { font-size: 12px; color: #cabfd1; line-height: 1.5; }
.board-preview figcaption strong { display: block; color: white; }
@media (min-width: 960px) {
  .calculator:has(.board-preview:not([hidden])) { grid-template-columns: minmax(0,.84fr) minmax(0,1.18fr) minmax(0,1fr); }
  .inputs, .results { padding: clamp(20px, 2vw, 30px); }
}
@media (min-width: 641px) and (max-width: 959px) {
  .calculator:has(.board-preview:not([hidden])) .results { grid-column: 1 / -1; }
}
