/* sumika - 隣へ進み、色をめぐる六角格子 */

:root {
  --bg: #20212b;
  --text: #e8e6f0;
  --text-dim: #9a97ab;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  touch-action: manipulation;
  overscroll-behavior: none;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
}

/* ========================================
   ヘッダー・タイトル
   ======================================== */

#header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
}

#game-title {
  font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--text-dim);
  margin: 8px 0 0;
}

#header-restart-button {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 16px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-dim);
  opacity: 0.6;
  cursor: pointer;
  z-index: 50;
}

/* ========================================
   盤面（六角格子、odd-r オフセット、pointy-top）
   ======================================== */

#board-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

#board {
  position: relative;
}

.hex {
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s ease;
}


.hex.is-current::after {
  content: '';
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #343644;
  pointer-events: none;
}

.hex:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px #343644;
}

@media (prefers-reduced-motion: reduce) {
  .hex { transition: none; }
}
