.landscape-help,
.play-brief {
  display: none;
}
.role-touch-goal {
  display: none;
}
.landscape-help,
#landscape-guide button {
  -webkit-tap-highlight-color: transparent;
}
#landscape-guide {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(
    100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))
  );
  padding: 0;
  border: 1px solid #9fbca680;
  border-radius: 16px;
  background: #173e38;
  color: #eef1df;
  font:
    14px/1.65 'Hiragino Kaku Gothic ProN',
    'Yu Gothic',
    sans-serif;
  overflow: hidden;
}
#landscape-guide[open] {
  display: flex;
  flex-direction: column;
}
#landscape-guide::backdrop {
  background: #071e24dc;
}
#landscape-guide * {
  box-sizing: border-box;
}
#landscape-guide button {
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
}
#landscape-guide button:focus-visible {
  outline: 3px solid #e4d7a0;
  outline-offset: 3px;
}
.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 24px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid #b7cfa330;
}
.guide-header p {
  font-size: 12px;
  color: #c4d8b7;
  margin: 0 0 2px;
}
.guide-header h2 {
  margin: 0;
  font:
    500 25px/1.5 'Yu Mincho',
    serif;
  color: inherit;
}
.guide-header button {
  min-width: 44px;
  padding: 0;
  font-size: 26px !important;
  border: 1px solid #b7cfa360;
  border-radius: 50%;
  color: inherit;
  background: transparent;
}
.guide-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  min-height: 0;
  overflow-y: auto;
}
.guide-body figure {
  margin: 0;
}
.guide-body figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: #b7cdbf;
  line-height: 1.6;
}
.guide-goal {
  margin: 0 0 12px;
  color: #e4d7a0;
  font-size: 14px;
  line-height: 1.7;
}
.guide-body ol {
  padding-left: 24px;
  margin: 0;
}
.guide-body li {
  padding-left: 5px;
  margin: 0 0 10px;
  font-size: 13px;
}
.guide-body li::marker {
  color: #e4d7a0;
}
.guide-body li p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: #d0ded0;
}
.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  border-top: 1px solid #b7cfa330;
  flex-shrink: 0;
}
.guide-footer > span {
  font-size: 12px;
  color: #c4d8b7;
}
.guide-primary {
  flex-shrink: 0;
  border: 0;
  padding: 10px 22px;
  border-radius: 24px;
  background: #e4d7a0;
  color: #173e38;
}
.guide-rotate {
  display: none;
  font-size: 13px;
  color: #e4d7a0;
}
.guide-phone {
  position: relative;
  width: 100%;
  aspect-ratio: 2.1;
  border: 5px solid #b3c8bb;
  border-radius: 22px;
  overflow: hidden;
  background: #3b706c;
  font:
    11px/1.4 'Hiragino Kaku Gothic ProN',
    'Yu Gothic',
    sans-serif;
  color: #eef1df;
  text-align: left;
}
.guide-phone::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 42%;
  width: 16%;
  height: 3px;
  border-radius: 2px;
  background: #eef1df99;
}
.guide-water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}
.guide-phone-top {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}
.guide-pan {
  position: absolute;
  left: 43%;
  right: 43%;
  top: 30%;
  text-align: center;
  font-size: 22px;
  text-shadow: 0 1px 4px #123b36;
}
.guide-left {
  position: absolute;
  left: 10px;
  bottom: 17px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid #d4e2ba88;
  border-radius: 18px;
  background: #173e38bd;
}
.guide-phone small {
  display: block;
  font-size: 9px;
  white-space: nowrap;
}
.guide-right {
  position: absolute;
  right: 10px;
  bottom: 17px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.guide-right span {
  padding: 5px 7px;
  text-align: center;
  border: 1px solid #d4e2ba88;
  border-radius: 16px;
  background: #173e38dc;
}
.guide-right small {
  grid-column: 1/-1;
  text-align: center;
}
.guide-map-shape {
  position: absolute;
  top: 24%;
  left: 28%;
  transform: rotate(22deg);
  line-height: 1;
  font-size: 19px;
  color: #e4d7a0;
  background: #407c86;
  border: 1px solid #a6cfc6;
  padding: 6px 13px;
  border-radius: 80% 40% 70% 60%;
}
.guide-map-info,
.guide-puzzle-score {
  position: absolute;
  right: 4%;
  top: 35%;
  padding: 10px;
  background: #173e38dd;
  border-radius: 6px;
}
.guide-map-time {
  position: absolute;
  left: 26%;
  bottom: 18px;
  padding: 6px 12px;
  background: #173e38dd;
  border-radius: 6px;
}
.guide-puzzle-bowl {
  position: absolute;
  left: 37%;
  top: 22%;
  width: 26%;
  height: 65%;
  border: 2px solid #cce5db;
  border-top: 0;
  text-align: center;
  color: #e4d7a0;
}
.guide-puzzle-bowl span {
  display: block;
  font-size: 9px;
}
.guide-puzzle-bowl b {
  display: block;
  line-height: 1;
  margin-top: 4px;
  font-size: 19px;
}
.guide-puzzle-score {
  right: auto;
  left: 4%;
}

@media (any-pointer: coarse) {
  .landscape-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c4d8b780;
    border-radius: 8px;
    background: #173e38;
    color: #eef1df;
    font: inherit;
    font-size: 13px;
    touch-action: manipulation;
  }
  .play-brief {
    display: block;
    padding: 16px;
    margin: 16px 0;
    background: #163e49d9;
    border: 1px solid #b7cfa340;
    border-radius: 14px;
  }
  .play-brief > span {
    font-size: 12px;
    color: #e4d7a0;
  }
  .play-brief > h2 {
    margin: 10px 0 6px;
    font:
      500 24px/1.5 'Yu Mincho',
      serif;
  }
  .play-brief > p {
    font-size: 13px;
    line-height: 1.8;
  }
  .play-brief .guide-phone {
    margin-top: 12px;
  }
}
@media (orientation: portrait) {
  #landscape-guide {
    width: calc(100vw - 24px);
  }
  .guide-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .guide-header,
  .guide-footer,
  .guide-body {
    padding: 14px 18px;
  }
  .guide-header h2 {
    font-size: 23px;
  }
  .guide-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .guide-primary {
    width: 100%;
  }
  .guide-rotate {
    display: block;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  #landscape-guide {
    width: min(
      960px,
      calc(100vw - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right)))
    );
  }
  .guide-header {
    padding: 8px 16px;
  }
  .guide-header h2 {
    font-size: 20px;
    line-height: 1.3;
  }
  .guide-body {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.2fr);
    padding: 8px 16px;
    gap: 20px;
  }
  .guide-body li {
    margin-bottom: 4px;
  }
  .guide-body li p {
    font-size: 12px;
    line-height: 1.5;
  }
  .guide-goal {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
  }
  .guide-footer {
    padding: 6px 16px;
  }
  .guide-footer > span {
    font-size: 11px;
  }
  .guide-primary {
    font-size: 13px;
    padding: 8px 16px;
  }
}
.guide-stick {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 22px;
  line-height: 1;
  opacity: 0.9;
}
