/* Fortress material v18. Fixed CSS-pixel bevel and separated opaque face.
   Load after v17 paint and every layout sheet. No completed button bitmap is
   stretched. The native node remains rectangular, with its original hit box,
   label, role, position, border width, scroll and action. Only inert pseudo
   layers use clip-path; the button itself never uses clipping or a transform. */
:root {
  --ui18-face-top:#3d6474;
  --ui18-face-mid:#244755;
  --ui18-face-low:#142f3c;
  --ui18-rim-lit:#d9f1e8;
  --ui18-rim-mid:#759aa5;
  --ui18-rim-dark:#213744;
  --ui18-cut:8px;
  --ui18-face-cut:5px;
  --ui18-face-inset:3px 3px 7px;
  --ui18-caption:#fff9e7;
}
:where(body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick),
body :is(.locale-picker-option,.locale-load-retry button),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button) {
  position:relative;
  isolation:isolate;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick),
body :is(.locale-picker-option,.locale-load-retry button),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button {
  background-color:transparent!important;
  background-image:none!important;
  border-image:none!important;
  border-color:transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
  color:var(--ui18-caption)!important;
  opacity:1!important;
  filter:none!important;
  text-shadow:0 1px 1px #020c13,0 2px 3px #020c1366;
  transition:color 120ms ease;

}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)::before,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)::before,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)::before,
body :is(.locale-picker-option,.locale-load-retry button)::before,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button::before,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button::before {
  content:'';
  display:block!important;
  position:absolute;
  inset:0;
  z-index:-2;
  pointer-events:none;
  border-radius:0;
  clip-path:polygon(var(--ui18-cut) 0,calc(100% - var(--ui18-cut)) 0,100% var(--ui18-cut),100% calc(100% - var(--ui18-cut)),calc(100% - var(--ui18-cut)) 100%,var(--ui18-cut) 100%,0 calc(100% - var(--ui18-cut)),0 var(--ui18-cut));
  background:linear-gradient(0deg,#07151c 0 3px,var(--ui18-rim-dark) 3px 6px,transparent 7px),conic-gradient(from 145deg,var(--ui18-rim-dark),var(--ui18-rim-mid) 24%,var(--ui18-rim-lit) 43%,var(--ui18-rim-mid) 58%,var(--ui18-rim-dark) 83%,var(--ui18-rim-dark));
  box-shadow:inset 0 2px 0 var(--ui18-rim-lit),inset 0 -3px 0 #041118;

}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)::after,
body :is(.locale-picker-option,.locale-load-retry button)::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button::after {
  content:'';
  display:block!important;
  position:absolute;
  inset:var(--ui18-face-inset);
  z-index:-1;
  pointer-events:none;
  border-radius:0;
  clip-path:polygon(var(--ui18-face-cut) 0,calc(100% - var(--ui18-face-cut)) 0,100% var(--ui18-face-cut),100% calc(100% - var(--ui18-face-cut)),calc(100% - var(--ui18-face-cut)) 100%,var(--ui18-face-cut) 100%,0 calc(100% - var(--ui18-face-cut)),0 var(--ui18-face-cut));
  background:radial-gradient(ellipse at 25% 0,#ffffff20,transparent 58%),linear-gradient(110deg,transparent 46%,#f1ffe809 47%,transparent 48%),repeating-linear-gradient(0deg,transparent 0 3px,#efffde05 3px 4px),linear-gradient(180deg,var(--ui18-face-top),var(--ui18-face-mid) 42%,var(--ui18-face-low));
  box-shadow:inset 0 2px 0 #f1ffef3d,inset 0 -2px 0 #0411188c,inset 1px 0 0 #f6ffe926;
  transition:inset 100ms ease,box-shadow 140ms ease;

}
/* Larger actions use a warm/cool identity in the solid face and a 7px
   gold bevel. Details remain live DOM text, rather than lettering in artwork. */
body #game-viewport[data-layout][data-title-lobby-v15] :is(.start-cta,.solo-button),
body #detail-dialog .dialog-button:not(.secondary):not(.danger):not(.ui15-action-row),
body.game-interface[data-button-quality='v15'] :is(#battle-start,#battle-retry,#test-start,#test-quick-start,#result-restart) {
  --ui18-face-top:#b44d35;
  --ui18-face-mid:#853627;
  --ui18-face-low:#572329;
  --ui18-rim-lit:#fff0bf;
  --ui18-rim-mid:#ca9f5b;
  --ui18-rim-dark:#58351f;
  --ui18-cut:10px;
  --ui18-face-cut:6px;
  --ui18-face-inset:4px 4px 9px;

}
body #game-viewport[data-layout][data-title-lobby-v15] :is(.coop-button,.title-sign-in),
body #detail-dialog .dialog-button.secondary,
body.game-interface[data-button-quality='v15'] :is(#battle-sync,#battle-return,.lobby-link,.login-notice a) {
  --ui18-face-top:#1e7b73;
  --ui18-face-mid:#165e5b;
  --ui18-face-low:#103e48;
  --ui18-rim-lit:#e8fff0;
  --ui18-rim-mid:#a8d0ae;
  --ui18-rim-dark:#304f49;
  --ui18-cut:10px;
  --ui18-face-cut:6px;
  --ui18-face-inset:4px 4px 9px;

}
body #game-viewport[data-layout][data-title-lobby-v15] :is(.start-cta,.solo-button)::before,
body #detail-dialog .dialog-button:not(.secondary):not(.danger):not(.ui15-action-row)::before,
body.game-interface[data-button-quality='v15'] :is(#battle-start,#battle-retry,#test-start,#test-quick-start,#result-restart)::before,
body #game-viewport[data-layout][data-title-lobby-v15] :is(.coop-button,.title-sign-in)::before,
body #detail-dialog .dialog-button.secondary::before,
body.game-interface[data-button-quality='v15'] :is(#battle-sync,#battle-return,.lobby-link,.login-notice a)::before {
  background:linear-gradient(0deg,#07151c 0 3px,var(--ui18-rim-dark) 3px 6px,var(--ui18-rim-mid) 6px 7px,transparent 8px),conic-gradient(from 145deg,var(--ui18-rim-dark),var(--ui18-rim-mid) 24%,var(--ui18-rim-lit) 43%,var(--ui18-rim-mid) 58%,var(--ui18-rim-dark) 83%,var(--ui18-rim-dark));
  box-shadow:inset 0 2px 0 var(--ui18-rim-lit),inset 0 -3px 0 #041118;
}
body #game-viewport[data-layout][data-title-lobby-v15] .mode-card {
  --ui18-cut:8px;
  --ui18-face-inset:3px 3px 6px;
  --ui18-face-top:#3b6672;
  --ui18-face-mid:#24444f;
  --ui18-face-low:#172f3b;
}
body #game-viewport[data-layout][data-title-lobby-v15] .mode-card :is(strong,small) {
  color:var(--ui18-caption)!important;
  text-shadow:0 1px 2px #020c13;
}
body #game-viewport[data-layout][data-title-lobby-v15] .mode-card strong {
  font-weight:900;
}
body #game-viewport[data-layout][data-title-lobby-v15] :is(.lobby-menu-button,.resource-chip,.supply-button,.support-dock>button),
body #detail-dialog .dialog-close,
body.game-interface[data-button-quality='v15'] :is(.combat-utility-dock button,.training-menu-button) {
  --ui18-cut:7px;
  --ui18-face-cut:4px;
  --ui18-face-inset:3px 3px 6px;
}
body #detail-dialog .dialog-close {
  --ui18-face-top:#5b7680;
  --ui18-face-mid:#2f515e;
  --ui18-face-low:#213b4b;
  --ui18-rim-lit:#f2edd2;
  --ui18-rim-mid:#b9c2ae;
}
body #detail-dialog .ui15-action-row {
  --ui18-face-top:#3d5e69;
  --ui18-face-mid:#264551;
  --ui18-face-low:#19323f;
  --ui18-cut:7px;
}
body #game-viewport[data-layout][data-title-lobby-v15] .departure-actions .solo-button>img.icon {
  object-fit:contain;
}
body #game-viewport[data-layout][data-title-lobby-v15] .departure-actions .coop-button>img.icon {
  object-fit:contain;
}
body #game-viewport[data-layout][data-title-lobby-v15] :is(button>.icon,button>.item-icon),
body #detail-dialog :is(button>.icon,button .ui15-action-icon) {
  filter:drop-shadow(0 1px 0 #fff7ce55) drop-shadow(0 2px 2px #030c12a6)!important;
  opacity:1;
}
/* Six dock slots get a shallower individual cut-metal key. A broad flat
   rectangle behind the entire dock no longer stands in for six buttons. */
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button {
  --ui18-cut:5px;
  --ui18-face-cut:3px;
  --ui18-face-inset:6px 3px 7px;
  --ui18-face-top:#31596a;
  --ui18-face-mid:#1d3e4f;
  --ui18-face-low:#102a3a;
  text-shadow:0 1px 1px #020c13;
}
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button::before {
  inset:3px 1px 2px;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected),
