/* Uses unmodified artwork from the approved reference, displayed with responsive CSS crops. */
#kdShell:has(.kdRefShop){max-width:500px;padding:13px 15px 22px;background:#08090a!important}#kdShell:has(.kdRefShop)>.kdTop{margin:0 0 3px}
.kdRefHeader{display:flex;gap:7px;align-items:center;height:38px;min-width:0}.kdRefHeader .kdBack{padding:0!important;width:29px;height:32px;font-size:27px;border:0;background:none;flex-shrink:0}.kdRefHeader .kdTitle{font:clamp(14px,4.3vw,21px) Georgia,serif!important;letter-spacing:1.1px!important;color:#f4d69c;flex:1;white-space:nowrap;text-align:center;min-width:0}
.kdRefHeader .kdRefWallet{position:static;display:flex;align-items:center;gap:4px;margin:0;padding:4px 0 4px 6px;flex-shrink:0;border:1px solid #ae8546;border-radius:6px;background:linear-gradient(120deg,#30251a,#15120d);box-shadow:inset 0 1px #ebd09a30;font-family:Georgia,serif;color:#f6e3bc;backdrop-filter:none}.kdRefWallet svg{width:18px;height:18px;fill:#e8bf6a}.kdRefWallet>b{font-size:12px;line-height:1;max-width:58px;overflow:hidden;text-overflow:ellipsis}.kdRefWallet>span{padding:1px 5px!important;display:block!important;flex:none!important;border-left:1px solid #b18d50;background:linear-gradient(#ddb572,#a87432);color:#21150b;font-size:17px;line-height:1;min-height:20px}
.kdRefOrnament{height:18px;text-align:center;color:#c0a170;font-size:11px;line-height:12px;letter-spacing:2px;margin:0 0 4px;overflow:hidden}.kdRefCrop{display:block;position:relative;overflow:hidden;width:100%;flex-shrink:0;isolation:isolate}.kdRefCrop>img.kdHeroArt,.kdRefCrop>img{display:block;position:absolute;max-width:none!important;object-fit:fill!important;z-index:0;inset:auto;pointer-events:none}.kdRefBanner{width:100%;border-radius:17px;overflow:hidden}.kdRefBalanceLine{font-size:8px;color:#af9f82;text-align:right;margin:5px 1px 0;line-height:1.2}
.kdRefSectionTitle{color:#e6c590;font:clamp(16px,4.5vw,22px) Georgia,serif;font-weight:400;letter-spacing:1.4px;margin:12px 0 9px}.kdRefPackGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#kdShell .kdRefShop .kdRefPack{padding:0 0 8px;gap:0;background:linear-gradient(#0b0c0e,#0a0b0b);border:1px solid #b69761;border-radius:12px;box-shadow:inset 0 1px #f7dfb318;overflow:hidden;display:flex;flex-direction:column;min-width:0}.kdRefPack>.kdRefCrop{width:100%;border-bottom:1px solid #78613c40}.kdRefPack>strong{font:clamp(8px,2.4vw,12px) Georgia,serif!important;font-weight:400!important;color:#f1e7d3!important;white-space:nowrap;letter-spacing:.15px;margin:6px 0 3px!important}.kdRefQuantity{display:block;font:11px Georgia,serif;color:#e8ddc7;line-height:1.3;margin-bottom:7px}
#kdShell .kdRefPack button{border:1px solid #b88e4e;border-radius:25px;background:linear-gradient(#e2c181,#b6853e 60%,#8a5d24);color:#f8edcd;font:11px Georgia,serif;font-weight:600;margin:0 8px;width:calc(100% - 16px);padding:4px 3px;min-height:28px;display:flex;justify-content:center;align-items:center;gap:4px;box-shadow:inset 0 1px #fff4d430,0 2px 7px #0008}.kdRefPack button small{font:6px system-ui;color:#e8d5ac;display:block;line-height:1.1;letter-spacing:.4px}.kdRefPack .kdBlueCrystal{height:21px;width:17px;fill:none!important;flex-shrink:0}
#kdShell .kdRefShop .kdRefThemeGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}#kdShell .kdRefShop .kdRefTheme{background:#0a0b0c;border:1px solid #a58b62;border-radius:12px;box-shadow:inset 0 1px #fff0d215}#kdShell .kdRefShop .kdRefTheme.kdThemeCurrent{border-color:#e7c47d;box-shadow:0 0 12px #c6973215}
.kdRefTheme>button{display:block;width:100%;padding:9px 7px 7px;border:0;background:none;color:#eee6d6;text-align:center;font-family:Georgia,serif;cursor:pointer}.kdRefTheme>button:disabled{opacity:1;cursor:default}.kdRefTheme strong{display:block;font-size:clamp(7px,2.1vw,11px);font-weight:400;white-space:nowrap;letter-spacing:.25px;margin:1px 0 7px}.kdRefTheme .kdRefCrop{width:100%;height:auto;border-radius:7px;aspect-ratio:141/113}.kdRefSwatches{display:flex;justify-content:center;gap:7px;margin:9px 0 6px}.kdRefSwatches i{display:block;width:10px;height:10px;background:#171512;border:1px solid #6a5a43;box-shadow:inset 0 0 0 2px #070808;border-radius:50%}.kdRefSwatches i:first-child{outline:1px solid #cfb77e;outline-offset:2px;border-color:#d6c6a3}.kdRefTheme button>small{display:block;font:6px system-ui;letter-spacing:.8px;color:#c9b58e;line-height:1.4}
.kdRefDaily{display:grid;grid-template-columns:26% 42% 32%;align-items:center;border:1px solid #a88c5f;border-radius:13px;overflow:hidden;background:radial-gradient(ellipse at 14% 65%,#5d3c2030,transparent 70%),#0b0c0d;padding:7px 8px 7px 1px;margin-top:13px}.kdRefGift{width:100%}.kdRefDaily h3{font:clamp(11px,3.1vw,17px) Georgia,serif;color:#f1dfb7;letter-spacing:.6px;white-space:nowrap;font-weight:400;margin:1px 0 5px}.kdRefDaily p{font:clamp(9px,2.4vw,13px) Georgia,serif;color:#d3c6af;line-height:1.35;margin:0}.kdRefDaily>div>small{font:6px system-ui;color:#c4a76d;letter-spacing:.8px;display:block;margin-top:5px}.kdRefDaily>button{border-radius:22px;border:1px solid #b18a49;background:linear-gradient(#f0d398,#ac7932);color:#2f200e;padding:8px 2px;font:clamp(9px,2.5vw,13px) Georgia,serif;white-space:nowrap;box-shadow:inset 0 1px #fff6d055}.kdRefDaily>button:disabled{opacity:.5;cursor:default}
.kdRefShop .kdRefNotice{margin:7px 0;min-height:12px;font:8px system-ui;color:#bba784;line-height:1.5;text-align:center}.kdRefShopLinks{display:flex;justify-content:space-between;gap:8px;margin:10px 0 17px}.kdRefShopLinks button{flex:1;border:1px solid #675333;border-radius:8px;padding:9px 5px;font:8px system-ui;letter-spacing:.7px;background:#16130f;color:#cdb88e}.kdRefLegacy{padding-top:12px;border-top:1px solid #5a492a55}.kdRefLegacy h3{font:9px system-ui;letter-spacing:1.5px;color:#8e7d61}.kdRefLegacy .kdThemeGrid{display:block}.kdRefLegacy .kdRefTheme{max-width:120px}.kdRefLegacy .kdRefTheme button{padding:8px}
#kdShell:has(.kdModernScreen){max-width:540px;padding:16px 17px 32px;background:radial-gradient(ellipse at 85% 0,#9d692215,transparent 55%),#090a0c}#kdShell:has(.kdModernScreen)>.kdTop{margin-bottom:22px}#kdShell:has(.kdModernScreen)>.kdTop .kdTitle{font-size:13px;letter-spacing:2.2px}#kdShell:has(.kdModernScreen)>.kdTop .kdBack{padding:6px 12px;background:#191610;border-color:#655235}
.kdModernScreen{--modern-gold:#edcb8e;color:#e9e1d2}.kdModernIntro{padding:5px 0 21px;border-bottom:1px solid #6a533033;margin-bottom:20px}.kdModernIntro h2{font:29px Georgia,serif;font-weight:400;line-height:1.2;color:#f1dbb1;margin:11px 0}.kdModernIntro p,.kdModernMuted{font-size:11px;color:#ab9e86;line-height:1.7}.kdModernIntro p{margin:0}.kdModernScreen .kdEyebrow{font-size:8px;color:#c6a568;letter-spacing:1.9px}
#kdShell .kdSettingCard{display:grid;grid-template-columns:39px 1fr auto;gap:12px;align-items:center;border:1px solid #655131;border-radius:15px;padding:17px 13px;margin:0 0 13px;background:linear-gradient(140deg,#211c14,#111110);box-shadow:inset 0 1px #f7d59009}.kdSettingIcon{width:39px;height:39px;display:grid;place-items:center;font:25px Georgia,serif;color:#e1bd7a;background:#6d502321;border:1px solid #a8803930;border-radius:11px}.kdSettingCard strong{display:block;font-size:13px;color:#ead5ad}.kdSettingCard small{display:block;font-size:9px;color:#a4977f;margin-top:5px;line-height:1.5}.kdSettingToggle{position:relative;border:1px solid #6b5939;background:#181612;border-radius:20px;color:#9f947e;padding:5px 6px;display:flex;align-items:center;gap:6px;font-size:7px;font-weight:800;min-width:65px;justify-content:space-between}.kdSettingToggle i{display:block;width:18px;height:18px;border-radius:50%;background:#756a55;box-shadow:0 1px 4px #0006}.kdSettingToggle.on{border-color:#b78e4c;background:#60461e66;color:#f5d99c}.kdSettingToggle.on i{background:linear-gradient(#f2d898,#b88a45)}.kdVolumeRow{grid-column:1/-1;border-top:1px solid #7c603433;padding-top:16px;display:grid;grid-template-columns:1fr auto;gap:11px;color:#b9aa8e;font-size:10px}.kdVolumeRow output{color:#e7c788}.kdVolumeRow input{grid-column:1/-1;width:100%;height:4px;accent-color:#d4ad6a;margin:4px 0 8px}.kdSettingCard .kdRow{grid-column:1/-1;border-top:1px solid #7c603433;border-bottom:0;padding:12px 0 0;margin:0;font-size:11px}.kdSettingCard select{font-size:10px!important;background:#161410!important;border-color:#75603b!important}
.kdModernThemeLink{display:flex;align-items:center;gap:12px;width:100%;padding:16px 13px;border:1px solid #9b7841;border-radius:14px;color:#ebce97;background:linear-gradient(125deg,#352718,#16130e);text-align:left;margin-top:19px}.kdModernThemeLink>span:first-child{font:31px Georgia,serif;color:#f1cb7d;min-width:31px}.kdModernThemeLink>span:nth-child(2){flex:1}.kdModernThemeLink strong{display:block;font-size:12px}.kdModernThemeLink small{display:block;font-size:9px;color:#b7a382;line-height:1.5;margin-top:5px}.kdModernThemeLink>b{font-size:20px}.kdModernFoot{display:flex;flex-direction:column;align-items:center;padding:29px 0 9px;gap:8px}.kdModernFoot>span{font:24px Georgia,serif;color:#bd974e}.kdModernFoot>b{font:19px Georgia,serif;color:#d9bf8a;letter-spacing:2.4px;font-weight:400}.kdModernFoot>small{font-size:7px;letter-spacing:1.7px;color:#8f8067}.kdModernFoot p{font-size:9px;color:#6d6555;margin:7px 0}
.kdProfileIdentity{display:flex;align-items:center;gap:14px;padding:12px 0 22px}.kdProfileIdentity .kdAvatar,.kdProfileIdentity .kdAvatarPhoto{width:65px;height:65px;font-size:29px;border-color:#ba9250}.kdProfileIdentity>div:nth-child(2){flex:1;min-width:0}.kdProfileIdentity h2{font:25px Georgia,serif;color:#f5ddb0;margin:7px 0;overflow-wrap:anywhere}.kdProfileIdentity small{font-size:9px;color:#a4967d}.kdProfileLevel{display:flex;flex-direction:column;align-items:center;justify-content:center;width:55px;height:65px;clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%);background:linear-gradient(135deg,#6e4d24,#241c12);font:28px Georgia,serif;color:#f7d794;border-top:1px solid #ba9250}.kdProfileLevel>small{font:6px system-ui;letter-spacing:1.4px;color:#d9b97b;margin:6px 0 10px}.kdModernXp{background:#1a1611;border:1px solid #6b5431;border-radius:13px;padding:14px}.kdModernXp>div:first-child{display:flex;justify-content:space-between;font-size:10px;color:#b7a688;margin-bottom:10px}.kdModernXp b{font-size:10px;color:#e1c284}.kdModernXp .kdXpTrack{height:5px;border-color:#705834;background:#0d0d0c}.kdModernXp .kdXpTrack>div{background:linear-gradient(90deg,#a4742c,#edcb86)}.kdModernXp>small{display:block;font-size:8px;color:#a8946e;margin-top:10px}.kdProfileTabs{display:flex;gap:4px;border-bottom:1px solid #685335;margin:22px 0 21px;padding-bottom:9px}.kdProfileTabs button{flex:1;background:transparent;color:#9a8b71;padding:8px 2px;font-size:8px;font-weight:800;letter-spacing:.7px;border:0;white-space:nowrap}.kdProfileTabs button.active{color:#efd5a0;background:#6e51292c;border-radius:7px}
.kdModernMetricGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.kdModernMetricGrid>div{padding:17px 13px;border:1px solid #665331;border-radius:14px;background:linear-gradient(140deg,#272015,#111110);position:relative}.kdModernMetricGrid>div>span{position:absolute;top:12px;right:12px;color:#b38b45;font-size:18px}.kdModernMetricGrid b{display:block;font:28px Georgia,serif;color:#efcf93;margin:9px 0}.kdModernMetricGrid small{font-size:7px;letter-spacing:1.1px;color:#ae9c7c}.kdModernSectionHeading{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin:24px 0 12px}.kdModernSectionHeading h3{font:20px Georgia,serif;color:#e8d0a3;font-weight:400;margin:0}.kdModernSectionHeading>span{font-size:6px;color:#8e7c5c;letter-spacing:1px;text-align:right;max-width:35%;line-height:1.5}.kdModernStatsList{border:1px solid #5d4c2d;border-radius:13px;background:#15120f;padding:3px 14px}.kdModernStatsList>div{display:flex;justify-content:space-between;border-bottom:1px solid #65502b33;padding:13px 0;font-size:10px;color:#b3a284;gap:10px}.kdModernStatsList>div:last-child{border:0}.kdModernStatsList strong{font-size:11px;color:#ead0a0}.kdModernAvatarGrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.kdModernAvatarGrid .kdAvatarChoice{width:100%;height:54px;font-size:25px;border-color:#615132;border-radius:12px;background:#1c1811;color:#d5af6c}.kdModernAvatarGrid .selected{border:1px solid #d9b26a;background:#4e381d}.kdModernRankLink{display:flex;justify-content:space-between;width:100%;margin-top:22px;background:linear-gradient(110deg,#e9c67d,#ae7933);border:1px solid #e4bf74;border-radius:12px;padding:15px 13px;font-size:11px;font-weight:800;color:#281b0c}.kdModernLogin,.kdModernLogout{display:block;width:100%;border:1px solid #6d5731;background:#1d1811;border-radius:11px;color:#d6bd8d;padding:14px;margin-top:19px;font-size:10px;font-weight:750}.kdModernLogout{border-color:#483d2c;background:transparent;color:#93836b}.kdProfileThemeGrid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.kdProfileThemeGrid .kdRefTheme{background:#111211;border:1px solid #8e7447;border-radius:14px}.kdProfileThemeGrid .kdRefTheme>button{padding:12px}.kdProfileThemeGrid .kdRefTheme strong{font-size:11px;margin:3px 0 12px}.kdProfileThemeGrid .kdRefTheme button>small{font-size:9px;margin:8px 0 3px}.kdProfileThemeGrid .kdThemeCurrent{border-color:#e7c47d;background:#2e2315}.kdProfileScreen .kdRefNotice{font-size:10px;line-height:1.7;color:#b09a76;margin-top:14px}.kdModernAchievementGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.kdModernAchievementGrid article{text-align:center;padding:20px 8px 15px;border:1px solid #51442d;border-radius:14px;background:#17140f;color:#6d6453}.kdModernAchievementGrid article>span{font:35px Georgia,serif}.kdModernAchievementGrid strong{display:block;font:14px Georgia,serif;margin:11px 0}.kdModernAchievementGrid small{font-size:6px;letter-spacing:.6px}.kdModernAchievementGrid .earned{color:#e8c785;border-color:#b28b47;background:radial-gradient(ellipse at 50% 0,#7d5a263d,transparent 80%),#17130d}
.kdModernOverlay{padding:0!important;background:#08090bf5!important}.kdModernOverlay .kdV9Card{max-width:520px!important;margin:0 auto!important;border:0!important;border-radius:0!important;padding:21px 18px 27px!important;min-height:100dvh;background:radial-gradient(ellipse at 80% 0,#89652a20,transparent 55%),#0a0b0d!important;box-sizing:border-box}.kdModernExtraHeader{display:flex;align-items:center;gap:13px;border-bottom:1px solid #765e3438;padding:0 0 16px}.kdModernExtraBack{width:32px;height:34px;border:1px solid #685332;border-radius:9px;background:#19150e;color:#e4c48b;font-size:23px}.kdModernOverlay #v9Heading{font:16px Georgia,serif;color:#e8c88e;letter-spacing:1px;margin:0}.kdModernOverlay #v9Intro{font-size:11px!important;color:#ac9c82!important;line-height:1.7;margin:16px 0}.kdModernExtraHero{position:relative;overflow:hidden;border:1px solid #b49259;border-radius:17px;background:#15120e;min-height:170px;margin:15px 0 12px}.kdModernExtraHero>.kdRefCrop{position:absolute;inset:0;height:100%;width:100%;opacity:.66;filter:brightness(.63)}.kdModernExtraHero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#090b0ce0,transparent);pointer-events:none}.kdModernExtraCopy{position:relative;z-index:1;padding:25px 20px}.kdModernExtraCopy>span{display:block;color:#d6b678;font-size:8px;letter-spacing:1.8px}.kdModernExtraCopy strong{display:block;font:32px Georgia,serif;color:#f2d49e;font-weight:400;margin:11px 0}.kdModernExtraCopy small{font-size:10px;color:#c0ac8a;line-height:1.5;display:block;max-width:80%}.kdModernOverlay .kdV9Row{display:grid;grid-template-columns:37px 1fr auto;align-items:center;gap:12px;border:1px solid #695333;border-radius:14px;padding:16px 12px;margin-bottom:11px;background:linear-gradient(135deg,#211b12,#11110e)}.kdModernRowIcon{width:37px;height:40px;display:grid;place-items:center;border-radius:10px;background:#815d2725;color:#ddba75;font:24px Georgia,serif;border:1px solid #99733a33}.kdModernOverlay .kdV9Row>span{font-size:12px;color:#e9d4ad;line-height:1.5}.kdModernOverlay .kdV9Row small{font-size:9px;color:#9f8e6e;margin-top:5px}.kdModernOverlay .kdV9Row button{min-width:75px;border-radius:9px;font-size:8px;padding:11px 8px;background:linear-gradient(#ebcc8a,#b1803b);border:1px solid #c8a363;color:#271b0d}.kdModernOverlay .kdV9Row button:disabled{background:#282219;color:#8b7a5a;border-color:#55452c;opacity:.75}.kdModernQuestTrack{display:block!important;height:4px;border-radius:4px;background:#0b0c0c;margin-top:11px;overflow:hidden;border:1px solid #63502d}.kdModernQuestTrack>i{display:block;height:100%;background:linear-gradient(90deg,#a57632,#f0cb84)}.kdChestDays{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin:16px 0 21px}.kdChestDay{padding:10px 1px;border:1px solid #5b4b2e;background:#17140e;border-radius:9px;text-align:center;color:#857456;font-size:9px}.kdChestDay>b{display:block;font-size:14px;margin-bottom:7px}.kdChestDay.done{background:#5e431d55;color:#efcf8d;border-color:#b7914d}.kdChestDay.next{border-color:#d0a963;color:#f4d99d;box-shadow:0 0 12px #d6a74520}.kdModernOverlay .kdV9Close{border:1px solid #7a6037;background:#251d12;color:#dbc18d;padding:14px;font-size:10px;border-radius:11px;margin-top:16px}
/* Texture and pipe palette now match the corresponding reference theme previews. */
html[data-kd-theme] #kdGame{filter:none!important;--pipe-tone:#dfb56d;--stone-tone:#322c23;--stone-light:#514738;--stone-edge:#77664a}html[data-kd-theme="ice"] #kdGame{--pipe-tone:#8cbedc;--stone-tone:#202a35;--stone-light:#3a4a58;--stone-edge:#576d7c}html[data-kd-theme="fire"] #kdGame{--pipe-tone:#e0aa5e;--stone-tone:#46372a;--stone-light:#6a543c;--stone-edge:#98754d}html[data-kd-theme="shadow"] #kdGame{--pipe-tone:#ba9be5;--stone-tone:#2c2337;--stone-light:#493b57;--stone-edge:#766286}
html[data-kd-theme] #kdGame main>.board .tile{background:radial-gradient(ellipse at 25% 15%,var(--stone-light),transparent 70%),linear-gradient(155deg,var(--stone-tone),#141619);border:1px solid var(--stone-edge);border-radius:6px;box-shadow:inset 0 1px 2px #d4c3a633,inset 0 -2px 4px #0009,0 1px 3px #000a}html[data-kd-theme] #kdGame .tile svg line{stroke:var(--pipe-tone);filter:drop-shadow(0 0 2px #000) drop-shadow(0 -1px 1px #ffe7ac55)}html[data-kd-theme] #kdGame .tile svg circle{fill:var(--pipe-tone);filter:drop-shadow(0 1px 2px #000b)}
@media(min-width:500px){#kdShell:has(.kdRefShop){padding:17px 18px 25px}.kdRefSectionTitle{margin:16px 0 11px}.kdRefPack>strong{font-size:12px!important}.kdRefQuantity{font-size:13px;margin-bottom:10px}.kdRefTheme strong{font-size:11px}.kdRefTheme button>small{font-size:8px}.kdRefPack button{min-height:34px!important}.kdRefNotice{font-size:9px!important}}
@media(max-width:350px){#kdShell:has(.kdRefShop){padding:10px 11px 20px}.kdRefHeader{gap:4px}.kdRefHeader .kdTitle{font-size:13px!important;letter-spacing:.6px!important}.kdRefHeader .kdRefWallet>b{font-size:10px}.kdRefHeader .kdRefWallet>span{padding:2px 4px!important}.kdRefHeader .kdBack{width:23px}.kdRefPackGrid,#kdShell .kdRefShop .kdRefThemeGrid{gap:7px}.kdRefTheme>button{padding:8px 5px 6px}.kdRefTheme strong{font-size:7px}.kdRefSwatches{gap:5px}.kdRefPack button{margin:0 5px!important;width:calc(100% - 10px)!important}.kdRefQuantity{font-size:10px}.kdModernOverlay .kdV9Card{padding:17px 12px!important}.kdModernOverlay .kdV9Row{gap:8px;padding:13px 9px;grid-template-columns:30px 1fr auto}.kdModernRowIcon{width:30px;height:34px}.kdModernOverlay .kdV9Row>span{font-size:11px}.kdModernOverlay .kdV9Row button{min-width:65px;font-size:7px;padding:10px 5px}.kdModernSectionHeading h3{font-size:18px}.kdProfileTabs button{font-size:7px}.kdSettingCard{gap:8px!important;padding:14px 10px!important}.kdSettingCard small{font-size:8px}.kdSettingToggle{min-width:58px;font-size:6px}}
@media(prefers-reduced-motion:reduce){.kdModernScreen *, .kdModernOverlay *{animation:none!important;transition:none!important}}

.kdJourneyHero>.kdRefCrop{position:absolute;inset:0;width:100%;height:100%;z-index:-2}.kdModernExtraHero[data-kind="chest"]>.kdRefCrop{left:auto;right:0;width:53%;opacity:.95;filter:brightness(.9)}.kdChestDays[hidden]{display:none!important}

.kdModernExtraHero>.kdRefCrop{height:auto!important;top:50%;bottom:auto;transform:translateY(-50%) scale(1.1);transform-origin:center}.kdJourneyHero>.kdRefCrop{height:auto!important;top:50%;bottom:auto;transform:translateY(-50%) scale(1.3);transform-origin:center}.kdModernOverlay #v9Intro{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}

.kdRefTheme[data-theme="shadow"] .kdRefCrop{filter:hue-rotate(45deg)}

.kdRefHeader .kdRefSettings{color:#d9b675;font-size:21px!important}#kdShell .kdModernThemeLink{position:relative}#kdShell .kdModernThemeLink .kdRewardBadge{top:-7px;right:10px;font-size:7px;padding:3px 6px}

/* v6.15: centered brand, crystal wallet, two reward banners and a single six-theme collection. */
.kdRefHeader{position:relative;justify-content:space-between}.kdRefHeader .kdTitle{position:absolute;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 158px);text-align:center;margin:0;flex:none;font-size:clamp(12px,4vw,20px)!important;pointer-events:none}.kdRefHeader .kdRefWallet{max-width:112px;gap:5px}.kdRefHeader .kdRefWallet .kdBlueCrystal{width:18px;height:23px;flex-shrink:0}.kdRefWallet .kdWalletAmount{max-width:65px;line-height:1.1}.kdWalletAmount>span{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kdWalletAmount>small{display:block;font:5px system-ui;letter-spacing:.8px;color:#cdb78f;margin-top:3px}
.kdExpansionSlot{display:block;position:relative;overflow:hidden;width:100%;flex-shrink:0;border-radius:7px}.kdExpansionSlot>.kdExpansionCrop{position:absolute;top:0;left:0;width:100%;transform-origin:top}.kdRefTheme .kdExpansionSlot{margin:0;aspect-ratio:141/113}.kdRefTheme .kdExpansionCrop{border-radius:0}.kdRefWheelCard{width:100%;font-family:inherit;text-align:left;cursor:pointer;color:#dfcda9;box-shadow:inset 0 1px #ffffff08}.kdRefWheelCard .kdWheelTeaserArt{width:83%;justify-self:center}.kdWheelTeaserCopy{display:block;min-width:0}.kdWheelTeaserCopy>strong{display:block;font:clamp(11px,3.1vw,17px) Georgia,serif;font-weight:400;letter-spacing:.6px;color:#f1dfb7;white-space:nowrap;margin:1px 0 5px}.kdWheelTeaserCopy>span{display:block;font:clamp(9px,2.4vw,13px) Georgia,serif;color:#d3c6af;line-height:1.35}.kdWheelTeaserCopy>small{display:block;font:6px system-ui;color:#c4a76d;letter-spacing:.45px;margin-top:6px}.kdWheelCardAction{display:block;border:1px solid #b18a49;border-radius:22px;background:linear-gradient(#f0d398,#ac7932);color:#2f200e;padding:8px 2px;font:clamp(9px,2.5vw,13px) Georgia,serif;text-align:center;white-space:nowrap;box-shadow:inset 0 1px #fff6d055}.kdRefWheelCard:active{border-color:#e0bc76}.kdRefWheelCard:focus-visible{outline:2px solid #f3cf8c;outline-offset:3px}.kdRefThemeGrid{margin-bottom:10px}
html[data-kd-theme="emerald"] #kdGame{--pipe-tone:#83ddb0;--stone-tone:#173b2f;--stone-light:#315e48;--stone-edge:#6b9d73}html[data-kd-theme="ruby"] #kdGame{--pipe-tone:#f18d7b;--stone-tone:#3c2025;--stone-light:#60383a;--stone-edge:#a56c61}
@media(max-width:350px){.kdRefHeader .kdTitle{max-width:calc(100% - 144px);font-size:12px!important}.kdRefHeader .kdRefWallet{gap:3px}.kdWalletAmount>span{font-size:10px}.kdRefHeader .kdRefWallet .kdBlueCrystal{width:16px;height:20px}.kdWheelTeaserCopy>small{font-size:5px;letter-spacing:.2px}}
.kdRefHeader .kdRefWallet{max-width:102px}.kdRefHeader .kdWalletAmount{min-width:0;flex:1}.kdWalletAmount>span{max-width:54px;width:100%}
@media(max-width:350px){.kdRefHeader .kdRefWallet{max-width:86px}.kdWalletAmount>span{max-width:36px}}
/* v6.16: the shop miniatures and playable board share the same pipe/stone renderer. */
html[data-kd-theme] #kdGame,[data-kd-preview]{--pipe-width:13;--pipe-metal:#5b3c20;--pipe-shine:#fff3c0}
html[data-kd-theme="emerald"] #kdGame,[data-kd-preview="emerald"]{--pipe-tone:#83ddb0;--pipe-metal:#a77c36;--pipe-shine:#edffcf;--pipe-width:20;--stone-tone:#173b2f;--stone-light:#315e48;--stone-edge:#6b9d73}
html[data-kd-theme="ruby"] #kdGame,[data-kd-preview="ruby"]{--pipe-tone:#f18d7b;--pipe-metal:#ad743c;--pipe-shine:#ffe2b7;--pipe-width:20;--stone-tone:#3c2025;--stone-light:#60383a;--stone-edge:#a56c61}
[data-kd-preview="gold"]{--pipe-tone:#dfb56d;--stone-tone:#322c23;--stone-light:#514738;--stone-edge:#77664a}
[data-kd-preview="ice"]{--pipe-tone:#8cbedc;--stone-tone:#202a35;--stone-light:#3a4a58;--stone-edge:#576d7c}
[data-kd-preview="fire"]{--pipe-tone:#e0aa5e;--stone-tone:#46372a;--stone-light:#6a543c;--stone-edge:#98754d}
[data-kd-preview="shadow"]{--pipe-tone:#ba9be5;--stone-tone:#2c2337;--stone-light:#493b57;--stone-edge:#766286}
.kdLivePreview{position:relative;display:block;overflow:hidden;aspect-ratio:141/113;border-radius:10px;--pipe-width:13;--pipe-metal:#5b3c20;--pipe-shine:#fff3c0}
.kdLivePreview[data-kd-preview="emerald"],.kdLivePreview[data-kd-preview="ruby"]{--pipe-width:20}
.kdLivePreview>.kdThemePreview{position:absolute;inset:0;opacity:.4;filter:saturate(.85)}
.kdMiniBoard{position:absolute;inset:7% 14%;display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:4px;border:2px solid var(--stone-edge);border-radius:8px;background:#111;box-shadow:0 0 0 2px #baa37240,inset 0 0 8px #000}
.kdMiniBoard .tile,html[data-kd-theme] #kdGame main>.board .tile{background:repeating-linear-gradient(13deg,#ffffff03 0 1px,transparent 1px 9px),radial-gradient(ellipse at 25% 15%,var(--stone-light),transparent 70%),linear-gradient(155deg,var(--stone-tone),#141619);border:1px solid var(--stone-edge);border-radius:5px;box-shadow:inset 0 2px 3px #fff2,inset 0 -3px 4px #0009}
.kdMiniBoard svg{width:100%;height:100%;display:block}
html[data-kd-theme] #kdGame .tile svg line,.kdMiniBoard svg line{stroke-linecap:round;filter:none}
html[data-kd-theme] #kdGame .tile svg .kdPipeShell,.kdMiniBoard .kdPipeShell{stroke:var(--pipe-metal);stroke-width:calc(var(--pipe-width) + 8);filter:drop-shadow(0 2px 2px #000b)}
html[data-kd-theme] #kdGame .tile svg .kdPipeCore,.kdMiniBoard .kdPipeCore{stroke:var(--pipe-tone);stroke-width:var(--pipe-width)}
html[data-kd-theme] #kdGame .tile svg .kdPipeShine,.kdMiniBoard .kdPipeShine{stroke:var(--pipe-shine);stroke-width:3;opacity:.75;transform:translate(-1px,-2px);pointer-events:none}
html[data-kd-theme] #kdGame .tile svg .kdPipeJoint,.kdMiniBoard .kdPipeJoint{fill:var(--pipe-tone);stroke:var(--pipe-metal);stroke-width:3;filter:drop-shadow(0 1px 1px #0008)}
html[data-kd-theme] #kdGame .tile svg .kdPipeJointLight,.kdMiniBoard .kdPipeJointLight{fill:var(--pipe-shine);opacity:.7;filter:none}
html[data-kd-theme="emerald"] #board,html[data-kd-theme="ruby"] #board{border:3px double var(--stone-edge);padding:6px;box-shadow:0 0 0 2px var(--pipe-metal),0 0 28px #0009,inset 0 0 12px #000;background:var(--stone-tone)}
/* Board positions must stay LTR in RTL languages: mirrored puzzle coordinates change mechanics. */
#board,.kdMiniBoard{direction:ltr}
html:not([lang="tr"]) .kdMenuLabel{font-size:clamp(7px,2.2vw,11px);letter-spacing:0;white-space:normal}
html:not([lang="tr"]) .kdRefSectionTitle{letter-spacing:1px;font-size:clamp(16px,4.5vw,24px)}
html:not([lang="tr"]) .kdRefTheme strong{font-size:clamp(8px,2.2vw,11px);white-space:normal;min-height:24px}
html:not([lang="tr"]) .kdRefWallet small{font-size:7px;letter-spacing:0}
#kdLanguageControl{display:flex;align-items:center;justify-content:space-between;gap:12px;grid-column:1/-1;width:100%;margin-top:14px}
html[dir="rtl"] .kdModernScreen,html[dir="rtl"] .kdWheelCard{text-align:right}
.kdWheelDisc text{direction:ltr;unicode-bidi:plaintext}
html[data-kd-theme] #kdGame{background:radial-gradient(ellipse at 50% 5%,color-mix(in srgb,var(--stone-tone) 65%,transparent),transparent 65%),#080a0b}
html[data-kd-theme] #kdGame .kdTop,html[data-kd-theme] #kdGame .stat,html[data-kd-theme] #kdGame .kdBack,html[data-kd-theme] #kdGame .secondary{border-color:var(--stone-edge);background:color-mix(in srgb,var(--stone-tone) 40%,#111318)}
html[data-kd-theme] #kdGame #kdModeRule{border-color:var(--stone-edge)!important;color:var(--pipe-tone)!important}
html[data-kd-theme] #kdGame .stat b{color:var(--pipe-tone)}
html[data-kd-theme] #kdGame main>.controls>button:not(.secondary){background:linear-gradient(120deg,var(--pipe-tone),var(--stone-edge));color:#111}
html[data-kd-theme] #kdGame main>.controls button.secondary{background:color-mix(in srgb,var(--stone-tone) 40%,#111318);border-color:var(--stone-edge)}
