﻿:root {
  --bg: #f4efe6;
  --wood: #d9b88f;
  --ink: #3b2f2f;
  --red: #c0392b;
  --black: #2c2c2c;
  --accent: #3b7a57;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 10%, #fff7e8 0%, #f2e3cb 55%, #ead5b1 100%);
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
}

.app {
  max-width: 980px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

h1 {
  font-size: 28px;
  letter-spacing: 1px;
  margin: 0;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  filter: brightness(1.05);
}

.depth {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}

.boardWrap {
  width: min(100%, 540px);
}

#board {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 10;
  background: var(--wood);
  border: 2px solid #8c6a45;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  touch-action: manipulation;
}

.status {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px;
  min-height: 200px;
}

.status .turn {
  font-size: 18px;
  margin-bottom: 8px;
}

.status .ai {
  font-size: 14px;
  color: #5b4c40;
  margin-bottom: 8px;
}

.status .msg {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--accent);
}

.status .msg.check {
  color: var(--red);
  font-weight: 700;
}

.status .hint {
  font-size: 14px;
  color: #5b4c40;
  margin-bottom: 16px;
}

.legend {
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .app {
    margin-top: 16px;
  }

  main {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .boardWrap {
    width: 100%;
    max-width: 540px;
  }

  .status {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 0 10px;
  }

  h1 {
    font-size: 22px;
  }

  button {
    width: 100%;
    justify-content: center;
  }

  .depth {
    width: 100%;
    flex-wrap: wrap;
  }

  .depth input {
    width: 100%;
  }

  .status {
    padding: 14px;
  }
}