body :is(.locale-picker-option,.locale-load-retry button):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected),
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button[aria-current='page'] {
  --ui18-rim-lit:#fff1b6;
  --ui18-rim-mid:#d8b866;
  --ui18-rim-dark:#685337;
  --ui18-face-top:#427c70;
  --ui18-face-mid:#28554f;
  --ui18-face-low:#1a3a43;
  --ui18-caption:#fffceb;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected)::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected)::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected)::after,
body :is(.locale-picker-option,.locale-load-retry button):is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected)::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected)::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:is([aria-pressed='true'],[aria-expanded='true'],[aria-selected='true'],.selected)::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button[aria-current='page']::after {
  box-shadow:inset 0 2px 0 #ffffd366,inset 0 -3px 0 #ffe39b,inset 3px 0 0 #ffe39b;
}
body #detail-dialog :is(.dialog-button.danger,.destructive,[data-action='logout'],[data-action='room-leave']),
body.game-interface[data-button-quality='v15'] #battle-confirm-accept-v15 {
  --ui18-face-top:#985043;
  --ui18-face-mid:#703637;
  --ui18-face-low:#412536;
  --ui18-rim-lit:#f6c4ad;
  --ui18-rim-mid:#ca8f73;
  --ui18-caption:#fff1e8;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)[aria-busy='true'],
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)[aria-busy='true'],
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)[aria-busy='true'],
body :is(.locale-picker-option,.locale-load-retry button)[aria-busy='true'],
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button[aria-busy='true'],
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button[aria-busy='true'] {
  --ui18-rim-lit:#e6fff2;
  --ui18-rim-mid:#b5f0d2;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)[aria-busy='true']::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)[aria-busy='true']::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)[aria-busy='true']::after,
body :is(.locale-picker-option,.locale-load-retry button)[aria-busy='true']::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button[aria-busy='true']::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button[aria-busy='true']::after {
  box-shadow:inset 0 2px 0 #e6fff2,inset 0 -4px 0 #b5f0d2;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):is(:disabled,[aria-disabled='true']),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):is(:disabled,[aria-disabled='true']),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):is(:disabled,[aria-disabled='true']),
body :is(.locale-picker-option,.locale-load-retry button):is(:disabled,[aria-disabled='true']),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:is(:disabled,[aria-disabled='true']),
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:is(:disabled,[aria-disabled='true']) {
  --ui18-rim-lit:#b8c9cb;
  --ui18-rim-mid:#68818c;
  --ui18-rim-dark:#233d4b;
  --ui18-face-top:#344d5c;
  --ui18-face-mid:#273c4d;
  --ui18-face-low:#1d2f3e;
  --ui18-caption:#dbe4e6;
  opacity:1!important;
  filter:none!important;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):is(:disabled,[aria-disabled='true'])::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):is(:disabled,[aria-disabled='true'])::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):is(:disabled,[aria-disabled='true'])::after,
