/* Reversi with the Fluffy Kitten — soft, healing presentation. Original CSS. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #43302a; min-height: 100vh; overflow-x: hidden; background: #f7ead9;
}
button { font: inherit; cursor: pointer; }
#bg { position: fixed; inset: 0; background: url("assets/bg.webp") center/cover no-repeat; opacity: .55; z-index: 0; }
#btn-lang {
  position: fixed; top: 10px; right: 158px; z-index: 60;
  background: rgba(255,252,247,.94); color: #7a4a21; border: 2px solid #d9a05b;
  border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 14px; min-height: 44px;
}
#btn-sound {
  position: fixed; top: 10px; right: 10px; z-index: 60;
  background: rgba(255,252,247,.94); color: #7a4a21; border: 2px solid #d9a05b;
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; min-height: 44px;
}
.wrap { position: relative; z-index: 5; max-width: 520px; margin: 0 auto; padding: 58px 14px 44px; }
.title-block { text-align: center; margin-bottom: 10px; }
.kicker { margin: 0; font-size: 13px; letter-spacing: .14em; font-weight: 800; color: #a05c2c; text-transform: uppercase; }
.title-block h1 { margin: 4px 0 0; font-size: 30px; color: #5b3a29; text-shadow: 0 2px 0 rgba(255,255,255,.7); }
.title-block .amp { font-size: 18px; color: #a05c2c; }
.panel {
  background: rgba(255,252,247,.92); border: 2px solid #ecd9bd; border-radius: 22px;
  padding: 18px 16px 20px; box-shadow: 0 16px 36px rgba(122,74,33,.18); backdrop-filter: blur(3px);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel.center { text-align: center; }
.panel h2 { margin: 10px 0 6px; font-size: 20px; }
.label { font-weight: 800; color: #8a5a33; margin: 14px 0 6px; font-size: 14px; }
.note { font-size: 12.5px; color: #9b7c62; line-height: 1.6; }
.opp-row { display: flex; align-items: flex-end; gap: 10px; }
.opp-row.center-row { align-items: center; }
.kitten-slot { position: relative; flex: none; line-height: 0; }
.char-img { width: 92px; height: auto; animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.kitten-img { width: 92px; height: auto; animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.kitten-bounce { animation: bounceA .55s ease !important; }
@keyframes bounceA { 30% { transform: translateY(-14px) scale(1.04); } 60% { transform: translateY(0); } }
.kitten-shake { animation: shakeA .45s ease !important; }
@keyframes shakeA { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.accent { position: absolute; font-size: 19px; pointer-events: none; animation: floatUp 1.1s ease-out forwards; text-shadow: 0 2px 6px rgba(255,255,255,.8); }
@keyframes floatUp { from { opacity: 0; transform: translateY(6px) scale(.6); } 25% { opacity: 1; } to { opacity: 0; transform: translateY(-40px) scale(1.15); } }
.bubble {
  position: relative; background: #fff; border: 2px solid #e8cf9f; border-radius: 14px;
  padding: 11px 13px; font-size: 14.5px; line-height: 1.55; flex: 1; color: #5b4232; font-weight: 600;
}
.bubble::before { content: ""; position: absolute; left: -9px; bottom: 16px; border: 6px solid transparent; border-right-color: #e8cf9f; border-left: 0; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-height: 48px; border-radius: 999px; border: 2px solid #dcc19a;
  background: #fff; color: #7a5230; font-weight: 800; font-size: 14.5px; padding: 8px 10px;
}
.seg button.on { background: #f3b25c; border-color: #c97e1e; color: #572f00; }
.btn {
  border-radius: 999px; border: 2px solid #dcc19a; padding: 11px 18px;
  font-weight: 800; font-size: 15.5px; min-height: 50px; background: #fff; color: #7a5230;
}
.btn.big { font-size: 17.5px; min-height: 58px; width: 100%; margin-top: 18px; }
.btn.primary { background: #f3b25c; border-color: #c97e1e; color: #572f00; box-shadow: 0 4px 0 #c97e1e; }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #c97e1e; }
.btn.ghost { background: transparent; }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row .btn { flex: 1; }
.row.col { flex-direction: column; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 10px; }
.score-chip { border-radius: 999px; padding: 6px 13px; font-weight: 800; font-size: 14.5px; }
.black-chip { background: #3a3230; color: #fdf6ec; }
.white-chip { background: #fff; border: 2px solid #d8c6ab; color: #5b4232; }
.turn-label { font-weight: 800; color: #a05c2c; font-size: 14.5px; }
#board {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  background: #7fae7a; padding: 10px; border-radius: 16px;
  border: 3px solid #5d8a58; box-shadow: inset 0 2px 10px rgba(0,0,0,.18);
}
.cell {
  aspect-ratio: 1; border: none; border-radius: 9px; background: #93c48d;
  display: flex; align-items: center; justify-content: center; position: relative; padding: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
.cell.legal { cursor: pointer; }
.cell .hint-dot { width: 26%; height: 26%; border-radius: 50%; background: rgba(255,255,255,.55); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); opacity: .7; } }
.cell .stone {
  width: 84%; height: 84%; border-radius: 50%; position: relative;
  transition: transform .18s ease;
}
.cell .stone.black { background: radial-gradient(circle at 35% 30%, #6b5d58, #241d1b 70%); box-shadow: 0 3px 5px rgba(0,0,0,.35); }
.cell .stone.white { background: radial-gradient(circle at 35% 30%, #ffffff, #e9ddc9 75%); box-shadow: 0 3px 5px rgba(0,0,0,.25); }
.cell .stone.flipping { animation: flipA .38s ease; }
@keyframes flipA { 0% { transform: rotateY(0) scale(1); } 50% { transform: rotateY(90deg) scale(1.12); } 100% { transform: rotateY(0) scale(1); } }
.cell .last-mark { position: absolute; right: 4px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #ffb703; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.status { min-height: 24px; text-align: center; font-weight: 700; color: #8a5a33; margin: 12px 0 0; }
.result-detail { font-size: 17px; font-weight: 800; color: #5b3a29; }
@media (max-width: 360px) {
  .title-block h1 { font-size: 25px; }
  .kitten-img { width: 76px; }
  #board { gap: 3px; padding: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .kitten-img, .cell .hint-dot { animation: none; }
}

.video-banner { width: 100%; height: 180px; object-fit: cover; border-radius: 14px; display: block; margin-bottom: 10px; background: #2e2a26; }

/* --- Large play area: use the full smartphone width --- */
.wrap { padding-left: 5px; padding-right: 5px; }
.panel { padding-left: 7px; padding-right: 7px; }
#board { padding: 6px; gap: 3px; }
.video-banner { height: 200px; }
