/* Pastura design pass (2026-10-15): self-hosted fonts, consistent type, small legibility fixes.
   Loaded last; remove the <link> in index.html to roll back. Card faces and provider logos keep their own fonts. */

/* Manrope (UI) and Playfair Display (headings), variable weights, SIL OFL — see fonts/OFL-*.txt */
@font-face{font-family:'Manrope';font-style:normal;font-display:swap;font-weight:200 800;src:url(./fonts/manrope-cyrillic-wght-normal.woff2) format('woff2-variations');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Manrope';font-style:normal;font-display:swap;font-weight:200 800;src:url(./fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:normal;font-display:swap;font-weight:400 900;src:url(./fonts/playfair-display-cyrillic-wght-normal.woff2) format('woff2-variations');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Playfair Display';font-style:normal;font-display:swap;font-weight:400 900;src:url(./fonts/playfair-display-latin-wght-normal.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* cyrillic-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(./fonts/onest-cyrillic-ext-variable.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(./fonts/onest-cyrillic-variable.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(./fonts/onest-latin-ext-variable.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(./fonts/onest-latin-variable.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
 --font-ui:'Manrope','Segoe UI Variable','Segoe UI',system-ui,-apple-system,sans-serif;
 --font-display:'Playfair Display',Georgia,'Times New Roman',serif;
 --gold:#d9ba78;
 font-family:var(--font-ui);
}

:root[data-font-style="modern"]{--font-ui:'Onest','Segoe UI Variable','Segoe UI',system-ui,-apple-system,sans-serif;--font-display:'Onest','Segoe UI Variable','Segoe UI',system-ui,-apple-system,sans-serif}
.font-style-field{margin-top:18px}
.modal-card .font-style-note{margin:6px 0 10px;font-size:11px;line-height:1.5}

/* One UI family everywhere (the old rules mixed Segoe, system-ui, Inter and Arial). */
body,.front-screen,button,input,select,textarea,dialog,.modal-card{font-family:var(--font-ui)}
/* Headings follow the chosen Modern or Classic display family. */
.front-screen h1,.front-screen h2,.modal-card h2,.legal-dialog h2,#gameApp h1,#gameApp h2{font-family:var(--font-display);letter-spacing:-.005em;font-variant-numeric:lining-nums}
.front-screen h1{font-weight:700}
.front-screen h2,.modal-card h2,.legal-dialog h2{font-weight:700}
.modal-card h2{letter-spacing:-.01em}

/* Small labels ("НОВЫЙ СТОЛ · 2 игрока") were half upper-case: make the casing consistent. */
.modal-kicker,.legal-kicker,.front-heading>span{text-transform:uppercase}

/* Footer, platform caption and similar fine print were 10–11px and low contrast. */
.front-footer{font-size:12px;color:#b8cabe;line-height:1.5}
.platform-caption{font-size:12px;color:#c9d8cc}
.front-note{font-size:13px}

/* Home menu: Shop and Rating had different title sizes. */
.front-screen .front-actions.home-menu .home-menu-row.secondary>button strong,
.front-screen .front-actions.home-menu .home-menu-row .front-rating strong{font-size:16px}
.front-screen .front-actions.home-menu .home-menu-row.secondary span{font-size:12px}

/* Checkboxes on dark screens were plain white system boxes. */
.front-screen input[type=checkbox],.legal-dialog input[type=checkbox]{
 appearance:none;-webkit-appearance:none;flex:none;width:20px;height:20px;margin:0 2px 0 0;vertical-align:-5px;
 border:1.5px solid #d9ba78b3;border-radius:6px;background:#0d221d;cursor:pointer;
 display:inline-grid;place-content:center;transition:background-color .15s,border-color .15s;
}
.front-screen input[type=checkbox]::before,.legal-dialog input[type=checkbox]::before{
 content:'';width:11px;height:11px;transform:scale(0);transition:transform .12s ease-out;
 clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0,43% 62%);background:#17322a;
}
.front-screen input[type=checkbox]:checked,.legal-dialog input[type=checkbox]:checked{background:var(--gold);border-color:var(--gold)}
.front-screen input[type=checkbox]:checked::before,.legal-dialog input[type=checkbox]:checked::before{transform:scale(1)}
.front-screen input[type=checkbox]:focus-visible,.legal-dialog input[type=checkbox]:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* Legal dialog: the empty error line left a gap above the buttons. */
.legal-dialog .legal-error:empty{display:none}

/* Windows sit above flying cards (#motionLayer z25) and the score panel (z12), below toasts/turn notices (z30+). */
#modal.modal-scrim{z-index:26}

/* Dark windows: the cream "paper" dialogs clashed with the dark-green site. Same palette as .front-box. */
.modal-card{
 --m-bg:#15302a;--m-bg-2:#0f2520;--m-text:#f2e9d4;--m-muted:#b9cbbf;--m-line:#d9ba7838;
 background:linear-gradient(180deg,#183730,var(--m-bg));color:var(--m-text);
 border:1px solid #d9ba7866;box-shadow:0 28px 90px #000a,inset 0 1px 0 #ffffff0d;
}
.modal-card h2,.modal-card h3,.modal-card strong,.modal-card b{color:var(--m-text)}
.modal-card p,.modal-card small,.modal-card li{color:var(--m-muted)}
.modal-card .modal-kicker{color:var(--gold)}
.modal-card a{color:var(--gold)}
.modal-card .modal-main{background:var(--gold);color:#17322a}
.modal-card .modal-main:disabled{background:#d9ba7840;color:#d9ba78a6}
.modal-card .modal-secondary{color:var(--gold)}
.modal-card .setting-item{border-color:var(--m-line)}
.modal-card .setting-item label,.modal-card .volume-control,.modal-card .music-field{color:var(--m-text)}
.modal-card select,.modal-card input:not([type=checkbox]):not([type=radio]):not([type=range]),.modal-card textarea,
.modal-card .music-field select{background:var(--m-bg-2);color:var(--m-text);border:1px solid #d9ba7859}
.modal-card input[type=checkbox],.modal-card input[type=radio],.modal-card input[type=range]{accent-color:var(--gold)}
.modal-card hr{border-color:var(--m-line)}
/* Older rules with higher specificity painted these dark for the cream card; #modal outranks them. */
#modal .modal-card output{color:var(--gold)}
#modal .modal-card .language-picker{color:var(--m-muted)}
#modal .modal-card .language-picker select{background:var(--m-bg-2);color:var(--m-text);border:1px solid #d9ba7859}
#modal .modal-card .front-field,#modal .modal-card .deck-sharing-setting,#modal .modal-card #socialFormStatus{color:var(--m-text)}
#modal .modal-card .friend-row small{color:var(--m-muted)}
#modal .modal-card .shop-item{background:#ffffff0a;border-color:#d9ba7840;color:var(--m-text)}
#modal .modal-card .shop-item.selected{background:#d9ba7814;border-color:var(--gold)}

/* Score panel beside the table: same dark palette as the windows. */
#scorePanel{background:linear-gradient(180deg,#183730,#15302a);color:#f2e9d4;border:1px solid #d9ba7866;box-shadow:0 16px 48px #000a}
#scorePanel h2{color:#f2e9d4}
#scorePanel .modal-kicker{color:var(--gold)}
#scorePanel p{color:#b9cbbf}
#scorePanel .score-detail-row{background:#ffffff0a;border-color:#d9ba7838}
#scorePanel .score-detail-row b{color:#f2e9d4}
#scorePanel .score-detail-row strong{color:var(--gold)}
#scorePanel #scorePanelContent>p{background:#0f2520;color:#b9cbbf}
#modal .modal-card .score-detail-row{background:#ffffff0a;border-color:#d9ba7838}
#modal .modal-card .score-detail-row strong{color:var(--gold)}
#modal .modal-card .take-caption{color:var(--m-muted)}
/* Light surfaces nested in windows (found by scanning the stylesheets for light backgrounds). */
#modal .modal-card .menu-options button,#modal .modal-card .choice,#modal .modal-card .break-actions button+button,
#modal .modal-card .public-profile-votes button,#modal .modal-card .friend-row [data-social="cancel-request"],
#modal .modal-card .push-icon-status{background:#ffffff0d;color:var(--m-text);border:1px solid #d9ba7840}
#modal .modal-card .menu-options button:hover,#modal .modal-card .choice:hover,#modal .modal-card .break-actions button+button:hover,
#modal .modal-card .public-profile-votes button:hover,#modal .modal-card .friend-row [data-social="cancel-request"]:hover{background:#ffffff1a}
#modal .modal-card .choice.active,#modal .modal-card .public-profile-votes button.chosen{background:#d9ba7833;border-color:var(--gold);color:var(--m-text)}
#modal .modal-card .modal-outline{color:var(--gold);border-color:#d9ba7880}
#modal .modal-card .modal-outline:hover{background:#d9ba781a}
#modal .modal-card .note{background:#d9ba7814;color:var(--m-text);border:1px solid #d9ba7840}
#modal .modal-card .public-profile-stats span{background:#ffffff0d;border:1px solid #d9ba7830;color:var(--m-muted)}
#modal .modal-card .public-profile-stats b{color:var(--gold)}
#modal .modal-card .friend-requests,#modal .modal-card .friend-invitations{background:#ffffff0a;color:var(--m-text);border:1px solid #d9ba7838}
#modal .modal-card .friend-requests h3,#modal .modal-card .friend-invitations h3{color:var(--gold)}
#modal .modal-card .friend-requests .friend-row strong,#modal .modal-card .friend-invitations .friend-row strong{color:var(--m-text)}
#modal .modal-card .friend-requests .friend-row small,#modal .modal-card .friend-invitations .friend-row small{color:var(--m-muted)}
.result-detail{display:block;color:var(--m-muted,#738277)}

/* Settings: keep "Готово" visible at the bottom of a long window instead of hidden below the fold. */
.modal-card #settingsClose{position:sticky;bottom:-23px;z-index:2;margin-bottom:-23px;box-shadow:0 -14px 18px -6px var(--m-bg)}

/* Game: "6 карт · бот" under an opponent's name wrapped onto two lines. */
#opponents small{white-space:nowrap}

/* Game: the main action looked active while disabled (e.g. during the opponent's turn). */
#gameApp .action.primary:disabled{background:#3a4a40;color:#9fb0a5;box-shadow:none;filter:none}
