/* Three looks over one layout.
   A look changes colours, type, shapes, the table, the deck and the penalty markers — never the structure or the logic.
   The attribute sits on <html>; putting it on any other element re-themes just that subtree (the look picker uses this). */

[data-theme="adras"]{
  color-scheme:dark;
  --bg:#15174A;--bg-deep:#0F1038;--surface:#1B1E5A;--surface-2:#232670;--line:#2E3180;--line-strong:#4A4E9A;
  --text:#FFF4E0;--muted:#B9BCE6;
  --accent:#F7B92C;--on-accent:#15174A;
  --mine:#F7B92C;--on-mine:#15174A;--foe:#C4283F;--on-foe:#FFF4E0;
  --good:#F7B92C;--bad:#FF8C9B;--hi:#F7B92C;
  --card:#FFF4E0;--card-ink:#15174A;--card-red:#C4283F;--card-edge:transparent;--card-bw:0px;--card-r:.11;
  --back:#15174A;--back-edge:#FFF4E0;
  --f-display:"Geologica","Golos Text","Onest","Arial Black",system-ui,sans-serif;
  --f-body:"Golos Text","Onest",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-rank:"Geologica","Golos Text","Arial Black",sans-serif;
  --w-display:900;--w-head:700;--w-rank:700;--w-btn:900;
  --caps:uppercase;--track:.02em;--head-size:18px;
  --r-ctl:0px;--r-panel:0px;--bw:2px;
  --btn-bw:0px;--btn-edge:transparent;--btn-size:17px;--btn-track:.02em;
  --btn2-bg:transparent;--btn2-fg:#FFF4E0;--btn2-edge:#FFF4E0;
  --sh-card:3px 3px 0 #0A0B2A;--sh-raise:none;--sh-raise-2:none;
  --sh-sel:0 0 0 3px #F7B92C,3px 3px 0 3px #0A0B2A;--sh-best:0 0 0 3px #F7B92C,3px 3px 0 3px #0A0B2A;--trump-mark:#15174A;
  --pip-fill:1;--pip-stroke:0px;
  --fan:4deg;--arc:1.5px;
  --slot:2px dashed #4A4E9A;
  --m-edge:transparent;
  --div:1px solid #2E3180;--ico:2;
  --chrome:#15174A;
  /* what a skin of this look may change besides the colours above (skins.css): the cloth of the blocks, the second colour,
     the hard shadow, the edges of the table, the ornament of the hero and the picture on the back of a card */
  --paper:#FFF4E0;--on-paper:#15174A;--on-paper-2:#3A3C6E;--text-2:#E4E5F8;
  --alt:#1FA39A;--on-alt:#0F1038;--on-accent-dim:rgba(21,23,74,.55);
  --shade:#0A0B2A;--edge-a:#C4283F;--edge-b:#1FA39A;
  --tile:#C4283F;--on-tile:#FFF4E0;
  --hero-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 86'%3E%3Cpath fill='%23E5A313' d='M30 9 L36 17 H42 V25 H48 V35 L52 43 L48 51 V61 H42 V69 H36 L30 77 L24 69 H18 V61 H12 V51 L8 43 L12 35 V25 H18 V17 H24 Z'/%3E%3Cpath fill='%23F7B92C' d='M30 21 L34 27 H38 V35 L42 43 L38 51 V59 H34 L30 65 L26 59 H22 V51 L18 43 L22 35 V27 H26 Z'/%3E%3Cpath fill='%2315174A' d='M30 33 L36 43 L30 53 L24 43 Z'/%3E%3C/svg%3E");
  --back-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 86' preserveAspectRatio='none'%3E%3Cpath fill='%23F7B92C' d='M30 9 L36 17 H42 V25 H48 V35 L52 43 L48 51 V61 H42 V69 H36 L30 77 L24 69 H18 V61 H12 V51 L8 43 L12 35 V25 H18 V17 H24 Z'/%3E%3Cpath fill='%23C4283F' d='M30 21 L34 27 H38 V35 L42 43 L38 51 V59 H34 L30 65 L26 59 H22 V51 L18 43 L22 35 V27 H26 Z'/%3E%3Cpath fill='%23FFF4E0' d='M30 33 L36 43 L30 53 L24 43 Z'/%3E%3C/svg%3E");
}

