/* One outlined asset, one palette. Game themes must not restyle the wordmark. */
img.kd-logo{display:block;width:260px;max-width:100%;height:auto;object-fit:contain;flex-shrink:0;filter:none;transform:none}
.kd-brand{display:inline-flex;flex-direction:column;align-items:center;gap:5px;max-width:100%;text-decoration:none}
.kd-brand small{font:800 10px/1.3 'Trebuchet MS',Arial,sans-serif;letter-spacing:1.5px}
.kd-logo.kd-logo-small{width:180px}
.kd-logo.kd-logo-card{width:150px;margin:0 0 10px}
.kd-logo.kd-logo-dialog{width:230px;margin:0 auto 16px}
.header .kd-brand{width:285px}.header .kd-brand small{color:#675379}
.play-header .kd-logo{width:165px}
.topbar .kd-brand{align-items:flex-start}
.brand-wrap .kd-brand small{padding-left:6px}
.brand-heading .wordmark{margin:0;line-height:1;filter:none}
.brand-heading .wordmark .kd-logo{width:290px}
.mini-brand .kd-logo{width:160px}
.card-brand-name{display:block;max-width:93%}
.card-brand-name img.kd-logo{width:100%;max-height:none;object-fit:contain;margin:auto}
.win-brand .kd-logo{margin:8px auto}
.selection-panel>.kd-logo{margin:0 0 15px}
.page-footer>.kd-logo{width:165px}
[id^="kd-market-v"] .market-brand .kd-logo{width:235px}
#rail-station img.rc-logo.kd-logo{width:calc(100% - 50px);max-width:300px;height:auto;display:block}
#rail-campaign img.rc-logo.kd-logo{width:210px;max-width:calc(100% - 135px);height:auto;display:block}
#rail-network img.rn-logo.kd-logo{width:0;min-width:65px;max-width:260px;flex:1;height:auto;display:block}
.intro .kd-logo{margin-bottom:16px}
body[data-scene="night"] .kd-brand small{color:#fffbe5;text-shadow:0 2px 3px #17143c}
@media(max-width:560px){
 .header .kd-brand{width:265px}.header nav{flex-wrap:wrap}.header nav a{padding:8px 12px}
 .topbar .kd-brand .kd-logo{width:190px}.topbar .kd-brand small{font-size:8px}
 .brand-wrap .brand-friends{display:none}
 .brand-heading .wordmark .kd-logo{width:235px}
 [id^="kd-market-v"] .market-brand .kd-logo{width:185px}
 .play-header .kd-logo{display:none}
}
/* New games share the same wordmark, including the racing start screen. */
.brand:has(>.kd-logo){transform:none;filter:none}
.brand>.kd-logo{width:285px;max-width:100%;height:auto}
@media(max-width:700px){.brand>.kd-logo{width:215px}.topbar .kd-brand{min-width:0}.topbar .kd-brand>.kd-logo{width:200px}}

/* Creator credit is shared by the catalogue, worlds and every game wrapper. */
body>footer{flex-wrap:wrap}
footer .creator-credit{width:100%;display:flex;justify-content:space-between;flex-wrap:wrap;gap:5px 20px;margin:4px 0 0;padding-top:14px;border-top:1px solid #ffffff30;color:#f4eafa;font-size:12px;line-height:1.5;order:4}
.play-page>.play-credit{flex-shrink:0;margin:0;padding:7px 16px;background:#43215f}
.play-credit .creator-credit{justify-content:center;gap:2px 16px;border:0;padding:0;margin:0;text-align:center;font-size:11px}
@media(max-width:560px){footer .creator-credit{flex-direction:column}.play-credit .creator-credit{font-size:10px}}

/* All game themes use the same unmodified wordmark, including small screens. */
img.kd-logo{object-fit:contain!important;object-position:center;filter:none!important;transform:none!important;aspect-ratio:490.3 / 92}
@media(max-width:560px){
 .play-header{flex-wrap:wrap;justify-content:space-between}
 .play-header>img.kd-logo{display:block;width:150px;max-width:45%;order:0}
 .play-header>#game-title{width:100%;order:1;text-align:center}
}

/* Full-body displays share the scale in brand.js. Equal-sized portraits are
   deliberately exempt: a face crop does not describe the character's height. */
[data-kd-game="memory"] .brand-friends{height:74px;align-items:flex-end}
[data-kd-game="memory"] .brand-friends img{width:auto;object-fit:contain;object-position:bottom}
[data-kd-game="memory"] .brand-friends img:first-child{height:calc(74px * var(--kd-kumka-scale))}
[data-kd-game="memory"] .brand-friends img:last-child{height:74px}
[data-kd-game="memory"] .win-characters{height:155px}
[data-kd-game="memory"] .win-characters img{width:auto;object-fit:contain;object-position:bottom}
[data-kd-game="memory"] .win-characters img:first-child{height:calc(155px * var(--kd-kumka-scale))}
[data-kd-game="memory"] .win-characters img:last-child{height:155px}
[data-kd-game="memory"] .companion img{width:100%;height:220px;max-height:none;object-position:bottom;margin-top:20px}
[data-kd-game="memory"] .companion.kumka{margin-top:0}
[data-kd-game="memory"] .companion.kumka img{height:calc(220px * var(--kd-kumka-scale));margin-top:calc(20px + 220px * (1 - var(--kd-kumka-scale)))}
[data-kd-game="memory"] .card-brand-art img{width:auto;max-width:48%;object-position:bottom}
[data-kd-game="memory"] .card-brand-art img:first-child{height:calc(100% * var(--kd-kumka-scale))}
[data-kd-game="memory"] .card-brand-art img:last-child{height:100%}
[data-kd-game="memory"] .memory-figure{display:flex;justify-content:center;align-items:flex-end;width:90%;height:78%;min-height:0}
[data-kd-game="memory"] .memory-figure img{height:100%;width:auto;max-width:100%;object-fit:contain;object-position:bottom;margin:0}
[data-kd-game="memory"] .memory-figure[data-character="kumka"] img{height:calc(100% * var(--kd-kumka-scale))}

[data-kd-game="paletki"] .character-art{align-items:flex-end}
[data-kd-game="paletki"] .character-art img{object-position:bottom;height:96%;width:auto;max-width:96%;transform:none}
[data-kd-game="paletki"] .character-card.kumka .character-art img{height:calc(96% * var(--kd-kumka-scale))}

[data-kd-game="przygody"] .passport-duo,[data-kd-game="przygody"] .reward-duo{--kd-duo-height:102px;align-items:flex-end}
[data-kd-game="przygody"] .mini-kumka{height:calc(var(--kd-duo-height) * var(--kd-kumka-scale));width:auto}
[data-kd-game="przygody"] .mini-dumka{height:var(--kd-duo-height);width:auto}

[data-kd-game="ubieranki"] .kumka .avatar{height:calc(100% * var(--kd-kumka-outfit-scale))}
[data-kd-game="ubieranki"] .dumka .avatar{height:100%}

[data-kd-game="sklep"] :is(#kd-market-v4,#kd-market-v5) .market-choices{--kd-choice-height:244px}
[data-kd-game="sklep"] :is(#kd-market-v4,#kd-market-v5) .market-choice img{height:var(--kd-choice-height);object-position:bottom}
[data-kd-game="sklep"] :is(#kd-market-v4,#kd-market-v5) .market-choice[data-cashier="kumka"] img{height:calc(var(--kd-choice-height) * var(--kd-kumka-scale));margin-top:calc(var(--kd-choice-height) * (1 - var(--kd-kumka-scale)))}
[data-kd-game="sklep"] :is(#kd-market-v4,#kd-market-v5) .market-cashier[data-character="kumka"]{height:calc(78% * var(--kd-kumka-scale));bottom:19%}
@media(max-width:560px){
 [data-kd-game="memory"] .brand-friends{height:48px}
 [data-kd-game="memory"] .brand-friends img:first-child{height:calc(48px * var(--kd-kumka-scale))}
 [data-kd-game="memory"] .brand-friends img:last-child{height:48px}
 [data-kd-game="przygody"] .passport-duo{--kd-duo-height:78px}
}
@media(max-width:480px){[data-kd-game="sklep"] :is(#kd-market-v4,#kd-market-v5) .market-choices{--kd-choice-height:173px}}

/* Original cup mark, unchanged; only the source's transparent outer margin is cropped. */
.thekawa-plate{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;background:#fff;border-radius:12px}
/* The same age portraits are used in menus, HUDs and train windows. The existing
   animated driving/helmet sheets remain separate from these interface portraits. */
html[data-kd-maturity]:not([data-kd-maturity="young"]) :is(.portrait-kumka,.portrait.kumka,.kumka .reaction){background-image:var(--kd-kumka-age-art)!important;background-size:235% auto!important;background-position:96% 11%!important;background-repeat:no-repeat}
html[data-kd-maturity]:not([data-kd-maturity="young"]) :is(.portrait-dumka,.portrait.dumka,.dumka .reaction){background-image:var(--kd-dumka-age-art)!important;background-size:213% auto!important;background-position:22% 0%!important;background-repeat:no-repeat}
html[data-kd-maturity]:not([data-kd-maturity="young"]) .reaction .fallback{visibility:hidden}
img.thekawa-logo{display:block;width:150px;height:54px;object-fit:cover;object-position:center;filter:none;transform:none;max-width:none}
footer .creator-credit{align-items:center}
.creator-signature{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.play-credit .creator-signature{gap:9px}
.play-credit img.thekawa-logo{width:108px;height:38px}
.play-credit .thekawa-plate{border-radius:7px}
@media(max-width:560px){
 footer .creator-credit{align-items:flex-start;gap:12px}
 .play-credit .creator-credit{align-items:center;gap:3px}
 .play-credit .creator-signature{justify-content:center;flex-wrap:nowrap}
 .play-credit .creator-signature>span:last-child{max-width:225px;text-align:left}
}

/* The two lead characters are always pictured together. Full figures share a
   ground line and the existing 1:2 scale, also when a guest joins them. */
.kd-duo{--kd-duo-height:64px;display:inline-flex;align-items:flex-end;justify-content:center;gap:4px;height:var(--kd-duo-height);max-width:100%;flex-shrink:0;vertical-align:bottom;pointer-events:none;line-height:0}
.kd-duo>img{display:block;position:static;width:auto;max-width:none;height:100%;object-fit:contain;object-position:center bottom;margin:0;padding:0;transform:none;filter:drop-shadow(0 3px 2px #37234f18);flex-shrink:0;min-width:0}
.kd-duo>img.kd-duo-kumka{height:calc(100% * var(--kd-kumka-scale,.5))}
.kd-duo>img.kd-duo-guest{height:72%;max-width:none;margin-left:5px}
.play-brand{display:flex;align-items:center;gap:10px;min-width:0;flex-shrink:0}
.play-brand .kd-duo{--kd-duo-height:58px}
.play-brand>img.kd-logo{display:block;width:145px;max-width:none}
.memory-brand-duo{--kd-duo-height:74px}
.market-brand-duo{--kd-duo-height:72px;margin-top:8px}
.rail-brand-duo{--kd-duo-height:66px;display:flex;margin:8px auto 0}
[data-kd-game="bolidy"] #driver-badge{gap:9px;pointer-events:none}
[data-kd-game="bolidy"] #driver-badge .kd-duo{--kd-duo-height:54px}
[data-kd-game="bolidy"] #driver-badge b{font-size:16px}
[data-kd-game="kosmos"] .hud-left .kd-duo{--kd-duo-height:72px}
[data-kd-game="paletki"] .scorebar .avatar{width:58px;height:64px;background:transparent;border:0;box-shadow:none;border-radius:0;display:flex;align-items:flex-end;justify-content:center}
[data-kd-game="paletki"] .scorebar .avatar img{display:block;height:100%;width:100%;object-fit:contain;object-position:bottom}
[data-kd-game="paletki"] .scorebar .avatar[data-character="kumka"] img{height:calc(100% * var(--kd-kumka-scale,.5))}
@media(max-width:560px){
 .play-brand{gap:5px}.play-brand>img.kd-logo{width:94px}.play-brand .kd-duo{--kd-duo-height:52px}
 .memory-brand-duo{--kd-duo-height:58px}
 [data-kd-game="memory"] .brand-wrap{gap:8px;max-width:100%}
 [data-kd-game="memory"] .brand-wrap .kd-logo{width:180px}
 .market-brand-duo{--kd-duo-height:60px}
 [data-kd-game="bolidy"] #driver-badge .kd-duo{--kd-duo-height:42px}
 [data-kd-game="kosmos"] .hud-left .kd-duo{--kd-duo-height:58px}
}

[data-kd-game="bolidy"] #leaderboard{top:calc(123px + 72px)}
@media(max-width:700px){[data-kd-game="bolidy"] #leaderboard{top:calc(98px + 72px)}}
@media(max-height:540px) and (orientation:landscape){[data-kd-game="bolidy"] #driver-badge .kd-duo{--kd-duo-height:38px}[data-kd-game="bolidy"] #leaderboard{top:calc(78px + 56px)}}
