.portrait { display:inline-block; width:30px; height:30px; flex:0 0 30px; overflow:hidden; position:relative; vertical-align:middle; border:1px solid #e0d5b77a; border-radius:50%; background:#eceddf; }
/* Planche originale intacte : cadrage des quatorze portraits humains. */
.portrait.portrait-atlas { background-image:url("/assets/avatars/foret-amelioree-20261120.png"); background-repeat:no-repeat; background-size:890.1639344262% 296.7213114754%; }
.robot { background:#163d38; color:#70c2e3; border:0; border-radius:8px; overflow:visible; }
.robot-2 { color:#f29b9b; }
.robot-3 { color:#efcc73; }
.robot svg { width:100%; height:100%; }
.ghost-portrait { background:transparent; color:#dce3c8; text-align:center; line-height:28px; }
.own-name { display:flex; align-items:center; gap:9px; }
.profile-editor { margin-bottom:22px; border:1px solid #c7d1bd; border-radius:7px; padding:18px; }
.profile-editor .nickname { display:flex; flex-direction:column; gap:8px; width:min(360px,100%); }
.profile-editor input { padding:10px; border:1px solid #b1c0a9; border-radius:5px; background:#fffef9; color:#264c3b; font:15px Arial,sans-serif; }
.avatar-options { display:flex; gap:10px; flex-wrap:wrap; }
.avatar-option { position:relative; display:flex; align-items:center; justify-content:center; width:80px; height:80px; min-width:80px; border:2px solid #d0d9c6; border-radius:9px; padding:10px; background:#fffdf5; color:#345343; }
.avatar-option .portrait { width:56px; height:56px; flex-basis:56px; }
.avatar-option.chosen { border-color:#427451; background:#e8efdc; box-shadow:0 0 0 1px #427451; }
.avatar-option.chosen::after { content:"✓"; position:absolute; right:-4px; bottom:-4px; display:grid; place-items:center; width:21px; height:21px; border:2px solid #fffdf5; border-radius:50%; background:#315f40; color:white; font:bold 13px Arial,sans-serif; }
.avatar-option:focus-visible { outline:3px solid #b88935; outline-offset:3px; }
.hand-play-area { display:grid; grid-template-columns:minmax(0,1fr) 190px; align-items:center; gap:18px; }
.hand-column { min-width:0; }
.game-surface .hand { gap:6px; min-height:86px; margin-bottom:17px; }
.game-surface .hand .card { --hand-card:clamp(43px,4.4vw,65px); width:var(--hand-card); height:calc(var(--hand-card) * 1.45); }
.game-surface .hand .pip { font-size:clamp(21px,2vw,30px); }
.action-rail { display:flex; flex-direction:column; align-items:stretch; gap:10px; min-width:0; }
.game-surface .action-rail .status { text-align:left; justify-content:flex-start; flex-wrap:wrap; line-height:1.6; margin:0; }
.game-surface .action-rail .actions { display:flex; flex-direction:column; gap:8px; margin:0; min-height:0; }
.action-rail .actions { max-height:260px; overflow-y:auto; padding:3px; }
.action-rail button { width:100%; min-height:38px; }
.game-surface .action-rail .kami-lock-note { text-align:left; font-size:11px; margin:0; }
.kami-announcement { position:fixed; left:50%; top:48%; transform:translate(-50%,-50%); z-index:25; pointer-events:none; display:flex; flex-direction:column; align-items:center; gap:10px; padding:22px 45px; max-width:90vw; color:#fff2c9; background:#163a32ed; border:1px solid #d5b76d; border-radius:14px; box-shadow:0 12px 45px #0006; text-align:center; }
.kami-announcement strong { font-size:48px; font-weight:400; letter-spacing:9px; padding-left:9px; }
.kami-announcement span { font:18px/1.5 Arial,sans-serif; overflow-wrap:anywhere; }
.app-shell { max-width:1800px; padding:0 clamp(12px,3vw,44px); }
.table-heading { padding:18px 0; }
.topbar { height:82px; }
.sound-controls { margin:10px 0 0; }
.display-controls { margin-top:8px; }
.game-surface .game-table { min-height:0; }
.table-compact .game-surface .game-table { padding:12px; gap:10px 16px; }
.table-compact .game-surface .card-backs { margin:6px 0; }
.table-compact .game-surface .card-back { height:24px; }
.table-compact .game-surface .seat-title { padding:6px 8px; }
.table-compact .game-surface .seat-title small { margin-top:3px; }
.table-compact .game-surface .discard-label { margin:6px 0 4px; }
.table-compact .game-surface .seat.north .discards,.table-compact .game-surface .own-discards .discards { max-height:58px; min-height:0; }
.table-compact .game-surface .seat.west .discards,.table-compact .game-surface .seat.east .discards { max-height:111px; }
.table-compact .game-surface .player-zone { margin-top:0; padding-top:12px; }
.table-compact .game-surface .hand .card { --hand-card:clamp(43px,4.1vw,60px); }
.table-large .game-surface .game-table { padding:26px; gap:26px; }
.table-large .game-surface .seat.north .discards,.table-large .game-surface .own-discards .discards,.table-large .game-surface .seat.west .discards,.table-large .game-surface .seat.east .discards { max-height:224px; }
@media(min-width:800px) and (max-height:950px) {
 .table-auto .game-surface .game-table { padding:12px; gap:10px 16px; }
 .table-auto .game-surface .card-backs { margin:6px 0; }
 .table-auto .game-surface .card-back { height:24px; }
 .table-auto .game-surface .seat-title { padding:6px 8px; }
 .table-auto .game-surface .seat-title small { margin-top:3px; }
 .table-auto .game-surface .discard-label { margin:6px 0 4px; }
 .table-auto .game-surface .seat.north .discards,.table-auto .game-surface .own-discards .discards { max-height:58px; min-height:0; }
 .table-auto .game-surface .seat.west .discards,.table-auto .game-surface .seat.east .discards { max-height:111px; }
 .table-auto .game-surface .player-zone { margin-top:0; padding-top:12px; }
}
@media(max-width:760px) {
 .hand-play-area { grid-template-columns:minmax(0,1fr) 145px; gap:12px; }
 .game-surface .action-rail .status { font-size:11px; }
 .action-rail .primary { padding:10px 12px; }
 .topbar { height:auto; min-height:82px; }
 .profile-editor { padding:12px; }
 .avatar-option { min-width:80px; }
}
@media(max-width:520px) {
 .hand-play-area { grid-template-columns:1fr; }
 .action-rail { max-width:100%; }
 .game-surface .action-rail .actions { flex-direction:row; flex-wrap:wrap; justify-content:flex-end; }
 .action-rail button { width:auto; }
 .game-surface .action-rail .status { justify-content:center; }
 .game-surface .hand { min-height:0; }
 .game-surface .action-rail .kami-lock-note { text-align:center; }
 .kami-announcement strong { font-size:36px; }
 .avatar-option { width:68px; height:68px; min-width:68px; padding:6px; }
 .avatar-option .portrait { width:52px; height:52px; flex-basis:52px; }
}

/* Avatar personnel un peu plus grand, avec la même place pour le nom. */
.app-shell .game-surface .own-name .portrait { width:40px; height:40px; flex-basis:40px; }
@media(orientation:landscape) and (min-width:560px) and (width < 1000px),
       (orientation:landscape) and (min-width:560px) and (height < 500px) {
 .app-shell .game-surface .own-name .portrait { width:26px; height:26px; flex-basis:26px; }
 .app-shell .game-surface .own-name { gap:6px; }
}
