:root{--white:#f2f2f2;--blue:#3b82f6;--green:#22a45d;--red:#dc3545;--black:#2b2b2b;--gold:#e6b800;--bg:#1b2430;--panel:#243044;--text:#eaeef5}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font-family:system-ui,Malgun Gothic,sans-serif}h1{margin:0;font-size:22px}button{cursor:pointer;color:var(--text);background:#34425a;border:1px solid #556;border-radius:6px;padding:6px 12px;font-size:14px}button:disabled{opacity:.45;cursor:default}button.primary{background:#2f7de1;border-color:#2f7de1}.setup{flex-direction:column;gap:14px;max-width:360px;margin:60px auto;display:flex}.setup label{justify-content:space-between;align-items:center;gap:10px;display:flex}.setup select,.setup input{width:140px;padding:6px}.game header{background:var(--panel);align-items:center;gap:20px;padding:10px 16px;display:flex}.status{flex:1;font-size:15px}.badge{background:var(--gold);color:#000;border-radius:10px;margin-left:10px;padding:2px 8px;font-size:12px}.layout{align-items:flex-start;gap:16px;padding:14px;display:flex}main{flex-direction:column;flex:1;gap:10px;min-width:0;display:flex}aside{flex-direction:column;gap:10px;width:360px;display:flex}.nobles{gap:8px;display:flex}.noble{background:#6b5a2a;border:2px solid #0000;border-radius:8px;width:80px;height:80px;padding:6px}.noble.clickable{border-color:var(--gold);cursor:pointer}.noble b{font-size:18px}.row{gap:8px;display:flex}.deck{cursor:pointer;border:2px solid #0003;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;width:90px;height:120px;display:flex}.deck.level1{background:#2f6b3b}.deck.level2{background:#8a6d1f}.deck.level3{background:#2c4f8a}.card{color:#222;cursor:pointer;background:#e9e4d6;border:2px solid #0000;border-radius:8px;flex-direction:column;justify-content:space-between;width:90px;height:120px;padding:6px;display:flex}.card.empty{cursor:default;background:0 0;border:2px dashed #445}.card.hidden{color:#fff;cursor:default;justify-content:center;align-items:center;width:60px;height:80px}.card.hidden.level1{background:#2f6b3b}.card.hidden.level2{background:#8a6d1f}.card.hidden.level3{background:#2c4f8a}.card .top{justify-content:space-between;align-items:center;display:flex}.points{font-size:24px;font-weight:700}.gem{border:1px solid #0006;border-radius:4px;width:22px;height:22px;display:inline-block}.cost{flex-wrap:wrap;gap:3px;display:flex}.chip{border:1px solid #0005;border-radius:50%;justify-content:center;align-items:center;min-width:22px;height:22px;padding:0 3px;font-size:12px;font-weight:700;display:inline-flex}.chip sub{font-size:8px}.white{background:var(--white);color:#222}.blue{background:var(--blue);color:#fff}.green{background:var(--green);color:#fff}.red{background:var(--red);color:#fff}.black{background:var(--black);color:#fff}.gold{background:var(--gold);color:#000}.bank{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.token{border:3px solid #fff4;border-radius:50%;width:54px;height:54px;padding:0;font-size:18px;font-weight:700;position:relative}.token.small{border-width:2px;width:34px;height:34px;font-size:14px}.token.white,.token.gold{color:#222}.token.picked{outline:3px solid #3ddc84}.token i{color:#000;background:#3ddc84;border-radius:10px;padding:1px 5px;font-size:11px;font-style:normal;position:absolute;top:-8px;right:-8px}.warn{color:#ffb86b;font-size:13px}.player{background:var(--panel);border:2px solid #0000;border-radius:8px;padding:10px}.player.active{border-color:#2f7de1}.player .tokens,.player .bonuses,.player .reserved{flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px;display:flex}.noble-mini{background:#6b5a2a;border-radius:6px;padding:2px 6px;font-size:12px}.player .points{font-size:18px}.log{background:#111925;border-radius:8px;height:180px;padding:8px;font-size:12px;line-height:1.5;overflow-y:auto}.modal{background:#000a;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.dialog{background:var(--panel);border-radius:12px;flex-direction:column;align-items:center;gap:8px;min-width:260px;padding:20px;display:flex}.dialog .card{cursor:default}.buttons{gap:8px;margin-top:8px;display:flex}.gem-svg{filter:drop-shadow(0 1px 1.5px #00000080);display:block}.gemnum{flex:none;justify-content:center;align-items:center;display:inline-flex;position:relative}.gemnum .gem-svg{width:100%;height:100%;position:absolute;inset:0}.gemnum b{color:#fff;text-shadow:0 0 2px #000,0 0 3px #000,0 1px 1px #000;line-height:1;position:relative}.gemnum b.dark{color:#1c2733;text-shadow:0 0 2px #fff,0 0 3px #fff}.token{background:radial-gradient(circle at 35% 30%,#4b5c78,#222d40 70%);border:3px solid #c9d3e3;border-radius:50%;justify-content:center;align-items:center;width:62px;height:62px;padding:0;transition:transform .12s,box-shadow .12s;display:inline-flex;position:relative;box-shadow:0 3px 6px #0008,inset 0 0 0 3px #0003}.token.white,.token.blue,.token.green,.token.red,.token.black,.token.gold{color:#fff}.token.white{border-color:#f4f8ff}.token.blue{border-color:#7db3ff}.token.green{border-color:#6fe3a0}.token.red{border-color:#ff8593}.token.black{border-color:#8a8f9c}.token.gold{border-color:#ffd84a}.token:not(:disabled):hover{transform:translateY(-3px)scale(1.05);box-shadow:0 7px 12px #000a}.token em{color:#fff;background:#0e1522;border:1.5px solid #c9d3e3;border-radius:12px;justify-content:center;align-items:center;min-width:24px;height:24px;padding:0 5px;font-size:13px;font-style:normal;font-weight:700;display:flex;position:absolute;bottom:-6px;right:-6px}.token.small{border-width:2px;width:40px;height:40px}.token.small em{min-width:18px;height:18px;font-size:11px;bottom:-5px;right:-5px}.token.picked{outline-offset:2px;outline:3px solid #3ddc84;transform:translateY(-4px)}.token i{top:-9px;left:-6px;right:auto}.token:disabled{opacity:1}.token:disabled:not(.picked){filter:saturate(.7)}.card{--accent:#888;background:linear-gradient(160deg,#f6f1e4 0%,#e3dcc8 100%);border:2px solid #5a4f3a;border-radius:10px;width:98px;height:132px;padding:0;transition:transform .12s,box-shadow .12s;position:relative;overflow:hidden;box-shadow:0 3px 7px #0007}.card:not(.empty):not(.hidden):hover{transform:translateY(-4px);box-shadow:0 8px 14px #000a}.card.c-white{--accent:#b9c9d8}.card.c-blue{--accent:#3b82f6}.card.c-green{--accent:#22a45d}.card.c-red{--accent:#dc3545}.card.c-black{--accent:#3d414b}.card .top{background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff 0%), color-mix(in srgb, var(--accent) 35%, #f6f1e4));border-bottom:2px solid #0003;justify-content:space-between;align-items:center;height:36px;padding:0 8px;display:flex}.card.c-white .top{background:linear-gradient(90deg,#dfe8f0,#f4f7fa)}.card .points{color:#fff;text-shadow:0 1px 3px #000a;font-family:Georgia,serif;font-size:26px;font-weight:800}.card.c-white .points{color:#223;text-shadow:0 1px #fff}.card .art{position:absolute;inset:36px 0 0}.card .art .art-svg{width:100%;height:100%;display:block}.card .foot{background:linear-gradient(#0a0f2200,#0a0f2299);justify-content:space-between;align-items:flex-end;padding:14px 6px 4px;display:flex;position:absolute;bottom:0;left:0;right:0}.card .cost{flex-flow:column-reverse;gap:2px}.card .pips{letter-spacing:1px;color:#fff;text-shadow:0 0 3px #000;font-size:7px}.card.affordable{border-color:#3ddc84;box-shadow:0 0 0 2px #3ddc84,0 0 14px #3ddc84aa}.card.empty{box-shadow:none;background:0 0;border:2px dashed #445}.card.hidden{color:#fff;border-color:#0005;justify-content:center;align-items:center;width:66px;height:88px;font-weight:700;display:flex}.player .card{width:74px;height:100px}.player .card .top{height:28px;padding:0 5px}.player .card .points{font-size:19px}.player .card .art{top:28px}.player .card .top .gem-svg{width:20px;height:20px}.player .card .gemnum{width:17px!important;height:17px!important}.player .card .gemnum b{font-size:9px!important}.player .card .foot{padding:3px 4px}.deck{border:2px solid #0006;border-radius:10px;gap:4px;width:98px;height:132px;font-size:15px;box-shadow:0 3px 7px #0007,inset 0 0 0 4px #fff2}.deck:hover{filter:brightness(1.15)}.setup{max-width:560px}.theme-preview{flex-wrap:wrap;justify-content:center;gap:6px;display:flex}.theme-preview .card{cursor:default;width:84px;height:114px}.game header select{padding:5px}.deck,.card.hidden{background:radial-gradient(circle at 25% 30%, #fffc 0 1px, transparent 2px), radial-gradient(circle at 70% 20%, #fffa 0 1px, transparent 2px), radial-gradient(circle at 60% 75%, #fff9 0 1px, transparent 2px), radial-gradient(ellipse at 30% 70%, var(--back,#3a5fb0) 0, transparent 60%), linear-gradient(160deg, #0d1233, #2a1f5c);color:#fff;text-shadow:0 1px 3px #000}.deck.level1,.card.hidden.level1{--back:#3fae7a}.deck.level2,.card.hidden.level2{--back:#d9a441}.deck.level3,.card.hidden.level3{--back:#4a7be0}.deck b{font-family:Georgia,serif;font-size:22px}.noble{background:linear-gradient(160deg,#8c7433,#5a4a1e);border:2px solid #d9b94a;flex-direction:column;align-items:center;gap:4px;width:84px;height:auto;min-height:84px;padding:6px;display:flex;box-shadow:0 3px 7px #0007}.noble .crown{color:#ffe27a;font-size:17px}.noble .cost{justify-content:center}.noble.clickable{box-shadow:0 0 0 2px #3ddc84,0 0 14px #3ddc84aa}.player .bonuses{gap:4px}.noble-mini{color:#ffe27a;background:linear-gradient(160deg,#8c7433,#5a4a1e);border:1px solid #d9b94a}button,.card,.deck,.noble{touch-action:manipulation;-webkit-tap-highlight-color:transparent}@media (hover:none){.token:not(:disabled):hover,.card:not(.empty):not(.hidden):hover{transform:none;box-shadow:0 3px 6px #0008}.card.affordable:hover{box-shadow:0 0 0 2px #3ddc84,0 0 14px #3ddc84aa}.token.picked:hover{transform:translateY(-4px)}}@media (width<=900px){.game header{flex-wrap:wrap;gap:8px 10px;padding:8px 10px}.game header h1{flex:1;font-size:19px}.game header .status{flex-basis:100%;order:3;font-size:14px}.layout{flex-direction:column;align-items:stretch;gap:12px;padding:8px}aside{width:auto}.log{height:140px}.row{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;display:grid}.row .card,.row .deck{aspect-ratio:98/132;width:auto;height:auto}.row .deck{gap:2px;font-size:12px;box-shadow:0 2px 5px #0007,inset 0 0 0 3px #fff2}.row .deck b{font-size:16px}.card .top{height:24px;padding:0 4px}.card .points{font-size:17px}.card .top .gem-svg{width:18px;height:18px}.card .art{top:24px}.card .foot{padding:3px}.card .cost{gap:1px}.card .gemnum{width:16px!important;height:16px!important}.card .gemnum b{font-size:9px!important}.card .pips{display:none}.player .card{width:64px;height:86px}.player .card .top{height:22px}.player .card .art{top:22px}.nobles{gap:6px}.noble{flex:1;gap:2px;width:auto;max-width:76px;min-height:0;padding:4px}.noble .crown{font-size:14px}.noble .cost{gap:2px}.noble .gemnum{width:18px!important;height:18px!important}.noble .gemnum b{font-size:10px!important}.bank{grid-template-columns:repeat(6,minmax(0,1fr));justify-items:center;gap:12px 6px;display:grid}.bank .token{width:48px;height:48px}.bank .token .gem-svg{width:28px;height:28px}.bank .token em{min-width:20px;height:20px;font-size:12px;bottom:-4px;right:-4px}.bank>button:not(.token){grid-column:span 2;width:100%;padding:10px 6px}.player{padding:8px}.player .tokens{gap:8px}.token.small{width:36px;height:36px}.token.small .gem-svg{width:20px;height:20px}.dialog{text-align:center;width:min(92vw,340px);min-width:0;padding:16px}.setup{margin:24px auto;padding:0 16px}.theme-preview .card{width:72px;height:98px}}