[data-theme="ganch"]{
  color-scheme:dark;
  --bg:#0F1B2D;--bg-deep:#0A1422;--surface:#16263D;--surface-2:#1B2F4B;--line:#2B3F5C;--line-strong:#3A5275;
  --text:#F0E8D9;--muted:#9FB0C6;
  --accent:#C9A55C;--on-accent:#0F1B2D;
  --mine:#C9A55C;--on-mine:#0F1B2D;--foe:#F0E8D9;--on-foe:#0F1B2D;
  --good:#C9A55C;--bad:#F0A08A;--hi:#C9A55C;
  --card:#F0E8D9;--card-ink:#1B2433;--card-red:#A8322D;--card-edge:transparent;--card-bw:0px;--card-r:.11;
  --back:#0A1422;--back-edge:#C9A55C;
  --f-display:"Cormorant","Commissioner","Times New Roman",serif;
  --f-body:"Commissioner",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-rank:"Cormorant","Times New Roman",serif;
  --w-display:700;--w-head:700;--w-rank:700;--w-btn:700;
  --caps:none;--track:0;--head-size:26px;
  --r-ctl:6px;--r-panel:9px;--bw:1px;
  --btn-bw:0px;--btn-edge:transparent;--btn-size:20px;--btn-track:.12em;
  --btn2-bg:transparent;--btn2-fg:#C9A55C;--btn2-edge:#C9A55C;
  --sh-card:0 6px 14px rgba(0,0,0,.45);--sh-raise:none;--sh-raise-2:none;
  --sh-sel:0 0 0 2px #C9A55C,0 10px 18px rgba(0,0,0,.55);--sh-best:0 0 0 2px #C9A55C,0 6px 14px rgba(0,0,0,.45);--trump-mark:#8E6F24;
  --pip-fill:.14;--pip-stroke:1.3px;
  --fan:4.5deg;--arc:2.5px;
  --slot:1px dashed #8C7A4D;
  --m-edge:transparent;
  --div:1px solid #2B3F5C;--ico:1.5;
  --chrome:#0F1B2D;
}

[data-theme="topchan"]{
  /* `only`: a browser set to darken every site (Chrome's and Samsung's «dark theme for sites») leaves this look as it is drawn */
  color-scheme:only light;
  --bg:#F5ECDC;--bg-deep:#EADFC9;--surface:#FFFBF2;--surface-2:#FBF4E6;--line:#A99C85;--line-strong:#27211C;
  --text:#27211C;--muted:#6B5F53;
  --accent:#AE3F1A;--on-accent:#F5ECDC;
  --mine:#1C6B63;--on-mine:#F5ECDC;--foe:#AE3F1A;--on-foe:#F5ECDC;
  --good:#1C6B63;--bad:#AE3F1A;--hi:#AE3F1A;
  --card:#FFFBF2;--card-ink:#27211C;--card-red:#B5341F;--card-edge:#27211C;--card-bw:2px;--card-r:.12;
  --back:#1C6B63;--back-edge:#27211C;
  --f-display:"Podkova","Onest",Georgia,serif;
  --f-body:"Onest",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-rank:"Podkova",Georgia,serif;
  --w-display:800;--w-head:800;--w-rank:800;--w-btn:800;
  --caps:none;--track:0;--head-size:24px;
  --r-ctl:12px;--r-panel:14px;--bw:2px;
  --btn-bw:2px;--btn-edge:#27211C;--btn-size:19px;--btn-track:0;
  --btn2-bg:#FFFBF2;--btn2-fg:#27211C;--btn2-edge:#27211C;
  --sh-card:3px 3px 0 #27211C;--sh-raise:3px 3px 0 #27211C;--sh-raise-2:3px 3px 0 #27211C;
  --sh-sel:0 0 0 3px #E3A72F,0 0 0 5px #27211C,7px 9px 0 3px #27211C;--sh-best:0 0 0 3px #E3A72F,0 0 0 5px #27211C;--trump-mark:#1C6B63;
  --pip-fill:1;--pip-stroke:0px;
  --fan:4deg;--arc:1.5px;
  --slot:2px dashed #A99C85;
  --m-edge:#27211C;
  --div:2px dotted #A99C85;--ico:2;
  --chrome:#F5ECDC;
}

