@font-face {
  font-family: "DotGothic16";
  src: url("fonts/DotGothic16-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "DotGothic16", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  background-color: #EBE2D4;
  color: #101010;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #BFB7AD;
  min-height: 100vh;
  min-height: 100dvh;
  color: #342D2F;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
}

button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  font-weight: bold;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.button:disabled:hover {
  transform: none;
}

.button--primary,
.button--ghost {
  /* reel-button と同じ階段状のドット調エッジ */
  clip-path: polygon(
    12px 0, calc(100% - 12px) 0, calc(100% - 12px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 12px, 100% 12px, 100% calc(100% - 12px),
    calc(100% - 4px) calc(100% - 12px), calc(100% - 4px) calc(100% - 4px), calc(100% - 12px) calc(100% - 4px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 4px), 4px calc(100% - 4px),
    4px calc(100% - 12px), 0 calc(100% - 12px), 0 12px, 4px 12px, 4px 4px, 12px 4px
  );
}

.button--primary {
  background-color: #342D2F;
  color: #EBE2D4;
}

.button--ghost {
  background-color: #C8C0B4;
  color: #101010;
  border: none;
}

.app {
  background: #EBE2D4;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
}

.screen {
  display: none;
}

.screen--active {
  display: block;
}

.title-panel,
.result-panel,
.game-header,
.game-footer {
  width: 100%;
}

.status-card {
  background: #f4f2ef;
  padding: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.status-card strong {
  font-size: 1em;
  text-align: right;
}

.status-label,
.result-label {
  font-size: 0.9rem;
}

.result-label {
  display: block;
}

strong {
  font-size: 2rem;
}

img {
  max-width: 100%;
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  box-sizing: border-box;
}

.overlay.hidden {
  display: none;
}

.overlay-image {
  object-fit: contain;
  pointer-events: none;
}