body :is(.locale-picker-option,.locale-load-retry button):is(:disabled,[aria-disabled='true'])::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:is(:disabled,[aria-disabled='true'])::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:is(:disabled,[aria-disabled='true'])::after {
  box-shadow:inset 0 1px 0 #d1e4df29,inset 0 -2px 0 #081721;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true']),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true']),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true']),
body :is(.locale-picker-option,.locale-load-retry button):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true']),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true']),
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true']) {
  transform:none!important;
  color:#fffceb!important;
  filter:none!important;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true'])::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true'])::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true'])::after,
body :is(.locale-picker-option,.locale-load-retry button):is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true'])::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true'])::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:is(:active,[data-material-v18='pressed']):not(:disabled):not([aria-disabled='true'])::after {
  inset:4px 3px 4px;
  box-shadow:inset 0 5px 10px #020b14a6,inset 0 -2px 0 var(--ui18-rim-lit),inset 0 1px 0 #04121b;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)[data-material-v18='released']::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)[data-material-v18='released']::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)[data-material-v18='released']::after,
body :is(.locale-picker-option,.locale-load-retry button)[data-material-v18='released']::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button[data-material-v18='released']::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button[data-material-v18='released']::after {
  box-shadow:inset 0 2px 0 #fff5c9,inset 0 -3px 0 #fff5c9,inset 1px 0 0 #fff5c9;

}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):focus-visible,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):focus-visible,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):focus-visible,
body :is(.locale-picker-option,.locale-load-retry button):focus-visible,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:focus-visible,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:focus-visible {
  outline:3px solid #fff0b3!important;
  outline-offset:3px!important;
}
/* Circular rings deliberately use a 1:1 asset, not the rectangular
   material. Cooldown angle and joystick movement remain their existing state. */
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto) {
  background:transparent!important;
  border-radius:50%!important;
  color:#fff9e7!important;
  filter:none!important;
  opacity:1!important;
  box-shadow:0 3px 0 #06131dcc,0 5px 9px #02070b80!important;
  --ui18-round-top:#3f6b7c;
  --ui18-round-low:#143545;
}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto)::before {
  background-image:url('/resource/ui/title-lobby-v18/runtime/control-rim-v18.svg'),radial-gradient(circle at 36% 24%,var(--ui18-round-top),var(--ui18-round-low) 68%,#0b202d)!important;
  background-size:100% 100%;
  background-position:center;
  background-repeat:no-repeat;
  border-radius:50%;
  filter:none!important;
  pointer-events:none;
  opacity:1!important;
  box-shadow:none;

}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto)> :is(strong,small) {
  color:inherit;
  background-color:#102b37eb;
  box-shadow:0 0 0 1px #102b37eb;
  text-shadow:0 1px 1px #020b13;
}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions .thumb-skill[data-skill-state='ready'],
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions .thumb-auto[aria-pressed='true'] {
  --ui18-round-top:#348271;
  --ui18-round-low:#154b49;
  box-shadow:inset 0 0 0 3px #d7ffc6,0 3px 0 #102e28,0 0 12px #92e2c34d,0 5px 9px #02070b80!important;
}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto):is(:active,[data-material-v18='pressed']):not(:disabled) {
  transform:none!important;
  box-shadow:inset 0 4px 7px #03121ba6,inset 0 -3px 0 #fff0ba,0 1px 0 #06131d!important;
}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto)[data-material-v18='released'] {
  box-shadow:inset 0 0 0 3px #fff0ba,0 3px 0 #06131d,0 5px 9px #02070b80!important;
}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto):disabled {
  --ui18-round-top:#3c5362;
  --ui18-round-low:#273a49;
  color:#e0e7e4!important;
  box-shadow:inset 0 0 0 2px #b0c3c7,0 3px 0 #06131d,0 4px 6px #02070b66!important;
}
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto)[data-skill-state='cooldown']::after {
  background:conic-gradient(from -90deg,#d7ffdf var(--skill-ready-angle,0deg),#415864 0);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 0);
  mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 0);
  pointer-events:none;
}
body.game-interface[data-button-quality='v15'] .virtual-joystick {
  background:radial-gradient(circle,#142e3c 0 54%,#08202eb8 56% 71%,transparent 72%)!important;
  box-shadow:inset 0 0 0 2px #9dbebb66,0 4px 8px #0004;
  opacity:1;
}
body.game-interface[data-button-quality='v15'] .virtual-joystick::before {
  background-image:url('/resource/ui/title-lobby-v18/runtime/joystick-rim-v18.svg');
  background-size:100% 100%;
  -webkit-mask:none;
  mask:none;
  filter:none!important;
  pointer-events:none;
}
body.game-interface[data-button-quality='v15'] .virtual-joystick [data-joystick-knob] {
  background:url('/resource/ui/title-lobby-v18/runtime/joystick-knob-v18.svg') center/100% 100% no-repeat!important;
  filter:none!important;
  box-shadow:0 4px 5px #0009;
}
body.game-interface[data-button-quality='v15'] .virtual-joystick[data-joystick-active='true'] {
  box-shadow:inset 0 0 0 3px #dbffe3,0 0 13px #9fe8c840,0 4px 8px #0004;
}
/* The workshop's artwork cards, filters and receipt are preserved. Only
   its actual command/quantity buttons share the new material. Gold purchase
   keeps the workshop's established dark ink on a solid light-gold face. */
body #detail-dialog[data-shop-quality='v17'] .shop-v17-fixed-actions .shop-v17-primary {
  --ui18-face-top:#edd495;
  --ui18-face-mid:#d9b970;
  --ui18-face-low:#c5a463;
  --ui18-caption:#152b30;
  --ui18-rim-lit:#fff0bc;
  --ui18-rim-mid:#caa564;
  --ui18-rim-dark:#785936;
  text-shadow:none;
}
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17,.shop-v17-fixed-actions) button:active:not(:disabled) {
  transform:none!important;
}
@media(hover:hover) and (pointer:fine) {
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):hover:not(:disabled):not([aria-disabled="true"]):not(:active):not([data-material-v18])::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):hover:not(:disabled):not([aria-disabled="true"]):not(:active):not([data-material-v18])::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):hover:not(:disabled):not([aria-disabled="true"]):not(:active):not([data-material-v18])::after,
body :is(.locale-picker-option,.locale-load-retry button):hover:not(:disabled):not([aria-disabled="true"]):not(:active):not([data-material-v18])::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:hover:not(:disabled):not([aria-disabled="true"]):not(:active):not([data-material-v18])::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:hover:not(:disabled):not([aria-disabled="true"]):not(:active):not([data-material-v18])::after {
  box-shadow:inset 0 2px 0 #fff4c8,inset 0 -3px 0 var(--ui18-rim-lit),inset 1px 0 0 #fff4c8;

}
}
@media(prefers-reduced-motion:reduce) {
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick),
body :is(.locale-picker-option,.locale-load-retry button),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button,
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)::after,
body :is(.locale-picker-option,.locale-load-retry button)::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button::after,
body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto),
body.game-interface[data-button-quality='v15'] .virtual-joystick {
  transition:none!important;
  animation:none!important;
}
}
body #game-viewport[data-motion='reduced'] button::after,
body #game-viewport[data-motion='bg-off'] button::after,
body #game-viewport[data-animation-paused='true'] button::after { transition:none!important; }
@media(forced-colors:active) {
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button),
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button),
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick),
body :is(.locale-picker-option,.locale-load-retry button),
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button {
  background:ButtonFace!important;
  color:ButtonText!important;
  border-color:ButtonText!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)::before,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)::before,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)::before,
