/* ================================
   GENERELT / APP
================================ */
*{box-sizing:border-box;}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#000;font-family:Arial,sans-serif;color:#fff;}
button{font-family:inherit;cursor:pointer;}
#app{width:100vw;height:100vh;display:flex;flex-direction:column;}

/* ================================
   TOPBAR
================================ */
#topBar{height:50px;flex-shrink:0;position:relative;display:flex;align-items:center;padding:0 20px;background:#111;border-bottom:1px solid #444;}
.game-title{font-size:22px;font-weight:bold;}
#diceValuesDisplay{position:absolute;left:calc(420px + (100% - 420px)/2);top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:5px;margin:0;padding:0;}
.mini-die{width:26px;height:26px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:3px;background:rgba(255,255,255,.9);border-radius:5px;}
.dot{width:5px;height:5px;justify-self:center;align-self:center;background:#111;border-radius:50%;}

/* ================================
   PC-SKÆRME / MENUER
================================ */
.desktop-screen{display:none;}
.desktop-screen.active{display:flex;}
.desktop-setup-screen{position:fixed;inset:0;z-index:1500;align-items:center;justify-content:center;background:#000;}
.desktop-setup-box{width:420px;padding:28px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;background:rgba(20,20,20,.96);border:1px solid rgba(255,255,255,.12);border-radius:12px;box-shadow:0 8px 25px rgba(0,0,0,.45);}
.desktop-setup-box h1{margin:0 0 14px;}
.desktop-setup-box h3{margin:0 0 4px;}
.desktop-setup-box button,.desktop-home button{width:86%;max-width:300px;min-height:48px;padding:10px 14px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:linear-gradient(180deg,rgba(80,80,80,.95),rgba(35,35,35,.95));color:#fff;font-size:16px;font-weight:600;letter-spacing:.8px;box-shadow:0 3px 7px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.1);}
.desktop-setup-box button:hover,.desktop-home button:hover{filter:brightness(1.12);}
.desktop-setup-box button:active,.desktop-home button:active{transform:translateY(1px);}
.desktop-player-count{width:100%;display:flex;justify-content:center;gap:10px;margin:4px 0 10px;}
.desktop-player-count button{width:55px;min-width:55px;height:45px;}
#desktopPlayerInputs,.desktop-network{width:86%;max-width:300px;display:flex;flex-direction:column;gap:10px;}
.desktop-player-input,.desktop-network input,.desktop-network select{width:100%;height:44px;padding:0 12px;border:1px solid rgba(255,255,255,.16);border-radius:8px;background:#222;color:#fff;font-size:16px;}
.desktop-network button{width:100%;}
#createdGameInfo,#desktopNetworkInfo{width:100%;}

/* ================================
   HOVEDMENU
================================ */
#desktopHomeScreen{position:fixed;inset:0;z-index:1500;align-items:center;justify-content:center;background:#000;}
.desktop-home{width:420px;display:flex;flex-direction:column;align-items:center;text-align:center;}
.desktop-home-title{margin:0 0 18px;font-size:28px;font-weight:bold;letter-spacing:1px;}
.desktop-logo{margin:8px 0 18px;display:flex;align-items:center;justify-content:center;}
.desktop-logo img{display:block;width:90%;max-width:320px;height:auto;}
.desktop-home button{margin:6px auto;display:flex;align-items:center;justify-content:center;}
.desktop-home .desktop-net-button{background:linear-gradient(180deg,#3f5060,#202a33);}

/* ================================
   HIGHSCORE
================================ */
.highscore{width:100%;max-width:360px;margin:8px auto 18px;padding:0;text-align:left;background:transparent;border:0;font-size:17px;line-height:1.7;}
.highscore-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;min-height:42px;padding:5px 12px;margin-bottom:5px;background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.03));border:1px solid rgba(255,255,255,.09);border-radius:8px;}
.highscore-rank{font-weight:bold;color:#ffd86a;}
.highscore-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.highscore-score{padding-left:15px;font-weight:bold;text-align:right;color:#ffd86a;}

/* ================================
   SPILLE-SKÆRM
================================ */
#gameScreen{display:none;flex:1;min-height:0;}
.desktop-game{width:100%;height:100%;display:grid;grid-template-columns:420px minmax(500px,1fr);}
.game-area{min-width:0;min-height:0;position:relative;display:flex;flex-direction:column;background:#000;}
.game-status{height:42px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:#181818;font-size:18px;font-weight:bold;}

/* ================================
   SCORETAVLE
================================ */

.score-area{
    min-width:0;
    min-height:0;
    overflow:auto;
    padding:6px;
    background:#151515;
    border-right:2px solid #333;
}

.score-area h2{
    margin:0 0 4px;
    text-align:center;
    font-size:17px;
    line-height:22px;
}

.score-list{
    width:100%;
    padding:0;
    text-align:left;
}

.desktop-score-row{
    display:grid;
    min-height:24px;
    margin:1px 0;
    background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.03));
    border:1px solid rgba(255,255,255,.08);
    border-radius:4px;
    overflow:hidden;
    font-size:13px;
}

.desktop-score-row > div{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:2px 5px;
    line-height:18px;
    border-right:1px solid rgba(255,255,255,.06);
}

.desktop-score-row > div:last-child{
    border-right:0;
}

.desktop-score-row > div:first-child{
    justify-content:flex-start;
    font-weight:normal;
}

.desktop-score-header{
    min-height:26px;
    background:#181818;
    font-weight:bold;
}

.desktop-score-header > div{
    justify-content:center;
}

.desktop-score-header > div:first-child{
    background:transparent;
}
.desktop-score-row>div:not(:first-child){font-weight:bold;}
.desktop-current-player{color:#ffd86a;}
.desktop-score-choice{cursor:pointer;}
.desktop-score-choice:not(.desktop-score-preview){color:#777;}
.desktop-score-preview{background:rgba(70,140,80,.18);color:#b9e8bf;}
.desktop-score-choice:hover{background:rgba(70,140,80,.30);}
.desktop-score-total{background:rgba(150,110,40,.22);border-color:rgba(220,180,80,.25);}
.desktop-score-total>div:not(:first-child){background:rgba(0,0,0,.20);color:#f0d58a;}
.desktop-bonus-positive{color:#9bd39f!important;font-weight:bold;}
.desktop-bonus-negative{color:#d9a0a0!important;font-weight:bold;}
.desktop-score-grand-total{background:rgba(180,130,35,.32);border-color:rgba(255,210,90,.40);font-weight:bold;}
.desktop-score-grand-total>div:first-child{font-weight:bold;}
.desktop-score-grand-total>div:not(:first-child){color:#ffd86a;font-size:14px;font-weight:bold;}

/* ================================
   3D-BORD
================================ */
#threeContainer{flex:1;min-height:0;position:relative;overflow:hidden;background:#000;}
#threeContainer canvas{display:block;width:100%!important;height:100%!important;}

/* ================================
   KAST / BANK
================================ */
.action-buttons{height:70px;flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:14px;padding:8px 20px;background:#111;}
.action-buttons button{width:180px;height:50px;border:1px solid #777;border-radius:8px;background:#292929;color:#fff;font-size:18px;font-weight:bold;}
.action-buttons button:hover:not(:disabled){background:#3a3a3a;}
.action-buttons button:disabled{opacity:.4;cursor:default;}
#bankButton{background:linear-gradient(180deg,#5a4a24,#2c2412);}
.bank-ready{animation:bankPulse 1s infinite alternate;}
#bankButton:active{transform:translateY(1px);box-shadow:0 1px 3px rgba(0,0,0,.5);}
#bankButton.bank-used{background:linear-gradient(180deg,#2f6b3b,#17351d);box-shadow:0 0 10px rgba(80,200,100,.5);color:#d8ffe0;}
@keyframes bankPulse{from{box-shadow:0 0 5px #ffd700;}to{box-shadow:0 0 20px #ffd700,0 0 35px orange;}}

/* ================================
   MODSTANDER STATUS
================================ */
#opponentStatus{position:fixed;left:calc(420px + (100% - 420px)/2);top:35%;transform:translate(-50%,-50%);z-index:9999;pointer-events:none;opacity:0;white-space:nowrap;font-size:32px;font-weight:bold;}
#opponentStatus.show{animation:opponentStatusFly 1.8s ease-out forwards;}
@keyframes opponentStatusFly{0%{opacity:0;transform:translate(-50%,80px) scale(.7);}20%{opacity:1;}70%{opacity:1;}100%{opacity:0;transform:translate(-50%,-120px) scale(1.15);}}

/* ================================
   WAITING ROOM
================================ */
.net-player-number{font-weight:bold;color:#ffd86a;text-align:center;}
.net-player-status{font-size:20px;font-weight:bold;text-align:center;}
.net-player-slots{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    margin:14px 0;
}

.net-player-slot{
    min-height:62px;
    display:grid;
    grid-template-columns:30px 28px minmax(0,1fr);
    align-items:center;
    gap:8px;
    padding:8px 12px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.10);
    border-radius:8px;
}

.net-player-name{
    min-width:0;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    line-height:1.2;
}

/* ================================
   CHAT
================================ */
.chat-button{display:none;position:absolute;top:52px;right:12px;width:42px;height:42px;padding:0;border:1px solid #555;border-radius:50%;background:#333;color:#fff;font-size:22px;z-index:60;}
.chat-button:hover{background:#444;}
.chat-box{display:none;position:absolute;top:100px;right:12px;width:300px;padding:12px;border-radius:12px;background:rgba(20,20,20,.96);box-shadow:0 8px 25px rgba(0,0,0,.55);z-index:70;}
.chat-box.show{display:block;}
.chat-header{margin-bottom:8px;text-align:center;font-weight:bold;}
.chat-messages{min-height:70px;max-height:170px;overflow-y:auto;margin-bottom:10px;padding:6px;background:rgba(255,255,255,.04);border-radius:7px;font-size:14px;}
.chat-emojis{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-bottom:10px;}
.chat-emojis button{width:38px;height:36px;padding:0;border:none;border-radius:7px;font-size:20px;}
.chat-input-row{display:flex;gap:6px;}
.chat-input-row input{flex:1;min-width:0;height:38px;padding:0 9px;border:1px solid #555;border-radius:6px;background:#222;color:#fff;}
.chat-input-row button{width:auto;padding:6px 12px;}

/* ================================
   YATZY / BONUS
================================ */
.yatzy-effect{color:#ffd700;font-size:34px;font-weight:900;animation:yatzyPop .4s ease-out,yatzyPulse .6s infinite alternate;}
@keyframes yatzyPop{0%{transform:scale(0);opacity:0;}70%{transform:scale(1.3);opacity:1;}100%{transform:scale(1);}}
@keyframes yatzyPulse{from{text-shadow:0 0 5px #fff,0 0 10px gold;}to{text-shadow:0 0 15px #fff,0 0 30px gold,0 0 50px orange;}}
.bonus-effect{position:fixed;top:35%;left:50%;transform:translate(-50%,-50%);z-index:10000;color:#ffd700;font-size:30px;font-weight:900;white-space:nowrap;text-shadow:0 0 10px gold,0 0 25px orange;animation:bonusPop .5s ease-out;}
@keyframes bonusPop{0%{transform:translate(-50%,-50%) scale(0);}70%{transform:translate(-50%,-50%) scale(1.2);}100%{transform:translate(-50%,-50%) scale(1);}}

/* ================================
   WINNER / CONFETTI
================================ */
.desktop-winner-screen{display:none;position:fixed;inset:0;z-index:2000;align-items:center;justify-content:center;background:rgba(0,0,0,.88);}
.desktop-winner-screen.active{display:flex;}
.desktop-winner-box{width:min(560px,90vw);padding:30px;text-align:center;background:#181818;border:1px solid rgba(255,255,255,.15);border-radius:12px;}
#finalScores{margin:20px 0;}
.winner-buttons{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;}
.winner-buttons button{padding:12px 18px;border:1px solid #777;border-radius:8px;background:#292929;color:#fff;font-weight:bold;}
.confetti-container{position:fixed;top:0;left:0;width:100%;height:100%;z-index:3000;pointer-events:none;overflow:hidden;}
.confetti{position:absolute;top:-20px;width:10px;height:18px;background:gold;animation:fall 4s ease-out forwards;}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg);}}

/* ================================
   BURGER MENU
================================ */
#headerMenuButton{
    display:none;
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    margin:0;
    padding:0 6px;
    background:none;
    border:none;
    color:white;
    font-size:24px;
    line-height:1;
    z-index:100;
}

.main-menu{
    display:none;
    position:absolute;
    top:52px;
    right:8px;
    width:170px;
    padding:6px;
    background:#181818;
    border:1px solid #444;
    border-radius:8px;
    box-shadow:0 6px 18px rgba(0,0,0,.55);
    z-index:200;
}

.main-menu.show{display:block;}

.main-menu button{
    display:block;
    width:100%;
    margin:2px 0;
    padding:9px 10px;
    border:none;
    border-radius:5px;
    background:#292929;
    color:white;
    text-align:left;
    font-size:14px;
}

.main-menu button:hover{background:#3a3a3a;}

/* ================================
   EXTRA YATZY POPUP
================================ */

#yatzyPopup{
    position:fixed;
    left:8px;
    top:58px;
    bottom:8px;

    width:404px;

    z-index:5000;

    overflow-y:auto;

    background:transparent;

    pointer-events:none;
}

#yatzyPopup .yatzyPopup{
    width:100%;

    padding:14px;

    text-align:center;

    background:rgba(24,24,24,.98);

    border:1px solid #555;
    border-radius:10px;

    box-shadow:0 8px 30px rgba(0,0,0,.75);

    pointer-events:auto;
}

#yatzyPopup h2{
    margin:0 0 8px;
    color:#ffd700;
}

#yatzyPopup p{
    margin:6px 0 12px;
}

#yatzyPopup button{
    width:100%;
    min-height:40px;

    margin:4px 0;
    padding:8px 10px;

    border:1px solid #555;
    border-radius:7px;

    background:#292929;
    color:white;

    font-size:14px;
    cursor:pointer;
}

#yatzyPopup button:hover{
    background:#3a3a3a;
}

/* ================================
   GLOBAL BURGER + SPROG
================================ */
#headerMenuButton.global-menu-button{
    display:flex !important;
    position:fixed;
    right:10px;
    top:10px;
    transform:none;
    z-index:6000;
}
#desktopMainMenu.global-main-menu{
    position:fixed;
    right:8px;
    top:52px;
    left:auto;
    z-index:6001;
}
.menu-divider{height:1px;margin:5px 4px;background:rgba(255,255,255,.15);}
.language-choices{display:none;padding-top:2px;}
.language-choices.show{display:block;}
.language-choices button{padding-left:18px;}


/* ================================
   GAME OVER - RESULTAT
================================ */
.desktop-result-button{
    display:none;
    position:absolute;
    right:58px;
    top:50%;
    transform:translateY(-50%);
    min-height:32px;
    padding:5px 10px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:7px;
    background:#292929;
    color:#ffd86a;
    font-size:13px;
    font-weight:bold;
    cursor:pointer;
    z-index:90;
}
.desktop-result-button.show{display:block;}
.desktop-result-button:hover{background:#3a3a3a;}


/* ================================
   PRIVAT / OFFENTLIGT NET-PLAY
================================ */
.network-game-type,
.network-join-block{
    width:100%;
    max-width:320px;
    margin:10px auto;
    padding:10px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.10);
    border-radius:9px;
}
.network-public-check{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    cursor:pointer;
}
.network-public-check input{
    width:18px;
    height:18px;
}
.network-game-type-info{
    margin-top:5px;
    font-size:13px;
    line-height:1.3;
    opacity:.72;
    text-align:center;
}
.network-join-block h3{
    margin:0 0 4px;
    font-size:15px;
}
.network-or{
    margin:5px 0;
    text-align:center;
    opacity:.45;
}


.lobby-expiry{
    margin-top:10px;
    font-size:13px;
    font-variant-numeric:tabular-nums;
    opacity:.72;
}


/* ================================
   PREAPP PC NET-PLAY FINISH
================================ */

#desktopCreateGameScreen .desktop-setup-box,
#desktopJoinGameScreen .desktop-setup-box{
    padding:18px 24px;
    gap:8px;
}

#desktopCreateGameScreen .desktop-setup-box h1,
#desktopJoinGameScreen .desktop-setup-box h1{
    margin:0 0 8px;
}

#desktopCreateGameScreen .desktop-network,
#desktopJoinGameScreen .desktop-network{
    gap:7px;
}

#desktopCreateGameScreen .desktop-network input,
#desktopCreateGameScreen .desktop-network select,
#desktopJoinGameScreen .desktop-network input{
    height:40px;
}

#desktopCreateGameScreen .desktop-network button,
#desktopJoinGameScreen .desktop-network button{
    min-height:42px;
    padding:7px 12px;
}

#desktopCreateGameScreen .network-game-type,
#desktopJoinGameScreen .network-join-block{
    margin:6px auto;
    padding:8px 10px;
    background:rgba(115,58,20,.24);
    border-color:rgba(220,125,55,.42);
}

#desktopCreateGameScreen .network-game-type-info,
#desktopJoinGameScreen .network-game-type-info{
    margin-top:3px;
    line-height:1.2;
    color:#c8b5a6;
}

#desktopJoinGameScreen .network-join-block + .network-join-block{
    margin-top:9px;
}

#desktopCreateGameForm,
#desktopJoinGameForm{
    width:100%;
    display:flex;
    flex-direction:column;
    gap:7px;
}

#desktopCreateGameScreen #createdGameInfo,
#desktopJoinGameScreen #desktopNetworkInfo{
    width:100%;
    margin:2px 0;
}

#desktopCreateGameScreen .net-player-slots,
#desktopJoinGameScreen .net-player-slots{
    gap:9px;
    margin:10px 0;
}

#desktopCreateGameScreen .lobby-expiry,
#desktopJoinGameScreen .lobby-expiry{
    margin-top:6px;
}

#desktopNetworkInfo.network-cancel-message{
    display:block;
    width:min(92%,440px);
    margin:10px auto;
    padding:10px 12px;
    border:1px solid rgba(220,125,55,.42);
    border-radius:10px;
    background:rgba(115,58,20,.24);
    color:#f2dfcf;
    text-align:center;
    line-height:1.25;
}


#desktopNetworkMenuInfo.network-cancel-message{
    width:86%;
    max-width:300px;
    margin:2px auto 10px;
    padding:10px 12px;
    box-sizing:border-box;
    border-radius:8px;
    background:rgba(155,74,22,.34);
    border:1px solid rgba(255,155,78,.48);
    color:#ffd3ad;
    font-size:14px;
    line-height:1.35;
    text-align:center;
}
.desktop-player-left{
    text-decoration-line:line-through;
    text-decoration-thickness:2px;
    opacity:.65;
}

/* ================= AVATAR TEST 1 ================= */
.avatar-menu-thumb{width:28px;height:28px;border-radius:50%;object-fit:cover;vertical-align:middle;margin-right:6px;border:2px solid #d9b44a}
.desktop-avatar-screen{overflow:auto;padding:24px;box-sizing:border-box}.desktop-avatar-screen .avatar-editor{max-width:850px;margin:0 auto;text-align:center;color:#fff}.desktop-avatar-screen h2{font-size:34px;margin:5px}.desktop-avatar-screen h3{font-size:16px;color:#f4d56a;margin:14px 0 8px}.avatar-intro{color:#ddd}.avatar-preview{position:relative;width:135px;height:170px;margin:10px auto;border:3px solid #d5ae43;border-radius:18px;overflow:hidden;background:#143d28}.avatar-preview-img{width:100%;height:100%;object-fit:cover}.avatar-die-logo{position:absolute;right:7px;bottom:6px;font-size:28px}.avatar-base-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:9px}.avatar-base-card{position:relative;height:125px;padding:0;overflow:hidden;border:2px solid #52715e;border-radius:12px;background:#123a27}.avatar-base-card img{width:100%;height:100%;object-fit:cover}.avatar-base-card span{position:absolute;left:5px;bottom:4px;width:22px;height:22px;border-radius:50%;background:#000a;color:#fff;line-height:22px}.avatar-base-card.selected{border-color:#ffd84d;box-shadow:0 0 0 2px #ffd84d55}.avatar-swatches{display:flex;justify-content:center;gap:10px}.avatar-swatch{width:36px;height:36px;border-radius:50%;border:3px solid #ffffff55}.avatar-swatch.selected{border-color:#fff;outline:3px solid #e6b83f;transform:scale(1.08)}
.skin-light{background:#f4d1b4}.skin-warm{background:#dca77e}.skin-tan{background:#b97850}.skin-brown{background:#815033}.skin-dark{background:#4b2c20}.hair-black{background:#171717}.hair-brown{background:#6b3f24}.hair-blonde{background:#e2bf69}.hair-red{background:#9f4929}.hair-grey{background:#888}.hair-white{background:#eee}.shirt-green{background:#1f7a4c}.shirt-blue{background:#2674b8}.shirt-red{background:#b92d35}.shirt-yellow{background:#f2cf36}.shirt-purple{background:#71449a}.shirt-black{background:#171717}.shirt-white{background:#eee}.shirt-orange{background:#d9782d}.avatar-reward-note,.avatar-dog-note{max-width:600px;margin:14px auto;padding:9px;border-radius:10px;background:#0003;color:#ddd}.avatar-actions{display:flex;justify-content:center;gap:12px;margin-top:14px}.avatar-actions button{min-width:180px}


/* ================= TURN AVATAR TEST 2 ================= */
.turn-avatar{
    position:absolute;
    right:10px;
    bottom:70px;
    width:clamp(180px,24vw,340px);
    height:clamp(310px,55vh,560px);
    z-index:24;
    pointer-events:none;
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
    overflow:visible;
    filter:drop-shadow(0 10px 10px rgba(0,0,0,.62));
}
.turn-avatar-img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;object-position:right bottom}
.turn-avatar-name{
    position:absolute;right:18px;bottom:8px;max-width:220px;padding:6px 14px;
    border:1px solid rgba(255,216,77,.75);border-radius:16px;background:rgba(0,0,0,.70);
    color:#fff;font-size:16px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    box-shadow:0 3px 9px #0009;
}

/* ================= AVATAR TEST 3 FIXES ================= */
.desktop-avatar-screen{position:fixed;inset:0;z-index:1500;background:#000;align-items:flex-start;justify-content:center;overflow:auto;padding:24px;box-sizing:border-box}
.desktop-avatar-screen .avatar-preview{width:180px;height:260px;background:transparent;overflow:visible}
.desktop-avatar-screen .avatar-preview-img,.desktop-avatar-screen .avatar-base-card img{object-fit:contain}
.desktop-home-avatar{position:absolute;right:max(28px,5vw);bottom:0;width:min(30vw,430px);height:min(72vh,650px);display:flex;align-items:flex-end;justify-content:center;pointer-events:none;filter:drop-shadow(0 12px 12px rgba(0,0,0,.7))}
.desktop-home-avatar img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;object-position:center bottom}
.turn-avatar{width:clamp(165px,22vw,310px);height:clamp(285px,50vh,500px)}
.turn-avatar-img{max-width:92%;max-height:92%}
.turn-avatar.turn-avatar-dog .turn-avatar-img{max-width:76%;max-height:80%}
@media(max-width:1050px){.desktop-home-avatar{opacity:.32;right:0}.desktop-home{position:relative;z-index:1}}

/* ================= AVATAR TEST 4 ================= */
.desktop-local-player-row{display:flex;align-items:center;gap:10px;width:100%;margin:7px 0}
.desktop-local-player-row .desktop-player-input{flex:1;min-width:0;margin:0}
.desktop-local-avatar-pick{width:150px!important;padding:6px 10px!important;display:flex!important;align-items:center;justify-content:center;gap:8px;font-size:13px!important}
.desktop-local-avatar-pick img{width:34px;height:40px;object-fit:contain;display:block}
/* ================= AVATAR TEST 5 - GRANNY LIVE COLORS ================= */
.avatar-preview-canvas{width:100%;height:100%;object-fit:contain;display:block}
.eyes-blue{background:#2d82be}.eyes-green{background:#4c8246}.eyes-grey{background:#788287}.eyes-brown{background:#784623}.eyes-darkbrown{background:#41281c}.eyes-amber{background:#c37819}
.hair-silver{background:#e0e0da}.hair-lightbrown{background:#97623d}.hair-darkbrown{background:#523122}

/* AVATAR TEST 6 - controls scroll, avatar stays fixed */
.desktop-avatar-screen{overflow:hidden!important;padding:18px!important}
.desktop-avatar-screen .avatar-editor-v6{width:min(1180px,100%);max-width:none!important;height:calc(100vh - 36px);display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,38%);gap:22px;overflow:hidden;text-align:center}
.desktop-avatar-screen .avatar-options-pane{grid-column:1;min-width:0;overflow-y:auto;overscroll-behavior:contain;padding:0 12px 26px;scrollbar-gutter:stable}
.desktop-avatar-screen .avatar-fixed-preview{grid-column:2;display:flex;align-items:center;justify-content:center;min-width:0;height:100%;position:sticky;top:0;background:linear-gradient(180deg,#101712,#070b08);border:1px solid #ffffff18;border-radius:18px}
.desktop-avatar-screen .avatar-fixed-preview .avatar-preview{width:88%;height:94%;max-width:420px;margin:0;border:0;box-shadow:none;background:transparent;overflow:visible}
.desktop-avatar-screen .avatar-preview-img,.desktop-avatar-screen .avatar-preview-canvas{width:100%;height:100%;object-fit:contain}
.desktop-avatar-screen .avatar-base-grid{grid-template-columns:repeat(4,1fr)}
/* AVATAR TEST 7 - compact controls */
.desktop-avatar-screen .avatar-swatch{width:28px;height:28px;border-width:2px}
.desktop-avatar-screen .avatar-swatches{gap:9px}
/* AVATAR TEST 9 - sketch-like boxed editor */
.desktop-avatar-screen .avatar-editor-v6{gap:14px}
.desktop-avatar-screen .avatar-options-pane,.desktop-avatar-screen .avatar-fixed-preview{border:2px solid #d8b83e;border-radius:20px;background:linear-gradient(180deg,#07150f,#020805);box-sizing:border-box}
.desktop-avatar-screen .avatar-options-pane{padding:14px 18px 28px}
.avatar-editor-top{display:flex;justify-content:flex-start;position:sticky;top:0;z-index:5;background:#07150f;padding:0 0 8px}
.avatar-back-top{border:1px solid #87918c!important;border-radius:16px!important;background:#28312f!important;color:#fff!important;padding:8px 18px!important;font-size:15px!important}
.desktop-avatar-screen .avatar-human-options>h3,.desktop-avatar-screen .avatar-options-pane>h3{margin-top:12px}
.desktop-avatar-screen .avatar-swatches{padding:8px 10px;border:1px solid #ffffff18;border-radius:14px;background:#0b1511}

/* TEST 16e - mere naturlige avatarfarver */
.skin-fair{background:#f6d8c2}.skin-light{background:#edc3a7}.skin-peach{background:#dfa98b}.skin-warm{background:#cf9672}.skin-golden{background:#bd845f}.skin-tan{background:#a96f50}
.eyes-blue{background:#527e97}.eyes-green{background:#587956}.eyes-grey{background:#768084}.eyes-hazel{background:#7e6a48}.eyes-brown{background:#664834}.eyes-darkbrown{background:#42342d}

.skin-original{background:linear-gradient(135deg,#efc4a8,#c98e69,#8e5b43)!important}
.skin-light{background:#eec6aa!important}.skin-warm{background:#daa584!important}.skin-tan{background:#c28b65!important}.skin-brown{background:#9b6749!important}.skin-deep{background:#5b392b!important}
.hair-greywhite{background:#c2bfb5!important}.hair-grey{background:#7e7e7a!important}
.local-avatar-pick,.desktop-local-avatar-pick{position:relative!important;z-index:10!important;pointer-events:auto!important}
/* Avatar test 16i: skofarver */
.shoes-original{background:linear-gradient(135deg,#f2f2f2 0 45%,#777 46% 55%,#d5b45b 56% 100%)!important}
.shoes-green{background:#1e8446!important}.shoes-blue{background:#2674b8!important}.shoes-red{background:#be2d35!important}.shoes-yellow{background:#f2cf36!important}.shoes-purple{background:#71449a!important}.shoes-black{background:#232323!important}.shoes-white{background:#ebebeb!important}.shoes-orange{background:#d9782d!important}

/* Avatar 16j - pelsfarver */
.fur-original{background:linear-gradient(135deg,#d99652 0 48%,#f0c58d 49% 100%)!important}.fur-cream{background:#c7b29b!important}.fur-golden{background:#bc8c60!important}.fur-brown{background:#95655b!important}.fur-dark{background:#594d4b!important}.fur-grey{background:#9a9a9a!important}

/* TEST 16O: ufærdige avatarer er synlige, men tydeligt låst */
.avatar-base-card.avatar-base-locked{cursor:not-allowed;filter:saturate(.45) brightness(.62);opacity:.82}
.avatar-base-card.avatar-base-locked img{filter:grayscale(.18)}
.avatar-base-card .avatar-lock-cross{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:Arial,sans-serif;font-size:76px;font-weight:900;line-height:1;color:#e53935;text-shadow:0 2px 4px #000,0 0 2px #fff;pointer-events:none;z-index:3}
.avatar-base-card.avatar-base-locked span{z-index:4}
.avatar-base-card.avatar-base-locked:disabled{border-color:#5b625e}
/* Avatar test 16x: bukser, original cap/t-shirt og justeret hudtone */
.pants-original,.tshirt-original,.cap-original{background:linear-gradient(135deg,#eee 0 42%,#777 43% 52%,#c7a46a 53% 100%)!important}
.pants-green,.tshirt-green{background:#1e8446!important}.pants-blue,.tshirt-blue{background:#2674b8!important}.pants-red,.tshirt-red{background:#be2d35!important}.pants-yellow,.tshirt-yellow{background:#f2cf36!important}.pants-purple,.tshirt-purple{background:#71449a!important}.pants-black,.tshirt-black{background:#232323!important}.pants-white,.tshirt-white{background:#ebebeb!important}.pants-orange,.tshirt-orange{background:#d9782d!important}
.skin-tan{background:#cd8e5c!important}
.hair-original{background:#19b51f!important}
.socks-original{background:linear-gradient(135deg,#f4e21f 0 50%,#fff 50% 100%)!important}
.socks-green{background:#1e8446!important}.socks-blue{background:#2674b8!important}.socks-red{background:#be2d35!important}.socks-yellow{background:#f2cf36!important}.socks-purple{background:#71449a!important}.socks-black{background:#232323!important}.socks-white{background:#ebebeb!important}.socks-orange{background:#d9782d!important}


/* TEST 16ab: vinder-avatar + avatar foran highscore */
#winnerText .winner-avatar-wrap{height:250px;display:flex;align-items:flex-end;justify-content:center;margin:0 auto 8px;overflow:hidden;}
#winnerText .winner-avatar-img{height:245px;width:180px;object-fit:contain;object-position:center bottom;display:block;}
#desktopHighscoreScreen .highscore-row{grid-template-columns:42px 54px 1fr auto;}
.highscore-avatar-slot{width:50px;height:58px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;}
.highscore-avatar-img{width:48px;height:58px;object-fit:contain;object-position:center bottom;display:block;}

/* TEST 16ad: highscore kan altid scrolles, og TILBAGE forbliver synlig */
#desktopHighscoreScreen{overflow:hidden;}
#desktopHighscoreScreen .desktop-setup-box{max-height:calc(100vh - 24px);overflow:hidden;padding-bottom:16px;}
#desktopHighscoreScreen .highscore{min-height:0;overflow-y:auto;overscroll-behavior:contain;margin-bottom:8px;padding-right:4px;}
#desktopHighscoreScreen .desktop-setup-box>button:last-child{flex:0 0 auto;margin-top:2px;}

/* v5d: reserved tournament button slot */
.tournament-placeholder:disabled{opacity:1;cursor:default;pointer-events:none;}

/* v9 tournament signup */
.sy-tournament-card{max-width:430px;margin:0 auto;padding:16px;border:1px solid rgba(255,255,255,.22);border-radius:16px;background:rgba(0,0,0,.28);color:#fff;text-align:center}.sy-tournament-card h3{margin:2px 0 8px;color:#f3d66b;font-size:22px}.sy-tournament-status{font-weight:900;margin:8px 0 12px}.sy-tournament-join{width:auto!important;min-width:180px;margin:8px auto 16px!important}.sy-tournament-card h4{margin:12px 0 7px}.sy-tournament-players{max-height:210px;overflow:auto;text-align:left;background:rgba(255,255,255,.08);border-radius:10px;padding:8px 12px}.sy-tournament-players div{padding:6px 2px;border-bottom:1px solid rgba(255,255,255,.09)}.sy-tournament-players div:last-child{border-bottom:0}

/* v9c tournament overlay */
#syTournamentOverlay{display:none;position:fixed;inset:0;z-index:9000;background:rgba(4,10,7,.97);padding:70px 20px 20px;box-sizing:border-box;overflow:auto;color:#fff}
#syTournamentOverlay.show{display:block}.sy-tournament-panel{width:min(520px,100%);margin:0 auto;text-align:center}.sy-tournament-head{display:flex;align-items:center;justify-content:center;position:relative;margin-bottom:16px}.sy-tournament-head h2{margin:0}.sy-tournament-head button{position:absolute;right:0;width:42px;height:42px;border-radius:50%}.sy-tournament-card{padding:18px;border:1px solid rgba(255,255,255,.22);border-radius:16px;background:rgba(0,0,0,.28)}.sy-tournament-card h3{color:#f3d66b}.sy-tournament-status{font-weight:900;margin:10px}.sy-tournament-players{text-align:left;max-height:250px;overflow:auto;background:rgba(255,255,255,.08);border-radius:10px;padding:10px}.sy-tournament-players div{padding:6px;border-bottom:1px solid rgba(255,255,255,.09)}.sy-tournament-back,.sy-tournament-join{margin:16px 6px;padding:10px 18px}.sy-tournament-small{font-size:13px;opacity:.78}

/* Tournament controls: consistent desktop/mobile styling */
.sy-tournament-card .sy-tournament-join,.sy-tournament-card .sy-tournament-checkin{display:block!important;box-sizing:border-box!important;width:min(280px,95%)!important;min-height:48px!important;margin:16px auto!important;padding:12px 18px!important;border:2px solid #fff1a5!important;border-radius:12px!important;background:#f3d66b!important;color:#171717!important;font-weight:900!important;font-size:16px!important;line-height:1.25!important;opacity:1!important;box-shadow:0 3px 12px rgba(0,0,0,.3)!important;cursor:pointer!important;}
.sy-tournament-card .sy-tournament-join:disabled,.sy-tournament-card .sy-tournament-checkin:disabled{opacity:.75!important;cursor:default!important;}
.sy-tournament-final{max-height:none!important;}
.sy-tournament-final>div{display:flex;justify-content:space-between;gap:12px;align-items:center;}
.sy-tournament-final strong{white-space:nowrap;color:#f3d66b;}

/* v13u: kompakt præmieoverrækkelse, medaljerne vises på avatarerne */
.sy-tournament-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:9px 0 4px;align-items:end}
.sy-tournament-podium-player{min-width:0;text-align:center}
.sy-tournament-avatar{display:block;width:100%;height:clamp(130px,29vw,205px);object-fit:contain;object-position:bottom center;background:rgba(255,255,255,.04);border-radius:10px}
.sy-tournament-podium-name{font-size:clamp(12px,2.5vw,16px);font-weight:800;line-height:1.2;margin-top:4px;overflow-wrap:anywhere}

/* v13zb: accessories are an editor pane, never a separate full-width page. */
#desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(300px,38%)!important;gap:14px!important;overflow:hidden!important}
#desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open>.avatar-options-pane{display:none!important}
#desktopAvatarScreen .avatar-editor-v6>.avatar-accessories-pane{display:none}
#desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open>.avatar-accessories-pane{display:block!important;grid-column:1!important;grid-row:1!important;min-width:0;min-height:0;overflow-y:auto;box-sizing:border-box;padding:14px;background:linear-gradient(180deg,#07150f,#020805);border:2px solid #d8b83e;border-radius:20px;color:#fff}
#desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open>.avatar-fixed-preview{display:flex!important;grid-column:2!important;grid-row:1!important;visibility:visible!important;opacity:1!important}
#desktopAvatarScreen .avatar-accessories-pane .sy-acc-top{display:flex;align-items:center;gap:10px;justify-content:flex-start}
#desktopAvatarScreen .avatar-accessories-pane .sy-acc-top h2{font-size:20px;margin:0}
#desktopAvatarScreen .avatar-accessories-pane .sy-acc-tabs{display:flex;gap:6px;margin:12px 0}
#desktopAvatarScreen .avatar-accessories-pane .sy-acc-tabs button{flex:1;padding:8px;min-width:0}
#desktopAvatarScreen .avatar-accessories-pane .sy-acc-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#desktopAvatarScreen .avatar-accessories-pane .sy-sunglasses-preview{display:block;min-width:0;padding:2px;background:transparent!important;border:1px solid #ffffff33;border-radius:7px;cursor:pointer}
#desktopAvatarScreen .avatar-accessories-pane .sy-sunglasses-preview.selected{border:2px solid #f4d15e}
#desktopAvatarScreen .avatar-accessories-pane .sy-sunglasses-preview img{display:block;width:100%;height:58px;object-fit:contain;background:transparent}
#desktopAvatarScreen .avatar-accessories-pane .sy-my-profile-actions{display:grid;gap:8px}
#desktopAvatarScreen .avatar-accessories-pane .sy-accessory-toggle{width:100%;box-sizing:border-box;white-space:normal}

/* v13zc: editor back control must not overlay the avatar cards. */
#desktopAvatarScreen .avatar-editor-top{position:relative!important;top:auto!important;z-index:1!important;background:transparent!important;}
#desktopAvatarScreen .avatar-options-pane{scroll-padding-top:0;}
#desktopAvatarScreen .avatar-accessories-pane .sy-acc-top{position:relative!important;background:transparent!important;}

/* v13zd: preserve identical editor footprint when switching between colors/accessories. */
#desktopAvatarScreen .avatar-editor-v6,
#desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open{width:min(1180px,100%)!important;height:calc(100vh - 36px)!important;grid-template-columns:minmax(0,1fr) minmax(300px,38%)!important;gap:14px!important;align-items:stretch!important;}
#desktopAvatarScreen .avatar-editor-v6>.avatar-options-pane,
#desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open>.avatar-accessories-pane{height:100%!important;max-height:100%!important;min-height:0!important;overflow-y:auto!important;box-sizing:border-box!important;}
#desktopAvatarScreen .avatar-editor-v6>.avatar-fixed-preview{height:100%!important;min-height:0!important;}
#avatarScreen .avatar-editor-v6.avatar-accessories-open{width:100%!important;max-width:100%!important;}
#avatarScreen .avatar-editor-v6.avatar-accessories-open>.avatar-accessories-pane{min-height:0;}

/* v13zf: fixed editor shell for all editor tabs */
#desktopAvatarScreen .avatar-editor-v6, #desktopAvatarScreen .avatar-editor-v6.avatar-accessories-open{width:min(1180px,calc(100vw - 24px))!important;height:calc(100dvh - 36px)!important;max-height:calc(100dvh - 36px)!important;grid-template-columns:minmax(0,1fr) minmax(300px,38%)!important;align-items:stretch!important;overflow:hidden!important}#desktopAvatarScreen .avatar-editor-v6>.avatar-options-pane,#desktopAvatarScreen .avatar-editor-v6>.avatar-accessories-pane{min-height:0!important;max-height:100%!important;overflow-y:auto!important}#desktopAvatarScreen .avatar-editor-v6>.avatar-fixed-preview{min-height:0!important;height:100%!important;max-height:100%!important}
.avatar-swatch.hair-none{background:#17221e!important;color:#fff!important;font-weight:900!important;font-size:24px!important;display:inline-flex!important;align-items:center;justify-content:center;}

/* Original hair color is not necessarily green. Circular reset icon. */
.avatar-editor .avatar-swatch.hair-original{background:#53615a!important;color:#fff!important;font-size:23px!important;font-weight:800!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
.avatar-editor .avatar-swatch.hair-none{background:#17221e!important;color:white!important;font-size:25px!important;font-weight:900!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border:2px solid white!important;border-radius:50%!important}

/* v13zw: final podium order 2 - 1 - 3, winner raised */
.sy-podium-place-1{transform:translateY(-12px)}
.sy-podium-place-1 .sy-tournament-avatar{height:clamp(145px,32vw,225px)}

/* v13zx: prominent persistent tiebreak, independent of scrolling and polling */
.sy-tiebreak-modal{position:fixed;inset:0;z-index:2147483000;background:rgba(0,0,0,.87);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;overflow-y:auto}
.sy-tiebreak-box{box-sizing:border-box;width:min(440px,100%);max-height:95dvh;overflow-y:auto;padding:24px 18px;border:3px solid #f5c85c;border-radius:18px;background:#111e1c;color:#fff;text-align:center;box-shadow:0 0 45px rgba(245,200,92,.5)}
.sy-tiebreak-box h2{color:#ffdb6e;font-size:clamp(26px,7vw,38px);margin:0 0 12px}.sy-tiebreak-box p{font-size:17px;line-height:1.4}
.sy-tiebreak-seconds{font-size:clamp(48px,15vw,78px);font-weight:900;color:#ffdb6e;font-variant-numeric:tabular-nums}
.sy-tiebreak-box select{display:block;width:100%;font-size:28px;padding:12px;margin:12px 0;background:#fff;color:#111}
.sy-tiebreak-box button{width:100%;font-size:20px;font-weight:900;padding:16px;background:#e9b940;color:#171717;border-radius:12px}

/* v13zy: tiebreak stays centered above every game overlay. */
.sy-tiebreak-modal{z-index:2147483646!important;position:fixed!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important;}
.sy-tiebreak-box{max-height:calc(100dvh - 30px)!important;overflow-y:auto!important;}

.fur-black{background:#2b2a2b!important;border:1px solid #888!important}

/* v14f: swatches match the supplied dog-body PNG variants, light to dark. */
.avatar-swatch.fur-white{background:#ededeb!important}
.avatar-swatch.fur-cream{background:#cbb49e!important}
.avatar-swatch.fur-golden{background:#c58d68!important}
.avatar-swatch.fur-original{background:#ce956f!important}
.avatar-swatch.fur-midbrown{background:#986344!important}
.avatar-swatch.fur-brown{background:#633e35!important}
.avatar-swatch.fur-grey{background:#777777!important}
.avatar-swatch.fur-black{background:#272727!important}

/* Tournament is a separate opaque screen, independent of menu language. */
#syTournamentOverlay.show{background:#071711!important;isolation:isolate;}

/* TEST147 — desktop highscore: remove fixed 420px box and 360px list bottlenecks. */
#desktopHighscoreScreen .desktop-setup-box{width:min(88vw,780px);max-width:780px;max-height:calc(100dvh - 24px);padding:clamp(12px,1.6vh,22px);gap:clamp(5px,.7vh,11px);}
#desktopHighscoreScreen .desktop-setup-box h1{margin:0;font-size:clamp(23px,2vw,34px);}
#desktopHighscoreScreen .highscore{width:100%;max-width:none;flex:0 1 auto;margin:0;line-height:1.2;overflow:auto;}
#desktopHighscoreScreen .highscore-row{grid-template-columns:clamp(40px,4vw,60px) clamp(62px,6vw,90px) minmax(0,1fr) 85px;min-height:clamp(54px,7.1vh,83px);padding:2px 12px;margin-bottom:clamp(2px,.4vh,5px);gap:8px;}
#desktopHighscoreScreen .highscore-avatar-slot{width:100%;height:clamp(50px,6.7vh,78px);overflow:visible;}
#desktopHighscoreScreen .highscore-avatar-img{width:100%;height:100%;object-fit:contain;}
#desktopHighscoreScreen .highscore-name{font-size:clamp(17px,1.2vw,23px);}
#desktopHighscoreScreen .highscore-score{font-size:clamp(18px,1.3vw,24px);}
#desktopHighscoreScreen .highscore-rank{font-size:clamp(18px,1.25vw,23px);}
#desktopHighscoreScreen .desktop-setup-box>button:last-child{width:min(100%,520px);max-width:520px;min-height:44px;font-size:clamp(16px,1.1vw,20px);}
@media(max-height:720px){#desktopHighscoreScreen .highscore-row{min-height:49px;}#desktopHighscoreScreen .highscore-avatar-slot{height:45px;}}

/* TEST148: desktop/GPGPC: make the actual avatar and NET-PLAY/tournament content larger. */
@media (min-width:900px) and (min-height:600px){
 #desktopHighscoreScreen .desktop-setup-box{width:min(92vw,950px);max-width:950px;}
 #desktopHighscoreScreen .highscore-row{grid-template-columns:60px 130px minmax(0,1fr) 100px;min-height:clamp(85px,11vh,120px);gap:16px;padding:4px 18px;}
 #desktopHighscoreScreen .highscore-avatar-slot{width:130px;height:clamp(82px,10.5vh,116px);overflow:visible;}
 #desktopHighscoreScreen .highscore-avatar-img{width:100%;height:100%;object-fit:contain;transform:scale(1.2);transform-origin:center bottom;}
 #desktopHighscoreScreen .highscore-name{font-size:clamp(21px,1.5vw,27px);}
 #desktopHighscoreScreen .highscore-score{font-size:clamp(22px,1.6vw,28px);}
 #desktopNetworkScreen .desktop-setup-box,#desktopCreateGameScreen .desktop-setup-box,#desktopJoinGameScreen .desktop-setup-box{box-sizing:border-box;width:min(84vw,820px);max-width:820px;padding:clamp(24px,3vw,46px);gap:clamp(13px,1.8vh,24px);max-height:calc(100dvh - 40px);overflow-y:auto;}
 #desktopNetworkScreen .desktop-setup-box h1,#desktopCreateGameScreen .desktop-setup-box h1,#desktopJoinGameScreen .desktop-setup-box h1{font-size:clamp(31px,2.5vw,42px);margin:0 0 12px;}
 #desktopNetworkScreen .desktop-setup-box button,#desktopCreateGameScreen .desktop-setup-box button,#desktopJoinGameScreen .desktop-setup-box button{box-sizing:border-box;width:90%;max-width:690px;min-height:clamp(60px,7vh,76px);font-size:clamp(20px,1.5vw,26px);padding:12px 18px;}
 #desktopCreateGameScreen .desktop-network,#desktopJoinGameScreen .desktop-network{width:100%;max-width:690px;}
 #desktopCreateGameScreen .desktop-network input,#desktopCreateGameScreen .desktop-network select,#desktopJoinGameScreen .desktop-network input{box-sizing:border-box;width:100%;max-width:690px;min-height:58px;font-size:clamp(20px,1.4vw,25px);}
 #desktopCreateGameScreen .network-game-type,#desktopJoinGameScreen .network-join-block{box-sizing:border-box;width:100%;max-width:690px;padding:18px 22px;}
 #desktopCreateGameScreen .network-game-type-info,#desktopJoinGameScreen .network-game-type-info{font-size:clamp(17px,1.2vw,21px);}
 #desktopCreateGameScreen .net-player-slot,#desktopJoinGameScreen .net-player-slot{font-size:clamp(19px,1.4vw,25px);padding:12px;}
 #syTournamentOverlay{padding:clamp(28px,5vh,55px) 20px 30px;}
 #syTournamentOverlay .sy-tournament-panel{box-sizing:border-box;width:min(90vw,980px);max-width:980px;}
 #syTournamentOverlay .sy-tournament-card{box-sizing:border-box;width:100%;max-width:none;padding:clamp(20px,2.5vw,38px);font-size:clamp(19px,1.4vw,24px);line-height:1.45;}
 #syTournamentOverlay .sy-tournament-card h3{font-size:clamp(26px,2vw,35px);}
 #syTournamentOverlay .sy-tournament-head h2{font-size:clamp(28px,2.2vw,38px);}
 #syTournamentOverlay .sy-tournament-small{font-size:clamp(17px,1.2vw,21px);}
 #syTournamentOverlay .sy-tournament-players{max-height:42vh;font-size:clamp(19px,1.3vw,24px);}
 #syTournamentOverlay .sy-tournament-players div{padding:12px;}
 #syTournamentOverlay button{font-size:clamp(19px,1.35vw,24px);min-height:54px;padding:12px 20px;}
 #syTournamentOverlay .sy-tournament-avatar{height:clamp(220px,35vh,420px);}
}

/* TEST150: Scoreboard fills the entire available game height, like Android. */
#gameScreen .desktop-game{height:100%;min-height:0;}
#gameScreen .score-area{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:6px;}
#gameScreen .score-area h2{flex:0 0 auto;}
#gameScreen .score-list{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:1px;overflow:hidden;}
#gameScreen .desktop-score-row{flex:1 1 0;min-height:0;margin:0;}
#gameScreen .desktop-score-row > div{min-height:0;line-height:1.05;padding:1px 5px;}
@media(max-height:620px){#gameScreen .score-list{overflow-y:auto;}#gameScreen .desktop-score-row{flex:0 0 auto;min-height:19px;}}

/* TEST151: Larger highscore avatars, with room for crowns, flags and medals. */
@media (min-width:900px) and (min-height:600px){
 #desktopHighscoreScreen .highscore-row{grid-template-columns:60px 165px minmax(0,1fr) 100px;min-height:clamp(112px,14vh,152px);gap:16px;}
 #desktopHighscoreScreen .highscore-avatar-slot{width:165px;height:clamp(105px,13.5vh,145px);overflow:visible;}
 #desktopHighscoreScreen .highscore-avatar-img{transform:scale(1.23);transform-origin:center bottom;}
}
