* {
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #20252b;
  background: #fff;
}
img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
summary {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-underline-offset: 0.18em;
}
button {
  min-height: 44px;
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  border: 1px solid currentColor;
  background: #fff;
  color: inherit;
}
button[aria-disabled="true"],
button:disabled {
  cursor: default;
  opacity: 0.66;
}
input[type="search"],
input[type="text"],
textarea {
  font-size: 16px;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #7b8188;
  min-height: 44px;
}
input[type="radio"] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #a74d00;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}
h2 {
  font-size: 1.15rem;
  line-height: 1.3;
}
h3 {
  font-size: 1rem;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -6rem;
  background: white;
  padding: 0.7rem;
  z-index: 10;
}
.skip:focus {
  top: 0.4rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.site-header,
.site-footer,
main {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}
.site-header {
  padding: 12px 0;
}
.site-header a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer {
  padding: 24px 0 32px;
  border-top: 1px solid #bbb;
  margin-top: 24px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}
.search-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.search-toolbar form {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.search-toolbar input {
  width: 100%;
  min-width: 0;
}
.search-toolbar [data-result-status] {
  flex-basis: 100%;
  font-size: 14px;
  margin: 0;
  line-height: 1.2;
}
.search-toolbar button {
  padding-inline: 10px;
}
.result-batch {
  padding: 10px 0 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid #b9bdc1;
}
.batch-heading {
  font-size: 0.9rem;
  margin: 0 0 8px;
}
.more {
  margin-top: 10px;
}
.source-section,
[data-content-group] {
  overflow-wrap: anywhere;
}
.source-section {
  padding: 12px 0;
  margin: 8px 0;
  border-top: 1px solid #c6c8ca;
}
.source-section h2 {
  margin-top: 0;
}
dialog:not([open]) {
  display: none;
}
dialog {
  border: 1px solid #333;
  padding: 0;
  max-width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  color: inherit;
  background: white;
}
dialog::backdrop {
  background: rgb(0 0 0/0.5);
}
.modal-fallback-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgb(0 0 0/0.5);
}
body[data-design-site] .game-block .image-cell > .image-failure {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 8px;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}
body[data-design-site] .register-record .image-cell > .image-failure {
  position: absolute;
  inset: 0;
}
.reading-art > .image-failure,
.fullness-art > .image-failure,
.row-completion-art > .image-failure {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
  padding: 2px;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
dialog[data-modal-fallback] {
  position: fixed;
  inset: 0;
  margin: auto;
}
dialog.title-dialog[data-modal-fallback] {
  inset: 0;
  margin: auto;
}
.modal-layout {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 26px);
  max-height: calc(100dvh - 26px);
}
.modal-head,
.modal-foot {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.modal-head h2 {
  flex: 1;
  margin: 0;
}
.modal-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 12px;
  min-height: 0;
}
.modal-foot {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #ccc;
}
.modal-body fieldset {
  border: 0;
  padding: 0;
  margin: 8px 0;
}
.modal-body summary {
  font-size: 16px;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 16px;
  padding: 8px 4px;
}
.stage {
  width: 100%;
  background: #f0f1f2;
  color: #20252b;
  border: 1px solid #72777b;
}
.stage-screen {
  aspect-ratio: 16/10;
  min-height: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-screen > img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.stage-screen iframe {
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
}
.stage-status {
  margin: 0;
  padding: 0 10px 10px;
  font-size: 14px;
}
.stage:fullscreen {
  width: 100vw;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
}
.stage:fullscreen .stage-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}
.stage:fullscreen .stage-tools {
  padding: 4px;
  gap: 4px;
}
.stage:fullscreen .stage-status {
  padding: 0 8px 4px;
}
.prose {
  max-width: 72ch;
}
.prose section {
  padding: 12px 0;
  border-top: 1px solid #bbb;
}
.image-failure {
  padding: 16px;
  background: #eee;
}
.notice {
  padding: 12px;
  border-left: 3px solid #777;
}
.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.record-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.record-editor textarea {
  display: block;
  width: 100%;
  min-height: 112px;
}
.status-line {
  font-size: 0.9rem;
}
.group-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (min-width: 1000px) {
  .search-toolbar [data-result-status] {
    flex-basis: auto;
    margin-left: 8px;
  }
  .search-toolbar form {
    max-width: 640px;
  }
}
@media (max-width: 359px) {
  .site-header,
  .site-footer,
  main {
    width: calc(100% - 24px);
  }
  .search-toolbar {
    gap: 6px;
  }
  .search-toolbar form {
    flex-basis: 100%;
  }
  .search-toolbar [data-result-status] {
    flex: 1;
  }
  .search-toolbar input {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.game-block {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  cursor: pointer;
}
.game-block:hover {
  background: rgb(80 100 100/0.07);
}
.game-block:focus-visible {
  outline: 3px solid #a74d00;
  outline-offset: 3px;
}
.game-block h2,
.game-block h3 {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.game-block img {
  padding: 0;
  object-fit: cover;
  object-position: center;
}
.stage-screen > img {
  aspect-ratio: auto;
  max-width: none;
  max-height: none;
  padding: 0;
}
.notice-item.game-block,
.notice-reading.game-block,
.fact-frame.game-block,
.index-frame.game-block,
.register-record.game-block,
.answer-example.game-block,
.switch-entry.game-block,
.picture-entry.game-block,
.saved-picture-head.game-block,
.question-game.game-block,
.saved-quote.game-block,
.quote-summary.game-block {
  display: grid;
}
@media (max-width: 999px) {
  .index-frame.game-block,
  .register-record.game-block {
    display: block;
  }
}
@media (max-width: 649px) {
  .register-record.game-block {
    display: grid;
  }
  .picture-entry.game-block,
  .quote-summary.game-block {
    display: block;
  }
}
