/* DURAK Highend Black Edition — 3.3.1
   Presentation-only, opt-in. No Classic selectors, saves, or game logic changed.
   Black / graphite / restrained champagne. Preserve each Arcade world's artwork. */
:root[data-ui-theme="highend"] {
  color-scheme:dark;
  --felt1:#28282b;
  --felt2:#121315;
  --felt3:#07080a;
  --bg:#07080a;
  --ink:#f3f0e9;
  --mut:#b9b8b5;
  --brass:#d9c49a;
  --ux-surface:#111214;
  --ux-raised:#1d1d20;
  --ux-border:#a69a805e;
  --ux-accent:#e2cda5;
  --ux-muted:#b9b8b5;
  --black-0:#07080a;
  --black-1:#101113;
  --black-2:#1a1b1e;
  --black-3:#242528;
  --black-line:#a89a7c52;
  --black-text:#f3f0e9;
  --black-soft:#c7c3bb;
  --black-gold:#e2cda5;
  --black-focus:#f8dfae;
}
:root[data-ui-theme="highend"] body {
  background:#050506;
}
:root[data-ui-theme="highend"] #app {
  background:radial-gradient(ellipse at 50% 0%,#222124 0%,#0f1012 45%,#060708 100%);
  color:var(--black-text);
}
:root[data-ui-theme="highend"] :is(button,input,select,textarea):focus-visible,
:root[data-ui-theme="highend"] .c.ok:focus-visible {
  outline:3px solid var(--black-focus);
  outline-offset:3px;
}
:root[data-ui-theme="highend"] button:not(:disabled) {touch-action:manipulation}
:root[data-ui-theme="highend"] .ov:not(.highend-home-ov)>.card {
  border:1px solid var(--black-line);
  background:linear-gradient(152deg,#202024 0%,#121315 37%,#090a0c 100%);
  box-shadow:0 25px 75px #000c,inset 0 1px 0 #fff1;
  color:var(--black-text);
}
:root[data-ui-theme="highend"] .ov:not(.highend-home-ov)>.card :is(h1,h2,h3),
:root[data-ui-theme="highend"] .ov>.card:not(.tut-card) :is(.section-title,section>h3) {
  color:var(--black-gold);
}
:root[data-ui-theme="highend"] .ov:not(.highend-home-ov)>.card .btn:not(.w):not(.g),
:root[data-ui-theme="highend"] .ux-settings-footer .btn,
:root[data-ui-theme="highend"] .setup-footer .btn {
  background:linear-gradient(135deg,#f0dfb9,#cbb184 76%,#ab8c5b);
  border:1px solid #f4e4bf;
  color:#1b1712;
  box-shadow:0 3px 0 #5f513d,0 7px 19px #0009,inset 0 1px #fff8;
}
:root[data-ui-theme="highend"] .ov:not(.highend-home-ov)>.card .btn.w,
:root[data-ui-theme="highend"] .ov:not(.highend-home-ov)>.card .btn.g {
  background:linear-gradient(155deg,#29292c,#121315);
  border:1px solid #a79b835c;
  color:var(--black-text);
  box-shadow:inset 0 1px #fff1;
}
:root[data-ui-theme="highend"] :is(.ib,.lang button,.more-menu button) {
  color:var(--black-text);
  background:linear-gradient(145deg,#252529,#111214);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .more-menu,
:root[data-ui-theme="highend"] .game-settings-sheet {
  background:linear-gradient(160deg,#222225,#0a0b0d 72%);
  border-color:var(--black-line);
  box-shadow:0 17px 45px #000b;
}
:root[data-ui-theme="highend"] .card :is(input,textarea,select),
:root[data-ui-theme="highend"] .online-card input {
  color:var(--black-text);
  background:#111214;
  border-color:#a59a805f;
  caret-color:var(--black-gold);
}
:root[data-ui-theme="highend"] .card :is(input,textarea)::placeholder {color:#aba79e}
:root[data-ui-theme="highend"] :is(.settings-head,.setup-head,.rules-head) {
  background:linear-gradient(180deg,#18191b 80%,#18191bf2);
  border-bottom-color:var(--black-line);
}
:root[data-ui-theme="highend"] .setup-footer,
:root[data-ui-theme="highend"] .ux-settings-footer {
  background:linear-gradient(180deg,#101113ec,#090a0c 35%);
  border-top-color:var(--black-line);
}
:root[data-ui-theme="highend"] .ux-settings-card .settings-head {
  background:linear-gradient(180deg,#19191c 85%,#19191cf0);
}
:root[data-ui-theme="highend"] .ux-settings-summary,
:root[data-ui-theme="highend"] .ux-settings-content :is(.setting-desc,.ui-theme-description) {
  color:var(--black-soft);
}
:root[data-ui-theme="highend"] .ux-settings-tabs {
  background:linear-gradient(180deg,#19191b,#121315 98%);
  border-bottom-color:var(--black-line);
}
:root[data-ui-theme="highend"] .ux-settings-tab {
  background:linear-gradient(150deg,#28282c,#151619);
  border-color:#8c857654;
  color:#e1ded7;
  box-shadow:inset 0 1px #ffffff0b;
}
:root[data-ui-theme="highend"] .ux-settings-tab .ux-tab-symbol {color:var(--black-gold)}
:root[data-ui-theme="highend"] .ux-settings-tab.active,
:root[data-ui-theme="highend"] .ux-settings-tab[aria-selected="true"] {
  background:linear-gradient(140deg,#f0dfb9,#c9b18a);
  border-color:#ffeac5;
  color:#1b1713;
  box-shadow:0 0 0 1px #e5c89c3b,0 4px 15px #0007;
}
:root[data-ui-theme="highend"] .ux-settings-tab.active .ux-tab-symbol {color:#3b2e1d}
:root[data-ui-theme="highend"] .ux-settings-content>section {border-top-color:#9d94802e}
:root[data-ui-theme="highend"] .ux-settings-content>section>h2 {color:var(--black-gold)}
:root[data-ui-theme="highend"] :is(.setting-toggle,.rule-toggle,.mode-tile,.theme-choice,.seg button,.rule-segment button,.setup-seats button,.setup-bots button) {
  background:linear-gradient(145deg,#242427,#141517);
  border-color:#8b847045;
  color:#e7e3da;
}
:root[data-ui-theme="highend"] :is(.setting-toggle.on,.rule-toggle.on,.mode-tile.sel,.theme-choice.sel,.seg button.sel,.rule-segment button.sel,.setup-seats button.sel,.setup-bots button.sel) {
  background:linear-gradient(140deg,#3b3529,#25231f);
  border-color:#e0c898b8;
  box-shadow:inset 0 0 0 1px #e9cfa320;
  color:#f9edd5;
}
:root[data-ui-theme="highend"] :is(.setting-toggle.on,.rule-toggle.on) b,
:root[data-ui-theme="highend"] .setup-card .mode-tile.sel>b {color:#f0d9aa}
:root[data-ui-theme="highend"] .setup-card .mode-tile>b {color:#efe9dd}
:root[data-ui-theme="highend"] .setup-card .mode-tile>small {color:var(--black-soft)}
:root[data-ui-theme="highend"] :is(.mode-group>h4,.setup-card h3,.rules-card h3) {color:var(--black-gold)}
:root[data-ui-theme="highend"] :is(.rule-stepper button,.rule-summary span,.room-status,.online-step,.online-account) {
  background:#191a1d;
  border-color:var(--black-line);
  color:var(--black-text);
}
:root[data-ui-theme="highend"] .profile-card .profile-stat,
:root[data-ui-theme="highend"] .online-card .net-state,
:root[data-ui-theme="highend"] .online-card :is(.quick-match,.ranked-match),
:root[data-ui-theme="highend"] .online-card .ux-online-help {
  background:linear-gradient(145deg,#252528,#101113);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .online-card .online-actions>.btn:nth-child(2) {
  background:linear-gradient(145deg,#29292c,#121315);
  border-color:#c9b68b77;
  color:var(--black-text);
}
:root[data-ui-theme="highend"] .online-card .online-step>span {color:var(--black-soft)}
:root[data-ui-theme="highend"] .online-card .net-state b {color:var(--black-gold)}
:root[data-ui-theme="highend"] .online-card .ux-online-help .section-title {color:var(--black-gold)}
:root[data-ui-theme="highend"] .ui-theme-selector {
  background:#0c0d0f;
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .ui-theme-option {
  background:#222326;
  color:#dfdbd2;
}
:root[data-ui-theme="highend"] .ui-theme-option.is-active {
  background:linear-gradient(145deg,#e9d5ae,#bda47c);
  border-color:#fae9c5;
  color:#201a11;
}

/* Home: black glass, graphite controls, champagne hero — no blue fantasy backdrop. */
:root[data-ui-theme="highend"] .highend-home-shell {
  background:
    radial-gradient(ellipse at 50% -11%,#393328b0 0%,transparent 41%),
    radial-gradient(ellipse at 85% 35%,#2927284d,transparent 45%),
    linear-gradient(180deg,#151518 0%,#0c0d0f 42%,#070809 100%);
  border-inline:1px solid #b8a47f32;
  color:var(--black-text);
  scrollbar-color:#7e7564 transparent;
}
:root[data-ui-theme="highend"] .highend-home-ov {background:#070809!important}
:root[data-ui-theme="highend"] .highend-home-lang .lang button {
  min-width:44px;min-height:44px;
  background:#202124;
  color:#eee8db;border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .highend-home-top-btn {
  min-width:44px;min-height:44px;
  background:linear-gradient(145deg,#262629,#111214);
  color:var(--black-gold);border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .highend-hero-crest {
  color:#e4cc9f;
  text-shadow:0 6px 21px #bd9b5857,0 2px 10px #000;
}
:root[data-ui-theme="highend"] .highend-edition {
  color:#d8c19a;font-size:10px;letter-spacing:.32em;
}
:root[data-ui-theme="highend"] .highend-home-hero h1 {
  color:#f5f0e6;
  text-shadow:0 2px 18px #000b;
  letter-spacing:.11em;
}
:root[data-ui-theme="highend"] .highend-home-hero p {
  color:#d1c8b7;
  text-shadow:0 2px 7px #000;
}
:root[data-ui-theme="highend"] .highend-hero-divider {color:#d4be97}
:root[data-ui-theme="highend"] .highend-hero-divider i {
  background:linear-gradient(90deg,transparent,#b6a17a,transparent);
}
:root[data-ui-theme="highend"] .highend-home-profile .profile-mini {
  background:linear-gradient(145deg,#29282aee,#141517ed);
  border-color:var(--black-line);
  box-shadow:0 8px 26px #0006,inset 0 1px #fff1;
}
:root[data-ui-theme="highend"] .highend-home-profile .profile-mini b {color:#f1e3c6}
:root[data-ui-theme="highend"] .highend-hero-action {
  border:1px solid #dbc195;
  background:linear-gradient(125deg,#302d2b 0%,#1d1d1f 40%,#0c0d0f 100%);
  box-shadow:0 2px 0 #66563a,0 12px 25px #0009,inset 0 1px #ffffff25;
  color:#f8e9cf;
  min-height:84px;
}
:root[data-ui-theme="highend"] .highend-action-emblem {
  background:radial-gradient(circle at 35% 25%,#504631,#211f1d 68%,#111214);
  border-color:#c8ae80;
  color:#f1d9a9;
}
:root[data-ui-theme="highend"] .highend-hero-action small {
  color:#cbb998;letter-spacing:.16em;
}
:root[data-ui-theme="highend"] .highend-hero-action>i {color:#e9d1a2}
:root[data-ui-theme="highend"] .highend-resume-action {
  min-height:44px;
  color:#ebdfc7;border-color:#bfa67b7a;
  background:linear-gradient(120deg,#2b2924,#171719);
}
:root[data-ui-theme="highend"] .highend-home-modes button {
  background:linear-gradient(150deg,#2b2b2e,#131416);
  border:1px solid var(--black-line);
  color:#f0ede6;
  min-height:54px;
}
:root[data-ui-theme="highend"] .highend-home-modes button span {color:#dcc59b}
:root[data-ui-theme="highend"] .highend-adventure-status {
  background:linear-gradient(145deg,#202124,#101113);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .highend-adventure-status span {color:#c3c0bb}
:root[data-ui-theme="highend"] .highend-adventure-status b {color:#e4cda0}
:root[data-ui-theme="highend"] .highend-home-utility button {
  min-height:44px;
  background:linear-gradient(145deg,#232326,#111214);
  border-color:var(--black-line);
  color:#e2ded6;
}
:root[data-ui-theme="highend"] .highend-home-footer {border-top-color:var(--black-line)}
:root[data-ui-theme="highend"] .highend-home-stats span {color:#c1bdb6}
:root[data-ui-theme="highend"] .highend-home-stats strong {color:#ebd3a5}
:root[data-ui-theme="highend"] .highend-home-design {color:#c3bfb8}
:root[data-ui-theme="highend"] .highend-home-design .ui-theme-selector {background:#101113}
:root[data-ui-theme="highend"] .highend-brand-credit {color:#aca699}

/* In-game table and heads-up display: obsidian felt, warm metal trim. */
:root[data-ui-theme="highend"] #app.premium-game {
  --felt1:#28282b;--felt2:#111214;--felt3:#070809;
  --bg:#070809;--ink:#f3efe6;--mut:#c1beb8;--brass:#d9c49a;
  background:radial-gradient(ellipse at 50% 47%,#242426 0%,#101113 60%,#050607 100%);
}
:root[data-ui-theme="highend"] #app.premium-game .top {
  background:linear-gradient(180deg,#111214ec,#19191bdc);
  border-bottom-color:var(--black-line);
}
:root[data-ui-theme="highend"] #app.premium-game .top .chip,
:root[data-ui-theme="highend"] #app.premium-game .top .ib,
:root[data-ui-theme="highend"] .premium-session-pill {
  background:linear-gradient(135deg,#2a2a2d,#131416);
  border-color:var(--black-line);color:#f0eae1;
}
:root[data-ui-theme="highend"] #app.premium-game .opps {
  background:linear-gradient(#141517cb,#0000);
}
:root[data-ui-theme="highend"] #app.premium-game .opp {
  background:linear-gradient(125deg,#2a2a2dcc,#0c0d0fe3);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] #app.premium-game .premium-round-display {
  background:linear-gradient(160deg,#242426ef,#0d0e10f2);
  border-color:#b6a17b75;
}
:root[data-ui-theme="highend"] #app.premium-game .premium-turn-line {color:#e5ded2}
:root[data-ui-theme="highend"] #app.premium-game .premium-turn-line b {color:#e9cd9b}
:root[data-ui-theme="highend"] #app.premium-game .mid::before {
  background:radial-gradient(ellipse at 45% 32%,#333236 0%,#1c1c1f 48%,#0c0d0f 78%,#050607 100%);
  border-color:#b9a17b9b;
  box-shadow:inset 0 0 0 4px #e9d1a21c,inset 0 0 0 11px #0505069e,inset 0 0 55px #000b,0 10px 28px #000c;
}
:root[data-ui-theme="highend"] #app.premium-game .mid::after {color:#d8c19a13}
:root[data-ui-theme="highend"] #app.premium-game .deck-count {
  background:#171719e8;border-color:var(--black-line);color:#e8dcc7;
}
:root[data-ui-theme="highend"] #app.premium-game .premium-portrait {
  background:radial-gradient(circle at 30% 22%,#756953,#34302b 42%,#121315 82%);
  border-color:#dac295;color:#f2deb6;
}
:root[data-ui-theme="highend"] #app.premium-game .bar {
  background:linear-gradient(180deg,#111214d6,#060708fa);
  border-top:1px solid #a2917536;
}

/* Arcade uses dark chrome, but retains the distinct illustrations / world accents. */
:root[data-ui-theme="highend"] .arcade-map-screen,
:root[data-ui-theme="highend"] .arcade-result-highend {
  --arcade-surface:#111214;
  --arcade-surface-raised:#222225;
  --arcade-line:#b7a48250;
  --arcade-text:#f3efe5;
  --arcade-subtle:#c6c1b9;
}
:root[data-ui-theme="highend"] .arcade-map-screen {
  background:#08090b;
}
:root[data-ui-theme="highend"] :is(.arcade-premium-top,.arcade-realms,.arcade-main-title,.arcade-map-actions,.arcade-result-footer) {
  background:linear-gradient(180deg,#1b1b1e,#0a0b0d);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] :is(.arcade-logo,.arcade-wallet,.arcade-realm-tab,.arcade-mission-panel,.arcade-result-summary-grid>div) {
  background:linear-gradient(145deg,#262528,#101113);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .arcade-realm-tab.active {
  background:linear-gradient(145deg,#3a3328,#171719);
  border-color:#e1c995;
  box-shadow:inset 0 0 0 1px #d7be8b30,0 3px 16px #0008;
}
:root[data-ui-theme="highend"] .arcade-map-screen .arcade-map-hud,
:root[data-ui-theme="highend"] .arcade-map-screen .arcade-stage-toolbar {
  background:linear-gradient(145deg,#252427eb,#101113ec);
  border-color:var(--black-line);
}
:root[data-ui-theme="highend"] .arcade-map-screen .arcade-stage-toolbar button,
:root[data-ui-theme="highend"] .arcade-aux-tools button,
:root[data-ui-theme="highend"] .arcade-academy-link {
  background:linear-gradient(145deg,#2a292c,#121315);
  border-color:var(--black-line);
  color:#eee7da;
}
:root[data-ui-theme="highend"] .arcade-map-screen .arcade-hero-play,
:root[data-ui-theme="highend"] .arcade-result-footer .arcade-hero-play {
  border-color:#f1dbad;
  background:linear-gradient(145deg,#f0e0bb,#c5ab7f);
  color:#20180d;
}
:root[data-ui-theme="highend"] .arcade-map-screen .arcade-hero-play:disabled {
  background:linear-gradient(#343437,#1c1c1e);
  border-color:#7d796d;color:#b8b5af;
}
:root[data-ui-theme="highend"] .arcade-result-highend {
  background:linear-gradient(180deg,#161618,#08090b 64%);
}
:root[data-ui-theme="highend"] .arcade-result-summary-grid>div strong {color:#e9d4ae}
:root[data-ui-theme="highend"] .arcade-result-footer :is(.arcade-result-again,.arcade-result-map-link) {
  background:linear-gradient(145deg,#29292c,#121315);
  border-color:var(--black-line);color:#f2ede5;
}
@media(hover:hover) {
  :root[data-ui-theme="highend"] :is(.highend-hero-action,.highend-home-modes button,.ux-settings-tab,.arcade-realm-tab):not(:disabled):hover {
    border-color:#e8d1a1;
    filter:brightness(1.1);
  }
}
@media(max-width:360px) {
  :root[data-ui-theme="highend"] .highend-hero-action {min-height:70px}
  :root[data-ui-theme="highend"] .highend-home-hero h1 {letter-spacing:.07em}
  :root[data-ui-theme="highend"] .ux-settings-tab {min-width:101px}
}
@media(prefers-reduced-motion:reduce) {
  :root[data-ui-theme="highend"] :is(.highend-hero-action,.ux-settings-tab,.arcade-realm-tab) {transition:none}
}

/* Settings visual preview is chrome; the cards themselves keep user-selected faces. */
:root[data-ui-theme="highend"] .premium-preview {
  background:radial-gradient(ellipse at 50% 26%,#343234,#101113 75%,#090a0c);
  border-color:#b8a68166;
  box-shadow:inset 0 1px 22px #000a;
}
:root[data-ui-theme="highend"] .ux-settings-content :is(.theme-choice,.table-choice) {
  box-shadow:inset 0 1px #fff1;
}
:root[data-ui-theme="highend"] .ux-settings-content :is(.theme-choice.sel,.table-choice.sel) {
  box-shadow:inset 0 0 0 1px #e4c99a36,0 4px 13px #0007;
}
:root[data-ui-theme="highend"] .settings-card .seg button {
  color:#e9e4da;
}
:root[data-ui-theme="highend"] .settings-card .seg button.sel {
  color:#fbeac8;
}

/* Card preview belongs to Black Edition chrome, not the customizable felt. */
:root[data-ui-theme="highend"] .premium-preview {
  background:radial-gradient(ellipse at 50% 28%,#303034,#101113 82%);
  border-color:var(--black-line);
  box-shadow:inset 0 1px 24px #000a;
}

/* Honor the card-back selection; the older premium table forced blue on every deck. */
:root[data-ui-theme="highend"] #app.premium-game .c.bk {
  background:repeating-linear-gradient(135deg,#161617 0 4px,#28251f 4px 8px);
  color:#f3dfb4;
  border:2px solid #d9c195;
  box-shadow:inset 0 0 0 2px #0e0e10,inset 0 0 0 4px #d7bd8b77,0 3px 10px #000b;
}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-wine {background:repeating-linear-gradient(45deg,#7d1a2e 0 3px,#5e1020 3px 6px)}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-emerald {background:repeating-linear-gradient(45deg,#12644f 0 3px,#0a4435 3px 6px)}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-royal {background:repeating-linear-gradient(45deg,#214e9b 0 3px,#17366e 3px 6px)}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-blackgold {background:repeating-linear-gradient(135deg,#141414 0 5px,#2b2411 5px 10px)}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-geometric {background:conic-gradient(from 45deg,#6e1526 25%,#d2a94f 0 50%,#17366e 0 75%,#0b503e 0) 0 0/16px 16px}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-russian {background:repeating-radial-gradient(circle at 50% 50%,#92263c 0 3px,#f0d89e 3px 4px,#651426 4px 8px)}
:root[data-ui-theme="highend"] #app.premium-game .c.bk.back-minimal {background:#163d34}