/* Names the older screens still use, until each of them is redrawn. */
[data-theme]{
  --night:var(--bg);--panel:var(--surface);--panel-2:var(--surface-2);--lapis:var(--bg-deep);--lapis-deep:var(--bg-deep);
  --turq:var(--good);--coral:var(--bad);--gold:var(--hi);
  --ivory:var(--card);--ink:var(--card-ink);--crimson:var(--card-red);--fg:var(--text);
  --f-card:var(--f-rank);
  color:var(--text);
}

html{background:var(--bg)}
body{background:var(--bg);color:var(--text);font-family:var(--f-body);font-size:15px}
h1,h2{font-family:var(--f-display);font-weight:var(--w-head);text-transform:var(--caps);letter-spacing:var(--track);font-feature-settings:"lnum" 1}
h1{font-size:var(--head-size)}
button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* buttons */
.primary,.secondary,.gold{min-height:54px;box-sizing:border-box;padding:6px 16px;border-radius:var(--r-ctl);line-height:1.15}
.primary{background:var(--accent);color:var(--on-accent);border:var(--btn-bw) solid var(--btn-edge);box-shadow:var(--sh-raise);
  font-family:var(--f-display);font-weight:var(--w-btn);font-size:var(--btn-size);letter-spacing:var(--btn-track);text-transform:var(--caps)}
[data-theme="ganch"] .primary{text-transform:uppercase}
a.primary,.sheet a.primary{display:grid;place-items:center;text-align:center;text-decoration:none;color:var(--on-accent);font-weight:700}
.primary:disabled{background:var(--surface);color:var(--muted);border-color:var(--line);box-shadow:none;cursor:default;
  font-family:var(--f-body);font-weight:600;font-size:15px;letter-spacing:0;text-transform:none}
.secondary,.gold{background:var(--btn2-bg);color:var(--btn2-fg);border:var(--bw) solid var(--btn2-edge);box-shadow:var(--sh-raise-2);font-family:var(--f-body);font-weight:700;font-size:15px}
.secondary:disabled,.gold:disabled{opacity:.4;box-shadow:none;cursor:default}
.gold.armed{background:var(--accent);color:var(--on-accent)}
.ghost{background:transparent;color:var(--text);border:var(--bw) solid var(--line-strong);border-radius:var(--r-ctl);padding:8px 14px;font-size:13px;font-weight:700}

