:root {
  color-scheme: light;
  --bg: #f5f5f2;
  --surface: #ffffff;
  --line: #d9d9d2;
  --text: #242520;
  --muted: #717268;
  --accent: #1d6f62;
  --accent-dark: #155348;
  --danger: #9b342d;
  --shadow: 0 16px 36px rgba(30, 34, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 650;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  text-decoration: none;
}

.top-link {
  border: 1px solid var(--line);
  color: var(--accent-dark);
  padding: 0 14px;
}

.primary-link {
  width: fit-content;
  background: var(--accent);
  color: #fff;
  padding: 0 20px;
}

.language-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.language-control select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}

.mini-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
}

.mini-stats span {
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto;
  align-items: start;
}

.seo-intro {
  width: min(1120px, calc(100% - 32px));
  margin: 20px auto 0;
  color: var(--muted);
}

.seo-intro h2 {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 18px;
}

.seo-intro p {
  max-width: 820px;
  line-height: 1.65;
}

.workspace {
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-subtitle {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h2 {
  font-size: 22px;
  font-weight: 650;
}

.game-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.game-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
  padding: 18px;
}

.game-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  border: 1px solid rgba(36, 37, 32, 0.08);
  border-radius: 8px;
  background: #fff;
}

.game-card-label {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 650;
}

.game-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 650;
}

.game-card p {
  color: var(--muted);
  line-height: 1.65;
}

.game-card button {
  width: fit-content;
}

.game-card-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 650;
}

.detail-link:hover,
.top-link:hover {
  text-decoration: underline;
}

.detail-article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.detail-article-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent-dark);
  font-weight: 650;
  padding: 0 12px;
  text-decoration: none;
}

.detail-article-links a:hover {
  background: #edf5f2;
}

.detail-layout {
  display: grid;
  gap: 22px;
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

.detail-copy {
  display: grid;
  gap: 14px;
}

.detail-copy h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.detail-copy p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.75;
}

.detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(36, 37, 32, 0.08);
  border-radius: 8px;
  background: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.game-card.is-coming-soon {
  opacity: 0.72;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.setting-control {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf9;
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
}

.setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-label strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  white-space: nowrap;
}

input[type="number"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.question-control .setting-label input {
  max-width: 100px;
  text-align: right;
}

button {
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  padding: 0 20px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  padding: 0 16px;
}

.daily-button {
  border-color: rgba(29, 111, 98, 0.35);
  color: var(--accent-dark);
  background: #f3f8f3;
}

.share-button {
  border-color: rgba(29, 111, 98, 0.35);
  color: var(--accent-dark);
}

.game-panel {
  display: grid;
  gap: 22px;
}

.question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-height: 160px;
  align-content: center;
  text-align: center;
}

.question {
  font-size: clamp(46px, 9vw, 96px);
  font-weight: 620;
  line-height: 1.05;
  letter-spacing: 0;
}

.answer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  height: 56px;
  color: var(--accent-dark);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
  word-break: break-all;
}

.feedback {
  min-height: 24px;
  color: var(--muted);
  text-align: center;
}

.feedback.is-error {
  color: var(--danger);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 10px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.keypad button {
  aspect-ratio: 1.65 / 1;
  background: #f7f7f4;
  border-color: var(--line);
  color: var(--text);
  font-size: 24px;
}

.keypad button:hover {
  background: #eeeeea;
}

.game-actions {
  text-align: center;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-share-actions {
  margin-top: 14px;
}

.polyomino-panel {
  display: grid;
  gap: 18px;
}

.polyomino-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.polyomino-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.polyomino-status {
  min-height: 24px;
  color: var(--muted);
}

.polyomino-play {
  display: grid;
  grid-template-columns: minmax(260px, 460px) minmax(220px, 1fr);
  gap: 18px;
  align-items: start;
}

.polyomino-board {
  --board-size: 5;
  display: grid;
  grid-template-columns: repeat(var(--board-size), minmax(0, 1fr));
  width: min(100%, 460px);
  aspect-ratio: 1;
  border: 2px solid rgba(29, 111, 98, 0.26);
  border-radius: 8px;
  background: #dfe7e2;
  overflow: hidden;
}

.polyomino-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 37, 32, 0.2);
  border-radius: 0;
  background: #ffffff;
  padding: 0;
}

.polyomino-cell::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(29, 111, 98, 0.22);
}

.polyomino-cell:hover {
  background: #eef5f2;
}

.polyomino-cell.is-preview-valid {
  background: rgba(29, 111, 98, 0.32);
  box-shadow: inset 0 0 0 3px rgba(29, 111, 98, 0.52);
}

.polyomino-cell.is-preview-invalid {
  background: rgba(155, 52, 45, 0.24);
  box-shadow: inset 0 0 0 3px rgba(155, 52, 45, 0.46);
}

.polyomino-cell.is-filled {
  border-color: rgba(255, 255, 255, 0.36);
}

.polyomino-cell.is-filled::after,
.polyomino-cell.is-preview-valid::after,
.polyomino-cell.is-preview-invalid::after {
  display: none;
}

.polyomino-pieces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 10px;
  touch-action: none;
}

