/* Domino — ortak tasarım dili: ceviz ahşap, krem yazı, altın detaylar */
:root {
  --bg: #100b07; --panel-1: #2c1d13; --line: rgba(212, 169, 79, .32); --line-strong: rgba(212, 169, 79, .7);
  --text: #f3e9d6; --muted: #b5a385; --gold: #d4a94f; --gold-light: #f3d98f; --cream: #f4e7c8;
  --green-1: #46a253; --green-2: #1d6430; --red-1: #c2402f; --red-2: #7c1a11;
  --felt: #1f5c3c; --serif: Georgia, "Times New Roman", serif; --tap: 46px;
  --c0: #c0392b; --c1: #d99a1e; --c2: #1f5fb3; --c3: #1d1b1a;
  --tile-w: 46px; --tile-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(120, 70, 30, .28), transparent 70%), url("../assets/bg-pattern.svg"), linear-gradient(180deg, #160f0a, var(--bg));
  background-attachment: fixed; color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.icon.gold { color: var(--gold); }

.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; animation: screenIn .28s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } }
#home, #rules { align-items: center; justify-content: center; padding: 16px; }

.menu-card, .modal-card {
  position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .045), transparent 30%), url("../assets/wood-panel.svg") center / cover, var(--panel-1);
  border-radius: 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 2px var(--line);
}
.menu-card::before, .modal-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(20, 12, 7, .5), rgba(12, 7, 4, .75)); }
.menu-card > *, .modal-card > * { position: relative; }
.menu-card { width: 100%; max-width: 420px; padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.menu-card.wide { max-width: 660px; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand-tiles { display: flex; gap: 6px; margin-bottom: 8px; transform: rotate(-4deg); }
.brand-tiles .tile { --tile-w: 38px; --tile-h: 52px; }
.title { margin: 6px 0 0; font: 700 46px/1 var(--serif); background: linear-gradient(180deg, #fff1c4, #e2b65b 55%, #a8772a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.card-title { margin: 0; font: 700 24px/1.2 var(--serif); color: var(--gold-light); display: flex; align-items: center; gap: 10px; }
h3 { margin: 12px 0 2px; font: 700 16px var(--serif); color: var(--gold); }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.rules p { color: #e2d6bf; font-size: 15px; margin: 4px 0; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .icon { position: absolute; left: 13px; opacity: .8; }
.field input { width: 100%; min-height: var(--tap); background: rgba(0, 0, 0, .38); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 42px; font-size: 16px; color: var(--text); outline: none; }
.field input:focus { border-color: var(--gold); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 10px 18px; border-radius: 13px; cursor: pointer;
  font-weight: 700; color: var(--cream); border: 1px solid var(--line-strong); background: linear-gradient(180deg, #4a3222, #2a1b11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 0 #0c0704, 0 8px 18px rgba(0, 0, 0, .45); text-shadow: 0 1px 1px rgba(0, 0, 0, .5); transition: transform .08s, filter .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-green { background: linear-gradient(180deg, var(--green-1), var(--green-2)); }
.btn-red { background: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.btn-gold { background: linear-gradient(180deg, #f6dc92, #cf9f45 55%, #a87a2e); color: #2b1a06; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); border-color: #f3d98f; }
.btn.big { min-height: 56px; font-size: 18px; }
.btn > .icon { position: absolute; left: 16px; }
.tile-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; cursor: pointer; color: var(--cream); font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); }
.tile-btn .icon { width: 26px; height: 26px; }
button.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px 6px 4px 0; min-height: 36px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: rgba(0, 0, 0, .35); border-radius: 14px; padding: 5px; border: 1px solid var(--line); }
.seg button { display: flex; flex-direction: column; align-items: center; min-height: 52px; border: 1px solid transparent; background: none; padding: 6px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.seg button .stars { color: var(--gold); letter-spacing: 1px; font-size: 11px; }
.seg button.on { background: linear-gradient(180deg, #f6dc92, #c99a40); color: #2b1a06; }
.seg button.on .stars { color: #7a2a12; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); cursor: pointer; }
.setting-row > span:first-child { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.toggle { position: relative; width: 52px; height: 30px; flex: none; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: #3a2a20; border: 1px solid var(--line); transition: background .2s; pointer-events: none; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); transition: transform .2s; }
.toggle input:checked + i { background: linear-gradient(180deg, var(--green-1), var(--green-2)); }
.toggle input:checked + i::after { transform: translateX(22px); }
.setting-label { display: block; font-weight: 600; margin-bottom: 8px; }
.lang-switch { display: flex; gap: 6px; justify-content: center; }
.lang-switch button { min-height: 34px; padding: 4px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--muted); }
.lang-switch button.on { background: var(--gold); color: #2b1a06; }
.top-right { position: absolute; top: 14px; right: 14px; z-index: 2; }


/* ---------- Oyun ekranı (genel) ---------- */
#game { flex-direction: column; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.game-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.icon-btn { width: var(--tap); height: var(--tap); border-radius: 12px; flex: none; cursor: pointer; display: grid; place-items: center; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #3e2a1c, #22160e); }
@keyframes pulse { 50% { opacity: .6; } }
@keyframes blink { 50% { opacity: .35; } }
.turn-pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: rgba(0, 0, 0, .45); }
.turn-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #888; }
.turn-pill.me { background: linear-gradient(180deg, #2f7a3b, #1a4d24); } .turn-pill.me .dot { background: #b8ffbf; animation: blink 1.2s infinite; }
.coach-line { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.coach-line.good { background: rgba(40, 140, 70, .5); color: #b8ffbf; } .coach-line.minor { background: rgba(200, 160, 40, .4); color: #ffe6a0; }
.coach-line.error { background: rgba(200, 100, 30, .45); color: #ffc9a0; } .coach-line.blunder { background: rgba(170, 40, 30, .55); color: #ffb3a7; }
/* ---------- Pencere, bildirim ---------- */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 3, 1, .78); animation: fade .2s; }
.modal-card { width: 100%; max-width: 400px; padding: 26px 22px 22px; text-align: center; animation: pop .32s cubic-bezier(.2, .9, .3, 1.3); }
.modal-card h2 { margin: 0 0 6px; font: 700 26px var(--serif); color: var(--gold-light); }
.modal-card p { color: #e2d6bf; margin: 8px 0; }
.modal-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.88) translateY(10px); } }
.settings-card { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.go-art { position: relative; height: 96px; margin: -6px auto 4px; width: 140px; }
.go-art .laurel { position: absolute; inset: -20px 0 0; width: 140px; height: 140px; opacity: .9; }
.go-art .crown { position: absolute; left: 35px; top: 14px; width: 70px; animation: crownIn .7s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes crownIn { from { transform: translateY(-30px) scale(.4) rotate(-20deg); opacity: 0; } }
.modal-card.win { background: radial-gradient(at center top, rgba(120, 200, 120, .25), transparent 60%), linear-gradient(180deg, #1f5a30, #0f2d18); box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 0 0 2px var(--gold); }
.modal-card.lose { background: linear-gradient(180deg, #1f2740, #0d111d); box-shadow: 0 18px 50px rgba(0, 0, 0, .55), inset 0 0 0 2px #8a93a8; }
.modal-card.win::before, .modal-card.lose::before { display: none; }
.modal-card.lose .go-art { filter: grayscale(1) brightness(1.3); }
.hand-show { display: flex; flex-wrap: wrap; gap: 4px 2px; justify-content: center; margin: 10px 0; }
.hand-show .tile { --tile-w: 26px; --tile-h: 36px; cursor: default; }
.hand-show .gap { width: 10px; }
.score-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; }
.score-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.score-table td:last-child { text-align: right; font: 700 18px var(--serif); color: var(--gold-light); }
.score-table tr.me td { color: var(--gold-light); }
.score-table .delta { color: #ff9a85; font-size: 13px; margin-left: 6px; }
.score-table .delta.up { color: #8dff9b; }
.coach-report .acc { font: 800 40px var(--serif); color: var(--gold-light); text-align: center; margin: 4px 0; }
.coach-report .acc small { font: 600 13px system-ui, sans-serif; color: var(--muted); display: block; }
.fair-body { text-align: left; font-size: 13px; }
.fair-body dt { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; margin-top: 10px; }
.fair-body dd { margin: 2px 0 0; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #e2d6bf; }
.fair-result { margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-weight: 600; }
.fair-result.ok { background: rgba(40, 140, 70, .35); color: #b8ffbf; } .fair-result.fail { background: rgba(140, 40, 30, .4); color: #ffb3a7; }
.fair-how { color: var(--muted); font-size: 11px; margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: calc(160px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; max-width: calc(100vw - 32px); font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(180deg, #2a5ea8, #173a70); border: 1px solid rgba(255, 255, 255, .25); opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(16px); transition: .25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(180deg, #2f8a3e, #1a5424); } .toast.error { background: linear-gradient(180deg, #a83324, #6a170e); } .toast.gold { background: linear-gradient(180deg, #c99a40, #8a6224); }


@media (max-width: 700px) { .seg button small { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.seg button small { font-size: 10px; color: inherit; opacity: .75; margin-top: 2px; text-align: center; line-height: 1.2; }


.round-info { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Domino taşı ---------- */
.dtile { position: relative; display: inline-flex; box-sizing: border-box; border-radius: 12%/8%; background: linear-gradient(180deg, #fffdf6, #efe7d2); border: 1px solid #b9a47c; box-shadow: inset 0 1px 0 #fff, 0 3px 6px rgba(0, 0, 0, .45); user-select: none; -webkit-user-select: none; flex: none; }
.dtile.h { flex-direction: row; width: 64px; height: 32px; border-radius: 6px; }
.dtile.v { flex-direction: column; width: 32px; height: 64px; border-radius: 6px; }
.dtile .half { position: relative; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 12%; }
.dtile .half i { display: block; width: 70%; height: 70%; margin: auto; border-radius: 50%; background: #1d140c; opacity: 0; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35), 0 1px 1px rgba(0, 0, 0, .3); }
.dtile .bar { flex: none; align-self: stretch; background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .08)); }
.dtile.h .bar { width: 2px; } .dtile.v .bar { height: 2px; background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .08)); }
/* Pip desenleri: 1..9 sıralı hücreler */
.half.n1 i:nth-child(5), .half.n3 i:nth-child(5), .half.n5 i:nth-child(5) { opacity: 1; }
.half.n2 i:nth-child(1), .half.n2 i:nth-child(9), .half.n3 i:nth-child(1), .half.n3 i:nth-child(9) { opacity: 1; }
.half.n4 i:nth-child(1), .half.n4 i:nth-child(3), .half.n4 i:nth-child(7), .half.n4 i:nth-child(9) { opacity: 1; }
.half.n5 i:nth-child(1), .half.n5 i:nth-child(3), .half.n5 i:nth-child(7), .half.n5 i:nth-child(9) { opacity: 1; }
.half.n6.vt i:nth-child(1), .half.n6.vt i:nth-child(3), .half.n6.vt i:nth-child(4), .half.n6.vt i:nth-child(6), .half.n6.vt i:nth-child(7), .half.n6.vt i:nth-child(9) { opacity: 1; }
.half.n6.hz i:nth-child(1), .half.n6.hz i:nth-child(2), .half.n6.hz i:nth-child(3), .half.n6.hz i:nth-child(7), .half.n6.hz i:nth-child(8), .half.n6.hz i:nth-child(9) { opacity: 1; }
.dtile.back { background: linear-gradient(180deg, #7a4a24, #4a2a12); border-color: #2a1308; }
.dtile.back::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(212, 169, 79, .5); border-radius: 4px; }
.dtile.back .half, .dtile.back .bar { display: none; }

/* ---------- Masa ---------- */
.table { position: relative; flex: 1; min-height: 0; margin: 0 6px; border-radius: 14px; display: grid; grid-template-columns: minmax(60px, 1fr) minmax(0, 4fr) minmax(60px, 1fr); grid-template-rows: auto 1fr auto; padding: 8px 12px; gap: 4px;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, #2c8a5a 0%, #1f6a44 45%, #154a30 100%); box-shadow: inset 0 0 90px rgba(0, 0, 0, .45), 0 10px 30px rgba(0, 0, 0, .5); }
.opp { display: flex; align-items: center; gap: 8px; z-index: 1; min-width: 0; }
.opp.top { grid-column: 2; grid-row: 1; justify-self: center; flex-direction: column; gap: 4px; }
.opp.left { grid-column: 1; grid-row: 2; flex-direction: column; justify-self: start; }
.opp.right { grid-column: 3; grid-row: 2; flex-direction: column; justify-self: end; }
body:not(.four) .opp.left, body:not(.four) .opp.right { display: none; }
body:not(.four) .table { grid-template-columns: 0 1fr 0; padding: 8px; }
.opp-hand { display: flex; gap: 2px; }
.opp-hand.h .dtile.back { width: 16px; height: 30px; border-radius: 3px; box-shadow: none; }
.opp-hand.v { flex-direction: column; } .opp-hand.v .dtile.back { width: 30px; height: 16px; border-radius: 3px; box-shadow: none; }
.opp-hand .dtile.back::before { inset: 3px; }
.chain-wrap { grid-column: 2; grid-row: 2; position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.chain { position: relative; width: 100%; max-width: calc((100dvh - 330px) * 2); aspect-ratio: 2 / 1; }
.chain .dtile { position: absolute; width: auto; height: auto; }
.chain .dtile.h .half { padding: 9%; } .chain .dtile.v .half { padding: 9%; }
.chain .dtile.last { box-shadow: inset 0 1px 0 #fff, 0 0 0 2px rgba(243, 217, 143, .9), 0 3px 8px rgba(0, 0, 0, .5); }
.chain .dtile.spinner { background: linear-gradient(180deg, #fff6df, #ecdcb0); }
.chain .dtile.drop-in { animation: dropIn .3s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes dropIn { from { transform: scale(1.25); opacity: .4; } }
.chain .dtile.ghost { background: rgba(141, 255, 155, .18); border: 2px dashed #8dff9b; box-shadow: 0 0 14px rgba(141, 255, 155, .5); cursor: pointer; animation: pulse 1.2s infinite; }
.chain .dtile.ghost .half i { background: rgba(141, 255, 155, .9); } .chain .dtile.ghost .bar { background: rgba(141, 255, 155, .5); }
.boneyard { position: absolute; left: 14px; bottom: 44px; display: flex; align-items: flex-end; gap: 6px; cursor: default; z-index: 2; }
.boneyard .stack { position: relative; display: block; width: 32px; height: 64px; }
.boneyard .stack .dtile.back { position: absolute; left: 0; top: 0; width: 32px; height: 64px; }
.boneyard .stack .dtile.back:nth-child(2) { transform: translate(-3px, -3px); } .boneyard .stack .dtile.back:nth-child(3) { transform: translate(-6px, -6px); }
.boneyard .cntb { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #1d140c; color: #fff; font: 700 12px system-ui, sans-serif; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); margin-bottom: 4px; }
.boneyard.empty .stack { opacity: .25; }
.boneyard.drawable { cursor: pointer; } .boneyard.drawable .stack .dtile.back { box-shadow: 0 0 0 3px #8dff9b, 0 0 14px #8dff9b; }
.bottom-mid { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; align-items: center; gap: 4px; align-self: end; min-width: 0; }
.status-line { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 13px; color: var(--cream); text-align: center; flex-wrap: wrap; min-height: 24px; }
.seat-box { display: flex; align-items: center; z-index: 1; min-width: 0; }
.seat-box[hidden] { display: none; }
.avatar { position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none; z-index: 2; display: grid; place-items: center; font: 800 18px system-ui, sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); background: var(--av, #c2402f); box-shadow: 0 0 0 3px #f4e7c8, 0 4px 10px rgba(0, 0, 0, .5); }
.avatar::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; opacity: 0; transition: opacity .25s; }
.seat-box.active .avatar { box-shadow: 0 0 0 3px #b8ffbf, 0 0 18px rgba(140, 255, 160, .6); }
.seat-box.active .avatar::after { opacity: 1; border-color: #8dff9b transparent transparent transparent; animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.plate { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 4px 12px 4px 26px; margin-left: -20px; border-radius: 10px; min-height: 40px; background: linear-gradient(180deg, rgba(10, 60, 30, .85), rgba(5, 35, 18, .9)); border: 1px solid rgba(140, 255, 160, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 10px rgba(0, 0, 0, .35); color: #f4e7c8; }
.plate .nm { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.plate .row { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: #c9e6cf; }
.plate .sc { font: 800 14px var(--serif); color: var(--gold-light); }
.plate .cnt { display: inline-flex; align-items: center; gap: 3px; } .plate .cnt::before { content: ""; width: 7px; height: 11px; border-radius: 2px; background: linear-gradient(180deg, #7a4a24, #4a2a12); border: 1px solid rgba(212, 169, 79, .6); }
.seat-box.active .plate { border-color: #8dff9b; box-shadow: 0 0 14px rgba(140, 255, 160, .35), inset 0 1px 0 rgba(255, 255, 255, .1); }
.seat-box.s0 .plate .nm { color: #b8ffbf; }
.hand-area { padding: 4px 8px 8px; }
.hand-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 4px 6px; }
.tools { display: flex; gap: 6px; }
.tool { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 4px 14px 4px 10px; border-radius: 10px; cursor: pointer; font: 800 13px system-ui, sans-serif; letter-spacing: .4px; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .14); background: linear-gradient(180deg, rgba(30, 30, 30, .92), rgba(10, 10, 10, .92)); color: #f4e7c8; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.tool .icon { width: 16px; height: 16px; } .tool.gold { background: linear-gradient(180deg, #f6dc92, #c99a40); color: #2b1a06; border-color: #f3d98f; } .tool.gold .icon { filter: brightness(.2); }
.hand { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px 8px; border-radius: 8px; background: linear-gradient(180deg, #a66a32, #8a5424 50%, #7a4a20); border: 1px solid #a56a33; box-shadow: inset 0 2px 4px rgba(255, 255, 255, .15), inset 0 -3px 6px rgba(0, 0, 0, .35), 0 10px 24px rgba(0, 0, 0, .5); min-height: 96px; }
.hand .dtile.v { width: clamp(34px, 7vw, 48px); height: calc(clamp(34px, 7vw, 48px) * 2); cursor: default; transition: transform .12s; }
.hand .dtile.legal { cursor: pointer; box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(141, 255, 155, .8), 0 0 12px rgba(141, 255, 155, .5); }
.hand .dtile.legal:hover { transform: translateY(-6px); }
.hand .dtile.sel { transform: translateY(-10px); box-shadow: inset 0 1px 0 #fff, 0 0 0 3px #f3d98f, 0 0 16px #f3d98f; }
.hand .dtile.hinted { box-shadow: inset 0 1px 0 #fff, 0 0 0 3px #6fd3ff, 0 0 16px #6fd3ff; }
.hand .dtile.fresh { animation: dropIn .4s; }
.dtile.fly { box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }
.fair-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 3px 10px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700; color: #b8ffbf; background: rgba(40, 110, 60, .35); border: 1px solid rgba(111, 207, 127, .5); }
.fair-badge .icon { width: 15px; height: 15px; } .fair-badge.verified { background: rgba(40, 140, 70, .6); } .fair-badge.failed { color: #ffb3a7; background: rgba(140, 40, 30, .5); }
.fair-body { text-align: left; font-size: 13px; } .fair-body dt { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; margin-top: 10px; }
.fair-body dd { margin: 2px 0 0; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #e2d6bf; }
.fair-result { margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-weight: 600; } .fair-result.ok { background: rgba(40, 140, 70, .35); color: #b8ffbf; } .fair-result.fail { background: rgba(140, 40, 30, .4); color: #ffb3a7; }
.fair-how { color: var(--muted); font-size: 11px; margin-top: 8px; }
.score-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; } .score-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.score-table td:last-child { text-align: right; font: 700 18px var(--serif); color: var(--gold-light); } .score-table tr.me td { color: var(--gold-light); }
.score-table .delta { color: #ff9a85; font-size: 13px; margin-left: 6px; } .score-table .delta.up { color: #8dff9b; } .score-table small { color: var(--muted); font-size: 12px; }
.rec { color: var(--muted); font-size: 13px; margin: 0 0 8px; } .coach-report h3 { margin: 8px 0 2px; }
.coach-line.clickable { cursor: pointer; } .last-move { font-size: 12px; color: var(--muted); } .last-move:empty { display: none; }
@media (max-width: 700px) {
  .table { padding: 6px; gap: 2px; }
  .chain { max-width: none; width: 100%; }
  .avatar { width: 36px; height: 36px; font-size: 15px; } .plate { min-height: 32px; padding: 2px 9px 2px 22px; margin-left: -16px; } .plate .nm { font-size: 11px; max-width: 80px; }
  .opp-hand.h .dtile.back { width: 11px; height: 20px; } .opp-hand.v .dtile.back { width: 20px; height: 11px; }
  .boneyard { left: 8px; bottom: 34px; } .boneyard .stack, .boneyard .stack .dtile.back { width: 24px; height: 48px; }
  .hand { gap: 5px; padding: 8px 6px 6px; min-height: 80px; } .hand .dtile.v { width: clamp(30px, 10vw, 40px); height: calc(clamp(30px, 10vw, 40px) * 2); }
  .fair-badge span { display: none; } .tool { min-height: 34px; font-size: 12px; }
  .status-line { font-size: 12px; }
}
