body{margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.gold {color:#FFFF9F;}
table{width:680px;font-size:21px;}
img{position:absolute;border:0;margin:1px;}
a{text-decoration:none;}
a:hover{text-decoration:underline;}
#data{position:relative;height:610px;}
.card{position:absolute;cursor:pointer;background:no-repeat;width:71px;height:96px;}
.atlas-card-face{background-size:923px 384px!important;}
.ar{position:relative;vertical-align:middle;width:auto;height:auto;margin-right:7px;margin-bottom:3px;}
.ard{top:0;width:190px;text-align:center}
.tip{vertical-align:middle;width:0;height:12px;margin-left:4px;display:inline;background:url('/img/pic/tips_1.gif') no-repeat;padding-right:12px;}
#ht{position:relative;}
#txt{left:20px;top:330px;width:500px;}
#in_all_score{
    position:absolute;
    top:495px;
    left:10px;
    border-top:2px dotted;
    padding-top: 6px;
}

/*#text_action a, #action a, #action2 a{
    border:2px solid;
    border-radius: 5px;
    padding:0 10px;
    background-color: red;
}*/

/* Панель действия оформлена как панель торга в преферансе (.pref-contract-panel):
   тот же фон-подложка, рамка, скругление и тени, только компактнее — здесь она
   горизонтальная и живёт над рукой игрока. */
#text_action{
    position: absolute;
    top:295px;
    left:130px;
    /* Значок козыря (.thousand-legacy-trump) лежит на z-index 20 и перекрывал крайнюю
       кнопку панели — панель с действиями должна быть выше него. */
    z-index: 21;
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    max-width: none;
    min-height: 36px;
    padding: 7px 12px;
    background-color: #f8f0e3;
    background-image: url('/img/main/flat/game_redesign/modal-background.jpg');
    background-repeat: repeat;
    background-position: 0 0;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 14px;
    box-shadow: 0 2px 1px rgba(255,255,255,.9) inset,
                0 -2px 4px rgba(111,93,63,.18) inset,
                0 14px 28px rgba(18,22,19,.34),
                0 4px 8px rgba(18,22,19,.18);
    font: 600 15px/1.2 Arial, Helvetica, sans-serif;
    color: #3d3524;
}
#text_action::before {
    content: '';
    position: absolute;
    inset: 4px;
    pointer-events: none;
    border: 1px solid rgba(130,112,79,.16);
    border-radius: 10px;
}
#text_action:empty { display: none; }
#text_action .thousand-action-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#text_action #action,
#text_action #action2 {
    position: relative;
    top: auto;
    left: auto !important;
    width: auto;
    z-index: 3;
}
/* Кнопки — как .pref-contract-action */
#text_action a,
#text_action .thousand-action-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 30px;
    padding: 0 14px;
    border: 1px solid #81734c;
    border-radius: 10px;
    background: linear-gradient(#81794f,#5e593d);
    color: #fff;
    font: 800 14px/28px Arial, Helvetica, sans-serif;
    text-align: center;
    text-shadow: 0 2px 2px rgba(42,39,25,.7);
    text-decoration: none;
    box-shadow: 0 2px 1px rgba(255,255,255,.28) inset,
                0 -2px 3px rgba(42,39,25,.28) inset,
                0 5px 9px rgba(55,48,31,.3);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
#text_action a:hover,
#text_action a:focus-visible {
    color: #fff;
    background: linear-gradient(#756d48,#504c35);
    border-color: #5a5237;
    box-shadow: 0 0 0 3px rgba(230,181,85,.3), 0 8px 14px rgba(55,48,31,.34);
    transform: translateY(-2px);
    text-decoration: none;
}
#text_action a:active {
    box-shadow: 0 1px 2px rgba(42,39,25,.28) inset;
    transform: translateY(1px);
}
/* «Отменить» — вспомогательное действие, поэтому ghost: та же геометрия, но без
   заливки, чтобы не спорить с основной кнопкой. */
