/* EwrekaGames — game boards and animations */

/* ========== ortak ========== */
.board-shell { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.noselect { user-select: none; -webkit-user-select: none; touch-action: manipulation; }

/* ========== XOX ========== */
.xox-board { position: relative; width: min(100%, 430px, max(280px, calc(100vh - 330px))); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.xox-lines { position: absolute; inset: 0; pointer-events: none; }
.xox-lines path { stroke: color-mix(in srgb, var(--ink) 75%, transparent); stroke-width: 3; stroke-linecap: round; fill: none; stroke-dasharray: 400; animation: drawline .9s var(--ease) both; }
.xcell { position: relative; display: grid; place-items: center; border-radius: 18px; transition: background .2s; }
.xcell.click { cursor: pointer; }
.xcell.click:hover { background: var(--surface-2); }
.xcell.click:hover .ghost { opacity: .22; }
.xcell svg { width: 70%; height: 70%; overflow: visible; }
.xcell .ghost { opacity: 0; transition: opacity .2s; }
.xm path { stroke: var(--brand); stroke-width: 11; stroke-linecap: round; fill: none; }
.om circle { stroke: var(--blue); stroke-width: 10; fill: none; }
.xm.anim path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: drawline .28s ease-out forwards; }
.xm.anim path:nth-child(2) { animation-delay: .2s; }
.om.anim circle { stroke-dasharray: 260; stroke-dashoffset: 260; animation: drawline .45s ease-out forwards; }
@keyframes drawline { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.xm.anim path { animation-name: drawx; }
@keyframes drawx { to { stroke-dashoffset: 0; } }
.om.anim circle { animation-name: drawx; }
.xcell.win { background: var(--accent-soft); }
.xcell.win svg { animation: winpulse .9s ease-in-out infinite alternate; }
@keyframes winpulse { to { transform: scale(1.1); } }
.xox-win { position: absolute; inset: 0; pointer-events: none; }
.xox-win line { stroke: var(--ink); opacity: .85; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 500; stroke-dashoffset: 500; animation: drawx .5s .25s ease-out forwards; }

/* ========== Chess ========== */
.chess-wrap { width: min(100%, 600px, max(300px, calc(100vh - 350px))); display: flex; flex-direction: column; gap: 8px; }
.cframe { padding: 0; border-radius: 8px; box-shadow: var(--shadow); }
.cboard { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
.csq { position: relative; min-width: 0; min-height: 0; }
.csq.l { background: #ebd8b7; }
.csq.d { background: #ae8a68; }
.csq.last::before { content: ""; position: absolute; inset: 0; background: rgba(205, 210, 60, .48); }
.csq.sel::before { content: ""; position: absolute; inset: 0; background: rgba(20, 130, 255, .42); }
.csq.check::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 30, 30, .95) 0%, rgba(255, 30, 30, .55) 40%, transparent 72%); animation: checkpulse 1s ease-in-out infinite alternate; }
@keyframes checkpulse { to { opacity: .55; } }
.csq.hov::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .65); }
.csq .dotm { position: absolute; left: 50%; top: 50%; width: 28%; height: 28%; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(20, 30, 20, .28); z-index: 2; pointer-events: none; animation: dotin .25s var(--spring); }
.csq .ringm { position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(20, 30, 20, .3); z-index: 2; pointer-events: none; }
@keyframes dotin { from { transform: translate(-50%, -50%) scale(0); } }
.cpiece { position: absolute; inset: 3%; width: 94%; height: 94%; z-index: 3; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); transition: transform .15s; }
/* A finger drag on a movable piece must not turn into browser scrolling (no pointercancel);
   page scrolling keeps working on the rest of the board. */
