:root{--forest:#102b28;--forest-deep:#0b211f;--muted:#aec7be;--paper:#f5efdd;--ink:#1d3732;--warm:#d5b981;--line:#e1d6bd;--card:#fcfaf2;--player-color:#b75543}*,*::before,*::after{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:#eaf2e8;background:var(--forest);font-family:system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;line-height:1.55}button,input,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed}a{color:inherit;text-decoration:none}[hidden]{display:none!important}:focus-visible{outline:3px solid #e6bd65;outline-offset:3px}.site-top{max-width:1280px;margin:auto;padding:19px 28px;display:flex;align-items:center;gap:18px;border-bottom:1px solid #36534c}.back-link{display:inline-flex;gap:9px;align-items:center;font-weight:700;font-size:14px}.back-link span{font-size:20px}.back-link:hover{text-decoration:underline;text-underline-offset:4px}.top-mark{margin:auto;font-size:13px;color:#d5d7b4}.top-count{font-size:11px;letter-spacing:.13em;color:#b7ceb9;font-weight:700}main{max-width:1280px;margin:auto;padding:0 28px 50px}.intro{display:flex;justify-content:space-between;gap:35px;align-items:center;padding:55px 8px 47px}.eyebrow{margin:0 0 10px;color:#d4c18d;font-weight:700;font-size:13px;letter-spacing:.01em}h1{font-size:clamp(46px,5.3vw,76px);margin:0;line-height:1.14;letter-spacing:-.055em;font-weight:800}.title-flower{font-size:.38em;color:var(--warm);vertical-align:middle;letter-spacing:0}.intro-description{font-size:16px;color:#bdd2c7;max-width:620px;margin:18px 0 0}.intro-sticks{display:flex;gap:13px;transform:rotate(-12deg);padding:10px 65px 10px 10px}.intro-sticks i{display:block;width:22px;height:103px;border-radius:13px;background:#e6c785;border:3px solid #f6e4ab;box-shadow:inset -5px -6px 0 #b99658,5px 8px 0 #061a182f}.intro-sticks i:nth-child(2){transform:translateY(-11px) rotate(8deg)}.intro-sticks i:nth-child(3){background:#ccab73;transform:translateY(6px) rotate(-9deg)}.intro-sticks i:nth-child(4){transform:translateY(-9px) rotate(14deg)}.setup{border:1px solid #4c6b58;background:#1e3d35;border-radius:18px;padding:26px 30px;margin-bottom:30px}.setup-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.setup h2,.rules h2{font-size:23px;letter-spacing:-.035em;line-height:1.4;margin:0}.setup-heading p{margin:5px 0 0;color:#b8ccbf;font-size:13px}.player-count-label{display:flex;align-items:center;gap:12px;color:#d3e1d8;font-weight:600;white-space:nowrap;font-size:13px}.player-count-label select{border:1px solid #698477;color:#f3f8ed;background:#284a40;border-radius:9px;padding:9px 34px 9px 12px;min-width:90px}.name-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:24px 0}.name-field{min-width:0;display:grid;gap:9px}.name-field>span{display:flex;gap:7px;align-items:center;color:#e9f1e9;font-weight:700;font-size:12px}.name-dot{display:inline-block;width:11px;height:11px;border-radius:50%;background:var(--player-color)}.name-field input{min-width:0;width:100%;border:1px solid #668276;border-radius:10px;padding:12px 13px;color:#203b34;background:#f4f0e4;outline:0}.name-field input:focus{outline:3px solid #d4ae68}.button{display:inline-flex;justify-content:center;align-items:center;gap:12px;border-radius:11px;border:1px solid transparent;font-weight:800;line-height:1.3;padding:13px 20px;min-height:48px}.button.primary{color:#17382d;background:#e6c684;border-color:#f9dda4;box-shadow:0 3px 0 #9c7c4c}.button.primary:hover:not(:disabled){background:#f3d895}.button.primary:disabled{opacity:.48;box-shadow:none}.button.subtle{background:transparent;color:#426159;border:1px solid #b4c8ba}.button.subtle:hover{background:#e7f0e7}.setup-start{width:100%}.game{margin:30px 0 40px}.scorebar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}.score-card{background:#1c3a33;border:1px solid #3e5f50;border-top:4px solid var(--player-color);border-radius:12px;padding:15px 15px 13px;min-width:0;opacity:.85}.score-card.is-active{background:#285044;border-color:#688c72;opacity:1;box-shadow:0 0 0 1px #7d9a7b44}.score-line{display:flex;align-items:center;gap:10px;min-width:0}.score-line strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.score-line em{font-style:normal;margin-left:auto;flex-shrink:0;color:#d9eab7;font-weight:700;font-size:10px}.score-icon{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:var(--player-color);color:#fff;font-size:12px;font-weight:800;flex-shrink:0}.score-card p{font-size:12px;color:#adc5b6;margin:10px 0 11px}.score-card p span{padding:0 3px;opacity:.55}.score-card p b{color:#e4eed4}.score-progress{background:#10251e;height:4px;border-radius:9px;overflow:hidden}.score-progress i{display:block;background:var(--player-color);height:100%;transition:width .2s}.table-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);gap:14px;align-items:start}.board-panel{background:var(--paper);color:var(--ink);padding:22px 22px 10px;border-radius:17px;border:2px solid #eadab4;box-shadow:0 12px 26px #00000018;min-width:0}.board-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 2px 16px}.board-head span:first-child{font-weight:850;font-size:19px;letter-spacing:-.04em}.board-head span:last-child{font-size:11px;color:#60776a}.board{aspect-ratio:1/1;position:relative;width:100%;background:#efe4c9;border-radius:12px;box-shadow:inset 0 0 30px #9c815e25;overflow:hidden}.board:before{content:"";position:absolute;inset:1%;border:1px solid #ab9e794d;border-radius:14px;pointer-events:none}.board-lines,.board-cells{position:absolute;inset:0;width:100%;height:100%}.board-lines{color:#977b4c;opacity:.75}.board-center-decoration{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:serif;font-weight:900;color:#9b784e;font-size:clamp(14px,2.8vw,25px);opacity:.35;pointer-events:none}.board-finish{position:absolute;top:85%;left:73%;font-size:11px;font-weight:800;color:#8c7348;pointer-events:none}.board-cell{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;border-radius:50%;width:7%;height:7%;min-width:0;min-height:0;padding:0;border:2px solid #a48e69;background:#f8f1de;color:#344c3f;box-shadow:0 2px 3px #6a50332c;transition:transform .13s,box-shadow .13s}.board-cell:not(.is-movable){cursor:default}.board-cell.is-corner{width:8.7%;height:8.7%;background:#ead5aa;border-width:3px}.board-cell.is-destination{box-shadow:0 0 0 5px #77a76a65}.board-cell.is-movable{border-color:#32663f;box-shadow:0 0 0 4px #4a8d69a0;z-index:2;cursor:pointer}.board-cell.is-movable:hover{transform:translate(-50%,-50%) scale(1.14)}.board-cell.is-occupied{background:#fdf7eb}.cell-contents{display:flex;align-items:center;justify-content:center;gap:1px;width:100%;height:100%;pointer-events:none}.occupant{display:grid;place-items:center;width:65%;height:65%;border-radius:50%;background:var(--piece-color);color:#fff;font-style:normal;font-weight:800;font-size:clamp(8px,1.5vw,14px);border:1.5px solid #fff9e5;box-shadow:0 1px 2px #0005}.occupant:nth-child(2){margin-left:-32%}.board-foot{margin:13px 3px 8px;font-size:12px;color:#738272;text-align:center}.control-panel{color:#1b3930;border-radius:17px;padding:22px 22px 19px;background:#faf8ee;box-shadow:0 12px 26px #0002;min-width:0}.turn-top{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;color:#798979}.section-caption{font-size:12px;font-weight:800;color:#697c6d}.turn-name{font-size:31px;letter-spacing:-.04em;color:var(--player-color);margin:6px 0 0;overflow-wrap:anywhere;line-height:1.2}.turn-hint{font-size:12px;margin:8px 0 20px;color:#687e73;min-height:22px}.throw-stage{background:#eee5d2;border:1px solid #e0d5ba;border-radius:13px;padding:17px 16px 13px}.stick-row{display:flex;gap:9px;align-items:center;justify-content:center;min-height:92px}.stick{position:relative;display:block;width:24px;height:89px;border-radius:13px;background:linear-gradient(90deg,#8a653d 0%,#c59c62 28%,#dcb681 70%,#a67f49 100%);border:2px solid #8b673a;transform:rotate(-10deg);box-shadow:4px 4px 0 #69583a1c}.stick:nth-child(2){transform:rotate(9deg) translateY(-4px)}.stick:nth-child(3){transform:rotate(-6deg) translateY(4px)}.stick:nth-child(4){transform:rotate(12deg)}.stick.is-flat{background:#f5db9f;border-color:#ad8957;box-shadow:inset 0 0 0 4px #e6c284,4px 4px 0 #69583a1c}.stick.is-marked:after{content:'✕';position:absolute;left:0;right:0;top:22px;text-align:center;font-size:14px;color:#8b4234;font-weight:800}.throw-caption{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #d4c7ac;margin-top:14px;padding-top:12px}.throw-caption span{font-size:12px;color:#817a64}.throw-caption strong{font-size:22px;color:#233f33}.throw-button{width:100%;margin:13px 0 5px}.pending-block,.piece-block{border-top:1px solid #e1e5d8;margin-top:17px;padding-top:17px}.block-title{display:flex;align-items:baseline;justify-content:space-between;gap:6px}.block-title h3{margin:0;font-size:14px;letter-spacing:-.02em}.block-title small{font-size:10px;color:#849385;text-align:right}.result-chips{display:flex;gap:7px;flex-wrap:wrap;min-height:43px;margin-top:12px}.result-chip{background:#f4eddc;color:#24453d;border:1px solid #d2d7c7;border-radius:10px;padding:7px 13px;font-weight:850;min-height:40px}.result-chip small{font-size:10px;color:#779382;margin-left:4px}.result-chip.is-selected{background:#e1e7cf;border-color:#507d54;box-shadow:inset 0 0 0 1px #507d54}.empty-text{font-size:12px;color:#9b9c8f;margin-top:9px}.piece-list{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.piece-option{display:flex;align-items:center;gap:8px;min-width:0;min-height:62px;border:1px solid #d7e1d6;background:#f4f8ed;border-radius:10px;padding:9px 8px;text-align:left}.piece-option:hover:not(:disabled){background:#e7f1dc;border-color:#6f976d}.piece-option:disabled{opacity:.6;background:#f4f3ee}.piece-marker{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;border-radius:50%;background:var(--player-color);color:white;font-size:13px;font-weight:850}.piece-copy{display:flex;flex-direction:column;min-width:0;flex:1}.piece-copy strong{font-size:12px;white-space:nowrap}.piece-copy strong small{font-size:10px;color:#69846a}.piece-copy>span{font-size:10px;color:#788c7b;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.piece-dest{font-size:10px;color:#457858;max-width:43%;text-align:right;line-height:1.35}.game-message{margin-top:17px;min-height:45px;background:#ecf2e5;border-left:3px solid #9bac80;padding:11px 13px;border-radius:6px;color:#42664a;font-size:12px;font-weight:600}.control-bottom{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:17px}.control-bottom .button{font-size:12px;padding:8px;min-height:40px}.win-panel{display:flex;align-items:center;gap:18px;background:#f4efdb;color:#284637;padding:22px 25px;border-radius:16px;margin-top:14px;border:2px solid #dcc280}.win-symbol{font-size:44px}.win-panel h2{margin:0;font-size:22px}.win-panel p{margin:4px 0 0;font-size:13px;color:#718475}.win-panel .button{margin-left:auto;font-size:13px}.rules{padding:32px 0}.rules-top{display:flex;gap:16px;align-items:baseline;border-bottom:1px solid #416055;padding-bottom:17px}.rules-top p{font-size:12px;color:#a6beb3;margin:0}.rules-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;margin:25px 0 0}.rules-grid article{min-width:0}.rules-grid b{font-size:12px;color:#d5bb87}.rules-grid h3{font-size:15px;margin:6px 0 9px}.rules-grid p{font-size:12px;line-height:1.85;color:#b2c8bb;margin:0}footer{max-width:1280px;padding:26px 28px 35px;margin:auto;border-top:1px solid #416055;display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:13px;color:#d1dece}footer a:hover{text-decoration:underline}footer small{font-size:11px;color:#98b3a6}@media(max-width:1050px){.table-grid{grid-template-columns:minmax(0,1fr) minmax(300px,.85fr)}.name-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scorebar{grid-template-columns:repeat(2,minmax(0,1fr))}.board-panel,.control-panel{padding:17px}.piece-list{grid-template-columns:1fr}.rules-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:800px){main{padding:0 15px 35px}.site-top{padding:15px}.intro{padding:37px 4px 29px}.intro-sticks{padding-right:15px}.intro-sticks i{width:14px;height:68px}.table-grid{display:block}.board-panel{margin-bottom:12px}.board{max-width:670px;margin:auto}.control-panel{padding:21px}.piece-list{grid-template-columns:repeat(2,minmax(0,1fr))}.game{scroll-margin-top:15px}.intro-description{font-size:14px}}@media(max-width:480px){.top-mark{display:none}.top-count{margin-left:auto}.intro-sticks{display:none}.intro{padding-top:30px}.intro-description{margin-top:12px}.setup{padding:19px 15px}.setup-heading{align-items:start;flex-direction:column}.name-grid{gap:12px;margin:17px 0}.scorebar{gap:7px}.score-card{padding:11px 10px}.score-line{gap:6px}.score-line strong{font-size:12px}.score-line em{font-size:9px}.score-card p{font-size:10px}.board-panel{padding:10px 8px}.board-head{padding:5px 6px 12px}.board-head span:first-child{font-size:16px}.board-head span:last-child{font-size:10px}.board-foot{font-size:10px}.piece-list{grid-template-columns:1fr 1fr}.piece-option{gap:6px;padding:7px 6px}.piece-marker{width:25px;height:25px;font-size:11px}.piece-dest{font-size:9px}.piece-copy strong{font-size:11px}.rules-grid{gap:20px 14px}.rules-grid p{font-size:11px}.win-panel{flex-wrap:wrap;gap:7px;padding:15px}.win-panel .button{width:100%;margin:10px 0 0}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition-duration:0s!important;animation-duration:0s!important}}


/* Yutnori visual system v2; stable SVG pieces replace CSS 3D fragments. */

/* ----- Unified tabletop interface, independent of the game's rules engine ----- */
:root {
  --forest: #142b28;
  --ink: #244036;
  --paper: #f7eed8;
  --warm: #efc47e;
  --line: #cbb791;
}
body {
  color: #f3f0e2;
  background:
    radial-gradient(ellipse at 17% -8%, #41604a 0%, transparent 42%),
    radial-gradient(ellipse at 90% 45%, #213d35 0%, transparent 60%),
    repeating-linear-gradient(125deg, #152c27 0 2px, #142b27 2px 5px);
}
.site-top { max-width: 1210px; border-bottom: 1px solid #ffffff21; padding: 17px 24px; }
.back-link { color: #fff4d7; }
.top-mark { color: #cdd8c4; }
.top-count { color: #e5ca96; }
main { max-width: 1210px; padding: 0 24px 44px; }
.intro { padding: 31px 8px 27px; align-items:center; }
.eyebrow { color: #e6cf98; font-weight: 600; font-size: 12px; margin: 0 0 6px; }
h1 { font-size: clamp(40px, 4.1vw, 60px); letter-spacing: -.05em; }
.intro-description { max-width: 600px; font-size: 14px; color: #d8e1d2; margin-top: 12px; }
.intro-sticks { padding: 0 50px 0 0; transform: rotate(-17deg) scale(.85); }
.setup { background: #f5edd9; color: #293f33; border: 1px solid #d5c4a4; box-shadow: 0 14px 34px #091b1830; border-radius: 18px; margin: 10px 0 24px; }
.setup-heading p { color: #657365; }
.player-count-label { color: #36483a; }
.player-count-label select { color:#31493e; background:#fff9ec; border-color:#c6b597; }
.name-field>span { color: #3a493c; }
.name-field input { background:#fffdf6; border-color:#cbbda2; }
.button.primary {
  background:linear-gradient(180deg,#f4d59b,#e6b66c);
  border-color:#a98044;
  color:#392c1b;
  border-radius:12px;
  box-shadow:inset 0 1px #fff3d6,0 3px 0 #9e7847;
  letter-spacing: -.02em;
}
.button.primary:hover:not(:disabled) { background:linear-gradient(180deg,#ffe1ab,#ecc281); }
.game { margin: 17px 0 32px; scroll-margin-top: 8px; }
.scorebar { gap: 9px; margin-bottom: 14px; }
.score-card {
  background: #234237;
  border: 1px solid #ffffff27;
  border-top: 0;
  border-left: 4px solid var(--player-color);
  border-radius: 13px;
  padding: 13px 14px;
  opacity: 1;
  box-shadow:inset 0 1px #ffffff0d;
}
.score-card.is-active { background:#325747; border-color:#9aab86; border-left-color:var(--player-color); box-shadow:0 0 0 1px #afca9c36,inset 0 1px #ffffff17; }
.score-line strong { font-size: 14px; }
.score-icon { width:27px;height:27px;box-shadow:0 2px 4px #0003; }
.score-card p { color:#d0decd; margin:7px 0 9px; font-size:12px; }
.score-progress { height:5px; background:#102b24; }
.table-grid { grid-template-columns:minmax(0,1.15fr) minmax(350px,.85fr); gap:15px; }
.board-panel {
  background:linear-gradient(145deg, #cdae79,#a57b48);
  border:1px solid #c7a672;
  box-shadow:0 5px 0 #705333,0 22px 36px #06150d4d,inset 0 1px #ffdfab;
  padding:14px;
  border-radius:19px;
  color:#3d3526;
}
.board-head { background:#f5e5c4; border-radius:11px 11px 0 0; padding:12px 15px 10px; align-items:center; }
.board-head span:first-child { font-size:17px; }
.board-head span:last-child { color:#816c4c; }
.board {
  background:
    radial-gradient(ellipse at 38% 27%,#f9eed1,#eed6aa 73%,#ddbc86),
    repeating-linear-gradient(92deg, #b88b4610 0 3px,transparent 3px 15px);
  border:9px solid #f5e5c4;
  border-top:0;
  border-radius:0 0 10px 10px;
  box-shadow:inset 0 0 24px #9e6b352b;
}
.board:before { border-color:#9b7c4a44; }
.board-lines { opacity:.78; color:#8e653a; }
.board-lines path { stroke-width:4; }
.board-cell {
  background:radial-gradient(circle at 32% 23%,#fff7dc,#f2e3c4 64%,#caa778);
  border:2px solid #997347;
  box-shadow:inset 0 1px #fff9df,0 2px 3px #5b3a1c55;
}
.board-cell.is-corner { background:radial-gradient(circle at 34% 24%,#ffe3a3,#d4ad6a 76%,#b08b50); border-color:#9c7541; }
.board-cell.is-movable { box-shadow:0 0 0 4px #4b976b93,inset 0 1px #fff8db; }
.board-cell.is-destination { box-shadow:0 0 0 4px #75aa6c82; }
.occupant { border:2px solid #fff4dd; width:70%;height:70%;box-shadow:0 2px 3px #452c185e,inset 0 1px 1px #ffffff65; }
.board-foot { padding:7px 4px 4px; margin:0; color:#372d1b; font-size:12px; background:#cfaa72; }
.control-panel { background:#faf5e8; color:#2e4636; border:1px solid #e0d1b4; border-radius:18px; box-shadow:0 20px 30px #07160f32; padding:19px 20px 20px; }
.turn-top { font-size:12px; }
.turn-name { font-size:27px; margin-top:3px; }
.turn-hint { color:#596f60; margin:5px 0 13px; min-height:20px; }
/* A perspective tray with four actual half-round solids. No canvas loop or downloaded model. */
.throw-stage {
  position:relative;
  padding:8px 10px 5px;
  background:radial-gradient(ellipse at 40% 38%,#4d6d55,#294b3e 75%);
  border:5px solid #b88e58;
  border-radius:20px;
  overflow:hidden;
  box-shadow:inset 0 0 0 1px #e2c28b,inset 0 5px 18px #102b2870,0 4px 0 #7e5835,0 7px 12px #36231520;
}
.stick-row {
  --stick-width:32px; --radius:16px; --stick-length:144px;
  position:relative; display:block; height:228px; min-height:228px;
  width:100%; max-width:430px; padding:0; margin:0 auto;
  perspective:800px; perspective-origin:50% 35%;
  isolation:auto;
}
.stick-row::before { content:none; }
.throw-table {
  position:absolute; inset:14px 0 8px;
  transform:rotateX(48deg) rotateZ(-5deg);
  transform-style:preserve-3d;
}
.throw-mat {
  position:absolute; inset:-6% -1%; border-radius:18px; transform:translateZ(-1px);
  background:
    repeating-linear-gradient(0deg,transparent 0 3px,#b7d0a60a 3px 4px),
    repeating-linear-gradient(90deg,transparent 0 3px,#b7d0a609 3px 4px),
    radial-gradient(ellipse at 35% 25%,#57785c,#395b46 85%);
  border:1px solid #91a87a55; box-shadow:inset 0 0 0 6px #2a4b3845;
}
.stick-scene {
  --rest:-19deg; --sway:-9px; --drift:-13px; --lift:92px; --delay:0ms;
  --land-x:14%; --land-y:-8px;
  position:absolute; display:block; width:var(--stick-width); height:var(--stick-length);
  left:var(--land-x); top:50%; margin-left:calc(var(--radius) * -1); margin-top:calc(var(--stick-length) * -.5);
  transform:translateY(var(--land-y)) rotateZ(var(--rest));
  transform-style:preserve-3d;
}
.stick-scene:nth-of-type(3) { --land-x:38%; --land-y:13px; --rest:12deg; --sway:13px; --drift:-9px; --lift:108px; --delay:38ms; }
.stick-scene:nth-of-type(4) { --land-x:61%; --land-y:-12px; --rest:-9deg; --sway:-11px; --drift:8px; --lift:99px; --delay:72ms; }
.stick-scene:nth-of-type(5) { --land-x:84%; --land-y:7px; --rest:24deg; --sway:8px; --drift:12px; --lift:86px; --delay:24ms; }
.stick-shadow {
  position:absolute; left:2px; top:5px; width:calc(var(--stick-width) + 7px); height:var(--stick-length);
  border-radius:12px; background:#0c2119; opacity:.43; filter:blur(4px);
  transform:translate3d(4px,6px,.2px) scale(.95); pointer-events:none;
}
.stick-scene .stick,
.stick-scene .stick:nth-child(n) {
  --face:180deg;
  position:absolute; inset:0; display:block; width:var(--stick-width); height:var(--stick-length);
  padding:0; margin:0; border:0; border-radius:0; background:none; box-shadow:none;
  transform-origin:50% 50% calc(var(--radius) * -.5);
  transform:translateZ(var(--radius)) rotateY(var(--face));
  transform-style:preserve-3d;
  overflow:visible;
}
.stick-scene .stick.is-flat { --face:0deg; }
.stick-scene .stick::after { content:none; }
.yut-flat,.yut-curve,.yut-end {
  position:absolute; display:block; backface-visibility:hidden; -webkit-backface-visibility:hidden;
}
.yut-flat {
  inset:0; border:1px solid #bd8d54; border-radius:3px;
  background:
    repeating-linear-gradient(89deg,transparent 0 3px,#98673725 3px 3.8px,transparent 3.8px 7px),
    linear-gradient(90deg,#d3a56b,#f5dca7 18%,#eed29b 64%,#dfba82);
  box-shadow:inset 1px 0 #fff0c6,inset -1px 0 #9b6b3999;
}
.yut-flat::before { content:''; position:absolute; inset:5px 4px; border-inline:1px solid #ad7b4430; border-radius:48%; }
.yut-backdo-mark { position:absolute; width:19px; height:19px; top:47%; left:50%; transform:translate(-50%,-50%); }
.yut-backdo-mark::before,.yut-backdo-mark::after {
  content:''; position:absolute; top:8px; left:0; width:19px; height:3px; border-radius:2px;
  background:#aa3b2d; box-shadow:0 .5px #e8ad76; transform:rotate(45deg);
}
.yut-backdo-mark::after { transform:rotate(-45deg); }
.yut-curve {
  left:50%; top:0; height:100%;
  width:calc(var(--radius) * .26106 + .35px); margin-left:calc(var(--radius) * -.13053 - .175px);
  background:
    repeating-linear-gradient(91deg,transparent 0 3px,#5b36191c 3px 3.7px,transparent 3.7px 9px),
    linear-gradient(0deg,#61361620,transparent 12% 88%,#fff0b52b),var(--facet-shade);
  transform:translateX(calc(var(--radius) * var(--facet-x))) translateZ(calc(var(--radius) * var(--facet-z))) rotateY(var(--facet-angle));
}
.yut-end {
  left:0; width:var(--stick-width); height:var(--stick-width); border-radius:50%;
  background:repeating-radial-gradient(ellipse at 48% 52%,#c89b60 0 2px,#966630 2.3px 2.8px,#dfb77b 3px 5px);
  border:1px solid #906131;
}
.yut-end-top { top:calc(var(--radius) * -1); clip-path:inset(0 0 50% 0); transform:rotateX(90deg); }
.yut-end-bottom { bottom:calc(var(--radius) * -1); clip-path:inset(50% 0 0 0); transform:rotateX(-90deg); }
.throw-stage.is-tossing .stick-scene .stick { animation:yut-solid-toss 1220ms var(--delay) cubic-bezier(.25,.5,.3,1) both; will-change:transform; }
.throw-stage.is-tossing .stick-shadow { animation:yut-solid-shadow 1220ms var(--delay) ease-in-out both; }
@keyframes yut-solid-toss {
  0% { transform:translate3d(0,0,var(--radius)) rotateX(0deg) rotateY(var(--face)) rotateZ(0deg); }
  24% { transform:translate3d(var(--sway),var(--drift),var(--lift)) rotateX(120deg) rotateY(calc(var(--face) + 190deg)) rotateZ(-24deg); }
  47% { transform:translate3d(calc(var(--sway) * .65),var(--drift),calc(var(--lift) * 1.08)) rotateX(230deg) rotateY(calc(var(--face) + 420deg)) rotateZ(18deg); }
  73% { transform:translate3d(0,0,var(--radius)) rotateX(354deg) rotateY(calc(var(--face) + 713deg)) rotateZ(-5deg); }
  84% { transform:translate3d(0,0,calc(var(--radius) + 17px)) rotateX(369deg) rotateY(calc(var(--face) + 727deg)) rotateZ(4deg); }
  94% { transform:translate3d(0,0,var(--radius)) rotateX(357deg) rotateY(calc(var(--face) + 718deg)) rotateZ(-1deg); }
  100% { transform:translate3d(0,0,var(--radius)) rotateX(360deg) rotateY(calc(var(--face) + 720deg)) rotateZ(0deg); }
}
@keyframes yut-solid-shadow {
  0%,100% { opacity:.43; transform:translate3d(4px,6px,.2px) scale(.95); }
  30%,47% { opacity:.16; transform:translate3d(14px,15px,.2px) scale(1.28); }
  73%,94% { opacity:.5; transform:translate3d(3px,5px,.2px) scale(.92); }
  84% { opacity:.3; transform:translate3d(6px,8px,.2px) scale(1.05); }
}
.throw-caption { position:relative; margin:0 5px; padding:9px 4px 10px; border-color:#a4bc9855; }
.throw-caption span { color:#d1dfc7; font-weight:600; }
.throw-caption strong { color:#ffdf9a; font-size:20px; }

.throw-button { margin:13px 0 0;min-height:56px;font-size:16px; }
.pending-block,.piece-block { margin-top:16px;padding-top:14px; }
.block-title h3 { font-size:14px; }
.block-title small { color:#7d8574; }
.result-chip { border-color:#c8b88e;background:#efe5cb; }
.result-chip.is-selected { background:#e2efde;border-color:#5c8d58; }
.piece-option { background:#fffdf6; border-color:#ded6bd;min-height:61px; }
.piece-option:hover:not(:disabled) { background:#ecf4e3; }
.piece-option:disabled { background:#f5f1e7; }
.game-message { background:#e8eddb; }
.rules { margin-top:8px; }
.rules-grid { gap:28px; }
@media(max-width:1050px){
  .table-grid {grid-template-columns:minmax(0,1.1fr) minmax(315px,.9fr)}
  .board-panel,.control-panel {padding:13px}
  .scorebar {grid-template-columns:repeat(2,minmax(0,1fr))}
  .piece-list {grid-template-columns:1fr 1fr}
}
@media(max-width:800px){
  main {padding:0 16px 32px}
  .site-top {padding:13px 16px}
  .intro {padding:25px 2px 23px}
  .intro-sticks {display:none}
  .table-grid {display:flex;flex-direction:column;gap:12px}
  .board-panel,.control-panel {width:100%;margin:0;padding:13px}
  .board {max-width:620px;margin:0 auto}
  .control-panel {order:1}
  .board-panel {order:0}
  .piece-list {grid-template-columns:repeat(2,minmax(0,1fr))}
  .stick-row {height:218px;min-height:218px}
  .rules-grid {gap:18px}
}
@media(max-width:480px){
  .intro {padding:22px 2px 18px}
  .eyebrow {font-size:11px}
  h1 {font-size:39px}
  .intro-description {font-size:12px;margin-top:8px}
  .scorebar {gap:7px}
  .score-card {padding:10px;border-left-width:3px}
  .score-line strong {font-size:12px}
  .score-card p {font-size:10px}
  .board-panel {padding:7px}
  .board-head {padding:11px 9px}
  .board {border-width:5px;border-top:0}
  .board-foot {font-size:10px}
  .stick-row {--stick-width:28px;--radius:14px;--stick-length:126px;height:208px;min-height:208px}
  .control-panel {padding:17px}
  .turn-name {font-size:25px}
  .rules-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
  .throw-stage.is-tossing .stick-scene .stick,
  .throw-stage.is-tossing .stick-shadow{animation:none!important;will-change:auto}
}
/* Mobile play starts with the throw controls; the board follows as a larger overview. */
@media (max-width:800px) {
  .control-panel {order:0}
  .board-panel {order:1}
}

/* Quiet, keyboard-accessible audio mixer for the tabletop. */
.audio-controls {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(94px, 1.14fr);
  gap: 8px;
  align-items: stretch;
  margin: 0 0 14px;
}
.audio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #d2bf97;
  background: #f1e7d0;
  color: #52614b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  padding: 5px;
}
.audio-toggle[aria-pressed="true"] {
  background: #e3ecdb;
  border-color: #9fb690;
  color: #365e3d;
}
.audio-toggle:hover { filter: brightness(.97); }
.audio-toggle span { font-size: 17px; line-height: 1; }
.audio-volume {
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: #5f6958;
}
.audio-volume > span { display: flex; justify-content: space-between; gap: 5px; }
.audio-volume output { font-variant-numeric: tabular-nums; color: #395d40; }
.audio-volume input[type="range"] {
  margin: 0;
  width: 100%;
  height: 18px;
  accent-color: #577e53;
  cursor: pointer;
}
@media (max-width: 420px) {
  .audio-controls { grid-template-columns: 1fr 1fr; }
  .audio-volume { grid-column: 1 / -1; padding: 2px 2px 0; }
}
footer small a { text-decoration: underline; text-underline-offset: 3px; }

/* Computer challenge entry: a prominent mode choice without changing the shared board. */
.yut-mode-picker {
  display:flex;align-items:center;gap:15px;margin:19px 0 0;
  border:1px solid #d9c5a4;border-radius:12px;background:#fff7e8;
  padding:12px 15px;color:#30483a;font-weight:850;font-size:13px;
}
.yut-mode-picker span {white-space:nowrap;}
.yut-mode-picker select {
  min-width:0;flex:1;min-height:45px;padding:10px 13px;
  color:#214b3a;background:#e2ecdf;border:1px solid #b0c4ad;
  border-radius:9px;font-size:14px;font-weight:750;
}
.yut-mode-hint {margin:8px 3px 0;color:#667a64;font-size:12px;line-height:1.7;}
.score-card.is-computer {border-top-color:#5e8eb4;}
.score-card.is-computer .score-line strong::before {content:'🤖 ';}
.control-panel.is-computer-turn {box-shadow:inset 0 0 0 2px #8ab3d6,0 12px 26px #0002;}
.control-panel.is-computer-turn .turn-hint {color:#365f80;font-weight:750;}
@media(max-width:480px){
  .yut-mode-picker {align-items:stretch;flex-direction:column;gap:6px;padding:10px;}
  .yut-mode-picker select {width:100%;font-size:13px;}
}

/* Individual piece tracking and deliberate, two-step movement confirmation. */
.score-piece-track{display:flex;align-items:center;gap:6px;margin-top:9px;margin-bottom:10px}
.score-piece{width:24px;height:24px;display:inline-grid;place-items:center;border-radius:50%;font-size:12px;font-weight:850;color:#eef9ee;background:var(--player-color);border:2px solid #ffffffab;box-shadow:0 2px 5px #0003}
.score-piece.is-ready{color:#a1b9ac;border-color:#8fab99;background:transparent}
.score-piece.is-done{background:#e1d4a7;border-color:#fff1ca;color:#315b42}
.score-piece.is-stacked{box-shadow:0 0 0 2px #d6b66b,0 2px 5px #0003}
.board-cell{overflow:visible}
.board-cell .cell-contents{overflow:visible;position:relative}
.occupant-group{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:2px;pointer-events:none;z-index:1;white-space:nowrap}
.occupant-disc{display:grid;place-items:center;width:clamp(19px,3.1vw,29px);height:clamp(19px,3.1vw,29px);padding:0 2px;border-radius:50%;background:radial-gradient(circle at 30% 22%,#ffffff67,transparent 55%),var(--piece-color);border:2px solid #fff7e4;color:#fff;font-size:clamp(10px,1.3vw,13px);font-weight:900;letter-spacing:-.04em;text-shadow:0 1px 2px #0008;box-shadow:0 2px 4px #0006}
.occupant-members{display:block;padding:1px 5px;border-radius:5px;border:1px solid #dfcda6;color:#282d24;background:#fffcf1;font-size:clamp(9px,1.12vw,12px);font-weight:900;line-height:1.3;letter-spacing:-.04em;box-shadow:0 2px 4px #0003}
.board-cell.is-occupied{z-index:3}
.board-cell.is-movable{z-index:4}
.board-cell.is-selected-origin{z-index:7;border-color:#214a32;box-shadow:0 0 0 5px #376a50b8,0 0 0 8px #eac780bb}
.board-cell.is-preview-target{z-index:6;border-color:#d79a22;background:#fff6ca;box-shadow:0 0 0 5px #e8ad37c0,0 0 0 9px #fff1b0b0}
.result-chip:disabled{opacity:.68;cursor:wait}
.result-chip.is-selected{outline:2px solid #6e9664;outline-offset:1px}
.piece-option{position:relative;min-height:77px;transition:border-color .14s,background .14s,box-shadow .14s}
.piece-option.is-chosen{border:2px solid #30714e;background:#e6f4df;box-shadow:0 0 0 2px #c6e2b5}
.piece-option.is-chosen .piece-marker{box-shadow:0 0 0 3px #b9dba6}
.piece-stack-label{display:inline-block;margin-top:3px;padding:1px 4px;border-radius:4px;color:#654719!important;background:#f5dba4;font-size:10px!important;font-weight:800;white-space:normal!important;overflow:visible!important}
.piece-dest{display:flex;flex-direction:column;gap:3px;flex-shrink:0;color:#315f42;font-size:11px;text-align:right}
.piece-dest b{font-size:13px}
.piece-dest>span{white-space:normal}
.piece-choice-check{position:absolute;right:-5px;top:-7px;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:#28754c;color:white;border:2px solid #fff;font-size:11px}
.move-preview{margin-top:13px;padding:13px;border:1px solid #d5c9ae;border-radius:12px;background:#f2ecd9}
.move-preview.has-choice{background:#e7f0dc;border-color:#81ad76;box-shadow:inset 4px 0 #447f51}
.move-preview-kicker{display:block;color:#717967;font-size:11px;font-weight:750}
.move-preview-summary strong{display:block;color:#24492e;font-size:17px;line-height:1.5;margin-top:3px}
.move-preview-summary p{font-size:12px;line-height:1.5;color:#52684e;margin:4px 0 12px;overflow-wrap:anywhere}
.confirm-move{width:100%;min-height:47px;font-weight:850}
.confirm-move:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:800px){.occupant-disc{width:clamp(20px,4vw,29px);height:clamp(20px,4vw,29px)}.occupant-members{font-size:11px}}
@media(max-width:480px){.occupant-disc{width:20px;height:20px;font-size:10px;border-width:1.5px}.occupant-members{font-size:9px;padding:1px 3px}.score-piece{width:20px;height:20px;font-size:11px}.score-piece-track{gap:5px}.piece-option{min-height:76px}.piece-dest{font-size:10px}}
@media(prefers-reduced-motion:reduce){.piece-option{transition:none}}


/* Direct board control: green = selectable own stack; gold = click to move. */
.board-cell.is-board-action { cursor: pointer; touch-action: manipulation; }
.board-cell.is-board-action:hover {
  transform: translate(-50%,-50%) scale(1.14);
  filter: brightness(1.07);
}
.board-cell.is-board-action:focus-visible { outline: 3px solid #236f4e; outline-offset: 7px; }
.board-cell.is-preview-target {
  cursor: pointer;
  border-color: #a76c17;
  background: radial-gradient(circle at 38% 25%,#fff9db,#f5d180 78%,#c79536);
  box-shadow: 0 0 0 4px #e8ad37d9,0 0 0 8px #fff1b0b0,0 5px 13px #62421d66;
}
.board-cell.is-preview-target:hover {
  transform: translate(-50%,-50%) scale(1.2);
  box-shadow: 0 0 0 5px #e8ad37e8,0 0 0 10px #fff1b0b0,0 6px 15px #62421d66;
}
.board-cell.is-selected-origin:not(.is-preview-target) { cursor:pointer; }
@media (hover:none) { .board-cell.is-board-action:hover { filter:none; } }
@media (prefers-reduced-motion:reduce) { .board-cell.is-board-action {transition:none;} }


/* Built-in starting bench: all four own pieces can be chosen from the board. */
.board-ready {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  position:relative;
  width:100%;
  margin-top:-2px;
  padding:11px 14px;
  border-radius:0 0 13px 13px;
  border:2px solid #b48d50;
  border-top:3px solid #b48d50;
  background:linear-gradient(155deg,#f9ecd2,#ddc69b);
  box-shadow:inset 0 1px #fff6e0,0 4px 0 #836037,0 9px 18px #6b4d2766;
  color:#4b3521;
  text-align:center;
}
.board-ready-heading {
  display:flex;
  align-items:flex-start;
  flex-direction:column;
  flex:0 1 auto;
  min-width:0;
  gap:1px;
  padding:0 2px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.board-ready-heading small {
  min-width:0;
  font-size:10px;
  font-weight:750;
  color:#765b37;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.board-ready-pieces {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
  flex-wrap:wrap;
  gap:6px;
}
.board-ready-piece {
  display:grid;
  place-items:center;
  width:clamp(28px,5.5vw,37px);
  height:clamp(28px,5.5vw,37px);
  padding:2px;
  border-radius:50%;
  border:2px solid #fff3d5;
  background:radial-gradient(circle at 30% 24%,#ffffff63,transparent 50%),var(--ready-color);
  color:#fff;
  box-shadow:inset 0 -3px 0 #101f1e38,0 3px 4px #49371b88;
  font-weight:900;
  font-size:15px;
  line-height:1;
  text-shadow:0 1px 2px #1c24218a;
  touch-action:manipulation;
  transition:transform .13s,box-shadow .13s;
}
.board-ready-piece:not(:disabled):hover { transform:translateY(-3px);box-shadow:0 4px 0 #805829,0 6px 9px #49371b99; }
.board-ready-piece.is-chosen {
  border-color:#fff9dc;
  outline:3px solid #32844d;
  outline-offset:2px;
  box-shadow:0 0 0 5px #d7efaf8a,0 3px 5px #49371b8a;
}
.board-ready-piece:focus-visible {outline:3px solid #2c754d;outline-offset:3px;}
.board-ready-piece:disabled {opacity:.48;cursor:not-allowed;filter:grayscale(.45);}
@media (max-width:480px) {
  .board-ready {width:100%;padding:8px 9px;border-radius:0 0 10px 10px;gap:7px;border-width:1.5px;}
  .board-ready-heading {font-size:10px;gap:2px;}
  .board-ready-heading small {font-size:9px;}
  .board-ready-pieces {gap:5px;}
  .board-ready-piece {width:clamp(26px,8vw,34px);height:clamp(26px,8vw,34px);font-size:12px;}
}
@media (prefers-reduced-motion:reduce){.board-ready-piece{transition:none;}}


/* Readable Yut rules on the parchment background in light mode only. */
html[data-theme="light"] body.standalone-hub-page-yut .rules-top {
  border-bottom-color:#c1cebd;
}
html[data-theme="light"] body.standalone-hub-page-yut .rules-top h2,
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid h3 {
  color:#284736;
}
html[data-theme="light"] body.standalone-hub-page-yut .rules-top p,
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid p {
  color:#4b6557;
}
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid b {
  color:#73542e;
}

/* Light-mode Yut room: sunlit wooden maru, woven mat and hanji.
   Deliberately scoped: shared theme toggles, game rules and dark mode stay intact. */
html[data-theme="light"] body.standalone-hub-page-yut {
  --yut-light-ink: #342f22;
  --yut-light-subtle: #675940;
  --yut-light-edge: #bba076;
  color: var(--yut-light-ink);
  background-color: #ead8b6 !important;
  background-image:
    radial-gradient(ellipse at 28% 3%, rgba(255,252,234,.88), transparent 59%),
    linear-gradient(90deg, rgba(123,86,51,.055) 0 1px, transparent 1px 33%,
      rgba(123,86,51,.055) calc(33% + 1px) calc(33% + 2px), transparent calc(33% + 2px) 66%,
      rgba(123,86,51,.055) calc(66% + 1px) calc(66% + 2px), transparent calc(66% + 2px)),
    repeating-linear-gradient(0deg, rgba(102,72,37,.075) 0 1px, transparent 1px 110px,
      rgba(255,255,255,.16) 111px 113px),
    linear-gradient(110deg,#e5d0aa 0%,#f5e9d1 49%,#dfc7a0 100%) !important;
  background-size: auto, 100% 100%, auto, auto;
}
html[data-theme="light"] body.standalone-hub-page-yut .intro {
  position: relative;
  padding: 36px 26px 31px;
  margin: 22px 0 20px;
  border: 1px solid #c3a879;
  border-left: 6px solid #42634a;
  border-radius: 4px 18px 18px 4px;
  background:
    repeating-linear-gradient(115deg, transparent 0 15px, rgba(116,79,45,.018) 16px 17px),
    linear-gradient(110deg,rgba(255,250,234,.97),rgba(246,232,202,.92));
  box-shadow: 0 8px 22px #553c1e1b, inset 0 1px #ffffffcc;
}
html[data-theme="light"] body.standalone-hub-page-yut .intro .eyebrow {
  color: #71532d;
  font-weight: 750;
}
html[data-theme="light"] body.standalone-hub-page-yut .intro h1 { color: #2d4934; }
html[data-theme="light"] body.standalone-hub-page-yut .intro-description { color: #554d39; }
html[data-theme="light"] body.standalone-hub-page-yut .intro-sticks i {
  box-shadow: inset -5px -6px 0 #a77c45, 4px 8px 1px #64482749;
}
html[data-theme="light"] body.standalone-hub-page-yut .setup {
  position: relative;
  color: #373629;
  border: 7px solid #bca27b;
  border-radius: 15px;
  background:
    repeating-linear-gradient(0deg,rgba(147,112,73,.029) 0 1px, transparent 1px 6px),
    linear-gradient(135deg,#fff9e9,#f3e7cc);
  box-shadow: 0 6px 0 #927047, 0 16px 28px #6a472630, inset 0 0 0 1px #ead7b6;
}
html[data-theme="light"] body.standalone-hub-page-yut .setup h2,
html[data-theme="light"] body.standalone-hub-page-yut .rules h2 { color: #2e4835; }
html[data-theme="light"] body.standalone-hub-page-yut .setup-heading p,
html[data-theme="light"] body.standalone-hub-page-yut .yut-mode-hint { color: #675d4a; }
html[data-theme="light"] body.standalone-hub-page-yut .setup .player-count-label,
html[data-theme="light"] body.standalone-hub-page-yut .setup .yut-mode-picker { color: #433d2c; }
html[data-theme="light"] body.standalone-hub-page-yut .setup select {
  color: #303d30;
  background-color: #fffaf0;
  border-color: #bda47b;
}
html[data-theme="light"] body.standalone-hub-page-yut .setup .name-field {
  border-color: #cdb58a;
  background: #fff9eb;
  box-shadow: inset 0 1px #fff, 0 2px 4px #70512f0d;
}
html[data-theme="light"] body.standalone-hub-page-yut .setup .name-field:focus-within {
  border-color: #426f51;
  background: #fffdf4;
  box-shadow: 0 0 0 2px #517c5333;
}
html[data-theme="light"] body.standalone-hub-page-yut .setup .name-field>span { color: #54432d; }
html[data-theme="light"] body.standalone-hub-page-yut .setup .name-field input { color: #263a2a; }
html[data-theme="light"] body.standalone-hub-page-yut .setup .name-field input::placeholder { color: #756a59; }

/* The wood board and dark throwing felt are the centrepiece in BOTH themes. */
html[data-theme="light"] body.standalone-hub-page-yut .board-panel {
  border: 2px solid #805b30;
  background: linear-gradient(118deg,#d7b583,#aa7d49 54%,#c69a62);
  box-shadow: 0 6px 0 #73502d,0 18px 35px #5e3c2340,inset 0 1px #f8dda7;
}
html[data-theme="light"] body.standalone-hub-page-yut .board-head {
  background: #f4e4c2;
  color: #40341f;
}
html[data-theme="light"] body.standalone-hub-page-yut .board-foot {
  color: #3d2f1c;
  background: #d6b27b;
}
html[data-theme="light"] body.standalone-hub-page-yut .control-panel {
  border: 2px solid #c6aa7c;
  color: #2e3b2c;
  background:
    repeating-linear-gradient(0deg,transparent 0 13px,#ab8d5d0a 14px 15px),
    linear-gradient(160deg,#fffaf0,#f4e7ca);
  box-shadow: 0 6px 0 #a78a61,0 14px 26px #6f492727;
}
html[data-theme="light"] body.standalone-hub-page-yut .control-panel .turn-hint,
html[data-theme="light"] body.standalone-hub-page-yut .control-panel .block-title small,
html[data-theme="light"] body.standalone-hub-page-yut .control-panel .piece-copy>span { color: #615c4b; }
html[data-theme="light"] body.standalone-hub-page-yut .control-panel .pending-block,
html[data-theme="light"] body.standalone-hub-page-yut .control-panel .piece-block {
  border-top-color: #cdbb9a;
}
html[data-theme="light"] body.standalone-hub-page-yut .score-card {
  border-color: #41664e;
  border-left-color: var(--player-color);
  background: #294c3c;
}
html[data-theme="light"] body.standalone-hub-page-yut .score-card.is-active {
  background: #35644b;
  border-color: #a6b68f;
  border-left-color: var(--player-color);
}
html[data-theme="light"] body.standalone-hub-page-yut .score-card p { color: #e3ebd7; }
html[data-theme="light"] body.standalone-hub-page-yut .score-line strong { color: #fff6df; }
html[data-theme="light"] body.standalone-hub-page-yut .throw-stage {
  border-color: #aa7b43;
  box-shadow: inset 0 0 0 1px #e7cb93,inset 0 5px 18px #102b2870,0 4px 0 #78532f;
}
html[data-theme="light"] body.standalone-hub-page-yut .rules {
  padding: 29px 27px 34px;
  margin: 46px 0 26px;
  border: 1px solid #cbb089;
  border-top: 5px solid #8d6e44;
  border-radius: 4px 4px 15px 15px;
  background: linear-gradient(155deg,#fff8e8ed,#f4e7cae8);
  box-shadow: 0 9px 20px #65442317;
}
html[data-theme="light"] body.standalone-hub-page-yut .rules-top { border-bottom-color: #cbb58d; }
html[data-theme="light"] body.standalone-hub-page-yut .rules-top h2,
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid h3 { color: #314735; }
html[data-theme="light"] body.standalone-hub-page-yut .rules-top p,
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid p { color: #534d3d; }
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid article {
  border-top: 2px solid #c8ae80;
  padding-top: 12px;
}
html[data-theme="light"] body.standalone-hub-page-yut .rules-grid b { color: #806038; }
html[data-theme="light"] body.standalone-hub-page-yut footer {
  border-top-color: #bca784;
  color: #4d4939;
}
html[data-theme="light"] body.standalone-hub-page-yut footer small { color: #625a49; }
@media (max-width:800px) {
  html[data-theme="light"] body.standalone-hub-page-yut .intro { margin: 13px 0; padding: 24px 18px; }
  html[data-theme="light"] body.standalone-hub-page-yut .rules { margin: 27px 0 20px; padding: 22px 18px; }
}
@media (max-width:480px) {
  html[data-theme="light"] body.standalone-hub-page-yut .intro { padding: 20px 14px; border-left-width: 4px; }
  html[data-theme="light"] body.standalone-hub-page-yut .setup { border-width:4px; }
  html[data-theme="light"] body.standalone-hub-page-yut .rules { padding:17px 14px; }
  html[data-theme="light"] body.standalone-hub-page-yut .rules-grid { gap:18px 14px; }
}

/* Nighttime Yut room — warm lamplight on a traditional wooden maru.
   Keep the actual Yut board and 3D throw mechanics unchanged. */
html[data-theme="dark"] body.standalone-hub-page-yut {
  --yut-night-ink: #f2e8d3;
  --yut-night-subtle: #d1c7b0;
  --yut-night-line: #716047;
  --yut-night-gold: #e9c387;
  color: var(--yut-night-ink);
  background-color: #171c19;
  background-image:
    radial-gradient(ellipse at 24% 2%, #8b67432e 0%, transparent 58%),
    radial-gradient(ellipse at 92% 38%, #4d684120 0%, transparent 48%),
    repeating-linear-gradient(0deg, transparent 0 112px, #090f0d65 113px 115px,
      #cfb1840b 116px 117px, transparent 118px 228px),
    repeating-linear-gradient(100deg, transparent 0 4px, #bf9b6510 5px 6px, transparent 7px 29px),
    linear-gradient(120deg, #292b23 0%, #18251f 55%, #312a21 100%);
  background-attachment: scroll;
}
html[data-theme="dark"] body.standalone-hub-page-yut .intro {
  position: relative;
  margin: 22px 0 20px;
  padding: 35px 26px 30px;
  border: 1px solid #6e5638;
  border-left: 6px solid #c19a60;
  border-radius: 4px 17px 17px 4px;
  background:
    repeating-linear-gradient(0deg, transparent 0 10px, #d9bc7c07 11px 12px),
    linear-gradient(115deg, #343329f5, #1e3029ec);
  box-shadow: 0 15px 29px #0c120d50, inset 0 1px #c9ab7030;
}
html[data-theme="dark"] body.standalone-hub-page-yut .intro h1 { color: #fff0cb; }
html[data-theme="dark"] body.standalone-hub-page-yut .intro .eyebrow {
  color: #e4c690;
  font-weight: 750;
}
html[data-theme="dark"] body.standalone-hub-page-yut .intro .intro-description {
  color: #e3dbc8;
}
html[data-theme="dark"] body.standalone-hub-page-yut .intro-sticks i {
  box-shadow: inset -5px -6px 0 #936d3e, 6px 8px 3px #0a100da3;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup.setup {
  position: relative;
  color: #f0e9da;
  border: 6px solid #7a5e3e;
  border-radius: 15px;
  background:
    repeating-linear-gradient(115deg, transparent 0 9px, #c79e632b 10px 11px, transparent 12px 21px),
    linear-gradient(145deg, #33372c, #26332c 75%, #3c3428);
  box-shadow: 0 6px 0 #3b2b1d, 0 20px 32px #03090780, inset 0 0 0 1px #d0ad764a;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup h2 { color: #ffe8b8; }
html[data-theme="dark"] body.standalone-hub-page-yut .setup-heading p,
html[data-theme="dark"] body.standalone-hub-page-yut .setup .yut-mode-hint { color: #ded6c2; }
html[data-theme="dark"] body.standalone-hub-page-yut .setup .player-count-label,
html[data-theme="dark"] body.standalone-hub-page-yut .setup .name-field>span {
  color: #efe1c9;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup select {
  color-scheme: dark;
  background: #29372f;
  color: #f7ead4;
  border: 1px solid #8b7b5a;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup .yut-mode-picker {
  color: #e9d8b5;
  background: #202c26;
  border-color: #6f6850;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup .yut-mode-picker select {
  background: #33463b;
  border-color: #7c8c6d;
  color: #fff4dd;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup .name-field {
  border: 1px solid #82775d;
  border-radius: 12px;
  background: #29352c;
  padding: 9px 10px;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup .name-field:focus-within {
  border-color: #e6c48a;
  box-shadow: 0 0 0 2px #f0d19a45;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup .name-field input {
  background: transparent;
  color: #fff7e9;
  border: 1px solid transparent;
  color-scheme: dark;
}
html[data-theme="dark"] body.standalone-hub-page-yut .setup .name-field input::placeholder {
  color: #bdb9a5;
  opacity: 1;
}
html[data-theme="dark"] body.standalone-hub-page-yut .score-card {
  background: #24372d;
  border-color: #52664f;
  border-left-color: var(--player-color);
  box-shadow: inset 0 1px #ffffff18, 0 3px 6px #060b0961;
}
html[data-theme="dark"] body.standalone-hub-page-yut .score-card.is-active {
  background: #355442;
  border-color: #bea477;
  border-left-color: var(--player-color);
  box-shadow: 0 0 0 1px #e4c18c58, inset 0 1px #e7c69024;
}
html[data-theme="dark"] body.standalone-hub-page-yut .score-card p { color: #dee7d5; }
html[data-theme="dark"] body.standalone-hub-page-yut .score-card .score-line strong {
  color: #fff3d7;
}
html[data-theme="dark"] body.standalone-hub-page-yut .score-card .score-line em {
  color: #f3d798;
}
/* Treat the original pale board as a lantern-lit tabletop, not a dark inverted SVG. */
html[data-theme="dark"] body.standalone-hub-page-yut .board-panel {
  border: 2px solid #674728;
  background: linear-gradient(130deg, #9e7244, #684725 52%, #956c3b);
  box-shadow: 0 6px 0 #382718, 0 20px 38px #0308068c, inset 0 1px #dfbb805e;
}
html[data-theme="dark"] body.standalone-hub-page-yut .board-head {
  color: #49371f;
  background: #eddaaf;
}
html[data-theme="dark"] body.standalone-hub-page-yut .board-head span:last-child { color: #735c37; }
html[data-theme="dark"] body.standalone-hub-page-yut .board-foot {
  color: #3d2e1b;
  background: #b9925f;
}
html[data-theme="dark"] body.standalone-hub-page-yut .board-ready {
  border-color: #82603c;
  background: linear-gradient(155deg,#e7d0a5,#b99361);
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel.control-panel {
  color: #f0e4cf;
  border: 2px solid #816846;
  background:
    repeating-linear-gradient(0deg, transparent 0 13px, #bd9a640a 14px 15px),
    linear-gradient(150deg, #30392f, #202e29 68%, #2c3028);
  box-shadow: 0 6px 0 #3b2a1b, 0 16px 34px #0308067d, inset 0 1px #d0b38130;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel :is(
  .turn-top,.section-caption,.turn-hint,#turn-number,#result-guidance,.empty-text,
  .block-title small,.piece-copy>span
) { color: #d5cab2; }
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel #turn-name {
  color: #f3d19b;
  text-shadow: 0 1px 2px #121a14a6;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel h3 { color: #f9e8c7; }
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .pending-block,
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-block {
  border-top-color: #786d51;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .audio-toggle {
  background: #394639;
  color: #e5dcc5;
  border-color: #7b7a60;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .audio-toggle[aria-pressed="true"] {
  background: #465b42;
  color: #fff0ca;
  border-color: #b5a579;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .audio-volume {
  color: #e7d9bd;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .audio-volume output {
  color: #f3d29b;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .result-chip {
  color: #372e20;
  background: #eedbb6;
  border-color: #b89a6e;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .result-chip small {
  color: #56543b;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .result-chip.is-selected {
  color: #192d24;
  background: #d9e9b8;
  border-color: #89aa75;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-option {
  color: #f3ebd7;
  background: #354136;
  border-color: #747a5e;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-option:hover:not(:disabled) {
  background: #475a45;
  border-color: #d6b984;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-option:disabled {
  color: #c6cbb9;
  background: #2d3a31;
  border-color: #555e4d;
  opacity: .76;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-option.is-chosen {
  color: #fff5dc;
  border-color: #e0c58f;
  background: #496a50;
  box-shadow: 0 0 0 2px #e4cb9a75;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-copy strong {
  color: #f5eacf;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-copy strong small,
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-copy>span {
  color: #d2d3ba;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .piece-dest {
  color: #cbe2ba;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .move-preview {
  color: #f3e7d1;
  background: #293a30;
  border-color: #7e7d5d;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .move-preview.has-choice {
  background: #354e38;
  border-color: #b8c38c;
  box-shadow: inset 4px 0 #e3cb91;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .move-preview-kicker,
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .move-preview-summary p {
  color: #d7d2bd;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .move-preview-summary strong {
  color: #ffebb9;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .game-message {
  color: #e7e6ca;
  background: #2c4535;
  border-left-color: #bfad7b;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .button.subtle {
  color: #f4dfb7;
  background: #374437;
  border-color: #8f7d59;
}
html[data-theme="dark"] body.standalone-hub-page-yut .control-panel .button.subtle:hover {
  background: #445643;
}
html[data-theme="dark"] body.standalone-hub-page-yut .win-panel {
  color: #ffe7b4;
  background: linear-gradient(130deg,#4c3925,#2f382d);
  border-color: #c7a46c;
}
html[data-theme="dark"] body.standalone-hub-page-yut .win-panel p { color: #e5d9bd; }
html[data-theme="dark"] body.standalone-hub-page-yut .rules {
  margin: 46px 0 26px;
  padding: 29px 27px 34px;
  color: #f1e6ce;
  border: 1px solid #705b3e;
  border-top: 5px solid #b18e58;
  border-radius: 4px 4px 15px 15px;
  background:
    repeating-linear-gradient(115deg, transparent 0 15px,#b59b6810 16px 17px),
    linear-gradient(155deg, #33362c, #27332b 70%, #303128);
  box-shadow: 0 12px 25px #03090763;
}
html[data-theme="dark"] body.standalone-hub-page-yut .rules-top {
  border-bottom-color: #786547;
}
html[data-theme="dark"] body.standalone-hub-page-yut .rules-top h2,
html[data-theme="dark"] body.standalone-hub-page-yut .rules-grid h3 { color: #ffe8b9; }
html[data-theme="dark"] body.standalone-hub-page-yut .rules-top p,
html[data-theme="dark"] body.standalone-hub-page-yut .rules-grid p { color: #dbd3bc; }
html[data-theme="dark"] body.standalone-hub-page-yut .rules-grid b { color: #dfb974; }
html[data-theme="dark"] body.standalone-hub-page-yut .rules-grid article {
  border-top: 2px solid #8d754f;
  padding-top: 12px;
}
html[data-theme="dark"] body.standalone-hub-page-yut footer {
  border-top-color: #806a4a;
  color: #e0d6bf;
}
html[data-theme="dark"] body.standalone-hub-page-yut footer small { color: #bfb39d; }
@media(max-width:800px) {
  html[data-theme="dark"] body.standalone-hub-page-yut .intro { margin:13px 0; padding:24px 18px; }
  html[data-theme="dark"] body.standalone-hub-page-yut .rules { margin:27px 0 20px; padding:22px 18px; }
}
@media(max-width:480px) {
  html[data-theme="dark"] body.standalone-hub-page-yut .intro { padding:20px 14px; border-left-width:4px; }
  html[data-theme="dark"] body.standalone-hub-page-yut .setup { border-width:4px; }
  html[data-theme="dark"] body.standalone-hub-page-yut .rules { padding:17px 14px; }
  html[data-theme="dark"] body.standalone-hub-page-yut .rules-grid { gap:18px 14px; }
}

/* Yut party name presets & shuffle bar */
.yut-name-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 -8px;
}
.yut-preset-btn {
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid #c5b18c;
  background: #fff9eb;
  color: #364d3e;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.14s ease, background 0.15s ease;
}
.yut-preset-btn:hover {
  background: #f0e3c6;
  transform: translateY(-1px);
}
html[data-theme="dark"] body.standalone-hub-page-yut .yut-preset-btn {
  background: #2b382f;
  border-color: #7d6e52;
  color: #f3e4c6;
}
html[data-theme="dark"] body.standalone-hub-page-yut .yut-preset-btn:hover {
  background: #3a4b3e;
  border-color: #d6b67c;
}


/* The highlighted board square is the route choice and the move action. */
.board-cell .cell-contents{overflow:visible;position:relative}
.board-destination-label,.board-route-label{
  position:absolute;left:50%;z-index:3;transform:translateX(-50%);
  display:block;padding:2px 5px;border-radius:6px;white-space:nowrap;
  pointer-events:none;font-size:clamp(8px,1vw,11px);font-weight:900;line-height:1.15;
  box-shadow:0 2px 4px #4a321a55;
}
.board-destination-label{top:calc(50% + 15px);background:#fff5d6;color:#573d1c}
.board-route-label{top:-17px;background:#3c704b;color:#fff}
.board-cell.is-preview-target .board-destination-label{background:#fff8df;color:#553713}
.board-cell.is-preview-target .board-route-label{background:#285d3d;color:#fff}
@media(max-width:480px){
  .board-destination-label,.board-route-label{padding:1px 3px;font-size:8px}
  .board-destination-label{top:calc(50% + 12px)}
  .board-route-label{top:-14px}
}