#text_action .thousand-cancel-action a {
    background: rgba(255,255,255,.18);
    border-color: rgba(129,115,76,.55);
    color: #4a4030;
    text-shadow: none;
    box-shadow: none;
}
#text_action .thousand-cancel-action a:hover,
#text_action .thousand-cancel-action a:focus-visible {
    background: rgba(255,255,255,.42);
    border-color: #81734c;
    color: #3d3524;
    box-shadow: 0 0 0 3px rgba(230,181,85,.28);
}
/* «Расписать» — отказ от игры: действие тяжёлое, но штатное, поэтому глухой серый,
   а не красный. */
#text_action .thousand-negative-action a {
    background: linear-gradient(#6f6f6b,#4c4c49);
    border-color: #5c5c58;
    color: #f2efe8;
}
#text_action .thousand-negative-action a:hover,
#text_action .thousand-negative-action a:focus-visible {
    background: linear-gradient(#646460,#403f3d);
    border-color: #43423f;
    box-shadow: 0 0 0 3px rgba(120,120,115,.32), 0 8px 14px rgba(30,30,28,.34);
}
/* «Раздать» показывается сразу, но до выбора всех карт она неактивна — так игрок
   видит, что кнопка вообще существует, и понимает, чего от него ждут. */
#text_action .thousand-action-disabled {
    cursor: default;
    opacity: .55;
    box-shadow: 0 1px 2px rgba(42,39,25,.2) inset;
}
/* Единственная возможная ставка выводится числом вместо селектора с одним пунктом. */
#text_action .thousand-stavka-value {
    font: 800 17px/1 Arial, Helvetica, sans-serif;
    color: #3d3524;
}
/* Выбор ставки: штатный select был мелкий и терялся между подписью и кнопками. */
#text_action select {
    height: 30px;
    box-sizing: border-box;
    padding: 0 6px;
    border: 1px solid #a8946a;
    border-radius: 8px;
    background: #fffdf6;
    color: #3d3524;
    font: 700 15px/28px Arial, Helvetica, sans-serif;
    cursor: pointer;
}
#text_action select:hover,
#text_action select:focus-visible {
    border-color: #81734c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230,181,85,.3);
}
/* Карта, выбранная для раздачи: одного подъёма на пару пикселей не видно. Поднимаем
   трансформом, чтобы не трогать inline top и не ломать штатный эффект наведения. */
.card.thousand-card--give {
    z-index: 20;
    border-radius: 6px;
    box-shadow: 0 0 0 3px #ffd54a, 0 12px 22px rgba(0,0,0,.45);
    transform: translateY(-26px);
}

#cards{left:580px;top:45px;z-index:3;}

#user{left:130px;top:365px;}
#oponent{left:170px;top:20px;} /* сдвинуто вправо: в левом верхнем углу теперь подпись бокового места */
#left_opon{left:10px;top:85px;}
#right_opon{left:708px;top:105px;} /* ниже подписи правого места */

body.game-1000-v1 #info_u { top: 350px; }

#oponent img,
#left_opon img,
#right_opon img,
#cards img {
    box-shadow: 0 5px 12px rgba(0,0,0,.3);
}

.thousand-current-trick-card {
    box-shadow: 0 10px 24px rgba(0,0,0,.38);
}

#ht .thousand-game-status {
    top: 125px;
    left: 305px;
    z-index: 5;
    min-width: 220px;
    max-width: 270px;
    box-sizing: border-box;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    background: rgba(5,25,20,.58);
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
    color: #fff;
    font-size: 16px;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.8);
}