/* medal next to a name */
.mdl{display:inline-block;width:.95em;height:.95em;margin-left:.3em;vertical-align:-.1em;stroke:var(--m-edge);stroke-width:1}
/* tier classes carry a prefix: a bare .gold is the name of a button */
.mdl.m-bronze{fill:#C8824A}.mdl.m-silver{fill:#C9CED6}.mdl.m-gold{fill:#F2C14E}.mdl.m-platinum{fill:#8FD3CC}.mdl.m-diamond{fill:#8FB8FF}
.bot{display:inline-block;font-family:var(--f-body);font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:0 5px;border:1px solid currentColor;border-radius:4px;opacity:.75;vertical-align:1px}

/* the picker of themes: every option is drawn in its own colours, two in a row */
.looks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.look{display:flex;flex-direction:column;gap:6px;min-width:0;padding:6px 6px 9px;text-align:left;background:var(--bg);color:var(--text);border:2px solid var(--line-strong);border-radius:10px;font-family:var(--f-body)}
.look[aria-checked="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.lk-pv{position:relative;display:block;border-radius:6px;overflow:hidden}
.lk-pv svg{display:block;width:100%;height:auto}
/* the sign of a skin in its picture: on the table, and on the back of the card */
.tv-m,.tv-s{position:absolute;aspect-ratio:1;-webkit-mask:var(--sym) center/contain no-repeat;mask:var(--sym) center/contain no-repeat}
.tv-m{left:8%;top:22%;width:23.4%;background:var(--line-strong)}
.tv-s{left:71.2%;top:35.5%;width:15.6%;background:var(--back-ink)}
/* a theme of the subscription */
/* GOAT — the mark of whoever has the subscription: a dark plate with the word in gold. It is the game's own sign, so it
   is the same in every look. On an avatar it sits on the lower edge, outside the shape the look cuts the avatar to. */
.goat{display:inline-block;padding:0 4px;border-radius:3px;background:#0B0C14;color:#FFD98A;box-shadow:0 0 0 1px #B8912F;font:normal 700 9px/13px var(--f-body);letter-spacing:.06em;white-space:nowrap}
.avw{position:relative;flex:none;display:inline-grid}
.avw>.goat{position:absolute;left:50%;bottom:-3px;transform:translateX(-50%);z-index:1}
.pcard .avw>.goat,.avarow .avw>.goat{font-size:11px;line-height:16px;padding:0 6px;bottom:-5px}
.lk-tag{position:absolute;right:5px;top:5px;padding:1px 6px;border-radius:4px;background:rgba(6,7,16,.74);color:#FFE3A0;font:normal 700 10px/15px var(--f-body);letter-spacing:.06em;text-transform:uppercase}
/* (a word longer than the tile breaks inside it: the letters of some languages come from the phone's own type, wider or narrower) */
.lk-tx{display:flex;flex-direction:column;gap:2px;padding:0 2px;min-width:0;overflow-wrap:break-word}
.look b{font-family:var(--f-display);font-weight:var(--w-head);font-size:15px}
.look[aria-checked="true"] b::after{content:"";display:inline-block;width:5px;height:10px;margin-left:8px;border:solid var(--accent);border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translateY(-2px)}
.look small{font-size:12px;line-height:1.3;color:var(--muted)}
@media (max-width:340px){.looks{gap:8px}.look{padding:5px 5px 8px}}
/* the picker of backs: a card and its name under it, three in a row */
.bks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 12px}
.bk{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:12px 4px 9px;background:var(--bg);color:var(--text);border:2px solid var(--line-strong);border-radius:10px;font-family:var(--f-body)}
.bk[aria-checked="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.bk-pv{position:relative;display:block}
.bk-pv .card{--cw:56px}
.bk-pv .lk-tag{right:-14px;top:-7px}
.bk b{max-width:100%;font-size:13px;line-height:1.25;font-weight:600;text-align:center;overflow-wrap:anywhere}
.bk-gift{display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:10px 12px;border:var(--bw) solid var(--accent);border-radius:var(--r-ctl)}
.bk-gift .card{--cw:34px;box-shadow:none}
.bk-gift .rw-tx{flex:1;min-width:0}
.bk-gift .act{flex:none}
.bk-new{display:grid;place-items:center;padding:6px 0 14px}
.bk-new .card{--cw:104px}
@media (max-width:340px){.bks{gap:8px}.bk-pv .card{--cw:50px}}

/* the flag beside the name of a language */
.flag{display:inline-block;width:27px;height:18px;margin-right:10px;vertical-align:-.19em;border-radius:3px;overflow:hidden;box-shadow:0 0 0 1px rgba(0,0,0,.3)}
.mr-v .flag,.lg-lang .flag{width:21px;height:14px;margin-right:7px;vertical-align:-.13em}

/* Languages whose letters the typefaces of the game do not all have.
   Azerbaijani: Golos Text, the text face of «Адрас», has no ə — the text is set in Onest, which has every letter
   (the second rule is the name of the language in the list of languages, whatever language the page is in).
   Georgian and Armenian are drawn by the fonts of the device. Georgian has no capitals: text-transform would put
   Mtavruli, an alphabet most fonts lack, in place of every letter; and a browser capitalises the Armenian «և» the old
   way, «ԵՒ». Both languages are shown the way they are written. */
[data-theme="adras"]:lang(az){--f-body:"Onest",system-ui,-apple-system,"Segoe UI",sans-serif}
[data-theme="adras"] .opt:lang(az){font-family:"Onest",system-ui,-apple-system,"Segoe UI",sans-serif}
:lang(ka),:lang(ka)::before,:lang(ka)::after,:lang(hy),:lang(hy)::before,:lang(hy)::after{text-transform:none!important}