.cboard .csq.mine { cursor: grab; touch-action: none; }
@media (hover: hover) { .csq.mine:hover .cpiece { transform: scale(1.06) translateY(-2px); } }
.csq.click { cursor: pointer; }
.coord { position: absolute; font-size: 10px; font-weight: 600; font-family: var(--mono); z-index: 1; pointer-events: none; }
.coord.f { right: 4px; bottom: 2px; }
.coord.r { left: 4px; top: 2px; }
.csq.l .coord { color: #ae8a68; }
.csq.d .coord { color: #ebd8b7; }
.drag-ghost { position: fixed; z-index: 90; pointer-events: none; transform: translate(-50%, -50%) scale(1.15); filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .45)); }
.csq.dragfrom .cpiece { opacity: .3; }
.ctray { display: flex; align-items: center; gap: 2px; min-height: 28px; padding: 0 4px; }
.ctray img { width: 24px; height: 24px; margin-right: -8px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); animation: dotin .3s var(--spring); }
.ctray .adv { margin-left: 14px; font-family: var(--mono); color: var(--ink-3); font-size: 12px; }
.promo-pick { position: absolute; inset: 0; z-index: 20; background: var(--overlay); display: grid; place-items: center; backdrop-filter: blur(2px); animation: fadein .2s; }
.promo-pick .row { display: flex; gap: 10px; background: var(--surface); padding: 14px; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); animation: popin .35s var(--spring); }
.promo-pick button { width: 70px; height: 70px; border-radius: 10px; border: 1px solid var(--line-2); background: #ebd8b7; display: grid; place-items: center; transition: transform .2s var(--spring); }
.promo-pick button:hover { transform: translateY(-4px) scale(1.06); }
.promo-pick img { width: 60px; height: 60px; }

/* ========== Dama ========== */
.dama-wrap { width: min(100%, 600px, max(300px, calc(100vh - 320px))); }
.dframe { width: 100%; padding: 8px; border-radius: 12px; background: #7a5230; box-shadow: var(--shadow); }
.dboard { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #c8995f; gap: 2px; padding: 2px; }
.dsq { position: relative; background: linear-gradient(135deg, #e6c48f, #d6ad74); border-radius: 3px; min-width: 0; min-height: 0; display: grid; place-items: center; }
.dsq.alt { background: linear-gradient(135deg, #dcb57d, #cc9f63); }
.dsq.last { box-shadow: inset 0 0 0 100px rgba(255, 230, 0, .22); }
.dsq.sel { box-shadow: inset 0 0 0 100px rgba(40, 140, 255, .35); }
.dsq.click { cursor: pointer; }
.dsq.target::after { content: ""; width: 30%; height: 30%; border-radius: 50%; background: rgba(30, 160, 90, .7); box-shadow: 0 0 0 4px rgba(30, 160, 90, .25); animation: dotin .25s var(--spring); position: absolute; }
.dsq.must .ddisc { box-shadow: 0 0 0 3px #ff7a3d, 0 0 16px 2px rgba(255, 122, 61, .8), 0 4px 0 rgba(0, 0, 0, .35); animation: mustpulse 1s ease-in-out infinite alternate; }
@keyframes mustpulse { to { box-shadow: 0 0 0 3px #ffb020, 0 0 24px 6px rgba(255, 176, 32, .8), 0 4px 0 rgba(0, 0, 0, .35); } }
.ddisc { width: 80%; height: 80%; border-radius: 50%; position: relative; display: grid; place-items: center; pointer-events: none; transition: transform .15s; z-index: 2; }
.ddisc::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .12); }
.ddisc.w { background: radial-gradient(circle at 35% 28%, #ffffff, #e9e6df 45%, #b9b3a6 100%); box-shadow: 0 4px 0 #8f887a, 0 7px 10px rgba(0, 0, 0, .35); }
.ddisc.b { background: radial-gradient(circle at 35% 28%, #6b6b6b, #2b2b2b 50%, #0b0b0b 100%); box-shadow: 0 4px 0 #000, 0 7px 10px rgba(0, 0, 0, .4); }
.ddisc.b::before { border-color: rgba(255, 255, 255, .1); }
.ddisc svg { width: 52%; height: 52%; position: relative; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.dsq.mine { cursor: pointer; }
.dsq.mine:hover .ddisc { transform: translateY(-3px) scale(1.04); }
.ddisc.ghost { opacity: .45; }
.dhint { font-size: 13px; font-weight: 600; color: var(--accent); text-align: center; animation: fadein .3s; }

/* ========== Tavla ========== */
.tv-wrap { width: min(100%, 800px, max(340px, calc((100vh - 360px) * 1.36))); }
.tv { position: relative; display: grid; grid-template-columns: repeat(6, 1fr) .85fr repeat(6, 1fr) 1fr; grid-template-rows: 1fr 50px 1fr; aspect-ratio: 15 / 11;
  background: radial-gradient(ellipse at 50% 50%, #2f5a3a 0%, #1f3f28 70%, #18321f 100%);
  border: 14px solid transparent; border-radius: 16px;
  background-clip: padding-box; box-shadow: 0 0 0 14px #5a361b, 0 0 0 15px #2a170a, var(--shadow), inset 0 0 30px rgba(0, 0, 0, .55);
  margin: 15px; width: calc(100% - 30px); }
.tv::before { content: ""; position: absolute; inset: -14px; border-radius: 16px; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(92deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 9px), repeating-linear-gradient(88deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 13px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 14px; }
.tv-pt { position: relative; display: flex; flex-direction: column; align-items: center; padding: 2px 0; z-index: 1; min-width: 0; }
.tv-pt.bot { flex-direction: column-reverse; }
.tv-pt .tri { position: absolute; inset: 0 6%; z-index: 0; }
.tv-pt .tri svg { width: 100%; height: 92%; display: block; }
.tv-pt.bot .tri svg { transform: scaleY(-1); position: absolute; bottom: 0; }
.tv-pt.from { cursor: pointer; }
.tv-pt.from::after { content: ""; position: absolute; inset: 0 2%; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255, 210, 80, .55); z-index: 0; pointer-events: none; animation: fromglow 1.4s ease-in-out infinite alternate; }
@keyframes fromglow { to { box-shadow: inset 0 0 0 2px rgba(255, 210, 80, .15); } }
.tv-pt.sel::after { box-shadow: inset 0 0 0 3px #60a5fa; background: rgba(96, 165, 250, .14); animation: none; }
.tv-pt.to { cursor: pointer; }
.tv-pt.to::after { content: ""; position: absolute; inset: 0 2%; border-radius: 8px; background: rgba(52, 211, 153, .22); box-shadow: inset 0 0 0 2px #34d399; z-index: 0; animation: fadein .2s; pointer-events: none; }
.tv-ck { width: 86%; aspect-ratio: 1; border-radius: 50%; position: relative; z-index: 2; margin: -1.5px 0; display: grid; place-items: center; font-size: 12px; font-weight: 900; flex: none; }
.tv-ck::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; }
.tv-ck.a { background: radial-gradient(circle at 35% 28%, #ffffff, #efe7d6 50%, #c2b496 100%); box-shadow: 0 2px 0 #8f8168, 0 4px 6px rgba(0, 0, 0, .4); color: #6b5a3c; }
.tv-ck.a::before { border: 2px solid rgba(160, 135, 90, .45); }
.tv-ck.b { background: radial-gradient(circle at 35% 28%, #7a2c2c, #4a1212 55%, #250606 100%); box-shadow: 0 2px 0 #160303, 0 4px 6px rgba(0, 0, 0, .45); color: #ffd7c2; }
.tv-ck.b::before { border: 2px solid rgba(255, 180, 150, .2); }
.tv-ck span { position: relative; }
.tv-ck.last { box-shadow: 0 0 0 2px #ffd54a, 0 0 12px rgba(255, 213, 74, .7), 0 2px 0 rgba(0, 0, 0, .5); }
.tv-bar { grid-row: 1 / 4; grid-column: 7; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 8px 0; position: relative; z-index: 1;
  background: linear-gradient(90deg, #4a2c15, #6b4220 50%, #4a2c15); box-shadow: inset 0 0 12px rgba(0, 0, 0, .5); }
.tv-bar::after { content: ""; position: absolute; left: 50%; top: 50%; width: 60%; height: 18px; transform: translate(-50%, -50%); border-radius: 4px; background: linear-gradient(#e7c66b, #a77a24); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.tv-bar .half { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 2px; min-height: 34%; border-radius: 8px; padding-top: 2px; }
.tv-bar .half.bot { flex-direction: column-reverse; }
.tv-bar .half.from { cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 210, 80, .65); }
.tv-bar .half.sel { box-shadow: inset 0 0 0 3px #60a5fa; }
/* touch area: stretch the bar half vertically to the middle and the bottom gap without changing its look
   (not widened horizontally; neighbouring points may be targets) */
.tv-bar .half { position: relative; }
.tv-bar .half.bot.from::before { content: ""; position: absolute; left: 0; right: 0; top: -40%; bottom: -8px; }
.tv-off { grid-column: 14; grid-row: 1 / 4; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 5px; gap: 8px; z-index: 1; background: linear-gradient(90deg, #3a2210, #4e2f16); box-shadow: inset 0 0 12px rgba(0, 0, 0, .5); }
.tv-off .tray { flex: 1; border-radius: 8px; background: rgba(0, 0, 0, .3); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding: 4px 3px; font-size: 12px; font-weight: 900; color: #e8d6b5; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); }
.tv-off .tray.top { justify-content: flex-start; }
.tv-off .tray.to { cursor: pointer; box-shadow: inset 0 0 0 2px #34d399; background: rgba(52, 211, 153, .18); }
/* touch area: stretch the bear-off tray to the column's inner padding (same look) */
.tv-off .tray { position: relative; }
.tv-off .tray.to::before { content: ""; position: absolute; inset: -4px -5px -6px; }
.tv-off .sliver { width: 92%; height: 5px; border-radius: 2px; flex: none; }
.tv-off .sliver.a { background: linear-gradient(#fff, #c9bc9f); }
.tv-off .sliver.b { background: linear-gradient(#8a3434, #3a0b0b); }
.tv-mid { grid-row: 2; grid-column: 1 / 7; display: flex; align-items: center; justify-content: center; z-index: 3; color: rgba(255, 255, 255, .55); font-size: 13px; font-weight: 800; }
.tv-mid.right { grid-column: 8 / 14; }
.tv-dice { display: flex; gap: 14px; align-items: center; justify-content: center; perspective: 700px; }
.die3 { --h: 23px; width: 46px; height: 46px; position: relative; }
.die3 .cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.die3 .face { position: absolute; inset: 0; border-radius: 9px; background: radial-gradient(circle at 30% 25%, #ffffff, #f2ede2 60%, #d9cfbb); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 -3px 6px rgba(0, 0, 0, .12); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 7px; gap: 1px; backface-visibility: hidden; }
.die3 .face i { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #444, #000); align-self: center; justify-self: center; visibility: hidden; }
.die3 .face.f1 i { background: radial-gradient(circle at 40% 35%, #ff5a5a, #a40000); width: 11px; height: 11px; }
.die3 .face i.on { visibility: visible; }
.die3 .f1 { transform: translateZ(23px); }
.die3 .f6 { transform: rotateY(180deg) translateZ(23px); }
.die3 .f3 { transform: rotateY(90deg) translateZ(23px); }
.die3 .f4 { transform: rotateY(-90deg) translateZ(23px); }
.die3 .f2 { transform: rotateX(90deg) translateZ(23px); }
.die3 .f5 { transform: rotateX(-90deg) translateZ(23px); }
.die3.sm { --h: 17px; width: 34px; height: 34px; }
.die3.sm .face { padding: 5px; border-radius: 7px; }
.die3.sm .face i { width: 6px; height: 6px; }
.die3.sm .face.f1 i { width: 8px; height: 8px; }
.die3.used { opacity: .35; filter: grayscale(.6); transition: opacity .3s; }
.die3 .shadow { position: absolute; left: 8%; right: 8%; bottom: -10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(4px); }
.tv-pips { font-size: 12px; font-family: var(--mono); color: rgba(255, 255, 255, .6); text-align: center; }
.tv-pips b { color: #fff; font-weight: 500; }

/* ========== Yut Nori ========== */
.yut-wrap { width: 100%; max-width: 980px; display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: center; }
.yut-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.yut-panel .yut-trays { grid-template-columns: 1fr; }
.yut-board { width: min(100%, max(300px, calc(100vh - 320px))); justify-self: center; }
@media (max-width: 760px) { .yut-wrap { grid-template-columns: 1fr; } .yut-board { width: 100%; } .yut-panel .yut-trays { grid-template-columns: 1fr 1fr; } }
.yut-trays { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.ytray { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); padding: 8px 10px; border-radius: 10px; font-size: 14px; min-width: 0; transition: border-color .3s, background .3s; }
.ytray.turn { border-color: var(--accent); background: var(--accent-soft); }
.ytray .tks { display: flex; gap: 5px; margin-left: auto; }
.ytk { width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 3px 6px rgba(0, 0, 0, .35); transition: transform .2s var(--spring), opacity .3s; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; }
.ytk.r { background: radial-gradient(circle at 35% 30%, #ff8a7a, #e0392b 55%, #9b1d13); }
.ytk.bl { background: radial-gradient(circle at 35% 30%, #8ec5ff, #2f7be0 55%, #17468f); }
.ytk.out { opacity: .22; transform: scale(.8); }
.ytk.done { background: radial-gradient(circle at 35% 30%, #fff2b0, #ffc531 55%, #b8860b); color: #5a3d00; }
.ytk.mov { cursor: pointer; animation: tokpulse 1s ease-in-out infinite alternate; }
.ytk.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #60a5fa, 0 3px 6px rgba(0, 0, 0, .35); animation: none; }
@keyframes tokpulse { to { transform: translateY(-3px) scale(1.08); box-shadow: 0 0 0 3px rgba(255, 210, 80, .8), 0 0 14px rgba(255, 210, 80, .7); } }

.ythrow { position: relative; width: 100%; height: 222px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 90%, #4a3a2c, #2b231c 72%);
  box-shadow: inset 0 -20px 40px rgba(0, 0, 0, .3), var(--shadow-sm); }
.ythrow .mat { position: absolute; left: 10%; right: 10%; bottom: 18px; height: 34px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .35), transparent 70%); }
.ysticks { position: absolute; left: 50%; bottom: 30px; width: 0; height: 0; }
.ystick { position: absolute; left: -11px; bottom: 0; width: 22px; height: 128px; perspective: 500px; transform-origin: 50% 50%; }
.ys-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.ys-face { position: absolute; inset: 0; border-radius: 11px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ys-face.flat { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 128'%3E%3Cg stroke='%238a4b1c' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 22l8 7M15 22l-8 7M7 60l8 7M15 60l-8 7M7 98l8 7M15 98l-8 7'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat,
  linear-gradient(90deg, #e9cf9c, #f9e8c4 45%, #e3c389); box-shadow: inset 0 0 0 1px rgba(120, 70, 20, .35); }
.ystick.mark .ys-face.flat { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 128'%3E%3Ccircle cx='11' cy='64' r='6' fill='%23d62828'/%3E%3Ccircle cx='11' cy='64' r='2.5' fill='%23fff'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
  linear-gradient(90deg, #e9cf9c, #f9e8c4 45%, #e3c389); }
.ys-face.round { transform: rotateY(180deg); background: linear-gradient(90deg, #4e2a10, #9b6431 35%, #c88b4f 50%, #8a5426 70%, #45230b); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.ys-face.round::after { content: ""; position: absolute; inset: 8px 6px; border-radius: 8px; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 7px); }
.ythrow.shaking .ysticks { animation: handshake .14s ease-in-out infinite alternate; }
@keyframes handshake { from { transform: translate(-3px, 0) rotate(-2deg); } to { transform: translate(3px, -4px) rotate(2deg); } }
.yresult { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.yresult b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 34px; line-height: 1; color: #fff; }
.yresult span { color: rgba(255, 240, 220, .7); font-size: 13px; font-family: var(--mono); }
.yresult.back b { color: #93c5fd; }
.ythrow .yhint { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 13px; color: rgba(255, 240, 220, .55); text-align: center; }
.pend { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.pend .lbl { font-size: 12px; color: var(--ink-3); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.pchip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 14px; font-weight: 600; font-family: var(--sans); font-size: 15px; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), border-color .2s, background .2s; animation: popin .4s var(--spring); }
.pchip small { color: var(--ink-3); font-family: var(--mono); font-weight: 400; font-size: 11px; }
.pchip.sel { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 0 0 3px var(--accent-soft); }
.pchip:disabled { cursor: default; opacity: .75; }
.yboard { width: 100%; aspect-ratio: 1; touch-action: manipulation; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .2)); }
.yboard .node { transition: fill .2s; }
.yboard .dest-ring { animation: destpulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes destpulse { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.yboard .preview { stroke-dasharray: 2 2.2; animation: dash .6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -4.2; } }
.yboard .tok { cursor: default; }
.yboard .tok.mov { cursor: pointer; }
.yboard .tok .halo { fill: none; stroke: #ffd257; stroke-width: 0; opacity: 0; }
.yboard .tok.mov .halo { animation: halo 1.1s ease-in-out infinite; }
.yboard .tok.sel .halo { stroke: #60a5fa; stroke-width: 1.4; opacity: 1; animation: none; }
@keyframes halo { 0%, 100% { stroke-width: .4; opacity: .2; } 50% { stroke-width: 1.6; opacity: 1; } }
.yboard .hit { cursor: pointer; }

/* ========== Battleship ========== */
.bs-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; width: 100%; }
.bs-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.bs-col h5 { margin: 0; font-size: 12px; color: var(--ink-3); font-family: var(--mono); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.bs-col.active h5 { color: var(--accent); }
.bs-frame { width: 100%; max-width: 440px; padding: 6px; border-radius: 12px; background: linear-gradient(145deg, #1f3550, #0d1c30); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08); position: relative; }
.bs-col.active .bs-frame { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }
.bs { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(120, 220, 255, .25), transparent 50%), linear-gradient(180deg, #0f5d93, #0a3f6b); }
.bs::before { content: ""; position: absolute; inset: -50%; z-index: 0; pointer-events: none; opacity: .35;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 18px, rgba(255, 255, 255, .12) 19px 20px, transparent 21px 40px);
  animation: waves 14s linear infinite; }
@keyframes waves { to { transform: translate(40px, 40px); } }
.bs .c { position: relative; z-index: 1; border: .5px solid rgba(255, 255, 255, .08); }
.bs .c.click { cursor: crosshair; }
@media (hover: hover) { .bs .c.click:hover { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px rgba(255, 210, 80, .8); } }
.bs .c.prev { background: rgba(52, 211, 153, .55); }
.bs .c.prev.bad { background: rgba(251, 113, 133, .55); }
.bs .ship { position: relative; z-index: 2; pointer-events: none; margin: 3px; border-radius: 999px;
  background: linear-gradient(180deg, #dfe6ef 0%, #9aa8ba 45%, #6c7a8e 100%); box-shadow: 0 3px 6px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7); }
.bs .ship.v { background: linear-gradient(90deg, #dfe6ef 0%, #9aa8ba 45%, #6c7a8e 100%); }
.bs .ship::after { content: ""; position: absolute; inset: 28% 22%; border-radius: 999px; background: rgba(60, 72, 90, .55); }
.bs .ship.sunk { background: linear-gradient(180deg, #5a2a22, #2a0f0b); filter: saturate(.8); animation: sinkin .8s ease-out; }
.bs .ship.reveal { opacity: .55; }
@keyframes sinkin { from { transform: scale(1.1); filter: brightness(2); } }
.bs .mk { position: relative; z-index: 3; pointer-events: none; display: grid; place-items: center; }
.bs .mk.miss::before { content: ""; width: 30%; height: 30%; border-radius: 50%; background: #e0f2ff; box-shadow: 0 0 0 3px rgba(224, 242, 255, .25); }
.bs .mk.hit::before { content: ""; width: 62%; height: 62%; border-radius: 50%; background: radial-gradient(circle, #fff3a0 0%, #ff9d2e 35%, #e0391f 65%, transparent 72%); animation: flicker .35s ease-in-out infinite alternate; }
.bs .mk.hit::after { content: "✕"; position: absolute; color: #fff; font-weight: 900; font-size: clamp(9px, 2vw, 15px); text-shadow: 0 1px 2px #000; }
@keyframes flicker { from { transform: scale(.88); opacity: .85; } to { transform: scale(1.08); opacity: 1; } }
.bs .mk.last { box-shadow: inset 0 0 0 2px #ffd54a; border-radius: 4px; }
.bs .missile { position: absolute; z-index: 6; width: 10%; height: 10%; pointer-events: none; display: grid; place-items: center; }
.bs .missile::before { content: ""; width: 40%; height: 40%; border-radius: 50%; background: radial-gradient(circle, #fff, #ffd257 60%, transparent 70%); box-shadow: 0 0 12px 4px rgba(255, 210, 87, .8); }
.fleet { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.fleet span { display: inline-flex; gap: 2px; padding: 4px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.fleet span i { width: 9px; height: 9px; border-radius: 2px; background: #9aa8ba; }
.fleet span.cur { background: var(--accent-soft); border-color: var(--accent); }
.fleet span.cur i { background: var(--accent); }
.fleet span.done { opacity: .35; }
.fleet span.gone i { background: #e0391f; }
.fleet span.gone { opacity: .5; }
.bs-place { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

@media (max-width: 560px) {
  .yut-trays, .yut-panel .yut-trays { grid-template-columns: 1fr; }
  .ythrow { height: 200px; }
  .ystick { height: 112px; width: 20px; left: -10px; }
  .tv { border-width: 8px; margin: 9px; width: calc(100% - 18px); box-shadow: 0 0 0 8px #5a361b, 0 0 0 9px #2a170a, var(--shadow), inset 0 0 20px rgba(0, 0, 0, .55); grid-template-rows: 1fr 40px 1fr; }
  .tv::before { inset: -8px; padding: 8px; }
  .die3 { --h: 18px; width: 36px; height: 36px; }
  .die3.sm { --h: 14px; width: 28px; height: 28px; }
  .die3.sm .face i { width: 5px; height: 5px; }
  .die3 .face { padding: 5px; }
  .die3 .face i { width: 6px; height: 6px; }
  .tv-pips { font-size: 11px; }
  .cframe, .dframe { padding: 6px; }
  .bs-wrap { gap: 14px; }
}

/* ===== bilgisayar modu ===== */
.bot-level { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.bot-level .bl-lbl { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { height: 32px; min-width: 76px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 0 var(--line-2), 0 0 0 1px var(--line); }
.avatar.bot-av { background: linear-gradient(160deg, #5b6b86, #3b4760); color: #e8f1ff; }
.avatar.bot-av svg { width: 24px; height: 24px; }
.pbar .bot-lv { font-weight: 600; color: var(--ink-2); }
.bot-online { padding: 14px; display: grid; gap: 10px; }
.bot-online p { margin: 0; font-size: 14px; color: var(--ink-2); }