.thousand-redeal-badge{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:999px;background:#ffe085;color:#493300;font:700 11px/1.35 sans-serif;vertical-align:middle;text-shadow:none;box-shadow:0 2px 7px rgba(0,0,0,.22);}
.userBlock-img.thousand-redeal-actor{filter:drop-shadow(0 0 8px #ffe085);}

/* New back assets are 78x103, while this legacy board is laid out on a
   71x96 card grid. Keep its original geometry so the upper hand stays clear
   of the trick in the centre. */
#oponent img,
#cards img,
#left_opon img,
#right_opon img,
#user img { width:71px; height:96px; }

#chat{position:relative;margin-bottom:10px;width:495px;border:1px dotted white;font-size:17px;
    top:501px;left:23px;max-height:110px;overflow:auto;padding-right:15px;}
#now_time{bottom:5px;right:5px;font-size:29px;}
#time{position:fixed;left:740px;top:0;}
#time2{position:fixed;left:700px;top:35px;}
#sh_sm{width:20px;height:24px;margin-right:10px;margin-left:10px;position:relative;vertical-align:middle;z-index:2;cursor:pointer;}
#load{position:absolute;width:15px;height:15px;top:333px;left:-10px;}
.info{position:absolute;text-align:center;height:60px;width:210px;font-size:20px;}
.bochka{width:14px;height:16px;position:absolute;margin-top:4px;background:url('/img/cards/bochka.gif') no-repeat;}
#table{position:absolute;top:55px;left:0;overflow:auto;width:755px;height:440px;}
#info_t{top:1px;left:366px;}
#info_u{top:280px;left:20px;}
#info_l{top:85px;left:-166px;}
#info_r{top:85px;left:648px;}
#info_p{top:500px;left:620px;}
#server{position:absolute;left:0;top:0;}
object{position:absolute;left:0;top:0;}
embed{position:absolute;left:0;top:0;}
#menu{z-index:5;position:absolute;width:33em;top:50%;font-size:16px;padding:7px;left:50%;margin-left:-200px;margin-top:-200px;display:none;}

#score_table > div {position: absolute;}
/* Таблица результатов оформлена как в преферансе: та же подложка, рамка, скругление,
   внутренний кант и круглая кнопка закрытия. */
#score_table{
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 22px;
    background: #f8f0e3 url('/img/main/flat/game_redesign/modal-background.jpg') repeat 0 0 !important;
    color: #332c23;
    text-shadow: 0 1px 0 rgba(255,255,255,.82);
    box-shadow: 0 2px 1px rgba(255,255,255,.9) inset,
                0 -2px 4px rgba(111,93,63,.18) inset,
                0 18px 36px rgba(18,22,19,.34),
                0 5px 10px rgba(18,22,19,.18);
    overflow: visible;
}
#score_table::before{
    content: '';
    position: absolute;
    inset: 6px;
    pointer-events: none;
    border: 1px solid rgba(130,112,79,.16);
    border-radius: 16px;
}
#score_table a{color:#332c23;text-shadow:0 1px 0 rgba(255,255,255,.82);}
/* Последняя взятка на столе — на 15% меньше карт прикупа */
.thousand-last-trick-card{transform:scale(.85);transform-origin:top left;}
/* Последняя взятка под итогом — крест по местам игроков, как в деберце */
#score_table.thousand-score-table--last-trick #table{height:355px;}
#score_table.thousand-score-table--last-trick #in_all_score{top:410px;}
#score_table > .thousand-score-last-trick{
    top: 455px; left: 0; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 20px;
}
.thousand-score-last-trick__label{color:#6b5f47;font:700 14px/1.2 sans-serif;}
.thousand-score-last-trick__cross{position:relative;display:block;width:76px;height:74px;}
.thousand-score-last-trick__card{position:absolute;margin:0;transform:scale(.68);}
.thousand-score-last-trick__card--t{top:-12px;left:50%;margin-left:-20.5px;}
.thousand-score-last-trick__card--b{bottom:-9px;left:50%;margin-left:-20.5px;}
/* Боковые карты чуть отодвинуты от верхней/нижней, чтобы не наезжали на них */
.thousand-score-last-trick__card--l{left:-16px;top:50%;margin-top:-27px;}
.thousand-score-last-trick__card--r{right:-16px;top:50%;margin-top:-27px;}
.thousand-score-last-trick__card--winner{
    z-index: 2;
    filter:
        drop-shadow(2px 0 0 #d39a20) drop-shadow(-2px 0 0 #d39a20)
        drop-shadow(0 2px 0 #d39a20) drop-shadow(0 -2px 0 #d39a20)
        drop-shadow(0 0 5px rgba(211,154,32,.72));
}
#score_table .thousand-score-close{
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: 0;
    z-index: 20;
    cursor: pointer;
    color: #72532f;
    font: 700 30px/34px Arial,Helvetica,sans-serif;
    text-align: center;
    text-shadow: 0 1px 0 #fff;
    background: rgba(255,253,244,.82);
    border: 1px solid rgba(130,112,79,.28);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(75,57,35,.2), inset 0 1px rgba(255,255,255,.92);
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
#score_table .thousand-score-close:hover,
#score_table .thousand-score-close:focus-visible{
    color: #fff;
    text-shadow: none;
    background: #a84b3b;
    transform: translateY(-1px);
}
/* Карты в руке: тот же мягкий объём, что и в преферансе, вместо жёсткой рамки. */
body.game-1000-v1 #ht .atlas-card-face{
    filter: drop-shadow(0 2px 2px rgba(41,34,24,.26)) drop-shadow(0 7px 7px rgba(41,34,24,.18));
}
/*#score_table{z-index:15;position:absolute;width:750px;height:520px;font-size:16px;padding:2px;top:50%;left:50%;margin-left:-375px;margin-top:-285px;display:none;}*/

#black{position:absolute;top:0;left:0;z-index:4;width:100%;height:100%;background:black;display:none;}
.moder {display:inline-block;margin-right:10px;width:15px;height:15px;background:url('/img/pic/icons.png') -2px -16px no-repeat;filter:alpha(opacity=75);opacity:0.75;vertical-align:middle;}
.moder:hover {filter:alpha(opacity=100);opacity:1.00;}
.slider {background-image: url('/img/pic/slider_b.gif');background-repeat: repeat-x;}
.params {width:100%;font-size:16px;}
.important {color:#C66300;}
#timer_xod1 {left: 1px;top:62px;position: absolute;}
#timer_xod3, #timer_xod4 {left:62px;top:62px;}
#timer_xod2 {left: 102px;top:62px;}

#decision{cursor: pointer;}
#all_score{
    position:absolute;
    background-color: gray;
    left:670px;
    top:150px;
    width:200px;
    height:240px;
    -webkit-border-radius:10px;
    -moz-border-radius:10px;
    border-radius:10px;
    z-index:3;
}
#table_score{
    border:2px solid;
    width:99%;
    height:99%;

    font-size:12px;
    text-align:center;
    -webkit-border-radius:10px;
    -moz-border-radius:10px;
    border-radius:10px;
}
#table_content{
    top:20px;
    overflow:hidden;
    overflow-y:visible;
    width:110%;
    height:92%;
}
.name, .foot{
    position:relative;
    text-align:center;
    width:33%;
    float:left;
    border-bottom:1px solid;
    -webkit-border-radius:10px;
    -moz-border-radius:10px;
    border-radius:10px;
    overflow-x:hidden;
    font-size:14px;
}
.middle{border-left:1px solid;border-right:1px solid}
.foot{left:3px;top:230px;border:1px solid;width:32%}
#table_content table{width:100%;font-size:12px;}
#table_content td{width:33%;}