.polyomino-piece {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-color: var(--line);
  background: #fbfbf9;
  padding: 8px;
  touch-action: none;
  user-select: none;
}

.polyomino-piece:hover {
  background: #f1f6f4;
}

.polyomino-piece.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.polyomino-piece.is-placed {
  opacity: 0.38;
}

.polyomino-drag-ghost {
  position: fixed;
  z-index: 100;
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(29, 111, 98, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(30, 34, 29, 0.18);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.polyomino-preview {
  --piece-rows: 3;
  --piece-cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--piece-cols), 16px);
  grid-template-rows: repeat(var(--piece-rows), 16px);
  gap: 2px;
}

.polyomino-preview span {
  border-radius: 3px;
}

.polyole-result {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.polyole-result h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.polyole-result p {
  color: var(--muted);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
}

.result-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #fbfbf9;
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.result-grid strong {
  font-size: 22px;
  font-weight: 650;
}

.history-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #f7f7f4;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.ad-slot {
  position: sticky;
  top: 18px;
  min-height: 280px;
  border: 1px dashed #bfc0b8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  padding: 18px;
}

.ad-slot span {
  font-size: 12px;
  letter-spacing: 0.08em;
}

.ad-slot p {
  font-size: 14px;
}

.ad-fallback {
  display: grid;
  gap: 6px;
}

.adsense-container {
  width: 100%;
  min-height: 250px;
}

.adsense-container .adsbygoogle {
  min-height: 250px;
}

.site-info {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.info-panel h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.info-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.article-layout {
  width: min(920px, calc(100% - 32px));
  margin: 28px auto 42px;
}

.article-body {
  display: grid;
  gap: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-dark);
  font-weight: 650;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.article-hero,
.article-section,
.article-cta {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

.article-hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
}

.article-section h2,
.article-cta h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.article-body p,
.article-body li {
  color: var(--muted);
  line-height: 1.85;
}

.article-main-image,
.article-image {
  width: 100%;
  border: 1px solid rgba(36, 37, 32, 0.08);
  border-radius: 8px;
  background: #fff;
}

.article-main-image {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.article-image {
  object-fit: contain;
}

.article-formula-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.article-formula-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  padding: 14px;
}

.article-steps {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.home-info.legal-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.legal-panel details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.legal-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.legal-panel summary::-webkit-details-marker {
  display: none;
}

.legal-panel summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
}

.legal-panel details[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fbfbf9;
}

.legal-panel details[open] summary::after {
  content: "-";
}

.legal-panel p,
.legal-panel .contact-link {
  margin: 14px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-dark);
  text-decoration: none;
}

.contact-link:hover {
  background: #edf5f2;
}

.info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.info-head h2 {
  margin-bottom: 0;
}

.compact-button {
  min-height: 34px;
  padding: 0 12px;
}

.record-summary {
  margin-bottom: 12px;
}

.record-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.record-list li {
  color: var(--muted);
  line-height: 1.45;
}

.record-list strong {
  display: inline-block;
  margin: 0 8px;
  color: var(--text);
}

.record-list small {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 22px 16px 34px;
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--accent-dark);
  text-decoration: none;
}

