/* Full table: a four-sided felt layout, with the public river on the felt. */
.fp-page{max-width:1180px}
.fp-page .pg-eyebrow{margin-top:18px}
.fp-setup{background:#fffdf4;border:1px solid #dddcc9;border-radius:16px;padding:24px;margin:26px 0}
.fp-setup h2{margin:0 0 16px;color:#315235}
.fp-setup-actions,.fp-actions,.fp-top-actions{display:flex;gap:10px;flex-wrap:wrap}
.fp-setup-actions{margin-top:20px}
.fp-toggle,.fp-top-actions button{border:1px solid #c9d7ba;background:#f2f5e8;color:#315235;border-radius:10px;padding:10px 14px;font-weight:750;cursor:pointer}
.fp-toggle[aria-pressed=true],.fp-toggle[aria-expanded=true]{background:#e1ecd5;border-color:#779e70}
.fp-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.fp-top h1{font-size:clamp(25px,3vw,38px);margin:6px 0 0}
.fp-top-actions{margin-top:17px}
.fp-table-frame{margin:18px 0 14px;border:10px solid #745333;border-radius:24px;background:#745333;box-shadow:0 14px 26px #233c2b38, inset 0 0 0 2px #b98d56;overflow:hidden}
.fp-table{position:relative;min-height:535px;border:3px solid #d6b477;border-radius:14px 14px 0 0;background:radial-gradient(circle at 50% 43%,#47865c 0,#327249 53%,#205c3d 100%);box-shadow:inset 0 0 38px #113a2d8a;color:#fff9dc}
.fp-table:after{content:'MAHJONG STEPS';position:absolute;left:50%;bottom:8px;transform:translateX(-50%);font-size:9px;letter-spacing:.18em;color:#deebd0a8;pointer-events:none}
.fp-opponent{position:absolute;z-index:2;display:flex;flex-direction:column;gap:6px;padding:9px 12px;border:1px solid #d3d9af99;border-radius:12px;background:#174d3bc9;box-shadow:0 4px 12px #0c3d3057;color:#f7f1cf}
.fp-opponent.inactive{opacity:.58}
.fp-opponent-top{top:12px;left:50%;width:40%;min-height:79px;transform:translateX(-50%)}
.fp-opponent-left{top:23%;bottom:16%;left:10px;width:138px}
.fp-opponent-right{top:23%;bottom:16%;right:10px;width:138px}
.fp-opponent-label{display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex-wrap:wrap}
.fp-opponent-label b{font-size:12px}
.fp-opponent-label span{font-size:10px;opacity:.86}
.fp-backs{display:flex;gap:3px;flex-wrap:wrap;overflow:hidden;max-height:74px}
.fp-backs i,.fp-wall-backs i{display:block;flex:none;width:18px;height:27px;border:2px solid #ecdfbd;border-radius:3px;background:repeating-linear-gradient(45deg,#498b71 0 3px,#2e6655 3px 6px);box-shadow:0 2px 0 #143f32}
.fp-meld-set{display:inline-flex;align-items:center;gap:1px;padding:2px;border-radius:5px;background:#f1e9d2d9;white-space:nowrap}
.fp-meld-set small{font-size:8px;font-weight:800;color:#36533c;padding:0 3px}
.fp-meld-set .tile{width:25px;height:35px;flex:none}
.fp-meld-set.fresh{box-shadow:0 0 0 2px #f8d87a}
.fp-play-area{position:absolute;inset:105px 155px 28px}
.fp-river{position:absolute;display:flex;flex-direction:column;overflow:hidden;border:1px solid #d9e3c064;border-radius:9px;background:#104d3b4f;box-shadow:inset 0 1px 5px #113f3155}
.fp-river-top{left:24%;top:0;width:52%;height:26%}
.fp-river-left{left:0;top:27%;width:31%;height:47%}
.fp-river-right{right:0;top:27%;width:31%;height:47%}
.fp-river-bottom{left:24%;bottom:0;width:52%;height:25%}
.fp-river-label{flex:none;padding:3px 6px 2px;font-size:10px;font-weight:800;color:#e5f3d8;background:#0d4436b2;display:flex;justify-content:space-between}
.fp-river-label small{font-size:10px;font-weight:700}
.fp-zone-melds{flex:none;display:flex;align-items:center;gap:3px;max-height:50%;overflow:auto;padding:3px 4px;border-bottom:1px solid #d9e3c064;scrollbar-width:thin}
.fp-zone-melds>span:first-child{font-size:9px;color:#e5f3d8;white-space:nowrap}
.fp-river-tiles{flex:1;min-height:0;display:flex;flex-wrap:wrap;align-content:flex-start;gap:2px;overflow:auto;padding:4px;scrollbar-width:thin;scrollbar-color:#9ebc9b transparent}
.fp-flower-zone{flex:none;display:flex;align-items:center;gap:2px;flex-wrap:wrap;padding:2px 4px;border-bottom:1px solid #d9e3c064;color:#f7ebc0;font-size:9px}
.fp-flower-zone>span:first-child{margin-right:3px;white-space:nowrap}
.fp-flower-zone .tile{width:23px;height:32px}
.fp-river-tile{display:inline-flex;flex:none;border-radius:4px;padding:1px}
.fp-river-tile .tile{width:32px;height:44px;flex:none}
.fp-river-tile.current{background:#ffe8a4;box-shadow:0 0 0 2px #ffe5a0,0 0 14px #ffe8a4;transform:translateY(-2px)}
.fp-river-top .fp-river-tile.landed{--flight-x:0px;--flight-y:65px}
.fp-river-left .fp-river-tile.landed{--flight-x:65px;--flight-y:0px}
.fp-river-right .fp-river-tile.landed{--flight-x:-65px;--flight-y:0px}
.fp-river-bottom .fp-river-tile.landed{--flight-x:0px;--flight-y:-65px}
.fp-river-tile.landed{animation:fp-discard-land .22s cubic-bezier(.16,.84,.28,1) both}
.fp-river-empty{font-size:17px;color:#daead387;padding-left:7px}
.fp-table-center{position:absolute;left:32%;top:27%;width:36%;height:47%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center}
.fp-wall-mark{display:flex;flex-direction:column;align-items:center;gap:3px;color:#f6edca}
.fp-wall-mark b{font-size:23px;line-height:1}
.fp-wall-mark small{font-size:10px}
.fp-wall-backs{display:flex;gap:2px}
.fp-wall-backs i{width:18px;height:25px}
.fp-table-last{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;color:#f4edcb}
.fp-table-last .tile{width:58px;height:80px}
.fp-table-last.active{padding:6px 8px;border:2px solid #ffd184;border-radius:10px;background:#fff4cb21;box-shadow:0 0 19px #ffd184b8}
.fp-table-last.draw-event{padding:5px;border-radius:9px;background:#e8f6dc24;box-shadow:0 0 0 1px #d4e8b9aa}
.fp-table-last b{font-size:11px;color:#fff4c9}
.fp-table-last.moving{animation:fp-event-appear .22s ease-out both}
.fp-decision-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;background:#f4ecd5;border-top:4px solid #ad8450;color:#2d4a30}
.fp-decision-bar.is-claim{background:#fff1c4;border-top-color:#dda63f}
.fp-decision-lead{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:800;line-height:1.35}
.fp-decision-lead .tile{width:42px;height:57px;flex:none}
.fp-decision-bar .fp-actions{justify-content:flex-end}
.fp-decision-bar .btn{min-height:44px;padding:9px 15px;border-radius:9px;white-space:normal}
.fp-decision-bar .fp-call,.fp-decision-bar .fp-win-button{background:#2f673f;color:#fff8de}
.fp-decision-bar .fp-continue{background:#fffaf0;border:2px solid #9a7e53;color:#604b2b}
.fp-own-seat{padding:12px 17px 14px;background:linear-gradient(#275d42,#174b37);border-top:5px solid #bd9157;color:#fff6d6}
.fp-own-label{display:flex;align-items:baseline;gap:14px;margin-bottom:3px}
.fp-own-label b{font-size:14px}
.fp-own-label span{font-size:11px;color:#e2e8ce}
.fp-rack{display:flex;gap:3px;overflow-x:auto;padding:9px 0 3px;scrollbar-width:thin;scrollbar-color:#b8c99d transparent}
.fp-draw-slot{display:inline-flex;flex:none;margin-left:12px;padding-left:11px;border-left:2px solid #d6bf82a8}
.fp-tile{position:relative;flex:none;background:none;border:2px solid transparent;padding:1px;border-radius:7px;cursor:pointer;line-height:0}
.fp-tile.selected{border-color:#f5ca66;background:#fff0b633;transform:translateY(-6px);box-shadow:0 3px 0 #f5ca66}
.fp-tile.new-draw{border-color:#a9df9c;background:#edffe326;box-shadow:0 0 0 2px #b6eba3a8}
.fp-tile.new-draw.moving{animation:fp-draw-into-hand .24s cubic-bezier(.16,.84,.28,1) both}
.fp-new-label{position:absolute;left:50%;top:-9px;transform:translateX(-50%);z-index:1;border-radius:999px;background:#d4f4c6;color:#184d32;font-size:9px;font-weight:900;line-height:1;padding:3px 5px;white-space:nowrap}
.fp-tile:disabled{opacity:.58;cursor:not-allowed}
.fp-tile .tile{width:50px;height:70px}
.fp-meld-set.moving{animation:fp-meld-reveal .26s ease-out both}
@keyframes fp-event-appear{from{opacity:0;transform:translateY(-22px) scale(.84)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes fp-draw-into-hand{from{opacity:0;transform:translateY(-66px) scale(.82)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes fp-discard-land{from{opacity:.1;transform:translate(var(--flight-x),var(--flight-y)) scale(1.35)}to{opacity:1;transform:translateY(-2px) scale(1)}}
@keyframes fp-meld-reveal{from{opacity:.2;transform:scale(.75)}to{opacity:1;transform:scale(1)}}
.fp-guidance{background:#f6f8ed;border:1px solid #d7dfc8;border-radius:14px;padding:17px;margin:16px 0;color:#3f5941}
.fp-guidance p{line-height:1.6;margin:12px 0 0}
.fp-advice{border-top:1px solid #d6dfcd;margin-top:13px;padding-top:12px}
.fp-advice>b{display:flex;align-items:center;gap:8px}
.fp-advice .tile{width:31px;height:43px}
.fp-advice small{display:block;margin-top:8px;line-height:1.5}
.fp-score{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.fp-score span{background:#edf2df;border-radius:8px;padding:9px;font-size:12px}
.fp-score b{color:#315b32}
.fp-history{background:#fffdf4;border:1px solid #dddcc9;border-radius:12px;padding:14px 18px;margin:16px 0;font-size:12px;color:#526b4e}
.fp-history summary{cursor:pointer;font-weight:750}
.fp-history li{margin:5px 0}
.fp-tile:focus-visible,.fp-toggle:focus-visible,.fp-top-actions button:focus-visible,.fp-decision-bar button:focus-visible{outline:3px solid #e1ae4d;outline-offset:3px}
@media(max-width:850px){
  .fp-table{min-height:490px}
  .fp-opponent-left,.fp-opponent-right{width:105px}
  .fp-play-area{inset:98px 116px 25px}
  .fp-opponent-label span{font-size:9px}
  .fp-backs i{width:15px;height:23px}
  .fp-river-tile .tile{width:26px;height:36px}
  .fp-tile .tile{width:44px;height:61px}
}
@media(max-width:600px){
  .fp-top{display:block}
  .fp-top-actions{margin-top:10px}
  .fp-table-frame{border-width:6px;border-radius:15px}
  .fp-table{min-height:465px;border-width:2px}
  .fp-opponent{padding:5px;gap:3px;border-radius:7px}
  .fp-opponent-top{width:53%;min-height:70px;top:8px}
  .fp-opponent-left,.fp-opponent-right{width:53px;top:22%;bottom:13%}
  .fp-opponent-left{left:4px}.fp-opponent-right{right:4px}
  .fp-opponent-label{display:block}
  .fp-opponent-label b{font-size:10px;display:block}
  .fp-opponent-label span{font-size:8px;display:block}
  .fp-backs{gap:2px;max-height:85px}
  .fp-backs i{width:12px;height:18px;border-width:1px}
  .fp-play-area{inset:85px 58px 24px}
  .fp-river-top,.fp-river-bottom{left:18%;width:64%;height:24%}
  .fp-river-left,.fp-river-right{width:29%;top:25%;height:49%}
  .fp-table-center{left:30%;top:27%;width:40%;height:44%}
  .fp-river-label{font-size:8px;padding:2px 4px}
  .fp-river-label small{font-size:8px}
  .fp-river-tiles{padding:2px;gap:1px}
  .fp-zone-melds{padding:1px 2px}
  .fp-zone-melds>span:first-child{display:none}
  .fp-meld-set .tile{width:16px;height:22px}
  .fp-meld-set small{font-size:7px;padding:0 1px}
  .fp-river-tile .tile{width:21px;height:29px}
  .fp-table-last .tile{width:35px;height:48px}
  .fp-table-last small{font-size:8px}
  .fp-wall-mark b{font-size:17px}
  .fp-wall-backs i{width:13px;height:19px}
  .fp-decision-bar{display:block;padding:10px}
  .fp-decision-lead{font-size:12px;margin-bottom:8px}
  .fp-decision-bar .fp-actions{justify-content:flex-start}
  .fp-decision-bar .btn{font-size:12px;padding:8px 10px;min-height:38px}
  .fp-own-seat{padding:9px}
  .fp-tile .tile{width:39px;height:55px}
}
@media(prefers-reduced-motion:reduce){.fp-table-last.moving,.fp-tile.new-draw.moving,.fp-river-tile.landed,.fp-meld-set.moving{animation:none}}
@media(max-width:390px){
  .fp-opponent-top{width:55%}
  .fp-play-area{inset:84px 53px 23px}
  .fp-river-tile .tile{width:18px;height:26px}
  .fp-table-last .tile{width:32px;height:44px}
  .fp-tile .tile{width:35px;height:49px}
}
/* The active hand is an immersive, one-screen game. Setup stays on the site page. */
body:has(.fp-game){overflow:hidden}
.fp-game{position:fixed;inset:0 0 0 232px;z-index:4;display:flex;flex-direction:column;min-width:0;height:100dvh;padding:0;background:#1c4631;color:#f9f1da;overflow:hidden;overscroll-behavior:contain}
.fp-game-head{position:relative;z-index:8;display:flex;align-items:center;gap:12px;flex:none;min-height:62px;padding:8px 14px;background:#183c2b;border-bottom:2px solid #b48a55;box-shadow:0 3px 12px #102b206b}
.fp-game-back,.fp-game-tools>button,.fp-history-menu summary,.fp-scope-menu summary{display:inline-flex;align-items:center;justify-content:center;min-height:35px;padding:6px 10px;border:1px solid #b7c5a16b;border-radius:8px;background:#edf0de12;color:#f7f1db;font-family:inherit;font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap;cursor:pointer;list-style:none}
.fp-history-menu summary::-webkit-details-marker,.fp-scope-menu summary::-webkit-details-marker{display:none}
.fp-game-back:hover,.fp-game-tools>button:hover,.fp-history-menu summary:hover,.fp-scope-menu summary:hover,.fp-game-tools>button[aria-pressed=true]{background:#5b8054;color:#fff}
.fp-game-title{display:flex;flex-direction:column;gap:2px;min-width:120px}
.fp-game-title strong{font-size:16px;line-height:1.2}
.fp-game-title small{font-size:10px;color:#d6e0c5}
.fp-game-tools{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex:1;min-width:0}
.fp-history-menu,.fp-scope-menu{position:relative;flex:none}
.fp-history-menu ol,.fp-scope-menu p{position:absolute;top:calc(100% + 9px);right:0;z-index:30;width:min(350px,80vw);max-height:45dvh;overflow:auto;margin:0;padding:14px 17px;border:1px solid #c9cfb7;border-radius:11px;background:#fffdf1;color:#2e4934;box-shadow:0 14px 30px #092a2180;font-size:12px;line-height:1.55}
.fp-history-menu li{margin:3px 0}
.fp-scope-menu p{list-style:none}
.fp-game .fp-table-frame{display:flex;flex-direction:column;flex:1;min-height:0;margin:10px 12px 12px;border-width:7px;border-radius:16px}
.fp-game .fp-table{flex:1;min-height:0;border-radius:7px 7px 0 0;overflow:hidden}
.fp-game .fp-decision-bar{flex:none;min-height:56px;padding:8px 14px}
.fp-game .fp-decision-lead{font-size:13px}
.fp-game .fp-decision-lead .tile{width:31px;height:43px}
.fp-game .fp-decision-bar .btn{min-height:36px;padding:7px 11px;font-size:12px}
.fp-game .fp-own-seat{flex:none;padding:7px 12px 8px}
.fp-game .fp-own-label{margin:0 0 1px}
.fp-game .fp-rack{min-height:70px;max-height:83px;padding:8px 0 2px}
.fp-game .fp-tile .tile{width:52px;height:72px}
.fp-game .fp-table-center{z-index:2}
.fp-game .fp-guide-panel{position:absolute;z-index:25;top:69px;right:18px;width:min(390px,calc(100vw - 40px));max-height:min(65dvh,560px);overflow:auto;padding:18px 19px;border:1px solid #d1d6b8;border-radius:12px;background:#fffdf0;color:#315037;box-shadow:0 16px 36px #082a207d}
.fp-guide-panel h2{font-size:16px;margin:0 30px 7px 0}
.fp-guide-panel p{font-size:13px;line-height:1.6;margin:0 0 12px}
.fp-guide-panel small{display:block;line-height:1.5;margin-top:6px}
.fp-guide-close{position:absolute;right:8px;top:7px;width:30px;height:30px;border:0;background:transparent;color:#3a6145;font-size:23px;cursor:pointer}
.fp-game .fp-advice{border-top:1px solid #d6dfcd;margin-top:10px;padding-top:12px}
.fp-game .fp-advice>b{display:flex;align-items:center;gap:7px}
.fp-game .fp-advice .tile{width:28px;height:39px}
.fp-game-toast{position:absolute;z-index:24;top:72px;left:50%;transform:translateX(-50%);padding:10px 16px;border-radius:10px;background:#fff0d7;color:#6c452a;box-shadow:0 8px 20px #082a2059;font-size:12px}
.fp-game .pg-result{position:absolute;z-index:26;left:50%;top:50%;transform:translate(-50%,-50%);width:min(520px,calc(100% - 32px));max-height:75dvh;overflow:auto;margin:0;border:2px solid #d5b56d;box-shadow:0 18px 55px #08291fb3}
.fp-game .fp-mcr-review{width:min(640px,calc(100% - 24px));max-height:82dvh}
.fp-mcr-fans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:44dvh;overflow:auto;margin:12px 0}
.fp-mcr-auto{padding:9px 12px;border-radius:8px;background:#e8f1df;color:#2e6141;font-size:12px}
.fp-mcr-fans details{border:1px solid #d9e1d1;border-radius:8px;padding:8px;background:#f8f9ec}
.fp-mcr-fans summary{cursor:pointer;color:#315743;font-size:13px;font-weight:750}
.fp-mcr-fans details>div{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.fp-mcr-fan{border:1px solid #cad8c5;border-radius:7px;background:#fffdf4;color:#315743;padding:7px;font-size:11px;cursor:pointer}
.fp-mcr-fan.selected{border-color:#4b8a61;background:#dcefd5;box-shadow:inset 0 0 0 1px #4b8a61}
@media(max-width:600px){.fp-mcr-fans{grid-template-columns:1fr}.fp-flower-zone .tile{width:18px;height:25px}}
.fp-game-back:focus-visible,.fp-game-tools button:focus-visible,.fp-history-menu summary:focus-visible,.fp-scope-menu summary:focus-visible,.fp-guide-close:focus-visible{outline:3px solid #f3c879;outline-offset:2px}
@media(max-width:800px){
  .fp-game{inset:75px 0 0;height:calc(100dvh - 75px)}
  .fp-game-head{min-height:52px;padding:5px 8px;gap:6px}
  .fp-game-title{min-width:90px}
  .fp-game-title strong{font-size:13px}
  .fp-game-title small{font-size:8px}
  .fp-game-back,.fp-game-tools>button,.fp-history-menu summary,.fp-scope-menu summary{min-height:30px;padding:5px 7px;font-size:10px}
  .fp-game .fp-table-frame{margin:5px 5px 6px;border-width:5px}
}
@media(max-width:600px){
  .fp-game-head{flex-wrap:wrap;align-content:center;min-height:75px;padding:4px 7px;row-gap:4px}
  .fp-game-title{flex:1}
  .fp-game-tools{order:2;flex-basis:100%;justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
  .fp-game-tools::-webkit-scrollbar{display:none}
  .fp-game .fp-table{min-height:0}
  .fp-game .fp-decision-bar{min-height:58px;padding:7px}
  .fp-game .fp-decision-lead{font-size:11px;margin-bottom:4px}
  .fp-game .fp-decision-bar .btn{min-height:32px;font-size:10px;padding:5px 7px}
  .fp-game .fp-own-seat{padding:5px 7px}
  .fp-game .fp-own-label b{font-size:11px}
  .fp-game .fp-own-label span{font-size:9px}
  .fp-game .fp-rack{min-height:57px;max-height:67px;padding:6px 0 1px}
  .fp-game .fp-draw-slot{margin-left:8px;padding-left:8px}
  .fp-game .fp-tile .tile{width:36px;height:50px}
  .fp-game .fp-guide-panel{top:81px;right:8px;width:calc(100% - 16px);max-height:50dvh}
  .fp-game .fp-table-center{gap:3px}
  .fp-game .fp-table-last .tile{width:30px;height:42px}
}
@media(max-height:680px){.fp-game{overflow-y:auto}.fp-game .fp-table-frame{flex:none;height:590px}.fp-game .fp-table{min-height:365px}}
/* Side seats are compact racks; public melds wrap on felt and never require horizontal swiping. */
.fp-game .fp-opponent-left,.fp-game .fp-opponent-right{top:50%;bottom:auto;width:92px;max-height:78%;padding:8px;transform:translateY(-50%)}
.fp-game .fp-opponent-left .fp-opponent-label,.fp-game .fp-opponent-right .fp-opponent-label{display:block;text-align:center}
.fp-game .fp-opponent-left .fp-opponent-label span,.fp-game .fp-opponent-right .fp-opponent-label span{display:block;margin-top:3px}
.fp-game .fp-opponent-left .fp-backs,.fp-game .fp-opponent-right .fp-backs{display:grid;grid-template-columns:repeat(2,17px);justify-content:center;gap:3px;max-height:none}
.fp-game .fp-play-area{inset:95px 108px 24px}
.fp-game .fp-river-top,.fp-game .fp-river-bottom{left:26%;width:48%;height:27%}
.fp-game .fp-river-left,.fp-game .fp-river-right{top:15%;width:25%;height:70%;background:transparent;border:0;box-shadow:none}
.fp-game .fp-river-left .fp-river-label,.fp-game .fp-river-right .fp-river-label{border-radius:7px;background:#0d4436b2}
.fp-game .fp-table-center{left:28%;top:29%;width:44%;height:42%}
.fp-game .fp-zone-melds{flex-wrap:wrap;max-height:none;overflow:visible}
.fp-game .fp-river-left .fp-zone-melds,.fp-game .fp-river-right .fp-zone-melds{display:flex;flex-direction:column;align-items:flex-start;gap:3px;flex:none;margin:3px 0;padding:5px;border:1px solid #d9e3c056;border-radius:7px;background:#104d3b5c}
.fp-game .fp-river-left .fp-meld-set,.fp-game .fp-river-right .fp-meld-set{max-width:100%}
.fp-game .fp-river-tiles{overflow-x:hidden;overflow-y:auto}
.fp-game .fp-river-left .fp-river-tiles,.fp-game .fp-river-right .fp-river-tiles{padding:6px;gap:3px}
.fp-game .pg-result{left:auto;right:15px;top:70px;transform:none;width:min(390px,calc(100% - 30px));max-height:calc(100dvh - 90px);padding:24px;color:#263b2c}
.fp-game .pg-result h2{color:#263b2c;font-size:22px;margin-right:24px}
.fp-game .pg-result p{color:#3f5544}
.fp-game .fp-score span{color:#31513a}
.fp-result-close{position:absolute;right:12px;top:9px;border:0;background:transparent;color:#31513a;font-size:24px;cursor:pointer}
@media(max-width:850px){
  .fp-game .fp-opponent-left,.fp-game .fp-opponent-right{width:72px;padding:5px}
  .fp-game .fp-opponent-left .fp-backs,.fp-game .fp-opponent-right .fp-backs{grid-template-columns:repeat(2,14px);gap:2px}
  .fp-game .fp-play-area{inset:89px 82px 20px}
  .fp-game .fp-river-left .fp-river-tiles,.fp-game .fp-river-right .fp-river-tiles{padding:3px;gap:2px}
}
@media(max-width:600px){
  .fp-game .fp-opponent-left,.fp-game .fp-opponent-right{width:44px;padding:3px}
  .fp-game .fp-opponent-left .fp-opponent-label b,.fp-game .fp-opponent-right .fp-opponent-label b{font-size:9px}
  .fp-game .fp-opponent-left .fp-opponent-label span,.fp-game .fp-opponent-right .fp-opponent-label span{font-size:7px}
  .fp-game .fp-opponent-left .fp-backs,.fp-game .fp-opponent-right .fp-backs{grid-template-columns:repeat(2,11px);gap:2px}
  .fp-game .fp-opponent-left .fp-backs i,.fp-game .fp-opponent-right .fp-backs i{width:11px;height:16px}
  .fp-game .fp-play-area{inset:77px 49px 18px}
  .fp-game .fp-river-left .fp-zone-melds,.fp-game .fp-river-right .fp-zone-melds{padding:2px;gap:1px}
  .fp-game .fp-river-left .fp-meld-set .tile,.fp-game .fp-river-right .fp-meld-set .tile{width:14px;height:20px}
  .fp-game .fp-river-left .fp-meld-set small,.fp-game .fp-river-right .fp-meld-set small{display:none}
  .fp-game .fp-river-left .fp-river-tiles,.fp-game .fp-river-right .fp-river-tiles{padding:2px;gap:1px}
  .fp-game .pg-result{top:80px;right:7px;width:calc(100% - 14px);max-height:calc(100dvh - 165px);padding:16px}
}

/* === Phase 3 UI Upgrades: Turn highlight, badges, Tenpai bar, pool overview, winner hand, mobile 2-row hand & full rivers === */
.fp-opponent.is-turn{border-color:#ffd770;box-shadow:0 0 0 2px #ffd77088,0 6px 18px #0a2d2088;background:#1d5f47eb}
.fp-own-seat.is-turn{border-top-color:#f5cc66;box-shadow:inset 0 2px 0 #ffe39455}
.fp-wind-pill,.fp-dealer-badge,.fp-round-badge,.fp-missing-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:5px;font-size:10px;font-weight:800;line-height:1;padding:2px 5px;vertical-align:middle}
.fp-wind-pill{background:#f7ebc622;border:1px solid #e6d7a566;color:#ffefbe;margin-right:4px}
.fp-dealer-badge{background:#d44b38;color:#fff8e6;margin-right:4px}
.fp-round-badge{background:#123d2e;border:1px solid #d5c07d88;color:#ffeaa0;padding:3px 8px;border-radius:999px;font-size:10px;letter-spacing:.05em}
.fp-missing-badge{margin-left:5px;color:#fff}
.fp-missing-badge.fp-suit-m{background:#b44536}
.fp-missing-badge.fp-suit-p{background:#2f658e}
.fp-missing-badge.fp-suit-s{background:#2d764d}
.fp-opponent-label em{font-style:normal;color:#ffe27a;font-weight:800}
.fp-keys-hint{margin-left:auto;font-size:10px;color:#c9d9be;opacity:.85}

/* River header as clickable button to open full discard pool overview */
.fp-river-label{width:100%;border:0;text-align:left;cursor:pointer;font-family:inherit}
.fp-river-label:hover{background:#155947}
.fp-river-zone[hidden],.fp-flower-zone[hidden],.fp-zone-melds[hidden],.fp-game-tools>button[hidden]{display:none}

/* More spacious rivers so players can see many more discards at once without horizontal scroll */
.fp-game .fp-play-area{inset:78px 98px 10px}
.fp-game .fp-opponent-top{top:8px;min-height:62px;padding:6px 10px;gap:4px}
.fp-game .fp-opponent-top .fp-backs i{width:15px;height:21px}
.fp-game .fp-river-top{left:22%;top:0;width:56%;height:31%}
.fp-game .fp-river-bottom{left:22%;bottom:0;width:56%;height:31%}
.fp-game .fp-river-left{top:8%;width:22%;height:84%}
.fp-game .fp-river-right{top:8%;width:22%;height:84%}
.fp-game .fp-table-center{left:24%;top:32%;width:52%;height:36%}
.fp-game .fp-river-tiles{align-content:flex-start;gap:2px;padding:3px 4px}
.fp-game .fp-river-tile .tile{width:28px;height:39px}
.fp-game .fp-table-last .tile{width:48px;height:66px}
.fp-game .fp-wall-mark b{font-size:20px}

/* Decision bar + Tenpai wait preview */
.fp-decision-slot{flex:none}
.fp-game .fp-decision-bar{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-height:52px;padding:8px 14px}
.fp-decision-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fp-auto-tag{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:#2f673f22;color:#275935;font-size:11px;font-weight:800;margin-left:4px}
.fp-tenpai-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 10px;border-radius:9px;background:#e4f2dc;border:1px solid #9dc494;color:#214b2b;font-size:12px}
.fp-tenpai-title{font-weight:800;white-space:nowrap}
.fp-tenpai-waits{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.fp-tenpai-wait{display:inline-flex;align-items:center;gap:4px;padding:2px 6px 2px 3px;border-radius:6px;background:#fffdf4;border:1px solid #b5cfa8}
.fp-tenpai-wait .tile{width:24px;height:34px}
.fp-tenpai-wait small{font-size:11px;font-weight:800;color:#265632}
.fp-tenpai-wait.empty{opacity:.52}
.fp-tenpai-wait.warn{border-color:#d8a454}
.fp-tenpai-meta{margin-left:auto;font-size:11px;font-weight:700;color:#2c5a37}
.fp-tenpai-meta em{font-style:normal;color:#9a5d1f}
.fp-lowfan-bar{padding:6px 10px;border-radius:9px;background:#fff4d8;border:1px solid #d9a74e;color:#6e4310;font-size:12px;font-weight:700;line-height:1.45}
.fp-eff-box{margin:8px 0 10px;padding:8px 10px;border-radius:9px;background:#eef5e6;border:1px solid #bfd2b2}
.fp-eff-route{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;margin-bottom:6px;padding:4px 8px;border-radius:7px;background:#fff8df;border:1px solid #dec37a;font-size:11.5px;color:#4f3812}
.fp-eff-route strong{color:#1d4c27}
.fp-eff-route em{font-style:normal;font-size:10px;font-weight:800;padding:1px 6px;border-radius:999px;background:#dff0d8;color:#1e512a}
.fp-eff-route em.warn{background:#ffe8bc;color:#7a480d}
.fp-eff-badges{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.fp-eff-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:#265632;color:#fff8dc;font-size:11px;font-weight:800}
.fp-eff-badge.alt{background:#fffdf4;color:#275332;border:1px solid #a8c39b}
.fp-eff-draws{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin:6px 0}
.fp-eff-tile{display:inline-flex;align-items:center;gap:2px;padding:1px 4px 1px 2px;border-radius:5px;background:#fffdf4;border:1px solid #c3d5b7}
.fp-eff-tile .tile{width:22px;height:31px}
.fp-eff-tile em{font-style:normal;font-size:10px;font-weight:800;color:#2a5b35}
.fp-eff-more{font-size:10px;font-weight:800;color:#476c4e;padding:0 3px}
.fp-eff-cands{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:6px;font-size:11px}
.fp-eff-cands small{margin:0;color:#4f6853;font-weight:700}
.fp-eff-cand{padding:2px 6px;border-radius:6px;background:#fffdf6;border:1px solid #d4dfcb;color:#3d5642}
.fp-eff-cand.best{border-color:#4b8a5b;background:#dff0d8;color:#1d4a28;font-weight:800}
.fp-ai-rec{position:relative;box-shadow:0 0 0 2px #f2c45a,0 4px 12px #1a3d2438}
.fp-ai-badge{display:inline-flex;align-items:center;margin-left:6px;padding:1px 6px;border-radius:999px;background:#ffe07d;color:#2c3a14;font-size:10px;font-weight:800;line-height:1.3;vertical-align:middle;white-space:nowrap}
.fp-game-tools>button.fp-advice-btn{display:inline-flex;align-items:center;gap:4px;border-color:#e8c468;background:#1d4d3a;color:#fff7d6;font-weight:800}
.fp-game-tools>button.fp-advice-btn:hover,.fp-game-tools>button.fp-advice-btn[aria-pressed="true"]{background:#245d46;box-shadow:0 0 0 1px #ffe07d}
.fp-ai-chip{display:inline-flex;align-items:center;padding:1px 5px;border-radius:999px;background:#ffe07d;color:#2c3a14;font-size:10px;font-weight:900;line-height:1.25;letter-spacing:.03em}

/* === 8 Collectible Table Themes (unlocked via Free Blind-Box Gacha) === */
.fp-game[data-table-theme="bamboo"] .fp-table{background:radial-gradient(ellipse at center,#2c7c70 0,#1d5d53 68%,#13423b 100%)}
.fp-game[data-table-theme="bamboo"] .fp-table-frame{border-color:#2c665d}
.fp-game[data-table-theme="bamboo"] .fp-backs i,.fp-game[data-table-theme="bamboo"] .fp-wall-backs i{background:linear-gradient(145deg,#8ad4b8,#4d9b7e);border-color:#35725c}

.fp-game[data-table-theme="indigo"] .fp-table{background:radial-gradient(ellipse at center,#295682 0,#1b3c5e 68%,#122841 100%)}
.fp-game[data-table-theme="indigo"] .fp-table-frame{border-color:#2d5075}
.fp-game[data-table-theme="indigo"] .fp-backs i,.fp-game[data-table-theme="indigo"] .fp-wall-backs i{background:linear-gradient(145deg,#8ab8ea,#4678ad);border-color:#2b517a}

.fp-game[data-table-theme="walnut"] .fp-table{background:radial-gradient(ellipse at center,#456b3e 0,#2d4c2a 68%,#1e351c 100%)}
.fp-game[data-table-theme="walnut"] .fp-table-frame{border-color:#69472b;box-shadow:inset 0 0 0 2px #b6855166}
.fp-game[data-table-theme="walnut"] .fp-backs i,.fp-game[data-table-theme="walnut"] .fp-wall-backs i{background:linear-gradient(145deg,#e3af62,#a9702c);border-color:#744b19}

.fp-game[data-table-theme="sakura"] .fp-table{background:radial-gradient(ellipse at center,#7a3d54 0,#562639 68%,#3b1726 100%)}
.fp-game[data-table-theme="sakura"] .fp-table-frame{border-color:#8b4a62;box-shadow:inset 0 0 0 2px #f4bfd255}
.fp-game[data-table-theme="sakura"] .fp-backs i,.fp-game[data-table-theme="sakura"] .fp-wall-backs i{background:linear-gradient(145deg,#f4bfd1,#c97693);border-color:#944c66}

.fp-game[data-table-theme="midnight"] .fp-table{background:radial-gradient(ellipse at center,#2c444a 0,#1b2d32 68%,#101d21 100%)}
.fp-game[data-table-theme="midnight"] .fp-table-frame{border-color:#446169;box-shadow:inset 0 0 0 2px #89c4c744}
.fp-game[data-table-theme="midnight"] .fp-backs i,.fp-game[data-table-theme="midnight"] .fp-wall-backs i{background:linear-gradient(145deg,#7cb8ba,#3e7578);border-color:#274c4f}

.fp-game[data-table-theme="imperial"] .fp-table{background:radial-gradient(ellipse at center,#1d3d31 0,#11261e 68%,#091611 100%)}
.fp-game[data-table-theme="imperial"] .fp-table-frame{border-color:#c99d3b;box-shadow:inset 0 0 0 2px #ffe07d88,0 0 24px #c99d3b33}
.fp-game[data-table-theme="imperial"] .fp-backs i,.fp-game[data-table-theme="imperial"] .fp-wall-backs i{background:linear-gradient(145deg,#f4cf6d,#9e7422);border-color:#5e420e}

.fp-game[data-table-theme="celestial"] .fp-table{background:radial-gradient(ellipse at center,#293a73 0,#19244d 68%,#0f1633 100%)}
.fp-game[data-table-theme="celestial"] .fp-table-frame{border-color:#a584e0;box-shadow:inset 0 0 0 2px #ffe09466,0 0 26px #8c6cd644}
.fp-game[data-table-theme="celestial"] .fp-backs i,.fp-game[data-table-theme="celestial"] .fp-wall-backs i{background:linear-gradient(145deg,#cfb2ff,#6d55b8);border-color:#402e7a}

/* === Settlement Vault Reward Banner === */
.fp-vault-reward{margin:12px 0;padding:11px 13px;border-radius:11px;background:linear-gradient(135deg,#fff9e3,#f2f7e4);border:1.5px solid #dec16f}
.fp-vault-reward-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12.5px;color:#3d3011}
.fp-vault-reward-top span{font-weight:800;color:#245a2e}
.fp-vault-cards{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.fp-vault-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:11.5px;font-weight:800}
.fp-vault-chip b{font-size:10px;letter-spacing:.04em}
.fp-vault-chip.fp-r-r{background:#e3effc;color:#1d4a7a;border:1px solid #9dc2ea}
.fp-vault-chip.fp-r-sr{background:#f1e6fc;color:#5b2288;border:1px solid #c99df0}
.fp-vault-chip.fp-r-ssr{background:linear-gradient(135deg,#ffe799,#ffd15c);color:#4a2b04;border:1px solid #d4961a;box-shadow:0 2px 8px #d4961a44}
.fp-vault-link{margin-top:6px;padding:6px 12px !important;font-size:12px !important}

/* === Vault Page: Blind-Box Gacha & Holographic SSR Flashcards === */
.vt-page{max-width:980px}
.vt-head{margin-top:18px}
.vt-head h1{margin:8px 0;font-size:clamp(25px,4vw,36px);color:#1f3b21}
.vt-stats-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}
.vt-stat-pill{padding:12px 14px;border-radius:12px;background:#fffdf6;border:1px solid #dfe0cb;display:flex;flex-direction:column;gap:4px}
.vt-stat-pill span{font-size:11px;font-weight:700;color:#62705a}
.vt-stat-pill strong{font-size:22px;color:#1d4724;line-height:1.1}
.vt-stat-tickets{background:linear-gradient(135deg,#fff8dc,#f8eed0);border-color:#dec16f}
.vt-stat-tickets strong{color:#8a560e}
.vt-star-row{display:flex;justify-content:space-between;align-items:baseline;font-size:12px}
.vt-star-row b{color:#23572d}
.vt-star-bar{height:7px;border-radius:999px;background:#e4ebd8;overflow:hidden}
.vt-star-bar i{display:block;height:100%;background:linear-gradient(90deg,#529954,#e0b044);border-radius:999px}
.vt-stat-stars small{font-size:10px;color:#6b7964}
.vt-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 18px}
.vt-tab{padding:10px 18px;border-radius:999px;border:1.5px solid #cfd8c1;background:#fffdf6;color:#284429;font-size:13.5px;font-weight:800;cursor:pointer}
.vt-tab.active{background:#24502b;border-color:#24502b;color:#ffe27c}
.vt-box-card{display:flex;align-items:center;gap:24px;padding:24px;border-radius:16px;background:linear-gradient(135deg,#214828,#16331c);color:#f7f4df;box-shadow:0 10px 26px #18361c42}
.vt-crate{position:relative;width:116px;height:116px;border-radius:20px;flex:none;background:linear-gradient(145deg,#ffe694,#d4982a);border:3px solid #fff3c2;display:grid;place-items:center;box-shadow:0 12px 24px #00000044,0 0 24px #ffd76a55;animation:vtFloat 2.8s ease-in-out infinite}
@keyframes vtFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.vt-crate-ribbon{position:absolute;inset:0;background:linear-gradient(90deg,transparent 42%,#b93829 42%,#b93829 58%,transparent 58%),linear-gradient(0deg,transparent 42%,#b93829 42%,#b93829 58%,transparent 58%);border-radius:17px;opacity:.85}
.vt-crate-seal{position:relative;z-index:2;width:48px;height:48px;border-radius:999px;background:#fffdf2;border:2px solid #b93829;color:#244e2b;display:grid;place-items:center;font-family:serif;font-size:26px;font-weight:900;box-shadow:0 4px 10px #00000033}
.vt-box-info h2{margin:0 0 6px;font-size:21px;color:#ffe37c}
.vt-rates{margin:0 0 6px;font-size:12.5px;line-height:1.55;color:#e2ecd2}
.vt-pity-line{margin:0 0 14px;font-size:12.5px;font-weight:800;color:#ffe07d}
.vt-open-btn{background:linear-gradient(135deg,#ffe488,#f0be4a) !important;color:#242c11 !important;border-color:#ffefb3 !important;font-weight:900 !important;box-shadow:0 4px 0 #8a6416 !important}
.vt-reveal{margin-top:16px;padding:18px;border-radius:14px;background:#fffdf6;border:2px solid #9cc294;animation:vtPop .35s cubic-bezier(.2,1.3,.4,1)}
@keyframes vtPop{0%{opacity:0;transform:scale(.94)}100%{opacity:1;transform:scale(1)}}
.vt-reveal.vt-rarity-sr{border-color:#a26cd8;background:linear-gradient(135deg,#faf4ff,#fffdf6)}
.vt-reveal.vt-rarity-ssr{border-color:#e0a41d;background:linear-gradient(135deg,#fff9df,#fff2c2,#fffdf6);box-shadow:0 0 24px #f2c34b66}
.vt-reveal-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.vt-rarity-pill{display:inline-flex;align-items:center;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:900;letter-spacing:.05em}
.vt-r-r{background:#dcebfa;color:#1b4d82}
.vt-r-sr{background:#eedefb;color:#622396}
.vt-r-ssr{background:linear-gradient(135deg,#ffe685,#ebb027);color:#422602;box-shadow:0 2px 6px #d4961a55}
.vt-new-pill{padding:2px 9px;border-radius:999px;background:#265e32;color:#fff8dc;font-size:11px;font-weight:800}
.vt-pity-pill{padding:2px 9px;border-radius:999px;background:#b93829;color:#fff8dc;font-size:11px;font-weight:800}
.vt-reveal-body{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.vt-theme-preview{width:118px;height:78px;border-radius:12px;border:3px solid;display:flex;align-items:center;justify-content:center;gap:8px;flex:none;box-shadow:0 6px 14px #00000024}
.vt-preview-back{width:24px;height:34px;border-radius:4px;border:1.5px solid #ffffffaa;box-shadow:0 2px 5px #00000044}
.vt-reveal-body h3{margin:0 0 4px;font-size:18px;color:#1f3b21}
.vt-reveal-body p{margin:0 0 8px;font-size:13px;color:#556350}
.vt-dup-note{display:block;margin-bottom:8px;font-size:12px;font-weight:700;color:#8a5514}
.vt-try-btn{padding:8px 14px !important;font-size:12.5px !important}
.vt-themes-sec{margin-top:24px}
.vt-themes-sec h3,.vt-earn-sec h3{margin:0 0 12px;font-size:17px;color:#1f3b21}
.vt-theme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.vt-theme-card{border-radius:13px;background:#fffdf6;border:1.5px solid #dfe2cc;overflow:hidden;display:flex;flex-direction:column}
.vt-theme-card.equipped{border-color:#266334;box-shadow:0 4px 14px #1f5c2d2e}
.vt-theme-card.locked{opacity:.78}
.vt-theme-swatch{height:72px;border-bottom:3px solid;padding:8px 10px;display:flex;align-items:flex-start;justify-content:space-between}
.vt-swatch-tiles{display:flex;gap:4px;align-self:flex-end}
.vt-swatch-tiles i{display:block;width:16px;height:23px;border-radius:3px;border:1px solid #ffffffbb;box-shadow:0 2px 4px #00000044}
.vt-theme-meta{padding:11px 12px;display:flex;flex-direction:column;gap:6px;flex:1}
.vt-theme-meta h4{margin:0;font-size:14px;color:#1f3b21}
.vt-theme-meta p{margin:0;font-size:11.5px;line-height:1.5;color:#5c6a57;flex:1}
.vt-equipped-tag{display:inline-block;padding:4px 9px;border-radius:8px;background:#dff0d8;color:#1e542a;font-size:11.5px;font-weight:800;text-align:center}
.vt-locked-tag{display:inline-block;padding:4px 9px;border-radius:8px;background:#f0efe2;color:#787f6f;font-size:11px;font-weight:700;text-align:center}
.vt-equip-btn{padding:6px 10px !important;font-size:12px !important;width:100%}
.vt-earn-sec{margin-top:22px;padding:16px 18px;border-radius:13px;background:#f3f6ea;border:1px solid #dae2ca}
.vt-earn-sec ul{margin:0;padding-left:18px;font-size:13px;line-height:1.75;color:#475843}
.vt-filters{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}
.vt-filter{padding:6px 13px;border-radius:999px;border:1px solid #cfd8c1;background:#fffdf6;color:#324a31;font-size:12px;font-weight:700;cursor:pointer}
.vt-filter.active{background:#25542d;border-color:#25542d;color:#ffe27c}
.vt-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.vt-foil-card{position:relative;padding:14px;border-radius:14px;background:#fffdf6;border:1.5px solid #dce1cb;overflow:hidden}
.vt-foil-card.unlocked.vt-rarity-r{border-color:#8cb7e2;background:linear-gradient(135deg,#f5faff,#fffdf6)}
.vt-foil-card.unlocked.vt-rarity-sr{border-color:#b282e3;background:linear-gradient(135deg,#faf3ff,#fffdf6);box-shadow:0 4px 14px #8c4ec924}
.vt-foil-card.unlocked.vt-rarity-ssr{border-color:#e0a520;background:linear-gradient(135deg,#fff9dd,#ffefc2,#fffcf0);box-shadow:0 6px 18px #d89b1a3b}
.vt-foil-card.unlocked.vt-rarity-ssr::after{content:"";position:absolute;inset:-40%;background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.55) 50%,transparent 65%);transform:translateX(-100%);animation:vtShimmer 3.6s ease-in-out infinite;pointer-events:none}
@keyframes vtShimmer{0%{transform:translateX(-85%)}45%,100%{transform:translateX(85%)}}
.vt-foil-card.locked{background:#f5f4e9;border-style:dashed;opacity:.82}
.vt-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.vt-card-status{font-size:11px;font-weight:700;color:#5a6854}
.vt-foil-card h4{margin:0 0 4px;font-size:15px;color:#1d3b20}
.vt-foil-card p{margin:0 0 10px;font-size:12px;line-height:1.5;color:#556350}
.vt-card-tiles{display:flex;flex-wrap:wrap;gap:3px}
.vt-card-tiles .tile{width:28px;height:39px}
.vt-card-tiles.veiled{filter:grayscale(1) opacity(.38)}
.vt-empty{padding:30px 20px;text-align:center;border-radius:14px;background:#f5f7ec;border:1px dashed #b9c9ae}
.vt-empty p{margin:0 0 14px;color:#4f5f4b;font-size:14px}
@media(max-width:850px){
  .vt-stats-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .vt-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .vt-card-grid{grid-template-columns:1fr}
  .vt-box-card{flex-direction:column;text-align:center}
}
@media(max-width:500px){
  .vt-card-tiles .tile{width:23px;height:32px}
}
@media(prefers-reduced-motion:reduce){.vt-crate,.vt-reveal,.vt-foil-card.unlocked.vt-rarity-ssr::after{animation:none}}

/* Hand rack: fit all 14 tiles cleanly without horizontal scrolling on desktop & tablet */
.fp-game .fp-rack{display:flex;align-items:flex-end;justify-content:center;flex-wrap:nowrap;gap:3px;min-height:82px;max-height:none;overflow:visible;padding:12px 4px 4px}
.fp-game .fp-tile .tile{width:clamp(34px,calc((100vw - 340px) / 15.2),54px);height:auto;aspect-ratio:5/7}
.fp-game .fp-tile.has-tenpai{border-color:#e8c56b77}
.fp-tenpai-dot{position:absolute;right:-2px;top:-7px;z-index:3;min-width:16px;height:16px;padding:0 3px;border-radius:999px;background:#e8a832;color:#1f2e17;font-size:9px;font-weight:900;line-height:16px;text-align:center;box-shadow:0 1px 3px #0004;pointer-events:none}
.fp-tap-hint{position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);z-index:4;padding:2px 5px;border-radius:999px;background:#f5ca66;color:#22381c;font-size:8px;font-weight:900;line-height:1;white-space:nowrap;box-shadow:0 2px 4px #0004;pointer-events:none}

/* Full discard pool & remaining counter overlay */
.fp-pool-panel{position:absolute;z-index:27;inset:68px 16px 16px;overflow:auto;padding:20px 22px;border:2px solid #d5b56d;border-radius:14px;background:#fffdf2;color:#263b2c;box-shadow:0 20px 55px #062119b8}
.fp-pool-panel h2{margin:0 30px 12px 0;font-size:19px;color:#224229}
.fp-pool-panel h3{margin:16px 0 8px;font-size:13px;color:#4a674d;letter-spacing:.03em}
.fp-pool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fp-pool-seat{padding:10px 12px;border:1px solid #d8dfc9;border-radius:10px;background:#f7f8ec}
.fp-pool-seat-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:6px;color:#28492e}
.fp-pool-melds{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.fp-pool-tiles{display:flex;flex-wrap:wrap;gap:3px}
.fp-pool-tile .tile{width:28px;height:39px}
.fp-pool-empty{font-size:12px;color:#82917e}
.fp-counter-grid{display:flex;flex-direction:column;gap:8px}
.fp-counter-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #dde3cf;border-radius:10px;background:#f8f9ee}
.fp-counter-suit{min-width:44px;font-size:12px;font-weight:800;color:#35593c}
.fp-counter-tiles{display:flex;flex-wrap:wrap;gap:5px}
.fp-counter-cell{display:inline-flex;flex-direction:column;align-items:center;gap:2px}
.fp-counter-cell .tile{width:28px;height:39px}
.fp-counter-cell b{font-size:11px;line-height:1;color:#285531}
.fp-counter-cell.zero{opacity:.38}
.fp-counter-cell.zero b{color:#a14232}

/* Winner hand decomposition inside settlement modal */
.fp-game .pg-result{width:min(540px,calc(100% - 28px));max-height:calc(100dvh - 86px)}
.fp-winner-card{margin:10px 0 14px;padding:12px;border:1px solid #d9dfc5;border-radius:10px;background:#f7f9ec}
.fp-winner-head{margin:0 0 10px;font-size:13px;line-height:1.5;color:#294630}
.fp-win-hand{display:flex;flex-direction:column;gap:8px}
.fp-win-groups{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px}
.fp-win-group{position:relative;display:inline-flex;align-items:center;gap:2px;padding:4px 5px;border-radius:7px;background:#edf2df;border:1px solid #d1dbc0}
.fp-win-group.exposed{background:#e3edd6;border-color:#9fc099}
.fp-win-group.pair{background:#f7efda;border-color:#dfc486}
.fp-win-group>small{font-size:9px;font-weight:800;color:#35593b;margin-right:3px}
.fp-win-tile{position:relative;display:inline-flex}
.fp-win-tile .tile{width:31px;height:43px}
.fp-win-tile.is-win-tile .tile{outline:2px solid #d44b38;box-shadow:0 0 0 3px #f6c77088}
.fp-win-badge{position:absolute;right:-3px;top:-7px;z-index:3;padding:1px 4px;border-radius:999px;background:#d44b38;color:#fff8e6;font-size:8px;font-weight:900;line-height:1.2}
.fp-win-flowers{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:11px;color:#4f684c}
.fp-win-flowers .tile{width:24px;height:33px}

@media(max-width:960px){
  .fp-keys-hint{display:none}
  .fp-game .fp-tile .tile{width:clamp(32px,calc((100vw - 270px) / 15),48px)}
}

/* Mobile immersive full-screen table & 2-row full-visibility ergonomic hand rack */
@media(max-width:800px){
  .fp-game{inset:0;z-index:20;height:100dvh}
  .fp-game .fp-tile .tile{width:clamp(34px,calc((100vw - 56px) / 14.8),46px)}
  .fp-pool-panel{inset:62px 8px 8px;padding:14px}
  .fp-pool-grid{grid-template-columns:1fr}
}

@media(max-width:600px){
  .fp-game-head{min-height:66px;padding:4px 6px}
  .fp-game .fp-table-frame{margin:4px;border-width:4px;border-radius:12px}
  .fp-game .fp-opponent-top{top:4px;width:62%;min-height:48px;padding:4px 7px}
  .fp-game .fp-opponent-top .fp-backs{display:none}
  .fp-game .fp-opponent-left,.fp-game .fp-opponent-right{width:46px;padding:3px}
  .fp-game .fp-opponent-left .fp-backs,.fp-game .fp-opponent-right .fp-backs{display:none}
  .fp-game .fp-play-area{inset:54px 50px 6px}
  .fp-game .fp-river-top{left:14%;width:72%;height:31%}
  .fp-game .fp-river-bottom{left:14%;width:72%;height:31%}
  .fp-game .fp-river-left,.fp-game .fp-river-right{top:10%;width:24%;height:80%}
  .fp-game .fp-table-center{left:25%;top:32%;width:50%;height:36%}
  .fp-game .fp-river-tile .tile{width:20px;height:28px}
  .fp-game .fp-decision-bar{min-height:46px;padding:6px 8px;gap:5px}
  .fp-decision-row{gap:6px}
  .fp-tenpai-bar{padding:4px 7px;gap:5px;font-size:11px}
  .fp-tenpai-wait .tile{width:20px;height:28px}
  .fp-game .fp-own-seat{padding:6px 6px 8px}
  /* 2-row wrapped hand on narrow mobile: ALL 14 tiles visible at once with large tap targets! */
  .fp-game .fp-rack{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:6px 3px;min-height:0;max-height:none;padding:10px 2px 6px;overflow:visible}
  .fp-game .fp-draw-slot{margin-left:6px;padding-left:6px;border-left:2px solid #f0c969}
  .fp-game .fp-tile .tile{width:clamp(40px,calc((100vw - 44px) / 7.6),52px);height:auto;aspect-ratio:5/7}
  .fp-game .fp-tile.selected{transform:translateY(-5px)}
  .fp-win-tile .tile{width:26px;height:36px}
  .fp-game .pg-result{top:68px;right:6px;left:6px;width:auto;max-height:calc(100dvh - 80px)}
}

/* Fair shuffle badge, challenge seed input & share controls */
.fp-fair-note{display:flex;align-items:flex-start;gap:8px;margin-top:14px;padding:10px 12px;border-radius:10px;background:#edf5ec;border:1px solid #c5ddc3;color:#23442a;font-size:12.5px;line-height:1.5}
.fp-fair-badge{flex:none;display:inline-flex;align-items:center;justify-content:center;padding:2px 6px;border-radius:6px;background:#265031;color:#f5ebd0;font-size:10px;font-weight:800;letter-spacing:.08em}
.fp-seed-box{margin-top:12px;padding:10px 12px;border-radius:10px;background:#f7f4ea;border:1px solid #e0d7c3}
.fp-seed-box>summary{cursor:pointer;font-size:13px;font-weight:700;color:#2b462e}
.fp-seed-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.fp-seed-input{flex:1 1 220px;min-width:0;padding:9px 12px;border-radius:9px;border:1px solid #c7bfa8;background:#fff;color:#1e2f21;font:inherit;font-size:13px}
.fp-seed-input:focus{outline:2px solid #2e6039;outline-offset:1px}
.fp-seed-err{margin:8px 0 0;font-size:12px;color:#b23a2c;font-weight:600}
.fp-game-tools .fp-share-btn{border-color:#d4b160!important;color:#fae7b3!important;background:#2a4f38!important}
.fp-game-tools .fp-share-btn:hover{background:#346144!important}
.fp-game-toast.is-info{background:#18452c;border-color:#6bc48e;color:#eefbf3}
.fp-result-seed{margin:8px 0 12px;font-size:11.5px;line-height:1.45;color:#4f684c}
