/* Tavla ailesi (tavla, mahbusa, gülbahar) ortak ekran stili */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #2b1d12;
  background: linear-gradient(165deg, #f4ead9 0%, #efe3cc 100%);
  background-color: #f2e7d3;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, select { font: inherit; }
[hidden] { display: none !important; }
.gizli-baslik { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.oyun { height: 100%; max-width: 84rem; margin: 0 auto; padding: 0.35rem 0.4rem 0.4rem; display: grid; gap: 0.35rem;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "panel" "masa"; }
@media (min-width: 600px) and (min-aspect-ratio: 1/1) {
  .oyun { grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "panel masa"; padding: 0.7rem; gap: 0.8rem; }
  .yan { align-self: center; gap: 0.55rem !important; }
  .masa { place-items: center !important; }
  .satir--dugme { flex-wrap: wrap; }
  .satir--dugme > .dugme--ana { flex-basis: 100%; }
}
.yan { grid-area: panel; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.satir { display: flex; gap: 0.3rem; align-items: flex-end; }
.satir > * { flex: 1 1 0; min-width: 0; }
label.secim { display: flex; flex-direction: column; font-size: 0.66rem; font-weight: 700; color: #6b4426; gap: 0.06rem; }
select { width: 100%; min-height: 2.3rem; padding: 0.15rem 0.2rem; border-radius: 10px; border: 2px solid #d9bf98; background: #fff; color: #2b1d12; font-size: 0.82rem; font-weight: 700; }
.dugme { min-height: 2.4rem; padding: 0.25rem 0.35rem; border: 0; border-radius: 10px; background: #7a3b1d; color: #fff; font-weight: 700; font-size: 0.84rem; cursor: pointer; line-height: 1.1; }
.dugme--ikinci { background: #fff; color: #6b3417; box-shadow: inset 0 0 0 2px #d9bf98; }
.dugme--ana { background: #1f6b4a; flex-grow: 1.3 !important; }
.dugme:disabled { opacity: 0.42; cursor: default; }
.dugme:hover:not(:disabled) { filter: brightness(1.07); }
.dugme:focus-visible, select:focus-visible { outline: 3px solid #e8892b; outline-offset: 2px; }

.bilgi { margin: 0; font-size: 0.74rem; font-weight: 700; color: #5a3a20; line-height: 1.3; display: flex; flex-wrap: wrap; column-gap: 0.7rem; }
.bilgi b { color: #2b1d12; font-variant-numeric: tabular-nums; }
.mesaj { margin: 0; font-weight: 700; min-height: 2.5em; font-size: 0.84rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(255,255,255,0.7); border-radius: 10px; padding: 0.15rem 0.4rem; }
.ipucu-yazi { margin: 0; font-size: 0.72rem; color: #6b4426; line-height: 1.35; }
@media (max-width: 599px), (max-aspect-ratio: 1/1) { .ipucu-yazi { display: none; } }
@media (max-height: 560px) and (max-aspect-ratio: 1/1) {
  .bilgi { font-size: 0.68rem; }
  .mesaj { min-height: 2.3em; font-size: 0.78rem; }
  select, .dugme { min-height: 2.15rem; }
}

/* Tahta */
.masa { grid-area: masa; min-height: 0; min-width: 0; container-type: size; display: grid; place-items: start center; }
.tahta { display: block; width: min(100cqw, calc(100cqh * 294 / 218)); height: auto; aspect-ratio: 294 / 218; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tahta .hane, .tahta .alan { cursor: default; outline: none; }
.tahta .oynar { cursor: pointer; }
.tahta .hane:focus-visible .vurgu, .tahta .alan:focus-visible .vurgu { stroke: #e8892b; stroke-width: 2.4; }
.tahta text { pointer-events: none; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
@media (prefers-reduced-motion: no-preference) {
  .tahta .yeni { animation: kon 0.22s ease-out; transform-box: fill-box; transform-origin: center; }
  @keyframes kon { from { transform: scale(0.5); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
  .tahta .zar-yeni { animation: zar 0.3s ease-out; transform-box: fill-box; transform-origin: center; }
  @keyframes zar { 0% { transform: rotate(-25deg) scale(0.6); } 100% { transform: rotate(0) scale(1); } }
}

.ortu { position: fixed; inset: 0; background: rgba(40, 24, 10, 0.55); display: grid; place-items: center; padding: 1rem; z-index: 5; }
.panel { background: #fff; border-radius: 16px; padding: 1.05rem 1.15rem; max-width: 22rem; text-align: center; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.panel h2 { margin: 0; color: #7a3b1d; font-size: 1.3rem; }
.panel p { margin: 0; line-height: 1.45; }
.panel .vurgu-yazi { color: #1f6b4a; font-weight: 800; }
.panel .dugmeler { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.panel .dugme { padding: 0.45rem 0.9rem; }