.is-hidden {
  display: none;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .game-select-grid,
  .result-grid,
  .polyomino-settings,
  .polyomino-play,
  .info-grid,
  .detail-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .polyomino-actions {
    justify-content: stretch;
  }

  .ad-slot {
    position: static;
    min-height: 90px;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-layout {
    width: min(100% - 24px, 920px);
    margin: 16px auto 28px;
  }

  .article-formula-list {
    grid-template-columns: 1fr;
  }

  .mini-stats {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-tools,
  .language-control {
    width: 100%;
  }

  .top-link {
    width: 100%;
  }

  .language-control select {
    flex: 1;
  }

  .mini-stats span {
    flex: 1;
  }

  .panel-head,
  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .primary-link {
    width: 100%;
  }

  .game-card {
    min-height: 0;
  }

  .game-card-image {
    aspect-ratio: 1.55 / 1;
  }
}

body.is-game-screen {
  min-height: 100dvh;
  overflow: hidden;
}

body.is-game-screen.is-polyole-complete {
  overflow: auto;
}

body.is-game-screen .topbar {
  min-height: 64px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: #fafaf7;
}

body.is-game-screen h1 {
  font-size: 26px;
}

body.is-game-screen .topbar p {
  display: none;
}

body.is-game-screen .layout {
  grid-template-columns: 1fr;
  width: min(1180px, calc(100% - 20px));
  height: calc(100dvh - 84px);
  margin: 10px auto;
}

body.is-game-screen.is-polyole-complete .layout {
  height: auto;
}

body.is-game-screen .workspace,
body.is-game-screen .panel {
  height: 100%;
  min-height: 0;
}

body.is-game-screen .ad-slot,
body.is-game-screen .site-info,
body.is-game-screen .footer {
  display: none;
}

body.is-game-screen.is-polyole-complete .site-info {
  display: block;
}

body.is-game-screen.is-polyole-complete .footer {
  display: flex;
}

body.is-game-screen .panel {
  max-height: 100%;
  overflow: hidden;
  border-color: rgba(29, 111, 98, 0.28);
  box-shadow: inset 0 0 0 1px rgba(29, 111, 98, 0.08), var(--shadow);
  padding: 16px;
}

body.is-game-screen.is-polyole-complete .panel {
  height: auto;
  max-height: none;
  overflow: visible;
}

body.is-game-screen .game-panel {
  grid-template-rows: minmax(0, 1fr) auto minmax(190px, 42dvh) auto;
  align-items: center;
  gap: 12px;
}

body.is-game-screen .question-row {
  min-height: 0;
}

body.is-game-screen .keypad {
  max-width: min(420px, 100%);
}

body.is-game-screen .polyomino-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
}

body.is-game-screen .polyomino-panel .panel-head {
  margin-bottom: 0;
}

body.is-game-screen .polyomino-settings {
  gap: 10px;
}

body.is-game-screen .polyomino-status {
  min-height: 20px;
  font-size: 14px;
}

body.is-game-screen .polyomino-play {
  min-height: 0;
  grid-template-columns: minmax(220px, min(52dvh, 440px)) minmax(180px, 1fr);
  gap: 12px;
  align-items: stretch;
}

body.is-game-screen .polyomino-board {
  width: min(100%, 52dvh);
  align-self: start;
}

body.is-game-screen .polyomino-pieces {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 7px;
  align-content: start;
}

body.is-game-screen .polyomino-piece {
  min-height: 58px;
  padding: 5px;
}

body.is-game-screen .polyomino-preview {
  grid-template-columns: repeat(var(--piece-cols), 10px);
  grid-template-rows: repeat(var(--piece-rows), 10px);
  gap: 1px;
}

body.is-game-screen .polyole-result {
  padding-top: 10px;
  gap: 6px;
  background: #ffffff;
}

body.is-game-screen .polyole-result h3 {
  font-size: 17px;
}

body.is-game-screen .polyole-result .result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body.is-game-screen .polyole-result .result-grid div {
  padding: 8px;
}

@media (max-width: 640px) {
  body.is-game-screen .topbar {
    align-items: center;
    flex-direction: row;
    min-height: 58px;
    padding: 8px 10px;
  }

  body.is-game-screen h1 {
    font-size: 22px;
  }

  body.is-game-screen .language-control {
    display: none;
  }

  body.is-game-screen .topbar-tools {
    width: auto;
  }

  body.is-game-screen .mini-stats {
    width: auto;
    gap: 6px;
    flex-wrap: nowrap;
  }

  body.is-game-screen .mini-stats span {
    min-width: 68px;
    padding: 6px;
  }

  body.is-game-screen .layout {
    width: calc(100% - 12px);
    height: calc(100dvh - 70px);
    margin: 6px auto;
  }

  body.is-game-screen.is-polyole-complete .layout {
    height: auto;
  }

  body.is-game-screen .panel {
    padding: 10px;
  }

  body.is-game-screen button {
    min-height: 36px;
  }

  body.is-game-screen .primary-button,
  body.is-game-screen .ghost-button {
    padding: 0 10px;
  }

  body.is-game-screen .game-panel {
    grid-template-rows: minmax(78px, 1fr) 20px minmax(190px, 42dvh) auto;
    gap: 8px;
  }

  body.is-game-screen .question {
    font-size: 42px;
  }

  body.is-game-screen .answer {
    height: 40px;
    min-height: 40px;
    font-size: 32px;
  }

  body.is-game-screen .keypad {
    gap: 6px;
    max-width: 330px;
  }

  body.is-game-screen .keypad button {
    min-height: 0;
    font-size: 20px;
  }

  body.is-game-screen .polyomino-panel {
    gap: 6px;
  }

  body.is-game-screen .polyomino-panel .panel-head {
    align-items: stretch;
    display: grid;
    gap: 6px;
  }

  body.is-game-screen .polyomino-panel .panel-head h2 {
    font-size: 18px;
  }

  body.is-game-screen .polyomino-panel .panel-subtitle {
    display: none;
  }

  body.is-game-screen .polyomino-panel .panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  body.is-game-screen .polyomino-settings {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.is-game-screen .polyomino-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.is-game-screen .polyomino-play {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.42fr);
    gap: 6px;
  }

  body.is-game-screen .polyomino-panel.is-complete .polyomino-play {
    grid-template-columns: minmax(0, 0.92fr) minmax(82px, 0.34fr);
  }

  body.is-game-screen .polyomino-board {
    width: 100%;
  }

  body.is-game-screen .polyomino-panel.is-complete .polyomino-board {
    width: min(100%, 38dvh);
  }

  body.is-game-screen .polyomino-pieces {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 4px;
  }

  body.is-game-screen .polyomino-piece {
    min-height: 38px;
    padding: 3px;
  }

  body.is-game-screen .polyomino-preview {
    grid-template-columns: repeat(var(--piece-cols), 6px);
    grid-template-rows: repeat(var(--piece-rows), 6px);
  }

  body.is-game-screen .polyole-result {
    padding-top: 6px;
  }

  body.is-game-screen .polyole-result p {
    display: none;
  }
}