body :is(.locale-picker-option,.locale-load-retry button)::before,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button::before,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button::before,
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button)::after,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button)::after,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick)::after,
body :is(.locale-picker-option,.locale-load-retry button)::after,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button::after,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button::after {
  display:none!important;
}
body #game-viewport[data-layout][data-title-lobby-v15] button:not(.profile):not(.hero-detail):not(.advice-copy):not(.lobby-nav button):focus-visible,
body #detail-dialog button:not(.shop-v17 button):not(.shop-v17-fixed-actions button):focus-visible,
body.game-interface[data-button-quality='v15'] :is(button,.lobby-link,.login-notice a):not(.thumb-skill):not(.thumb-auto):not(.virtual-joystick):focus-visible,
body :is(.locale-picker-option,.locale-load-retry button):focus-visible,
body #game-viewport[data-layout][data-title-lobby-v15] .lobby-nav button:focus-visible,
body #detail-dialog[data-shop-quality='v17'] :is(.shop-v17-fixed-actions,.shop-v17-catalog-actions,.shop-v17-quantity,.shop-v17-pagination) button:focus-visible {
  outline-color:Highlight!important;
}
}
/* Game motion settings apply to portal dialogs as well as scene controls.
   Modern :has reads the existing owner; the module also reads it directly. */
body:has(#game-viewport:is([data-motion='reduced'],[data-motion='bg-off'],[data-background-motion='off'])) #detail-dialog button::after,
body.game-interface:has(:is(#battle-reduceMotion,#test-reduceMotion):checked) :is(button,button::after),
body:is([data-reduced-motion='true'],.reduce-motion,.motion-reduced) :is(button,button::after) { transition:none!important; }
@media(forced-colors:active) {
  body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto) {
    background:ButtonFace!important;color:ButtonText!important;box-shadow:inset 0 0 0 2px ButtonText!important;text-shadow:none;
  }
  body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto)::before,
  body.game-interface[data-button-quality='v15'] .thumb-controls .thumb-actions :is(.thumb-skill,.thumb-auto)::after { display:none!important; }
}
