:root{--ink:#19323b;--muted:#667c81;--green:#397761;--lime:#ddf2b7;--cream:#f5f5ee;--line:#d9e4df;--red:#c34752;--gold:#af8135;--card-w:78px;font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:var(--cream);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;color:inherit;touch-action:manipulation}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f3bb4b;outline-offset:3px}button{border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 15px;font-weight:700;transition:background .16s,transform .16s}button:not(:disabled):hover{background:#edf4e9}button.primary{background:var(--ink);border-color:var(--ink);color:white;box-shadow:0 4px 0 #0c1f27}button.primary:not(:disabled):hover{background:#2e5360}button.accent{background:var(--lime);border-color:#c7dfa4}button.ghost{background:transparent;border-color:transparent}button.danger{color:#a5313c}.topbar{height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 4vw;border-bottom:1px solid #dbe4de;background:#fafbf6}.brand{display:flex;gap:12px;align-items:center;border:0;padding:0;background:transparent;text-align:left;letter-spacing:.06em;font-size:20px}.brand small{display:block;font-size:9px;letter-spacing:.22em;color:var(--muted);margin-top:3px}.brandmark{font-size:31px;width:46px;height:49px;border-radius:8px;color:var(--lime);display:grid;place-items:center;background:var(--ink);transform:rotate(-7deg)}nav{display:flex;gap:8px}nav button{border:0;background:transparent;font-size:13px}.theme-nav{background:#e8eee0!important}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.17em;color:var(--green)}.muted{color:var(--muted)}.tiny{font-size:12px}.pill{display:inline-flex;gap:5px;align-items:center;padding:5px 10px;border-radius:20px;background:#eaf1e6;font-size:11px;font-weight:700}.home{max-width:1220px;margin:auto;padding:42px 32px 24px}.home-top{display:grid;grid-template-columns:1fr 1fr;gap:42px;align-items:center}.hero-copy h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(30px,3.7vw,51px);line-height:1.55;letter-spacing:.04em;margin:13px 0 16px}.hero-copy h1 em{font-style:normal;color:var(--green);background:linear-gradient(transparent 77%,#ddebc9 0)}.hero-copy p{font-size:15px;line-height:1.95;margin:0 0 20px}.hero-tags{display:flex;gap:8px;flex-wrap:wrap}.hero-art{height:347px;position:relative;border-radius:50% 48% 40% 45%;background:radial-gradient(ellipse at 48% 45%,#e2eddb 5%,#ebf0e1 55%,transparent 70%);display:grid;place-items:center}.fan{position:relative;width:350px;height:285px}.fan .playing-card{position:absolute;top:25px;width:159px;height:226px;box-shadow:0 20px 35px #15332b28;pointer-events:none}.fan .playing-card:nth-child(1){transform:rotate(-20deg);left:5px;top:34px}.fan .playing-card:nth-child(2){left:105px;transform:rotate(-3deg);top:0;z-index:2}.fan .playing-card:nth-child(3){left:206px;top:44px;transform:rotate(19deg);z-index:3}.art-note{position:absolute;bottom:4px;left:0;right:0;text-align:center;font-size:12px;color:var(--green);font-weight:700}.setup-panel{display:grid;grid-template-columns:1.35fr 1fr;background:white;border:1px solid var(--line);border-radius:19px;margin-top:27px;overflow:hidden;box-shadow:0 10px 35px #203b2910}.deck-select{padding:23px 28px}.section-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:17px}.section-title h2{font-size:17px;margin:0}.section-title small{font-size:11px;color:var(--muted)}.theme-list{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.theme-option{padding:10px 6px 8px;border-radius:12px;background:#f8f9f5;position:relative;font-size:11px;display:flex;align-items:center;flex-direction:column;gap:8px}.theme-option.chosen{border:2px solid var(--green);padding:9px 5px 7px;background:#eef5e8}.theme-option.chosen:after{content:'✓';position:absolute;right:4px;top:4px;z-index:2;background:var(--green);color:white;border-radius:50%;width:19px;height:19px;display:grid;place-items:center}.theme-option .playing-card{width:54px;height:75px;box-shadow:0 2px 4px #0002;border-radius:5px}.start-panel{padding:23px 28px;background:#f0f4e9;border-left:1px solid var(--line);display:flex;flex-direction:column;justify-content:center;gap:13px}.setup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.segmented{display:flex;gap:4px}.segmented button{padding:7px 14px;font-size:12px}.segmented .chosen{background:var(--ink);color:white}.start-panel .primary{padding:15px;font-size:16px}.start-panel .two-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.start-panel .two-buttons button{font-size:12px;padding:9px 5px}.home-foot{display:flex;justify-content:space-between;margin-top:16px;color:var(--muted);font-size:11px;gap:8px}.playing-card{width:var(--card-w);height:calc(var(--card-w)*1.4);padding:0;border:1px solid #c4cec8;border-radius:9px;position:relative;overflow:hidden;background:#fffefb;color:#253e46;box-shadow:0 3px 5px #152c361c;flex-shrink:0;display:block;font-weight:700;isolation:isolate}.playing-card.red{color:#c3434b}.playing-card .corner{position:absolute;top:5%;left:6%;z-index:2;display:flex;flex-direction:column;align-items:center;line-height:.94;font-family:Georgia,"Times New Roman",serif;font-weight:bold;font-size:clamp(17px,calc(var(--card-w)*.25),23px);gap:3px}.playing-card .corner span{font-size:.78em}.playing-card .corner.bottom{top:auto;left:auto;right:6%;bottom:5%;transform:rotate(180deg)}.playing-card .pip{font-size:calc(var(--card-w)*.57);line-height:1;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-family:Georgia,serif}.playing-card .art{position:absolute;inset:0;overflow:hidden;z-index:-1}.playing-card .art img{width:100%;height:100%;object-fit:cover;object-position:var(--posx,50%) var(--posy,50%);transform:scale(var(--zoom,1))}.playing-card.animal .corner,.playing-card.custom.has-image .corner{background:#fffef4f2;padding:4px;border-radius:4px;top:3%;left:3%;box-shadow:0 1px 3px #0001}.playing-card.animal .corner.bottom,.playing-card.custom.has-image .corner.bottom{top:auto;left:auto;right:3%;bottom:3%}.playing-card.modern{background:#203b43;color:#edfff3;border-color:#557c75}.playing-card.modern.red{color:#ffd495}.playing-card.modern:before{content:'';position:absolute;inset:14%;border:1px solid #c6e6b966;border-radius:40%}.playing-card.modern .pip{font-size:calc(var(--card-w)*.62);color:#d8edbc}.playing-card.wag{background-color:#fff7e7;background-image:radial-gradient(circle at 50% 100%,transparent 20%,#c49e5930 21%,#c49e5930 23%,transparent 24%,transparent 35%,#c49e5930 36%,#c49e5930 38%,transparent 39%);background-size:28px 21px}.playing-card.wag .pip{border:1px solid #b58a39;border-radius:50%;padding:8px;background:#fff8e1}.playing-card.back{background:repeating-linear-gradient(45deg,#315e58,#315e58 5px,#3e7066 5px,#3e7066 6px);border:4px solid #f9faf2;color:#e1e8bd;display:grid;place-items:center;font-size:32px;box-shadow:3px 3px 0 #aaa,6px 6px 0 #d3d9cc}.playing-card.back:before{content:'✦';border:1px solid #e5e9c88a;width:76%;height:80%;display:grid;place-items:center;border-radius:30px}.playing-card.back.animal{background:#e6cfab;color:#897145}.playing-card.back.animal:before{content:'✿'}.playing-card.back.has-image:before{display:none}.playing-card.mini{--card-w:30px;border-radius:4px;height:42px}.playing-card.mini .corner{font-size:13px}.playing-card.mini .corner.bottom{display:none}.playing-card.mini .pip{font-size:18px;top:72%}.playing-card.selected{transform:translateY(-12px);border:3px solid #3a806b;box-shadow:0 5px 0 #8fc8a6}.playing-card.available:after{content:'';position:absolute;bottom:0;left:0;right:0;height:4px;background:#88b780}.playing-card.hint{outline:3px solid #e9b44b;outline-offset:3px;animation:hintglow 1.4s infinite}.playing-card.dim{filter:saturate(.5);opacity:.62}.game{max-width:1360px;margin:auto;padding:18px 26px;display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:19px}.game-main{min-width:0}.game-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px;font-size:11px;color:var(--muted)}.game-meta button{padding:4px 8px;font-size:11px}.board{border-radius:21px;position:relative;background:radial-gradient(ellipse at 50% 75%,#f4f7ec 0%,#e3eee0 80%);border:1px solid #cadbc9;overflow:hidden}.opponents{display:flex;justify-content:space-around;padding:14px 16px 0;gap:10px}.opponent{flex:1;max-width:225px;padding:9px 10px;border-radius:12px;border:1px solid #ccdac8;background:#f9fbf380;min-width:0}.opponent.active{border:2px solid #447e65;background:#fffef2;padding:8px 9px;box-shadow:0 0 0 3px #81b48024}.opponent-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:5px}.avatar{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#bbd1b0;margin-right:5px;flex-shrink:0}.opponent-head strong{display:flex;align-items:center}.opponent-head b{font-size:19px}.cpu-hand{height:27px;display:flex;align-items:center;justify-content:center;margin:7px 0 2px}.cpu-hand i{width:17px;height:24px;border:2px solid white;border-radius:3px;background:repeating-linear-gradient(45deg,#4c7869,#4c7869 3px,#628975 3px,#628975 4px);margin-left:-4px;box-shadow:1px 1px 0 #a5bb9e}.cpu-info{font-size:10px;display:flex;justify-content:space-between;color:#5b6f62}.opponent .cpu-effects{display:flex;gap:3px;overflow-x:auto;font-size:10px;margin-top:5px}.cpu-effects button{font-size:10px;padding:2px 4px;flex-shrink:0}.table-area{height:187px;display:grid;grid-template-columns:95px 1fr 95px;align-items:center;gap:10px;padding:14px 28px;position:relative}.deck-pile{text-align:center;display:flex;flex-direction:column;align-items:center;gap:9px;font-size:10px}.deck-pile .playing-card{--card-w:56px}.table-center{text-align:center;position:relative}.table-cards{display:flex;justify-content:center;gap:5px;min-height:113px;align-items:center}.table-cards .playing-card{--card-w:78px;animation:land .35s ease-out}.table-empty{border:1px dashed #92b09b;border-radius:11px;height:112px;min-width:135px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#789280;gap:3px}.table-empty b{font-size:35px;font-weight:400;color:#9ab398}.table-label{font-size:11px;margin:8px 0 0;font-weight:700}.discard{border:1px dashed #b1c5b0;border-radius:7px;width:53px;height:73px;display:grid;place-content:center;color:#8ca18e;font-size:23px}.guide{margin:12px 0 0;background:var(--ink);color:white;border-radius:12px;padding:12px 16px;display:flex;align-items:center;gap:12px;min-height:66px}.guide .step-icon{color:var(--lime);font-size:21px}.guide b{font-size:15px;display:block;line-height:1.45}.guide p{margin:3px 0 0;font-size:12px;color:#d2e0d8;line-height:1.5}.guide.tutorial{border-left:5px solid #e1b85b}.hand-area{padding:14px 4px 0}.hand-head{display:flex;justify-content:space-between;align-items:center;font-size:12px}.hand-head strong{font-size:14px}.hand-head button{font-size:11px;padding:5px 8px}.hand{display:flex;align-items:flex-start;justify-content:center;gap:7px;overflow-x:auto;padding:21px 5px 12px;min-height:149px;scrollbar-width:thin}.hand .playing-card:not(:disabled):hover{transform:translateY(-7px)}.hand .playing-card.selected:not(:disabled):hover{transform:translateY(-12px)}.actionbar{display:flex;gap:8px;align-items:stretch;padding:6px 2px 11px}.actionbar button{flex:1;min-height:47px;font-size:13px;padding:9px 8px}.actionbar .small-btn{flex:0 0 auto;min-width:42px}.actionbar .button-secondary{background:#e7efe0;border-color:#cbd8c1}.action-sub{font-size:11px;color:var(--muted);margin:-2px 2px 9px;min-height:18px}.assets-area{border-top:1px solid var(--line);padding:10px 4px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.stock-heading{font-size:12px;display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.stock-heading strong{display:flex;align-items:center;gap:7px}.coin{display:inline-block;width:9px;height:13px;border-radius:3px;background:linear-gradient(135deg,#efd885,#c9973e);vertical-align:middle}.stock-cards{display:flex;gap:4px;overflow-x:auto;min-height:48px;padding:3px 1px}.stock-cards .playing-card.selected{transform:translateY(-2px)}.owned-list{display:flex;gap:5px;flex-wrap:wrap}.owned-list button{padding:6px;font-size:11px}.owned-list button b{font-size:15px;margin-right:4px;color:var(--green)}.market{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;align-self:start}.market-head{padding:17px 17px 12px;background:#eff3e9}.market-head h2{font-size:17px;margin:0 0 5px}.market-head p{font-size:11px;margin:0;line-height:1.6;color:var(--muted)}.market-items{padding:9px}.market-item{width:100%;display:grid;grid-template-columns:40px 1fr 38px;align-items:center;gap:9px;padding:9px 8px;border-radius:8px;border-color:transparent;border-bottom:1px solid #edf0e9;text-align:left;background:#fff;font-size:12px}.market-item .effect-icon{border:1px solid #c0d1d0;background:#eef3ef;color:#305e56;border-radius:5px;font-size:16px;min-height:39px;display:grid;place-items:center;font-family:Georgia,serif;font-weight:bold}.market-item small{display:block;font-weight:400;font-size:10px;color:var(--muted);margin-top:3px}.market-item .cost{text-align:right;font-size:12px}.market-item.buyable{background:#f4f9e9}.market-item.owned{opacity:.57}.market-item.highlight{border:2px solid #dbaa4b;background:#fff8de}.market-foot{padding:8px 16px 14px;font-size:10px;color:var(--muted);line-height:1.6}.mobile-market-btn{display:none!important}.session-footer{font-size:10px;color:var(--muted);margin-top:4px;display:flex;justify-content:space-between}.status-dot{display:inline-block;width:6px;height:6px;background:#66986c;border-radius:50%;margin-right:5px}.rank-choices{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.rank-choices button{min-width:40px}.target-choices{display:flex;gap:8px;margin:8px 0}.target-choices .chosen,.rank-choices .chosen{background:var(--lime);border-color:#669367}.winner{padding:15px;text-align:center;background:#fff7dd;border:1px solid #e2ce8b;border-radius:13px;margin-top:12px}.winner h2{margin:4px 0 7px;font-size:27px}.winner p{font-size:13px}.winner button{margin:4px}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:17px 23px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fcfdf8;z-index:5}.modal-head h2{font-size:20px;margin:0}.icon-btn{font-size:25px;padding:1px 11px;background:transparent;border:0}dialog{border:1px solid #d1decc;border-radius:18px;width:min(760px,calc(100vw - 28px));padding:0;color:var(--ink);background:#fafcf7;max-height:90dvh;box-shadow:0 20px 80px #001a2855}dialog::backdrop{background:#142b3677;backdrop-filter:blur(4px)}#modal-content{padding:22px}#modal-content p{line-height:1.7;font-size:13px}#modal-content h3{font-size:16px}.theme-modal-list{display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.theme-preview{display:flex;justify-content:center;align-items:center;gap:17px;margin:22px 0}.theme-preview .playing-card{--card-w:105px;width:105px;height:147px}.upload-panel{background:white;border:1px solid var(--line);border-radius:12px;padding:17px;margin:17px 0}.upload-panel label{display:block;font-size:12px;font-weight:700;margin-bottom:7px}.upload-panel select{width:100%;border:1px solid var(--line);border-radius:7px;padding:10px;background:#fafcf8}.upload-row{display:flex;gap:10px;align-items:center;margin-top:12px;flex-wrap:wrap}.file-btn{display:inline-block!important;border:1px dashed #72917b;background:#f0f6e7;padding:12px 17px;border-radius:7px;cursor:pointer;margin:0!important}.file-btn input{position:absolute;width:1px;height:1px;opacity:0}.sliders{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px}.sliders input{width:100%;accent-color:var(--green)}.sliders label{font-size:11px}.rule-step{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;margin:12px 0}.rule-step h3{margin:0 0 10px}.rule-step .number{display:inline-grid;place-items:center;background:var(--ink);color:var(--lime);border-radius:50%;width:25px;height:25px;margin-right:8px}.rule-diagram{display:flex;align-items:center;justify-content:center;gap:16px;margin:13px 0}.rule-diagram .playing-card{--card-w:50px}.rule-diagram .arrow{font-size:25px;color:var(--green)}.rule-label{background:#edf3e4;border-radius:8px;padding:12px;text-align:center;font-size:13px;font-weight:bold}.effect-detail{display:grid;grid-template-columns:190px 1fr;gap:24px;align-items:center}.effect-detail img{width:100%;border-radius:12px;box-shadow:0 10px 20px #0002}.effect-detail h3{font-size:21px!important}.effect-detail button{width:100%;margin-top:12px}.original-rules img{width:100%;height:auto;border:1px solid var(--line);margin-top:10px}.original-rules a{color:var(--green);font-size:12px}.log-list{max-height:55vh;overflow:auto}.log-line{border-bottom:1px solid var(--line);padding:10px 0;font-size:12px;line-height:1.6}.log-line small{color:var(--muted);display:inline-block;width:50px}.settings-row{display:flex;justify-content:space-between;align-items:center;margin:16px 0;gap:15px;font-size:14px}.settings-row input[type=checkbox]{width:21px;height:21px;accent-color:var(--green)}.settings-row select{padding:8px;border:1px solid var(--line);border-radius:7px;background:white}.market-options{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.market-options button{text-align:left;font-size:12px;padding:10px}.market-options .chosen{border:2px solid var(--green);background:#edf5e7;padding:9px}.market-options b{font-size:18px;margin-right:8px}#toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,25px);background:#19323bed;color:#fff;padding:12px 20px;border-radius:12px;max-width:calc(100vw - 32px);width:max-content;z-index:100;opacity:0;pointer-events:none;transition:.2s;font-size:13px;box-shadow:0 8px 24px #0002}#toast.show{opacity:1;transform:translate(-50%,0)}#cutin{position:fixed;left:0;right:0;top:38%;background:linear-gradient(90deg,transparent,#163b36f2 20%,#163b36f2 80%,transparent);color:#e6efc1;text-align:center;padding:24px;z-index:60;pointer-events:none;opacity:0;font-size:29px;font-weight:800;letter-spacing:.06em;text-shadow:0 1px 12px #cfeb9d55}#cutin.show{animation:cutin 1s ease both}#cutin small{display:block;font-size:11px;letter-spacing:.25em;margin-bottom:6px}.flying{position:fixed;z-index:55;pointer-events:none;box-shadow:0 15px 25px #15362c3b}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.row{display:flex;gap:9px;align-items:center}.right{margin-left:auto}.center{text-align:center}.full{width:100%}.spacer{height:12px}details summary{cursor:pointer;font-size:13px;font-weight:700;padding:10px 0}.tip{padding:12px;border-left:3px solid #b6d29a;background:#edf4e4;font-size:12px;line-height:1.7}.empty-owned{font-size:11px;color:var(--muted);line-height:1.6}.match-save{font-size:11px}.reset-row{border-top:1px solid var(--line);padding-top:15px;margin-top:20px}.turn-flow{letter-spacing:.04em;font-size:10px;white-space:nowrap}.sound-on{color:var(--green)}
@keyframes hintglow{50%{outline-color:#ffdd70;box-shadow:0 0 17px #e9b44b77}}@keyframes land{from{transform:scale(1.12) rotate(-5deg);opacity:.5}to{transform:none;opacity:1}}@keyframes cutin{0%{opacity:0;transform:translateX(-70px)}15%,80%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(70px)}}
@media(min-width:1400px){.game{padding-top:25px}.table-area{height:225px}.hand{min-height:165px;--card-w:87px}.table-cards .playing-card{--card-w:88px}}
@media(max-width:1000px){.home{padding:28px 24px}.home-top{gap:15px}.hero-copy h1{font-size:36px}.hero-art{transform:scale(.86);margin:-20px}.deck-select,.start-panel{padding:20px}.game{grid-template-columns:minmax(0,1fr) 275px;padding:14px;gap:13px}.market-item{grid-template-columns:35px 1fr 30px;gap:6px;font-size:11px}.hand{gap:5px;--card-w:64px;min-height:130px}.assets-area{grid-template-columns:1fr}.table-area{padding:12px 17px}.topbar{padding:0 22px}.brand{font-size:18px}}
@media(max-width:760px){.topbar{height:62px;padding:0 14px}.brand{font-size:15px;gap:8px;letter-spacing:0}.brandmark{width:32px;height:37px;font-size:25px}.brand small{font-size:7px;letter-spacing:.13em}nav{gap:1px}nav button{padding:8px;font-size:16px}nav button span{display:none}.home{padding:22px 18px}.home-top{grid-template-columns:1fr;gap:0}.hero-copy h1{font-size:31px;line-height:1.5;margin:9px 0 12px}.hero-copy p{font-size:13px;margin-bottom:12px}.hero-art{height:231px;transform:scale(.72);margin:-17px -40px -20px}.fan{height:285px}.art-note{bottom:-17px}.hero-tags .pill{font-size:10px}.setup-panel{grid-template-columns:1fr;margin-top:28px;border-radius:15px}.deck-select{padding:18px 15px}.section-title h2{font-size:15px}.section-title small{font-size:10px}.theme-list{gap:6px}.theme-option{font-size:10px}.theme-option .playing-card{width:43px;height:61px;--card-w:43px}.theme-option .corner{font-size:12px}.start-panel{border-left:0;border-top:1px solid var(--line);padding:18px;gap:12px}.home-foot{font-size:9px;flex-wrap:wrap}.game{display:block;padding:10px 11px}.game>.market{display:none}.game-meta{font-size:10px;margin-bottom:7px}.turn-flow{font-size:9px}.board{border-radius:15px}.opponents{padding:10px 9px 0;gap:7px}.opponent{padding:7px;max-width:none}.opponent.active{padding:6px}.opponent-head{font-size:10px}.opponent-head b{font-size:16px}.avatar{width:21px;height:21px;font-size:11px;margin-right:3px}.cpu-info{font-size:9px}.cpu-hand{height:23px;margin:4px 0 1px}.cpu-hand i{height:20px;width:14px;margin-left:-5px}.cpu-effects{margin-top:2px!important}.cpu-effects button{font-size:9px;padding:1px 3px}.table-area{height:151px;padding:9px 20px;grid-template-columns:51px minmax(0,1fr) 51px;gap:8px}.deck-pile .playing-card{--card-w:42px}.deck-pile{font-size:9px;gap:6px}.table-cards{min-height:88px;gap:3px}.table-cards .playing-card{--card-w:60px}.table-empty{height:86px;min-width:116px;font-size:10px}.table-label{font-size:10px;margin:6px 0 3px}.discard{width:40px;height:56px;font-size:18px}.guide{margin-top:9px;min-height:65px;padding:10px 12px;gap:9px}.guide b{font-size:13px}.guide p{font-size:11px}.guide .step-icon{font-size:18px}.hand-area{padding:10px 0 0}.hand-head{font-size:10px}.hand-head strong{font-size:12px}.hand-head button{font-size:10px;padding:4px 6px}.hand{justify-content:safe center;--card-w:clamp(40px,11.6vw,58px);gap:5px;padding:19px 3px 9px;min-height:calc(clamp(40px,11.6vw,58px)*1.4 + 30px)}.playing-card{border-radius:6px}.hand .playing-card .corner{font-size:17px}.hand .playing-card.animal .corner,.hand .playing-card.custom.has-image .corner{font-size:16px;padding:2px}.hand .playing-card.selected{transform:translateY(-9px);border-width:2px}.actionbar{position:sticky;bottom:0;z-index:10;background:#f5f5eef2;backdrop-filter:blur(8px);padding:5px 0 max(7px,env(safe-area-inset-bottom));gap:6px}.actionbar button{font-size:11px;padding:8px 5px;min-height:45px}.mobile-market-btn{display:block!important}.action-sub{font-size:10px;line-height:1.5;margin:0 0 7px}.assets-area{grid-template-columns:1fr 1fr;gap:10px;padding-top:8px}.stock-heading{font-size:10px}.stock-heading .tiny{font-size:9px}.stock-cards{gap:3px}.stock-cards .playing-card{--card-w:25px;height:37px}.stock-cards .playing-card .corner{font-size:11px}.stock-cards .playing-card .pip{font-size:15px}.owned-list button{font-size:10px;padding:5px}.owned-list button b{font-size:12px}.empty-owned{font-size:10px}.session-footer{font-size:9px}.theme-modal-list{gap:5px}.theme-modal-list .theme-option{padding:8px 3px;font-size:10px}.theme-preview{gap:11px}.theme-preview .playing-card{--card-w:86px;width:86px;height:120px}.theme-preview .corner{font-size:23px}.modal-head{padding:13px 17px}.modal-head h2{font-size:17px}#modal-content{padding:16px}.effect-detail{grid-template-columns:130px 1fr;gap:15px}.effect-detail h3{font-size:17px!important}.effect-detail p{font-size:12px!important}.market-items .market-item{grid-template-columns:42px 1fr 43px;font-size:13px;padding:10px 9px}.market-items .market-item small{font-size:11px}.market-head{border-radius:10px}.rule-diagram{gap:10px}.rule-label{font-size:11px;padding:10px}#cutin{font-size:24px;padding:20px}.sliders{gap:8px}.row{flex-wrap:wrap}.game-meta .pill{font-size:9px;padding:4px 7px}}
@media(max-width:360px){.hand{gap:3px;--card-w:39px}.brand{font-size:13px}.hero-copy h1{font-size:28px}.table-area{padding:9px 12px}.opponent-head{font-size:9px}.avatar{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* The same selected back design is used on CPU hands and the deck. */
.cpu-hand .playing-card{--card-w:17px;width:17px;height:24px;min-width:17px;border:2px solid #fff;border-radius:3px;margin-left:-4px;box-shadow:1px 1px 0 #a5bb9e;font-size:8px}.cpu-hand .playing-card:before{border-width:0;width:100%;height:100%}.stock-cards button.playing-card{--card-w:44px;min-width:44px;height:62px}.stock-cards button.playing-card .corner{font-size:17px}.stock-cards button.playing-card .pip{font-size:23px}
@media(max-width:760px){.cpu-hand .playing-card{--card-w:14px;width:14px;min-width:14px;height:20px;margin-left:-5px;font-size:7px}.table-cards:has(.playing-card:nth-child(4)) .playing-card{--card-w:46px}}

/* v1.1: image composition, physical collections and staged card transfers. */
.playing-card .art img{transform:translate(var(--offset-x,0%),var(--offset-y,0%)) rotate(var(--rotation,0deg)) scale(var(--zoom,1));transform-origin:center;user-select:none;max-width:none}
#sound-toggle{white-space:nowrap;min-width:68px}#sound-toggle[aria-pressed=true]{color:var(--green);background:#edf5e6}#sound-toggle[aria-pressed=false]{color:var(--muted)}
.game{max-width:1580px;grid-template-columns:minmax(0,1fr) 400px;gap:22px}.game-main{min-width:0}.game>.market{position:sticky;top:16px;max-height:calc(100dvh - 32px);overflow-y:auto;scrollbar-width:thin}.market-head{position:sticky;top:0;z-index:2;border-bottom:1px solid var(--line)}.market-head h2 small{font-size:11px;margin-left:10px;color:var(--muted);font-weight:400}.market-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}.market-items .market-item{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:8px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;min-width:0}.market-image{position:relative;max-width:185px;width:100%;align-self:center}.market-image img{display:block;width:100%;aspect-ratio:63/88;object-fit:contain;border-radius:8px;box-shadow:0 3px 7px #203c2526}.market-badge{display:block;position:absolute;right:0;bottom:5px;padding:4px 7px;background:#f7faecef;border-radius:5px 0 0 5px;font-size:10px;color:var(--ink);box-shadow:0 1px 4px #0001}.market-copy{padding:10px 2px 1px;flex:1;display:flex;flex-direction:column}.market-copy b{font-size:12px;line-height:1.5}.market-copy p,#modal-content .market-copy p{font-size:12px;font-weight:400;line-height:1.7;margin:7px 0 9px;color:#43595a}.market-price{display:flex;gap:6px;align-items:center;justify-content:space-between;margin-top:auto;font-size:9px;color:var(--muted)}.market-price strong{font-size:15px;color:var(--ink);white-space:nowrap}.market-items .market-item.buyable{border-color:#8aa97a;background:#f7fbee}.market-items .market-item.owned{opacity:1;background:#f0f5e9}.market-item.owned .market-badge{background:#2f745a;color:white}.market-items .market-item.highlight{outline:3px solid #dfb158;outline-offset:-2px}
.assets-area{display:flex;flex-direction:column;gap:16px;padding:16px 4px;min-width:0}.stock-cards{min-height:55px}.collection{background:#edf1e4;padding:14px;border:1px solid #d6dfca;border-radius:13px;min-width:0;box-shadow:inset 0 -3px 0 #d4ddc866}.collection .stock-heading{margin-bottom:12px;gap:8px}.collection .stock-heading b{border-radius:14px;background:#d6e5bc;padding:2px 8px;font-size:11px}.owned-list{flex-wrap:nowrap;overflow-x:auto;gap:10px;min-height:151px;padding:4px 4px 9px;scrollbar-width:thin;align-items:flex-start}.owned-list .owned-card{padding:0;border:0;background:transparent;flex:0 0 96px;border-radius:7px;transition:transform .15s;white-space:normal}.owned-card img{display:block;width:100%;aspect-ratio:63/88;object-fit:contain;border-radius:7px;box-shadow:2px 4px 0 #b9c5aa,3px 7px 12px #1d362922}.owned-card span{display:block;font-size:10px;font-weight:500;padding-top:7px;line-height:1.4}.owned-list .owned-card:hover{transform:translateY(-3px);background:transparent}.collection-empty{display:flex;align-items:center;justify-content:center;gap:17px;min-height:140px;width:100%;border:1px dashed #b3c3a2;border-radius:8px}.collection-empty>span{display:grid;place-items:center;width:56px;height:80px;border:2px dashed #b3c3a2;border-radius:6px;font-size:24px;color:#91a280}.collection-empty p{font-size:12px;line-height:1.9;color:var(--muted)}.cpu-effects{display:flex;align-items:flex-start;overflow-x:auto;flex-wrap:nowrap;max-width:100%;gap:4px;scrollbar-width:thin;padding-bottom:3px}.cpu-effects .owned-card.small{width:32px;min-width:32px;padding:0;border:0;background:transparent}.cpu-effects .owned-card img{border-radius:3px;box-shadow:1px 2px 2px #152c3622}.cpu-effects .owned-card span{display:none}.opponent .ghost{padding:2px 0;font-size:9px}.opponent{min-width:0}.cpu-info span{min-width:30px}
.table-area{min-height:210px;height:auto;padding-bottom:26px}.table-center{min-width:0}.table-cards{min-height:125px}.played-stack{--card-w:78px;position:relative;width:calc(var(--card-w) + (var(--stack-count) - 1)*12px);height:calc(var(--card-w)*1.4 + (var(--stack-count) - 1)*4px);margin:0 auto}.stack-layer{position:absolute;left:calc(var(--layer)*12px);top:calc(var(--layer)*4px);z-index:var(--layer)}.table-cards .stack-layer .playing-card{--card-w:78px}.stack-rule{font-size:11px;color:#375851;line-height:1.6;margin-top:5px}.stack-rule b:last-child{font-size:16px;background:#fff9;border-radius:4px;padding:0 5px}.table-label{white-space:normal}.top-card-controls{display:flex;justify-content:center;align-items:center;gap:13px;padding:8px 10px;margin:0 0 9px;background:#e9f1df;border-radius:10px}.top-card-controls>span{font-size:12px}.top-card-controls small{display:block;font-size:9px;color:var(--muted);font-weight:400;margin-top:3px}.top-card-controls>div{display:flex;gap:5px}.top-card-controls button{font-family:Georgia,serif;font-size:19px;padding:5px 8px;min-width:46px}.top-card-controls button small{font-family:inherit;font-size:8px}.top-card-controls button.chosen{background:#2b5d4d;color:#fff;border-color:#2b5d4d}.top-card-controls button.chosen small{color:#e0f3d6}.declaration-options{display:flex;align-items:center;flex-wrap:wrap;gap:8px 13px;padding:10px;border:1px solid var(--line);border-radius:9px;margin:8px 0;background:#fff}.declaration-options>span{font-size:10px;color:var(--muted)}.declaration-options label{font-size:11px;display:flex;align-items:center;gap:4px}.declaration-options small{flex-basis:100%;font-size:10px;color:var(--muted);line-height:1.6}.declaration-options input{accent-color:var(--green);width:17px;height:17px}.hand-count{display:inline-block;border-radius:6px;background:#e6efd9;padding:3px 7px;margin-left:4px}.hand{justify-content:safe center}
.image-editor{display:grid;grid-template-columns:225px minmax(0,1fr);align-items:center;gap:25px;margin:24px 0}.editor-stage{background:repeating-conic-gradient(#edf0e7 0% 25%,#f6f8f2 0% 50%) 50% / 16px 16px;padding:17px 12px 6px;border-radius:12px;overflow:hidden}.editor-card{--card-w:185px;width:185px;height:259px;margin:auto;touch-action:none;cursor:grab;outline:2px dashed #829b70;outline-offset:5px;border-radius:9px}.editor-card:active{cursor:grabbing}.editor-card .playing-card{--card-w:185px;width:185px;height:259px;pointer-events:none}.editor-card .corner{font-size:35px}.editor-stage p{font-size:11px!important;text-align:center;line-height:1.6!important;margin:14px 0 5px}.editor-stage p span{color:var(--muted);font-size:9px}.editor-controls label{margin:0 0 15px;font-size:12px}.editor-controls output{float:right;color:var(--green);font-size:12px;font-variant-numeric:tabular-nums}.editor-controls input{display:block;width:100%;margin:12px 0 0;accent-color:var(--green);cursor:ew-resize}.editor-buttons{display:flex;flex-wrap:wrap;gap:5px}.editor-buttons button{padding:7px;font-size:11px}.editor-controls p{font-size:11px!important;line-height:1.7}.settings-row input[type=range]{width:150px;accent-color:var(--green)}
.card-flight{position:fixed;z-index:70;pointer-events:none;perspective:600px;will-change:transform}.flight-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d}.card-flight .playing-card{--card-w:62px;width:100%;height:100%;position:absolute;inset:0;backface-visibility:hidden;box-shadow:0 12px 24px #18372b33}.card-flight .playing-card:nth-child(2){transform:rotateY(180deg)}.card-flight .effect-flight{width:100%;height:100%;object-fit:contain;border-radius:7px;box-shadow:0 12px 24px #18372b44}.card-flight .playing-card .corner{font-size:17px}#cutin.show{animation-duration:1.2s}
@media(min-width:1400px){.game{grid-template-columns:minmax(0,1fr) 440px}.market-copy b{font-size:13px}.market-copy p{font-size:13px}}
@media(max-width:1100px) and (min-width:761px){.game{grid-template-columns:minmax(0,1fr) 340px;gap:14px}.market-items{gap:8px;padding:9px}.market-copy b{font-size:11px}.market-copy p{font-size:11px}.opponents{gap:6px}.table-area{padding:14px 12px 26px}.hand{--card-w:56px;gap:4px}.hand-head>span{display:none}.actionbar button{font-size:11px}.top-card-controls{gap:5px}.top-card-controls button{min-width:38px;padding:5px}.top-card-controls>span{font-size:10px}.collection .stock-heading{font-size:11px}}
@media(max-width:760px){#sound-toggle{min-width:44px;font-size:13px;padding:7px 6px}#sound-toggle span{display:inline;font-size:8px}.game{display:block;padding:10px 11px}.game>.market{display:none}.table-area{min-height:175px;padding:12px 13px 25px}.played-stack{--card-w:58px;width:calc(58px + (var(--stack-count) - 1)*10px);height:calc(81px + (var(--stack-count) - 1)*3px)}.table-cards{min-height:90px}.stack-layer{left:calc(var(--layer)*10px);top:calc(var(--layer)*3px)}.table-cards .stack-layer .playing-card{--card-w:58px}.stack-rule{font-size:9px;margin-top:3px}.stack-rule b:last-child{font-size:13px}.table-label{font-size:9px}.assets-area{gap:12px;padding:12px 0}.stock-cards{min-height:45px}.collection{padding:11px 10px}.collection .stock-heading{font-size:11px}.owned-list{min-height:130px;gap:9px}.owned-list .owned-card{flex-basis:78px;padding:0}.owned-list .owned-card span{font-size:9px}.collection-empty{min-height:116px;gap:13px}.collection-empty p{font-size:10px}.cpu-effects .owned-card.small{width:25px;min-width:25px;padding:0}.market-items{gap:12px;padding:12px 0}.market-items .market-item{padding:8px;display:flex}.market-copy b{font-size:12px}.market-copy p,#modal-content .market-copy p{font-size:12px}.top-card-controls{gap:7px;justify-content:space-between;padding:8px}.top-card-controls>span{font-size:10px}.top-card-controls button{font-size:17px;min-width:35px;padding:5px}.top-card-controls small{font-size:8px}.top-card-controls button small{font-size:7px}.top-card-controls>div{gap:3px}.image-editor{grid-template-columns:1fr;gap:20px}.editor-stage{max-width:250px;width:100%;margin:auto;padding:17px 12px 6px}.editor-controls{display:grid;grid-template-columns:1fr 1fr;gap:6px 20px}.editor-controls .editor-buttons,.editor-controls>p{grid-column:1/-1}.editor-controls label{margin-bottom:7px}.upload-panel{padding:12px}.effect-detail{grid-template-columns:1fr;gap:12px}.effect-detail img{max-width:225px;margin:0 auto}.effect-detail p{font-size:14px!important}.effect-detail h3{font-size:19px!important}.effect-detail button{min-height:48px}.actionbar{padding-bottom:max(7px,env(safe-area-inset-bottom))}}
@media(max-width:360px){.brand{font-size:12px}.brandmark{width:26px;height:32px}.topbar{padding:0 9px}nav button{padding:7px 6px}.top-card-controls{flex-direction:column;align-items:flex-start}.top-card-controls>div{align-self:flex-end}.market-items{gap:8px}.market-items .market-item{padding:6px}.market-copy b,.market-copy p,#modal-content .market-copy p{font-size:11px}}

/* Ongoing effects live between the field and hand; never cover the cards. */
.ongoing-effects{margin-top:10px;border:1px solid #bccca9;border-radius:12px;background:#f0f5e6;overflow:hidden}.ongoing-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;font-size:11px;color:#557143}.ongoing-heading>strong{display:flex;align-items:center;gap:7px;color:#36552e;font-size:12px}.ongoing-heading i{width:7px;height:7px;background:#6a953a;border-radius:50%;display:inline-block;box-shadow:0 0 0 3px #6a953a18}.ongoing-heading strong span{background:#dce9c7;border-radius:9px;padding:0 6px;line-height:18px}.ongoing-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:8px;padding:0 10px 10px}.ongoing-effect{display:flex;align-items:center;gap:11px;text-align:left;padding:10px;border:1px solid #cad8b8;border-radius:9px;background:#fffef7;min-width:0;width:100%;box-shadow:0 2px 0 #c6d5b430}.ongoing-effect img{width:39px;height:55px;object-fit:contain;border-radius:4px;box-shadow:0 2px 5px #23361922;flex-shrink:0}.ongoing-copy{display:flex;flex-direction:column;gap:5px;min-width:0;line-height:1.5}.ongoing-copy>b{font-size:12px;color:#55614d}.ongoing-rule{display:flex;align-items:center;flex-wrap:wrap;gap:2px 8px;font-size:11px;font-weight:500}.ongoing-rule strong{font-size:14px;color:#244e45}.ongoing-rule .red{color:#ba354a}.ongoing-copy small{font-size:10px;font-weight:400;color:#627060}.ongoing-effect.reversed{background:#f7f4ff;border-color:#d9cfea}.ongoing-effect.reversed .ongoing-rule strong{color:#604b84}.ongoing-effects.is-empty{background:transparent;border-color:transparent;margin-top:4px}.ongoing-effects.is-empty .ongoing-heading{padding:6px 4px;color:var(--muted)}.ongoing-effects.is-empty .ongoing-heading>strong{color:var(--muted);font-weight:500;font-size:11px}.ongoing-effects.is-empty i{background:#abb6a2;box-shadow:none}
@media(max-width:760px){.ongoing-effects{margin-top:8px;border-radius:10px}.ongoing-heading{padding:9px 10px;font-size:10px}.ongoing-heading>strong{font-size:11px}.ongoing-list{gap:7px;padding:0 8px 8px}.ongoing-effect{padding:9px;gap:10px}.ongoing-copy>b{font-size:11px}.ongoing-rule strong{font-size:13px}.ongoing-copy small{font-size:10px;line-height:1.6}.ongoing-rule{font-size:11px}.ongoing-effect img{width:35px;height:49px}}

/* Visible exit control, exact CPU stock targets, and a shared large card preview. */
.game-meta{flex-wrap:wrap}.game-menu{display:flex;align-items:center;gap:7px;margin-left:auto}.game-menu .exit-game{padding:8px 11px;background:#fffdf5;border:1px solid #bccac0;color:#425749;font-size:12px}.game-menu .exit-game:hover{background:#e8f0e0}.cpu-info{align-items:center;gap:8px}.cpu-stock{display:flex;align-items:center;gap:7px;border:1px solid #d6c38f;background:#fff8e5;padding:6px 9px;border-radius:9px;text-align:left;flex-shrink:0}.cpu-stock:not(:disabled):hover{background:#fff1c4}.stock-symbol{display:block;width:32px;height:43px;min-width:32px;flex-shrink:0}.stock-symbol svg{display:block;width:100%;height:100%}.cpu-stock-label{font-size:10px;font-weight:500;line-height:1.5}.cpu-stock-label strong{display:block;font-size:19px;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums}.cpu-stock-label small{font-size:9px;margin-left:3px;font-weight:400}.stock-flight-symbol{position:absolute;inset:0;display:block}.stock-flight-symbol svg{width:100%;height:100%;display:block}.effect-hover{position:fixed;inset:auto;margin:0;width:260px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:14px;background:#fffef7;border:1px solid #b4c6b2;border-radius:14px;box-shadow:0 12px 45px #102c3855;z-index:120;color:var(--ink);scrollbar-width:thin;text-align:left}.effect-hover[hidden]{display:none}.effect-hover::backdrop{background:transparent;pointer-events:none}.effect-hover>img{display:block;width:100%;height:auto;max-height:min(310px,46dvh);object-fit:contain;border-radius:9px;margin-bottom:12px}.effect-hover>strong{font-size:15px;display:block;line-height:1.5}.effect-hover>p{font-size:14px;line-height:1.8;margin:9px 0}.effect-hover>small{display:block;font-size:11px;line-height:1.7;color:var(--muted)}
@media(max-width:1100px){.cpu-stock{padding:5px 6px;gap:5px}.stock-symbol{width:27px;height:36px;min-width:27px}.cpu-stock-label{font-size:9px}.cpu-stock-label strong{font-size:17px}}
@media(max-width:760px){.game-menu{gap:5px}.game-menu .exit-game{font-size:11px;min-height:34px;padding:6px 8px}.game-meta .turn-flow{order:3;flex-basis:100%;font-size:9px;padding:1px 0 3px}.cpu-info{flex-wrap:wrap;gap:3px}.cpu-stock{padding:4px 5px;gap:4px;max-width:100%}.stock-symbol{width:24px;height:32px;min-width:24px}.cpu-stock-label{font-size:8px}.cpu-stock-label strong{font-size:17px}.cpu-stock-label small{font-size:8px}.cpu-info>span{font-size:8px}.effect-hover{width:240px}}
/* Readable sold-out cards keep their detail/hover interactions. */
.market-item.sold-out,.market-item.sold-out:hover{background:#e9eae6;border-color:#b9beb7;box-shadow:none}.market-item.sold-out .market-image img{filter:grayscale(1);opacity:.57}.market-item.sold-out .market-copy{color:#59615b}.sold-out-label{position:absolute;inset:36% 0 auto;background:#48524beF;color:#fff;font-size:12px;font-weight:800;letter-spacing:.1em;text-align:center;padding:6px 2px;border-block:1px solid #ffffff80}.market-item.sold-out .market-badge{background:#d5d9d2;color:#394b3c}.market-item.sold-out.owned .market-badge{background:#dbe6d1;color:#2d5032}
.stock-hover{width:360px}.stock-preview-cards{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px;padding:14px 0}.stock-preview-cards .playing-card{--card-w:64px;flex-shrink:0}.stock-preview-cards .corner{font-size:19px}.stock-preview-cards>p{font-size:13px;line-height:1.8}
/* Guided practice is in normal document flow, beside the hand it explains. */
.tutorial-panel{margin:12px 0;padding:20px 22px;background:#fffaf0;border:2px solid #ccb775;border-radius:14px;scroll-margin-top:76px;box-shadow:0 3px 0 #e8dfc4}.tutorial-progress{display:flex;justify-content:space-between;gap:12px;color:#765c29;font-size:12px}.tutorial-progress span{font-size:11px}.tutorial-track{display:flex;gap:5px;margin:10px 0 16px}.tutorial-track i{height:4px;flex:1;background:#e8e1ce;border-radius:8px}.tutorial-track .done{background:#a9873c}.tutorial-panel h2{font-size:19px;line-height:1.55;margin:0 0 9px;color:#354c37}.tutorial-panel p{font-size:14px;line-height:1.9;margin:8px 0 12px}.tutorial-example{font-size:14px;line-height:1.8;font-weight:700;padding:12px 15px;border-radius:8px;background:#eaf0dd;color:#365d3b;margin:12px 0}.tutorial-panel .tutorial-note{font-size:13px;color:#5d604d}.tutorial-panel>button{min-height:44px;margin-top:3px;white-space:normal}.tutorial-paused{display:block;font-size:10px;color:#716b57;margin-top:9px}.tutorial-memory{border-top:1px solid #dfd5bd;margin-top:15px;padding-top:10px;color:#5d604d}.tutorial-memory summary{font-size:11px;cursor:pointer;padding:3px 0}.tutorial-memory p{font-size:12px;margin:8px 0}.tutorial-panel:has(.tutorial-paused) .tutorial-progress:after{content:'確認中';border-radius:4px;padding:1px 6px;background:#e8dfc4;font-size:10px;margin-left:auto}
@media(max-width:760px){.tutorial-panel{padding:15px 14px;margin:10px 0;scroll-margin-top:66px}.tutorial-panel h2{font-size:17px}.tutorial-panel p{font-size:13px;line-height:1.85}.tutorial-panel .tutorial-note{font-size:12px}.tutorial-panel>button{width:100%;font-size:13px}.tutorial-example{font-size:12px;padding:10px 11px}.tutorial-progress{font-size:11px;gap:7px}.tutorial-progress span{font-size:10px}.stock-hover{width:320px}.stock-preview-cards{gap:8px}.stock-preview-cards .playing-card{--card-w:58px}}

/* v1.3: original vector logo and persistent Japanese / English controls. */
.hero-copy h1.game-logo{margin:16px 0 20px;padding:18px 24px;max-width:460px;border-radius:18px;background:radial-gradient(ellipse at top,#28515d,#142a33 75%);line-height:0;box-shadow:0 8px 25px #19323b18}
.game-logo img{display:block;width:100%;height:auto}
.hero-copy .hero-tagline{font-size:clamp(21px,2.3vw,30px);line-height:1.55;margin:0 0 12px;letter-spacing:.025em}
.hero-tagline em{color:var(--green);font-style:normal}
.language-picker{display:inline-flex;align-items:center;flex-shrink:0}
.language-picker select{color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:8px;font-size:12px;padding:8px 24px 8px 9px;cursor:pointer;min-height:36px;max-width:110px}
.modal-head .language-picker{margin-left:auto}.modal-head h2{min-width:0;overflow-wrap:anywhere}.modal-head{gap:10px}
html[lang="en"] .brand{letter-spacing:0;font-size:19px}
html[lang="en"] .hero-tagline{font-family:inherit;letter-spacing:-.02em}
html[lang="en"] .hero-copy p{line-height:1.7}
html[lang="en"] .actionbar button{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
html[lang="en"] .market-copy,html[lang="en"] .guide,html[lang="en"] .ongoing-copy{overflow-wrap:anywhere}
html[lang="en"] .theme-option span{display:block;line-height:1.35}
html[lang="en"] .stock-heading{flex-wrap:wrap;gap:5px}
@media(max-width:760px){
 .hero-copy h1.game-logo{max-width:360px;margin:5px auto 20px;padding:16px 20px}
 .hero-copy .hero-tagline{font-size:23px}
 .topbar{height:auto;min-height:64px;gap:10px;flex-wrap:wrap;padding-block:10px}
 .topbar nav{margin-left:auto;align-items:center}.language-picker select{font-size:11px;padding:7px 17px 7px 6px;max-width:88px}
 html[lang="en"] .brand{font-size:15px}.modal-head .language-picker select{max-width:85px}
 html[lang="en"] .cpu-stock-label{font-size:9px}html[lang="en"] .cpu-stock-label small{font-size:7px}
 html[lang="en"] .opponent-head{flex-wrap:wrap;gap:3px}html[lang="en"] .game-meta .turn-flow{font-size:10px}
 html[lang="en"] .hand-head{flex-wrap:wrap;gap:5px}html[lang="en"] .actionbar button{font-size:10px}
 html[lang="en"] .assets-area{grid-template-columns:1fr}html[lang="en"] .theme-option{font-size:10px}
}
@media(max-width:380px){.brand small{display:none}.topbar{gap:6px}.brandmark{display:none}.topbar nav button{padding:7px 5px}.language-picker select{min-height:32px}}

/* v1.4: one compact table, with optional explanations below the viewport. */
html[data-screen="game"] .topbar{height:44px;min-height:44px;padding:0 16px;flex-wrap:nowrap;gap:8px}
html[data-screen="game"] .brand{font-size:14px;gap:7px;letter-spacing:0}
html[data-screen="game"] .brand small{display:none}
html[data-screen="game"] .brandmark{width:27px;height:30px;font-size:22px}
html[data-screen="game"] nav{gap:3px;align-items:center}
html[data-screen="game"] nav button{padding:6px 8px}
.game{display:block;max-width:1200px;padding:6px 16px 20px}
.game-main{height:calc(100svh - 56px);height:calc(100dvh - 56px);min-height:530px;display:grid;grid-template-rows:28px 42px minmax(180px,1.1fr) auto minmax(145px,1fr) 80px;gap:5px}
.game-main>*{min-width:0;min-height:0}
.game-meta{margin:0;flex-wrap:nowrap;gap:5px;line-height:1}
.game-meta .pill{font-size:10px;padding:5px 7px;white-space:nowrap}
.game-meta .turn-flow{font-size:10px}
.game-menu{gap:3px}.game-menu button,.game-menu .exit-game{min-height:28px;padding:4px 8px;font-size:11px;white-space:nowrap}
.turn-banner{display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:10px;padding:6px 12px;border:2px solid #758e97;background:#e8eef0;color:#324d5d}
.turn-banner.your-turn{border-color:#1c6948;background:#d9f3b4;color:#174b2d;box-shadow:inset 5px 0 #267444}
.turn-banner.finished{background:#fff0c9;border-color:#b18d3b}
.turn-identity{display:flex;gap:7px;align-items:center;min-width:0}
.turn-identity strong{font-size:18px;white-space:nowrap}.turn-identity small{font-size:11px}.turn-indicator{font-size:18px}
.victory-progress{display:block;font-size:11px;line-height:1.3;color:#4d634c;white-space:nowrap}
.turn-banner .victory-progress{padding:5px 9px;background:#ffffffb0;border-radius:7px;font-weight:700;font-size:12px}
.victory-progress.near-win{color:#963f14;font-weight:800;background:#fff0d2;border-radius:4px}
.board{display:grid;grid-template-rows:minmax(85px,.8fr) minmax(90px,1fr);gap:5px;padding:7px;border-radius:12px;overflow:visible}
.opponents{padding:0;gap:8px;min-height:0;align-items:stretch}
.opponent,.opponent.active{position:relative;padding:5px 7px;max-width:none;border-width:1px;display:grid;grid-template-columns:1fr;grid-template-rows:20px 26px 15px minmax(25px,1fr);gap:1px}
.opponent.active{outline:3px solid #547a9f;outline-offset:-2px;background:#eef7ff;box-shadow:0 0 0 2px #547a9f18}
.opponent-head{font-size:12px}.opponent-head b{font-size:17px}.avatar{width:18px;height:18px;font-size:12px}
.cpu-hand{position:absolute;top:26px;right:8px;width:36px;height:24px;margin:0;pointer-events:none;opacity:.5;overflow:hidden}
.cpu-hand .playing-card{--card-w:14px;width:14px;min-width:14px;height:20px;margin-left:-8px}
.cpu-info{gap:5px;flex-wrap:nowrap;padding-right:30px;font-size:10px}
.cpu-stock{padding:1px 5px;gap:4px;min-height:26px;max-width:100%;border-radius:5px}
.stock-symbol{width:16px;min-width:16px;height:22px}.cpu-stock-label{display:flex;align-items:center;gap:5px;font-size:10px}.cpu-stock-label strong{font-size:15px}.cpu-stock-label small{font-size:9px}
.cpu-info .seat-turn{font-weight:800;white-space:nowrap;min-width:0}
.cpu-effects{margin:0!important;gap:3px;padding:0;align-items:center;min-height:0}
.owned-card{position:relative}
.owned-card .effect-key{display:none}
.game-main .owned-card .effect-name{display:none}
.game-main .owned-card .effect-key{display:flex;align-items:center;justify-content:space-between;gap:2px;padding:0 4px;font-weight:800;background:#fffdf3eb;border:1px solid #bbcaad;border-radius:5px;width:100%;height:100%;color:#294d3a}
.game-main .owned-card .effect-key b{font-size:15px;white-space:nowrap;margin:0;color:inherit}
.game-main .owned-card .effect-key small{display:flex;gap:2px;align-items:center;font-size:10px}
.game-main .owned-card img{position:absolute;inset:0;z-index:-1;width:100%;height:100%;opacity:.4}
.game-main .owned-card{isolation:isolate}
.game-main .cpu-effects .owned-card.small{width:43px;min-width:43px;height:28px;flex-shrink:0}
.game-main .cpu-effects .effect-key{flex-direction:column;justify-content:center;gap:0;padding:1px 2px;line-height:1}
.game-main .cpu-effects .effect-key b{font-size:12px}.game-main .cpu-effects .effect-key small{font-size:9px}.game-main .cpu-effects .coin{width:5px;height:8px}
.common-zone{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.4fr);gap:9px;min-height:0;align-items:stretch}
.table-area{height:100%;min-height:0;padding:0 6px;grid-template-columns:42px minmax(0,1fr) 42px;gap:4px}
.deck-pile{font-size:9px;gap:3px}.deck-pile .playing-card{--card-w:32px}.discard{width:29px;height:40px;font-size:17px}
.table-center{min-width:0}.table-cards{min-height:0;height:68px;align-items:center}.played-stack{--card-w:42px;width:calc(42px + (var(--stack-count) - 1)*8px);height:calc(59px + (var(--stack-count) - 1)*3px)}
.stack-layer{left:calc(var(--layer)*8px);top:calc(var(--layer)*3px)}.table-cards .stack-layer .playing-card{--card-w:42px}
.table-cards .playing-card .corner{font-size:15px}.table-cards .playing-card .corner.bottom{display:none}
.table-empty{height:62px;min-width:0;width:100%;font-size:10px}.table-empty b{font-size:22px}
.table-label{font-size:10px;margin-top:2px;line-height:1.2}.stack-rule{font-size:9px;margin-top:1px;line-height:1.1}.stack-rule b:last-child{font-size:12px}
.board-market{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px;border-left:1px solid #c7d7c3;padding-left:8px}
.compact-market-head{display:flex;justify-content:space-between;align-items:center;gap:3px;font-size:11px;height:23px}
.compact-market-head button{padding:2px 6px;font-size:10px;min-height:23px}
.compact-market-items{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(32px,1fr));gap:4px;flex:1;max-height:106px}
.market-tile{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;gap:1px;padding:3px 5px;border-radius:6px;text-align:left;background:#fffdf6;min-width:0;isolation:isolate;overflow:hidden}
.market-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.1;z-index:-1}
.market-tile>b{font-size:18px;line-height:1}.market-tile small{font-size:9px;line-height:1;grid-column:1/-1;color:#68735b;text-align:right}
.tile-cost{display:flex;gap:3px;align-items:center;font-size:12px}.tile-cost .coin{width:7px;height:10px}
.market-tile.buyable{border-color:#76a15b;background:#f1ffd9}.market-tile.owned{background:#d8e6d2}.market-tile.sold-out{background:#e4e5e1;color:#888;filter:grayscale(1)}
.game-main .ongoing-effects{margin:0;border-radius:7px;display:flex;align-items:center;gap:5px;padding:3px 5px}
.game-main .ongoing-effects.is-empty{display:none}
.game-main .ongoing-heading{padding:0;flex-direction:column;gap:1px;font-size:9px;flex-shrink:0}.game-main .ongoing-heading strong{font-size:10px;gap:3px}.game-main .ongoing-heading i{display:none}
.game-main .ongoing-list{padding:0;display:flex;gap:5px;flex:1;min-width:0}.game-main .ongoing-effect{padding:3px 6px;gap:4px;min-height:34px}
.game-main .ongoing-effect img{width:20px;height:28px}.game-main .ongoing-copy{gap:1px;line-height:1.2}.game-main .ongoing-copy>b{font-size:9px}.game-main .ongoing-copy small{display:none}.game-main .ongoing-rule{font-size:9px;gap:2px}.game-main .ongoing-rule strong{font-size:11px}
.hand-area{display:flex;flex-direction:column;padding:5px 7px 3px;border:1px solid #d3ddce;border-radius:10px;background:#fbfcf8}
.hand-area.active{border:2px solid #47875b;padding:4px 6px 2px;background:#f4fbe9;box-shadow:inset 4px 0 #6faa62}
.hand-head{flex-shrink:0;height:22px;gap:3px;flex-wrap:nowrap!important}.hand-head strong{font-size:12px}.hand-head>span{font-size:10px}.hand-head button{padding:2px 5px;font-size:10px}.hand-count{padding:1px 4px}
.hand{--card-w:54px;flex:1;min-height:57px;align-items:center;padding:9px 3px 5px;gap:5px}
.hand .playing-card{--card-w:54px;max-height:100%;min-height:42px;aspect-ratio:5/7;height:auto;width:auto;flex:0 0 auto;max-width:70px}
.hand .playing-card .corner{font-size:17px}.hand .playing-card .corner.bottom{display:none}
.hand .playing-card.selected,.hand .playing-card.selected:not(:disabled):hover{transform:translateY(-5px);box-shadow:0 2px 0 #8fc8a6}
.actionbar{flex-shrink:0;padding:3px 0 2px;gap:5px}.actionbar button{min-height:38px;padding:5px;font-size:12px;line-height:1.2}.actionbar .small-btn{min-width:32px}.actionbar .mobile-market-btn{display:block!important;max-width:100px}
.declaration-options{margin:2px 0;padding:3px 5px;gap:4px;background:#fff1cc;border:2px solid #d59121;flex-wrap:nowrap;flex-shrink:0}
.declaration-options>strong{font-size:13px;color:#8b4a0b;flex-shrink:0}
.declare-button{background:#ffe3a0;border:1px solid #ce8520;border-bottom:3px solid #b87319;min-height:40px;flex:1;padding:3px 6px;display:flex;flex-direction:column;justify-content:center;gap:2px;color:#653500;line-height:1.1}
.declare-button b{font-size:12px}.declare-button small{font-size:9px}.declare-button[aria-disabled="true"]{background:#f8edd6;color:#836c4d;border-color:#b9a98a}.declare-button.chosen{background:#8f4d0e;color:#fff7dd;border-color:#7d4207;box-shadow:0 0 0 2px #ffd575}
.top-card-controls{padding:2px 5px;margin:0 0 2px;gap:3px;flex-direction:row;flex-shrink:0}.top-card-controls>span{font-size:10px}.top-card-controls small{margin:0}.top-card-controls>div{gap:3px;align-self:center}.top-card-controls button{padding:2px 6px;font-size:16px;min-width:32px;min-height:30px}.top-card-controls button small{display:none}
.required-prompt{font-size:11px;background:#fff1d6;border-left:4px solid #d7982d;padding:4px 7px;line-height:1.4;flex-shrink:0}.required-prompt b{margin-right:5px}.rank-choices,.target-choices{gap:3px;margin:3px 0;flex-shrink:0}.rank-choices button{min-width:25px;padding:4px;min-height:30px}.target-choices button{padding:5px 10px;min-height:30px;font-size:12px}
.assets-area{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.5fr);gap:8px;padding:2px 0 0;border:0;min-width:0}
.assets-area>section{min-width:0;border-radius:7px;padding:5px 7px;border:1px solid #d1ddc7;background:#eef4e6}
.assets-area .stock-heading{font-size:11px;flex-wrap:nowrap!important;gap:3px;margin:0 0 3px;line-height:1.2;height:17px;white-space:nowrap}
.assets-area .stock-heading strong{gap:3px}.assets-area .stock-heading .tiny{font-size:9px}.assets-area .stock-heading button{padding:2px;font-size:10px}.collection .stock-heading b{padding:1px 4px;font-size:10px}
.assets-area .stock-cards{min-height:0;height:44px;padding:1px;gap:3px;align-items:center}.assets-area .stock-cards .playing-card{--card-w:27px;width:27px;height:38px}
.game-main .owned-list{min-height:0;height:45px;padding:1px 0 3px;gap:4px;align-items:center}
.game-main .owned-list .owned-card{flex:0 0 50px;width:50px;height:38px;border:0;padding:0}
.game-main .owned-list .owned-card:hover{transform:none}
.collection-empty{min-height:0;height:auto;border:0;justify-content:flex-start;gap:0}.collection-empty>span{display:none}.collection-empty p{font-size:10px;line-height:1.3;margin:0}.collection-empty br{display:none}.empty-owned{font-size:10px;line-height:1.4}
.game-details{margin:12px auto 0;max-width:100%;padding:0 3px}.game-details .guide{margin:0 0 10px}.game-details .action-sub{margin:7px 0}
.practice-game .game-main{height:auto;min-height:0;grid-template-rows:28px 42px 240px auto minmax(220px,auto) 80px}
@media(max-width:760px){
 html[data-screen="game"] .topbar{padding:0 8px}
 html[data-screen="game"] .brand{font-size:12px;gap:0;max-width:32%;line-height:1.2}.brandmark{flex-shrink:0}
 html[data-screen="game"] .brandmark,html[data-screen="game"] nav button span{display:none!important}
 html[data-screen="game"] #sound-toggle{min-width:30px;font-size:16px}
 html[data-screen="game"] nav button{padding:6px;min-width:30px}
 html[data-screen="game"] .language-picker select{min-height:30px;padding:5px 14px 5px 4px;max-width:77px;font-size:10px}
 .game{padding:4px 6px 16px}
 .game-main{height:calc(100svh - 52px - env(safe-area-inset-bottom));height:calc(100dvh - 52px - env(safe-area-inset-bottom));min-height:480px;grid-template-rows:26px 38px minmax(185px,1fr) auto minmax(145px,1fr) 66px;gap:4px}
 .game-meta .turn-flow{display:none}.game-menu .exit-game{font-size:10px;min-height:26px;padding:4px 6px}.game-menu button{font-size:10px;min-height:26px}
 .turn-banner{padding:3px 7px;gap:4px}.turn-identity{gap:4px;flex-wrap:wrap;position:relative;padding-left:15px;line-height:1.1}.turn-identity .turn-indicator{position:absolute;left:0;font-size:13px}.turn-identity strong{font-size:15px}.turn-identity small{font-size:9px;flex-basis:100%}.turn-banner .victory-progress{font-size:10px;padding:4px 5px}
 .board{padding:4px;gap:4px;grid-template-rows:minmax(83px,.9fr) minmax(96px,1fr)}
 .opponents{gap:4px}.opponent,.opponent.active{padding:4px;grid-template-rows:17px 22px 12px minmax(25px,1fr);gap:1px}
 .opponent-head,html[lang="en"] .opponent-head{font-size:10px;gap:2px;flex-wrap:nowrap}.opponent-head b{font-size:15px}.avatar{display:none}
 .cpu-hand{top:23px;right:4px;width:20px;height:20px;opacity:.3}.cpu-info{padding:0;gap:2px}.cpu-stock{min-height:22px;padding:0 3px;gap:2px}.stock-symbol{width:11px;min-width:11px;height:17px}.cpu-stock-label,html[lang="en"] .cpu-stock-label{font-size:8px;gap:2px}.cpu-stock-label strong{font-size:13px}.cpu-stock-label small{font-size:8px}.cpu-info .seat-turn{font-size:8px;background:#f9fff4bd;z-index:1}
 .opponent .victory-progress{font-size:8px}.game-main .cpu-effects .owned-card.small{width:32px;min-width:32px;height:25px}.game-main .cpu-effects .effect-key b{font-size:11px}
 .common-zone{grid-template-columns:minmax(91px,.43fr) minmax(0,1fr);gap:3px}
 .table-area{display:flex;flex-wrap:wrap;justify-content:space-between;align-content:center;gap:1px;padding:0;min-height:0}
 .table-center{order:0;width:100%}.table-cards{height:54px}.table-empty{height:49px;font-size:8px}.table-empty b{font-size:18px}
 .played-stack{--card-w:34px;width:calc(34px + (var(--stack-count) - 1)*7px);height:calc(48px + (var(--stack-count) - 1)*2px)}.stack-layer{left:calc(var(--layer)*7px);top:calc(var(--layer)*2px)}.table-cards .stack-layer .playing-card{--card-w:34px}.table-cards .playing-card .corner{font-size:13px;padding:2px}
 .table-label{font-size:8px;line-height:1.1}.stack-rule{font-size:8px;line-height:1.1}.stack-rule b:last-child{font-size:10px;padding:0 2px}
 .deck-pile{order:1;font-size:8px;line-height:1.3;gap:0}.deck-pile>.playing-card,.deck-pile>.discard{display:none}
 .board-market{padding-left:4px;gap:2px}.compact-market-head{height:18px;font-size:9px}.compact-market-head button{font-size:8px;padding:1px 3px;min-height:18px}.compact-market-items{gap:2px;grid-template-rows:repeat(2,minmax(35px,1fr));max-height:86px}.market-tile{padding:2px 3px;gap:1px;grid-template-columns:1fr;border-radius:4px}.market-tile>b{font-size:13px;text-align:center}.tile-cost{font-size:9px;justify-content:center;gap:2px;line-height:1}.tile-cost .coin{width:5px;height:8px}.market-tile small{position:absolute;right:1px;bottom:1px;font-size:7px;opacity:.8}
 .game-main .ongoing-effects{padding:2px 3px;gap:3px}.game-main .ongoing-heading{font-size:7px}.game-main .ongoing-heading strong{font-size:8px}.game-main .ongoing-heading strong span{display:none}.game-main .ongoing-list{gap:3px}.game-main .ongoing-effect{padding:2px 3px;gap:3px}.game-main .ongoing-effect img{display:none}.game-main .ongoing-copy>b{font-size:8px}.game-main .ongoing-rule{font-size:8px}.game-main .ongoing-rule strong{font-size:10px}
 .hand-area{padding:4px 5px 2px}.hand-area.active{padding:3px 4px 1px}.hand-head strong{font-size:11px}.hand-head>span{display:none}.hand-head button{font-size:9px}.hand{--card-w:43px;gap:3px;padding:7px 2px 3px;min-height:52px}.hand .playing-card{--card-w:43px;max-width:53px;max-height:95px}.hand .playing-card .corner{font-size:15px;padding:2px}
 .actionbar{gap:3px;padding:2px 0}.actionbar button,html[lang="en"] .actionbar button{font-size:10px;min-height:36px;padding:4px 3px}.actionbar .small-btn{min-width:26px}.actionbar .mobile-market-btn{max-width:72px}
 .declaration-options{padding:2px 3px;gap:3px;margin:1px 0}.declaration-options>strong{font-size:11px}.declare-button{padding:3px;min-height:36px}.declare-button b{font-size:9px}.declare-button small{font-size:8px}
 .top-card-controls>span{font-size:9px}.top-card-controls small{font-size:8px}.top-card-controls button{min-height:26px;min-width:28px;font-size:14px}.required-prompt{font-size:10px;padding:3px 5px;line-height:1.3}
 .assets-area{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:4px;padding:0}.assets-area>section{padding:3px 4px}.assets-area .stock-heading{font-size:9px;height:16px;margin-bottom:1px}.assets-area .stock-heading>span{display:none}.assets-area .stock-heading button{font-size:8px}.collection .stock-heading b{font-size:9px;padding:1px 3px}.assets-area .stock-cards{height:39px}.assets-area .stock-cards .playing-card{--card-w:25px;width:25px;height:35px}.game-main .owned-list{height:39px}.game-main .owned-list .owned-card{flex-basis:44px;width:44px;height:34px}.game-main .owned-card .effect-key b{font-size:13px}.game-main .owned-card .effect-key small{font-size:9px}.game-main .owned-card .coin{width:5px;height:8px}.collection-empty p,.empty-owned{font-size:8px}
 .session-footer{flex-wrap:wrap}
 .practice-game .game-main{height:auto;min-height:0;grid-template-rows:26px 38px 205px auto minmax(170px,auto) 66px}
}
/* Short landscape screens use two columns, keeping the table and hand together. */
@media(min-width:600px) and (max-height:540px){
 .game-main{min-height:300px;grid-template-columns:1fr 1fr;grid-template-rows:26px 38px minmax(140px,1fr) 64px;gap:4px}
 .game-meta,.turn-banner{grid-column:1/-1}.board{grid-column:1;grid-row:3 / 5;grid-template-rows:85px minmax(96px,1fr)}.hand-area{grid-column:2;grid-row:3}.assets-area{grid-column:2;grid-row:4}.game-main .ongoing-effects{grid-column:1;grid-row:5}.game-main:has(.ongoing-effects.is-active){grid-template-rows:26px 38px minmax(140px,1fr) 64px auto}.game-main .ongoing-heading{display:none}.common-zone{grid-template-columns:minmax(80px,.45fr) minmax(0,1fr)}.deck-pile>.playing-card,.deck-pile>.discard{display:none}.game-meta .turn-flow{display:none}
}
/* Assign rows explicitly: hiding an empty effects row must not move the hand. */
.game-main{--declare-space:0px;--stack-space:0px;--choice-space:0px;grid-template-rows:28px 42px minmax(180px,1.1fr) auto minmax(calc(126px + var(--declare-space) + var(--stack-space) + var(--choice-space)),1fr) 80px}
.game-meta{grid-row:1}.turn-banner{grid-row:2}.board{grid-row:3}.ongoing-effects{grid-row:4}.hand-area{grid-row:5}.assets-area{grid-row:6}
.game-main:has(.declaration-options){--declare-space:46px}.game-main:has(.top-card-controls){--stack-space:34px}.game-main:has(.required-prompt){--choice-space:34px}.game-main:has(.rank-choices),.game-main:has(.target-choices){--choice-space:72px}
.hand .playing-card{height:100%;width:auto;max-height:100px;max-width:min(70px,calc((100vw - 75px)/7));min-width:32px;aspect-ratio:5/7}
.practice-game .game-main{grid-template-rows:28px 42px 240px auto minmax(calc(160px + var(--declare-space) + var(--stack-space) + var(--choice-space)),auto) 80px}
@media(max-width:760px){
 .game-main{grid-template-rows:26px 38px minmax(185px,1fr) auto minmax(calc(118px + var(--declare-space) + var(--stack-space) + var(--choice-space)),1fr) 66px}
 .game-main:has(.declaration-options){--declare-space:42px}.game-main:has(.top-card-controls){--stack-space:28px}.game-main:has(.required-prompt){--choice-space:34px}.game-main:has(.rank-choices),.game-main:has(.target-choices){--choice-space:70px}
 .hand .playing-card{max-width:min(53px,calc((100vw - 52px)/7));max-height:86px}
 .practice-game .game-main{grid-template-rows:26px 38px 205px auto minmax(calc(136px + var(--declare-space) + var(--stack-space) + var(--choice-space)),auto) 66px}
}
@media(min-width:600px) and (max-height:540px){
 .game-main{height:auto;min-height:calc(100dvh - 56px);grid-template-columns:1fr 1fr;grid-template-rows:26px 38px minmax(calc(118px + var(--declare-space) + var(--stack-space) + var(--choice-space)),1fr) 64px}
 .game-main:has(.ongoing-effects.is-active){grid-template-rows:26px 38px minmax(calc(118px + var(--declare-space) + var(--stack-space) + var(--choice-space)),1fr) 64px auto}
 .board{grid-row:3 / 5}.hand-area{grid-row:3}.assets-area{grid-row:4}.game-main .ongoing-effects{grid-row:5}
}
.declaration-options .declare-button small{flex:none;line-height:1.1;color:inherit}
.declaration-options .declare-button.chosen:hover{background:#7d4207;color:#fff7dd}
.turn-banner.finished .turn-identity strong{white-space:normal;font-size:14px}
.turn-banner.finished .victory-progress{display:none}
@media(max-width:760px){html[lang="en"] .cpu-stock-label{font-size:7px}.opponent .victory-progress{overflow-wrap:anywhere;white-space:normal;line-height:1.1}.game-main .owned-card .effect-key{min-width:0}}
/* Red faces: original art, explicit response controls, compact board preserved. */
.effect-red{--face-accent:#b44848}.effect-blue{--face-accent:#376a95}
.market-tile.effect-red,.owned-card.effect-red{box-shadow:inset 0 -3px var(--face-accent)}
.market-tile.effect-red>b{color:#9a2a2a}.market-item.effect-red{border-color:#cb8b8b}
.market-face-options{display:grid;gap:6px;margin-top:14px}.face-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.face-pair>button{display:flex;align-items:center;gap:8px;text-align:left;padding:7px;border-bottom:3px solid var(--face-accent);min-width:0}
.face-pair img{width:35px;height:49px;object-fit:contain}.face-pair span{display:flex;flex-direction:column;gap:2px;font-size:12px}.face-pair small{font-size:10px}
.face-pair .chosen{outline:2px solid #52894c;background:#e7f3db}
.turn-banner:has(.active-effect-banner){flex-wrap:wrap;min-height:68px}
.game-main:has(.active-effect-banner){grid-template-rows:28px auto minmax(210px,1fr) auto minmax(155px,1fr) 78px}
.active-effect-banner{display:flex;gap:7px;align-items:center;width:100%;border-top:1px solid #b7ccaa;padding-top:3px;line-height:1.2}
.active-effect-banner img{width:23px;height:32px;object-fit:contain}.active-effect-banner span{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px}.active-effect-banner b{font-size:12px}.active-effect-banner small{font-size:11px;background:#fff3cb;border-radius:4px;padding:3px 6px;color:#7c461c}
.game-main .ongoing-list{overflow-x:auto}.game-main .ongoing-copy>span{font-size:10px}.game-main .red-effect{border-color:#ce9890;flex-shrink:0;background:#fff2ed}
.effect-choices{display:flex;gap:5px;overflow:auto;max-height:160px;padding:4px 1px;flex-shrink:0;align-items:stretch}
.effect-choice{display:flex;gap:5px;align-items:center;flex:0 0 136px;padding:5px;text-align:left;border-bottom:3px solid var(--face-accent)}
.effect-choice img{width:29px;height:40px;object-fit:contain}.effect-choice span{display:flex;flex-direction:column;gap:4px}.effect-choice b{font-size:11px;line-height:1.2}.effect-choice small{font-size:10px}
.offered-card{display:flex;gap:9px;align-items:center;font-size:12px;padding:4px 7px;flex-shrink:0;background:#fff5e2}.offered-card .playing-card{width:32px;height:45px}.offered-card small{font-size:11px;font-weight:500}
.stock-payment{display:flex;gap:7px;align-items:center;font-size:12px;padding:4px}.stock-payment select{min-height:32px}
.steal-choices{display:flex;gap:12px;overflow:auto;padding:4px;flex-shrink:0}.steal-choices>div{flex-shrink:0;font-size:11px}.steal-choices>div>div{display:flex;gap:4px}.steal-choices button{padding:3px;min-width:38px}.steal-choices .playing-card{width:29px;height:41px}
.shift-controls{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:12px;margin:3px 0}.shift-controls>div{display:flex;gap:3px;overflow:auto;max-width:50%}.shift-controls button{min-width:30px;min-height:32px;padding:4px}.shift-controls small{font-size:10px}
.copy-selector{font-size:12px;border:1px solid #d0b389;border-radius:6px;padding:4px 6px;margin:3px 0;flex-shrink:0}.copy-selector p{margin:4px;font-size:11px}.copy-selector summary{cursor:pointer}
.hand-area:has(.copy-selector[open]),.hand-area:has(.shift-controls){min-height:205px}
@media(max-width:760px){
 .game-main:has(.active-effect-banner){grid-template-rows:26px auto minmax(185px,1fr) auto minmax(155px,1fr) 66px}
 .active-effect-banner b{font-size:10px}.active-effect-banner small{font-size:10px}.active-effect-banner img{width:20px;height:28px}
 .effect-choice{flex-basis:125px}.face-pair>button{gap:5px;padding:5px}.face-pair img{width:29px;height:41px}.face-pair span{font-size:11px}
 .declaration-options{overflow-x:auto}.declare-button{min-width:75px}.game-main .red-effect .ongoing-copy>span{font-size:8px}
}
@media(max-height:550px) and (min-width:650px){.game-main:has(.active-effect-banner){grid-template-rows:24px auto minmax(120px,1fr) auto}}