.userBlock-name{
    position: absolute;
    top:0;
    left:120px;
    word-break: keep-all;
    width: 150px;
    text-align: left;
    font-size: 20px;
}

.userBlock-img {width: 60px;height: 60px;}
.userBlock-img img {width: 50px;height: 50px;}
.userBlock-img-bg {width: 60px;height: 60px;}
.userBlock-name{font-size: 15px;line-height: 1.25;width: 200px;} /* один размер для всех мест */

.position1 {top:540px;right:350px}
.position2 {top:-55px;right:350px}
/* Боковые места. Ник с очками рисуется справа от аватарки (left:120px), поэтому на
   старых координатах левое место ложилось прямо на карты верхнего соперника, а правое
   уезжало за границу стола — очков соперников было просто не видно, особенно на
   мобильном, где всё за пределами стола обрезается. Ставим подпись под аватаркой и
   держим оба блока внутри ширины стола. */
.position3 {top:-58px;left:0}
.position4 {top:-58px;right:0}
.position3 .userBlock-name,
.position4 .userBlock-name {
    left: 0;
    top: 74px;
    width: 160px;
    text-align: center;
}
.thousand-user-points {white-space: nowrap;}

#timer_xod1,
#timer_xod2,
#timer_xod3,
#timer_xod4 {position:absolute;left:51px;height:5px;top:60px;z-index:12;border-right: 2px solid black;}

#bg_timer_xod1,
#bg_timer_xod2,
#bg_timer_xod3,
#bg_timer_xod4 {position:absolute;background-color:#FFFF00;left:51px;width:60px;top:60px;height:5px;z-index:11;}
