/* ------------------------------------------------------------------ temel */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --paper: #f6f1e7;
  --paper-2: #fcf9f2;
  --paper-3: #efe7d8;
  --ink: #16211e;
  --ink-2: #4c5a54;
  --ink-3: #8a968f;
  --line: rgba(22, 33, 30, 0.14);
  --line-soft: rgba(22, 33, 30, 0.08);
  --ember: #e4572e;
  --ember-soft: #f7ddd2;
  --sage: #7c9a86;
  --sage-soft: #e2eae1;
  --mustard: #e8b23a;

  --t-kirmizi: #bf3b2b;
  --t-siyah: #1d2422;
  --t-mavi: #2f6fa8;
  --t-sari: #c98b16;
  --t-sahte: #b98a2e;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Geniş ekranda ıstaka sağda boş kalmasın diye taşlar büyür; oran korunur. */
  --tw: clamp(56px, calc(60px + (100vw - 1100px) * 0.045), 68px);
  --th: calc(var(--tw) * 1.348);
  --radius: 22px;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(22, 33, 30, 0.06) 1px, transparent 1.2px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--ember-soft);
}

.app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 32px) 26px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------------------------------------------------------------- topbar */

#screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Oyun ekranı viewport'a oturur; taşma yerine iç alanlar kayar. */
body[data-screen="game"] {
  overflow: hidden;
}

body[data-screen="game"] .app {
  height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-size: 22px;
  font-weight: 600;
}

.brand-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ember);
  border: 1px solid rgba(228, 87, 46, 0.4);
  border-radius: 6px;
  padding: 2px 5px;
  transform: translateY(-2px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.link {
  border: 0;
  background: none;
  padding: 6px 2px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}

.link:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.chip {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip b {
  color: var(--ink);
  letter-spacing: 0.12em;
}

.conn {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.6;
}

.conn[data-state="open"] {
  background: var(--sage);
  opacity: 1;
}

.conn[data-state="connecting"] {
  background: var(--mustard);
}

.conn[data-state="closed"] {
  background: var(--ember);
}

/* ------------------------------------------------------------------ home */

.home {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(10px, 4vh, 48px) 0;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 16px;
}

.home h1 {
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0 0 20px;
}

.home h1 em {
  font-style: normal;
  color: var(--ember);
}

.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
  margin: 0 0 34px;
}

.tile-fan {
  display: flex;
  padding-left: 6px;
}

.tile-fan .tile {
  margin-right: -12px;
  transform-origin: bottom center;
  box-shadow: 0 14px 24px -18px rgba(22, 33, 30, 0.7);
}

.tile-fan .tile:nth-child(1) {
  transform: rotate(-9deg) translateY(6px);
}
.tile-fan .tile:nth-child(2) {
  transform: rotate(-4deg) translateY(1px);
}
.tile-fan .tile:nth-child(3) {
  transform: rotate(1deg);
}
.tile-fan .tile:nth-child(4) {
  transform: rotate(6deg) translateY(2px);
}
.tile-fan .tile:nth-child(5) {
  transform: rotate(11deg) translateY(7px);
}

.home-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 24px 48px -40px rgba(22, 33, 30, 0.9);
}

.field-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf7;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(22, 33, 30, 0.06);
}

.input--code {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-family: var(--mono);
  font-size: 16px;
}

.btn {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 500;
  transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.16s,
    background 0.16s, opacity 0.16s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(22, 33, 30, 0.32);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fbf7ee;
}

.btn.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fbf7ee;
}

.btn--dark:hover:not(:disabled) {
  background: #24332e;
  border-color: #24332e;
}

.btn--ember {
  background: var(--ember);
  border-color: var(--ember);
  color: #fff8f3;
}

.btn--ember:hover:not(:disabled) {
  background: #d24b24;
  border-color: #d24b24;
}

.btn--block {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 4px 0;
}

.divider-or::before,
.divider-or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line-soft);
}

.join-row {
  display: flex;
  gap: 8px;
}

.join-row .input {
  flex: 1;
  min-width: 0;
}

.mini-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 8px 0 0;
}

/* ---------------------------------------------------------------- lobby */

.lobby {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 0 40px;
}

.code-big {
  font-family: var(--mono);
  font-size: clamp(40px, 8vw, 64px);
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--ink);
  padding-left: 0.16em;
}

.lobby-sub {
  font-size: 14px;
  color: var(--ink-2);
  text-align: center;
  max-width: 46ch;
  line-height: 1.6;
  margin: 0;
}

.seat-list {
  list-style: none;
  margin: 6px 0 2px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(560px, 100%);
}

.seat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 56px;
}

.seat-row--empty {
  border-style: dashed;
  background: transparent;
  color: var(--ink-3);
}

.lobby-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --------------------------------------------------------- masa ayarları */

.settings-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
  padding: 14px 16px 6px;
}

.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.settings-owner {
  font-size: 12px;
  color: var(--ink-3);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}

.setting-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: var(--ink);
}

.setting-label small {
  font-size: 11.5px;
  color: var(--ink-3);
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-3);
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.seg-btn:hover:not(:disabled):not(.is-on) {
  color: var(--ink);
}

.seg-btn.is-on {
  background: var(--ink);
  color: var(--paper-2);
}

.seg-btn:disabled {
  cursor: default;
}

.seg-btn:disabled:not(.is-on) {
  opacity: 0.55;
}

@media (max-width: 520px) {
  .setting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .seg {
    justify-content: flex-start;
  }
}

.turn-timer {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.turn-timer[data-low="1"] {
  color: var(--ember);
  font-weight: 500;
}

/* ------------------------------------------------------------------ table */

.game {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
}

.table {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background-color: #f4eee2;
  background-image: radial-gradient(rgba(22, 33, 30, 0.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  box-shadow: inset 0 1px 0 #fffdf7, 0 30px 60px -56px rgba(22, 33, 30, 0.9);
  padding: 12px 14px;
  display: grid;
  /* köşeler atık gözleri, kenarlar oyuncular, orta tahta */
  grid-template-columns: 92px minmax(0, 1fr) 92px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "tl north tr"
    "west center east"
    "bl south br";
  gap: 8px 12px;
  min-height: 320px;
  overflow: hidden;
}

.corner {
  display: grid;
  place-items: center;
  z-index: 1;
}

.corner--tl { grid-area: tl; }
.corner--tr { grid-area: tr; }
.corner--bl { grid-area: bl; }
.corner--br { grid-area: br; }

.north {
  grid-area: north;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.west,
.east {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  min-height: 0;
}

.west { grid-area: west; }
.east { grid-area: east; }

.south {
  grid-area: south;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  z-index: 1;
}

/* alt sıradaki kendi kartın daralıp ismi kesmesin */
.south .seat {
  flex: 0 0 auto;
}

.south .seat-name {
  overflow: visible;
}

.south .feed {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.center {
  grid-area: center;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 104px;
  grid-template-areas: "board middle pairs";
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

/* orta alan: açılan perlerin indiği çizgili tahta */
.board {
  grid-area: board;
  min-height: 90px;
  min-width: 0;
  border: 1px solid rgba(22, 33, 30, 0.16);
  border-radius: 12px;
  padding: 10px;
  /* perler alt alta dizilir; sütun dolunca yandaki sütundan devam eder.
     sütunlar arasında bir taş genişliği (30px, eksi per çerçevesinin 2×3px'i) */
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-content: flex-start;
  align-items: flex-start;
  overflow: auto;
  background-color: rgba(255, 253, 247, 0.34);
  background-image: linear-gradient(to right, rgba(22, 33, 30, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 33, 30, 0.12) 1px, transparent 1px);
  background-size: 38px 38px;
  background-position: -1px -1px;
}

.board-empty {
  margin: auto;
  align-self: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

/* tahtanın yanında: kurallar, gösterge, kapalı yığın */
.middle {
  grid-area: middle;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
}

/* gösterge ve yığın yan yana: orta sütun yukarı-aşağı taşıp alttaki yazılara binmesin */
.piles {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.piles .pile {
  flex: 0 0 auto;
}
.piles .indicator-shown {
  max-width: 64px;
  text-align: center;
}

.rule-badges {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}

.rule-badge {
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(252, 249, 242, 0.9);
  color: var(--ink-2);
}

.yazboz-btn {
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}

.yazboz-btn:hover {
  background: #2a3833;
}

.modal.modal--wide {
  width: min(640px, calc(100vw - 32px));
}

.yb-table td,
.yb-table th {
  text-align: center;
}

.yb-table td:first-child,
.yb-table th:first-child {
  text-align: left;
}

.yb-table td.is-win {
  color: var(--ember);
  font-weight: 600;
}

.yb-total td {
  border-top: 2px solid var(--ink);
}

.yb-team td {
  color: var(--ink-2);
  font-size: 12px;
}

.yb-empty {
  text-align: center !important;
  color: var(--ink-3);
  padding: 18px 0;
}

.opening-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 4px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  text-align: center;
}

.opening-mode {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.opening-mode.is-folding {
  color: var(--t-kirmizi);
}

.opening-bar-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.opening-bar b {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

.opening-bar b.is-need {
  color: var(--t-kirmizi);
  margin-bottom: 0;
}

.rule-badge.is-hot {
  border-color: rgba(191, 59, 43, 0.4);
  background: rgba(191, 59, 43, 0.08);
  color: var(--t-kirmizi);
}

.pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.middle .tile,
.middle .stack,
.middle .slot-empty {
  --tw: 54px;
  --th: 73px;
}


.rail-okey {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink-3);
  text-align: center;
  text-transform: uppercase;
}

.rail-okey b {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.rail-okey b[data-color="kirmizi"] { color: var(--t-kirmizi); }
.rail-okey b[data-color="siyah"] { color: var(--t-siyah); }
.rail-okey b[data-color="mavi"] { color: var(--t-mavi); }
.rail-okey b[data-color="sari"] { color: var(--t-sari); }

/* sarı alan: çiftle açanların taşları */
.pairs-zone {
  grid-area: pairs;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 5px;
  border-radius: 12px;
  border: 1px solid rgba(200, 152, 40, 0.5);
  background: rgba(232, 178, 58, 0.13);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.pairs-zone .pile-label {
  color: #a1741a;
}

.pair-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 4px;
  justify-content: center;
}

.meld--pair {
  flex-direction: column;
}

.pair-col.is-empty {
  width: 30px;
  height: 84px;
  border: 1px dashed rgba(22, 33, 30, 0.18);
  border-radius: 6px;
}

/* köşelerdeki atık gözleri: herkes kendi sağına atar */
.discard-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 7px;
  border-radius: 12px;
  border: 1px dashed rgba(22, 33, 30, 0.18);
  min-width: 62px;
  min-height: 84px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.discard-slot.is-top {
  border-style: solid;
  border-color: rgba(22, 33, 30, 0.2);
  background: rgba(255, 253, 247, 0.6);
}

.discard-slot.is-live {
  border-style: solid;
  border-color: var(--ember);
  background: rgba(255, 253, 247, 0.8);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.14);
  cursor: grab;
}

.discard-slot.is-live:hover .tile {
  transform: translateY(-2px);
}

.discard-slot[data-drop="discard"] {
  border-color: rgba(22, 33, 30, 0.28);
}

.corner .tile--md {
  --tw: 42px;
  --th: 57px;
}

.discard-empty {
  display: block;
  width: 42px;
  height: 57px;
  border-radius: 5px;
  background: rgba(22, 33, 30, 0.04);
}

.slot-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discard-slot.is-live .slot-label {
  color: var(--ember);
}

/* ıstakadaki perlerin toplamı */
.hand-value {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hand-value b {
  font-size: 15px;
  font-weight: 500;
}

.hand-value small {
  font-size: 10.5px;
  opacity: 0.6;
}

.hand-value .hand-pairs {
  margin-left: 8px;
  font-size: 10.5px;
  opacity: 0.75;
}

.hand-value.is-ready {
  background: var(--sage);
}

/* koltuk kartı */

.seat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 14px;
  /* 2px: sıra gelince çerçeve kalınlaşırken kart kaymasın */
  border: 2px solid var(--line-soft);
  background: rgba(252, 249, 242, 0.94);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-width: 0;
  max-width: 100%;
}

/* sırası gelen oyuncu: kalın turuncu çerçeve ve nabız gibi atan ışık */
.seat.is-turn {
  border: 2px solid var(--ember);
  background: #fdf0ea;
  box-shadow: 0 0 0 4px rgba(228, 87, 46, 0.18);
  animation: turn-glow 1.8s ease-in-out infinite;
}

.seat.is-turn .seat-name {
  color: #b23d1c;
}

@keyframes turn-glow {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(228, 87, 46, 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(228, 87, 46, 0.08);
  }
}

.avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--sage-soft);
  color: #3c5546;
  letter-spacing: 0.02em;
}

.avatar[data-seat-tone="1"] {
  background: #f0e6d2;
  color: #6a5528;
}

.avatar[data-seat-tone="2"] {
  background: #e3e7ee;
  color: #3a4a63;
}

.avatar[data-seat-tone="3"] {
  background: var(--ember-soft);
  color: #8e3a22;
}

.seat-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.seat-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bot-mark {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}

.seat-count {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  white-space: nowrap;
}

.seat-opened {
  color: var(--sage);
}

.seat-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: #3c5546;
  white-space: nowrap;
}

/* yan oyuncular: dikey kart */
.seat--side {
  flex-direction: column;
  text-align: center;
  padding: 12px 8px;
  gap: 6px;
  width: 100%;
}

.seat--side .seat-text {
  align-items: center;
}

.seat--side .seat-name {
  flex-direction: column;
  gap: 3px;
  max-width: 76px;
}

.seat--me {
  padding: 5px 10px 5px 6px;
}


/* rakip setleri */

/* per içindeki taşlar bitişik */
.meld {
  position: relative;
  display: flex;
  gap: 0;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.owner-dot {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c9a86;
  box-shadow: 0 0 0 1.5px rgba(252, 249, 242, 0.9);
}

.owner-dot[data-seat-tone="1"] {
  background: #c9a86a;
}

.owner-dot[data-seat-tone="2"] {
  background: #7d8db0;
}

.owner-dot[data-seat-tone="3"] {
  background: #d98a72;
}

/* açmış oyuncunun işleyebileceği perler ve taşlar: yeşil işaret */
.meld.can-add {
  border-color: rgba(124, 154, 134, 0.75);
  border-style: dashed;
  background: rgba(124, 154, 134, 0.12);
}

.rack .tile.can-add {
  border-color: var(--sage);
  box-shadow: 0 0 0 2px rgba(124, 154, 134, 0.7), 0 10px 14px -12px rgba(60, 42, 20, 0.85);
}

.btn--sage {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.btn--sage:hover:not(:disabled) {
  background: #6a8874;
  border-color: #6a8874;
}

.meld.is-target {
  border-color: rgba(228, 87, 46, 0.5);
  background: rgba(228, 87, 46, 0.06);
  cursor: pointer;
}

.meld.is-target:hover {
  border-color: var(--ember);
  background: rgba(228, 87, 46, 0.1);
}

/* orta alan */

.pile-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Yığın: üst üste dizilmiş kapalı taşlar. Alttaki katmanların kenarları görünür,
   kalan taş sayısı en üstteki taşın ortasında küçük bir etikette yazar. */
.stack {
  position: relative;
  width: calc(var(--tw) + 6px);
  height: calc(var(--th) + 12px);
}

.stack-tile {
  position: absolute;
  left: 0;
  width: var(--tw);
  height: var(--th);
  border-radius: 6px;
  border: 1px solid rgba(52, 40, 24, 0.3);
  border-bottom: 3px solid #d9ccb0; /* taşın kalınlığı */
  background: linear-gradient(180deg, #fffdf6 0%, #f3ead6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 1px rgba(52, 40, 24, 0.18);
}

/* katmanlar sağ alta doğru kayar: yığın derinliği */
.stack-tile:nth-last-child(4) { top: 12px; left: 6px; }
.stack-tile:nth-last-child(3) { top: 8px; left: 4px; }
.stack-tile:nth-last-child(2) { top: 4px; left: 2px; }
.stack-tile.stack-top {
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 16px -12px rgba(60, 42, 20, 0.9);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}

.stack-count {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #6a5b3c;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(106, 91, 60, 0.1);
  border: 1px solid rgba(106, 91, 60, 0.18);
}

.stack.is-live {
  cursor: grab;
}

.stack.is-live .stack-top {
  border-color: var(--ember);
  border-bottom-color: #e7b5a2;
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.16), 0 12px 16px -12px rgba(60, 42, 20, 0.9);
}

.stack.is-live .stack-count {
  color: var(--ember);
  background: rgba(228, 87, 46, 0.08);
  border-color: rgba(228, 87, 46, 0.3);
}

.stack.is-live:hover .stack-top {
  transform: translateY(-3px);
}

.slot-empty {
  width: var(--tw);
  height: var(--th);
  border-radius: 8px;
  border: 1px dashed rgba(22, 33, 30, 0.22);
}

.turn-pill {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(252, 249, 242, 0.9);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.turn-pill b {
  font-weight: 600;
  color: var(--ink);
}

.turn-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  animation: breathe 2.4s ease-in-out infinite;
}

.turn-pill[data-mine="true"] {
  border-color: rgba(228, 87, 46, 0.45);
  color: var(--ink);
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.feed {
  grid-area: feed;
  font-size: 11.5px;
  color: var(--ink-3);
  min-height: 15px;
  text-align: center;
  font-family: var(--mono);
  letter-spacing: -0.01em;
}

/* -------------------------------------------------------------- taşlar */

.tile {
  position: relative;
  flex: 0 0 auto;
  width: var(--tw);
  height: var(--th);
  border: 1px solid rgba(52, 40, 24, 0.22);
  border-radius: 6px;
  background: linear-gradient(180deg, #fffdf6 0%, #f9f3e5 100%);
  color: #1c1e1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--th) * 0.05);
  padding: 0 0 calc(var(--th) * 0.08);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 0 rgba(120, 96, 60, 0.12), 0 1px 0 rgba(52, 40, 24, 0.1),
    0 10px 14px -12px rgba(60, 42, 20, 0.85);
  transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.16s,
    border-color 0.16s, background 0.16s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.tile-num {
  font-size: calc(var(--th) * 0.42);
  line-height: 0.86;
  font-weight: 700;
  color: var(--c, var(--ink));
}

.tile-suit {
  display: block;
  width: calc(var(--th) * 0.18);
  height: calc(var(--th) * 0.18);
  background: var(--c, var(--ink));
}

.tile-suit[data-shape="diamond"] {
  transform: rotate(45deg);
  border-radius: 1px;
}

.tile.is-joker::after {
  content: "★";
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: calc(var(--th) * 0.15);
  line-height: 1;
  color: var(--t-sahte);
}

.tile[data-fake="1"]::after {
  content: none;
}

/* Istakadaki okey sırtı dönük durur: yüzü kapalı, boş bir taş gibi görünür. */
.rack .tile.is-joker,
.tray .tile.is-joker {
  background: linear-gradient(180deg, #fffdf6 0%, #f9f3e5 100%);
  border-color: rgba(52, 40, 24, 0.22);
}

.rack .tile.is-joker .tile-num,
.rack .tile.is-joker .tile-suit,
.tray .tile.is-joker .tile-num,
.tray .tile.is-joker .tile-suit {
  visibility: hidden;
}

.rack .tile.is-joker::after,
.tray .tile.is-joker::after {
  content: none;
}

.tile[data-color="kirmizi"] {
  --c: var(--t-kirmizi);
}
.tile[data-color="siyah"] {
  --c: var(--t-siyah);
}
.tile[data-color="mavi"] {
  --c: var(--t-mavi);
}
.tile[data-color="sari"] {
  --c: var(--t-sari);
}
.tile[data-color="sahte"] {
  --c: var(--t-sahte);
  background: #fffaee;
}

.tile.is-joker {
  background: linear-gradient(180deg, #fff9e6 0%, #fbf0d2 100%);
  border-color: rgba(185, 138, 46, 0.55);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(232, 178, 58, 0.2),
    0 10px 14px -12px rgba(60, 42, 20, 0.8);
}

.tile.is-sel {
  transform: translateY(-12px);
  border-color: var(--ember);
  box-shadow: 0 0 0 2px var(--ember), 0 18px 22px -18px rgba(228, 87, 46, 0.9);
}

.tile--sm {
  --tw: 30px;
  --th: 40px;
  border-radius: 4px;
  gap: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(52, 40, 24, 0.12), 0 6px 8px -8px rgba(60, 42, 20, 0.8);
  cursor: default;
}

.tile--md {
  --tw: 34px;
  --th: 46px;
  border-radius: 5px;
  gap: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(52, 40, 24, 0.12), 0 8px 10px -10px rgba(60, 42, 20, 0.8);
  cursor: default;
}

/* kendi alanım */

.my-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.my-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.my-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px dashed rgba(228, 87, 46, 0.5);
  border-radius: 16px;
  background: rgba(228, 87, 46, 0.045);
}

.tray:empty {
  display: none;
}

.tray-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-right: 2px;
}

.tray-group {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.7);
  border: 1px solid rgba(22, 33, 30, 0.08);
}

.tray-score {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ember);
  margin-left: auto;
}

.rack {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-content: flex-start;
  padding: 13px clamp(26px, 3vw, 34px) 16px;
  border-radius: 10px;
  border: 1px solid rgba(96, 66, 34, 0.35);
  background-color: #c8a878;
  background-origin: content-box;
  background-clip: border-box;
  background-image:
    repeating-linear-gradient(
      180deg,
      rgba(60, 38, 16, 0) 0 calc(var(--th) + 1px),
      rgba(92, 60, 28, 0.3) calc(var(--th) + 1px) calc(var(--th) + 5px)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(96, 62, 28, 0.1)),
    repeating-linear-gradient(
      90deg,
      rgba(120, 86, 48, 0.05) 0 3px,
      rgba(255, 255, 255, 0.03) 3px 7px
    );
  box-shadow: inset 0 2px 0 rgba(255, 250, 240, 0.35),
    inset 0 -9px 18px rgba(78, 50, 22, 0.28), 0 20px 32px -28px rgba(60, 40, 20, 0.9);
  min-height: calc(var(--th) + 31px);
}

.rack::before,
.rack::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 11px;
  background: linear-gradient(180deg, #c4473a 0%, #a5352b 55%, #8e2a22 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -6px 10px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(52, 30, 16, 0.3);
  pointer-events: none;
}

.rack::before {
  left: 0;
  border-radius: 9px 0 0 9px;
}

.rack::after {
  right: 0;
  border-radius: 0 9px 9px 0;
}

/* Blok içinde taşlar bitişik (0 boşluk); bloklar arası tam bir taş genişliği. */
.rack-group {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  margin-inline: calc((var(--tw) - 6px) / 2);
}

/* Bloklar satır arasında bölünmez, taşlar blok içinde bitişik kalır. */
.rack-group .tile {
  flex: 0 0 auto;
}

.rack .tile {
  cursor: pointer;
}

.rack .tile:hover {
  transform: translateY(-5px);
}

.rack .tile.is-sel:hover {
  transform: translateY(-12px);
}

.my-zone {
  min-width: 0;
}

.game {
  grid-template-columns: minmax(0, 1fr);
}

/* Sabit gözlü ıstaka: taşlar bitişik, boş gözler boşluk olarak kalır. */
.rack.rack--slots {
  display: grid;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  grid-template-columns: repeat(var(--cols, 15), var(--tw));
  grid-auto-rows: var(--th);
  column-gap: 0;
  row-gap: 5px;
  justify-content: center;
}

.slot {
  position: relative;
  width: var(--tw);
  height: var(--th);
}

.slot > .tile {
  width: 100%;
  height: 100%;
}

.rack .tile {
  touch-action: none;
}

.slot.is-drop::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.38);
  outline: 2px dashed rgba(96, 62, 28, 0.55);
  outline-offset: -2px;
  pointer-events: none;
}

.slot.is-drop > .tile {
  transform: translateX(10%);
}

/* atıktan alınıp henüz kullanılmamış taş */
.tile.is-taken {
  border-color: var(--ember);
  box-shadow: 0 0 0 2px rgba(228, 87, 46, 0.55), 0 10px 14px -12px rgba(60, 42, 20, 0.85);
}

/* etiket taşın içinde durur: ıstaka kenarları kırptığı için dışarı taşmaz */
.tile.is-taken::before {
  content: "alındı";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  z-index: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--ember);
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}

/* gösterilen gösterge taşı: çiftlerde okey yerine geçer */
.tile.is-shown::before {
  content: "gösterge";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}

/* bitiş: son taş göstergenin üzerine konur */
.indicator-stack {
  position: relative;
}

.finish-tile {
  position: absolute;
  left: 6px;
  top: 8px;
  transform: rotate(-6deg);
  filter: drop-shadow(0 6px 8px rgba(60, 42, 20, 0.35));
}

.pile.is-finish .indicator-stack {
  outline: 2px dashed var(--sage);
  outline-offset: 4px;
  border-radius: 8px;
}

.pile.is-finish .pile-label {
  color: var(--sage);
  font-weight: 600;
}

[data-drop="finish"].is-drop .indicator-stack {
  outline-style: solid;
  background: rgba(124, 154, 134, 0.15);
}

.indicator-shown {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--sage);
  text-align: center;
}

.score-why {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
}

[data-drop="return"] {
  border-style: dashed;
  border-color: var(--ember);
}

[data-drop="return"].is-drop {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.tile.is-dragging {
  opacity: 0.25;
}

.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  z-index: 1000;
  pointer-events: none;
  transition: none;
  box-shadow: 0 18px 30px -12px rgba(60, 42, 20, 0.6), 0 2px 0 rgba(52, 40, 24, 0.15);
}

.tile--back {
  background: linear-gradient(180deg, #fffdf6 0%, #f9f3e5 100%);
}

body.is-dragging-tile,
body.is-dragging-tile * {
  cursor: grabbing !important;
  user-select: none;
}

[data-drop="discard"].is-drop,
.meld.is-drop {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 8px;
}

[data-act="draw-stack"],
[data-act="draw-discard"] {
  touch-action: none;
}

.rack-hint {
  align-self: center;
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.actions .sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
}

.pts {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.8;
  margin-left: 4px;
}

.btn--sm {
  padding: 9px 14px;
  font-size: 12.5px;
}

/* ---------------------------------------------------------------- modal */

.modal-root {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 30, 0.32);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 40;
}

.modal-root[hidden] {
  display: none;
}

.modal {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  box-shadow: 0 40px 80px -40px rgba(22, 33, 30, 0.7);
}

.modal h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.modal p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.modal h3 {
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 20px 0 6px;
  font-weight: 600;
}

.modal ul {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}

.modal li {
  margin-bottom: 5px;
}

.modal .modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 4px;
  font-size: 13.5px;
}

.score-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.score-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.score-table td:last-child,
.score-table th:last-child {
  text-align: right;
  font-family: var(--mono);
}

.score-table tr.is-winner td {
  color: var(--ember);
  font-weight: 600;
}

/* ---------------------------------------------------------------- toast */

/* bildirimler başlığın altında, masanın üstünde: butonları kapatmaz, tıklamayı engellemez */
.toast-root {
  position: fixed;
  left: 50%;
  top: 62px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}

.toast {
  pointer-events: none;
  background: var(--ink);
  color: #fbf7ee;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  text-align: center;
  box-shadow: 0 18px 30px -18px rgba(22, 33, 30, 0.8);
  animation: toast-in 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.toast.is-error {
  background: var(--ember);
}

/* ceza duyurusu: büyük, kırmızı, sallanarak gelir */
.toast.is-penalty {
  background: #b8321f;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  box-shadow: 0 0 0 3px rgba(184, 50, 31, 0.25), 0 18px 30px -18px rgba(22, 33, 30, 0.8);
  animation: toast-in 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), penalty-shake 0.45s 0.22s;
}

.toast.is-reward {
  background: var(--sage);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
}

@keyframes penalty-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  :root {
    --tw: 40px;
    --th: 54px;
  }

  .home {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }

  .tile-fan {
    display: none;
  }

  .seat {
    padding: 6px 8px;
    gap: 7px;
  }

  .seat-name {
    font-size: 12px;
  }

  .seat-count {
    font-size: 9.5px;
  }

  .avatar {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .feed {
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  :root {
    --tw: 34px;
    --th: 46px;
  }

  .app {
    gap: 8px;
  }

  .my-zone {
    gap: 7px;
  }

  .seat {
    max-width: 100%;
  }

  .app {
    padding: 12px 10px 18px;
    gap: 10px;
  }

  .seat {
    padding: 5px 6px;
    gap: 5px;
    justify-content: flex-start;
    min-width: 0;
  }

  .seat-text {
    display: flex;
    min-width: 0;
  }

  .seat-name {
    font-size: 10.5px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .seat .seat-count,
  .seat .bot-mark {
    display: none;
  }

  .tile--sm {
    --tw: 22px;
    --th: 30px;
  }

  .pair-col.is-empty {
    width: 22px;
    height: 62px;
  }

  .rack {
    gap: 4px;
    padding: 9px 20px 13px;
  }

  .rack-group {
    gap: 0;
    margin-inline: calc((var(--tw) - 4px) / 2);
  }

  .btn {
    padding: 10px 14px;
    font-size: 12.5px;
  }

  .actions {
    gap: 6px;
  }

  .seat-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------- ses paneli */

.sound-wrap {
  position: relative;
}

.sound-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  width: 240px;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: 0 18px 34px -20px rgba(22, 33, 30, 0.6);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* "hidden" işareti display:flex tarafından ezilmesin */
.sound-panel[hidden] {
  display: none;
}

.sound-panel .field-label {
  margin: 0;
}

.sound-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sound-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sound-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.sound-toggle input {
  accent-color: var(--ink);
  width: 15px;
  height: 15px;
  margin: 0;
}

.sound-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* kaydırıcı panelin içine tam sığar, taşmaz */
.sound-row input[type="range"] {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: var(--ember);
}

.sound-row input[type="range"]:disabled {
  opacity: 0.35;
}

/* ----------------------------------------------------------------- sohbet */

.chat-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-btn[hidden] {
  display: none;
}

.chat-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ember);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 18px;
  text-align: center;
}

.chat-badge[hidden] {
  display: none;
}

.chat-panel {
  position: fixed;
  right: 16px;
  top: 62px;
  z-index: 65;
  width: min(330px, calc(100vw - 32px));
  height: min(480px, calc(100vh - 90px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  box-shadow: 0 24px 48px -24px rgba(22, 33, 30, 0.55);
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.chat-head .field-label {
  margin: 0;
}

.chat-close {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
}

.chat-close:hover {
  color: var(--ink);
  background: var(--paper-3);
}

.chat-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 12px 12px 6px;
  list-style: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-list:empty::before {
  content: "Henüz mesaj yok 👋";
  margin: auto;
  font-size: 12.5px;
  color: var(--ink-3);
}

.chat-msg {
  align-self: flex-start;
  max-width: 85%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px 7px;
  border-radius: 12px 12px 12px 4px;
  background: #fff;
  border: 1px solid var(--line-soft);
}

.chat-msg.is-mine {
  align-self: flex-end;
  border-radius: 12px 12px 4px 12px;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-2);
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-meta time {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
}

.chat-msg.is-mine .chat-meta time {
  color: rgba(252, 249, 242, 0.55);
}

/* gönderenin adı kalın ve koltuk rengiyle */
.chat-name {
  font-size: 12px;
  font-weight: 700;
  color: #3c5546;
}

.chat-name[data-seat-tone="1"] { color: #8a6a22; }
.chat-name[data-seat-tone="2"] { color: #3a4a63; }
.chat-name[data-seat-tone="3"] { color: #a8401f; }

.chat-msg.is-mine .chat-name {
  color: #f7c8b5;
}

.chat-text {
  font-size: 13.5px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
}

.emoji-grid[hidden] {
  display: none;
}

.emoji-grid button {
  border: 0;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  padding: 5px 0;
  border-radius: 8px;
  cursor: pointer;
}

.emoji-grid button:hover {
  background: var(--paper-3);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
}

.emoji-btn {
  border: 0;
  background: transparent;
  font-size: 19px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
}

.emoji-btn:hover {
  background: var(--paper-3);
}

.chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  background: #fffdf7;
  color: var(--ink);
}

.chat-input:focus {
  outline: 2px solid rgba(228, 87, 46, 0.35);
  border-color: var(--ember);
}

.chat-send {
  flex: 0 0 auto;
}

/* Eşli oyun takımları: A = 0. ve 2. koltuk, B = 1. ve 3. koltuk */
.team-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  color: #fff;
}
.team-tag--A { background: #2f6fd6; }
.team-tag--B { background: #d2532f; }
.seat.seat--team-A { border-left: 4px solid #2f6fd6; }
.seat.seat--team-B { border-left: 4px solid #d2532f; }
.team-cell--A { color: #2f6fd6; font-weight: 700; }
.team-cell--B { color: #d2532f; font-weight: 700; }
.score-table--teams { margin-top: 12px; }
.yb-table th .team-tag { display: block; width: fit-content; margin: 2px auto 0; }

/* ------------------------------------------------------------ hesap */
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--sage-soft);
  color: #3c5546;
}
.avatar--img {
  object-fit: cover;
  padding: 0;
}
.account-modal {
  position: relative;
}
.modal-x {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft, #6b6b6b);
}
.account-form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.account-form h3,
.account-modal h3 {
  margin: 16px 0 4px;
  font-size: 14px;
}
.account-form .btn {
  margin-top: 6px;
  justify-self: start;
}
.account-form .btn--block {
  justify-self: stretch;
}
.account-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
}
.account-msg {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: #2f4a3b;
  font-size: 14px;
}
.account-msg.is-error {
  background: #fbe5de;
  color: #9a2f12;
}
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.profile-head {
  display: flex;
  gap: 18px;
  align-items: center;
}
.profile-photo {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  background: var(--sage-soft);
  color: #3c5546;
}
.profile-upload {
  cursor: pointer;
  font-size: 12px;
}
.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 6px 0 0;
  font-size: 13px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.account-side .btn {
  margin-top: 4px;
}
.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}
.badge-ok,
.badge-warn {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-ok {
  background: var(--sage-soft);
  color: #2f4a3b;
}
.badge-warn {
  background: #fbe5de;
  color: #9a2f12;
}
.account-history small {
  color: var(--ink-soft, #777);
}
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
  margin-bottom: 12px;
}
.member-row small {
  display: block;
  font-size: 12px;
  color: var(--ink-soft, #777);
}
.modal.account-modal.modal--wide {
  width: min(780px, calc(100vw - 32px));
}

/* Ana sayfa: giriş alanı + misafir girişi */
.home-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.home-card-title {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.home-card .account-form {
  margin: 4px 0;
}
.home-card .account-links {
  margin: 0;
}
.home-card--guest {
  gap: 8px;
}
.home-card--guest .mini-note {
  margin: 0 0 4px;
}
.member-row .member-profile {
  margin-left: auto;
}

/* hidden özniteliği her zaman gizlesin (display kuralları ezmesin) */
[hidden] {
  display: none !important;
}

/* ------------------------------------------------------ özel mesajlar */
.dm-panel {
  z-index: 66;
  width: min(360px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 90px));
}
.dm-panel .chat-head {
  gap: 8px;
}
.dm-back {
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
}
.dm-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-peer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
.avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
}
.dm-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.dm-body .account-msg {
  margin: 8px 12px 0;
}
.dm-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}
.dm-conv {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.dm-conv:hover {
  background: rgba(0, 0, 0, 0.04);
}
.dm-conv-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dm-conv-name {
  font-weight: 600;
  font-size: 14px;
}
.dm-conv-last {
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-conv.has-unread .dm-conv-last {
  color: var(--ink);
  font-weight: 600;
}
.dm-conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
.dm-empty {
  padding: 18px 12px;
  font-size: 13px;
  color: var(--ink-3);
  list-style: none;
}
.dm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}
.dm-foot .mini-note {
  margin: 0;
}
.dm-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13.5px;
}
.dm-read {
  font-size: 10px;
  opacity: 0.7;
}
.dm-report {
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}
.chat-msg:hover .dm-report {
  opacity: 0.8;
}
.dm-note {
  margin: 0;
  padding: 12px;
  font-size: 13px;
  border-top: 1px solid var(--line-soft);
}
.dm-people {
  padding: 8px 14px;
  overflow-y: auto;
}
.dm-people ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dm-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.player-card {
  position: relative;
  width: min(460px, 100%);
}
.player-card .profile-head {
  margin-bottom: 12px;
}
.dm-bio {
  margin: 4px 0;
  font-size: 13.5px;
}
.player-link {
  font: inherit;
  color: inherit;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  text-underline-offset: 3px;
  cursor: pointer;
}
.toast.is-dm {
  background: var(--ink);
  color: var(--paper-2);
}
#player-card-root,
#account-root {
  z-index: 80;
}
/* Masa sohbeti açıkken mesaj paneli onun soluna yerleşir */
.chat-panel:not([hidden]) ~ .dm-panel {
  right: calc(16px + min(330px, calc(100vw - 32px)) + 12px);
}
.modal--closable {
  position: relative;
}
.modal--closable .eyebrow {
  padding-right: 32px;
}
/* Uzun pencerede (kurallar) kaydırınca da kapatma düğmesi görünür kalsın */
.modal--closable .modal-x {
  position: sticky;
  top: 0;
  float: right;
  margin: -12px -12px 0 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-2);
  z-index: 1;
}
.modal--closable .modal-x:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Yüzer pencereler (masa sohbeti, özel mesajlar) */
.float-handle {
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.is-dragging .float-handle {
  cursor: grabbing;
}
.chat-panel.is-dragging {
  box-shadow: 0 30px 60px -20px rgba(22, 33, 30, 0.6);
  opacity: 0.97;
}
.chat-head .field-label::before {
  content: "⠿";
  margin-right: 6px;
  opacity: 0.35;
  letter-spacing: 0;
}
/* Köşelerden boyutlandırma tutma noktaları */
.float-grip {
  position: absolute;
  width: 16px;
  height: 16px;
  z-index: 3;
  touch-action: none;
}
.float-grip--nw { top: 0; left: 0; cursor: nwse-resize; }
.float-grip--ne { top: 0; right: 0; cursor: nesw-resize; }
.float-grip--sw { bottom: 0; left: 0; cursor: nesw-resize; }
.float-grip--se { bottom: 0; right: 0; cursor: nwse-resize; }
.float-grip--se::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  border-bottom-right-radius: 3px;
}
.chat-panel.is-resizing {
  user-select: none;
}
.chat-panel {
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
}

/* ------------------------------------------------- XP, seviye, liderlik */
.level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
}
.level-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.level-badge--sm {
  padding: 1px 6px;
  font-size: 10px;
  margin-left: 4px;
}
.level-bar {
  flex: 1;
  min-width: 90px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.level-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage, #6f8f7a), var(--ember));
}
.level-text {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.mode-stats {
  margin: 10px 0;
}
.mode-stats td:first-child {
  font-weight: 600;
}
.board-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 12px;
}
.board-table td {
  vertical-align: middle;
}
.board-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.board-rank {
  width: 36px;
  font-weight: 700;
}
.board-table tr.is-me td {
  background: #fdf0ea;
}
.modal.board-modal {
  width: min(720px, calc(100vw - 32px));
}

/* ------------------------------------------------------------------ mola */
.pause-layer {
  position: fixed;
  inset: 56px 0 0 0;
  z-index: 55; /* sohbet ve mesaj pencereleri (65+) üstte kalır */
  display: grid;
  place-items: center;
  background: rgba(22, 33, 30, 0.38);
  backdrop-filter: blur(2px);
}
.pause-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 34px;
  text-align: center;
  box-shadow: 0 40px 80px -40px rgba(22, 33, 30, 0.7);
  min-width: 300px;
}
.pause-card h2 {
  margin: 4px 0 6px;
}
.pause-time {
  font-family: var(--mono);
  font-size: 54px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 6px 0 4px;
}
.pause-card .btn {
  margin-top: 10px;
}
.pause-count {
  font-size: 150px;
  font-weight: 700;
  color: var(--paper-2);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  animation: pause-pop 0.9s ease-out;
}
.pause-count.is-go {
  font-size: 64px;
  letter-spacing: 0.04em;
  color: #ffe2d5;
}
@keyframes pause-pop {
  from {
    transform: scale(1.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.break-btn:disabled {
  opacity: 0.55;
}
.auto-mark {
  background: var(--ember);
  color: #fff;
  border-color: var(--ember);
}
.autoplay-btn {
  margin-right: 6px;
}

/* ------------------------------------------------ erişilebilirlik ve durumlar */
:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
  border-radius: 6px;
}
.tile:focus-visible {
  outline-offset: 1px;
}
.conn-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #9a2f12;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
}
.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
}
.achievement {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  background: #fffdf7;
}
.achievement.is-locked {
  opacity: 0.45;
  filter: grayscale(1);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Kısa ekranlarda (ör. 1280×720, 1366×768) orta sütun iki sütuna yayılır:
   solda kurallar/yaz-boz, sağda gösterge-yığın ve okey. Böylece masadan taşmaz. */
@media (max-height: 860px) {
  .center {
    grid-template-columns: minmax(0, 1fr) 256px 104px;
  }
  .middle {
    display: grid;
    grid-template-columns: 128px 118px;
    grid-template-areas:
      "badges piles"
      "badges okey";
    align-content: center;
    align-items: center;
    gap: 4px 10px;
  }
  .middle .rule-badges {
    grid-area: badges;
    align-self: center;
  }
  .middle .piles {
    grid-area: piles;
    gap: 6px;
  }
  .middle .rail-okey {
    grid-area: okey;
  }
  .middle .tile,
  .middle .stack,
  .middle .slot-empty {
    --tw: 40px;
    --th: 54px;
  }
  .middle .pile {
    gap: 2px;
  }
  .rule-badge {
    font-size: 10.5px;
    padding: 3px 5px;
  }
  .rule-badges {
    gap: 3px;
  }
  .opening-bar {
    padding: 3px 4px;
    gap: 0;
  }
  .opening-bar b {
    margin-bottom: 1px;
  }
}

/* Ana sayfa: duyurular ve açık masalar */
.home-extra {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}
.announce-bar {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fdf0ea;
  border: 1px solid rgba(228, 87, 46, 0.3);
  font-size: 14px;
}
.public-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.public-room {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fffdf7;
}
.public-room > span:first-child {
  flex: 1;
  min-width: 0;
}
.public-room small {
  display: block;
  color: var(--ink-3);
}
.public-seats {
  letter-spacing: 2px;
  color: var(--ember);
}
.visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(470px, 100%);
  margin: 0 auto 12px;
}
.danger-zone {
  border: 1px solid rgba(191, 59, 43, 0.35);
  background: rgba(191, 59, 43, 0.05);
  border-radius: 12px;
  padding: 10px 12px;
}

/* Şifreli masa */
.pw-inline { display: flex; gap: 8px; align-items: center; flex: 1; }
.pw-inline input, .pw-form input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line, #d9d2c3); border-radius: 8px; font: inherit; }
.pw-form { display: grid; gap: 10px; margin-top: 8px; }
.public-room .lock { font-size: 0.9em; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.88rem; line-height: 1.35; margin: 6px 0 10px; }
.check input { margin-top: 3px; }
.terms-note { margin: 6px 0 0; text-align: center; }
.site-foot { margin: 28px auto 12px; text-align: center; font-size: 0.82rem; opacity: 0.75; }
.site-foot a { color: inherit; }
