/* The fixed game layout lives in style.css. This layer changes its materials,
   typography, and interaction states without moving the boards or controls. */
:root {
    --arena-surface: #16232c;
    --arena-surface-low: #101a22;
    --arena-edge: #465964;
    --arena-text: #f2f3f0;
    --arena-muted: #b9c5c8;
    --arena-accent: #e3ad68;
    --arena-shadow: 0 16px 36px rgba(0, 0, 0, .38);
}

/* Keep the artwork behind the selection UI soft without blurring its controls. */
.selection-client-page.game-remaster .background {
    isolation: isolate;
    overflow: hidden;
    background: #16252e;
}
.selection-client-page.game-remaster .background::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--selection-stage-image, url('selectionbg_2.jpg')) center / cover no-repeat;
    filter: blur(5px);
    transform: scale(1.025);
    pointer-events: none;
}
.selection-client-page.game-remaster .background::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('selection-noise.svg') repeat;
    opacity: .25;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* The game boards remain at their original coordinates and take over the
   visual hierarchy once the decorative scroll pieces are removed. */
.game-remaster .selectionpage {
    top: 457px;
    height: 327px;
    animation: none;
}

.game-remaster .selectionpage::before,
.game-remaster .skillpage,
.game-remaster .skillinformation,
.game-remaster .battle-end-panel {
    box-sizing: border-box;
    border: 1px solid var(--arena-edge);
    border-radius: 9px;
    background: linear-gradient(155deg, #22333d 0%, var(--arena-surface) 48%, var(--arena-surface-low) 100%);
    box-shadow: var(--arena-shadow);
    color: var(--arena-text);
    filter: none;
}

.game-remaster .selectionpage::after {
    display: none;
}

/* Selection board: vivid portraits against a quiet, legible field. */
.game-remaster .slot-item,
.game-remaster .selected-character-slot {
    border: 1px solid #52636c;
    border-radius: 3px;
    background: #0d171e;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .32);
}
.game-remaster .slot-item:hover,
.game-remaster .selected-character-slot:hover {
    border-color: var(--arena-accent);
    box-shadow: 0 6px 13px rgba(0, 0, 0, .38);
}
.game-remaster .slot-item.preview-active {
    border-color: var(--arena-accent);
    outline: 2px solid var(--arena-accent);
    outline-offset: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .32);
}
.game-remaster .slot-item:focus-visible { outline: 2px solid var(--arena-accent); outline-offset: 3px; }
.game-remaster .roster-sidebar {
    position: absolute;
    left: 716px;
    top: 34px;
    width: 260px;
    height: 260px;
    display: flex;
    flex-direction: column;
    z-index: 5;
}
.game-remaster .roster-sidebar::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #52636c 8%, #52636c 92%, transparent);
    pointer-events: none;
}
.game-remaster .player-card {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    width: 100%;
    gap: 18px; /* Leaves room for an equipped border hanging past the avatar. */
    align-items: start;
    margin: 0;
    padding: 4px 0 0;
    color: var(--arena-text);
    font-family: 'Libre Franklin', sans-serif;
    font-size: 10px;
    line-height: 1.3;
}
.game-remaster .player-card::before { display: none; }
.game-remaster .player-avatar-frame {
    width: 84px;
    height: 84px;
    min-width: 84px;
    min-height: 84px;
    border: 1px solid #71858e;
    border-radius: 5px;
    background: #0e1a22;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
}
.game-remaster .player-avatar-frame img.player-avatar {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: none;
}
.game-remaster .player-infoselection {
    min-width: 0;
    line-height: 1.35;
}
.game-remaster .player-nameselection,
.game-remaster .player-level-value { color: var(--arena-accent); }
.game-remaster .player-nameselection {
    overflow: hidden;
    width: 100%;
    margin: 0 0 5px;
    font: 700 13px/1.2 'Libre Franklin', sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.game-remaster .player-card .player-stat {
    overflow: hidden;
    width: 100%;
    margin: 0 0 3px;
    color: #d5e0e1;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.game-remaster .player-level-block { width: 100%; margin: 9px 0 9px; }
.game-remaster .player-level-row { gap: 4px; font-size: 10px; line-height: 1.2; }
.game-remaster .player-level-xp { color: #bdcdd0; font-size: 9px; white-space: nowrap; }
.game-remaster .player-level-bar-track { height: 5px; margin-top: 5px; border-radius: 2px; background: #394d55; }
.game-remaster .player-level-bar-fill { background: linear-gradient(90deg, #bd7c42, var(--arena-accent)); }
.game-remaster .selected-count-label {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    box-sizing: border-box;
    margin: auto 0 0;
    padding: 11px 0 0;
    border-top: 1px solid #4b5e67;
    color: var(--arena-text);
    font: 700 11px/1.25 'Libre Franklin', sans-serif;
    letter-spacing: .035em;
    text-align: center;
}
.game-remaster .selected-count-label.ready { color: #a6dfc1; }
.game-remaster .selected-character-slot-list {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    width: 260px;
    flex: 0 0 auto;
    gap: 22px;
    margin: 16px 0 0;
    padding: 0;
}
.game-remaster .selected-character-slot {
    overflow: hidden;
    width: 72px;
    height: 72px;
    border-color: #647983;
    border-radius: 4px;
    background: #101d26;
    color: #b9cbd2;
    font: 700 24px/1 'Libre Franklin', sans-serif;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .28);
}
.game-remaster .nextpage,
.game-remaster .lastpage {
    border: 1px solid #63747b;
    border-radius: 5px;
    background: #253741;
    color: var(--arena-text);
    box-shadow: 0 5px 12px rgba(0, 0, 0, .3);
    filter: none;
}
.game-remaster .nextpage:hover,
.game-remaster .lastpage:hover { background: #364a54; border-color: var(--arena-accent); filter: none; }
.game-remaster .button-container {
    position: absolute;
    left: 62px;
    top: -101px;
    width: 873px;
    padding: 0;
    gap: 24px;
}

/* Match choices keep their 275 × 82 hit areas. The visible control is a
   slimmer inset surface, with a single line identifying each mode. */
.game-remaster .game-button {
    --mode-accent: #9aabb3;
    width: var(--remaster-wide-button-w);
    height: var(--remaster-wide-button-h);
    position: relative;
    right: auto;
    bottom: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--arena-text);
    font: 700 14px 'Libre Franklin', 'Franklin', sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-shadow: none;
    opacity: 1 !important;
    transition: color .18s ease;
}
.game-remaster .ladder-button { --mode-accent: #dca463; }
.game-remaster .quick-button { --mode-accent: #8dbbca; }
.game-remaster .private-button { --mode-accent: #aab4b7; }
.game-remaster .game-button::before {
    content: "";
    position: absolute;
    inset: 7px 0;
    border: 1px solid #65777d;
    border-radius: 5px;
    background: linear-gradient(165deg, #2d424c 0%, #1d303a 42%, #13232b 100%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .13), inset 0 -3px var(--mode-accent), 0 9px 20px rgba(0, 0, 0, .34);
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.game-remaster .game-button::after {
    content: "";
    position: absolute;
    right: 22px;
    top: calc(50% - 4px);
    width: 7px;
    height: 7px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .8;
}
.game-remaster .game-button span { position: relative; z-index: 1; }
.game-remaster .game-button .mode-symbol {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    margin: 0 17px 0 19px;
    color: var(--mode-accent);
    border: 1px solid color-mix(in srgb, var(--mode-accent), #263a43 55%);
    border-radius: 4px;
    background: rgba(7, 18, 24, .35);
}
.game-remaster .mode-symbol svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.game-remaster .game-button .mode-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.game-remaster .mode-copy strong { font-size: 13px; line-height: 1.1; letter-spacing: .015em; }
.game-remaster .mode-copy small { color: #b9c9ca; font: 500 10px/1.2 'Libre Franklin', sans-serif; letter-spacing: 0; text-transform: none; }
.game-remaster .game-button:hover:not(:disabled):not([aria-disabled="true"]) { color: #fff; }
.game-remaster .game-button:hover:not(:disabled):not([aria-disabled="true"])::before,
.game-remaster .game-button:focus-visible::before {
    border-color: var(--mode-accent);
    background: linear-gradient(180deg, #344852, #192a34);
    transform: translateY(-2px);
}
.game-remaster .game-button:focus-visible { outline: 2px solid var(--arena-accent); outline-offset: -3px; }
.game-remaster .game-button:disabled,
.game-remaster .game-button[aria-disabled="true"] { color: #bfcbcf; cursor: default; }
.game-remaster .game-button:disabled::before,
.game-remaster .game-button[aria-disabled="true"]::before { border-color: #44545c; box-shadow: inset 0 -2px #62737a, 0 7px 17px rgba(0, 0, 0, .28); }
.game-remaster .game-button:disabled::after,
.game-remaster .game-button[aria-disabled="true"]::after { opacity: .4; }

/* Preview uses the same left and right content edges as the roster board. */
.game-remaster .skillviewer {
    top: -385px;
    width: 997px;
    height: 264px;
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .22s ease, visibility .22s;
}
.game-remaster .skillviewer.collapsed { transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none; }
.game-remaster .skillviewer.collapsed .skillpage { transform: none; opacity: 1; }
.game-remaster .skillpage {
    height: 264px;
    padding: 18px 48px 16px;
    background: linear-gradient(155deg, #24363f, #16252e 58%, #101c24);
    border-color: #61747c;
    border-radius: 7px;
    font-family: 'Libre Franklin', sans-serif;
    text-transform: none;
}
.game-remaster .skill-side {
    display: flex;
    align-items: center;
    gap: 22px;
    width: auto;
    min-width: 0;
    margin-top: 0;
    justify-self: end;
}
.game-remaster .character-passive[hidden] { display: none; }
.game-remaster .character-passive {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 290px;
    min-height: 62px;
    padding: 5px 12px 5px 8px;
    border: 1px solid #5b777b;
    border-radius: 4px;
    background: #1c3038;
    color: #e7eeee;
    font-family: 'Libre Franklin', sans-serif;
    text-align: left;
    cursor: pointer;
}
.game-remaster .character-passive:hover { border-color: #b2d6d5; background: #25414a; }
.game-remaster .character-passive[aria-pressed="true"] { border-color: #b2d6d5; background: #2b4850; }
.game-remaster .character-passive:focus-visible { outline: 2px solid #f2f3f0; outline-offset: 2px; }
.game-remaster .character-passive-image {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: cover;
    border: 1px solid #85abad;
    border-radius: 3px;
}
.game-remaster .character-passive-content { min-width: 0; }
.game-remaster .character-passive-heading { display: flex; flex-direction: column; gap: 3px; }
.game-remaster .character-passive-label {
    color: #a8d1d0;
    font: 700 11px/1.3 'Libre Franklin', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.game-remaster .character-passive-heading strong { color: #f2f3f0; font: 700 13px/1.3 'Libre Franklin', sans-serif; }
.game-remaster .skill-header {
    display: block;
    align-items: start;
    margin: 0;
}
.game-remaster .character-info { min-width: 0; gap: 14px; }
.game-remaster .character-portrait-button {
    display: block;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}
.game-remaster .character-portrait-button:hover .character-portrait,
.game-remaster .character-portrait-button[aria-pressed="true"] .character-portrait { border-color: var(--arena-accent); }
.game-remaster .character-portrait-button:focus-visible { outline: 2px solid var(--arena-accent); outline-offset: 3px; }
.game-remaster .character-portrait {
    width: 64px;
    height: 64px;
    box-sizing: border-box;
    border: 1px solid #71828a;
    border-radius: 3px;
    background: #101b22;
    object-fit: cover;
    box-shadow: none;
}
.game-remaster .character-name {
    color: var(--arena-accent);
    font: 700 20px/1.2 'Libre Franklin', sans-serif;
    text-transform: none;
    margin: 0 0 4px;
}
.game-remaster .character-arc[hidden] { display: none; }
.game-remaster .character-arc {
    margin: 0 0 5px;
    color: #a9c7cb;
    font: 700 10px/1.25 'Libre Franklin', sans-serif;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.game-remaster .skill-images {
    width: auto;
    max-width: min(100%, 440px);
    box-sizing: border-box;
    display: flex;
    align-self: start;
    gap: 8px;
    padding: 4px;
    margin: 0;
    transform: none;
    scrollbar-color: #81949b #15232b;
}
.game-remaster .skill-images > * { transform: none; }
.game-remaster .skill-images::-webkit-scrollbar-track { background: #15232b; }
.game-remaster .skill-images::-webkit-scrollbar-thumb { background: #81949b; }
.game-remaster .skill-image {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    box-sizing: border-box;
    border: 1px solid #677a82;
    border-radius: 3px;
    background: #101b22;
    object-fit: cover;
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: none;
    transition: border-color .16s ease, transform .16s ease;
}
.game-remaster .skill-image:hover { border-color: #d0d9d9; transform: translateY(-2px); }
.game-remaster .skill-image.active { border-color: var(--arena-accent); outline-color: var(--arena-accent); box-shadow: none; }
.game-remaster .skill-image.alternate-skill { border-color: #9d86b5; box-shadow: none; }
.game-remaster .skill-image.alternate-skill.active { outline-color: #b99ad0; box-shadow: none; }
.game-remaster .skill-image:focus-visible { outline-color: #f2f3f0; }
.game-remaster .skill-detail-card {
    margin-top: 9px;
    padding-top: 12px;
    border-top: 1px solid #4c6068;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    grid-column: 1 / -1;
}
.game-remaster .skill-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
}
.game-remaster .skill-detail-kind[hidden] { display: none; }
.game-remaster .skill-detail-kind { display: block; margin-bottom: 5px; color: #a8d1d0; font: 700 11px/1.3 'Libre Franklin', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.game-remaster .skill-detail-head { display: flex; align-items: stretch; gap: 14px; margin: 0; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.game-remaster .skill-detail-content { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.game-remaster .skill-detail-card.is-empty .skill-detail-head { grid-template-columns: 1fr; }
.game-remaster .skill-detail-image {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    box-sizing: border-box;
    border: 1px solid #71828a;
    border-radius: 3px;
    background: #101b22;
    box-shadow: none;
}
.game-remaster .skill-name {
    color: var(--arena-text);
    font: 700 17px/1.25 'Libre Franklin', sans-serif;
    text-transform: none;
    margin: 0 0 6px;
}
.game-remaster .skill-description {
    color: #d5dedd;
    font: 400 13px/1.48 'Libre Franklin', sans-serif;
    text-transform: none;
    max-height: none;
    min-height: 0;
    flex: 1 1 auto;
    scrollbar-color: #71828a transparent;
}
.game-remaster .skill-description strong { font-weight: 800; }
.game-remaster .skill-detail-card.is-biography .skill-description { overflow-y: auto; }
.game-remaster .skill-description .skill-ref { color: #ffce8c; }
.game-remaster .skill-description .skill-term--damage { color: #f2aaa0; }
.game-remaster .skill-description .skill-term--healing { color: #a6dfba; }
.game-remaster .skill-description .skill-term--defense { color: #9ed6e3; }
.game-remaster .skill-description .skill-term--control { color: #d8b9f2; }
.game-remaster .skill-description .skill-term--resource { color: #a8cfff; }
.game-remaster .skill-description .skill-term--class { color: #d9e7e8; }
.game-remaster .skill-detail-meta {
    margin: 14px 0 0 106px;
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid #40525a;
    border-radius: 0;
    background: transparent;
    color: var(--arena-text);
    font: 400 10px/1.4 'Libre Franklin', sans-serif;
    letter-spacing: 0;
    text-transform: none;
    justify-content: flex-start;
    gap: 18px;
}
.game-remaster .sdm-seg { gap: 7px; padding: 0 18px 0 0; border-right: 0; }
.game-remaster .sdm-seg--last { padding-right: 0; border-right: 0; }
.game-remaster .sdm-lbl { color: var(--arena-muted); font-weight: 600; }
.game-remaster .skill-classes,
.game-remaster .cooldown-value { font-style: normal; font-weight: 600; }
.game-remaster .energy-none { color: var(--arena-muted); font-style: normal; }
.game-remaster .energy-pip { box-shadow: none; }

.game-remaster .skillviewer:has(.character-unlock-action:not([hidden])) { top: -397px; height: 300px; }
.game-remaster .skillpage:has(.character-unlock-action:not([hidden])) { height: 300px; }
.game-remaster .selectionpage:has(.character-unlock-action:not([hidden])) .button-container { top: -84px; }

/* Search and arc controls sit within the roster column, above the portraits. */
.game-remaster .roster-toolbar {
    position: absolute;
    left: 56px;
    top: 20px;
    width: 588px;
    height: 34px;
    display: flex;
    gap: 8px;
    box-sizing: border-box;
    z-index: 4;
    font-family: 'Libre Franklin', sans-serif;
}
.game-remaster .roster-search,
.game-remaster .roster-select,
.game-remaster .roster-lock-filter {
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
    height: 34px;
    border: 1px solid #536872;
    border-radius: 4px;
    background: #0c1921;
    color: #eef3f2;
    transition: border-color .16s ease, background-color .16s ease;
}
.game-remaster .roster-search { flex: 1 1 auto; }
.game-remaster .roster-select { flex: 0 0 145px; }
.game-remaster .roster-sort { flex-basis: 112px; }
.game-remaster .roster-lock-filter { flex: 0 0 38px; justify-content: center; padding: 0; cursor: pointer; }
.game-remaster .roster-search:hover,
.game-remaster .roster-select:hover,
.game-remaster .roster-lock-filter:hover { border-color: #91a4a8; background: #142630; }
.game-remaster .roster-search:focus-within,
.game-remaster .roster-select:focus-within,
.game-remaster .roster-lock-filter:focus-visible { border-color: var(--arena-accent); outline: 2px solid var(--arena-accent); outline-offset: 2px; }
.game-remaster .roster-lock-filter[data-state="unlocked"] { border-color: #83aeb1; background: #1c343c; color: #d9eeeb; }
.game-remaster .roster-lock-filter[data-state="locked"] { border-color: #dba15c; background: #3b2b20; color: #ffd39b; }
.game-remaster .roster-lock-icon { display: none; width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.game-remaster .roster-lock-filter[data-state="all"] .roster-lock-icon--all,
.game-remaster .roster-lock-filter[data-state="unlocked"] .roster-lock-icon--unlocked,
.game-remaster .roster-lock-filter[data-state="locked"] .roster-lock-icon--locked { display: block; }
.game-remaster .roster-search svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-left: 10px;
    fill: none;
    stroke: #a9bdc1;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.game-remaster .roster-search input,
.game-remaster .roster-select select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #eef3f2;
    caret-color: var(--arena-accent);
    font: 500 11px/1.3 'Libre Franklin', sans-serif;
}
.game-remaster .roster-search input { padding: 0 9px; }
.game-remaster .roster-search input::placeholder { color: #b8c9ca; opacity: 1; }
.game-remaster .roster-select select { appearance: none; cursor: pointer; padding: 0 28px 0 11px; }
.game-remaster .roster-select select option { background: #15252e; color: #eef3f2; }
.game-remaster .roster-select::after {
    content: "";
    position: absolute;
    top: 11px;
    right: 12px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #b8c9ca;
    border-bottom: 1.5px solid #b8c9ca;
    transform: rotate(45deg);
    pointer-events: none;
}
.game-remaster .roster-toolbar .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.game-remaster .roster-empty button {
    border: 0;
    background: transparent;
    color: #edb36e;
    padding: 3px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font: 600 10px/1.3 'Libre Franklin', sans-serif;
}
.game-remaster .roster-empty button:hover { color: #ffcf91; }
.game-remaster .roster-empty button:focus-visible { outline: 2px solid var(--arena-accent); outline-offset: 2px; }
.game-remaster .roster-empty[hidden] { display: none; }
.game-remaster .roster-empty {
    position: absolute;
    left: 170px;
    top: 132px;
    z-index: 5;
    width: 360px;
    height: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #52636c;
    border-radius: 4px;
    background: #15242d;
    color: #c4d1d1;
    font: 400 11px/1.35 'Libre Franklin', sans-serif;
}
.game-remaster .roster-empty strong { color: #f2f3f0; font-size: 14px; }
.game-remaster .roster-empty button { margin-top: 3px; font-size: 11px; }

/* Keep the seven-column silhouette even while the active roster is small. */
.game-remaster .slot-list {
    grid-template-columns: repeat(7, 72px);
    gap: 12px 14px;
    left: 56px;
    top: 70px;
    width: 588px;
}
.game-remaster .slot-item.slot-placeholder,
.game-remaster .slot-item.slot-placeholder:hover {
    border-color: #455862;
    background: linear-gradient(145deg, #1a2a34, #14212a);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    transform: none;
    cursor: default;
    pointer-events: none;
}
.game-remaster .roster-page-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 40px;
    top: 170px;
}
.game-remaster .lastpage { left: 10px; }
.game-remaster .nextpage { left: 654px; }
.game-remaster .roster-page-button:disabled { box-shadow: inset 0 1px rgba(255, 255, 255, .07); }
.game-remaster .slot-item.slot-locked { cursor: pointer; filter: none; opacity: 1; }
.game-remaster .slot-item.slot-locked .slot-image { filter: grayscale(.38) brightness(.72); }
.game-remaster .slot-item.slot-locked:hover .slot-image,
.game-remaster .slot-item.slot-locked:focus-visible .slot-image { filter: grayscale(.1) brightness(.9); }
.game-remaster .slot-item.slot-locked .slot-lock-label {
    top: -3px;
    right: -3px;
    bottom: auto;
    left: auto;
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border: 1px solid #e5ad68;
    border-radius: 3px;
    background: #15242b;
    color: #f4c487;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .45);
}
.game-remaster .slot-item.slot-locked .slot-lock-label svg { width: 14px; height: 14px; }
.game-remaster .slot-item.slot-in-team { cursor: pointer; border-color: #8da8ad; }
.game-remaster .slot-item.slot-in-team .slot-image { cursor: pointer; filter: saturate(.6) brightness(.8); }
.game-remaster .slot-item.slot-in-team:hover .slot-image,
.game-remaster .slot-item.slot-in-team:focus-visible .slot-image { filter: saturate(.9) brightness(1); }
.game-remaster .slot-team-label {
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 3px;
    padding: 2px 1px;
    border: 1px solid #a6bfc0;
    border-radius: 2px;
    background: rgba(13, 27, 34, .92);
    color: #e7f0ef;
    font: 700 8px/1.1 'Libre Franklin', sans-serif;
    letter-spacing: .04em;
    text-align: center;
    pointer-events: none;
}

/* The preview houses the Ryo transaction without an extra screen. */
.game-remaster .character-unlock-action[hidden] { display: none; }
.game-remaster .character-unlock-action { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 11px; margin-top: 6px; }
.game-remaster .character-unlock-price { color: #e4d4b9; font: 600 12px/1.2 'Libre Franklin', sans-serif; }
.game-remaster .character-unlock-price strong { color: #f0b866; font-variant-numeric: tabular-nums; }
.game-remaster .character-unlock-buy {
    padding: 7px 11px;
    border: 1px solid #dba15c;
    border-radius: 3px;
    background: #b87938;
    color: #101920;
    font: 700 11px/1.2 'Libre Franklin', sans-serif;
    cursor: pointer;
}
.game-remaster .character-unlock-buy:hover:not(:disabled) { background: #f0b866; }
.game-remaster .character-unlock-buy:disabled { border-color: #69767a; background: #445157; color: #c7d1d0; cursor: default; }
.game-remaster .character-unlock-buy:focus-visible { outline: 2px solid #f0b866; outline-offset: 2px; }
.game-remaster .character-unlock-error { width: 100%; color: #ffb5a8; font: 500 10px/1.2 'Libre Franklin', sans-serif; }
.game-remaster .skillpage:has(.character-unlock-action:not([hidden])) .skill-detail-card { margin-top: 10px; padding-top: 12px; }
.game-remaster .skillpage:has(.character-unlock-action:not([hidden])) .skill-detail-meta { margin-top: 6px; padding-top: 6px; }

/* A quiet, fixed nav keeps the two destinations centered in the stage. */
.game-remaster .selection-hub-nav {
    animation: none;
    transform: none;
    opacity: 1;
    overflow: visible !important;
    background: #0f1b22;
    border-bottom: 1px solid #51616a;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .36);
    font-family: 'Libre Franklin', sans-serif;
    padding: 0 52px;
}
.game-remaster .selection-hub-nav::after { display: none; }
.game-remaster .selection-hub-brand { width: 180px; min-width: 180px; justify-content: flex-start; }
.game-remaster .selection-hub-wordmark { color: #f0b866; font: 700 15px/1 'Libre Franklin', sans-serif; letter-spacing: -.025em; white-space: nowrap; }
.game-remaster .selection-hub-wordmark span { color: #f0f1ed; margin-left: 4px; }
.game-remaster .selection-hub-tabs {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 14px;
    flex: none;
    width: 340px;
    margin: 0;
}
.game-remaster .selection-hub-tab { flex: none; width: 158px; padding: 14px 8px; color: #c0cbce; font: 700 11px/1.2 'Libre Franklin', sans-serif; letter-spacing: .03em; }
.game-remaster .selection-hub-tab:hover,
.game-remaster .selection-hub-tab.active { color: #f4c27d; }
.game-remaster .selection-hub-tab.active::after { background: #e3ad68; }
.game-remaster .selection-hub-ryo {
    box-sizing: border-box;
    height: 34px;
    min-width: 0;
    margin-left: auto;
    padding: 0 12px;
    gap: 8px;
    border: 1px solid #657780;
    border-radius: 6px;
    background: #20313a;
    color: #f1eee6;
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
    font: 700 12px/1 'Libre Franklin', sans-serif;
    font-variant-numeric: tabular-nums;
}
.game-remaster .selection-hub-coin {
    width: 19px;
    height: 19px;
    border: 1px solid #f3cd8e;
    background: #e3ad68;
    color: #24313a;
    box-sizing: border-box;
    font: 800 10px/1 'Libre Franklin', sans-serif;
}
.game-remaster .selection-hub-ryo-label { color: #c1d0d1; font: 700 10px/1 'Libre Franklin', sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.game-remaster .selection-hub-settings { margin-left: 8px; }
.game-remaster .selection-hub-settings-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #657780;
    border-radius: 6px;
    background: #20313a;
    color: #edbf84;
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}
.game-remaster .selection-hub-settings-button:hover,
.game-remaster .selection-hub-settings.open .selection-hub-settings-button { border-color: #e3ad68; background: #30444e; color: #f4d0a1; }
.game-remaster .selection-hub-settings-button:focus-visible { outline: 2px solid #e3ad68; outline-offset: 3px; }
.game-remaster .selection-hub-settings-button svg { width: 18px; height: 18px; display: block; }

/* Battle rows and readout. Existing portraits, queue indicators, and skill
   icons keep their exact coordinates. */
.game-remaster .skillscrollingame {
    box-sizing: border-box;
    border: 1px solid #50636c;
    border-radius: 7px;
    background: linear-gradient(180deg, #22333d, #111d25);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .33);
    filter: none;
}
.game-remaster .player-name,
.game-remaster .ready-text {
    color: #f4eee3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.game-remaster .player-status,
.game-remaster .exchange-label {
    color: #dce5e2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.game-remaster .chakra-count {
    color: #f3f3ec;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.game-remaster .skillinformation { color: var(--arena-text); }
.game-remaster .ingameskillname,
.game-remaster .profile-username { color: var(--arena-accent); text-shadow: none; }
.game-remaster .ingameskilldescription,
.game-remaster .ingameclasses,
.game-remaster .ingamecooldown,
.game-remaster .profile-rank-badge { color: var(--arena-text); }
.game-remaster .skill-info-kicker,
.game-remaster .sim-lbl { color: var(--arena-muted); }
.game-remaster .skill-info-meta { color: var(--arena-text); border-top-color: #485b63; }
.game-remaster .skillviewimage,
.game-remaster .profile-avatar-box { border-color: #687b83; }
.game-remaster .surrenderbutton,
.game-remaster .sound {
    box-sizing: border-box;
    border: 1px solid #596b73;
    border-radius: 6px;
    background: linear-gradient(180deg, #243640, #121e27);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .32);
    color: var(--arena-text);
    filter: none;
}
.game-remaster .surrenderbutton span { color: var(--arena-text); }
.game-remaster .surrenderbutton:hover { background: #344a54; border-color: var(--arena-accent); filter: none; }
.game-remaster .ingame-sound-volume { accent-color: var(--arena-accent); }

/* Dialogs and results use the same dark surface, without a substitute roll
   or decorative side band. Their dimensions and content offsets stay put. */
.game-remaster .searchingscroll,
.game-remaster .private-match-modal,
.game-remaster .ChakraChooseEndTurn,
.game-remaster .exchange_chakra,
.game-remaster .surrender-confirm,
.endturnscroll,
.login {
    box-sizing: border-box;
    border: 1px solid #61717a;
    border-radius: 9px;
    background: linear-gradient(155deg, #263943, #14232c 55%, #0d1820) !important;
    box-shadow: 0 22px 55px rgba(0, 0, 0, .46);
    color: var(--arena-text);
    filter: none;
}
.game-remaster .searching,
.game-remaster .private-match-title,
.game-remaster .chakrachoose,
.game-remaster .exchange_chakra_title,
.game-remaster .exchange_chakra_subtitle,
.game-remaster .surrender-confirm-title,
.logintext,
.username-label,
.password-label { color: var(--arena-text); text-shadow: none; }
.game-remaster .chakra-title,
.game-remaster .chakra-name,
.game-remaster .chakra-amount,
.game-remaster .exchange_chakra_row .chakra-name,
.game-remaster .exchange_chakra_row .chakra-amount { color: var(--arena-muted); text-shadow: none; }
.game-remaster .cancel-buttonendturn,
.game-remaster .cancel-buttonexchange { color: var(--arena-text); border-bottom-color: var(--arena-muted); text-shadow: none; }
.game-remaster .ok-buttonendturn,
.game-remaster .ok-buttonexchange { border-radius: 5px; background: var(--arena-accent); text-shadow: none; }
.game-remaster .private-match-input,
.login-form input {
    border: 1px solid #71828a;
    border-radius: 4px;
    background: #0e1a22;
    color: var(--arena-text);
}
.game-remaster .private-match-ok,
.game-remaster .private-match-cancel,
.game-remaster .cancel-button,
.game-remaster .surrender-confirm-ok,
.game-remaster .surrender-confirm-cancel,
.login .ok-button {
    border: 1px solid #819098;
    border-radius: 4px;
    background: #30434c;
    color: var(--arena-text);
    box-shadow: none;
}
.game-remaster .private-match-ok:hover,
.game-remaster .private-match-cancel:hover,
.game-remaster .cancel-button:hover,
.game-remaster .surrender-confirm-ok:hover,
.game-remaster .surrender-confirm-cancel:hover,
.login .ok-button:hover { background: #415963; border-color: var(--arena-accent); }
.login .account-recovery-link { color: #e7bc82; }

/* Matchmaking dialogs share one compact visual language. */
.game-remaster .searching-backdrop,
.game-remaster .private-match-backdrop {
    background: rgba(5, 10, 15, .78) !important;
    backdrop-filter: blur(3px);
}
.game-remaster .searchingscroll,
.game-remaster .private-match-modal {
    width: min(460px, calc(100% - 40px));
    height: auto;
    min-height: 0;
    padding: 27px 30px 25px;
    border-color: #657780;
    border-radius: 7px;
    background: linear-gradient(145deg, #243640 0%, #172832 52%, #101d26 100%) !important;
    box-shadow: 0 30px 65px rgba(0, 0, 0, .56), inset 0 1px rgba(255, 255, 255, .055);
    font-family: 'Franklin', 'Libre Franklin', Arial, sans-serif;
    overflow: hidden;
}
.game-remaster .searchingscroll::before,
.game-remaster .private-match-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--arena-accent), rgba(227, 173, 104, .15));
}
.game-remaster .searchingscroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.game-remaster .match-dialog-heading { width: 100%; }
.game-remaster .match-dialog-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--arena-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.4;
    text-transform: uppercase;
}
.game-remaster .match-dialog-mode::before {
    content: '/';
    margin-right: 8px;
    color: #83949b;
}
.game-remaster .searching {
    position: static;
    width: 100%;
    margin: 12px 0 5px;
    font-family: 'Libre Franklin', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.24;
    text-align: center;
    text-transform: none;
}
.game-remaster .searching-detail,
.game-remaster .private-match-description {
    margin: 0;
    color: var(--arena-muted);
    font-size: 13px;
    line-height: 1.5;
    text-transform: none;
}
.game-remaster .match-search-visual {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 275px;
    height: 179px;
    margin: 20px auto 19px;
}
.game-remaster .match-search-ring {
    position: absolute;
    display: none;
    border-radius: 50%;
    pointer-events: none;
}
.game-remaster .match-search-ring-outer {
    inset: 1px;
    border: 1px solid #627985;
    border-top: 2px solid var(--arena-accent);
    border-bottom-color: rgba(227, 173, 104, .45);
}
.game-remaster .match-search-ring-outer::before,
.game-remaster .match-search-ring-outer::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--arena-accent);
    box-shadow: 0 0 7px rgba(227, 173, 104, .55);
}
.game-remaster .match-search-ring-outer::before { top: 13px; right: 13px; }
.game-remaster .match-search-ring-outer::after { bottom: 13px; left: 13px; }
.game-remaster .match-search-ring-inner {
    inset: 15px;
    border: 1px solid rgba(132, 158, 170, .35);
    border-left-color: rgba(227, 173, 104, .8);
    border-right-color: rgba(227, 173, 104, .8);
}
.game-remaster .sharingan {
    position: absolute;
    /* The tomoe art is not centred in its 92px canvas: spin around the tomoe
       centre (44.4px, 45px) and pin that point on the pupil of the eye art. */
    top: 38.3px;
    left: 99.6px;
    z-index: 2;
    display: block;
    width: 92px;
    height: 92px;
    margin: 0;
    object-fit: contain;
    transform-origin: 44.4px 45px;
    animation: spin 1s linear infinite;
}
.game-remaster .sharingan-activated {
    position: absolute;
    top: 41.5px;
    left: 100.5px;
    z-index: 3;
    display: none;
    width: 88px;
    height: 88px;
    margin: 0;
    object-fit: contain;
    pointer-events: none;
}
.game-remaster .sasukesearch {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 275px;
    height: 179px;
    margin: 0;
    border: 1px solid #657780;
    border-radius: 3px;
    box-sizing: border-box;
    object-fit: cover;
}
.game-remaster .match-search-found-icon {
    display: none;
    z-index: 1;
    color: var(--arena-accent);
    font-size: 47px;
    font-weight: 400;
    line-height: 1;
}
/* Found: the tomoe stop and the Sharingan activates over the same eye. */
.game-remaster .searchingscroll.is-found .sharingan { display: none; }
.game-remaster .searchingscroll.is-found:not(.is-elite) .sharingan-activated {
    display: block;
    animation: sharingan-activate .55s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes sharingan-activate {
    from { opacity: 0; transform: rotate(-240deg) scale(.82); }
    60% { opacity: 1; }
    to { opacity: 1; transform: rotate(0deg) scale(1); }
}
/* Elite encounters keep their seal screen in place of the eye. */
.game-remaster .searchingscroll.is-elite .sasukesearch { display: none; }
.game-remaster .searchingscroll.is-elite .match-search-visual { width: 126px; height: 126px; margin: 23px auto 22px; }
.game-remaster .searchingscroll.is-elite .match-search-found-icon { display: block; }
.game-remaster .searchingscroll.is-elite .match-search-ring { display: block; animation: none; border-color: rgba(227, 173, 104, .58); }
.game-remaster .match-search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 45px;
    padding-top: 17px;
    border-top: 1px solid rgba(167, 184, 191, .2);
}
.game-remaster .match-search-waiting,
.game-remaster .match-search-opening {
    color: var(--arena-muted);
    font-size: 11px;
    line-height: 1.3;
    text-align: left;
}
.game-remaster .match-search-opening { color: var(--arena-accent); }
.game-remaster .match-search-dots::after {
    content: '…';
    display: inline-block;
    width: 1.3em;
    overflow: hidden;
    vertical-align: bottom;
    animation: arena-search-dots 1.5s steps(3, end) infinite;
}
.game-remaster .cancel-button {
    position: static;
    flex: none;
    width: auto;
    height: 36px;
    margin: 0;
    padding: 0 14px;
    font-family: 'Franklin', 'Libre Franklin', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: none;
}
.game-remaster .searchingscroll.is-found .cancel-button,
.game-remaster .searchingscroll.is-found .match-search-waiting { display: none; }
.game-remaster .searchingscroll.is-found .match-search-footer { justify-content: center; }
.game-remaster .searchingscroll.is-found .match-search-opening { text-align: center; }
.game-remaster .private-match-title {
    position: static;
    width: 100%;
    margin: 12px 0 5px;
    color: var(--arena-text);
    font-family: 'Libre Franklin', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.24;
    text-align: left;
    text-transform: none;
}
.game-remaster .private-match-description { max-width: 350px; }
.game-remaster .private-match-label {
    display: block;
    margin: 27px 0 8px;
    color: #d7e0e1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.game-remaster .private-match-input {
    position: static;
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-color: #667b85;
    border-radius: 4px;
    background: #0d1a22;
    font-family: 'Franklin', 'Libre Franklin', Arial, sans-serif;
    font-size: 14px;
    text-align: left;
}
.game-remaster .private-match-input:focus {
    outline: 2px solid var(--arena-accent);
    outline-offset: 2px;
    border-color: var(--arena-accent);
}
.game-remaster .private-match-error {
    position: static;
    width: 100%;
    min-height: 18px;
    margin: 6px 0 0;
    color: #f4ad9b;
    font-size: 11px;
    text-align: left;
}
.game-remaster .private-match-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding-top: 17px;
    border-top: 1px solid rgba(167, 184, 191, .2);
}
.game-remaster .private-match-ok,
.game-remaster .private-match-cancel {
    position: static;
    width: auto;
    height: 36px;
    padding: 0 17px;
    font-family: 'Franklin', 'Libre Franklin', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: none;
}
.game-remaster .private-match-ok {
    border-color: #e8b777;
    background: var(--arena-accent);
    color: #17232b;
}
.game-remaster .private-match-ok:hover { background: #f0c58d; border-color: #f0c58d; }
@keyframes arena-search-dots { from { width: 0; } to { width: 1.3em; } }
@media (prefers-reduced-motion: reduce) {
    .game-remaster .match-search-ring { animation: none; }
    /* The spinning tomoe are the search progress indicator, so they keep
       turning (more gently); the activation fades in instead of spinning. */
    .game-remaster .sharingan { animation-duration: 2s; }
    .game-remaster .searchingscroll.is-found:not(.is-elite) .sharingan-activated { animation: sharingan-fade-in .3s ease-out both; }
    .game-remaster .match-search-dots::after { animation: none; }
}
@keyframes sharingan-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-remaster .battle-end-copy,
.game-remaster .battle-end-message,
.game-remaster .battle-end-outcome,
.game-remaster .battle-end-reward-label,
.game-remaster .battle-end-reward-value,
.game-remaster .battle-end-unlocks { color: var(--arena-text); }
.game-remaster .battle-end-title,
.game-remaster .battle-end-continue { color: var(--arena-accent); }
.game-remaster .battle-end-reward-row,
.game-remaster .battle-end-unlocks { background: #22343f; border-color: #566971; }
.game-remaster .battle-end-portrait { border-color: #71838b; }

.shinobi-scroll-canvas {
    border: 1px solid #5e717a !important;
    border-radius: 9px !important;
    background: linear-gradient(155deg, #263943, #111f28) !important;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .48) !important;
}
.shinobi-scroll-spindle-top,
.shinobi-scroll-spindle-bottom { display: none; }

.game-remaster :is(.game-button, .nextpage, .lastpage, .private-match-ok, .private-match-cancel, .cancel-button, .surrender-confirm-ok, .surrender-confirm-cancel):focus-visible,
.login :is(input, button, a):focus-visible { outline: 2px solid var(--arena-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .game-remaster .game-button,
    .game-remaster .game-button::before,
    .game-remaster .skillviewer,
    .game-remaster .skill-image { transition: none; }
}

/* Battle controls and decision panels */
.game-remaster .surrenderbutton {
    border-color: #687b83;
    background: linear-gradient(180deg, #31444d, #1b2a33);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .1);
}
.game-remaster .surrenderbutton {
    appearance: none;
    left: 43px;
    top: 610px;
    width: 174px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 12px;
    font: 700 12px 'Libre Franklin', Arial, sans-serif;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.game-remaster .surrenderbutton svg { width: 17px; height: 17px; flex: none; }
.game-remaster .surrenderbutton span {
    position: static;
    width: auto;
    flex: none;
    color: inherit;
    font: inherit;
    text-align: left;
}
.game-remaster .surrenderbutton:hover { transform: translateY(-2px); }
.game-remaster .surrenderbutton:active { transform: translateY(0); }
.game-remaster .surrenderbutton:focus-visible,
.game-remaster .ingame-sound-volume:focus-visible,
.game-remaster .ingame-sound-toggle:focus-visible,
.game-remaster .ingame-bug-button:focus-visible { outline: 2px solid var(--arena-accent); outline-offset: 3px; }
.game-remaster .ingame-sound-controller {
    left: 43px;
    top: 670px;
    z-index: 15;
    width: 174px;
    height: 54px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid #687b83;
    border-radius: 6px;
    background: linear-gradient(180deg, #31444d, #1b2a33);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
    box-sizing: border-box;
}
.game-remaster .ingame-sound-toggle {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--arena-text);
    cursor: pointer;
}
.game-remaster .ingame-sound-toggle:hover { background: #40535c; }
.game-remaster .ingame-sound-toggle svg { width: 20px; height: 20px; }
.game-remaster .ingame-sound-toggle .sound-mute { display: none; }
.game-remaster .ingame-sound-toggle[data-muted="true"] .sound-wave { display: none; }
.game-remaster .ingame-sound-toggle[data-muted="true"] .sound-mute { display: initial; }
.game-remaster .ingame-sound-controls { flex: 1; min-width: 0; display: grid; gap: 5px; }
.game-remaster .ingame-sound-label {
    color: #ecdfcc;
    font: 700 11px 'Libre Franklin', Arial, sans-serif;
    line-height: 1;
    letter-spacing: .01em;
    text-align: left;
}
.game-remaster .ingame-sound-volume {
    width: 100%;
    height: 4px;
    margin: 0;
    border-radius: 2px;
    background: #71818a;
    cursor: pointer;
}
.game-remaster .ingame-sound-volume::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #f2f3f0;
    background: #e3ad68;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.game-remaster .ingame-sound-volume::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 2px solid #f2f3f0;
    border-radius: 50%;
    background: #e3ad68;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.game-remaster .ingame-bug-button {
    top: 14px;
    right: 18px;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(224, 235, 234, .64);
    border-radius: 5px;
    background: rgba(18, 34, 43, .87);
    color: #f1f4ef;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .2);
    font: 700 11px 'Libre Franklin', Arial, sans-serif;
    letter-spacing: .01em;
    text-transform: none;
    transition: background .16s ease, border-color .16s ease;
}
.game-remaster .ingame-bug-button:hover {
    border-color: var(--arena-accent);
    background: #283e49;
    color: #fff;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .2);
    transform: none;
}

.game-remaster .ingameskilldescription strong { font-weight: 800; }
.game-remaster .ingameskilldescription .skill-ref { color: #ffce8c; }
.game-remaster .ingameskilldescription .skill-term--damage { color: #f2aaa0; }
.game-remaster .ingameskilldescription .skill-term--healing { color: #a6dfba; }
.game-remaster .ingameskilldescription .skill-term--defense { color: #9ed6e3; }
.game-remaster .ingameskilldescription .skill-term--control { color: #d8b9f2; }
.game-remaster .ingameskilldescription .skill-term--resource { color: #a8cfff; }
.game-remaster .ingameskilldescription .skill-term--class { color: #d9e7e8; }

.game-remaster .ChakraChooseEndTurn,
.game-remaster .exchange_chakra {
    border-color: #74858a;
    box-shadow: 0 24px 54px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .08);
}
.game-remaster .ChakraChooseEndTurn::before,
.game-remaster .exchange_chakra::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 25px;
    width: 112px;
    height: 350px;
    border-radius: 5px;
    background: #0d1820 url('battle-chakra-panel.png?v=1') center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 8px 20px rgba(0, 0, 0, .35);
    pointer-events: none;
}
.game-remaster .exchange_chakra::before { background-image: url('battle-chakra-panel.png?v=1'); }
.game-remaster .ChakraChooseEndTurn .chakrachoose,
.game-remaster .exchange_chakra_title,
.game-remaster .exchange_chakra_subtitle { color: #f6e8d5; text-shadow: none; }
.game-remaster .chakrachoosered { color: #ef9d83; }
.game-remaster .ChakraChooseEndTurn .chakra-container,
.game-remaster .exchange_chakra_container { gap: 22px; }
.game-remaster .ChakraChooseEndTurn .chakra-column,
.game-remaster .ChakraChooseEndTurn .chakra-columnright,
.game-remaster .exchange_chakra_column {
    padding: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .045);
}
.game-remaster .chakra-title { color: #ebbf8a; text-shadow: none; }
.game-remaster .chakra-name,
.game-remaster .chakra-amount,
.game-remaster .exchange_chakra_row .chakra-name,
.game-remaster .exchange_chakra_row .chakra-amount { color: #ecf0ed; }
.game-remaster .ok-buttonendturn,
.game-remaster .ok-buttonexchange {
    height: 38px;
    border: 1px solid #efc58e;
    background: #e3ad68;
    color: #15212a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
    transition: background .16s ease, transform .16s ease;
}
.game-remaster .ok-buttonendturn:hover:not(:disabled),
.game-remaster .ok-buttonexchange:hover:not(:disabled) { background: #f0c58d; transform: translateY(-2px); }
.game-remaster .ok-buttonendturn:disabled,
.game-remaster .ok-buttonexchange:disabled { cursor: not-allowed; }
.game-remaster .cancel-buttonendturn,
.game-remaster .cancel-buttonexchange { text-decoration: none; }
.game-remaster .cancel-buttonendturn:hover,
.game-remaster .cancel-buttonexchange:hover { color: #f0c58d; border-bottom-color: #f0c58d; }
.game-remaster :is(.ok-buttonendturn, .ok-buttonexchange, .cancel-buttonendturn, .cancel-buttonexchange, .exchange_chakra_choice, .minus-button, .plus-button):focus-visible {
    outline: 2px solid var(--arena-accent);
    outline-offset: 3px;
}

.game-remaster .surrender-confirm-preview-image {
    border-radius: 5px;
    border: 1px solid #89999b;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.game-remaster .surrender-confirm {
    height: 365px;
    overflow: hidden;
    border-color: #7b8b8f;
    box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
}
.game-remaster .surrender-confirm-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 32px 26px;
    box-sizing: border-box;
}
.game-remaster .surrender-confirm-title {
    position: static;
    width: 100%;
    margin: 0 0 18px;
    font: 800 21px 'Libre Franklin', Arial, sans-serif;
    line-height: 1.25;
    letter-spacing: -.02em;
    text-align: center;
    color: #f4eee3;
}
.game-remaster .surrender-confirm-preview-row {
    width: 100%;
    display: flex;
    justify-content: center;
}
.game-remaster .surrender-confirm-preview-image {
    position: static;
    width: 314px;
    height: 204px;
    max-width: 100%;
}
.game-remaster .surrender-confirm-actions {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.game-remaster .surrender-confirm-ok,
.game-remaster .surrender-confirm-cancel {
    position: static;
    width: 138px;
    height: 38px;
    padding: 0 12px;
    font: 800 12px 'Libre Franklin', Arial, sans-serif;
    letter-spacing: .01em;
    cursor: pointer;
}
.game-remaster .surrender-confirm-ok {
    border-color: #dc9181;
    background: #b95b4b;
    color: #fffaf2;
}
.game-remaster .surrender-confirm-ok:hover { border-color: #edac9a; background: #ce6d5a; }
.game-remaster .surrender-confirm-cancel { background: #30434c; }
.game-remaster .battle-end-panel {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 860px;
    height: auto;
    min-height: 430px;
    max-height: calc(100% - 64px);
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    padding: 30px;
    box-sizing: border-box;
    overflow: auto;
    border-color: #687b83;
    background: linear-gradient(155deg, #263943, #111e27);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .55);
    filter: none;
}
.game-remaster .battle-end-overlay.visible { pointer-events: auto; }
.game-remaster .battle-end-overlay.is-defeat .battle-end-panel { min-height: 352px; }
.game-remaster .battle-end-portrait {
    position: static;
    width: 290px;
    height: 368px;
    align-self: stretch;
    object-fit: cover;
    border: 0;
    border-radius: 4px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
}
.game-remaster .battle-end-overlay.is-victory .battle-end-portrait {
    object-fit: contain;
    background: #0d1820;
}
.game-remaster .battle-end-overlay.is-defeat .battle-end-portrait { height: 290px; }
.game-remaster .battle-end-copy {
    position: static;
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 0 4px;
    box-sizing: border-box;
}
.game-remaster .battle-end-title {
    margin: 0 0 17px;
    color: #f0c58d;
    font: 800 52px/1 'Libre Franklin', Arial, sans-serif;
    letter-spacing: -.035em;
    text-align: left;
}
.game-remaster .battle-end-overlay.is-defeat .battle-end-title { color: #efa08e; }
.game-remaster .battle-end-message {
    margin: 0;
    font: 400 15px/1.5 'Libre Franklin', Arial, sans-serif;
    color: var(--arena-text);
    overflow-wrap: anywhere;
}
.game-remaster .battle-end-summary { gap: 15px; }
.game-remaster .battle-end-outcome {
    min-height: 0;
    font-size: 17px;
    line-height: 1.45;
    text-transform: none;
}
.game-remaster .battle-end-rewards { gap: 0; }
.game-remaster .battle-end-reward-row {
    min-height: 34px;
    padding: 5px 0;
    border: 0;
    border-bottom: 1px solid #465962;
    background: transparent;
}
.game-remaster .battle-end-reward-label { color: #becacb; }
.game-remaster .battle-end-reward-value { color: #f0c58d; font-weight: 700; }
.game-remaster .battle-end-unlocks {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b9c5c8;
    font-size: 13px;
    line-height: 1.4;
}
.game-remaster .battle-end-continue {
    position: static;
    transform: none;
    align-self: flex-start;
    min-width: 160px;
    min-height: 42px;
    margin-top: auto;
    padding: 9px 20px;
    border: 1px solid #efc58e;
    border-radius: 5px;
    background: #e3ad68;
    color: #15212a;
    font: 800 14px/1 'Libre Franklin', Arial, sans-serif;
    text-align: center;
}
.game-remaster .battle-end-continue:hover { background: #f0c58d; opacity: 1; }
.game-remaster .battle-end-continue:focus-visible { outline: 2px solid #f0c58d; outline-offset: 3px; }

/* Status pips share the battle panel's type, colors, and spacing. */
.game-remaster .skilltooltipimage {
    box-sizing: border-box;
    border: 1px solid #82969d;
    border-radius: 2px;
    background: #101b22;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .5);
}
.game-remaster .skilltooltipimage:hover { border-color: #efc28e; }
.game-remaster .skilltooltipimage.status-helpful {
    border-width: 2px;
    border-color: #42c969;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .65), 0 3px 6px rgba(0, 0, 0, .55);
}
.game-remaster .skilltooltipimage.status-harmful {
    border-width: 2px;
    border-color: #e94e4e;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .65), 0 3px 6px rgba(0, 0, 0, .55);
}
/* A one-time effect that has already fired: still there to read, clearly used up. */
.skilltooltipimage.status-spent {
    filter: grayscale(1) brightness(.6);
    opacity: .75;
}
.skilltooltipimage.status-spent:hover { filter: grayscale(1) brightness(.85); opacity: 1; }
.game-remaster .global-status-tooltip,
.game-remaster .status-tooltip-content {
    box-sizing: border-box;
    width: min(360px, calc(100vw - 16px));
    min-width: 0;
    max-width: none;
    max-height: min(480px, calc(100vh - 16px));
    overflow-y: auto;
    padding: 14px 16px;
    border: 1px solid #6e8188;
    border-radius: 7px;
    background: #192933;
    color: #e9eeeb;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .46);
    font: 400 12px/1.45 'Libre Franklin', Arial, sans-serif;
    scrollbar-color: #82959b #192933;
}
.game-remaster .status-tooltip-item + .status-tooltip-item,
.game-remaster .global-status-tooltip .status-tooltip-item + .status-tooltip-item {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #465b64;
}
.game-remaster .status-tooltip-title,
.game-remaster .global-status-tooltip .status-tooltip-title {
    margin: 0 0 8px;
    color: #efc28e;
    font: 800 13px/1.3 'Libre Franklin', Arial, sans-serif;
    letter-spacing: .01em;
    text-transform: none;
}
.game-remaster .status-tooltip-desc { gap: 6px; color: #e9eeeb; }
.game-remaster .status-tooltip-row { gap: 5px; }
.game-remaster .status-tooltip-effect {
    grid-template-columns: 6px minmax(0, 1fr);
    column-gap: 9px;
    padding: 3px 0;
}
.game-remaster .status-tooltip-effect + .status-tooltip-effect { border-top-color: #344953; }
.game-remaster .status-tooltip-bullet {
    width: 5px;
    height: 5px;
    margin-top: 6px;
    border-radius: 1px;
    background: #d99578;
    box-shadow: none;
}
.game-remaster .status-tooltip-desc-line,
.game-remaster .global-status-tooltip .status-tooltip-desc-line { color: #e9eeeb; font-weight: 400; overflow-wrap: break-word; }
.game-remaster .status-tooltip-emphasis { color: #f2a995; font-weight: 800; }
.game-remaster .status-tooltip-row-meta,
.game-remaster .status-tooltip-turns,
.game-remaster .global-status-tooltip .status-tooltip-row-meta,
.game-remaster .global-status-tooltip .status-tooltip-turns {
    margin: 4px 0 0 15px;
    padding: 4px 7px;
    border: 1px solid #687b83;
    border-radius: 3px;
    background: #263943;
    color: #e7d6c1;
    font: 700 10px/1 'Libre Franklin', Arial, sans-serif;
    letter-spacing: .02em;
}
.game-remaster .status-tooltip-line-divider { background: #465b64; margin: 7px 0; }

/* Chakra costs and pools use the same compact square marker. */
.game-remaster .energy-pip,
.game-remaster .chakra-box,
.game-remaster .exchange_chakra_choice,
.game-remaster .chakra-item.random-chakra .chakra-icon {
    border-radius: 2px !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .32);
}
.game-remaster .energy-pip { width: 12px; height: 12px; box-sizing: border-box; }
.game-remaster .chakra-box { box-sizing: border-box; border: 1px solid rgba(255, 255, 255, .35) !important; }
.game-remaster .chakra-box.green { background: linear-gradient(#4bd776, #208848) !important; }
.game-remaster .chakra-box.red { background: linear-gradient(#df6b66, #9d383c) !important; }
.game-remaster .chakra-box.blue { background: linear-gradient(#7775ea, #4146a7) !important; }
.game-remaster .chakra-box.white { background: linear-gradient(#f7f8f1, #b9c1bb) !important; }
.game-remaster .chakra-box.black { background: repeating-linear-gradient(135deg, #222b30 0 4px, #89949a 4px 8px) !important; }

/* Selection settings and service dialogs use the same restrained materials as the roster. */
.selection-client-page.game-remaster .shinobi-modal-overlay {
    background: rgba(7, 15, 20, .78) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}
.selection-client-page.game-remaster :is(.settings-modal-dialog, .quest-achieve-modal-card) {
    box-sizing: border-box !important;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px 26px !important;
    border: 1px solid #6a7d83 !important;
    border-radius: 9px !important;
    background: #172832 !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55) !important;
    color: #eef1eb !important;
    scrollbar-color: #738991 #172832;
}
.selection-client-page.game-remaster .settings-modal-header {
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom-color: #425862;
}
.selection-client-page.game-remaster .settings-modal-crest {
    border: 1px solid #748993;
    border-radius: 6px;
    background: #263b45;
    box-shadow: none;
}
.selection-client-page.game-remaster .settings-modal-crest polygon { stroke: #e3ad68 !important; }
.selection-client-page.game-remaster .settings-modal-crest text { fill: #f0d2a6 !important; }
.selection-client-page.game-remaster .settings-modal-title {
    color: #f1e8dc !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    text-transform: none !important;
    letter-spacing: -.02em !important;
    text-shadow: none;
}
.selection-client-page.game-remaster .settings-modal-subtitle { color: #bbcccf !important; font-weight: 500 !important; }
.selection-client-page.game-remaster .settings-modal-close,
.selection-client-page.game-remaster .shinobi-modal-close {
    border: 1px solid #6d8189;
    border-radius: 5px;
    background: #263b45;
    color: #e9edeb;
    box-shadow: none;
}
.selection-client-page.game-remaster :is(.settings-modal-close, .shinobi-modal-close):hover { border-color: #e3ad68; background: #344b55; color: #fff; transform: none; }
.selection-client-page.game-remaster :is(.settings-modal-close, .shinobi-modal-close, .settings-slider, .settings-hub-card-btn):focus-visible {
    outline: 2px solid #e3ad68 !important;
    outline-offset: 2px;
}
.selection-client-page.game-remaster .settings-section-card,
.selection-client-page.game-remaster .settings-section-card.sound-card {
    margin: 0;
    padding: 14px 0;
    border: 0;
    border-top: 1px solid #40555e;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.selection-client-page.game-remaster .settings-modal-content .settings-section-card:first-child { padding-top: 0; border-top: 0; }
.selection-client-page.game-remaster .settings-modal-content .settings-section-card:last-child { padding-bottom: 0; }
.selection-client-page.game-remaster .settings-section-title {
    margin-bottom: 10px !important;
    color: #e7be8b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .04em !important;
}
.selection-client-page.game-remaster .audio-name { color: #ecf0ed !important; font-size: 12px !important; letter-spacing: .02em !important; }
.selection-client-page.game-remaster .audio-val-badge {
    padding: 4px 8px;
    border: 1px solid #70848b;
    border-radius: 4px;
    background: #253a44;
    color: #f0d0a0;
    box-shadow: none;
    font-variant-numeric: tabular-nums;
}
.selection-client-page.game-remaster .slider-endpoint-label { color: #bac9cc; }
.selection-client-page.game-remaster .settings-slider {
    height: 7px;
    border: 1px solid #5f747c;
    background: #0f1d25;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .32);
    accent-color: #e3ad68;
}
.selection-client-page.game-remaster .settings-slider:hover { border-color: #e3ad68; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .32); }
.selection-client-page.game-remaster .settings-slider::-webkit-slider-thumb { background: #e3ad68; border-color: #f2dfc3; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); }
.selection-client-page.game-remaster .settings-hub-card-btn {
    min-height: 58px;
    border: 1px solid #50656e !important;
    border-radius: 5px !important;
    background: #20343e !important;
    box-shadow: none !important;
}
.selection-client-page.game-remaster .settings-hub-card-btn:hover,
.selection-client-page.game-remaster .settings-hub-card-btn.practice:hover,
.selection-client-page.game-remaster .settings-hub-card-btn.bug:hover {
    border-color: #e3ad68 !important;
    background: #2b424c !important;
    box-shadow: none !important;
}
.selection-client-page.game-remaster .card-crest-badge { border: 1px solid #68808a !important; border-radius: 5px !important; background: #192b34 !important; color: #e7bd88 !important; }
.selection-client-page.game-remaster .card-text-wrap span { color: #beccce !important; }
.selection-client-page.game-remaster .card-text-wrap .reward-ready { display: inline-block; color: #1d2a31 !important; font-size: 9px !important; font-weight: 900 !important; line-height: 1.5; overflow: visible !important; }
.selection-client-page.game-remaster .card-text-wrap .reward-ready[hidden] { display: none; }
.selection-client-page.game-remaster .card-arrow { color: #c9d5d5 !important; opacity: 1 !important; }
.selection-client-page.game-remaster .quest-subtabs { border-color: #4c636d; border-radius: 6px; background: #20343e; }
.selection-client-page.game-remaster .quest-tab-btn.active { background: #344b55; color: #f1d1a1; box-shadow: none; }

/* Shop borders sit over battle avatars; an equipped title replaces the rank on nameplates. */
.battle-avatar-frame { position: relative; display: inline-block; flex: none; line-height: 0; }
.battle-avatar-frame > img:first-child { display: block; }
.battle-avatar-border { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.game-remaster .player-status.is-equipped-title { color: #f0b866; }

/* Borders are frames: let them hang past the avatar instead of being clipped. */
.player-avatar-frame { overflow: visible !important; }
.player-avatar-border-overlay, .battle-avatar-border { z-index: 3; }

/* In-battle profile summary: readable light-on-dark stats, equipped title and avatar border. */
.game-remaster .profile-avatar-box { position: relative; overflow: visible; border: 1px solid #71858e; background: #0e1a22; }
.game-remaster .profile-avatar-img { border-radius: 3px; }
.profile-avatar-border { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.game-remaster .profile-details-column { margin-left: 20px; }
.game-remaster .profile-username { font-size: 19px; letter-spacing: .03em; }
.game-remaster .profile-rank-badge {
    margin: 4px 0 8px;
    padding: 0 0 5px;
    border-bottom: 1px solid #4a5f68;
    color: #dbe4e2;
    font-size: 11px;
    letter-spacing: .08em;
}
.game-remaster .profile-rank-badge.is-equipped-title { color: #f0b866; }
.game-remaster .profile-stats-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; }
.game-remaster .profile-stat-item { display: contents; }
.game-remaster .profile-lbl { color: #9fb2b8; font-size: 10px; letter-spacing: .08em; line-height: 16px; }
.game-remaster .profile-val { color: #f1f3ee; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-remaster .profile-team-header { margin-bottom: 6px; color: #b9c8cc; font-size: 10px; letter-spacing: .1em; text-shadow: none; }
.game-remaster .profile-team-face-box { border: 1px solid #71858e; }

/* Elite encounters: ink, bone and a single vermilion. The seal is a hanko stamp,
   set slightly off-square the way a hand-pressed stamp lands. */
:root {
    --elite-ink: #100e0d;
    --elite-bone: #efe6d4;
    --elite-vermilion: #c2362b;
    --elite-vermilion-deep: #8f241c;
}
.game-remaster .elite-seal {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    box-sizing: border-box;
    border: 2px solid var(--elite-bone);
    border-radius: 3px;
    background: var(--elite-vermilion);
    color: var(--elite-bone);
    font: 700 15px/1 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', 'MS Mincho', serif;
    letter-spacing: .02em;
    writing-mode: vertical-rl;
    transform: rotate(-4deg);
    outline: 2px solid var(--elite-vermilion);
    outline-offset: 0;
}

/* Matchmaking: the found screen turns to ink with the seal in place of the check. */
.game-remaster .searchingscroll.is-elite {
    border-color: var(--elite-vermilion-deep);
    background: var(--elite-ink);
}
.game-remaster .searchingscroll.is-elite .match-dialog-kicker { color: #d9a59c; }
.game-remaster .searchingscroll.is-elite .searching {
    color: var(--elite-bone);
    letter-spacing: .01em;
}
.game-remaster .searchingscroll.is-elite .searching-detail { color: #c9bfae; max-width: 34ch; margin-inline: auto; }
.game-remaster .searchingscroll.is-elite .match-search-ring { border-color: rgba(194, 54, 43, .55); }
.game-remaster .searchingscroll.is-elite .match-search-ring-outer::before,
.game-remaster .searchingscroll.is-elite .match-search-ring-outer::after { background: var(--elite-vermilion); box-shadow: none; }
.game-remaster .searchingscroll.is-elite .match-search-found-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    box-sizing: border-box;
    border: 2px solid var(--elite-bone);
    border-radius: 3px;
    background: var(--elite-vermilion);
    color: var(--elite-bone);
    font: 700 21px/1 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', 'MS Mincho', serif;
    writing-mode: vertical-rl;
    transform: rotate(-4deg);
    animation: elite-stamp .38s cubic-bezier(.2, .9, .3, 1.25) both;
}
.game-remaster .searchingscroll.is-elite .match-search-footer { border-top-color: rgba(194, 54, 43, .35); }
.game-remaster .searchingscroll.is-elite .match-search-opening { color: #d9a59c; }

/* Battle intro: a torn ink band across the field, read in a few seconds. */
.elite-encounter-band {
    position: fixed;
    left: 0;
    right: 0;
    top: 38%;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 26px 24px 28px;
    background: var(--elite-ink);
    color: var(--elite-bone);
    clip-path: polygon(0 9%, 6% 0, 19% 6%, 33% 1%, 48% 7%, 63% 0, 79% 5%, 92% 1%, 100% 8%,
        100% 90%, 94% 100%, 81% 94%, 66% 99%, 51% 93%, 36% 100%, 21% 94%, 8% 99%, 0 92%);
    cursor: pointer;
    animation: elite-band-in .55s cubic-bezier(.2, .8, .2, 1) both;
}
.elite-encounter-band::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--elite-vermilion-deep);
    opacity: .6;
    z-index: -1;
}
.elite-encounter-band.is-leaving { animation: elite-band-out .45s ease-in both; }
.elite-encounter-band .elite-seal { width: 58px; height: 58px; font-size: 19px; flex: none; }
.elite-band-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 6px 14px;
    background: var(--elite-ink);
    font-family: 'Libre Franklin', Arial, sans-serif;
}
.elite-band-kicker {
    color: #d9a59c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.elite-band-name {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
}
.elite-band-stakes { color: #c9bfae; font-size: 13px; line-height: 1.4; }

/* HUD: the boss's side carries the vermilion. */
.game-remaster.is-elite-encounter .player-right .player-name { color: #ef8f82; }
.game-remaster.is-elite-encounter .player-right .player-status,
.game-remaster.is-elite-encounter .player-right .player-status.is-equipped-title {
    color: var(--elite-bone);
    letter-spacing: .18em;
    text-transform: uppercase;
}
.game-remaster.is-elite-encounter .player-avatar-right { outline: 2px solid var(--elite-vermilion); outline-offset: 1px; }
.game-remaster.is-elite-encounter .enemy-characters .character-face {
    box-shadow: inset 0 0 0 2px var(--elite-vermilion-deep);
    outline: 1px solid var(--elite-vermilion);
}

/* End screen. */
.game-remaster .battle-end-overlay.is-elite .battle-end-panel {
    border-color: var(--elite-vermilion-deep);
    background: var(--elite-ink);
}
.game-remaster .battle-end-overlay.is-elite .battle-end-title { color: var(--elite-bone); }
.game-remaster .battle-end-overlay.is-elite.is-victory .battle-end-reward-value { color: #ef8f82; }
.game-remaster .battle-end-overlay.is-elite .battle-end-reward-row { border-bottom-color: #3a2a26; }
.game-remaster .battle-end-overlay.is-elite .battle-end-summary { position: relative; padding-right: 64px; }
.game-remaster .battle-end-overlay.is-elite .elite-seal-stamp {
    position: absolute;
    top: -66px;
    right: 0;
    animation: elite-stamp .38s .25s cubic-bezier(.2, .9, .3, 1.25) both;
}
.game-remaster .battle-end-overlay.is-elite.is-defeat .elite-seal-stamp { filter: grayscale(.65); opacity: .8; }
.game-remaster .battle-end-overlay.is-elite .battle-end-continue {
    border-color: var(--elite-bone);
    background: var(--elite-bone);
    color: var(--elite-ink);
}
.game-remaster .battle-end-overlay.is-elite .battle-end-continue:hover { background: #fff8ea; }

@keyframes elite-stamp {
    0% { transform: rotate(-4deg) scale(1.6); opacity: 0; }
    70% { transform: rotate(-4deg) scale(.94); opacity: 1; }
    100% { transform: rotate(-4deg) scale(1); opacity: 1; }
}
@keyframes elite-band-in {
    from { clip-path: polygon(0 9%, 0 9%, 0 92%, 0 92%); opacity: .4; }
}
@keyframes elite-band-out {
    to { opacity: 0; transform: translateY(-8px); }
}
@media (max-width: 640px) {
    .elite-encounter-band { gap: 14px; padding: 20px 16px 22px; }
    .elite-encounter-band .elite-seal { width: 44px; height: 44px; font-size: 15px; }
    .elite-band-name { font-size: 24px; }
    .elite-band-stakes { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .elite-encounter-band,
    .elite-encounter-band.is-leaving,
    .game-remaster .searchingscroll.is-elite .match-search-found-icon,
    .game-remaster .battle-end-overlay.is-elite .elite-seal-stamp { animation: none; }
}

/* ---------------------------------------------------------------- Tower battles
   A compact panel with the floor, enemy affixes and the boss's telegraphed technique.
   It floats over the board without moving any of the fixed layout. */
.tower-battle-panel {
    position: fixed;
    left: 50%;
    top: 12px;
    z-index: 800;
    transform: translateX(-50%);
    width: min(440px, calc(100vw - 24px));
    padding: 8px 12px 9px;
    border: 1px solid #4b5f69;
    border-radius: 6px;
    background: rgba(13, 22, 28, .93);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
    color: var(--arena-text);
    font: 400 12px/1.35 'Libre Franklin', sans-serif;
    pointer-events: auto;
}
.tower-battle-panel.is-boss { border-color: #a0332c; background: rgba(36, 12, 12, .94); }
.tower-panel-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tower-panel-floor { padding: 1px 7px; border-radius: 3px; background: #e3ad68; color: #1b1209; font-weight: 800; font-size: 11px; white-space: nowrap; }
.tower-battle-panel.is-boss .tower-panel-floor { background: #ff5a4f; color: #1d0605; }
.tower-panel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.tower-panel-phase { margin-left: auto; color: #ff9a8f; font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tower-affixes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tower-affix-chip { padding: 1px 6px; border-radius: 3px; border: 1px solid #7a3a44; color: #ffc6cf; font-size: 10.5px; font-weight: 700; cursor: help; }
.tower-intent { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }
.tower-intent-label { display: block; color: #ff9a8f; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tower-intent-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.tower-intent-icon { width: 30px; height: 30px; border-radius: 3px; border: 1px solid #a0332c; flex: none; object-fit: cover; }
.tower-intent-text { font-weight: 700; font-size: 12.5px; }
.tower-intent-hint { display: block; margin-top: 3px; color: #b9c5c8; font-size: 10.5px; }
.tower-intent.is-empty .tower-intent-text { color: #b9c5c8; font-weight: 400; }
.tower-encounter-band .elite-seal { font-size: 22px; }
/* Inside the battle stage the panel sits in the open column over the decorative render,
   between the skill rows and the enemy status icons, and scales with the board. */
.game-remaster .backgroundingame > .tower-battle-panel {
    position: absolute;
    left: 704px;
    top: 170px;
    z-index: 6;
    width: 178px;
    transform: none;
    padding: 8px 10px;
}
.game-remaster .backgroundingame > .tower-battle-panel .tower-panel-head { flex-wrap: wrap; row-gap: 3px; }
.game-remaster .backgroundingame > .tower-battle-panel .tower-panel-name { white-space: normal; flex-basis: 100%; }
.game-remaster .backgroundingame > .tower-battle-panel .tower-panel-phase { margin-left: 0; }
.game-remaster .backgroundingame > .tower-battle-panel .tower-intent-row { align-items: flex-start; }
/* The Tower tab is a link out of the hub; five tabs share the space four used to. */
.game-remaster .selection-hub-tabs:has(.selection-hub-tab-tower) .selection-hub-tab { width: 128px; }
.selection-hub-tab-tower { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.selection-hub-tab-new { padding: 1px 5px; border-radius: 3px; background: #e3ad68; color: #1b1209; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.tower-battle-panel { animation: tower-panel-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.tower-intent.is-fresh { animation: tower-intent-flash 1.2s ease-out; border-radius: 4px; }
.tower-battle-panel.is-boss .tower-intent-icon { box-shadow: 0 0 10px rgba(255, 90, 79, .45); }
@keyframes tower-panel-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes tower-intent-flash {
    0% { background: rgba(255, 90, 79, .35); }
    100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .tower-battle-panel, .tower-intent.is-fresh { animation: none; }
}

/* ---- Tooltips: chips, durations, allegiance, details on demand ---------------------------- */
/* The page body is uppercase in style.css; tooltip and skill text read in sentence case. */
.game-remaster .global-status-tooltip,
.game-remaster .status-tooltip-content,
.keyword-popover { text-transform: none; }
.game-remaster .status-tooltip-item { padding-left: 10px; border-left: 1px solid #5d7079; }
.game-remaster .status-tooltip-item--ally { border-left-color: #42c969; }
.game-remaster .status-tooltip-item--enemy { border-left-color: #e94e4e; }
.game-remaster .status-tooltip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.game-remaster .status-tooltip-icon {
    flex: none; width: 26px; height: 26px; border-radius: 3px; object-fit: cover;
    border: 1px solid #687b83;
}
.game-remaster .status-tooltip-head .status-tooltip-title,
.game-remaster .global-status-tooltip .status-tooltip-head .status-tooltip-title { margin: 0; flex: 1 1 auto; min-width: 0; }
.game-remaster .status-tooltip-hidden {
    flex: none; padding: 2px 6px; border: 1px dashed #9fb3ba; border-radius: 3px;
    color: #d7e2e4; font: 700 11px/1.2 'Libre Franklin', Arial, sans-serif;
}
.game-remaster .status-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
/* The skill panel has a fixed height: its facts share the title line and never wrap into the meta bar. */
.game-remaster .skill-info-titlerow { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0 0 3px; }
.game-remaster .skill-info-titlerow .ingameskillname { flex: 0 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-remaster .skill-info-facts { display: flex; flex: 1 1 auto; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; }
.game-remaster .skill-info-facts .status-chip { flex: none; padding: 1px 6px; white-space: nowrap; }
.game-remaster .status-chip {
    display: inline-flex; align-items: baseline; gap: 3px; padding: 3px 7px;
    border: 1px solid #5d7079; border-radius: 3px; background: #22343e;
    color: #eef3f1; font: 700 11px/1.3 'Libre Franklin', Arial, sans-serif; text-transform: none;
}
.game-remaster .status-chip--good { border-color: #3f9d67; background: #1d3a2d; color: #c9f2d8; }
.game-remaster .status-chip--bad { border-color: #b65a52; background: #3d2226; color: #ffd3cc; }
.game-remaster .status-chip--tag { background: transparent; color: #d4e0e2; font-weight: 600; }
.game-remaster .status-chip-note { color: #b9c9cc; font-weight: 500; }
/* Compact view: the duration is a quiet line under the chips, not a boxed label. */
.game-remaster .global-status-tooltip .status-tooltip-row-meta.status-tooltip-duration {
    display: block; margin: 0; padding: 0; border: 0; background: none;
    color: #b9c9cc; font: 600 11px/1.35 'Libre Franklin', Arial, sans-serif;
}
.game-remaster .global-status-tooltip .status-tooltip-row-meta { text-transform: none; }
.game-remaster .status-tooltip-details { display: none; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #465b64; }
.game-remaster .global-status-tooltip.is-expanded .status-tooltip-details { display: block; }
.game-remaster .status-tooltip-source { margin: 0 0 6px; color: #d9e3e3; font-size: 11.5px; }
.game-remaster .status-tooltip-source span { color: #efc28e; font-weight: 700; }
.game-remaster .status-tooltip-glossary { margin: 6px 0 0; padding-left: 16px; color: #c7d4d6; font-size: 11px; }
.game-remaster .status-tooltip-glossary li + li { margin-top: 2px; }
.game-remaster .status-tooltip-more {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 8px;
    border: 1px solid #687b83; border-radius: 3px; background: #22343e; color: #e7d6c1;
    font: 700 11px/1.2 'Libre Franklin', Arial, sans-serif; text-transform: none; cursor: pointer;
}
.game-remaster .status-tooltip-more:hover,
.game-remaster .status-tooltip-more:focus-visible { border-color: #efc28e; outline: none; }
.game-remaster .status-tooltip-more kbd {
    padding: 0 4px; border: 1px solid #687b83; border-radius: 2px; color: #b9c9cc;
    font: 600 11px/1.3 'Libre Franklin', Arial, sans-serif;
}
.game-remaster .status-tooltip-more-open,
.game-remaster .global-status-tooltip.is-expanded .status-tooltip-more-closed { display: none; }
.game-remaster .global-status-tooltip.is-expanded .status-tooltip-more-open { display: inline; }
@media (hover: none) { .game-remaster .status-tooltip-more kbd { display: none; } }

/* Rules keywords with a definition: dotted underline, popover on hover, focus or tap. */
.has-definition { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.has-definition:focus-visible { outline: 1px solid #efc28e; outline-offset: 1px; }
.keyword-popover {
    position: fixed; z-index: 100000; display: none; max-width: min(280px, calc(100vw - 16px));
    padding: 7px 9px; border: 1px solid #6e8188; border-radius: 5px; background: #192933;
    color: #e9eeeb; box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
    font: 500 12px/1.4 'Libre Franklin', Arial, sans-serif; pointer-events: none;
}

/* ---- Settings panel (hub) ------------------------------------------------------------------
   A game settings screen in the remaster's own materials: slate panel, warm amber accent,
   drawn icons, real headings in sentence case. Scoped to #settings-modal so the other hub
   dialogs that share the older settings-* classes are untouched. */
.selection-client-page.game-remaster #settings-modal .arena-settings {
    --as-line: #34484f;
    --as-raised: #1d313b;
    --as-raised-hover: #253c47;
    --as-edge: #50656e;
    --as-text: #eef1eb;
    --as-muted: #b5c4c7;
    --as-accent: #e3ad68;
    --as-accent-soft: #f2dfc3;
    width: min(480px, 100%) !important;
    max-width: 480px !important;
    padding: 0 !important;
    overflow-x: hidden;
    border-radius: 10px !important;
    /* The battle panels' own material, so settings reads as part of the game. */
    background: linear-gradient(155deg, #22333d 0%, var(--arena-surface) 48%, var(--arena-surface-low) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 60px rgba(0, 0, 0, .55) !important;
    text-transform: none;
    letter-spacing: 0;
    animation: as-enter 220ms cubic-bezier(.16, 1, .3, 1);
}
.selection-client-page.game-remaster #settings-modal .arena-settings * { text-transform: none; }
.selection-client-page.game-remaster #settings-modal .arena-settings ::selection { background: #6b4a22; color: #fff6e8; }
@keyframes as-enter {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .selection-client-page.game-remaster #settings-modal .arena-settings { animation: none; }
}

.selection-client-page.game-remaster #settings-modal .as-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 16px;
}
.selection-client-page.game-remaster #settings-modal .as-title {
    margin: 0 !important;
    color: #f1e8dc !important;
    font: 700 21px/1.2 'Libre Franklin', Arial, sans-serif !important;
    letter-spacing: -.015em !important;
}
.selection-client-page.game-remaster #settings-modal .as-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    padding: 0;
    border: 1px solid var(--as-edge);
    border-radius: 6px;
    background: var(--as-raised);
    color: var(--as-text);
    cursor: pointer;
    transition: border-color 140ms ease-out, background-color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-close:hover { border-color: var(--as-accent); background: var(--as-raised-hover); }
.selection-client-page.game-remaster #settings-modal svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.selection-client-page.game-remaster #settings-modal .as-section {
    padding: 18px 20px 20px;
    border-top: 1px solid var(--as-line);
}
.selection-client-page.game-remaster #settings-modal .as-section-title {
    margin: 0 0 12px !important;
    color: var(--as-accent-soft) !important;
    font: 700 14px/1.3 'Libre Franklin', Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

/* Audio: mute toggle, name, slider with a filled track, and a tabular readout. */
.selection-client-page.game-remaster #settings-modal .as-audio { display: grid; gap: 14px; }
.selection-client-page.game-remaster #settings-modal .as-audio-row {
    display: grid;
    grid-template-columns: 34px minmax(96px, 1fr) minmax(120px, 1.6fr) 40px;
    align-items: center;
    column-gap: 12px;
    transition: opacity 160ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-mute {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--as-edge);
    border-radius: 6px;
    background: var(--as-raised);
    color: var(--as-accent);
    cursor: pointer;
    transition: border-color 140ms ease-out, background-color 140ms ease-out, color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-mute:hover { border-color: var(--as-accent); background: var(--as-raised-hover); }
.selection-client-page.game-remaster #settings-modal .as-mute .as-slash { display: none; }
.selection-client-page.game-remaster #settings-modal .as-mute[aria-pressed="true"] { color: var(--as-muted); }
.selection-client-page.game-remaster #settings-modal .as-mute[aria-pressed="true"] .as-slash { display: inline; }
.selection-client-page.game-remaster #settings-modal .as-mute[aria-pressed="true"] .as-wave { display: none; }
.selection-client-page.game-remaster #settings-modal .as-audio-label { display: grid; gap: 1px; min-width: 0; cursor: pointer; }
.selection-client-page.game-remaster #settings-modal .as-audio-name {
    color: var(--as-text) !important;
    font: 700 13.5px/1.25 'Libre Franklin', Arial, sans-serif !important;
}
.selection-client-page.game-remaster #settings-modal .as-audio-hint {
    color: var(--as-muted) !important;
    font: 400 11.5px/1.3 'Libre Franklin', Arial, sans-serif !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.selection-client-page.game-remaster #settings-modal .as-audio-value {
    color: var(--as-accent-soft);
    font: 700 12.5px/1 'Libre Franklin', Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.selection-client-page.game-remaster #settings-modal .as-audio-row.is-muted .as-audio-value { color: var(--as-muted); }
/* Music and Effects are shares of Master: with Master off they read as inactive. */
.selection-client-page.game-remaster #settings-modal .arena-settings.is-master-muted .as-audio-row:not([data-sound-channel="volume"]) { opacity: .5; }

.selection-client-page.game-remaster #settings-modal .as-slider {
    --fill: 0%;
    width: 100%;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.selection-client-page.game-remaster #settings-modal .as-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--as-accent) var(--fill), #0e1b22 var(--fill));
    box-shadow: inset 0 0 0 1px #3d525a;
}
.selection-client-page.game-remaster #settings-modal .as-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #0e1b22;
    box-shadow: inset 0 0 0 1px #3d525a;
}
.selection-client-page.game-remaster #settings-modal .as-slider::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: var(--as-accent);
}
.selection-client-page.game-remaster #settings-modal .as-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -5px;
    border: 2px solid var(--as-accent);
    border-radius: 50%;
    background: var(--as-accent-soft);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
    -webkit-appearance: none;
    appearance: none;
    transition: transform 120ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 2px solid var(--as-accent);
    border-radius: 50%;
    background: var(--as-accent-soft);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}
.selection-client-page.game-remaster #settings-modal .as-slider:hover::-webkit-slider-thumb { transform: scale(1.12); }
.selection-client-page.game-remaster #settings-modal .as-audio-row.is-muted .as-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #6f8188 var(--fill), #0e1b22 var(--fill));
}
.selection-client-page.game-remaster #settings-modal .as-audio-row.is-muted .as-slider::-webkit-slider-thumb {
    border-color: #8a9ba0;
    background: #c9d3d4;
}

/* Practice & support: one grouped list, not a grid of cards. */
.selection-client-page.game-remaster #settings-modal .as-list {
    overflow: hidden;
    border: 1px solid var(--as-line);
    border-radius: 8px;
}
.selection-client-page.game-remaster #settings-modal .as-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 0;
    background: var(--as-raised);
    color: var(--as-text);
    text-align: left;
    cursor: pointer;
    transition: background-color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-list-row + .as-list-row { border-top: 1px solid var(--as-line); }
.selection-client-page.game-remaster #settings-modal .as-list-row:hover { background: var(--as-raised-hover); }
.selection-client-page.game-remaster #settings-modal .as-list-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid var(--as-edge);
    border-radius: 6px;
    background: #172832;
    color: var(--as-accent);
}
.selection-client-page.game-remaster #settings-modal .as-list-text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.selection-client-page.game-remaster #settings-modal .as-list-text strong {
    color: var(--as-text) !important;
    font: 700 13.5px/1.25 'Libre Franklin', Arial, sans-serif !important;
}
.selection-client-page.game-remaster #settings-modal .as-list-text span {
    color: var(--as-muted) !important;
    font: 400 12px/1.35 'Libre Franklin', Arial, sans-serif !important;
}
.selection-client-page.game-remaster #settings-modal .as-chevron {
    flex: none;
    color: #9fb1b5;
    transition: transform 140ms ease-out, color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-list-row:hover .as-chevron { color: var(--as-accent); transform: translateX(2px); }

.selection-client-page.game-remaster #settings-modal :is(.as-close, .as-mute, .as-slider, .as-list-row):focus-visible {
    outline: 2px solid var(--as-accent);
    outline-offset: 2px;
}
.selection-client-page.game-remaster #settings-modal .as-list-row:focus-visible { outline-offset: -2px; }

/* Phones: the label sits above its slider so the track keeps a usable width. */
@media (max-width: 460px) {
    .selection-client-page.game-remaster #settings-modal .as-header { padding: 16px 16px 14px; }
    .selection-client-page.game-remaster #settings-modal .as-section { padding: 16px; }
    .selection-client-page.game-remaster #settings-modal .as-audio-row {
        grid-template-columns: 34px minmax(0, 1fr) 40px;
        grid-template-areas: "mute label value" "mute slider slider";
        row-gap: 4px;
    }
    .selection-client-page.game-remaster #settings-modal .as-mute { grid-area: mute; align-self: start; }
    .selection-client-page.game-remaster #settings-modal .as-audio-label { grid-area: label; }
    .selection-client-page.game-remaster #settings-modal .as-audio-value { grid-area: value; }
    .selection-client-page.game-remaster #settings-modal .as-slider { grid-area: slider; }
}

/* Settings panel: bug report view. */
.selection-client-page.game-remaster #settings-modal [hidden] { display: none !important; }
.selection-client-page.game-remaster #settings-modal .as-title { flex: 1 1 auto; min-width: 0; }
.selection-client-page.game-remaster #settings-modal .as-back {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    margin-right: -4px;
    padding: 0;
    border: 1px solid var(--as-edge);
    border-radius: 6px;
    background: var(--as-raised);
    color: var(--as-text);
    cursor: pointer;
    transition: border-color 140ms ease-out, background-color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-back:hover { border-color: var(--as-accent); background: var(--as-raised-hover); }
.selection-client-page.game-remaster #settings-modal .as-bug-form { display: grid; gap: 16px; }
.selection-client-page.game-remaster #settings-modal .as-field { display: grid; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.selection-client-page.game-remaster #settings-modal .as-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.selection-client-page.game-remaster #settings-modal .as-field-label {
    padding: 0;
    color: var(--as-text) !important;
    font: 700 13px/1.3 'Libre Franklin', Arial, sans-serif !important;
}
.selection-client-page.game-remaster #settings-modal .as-count {
    color: var(--as-muted) !important;
    font: 400 11.5px/1 'Libre Franklin', Arial, sans-serif !important;
    font-variant-numeric: tabular-nums;
}
.selection-client-page.game-remaster #settings-modal .as-field-note {
    margin: 0;
    color: var(--as-muted) !important;
    font: 400 11.5px/1.4 'Libre Franklin', Arial, sans-serif !important;
}
.selection-client-page.game-remaster #settings-modal .as-segments {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.selection-client-page.game-remaster #settings-modal .as-segment { position: relative; display: block; cursor: pointer; }
.selection-client-page.game-remaster #settings-modal .as-segment input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.selection-client-page.game-remaster #settings-modal .as-segment span {
    display: block;
    padding: 8px 6px;
    border: 1px solid var(--as-edge);
    border-radius: 6px;
    background: var(--as-raised);
    color: var(--as-muted) !important;
    font: 700 12.5px/1.2 'Libre Franklin', Arial, sans-serif !important;
    text-align: center;
    transition: border-color 140ms ease-out, background-color 140ms ease-out, color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-segment:hover span { border-color: #6f848c; color: var(--as-text) !important; }
.selection-client-page.game-remaster #settings-modal .as-segment input:checked + span {
    border-color: var(--as-accent);
    background: #3a2e1f;
    color: var(--as-accent-soft) !important;
}
.selection-client-page.game-remaster #settings-modal .as-segment input:focus-visible + span { outline: 2px solid var(--as-accent); outline-offset: 2px; }
.selection-client-page.game-remaster #settings-modal .as-input {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid var(--as-edge);
    border-radius: 6px;
    background: #0f1c23;
    color: var(--as-text);
    font: 400 13px/1.45 'Libre Franklin', Arial, sans-serif;
    caret-color: var(--as-accent);
    transition: border-color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-input::placeholder { color: #8fa2a7; opacity: 1; }
.selection-client-page.game-remaster #settings-modal .as-input:hover { border-color: #6f848c; }
.selection-client-page.game-remaster #settings-modal .as-input:focus { border-color: var(--as-accent); outline: none; }
.selection-client-page.game-remaster #settings-modal .as-textarea { min-height: 112px; resize: vertical; }
.selection-client-page.game-remaster #settings-modal .as-form-status:empty { display: none; }
.selection-client-page.game-remaster #settings-modal .as-form-status {
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #8f4a44;
    border-radius: 6px;
    background: #3a2226;
    color: #ffd6cf !important;
    font: 400 12.5px/1.4 'Libre Franklin', Arial, sans-serif !important;
}
.selection-client-page.game-remaster #settings-modal .as-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.selection-client-page.game-remaster #settings-modal .as-button {
    min-height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    font: 700 13px/1 'Libre Franklin', Arial, sans-serif !important;
    cursor: pointer;
    transition: border-color 140ms ease-out, background-color 140ms ease-out, color 140ms ease-out;
}
.selection-client-page.game-remaster #settings-modal .as-button--quiet {
    border: 1px solid var(--as-edge);
    background: var(--as-raised);
    color: var(--as-text) !important;
}
.selection-client-page.game-remaster #settings-modal .as-button--quiet:hover { border-color: var(--as-accent); background: var(--as-raised-hover); }
.selection-client-page.game-remaster #settings-modal .as-button--primary {
    border: 1px solid var(--as-accent);
    background: var(--as-accent);
    color: #1d1408 !important;
}
.selection-client-page.game-remaster #settings-modal .as-button--primary:hover { background: #ecbd80; }
.selection-client-page.game-remaster #settings-modal .as-button:disabled { opacity: .6; cursor: wait; }
.selection-client-page.game-remaster #settings-modal :is(.as-back, .as-button):focus-visible { outline: 2px solid var(--as-accent); outline-offset: 2px; }
.selection-client-page.game-remaster #settings-modal .as-bug-done { display: grid; justify-items: center; gap: 6px; padding-top: 28px; text-align: center; }
.selection-client-page.game-remaster #settings-modal .as-done-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
    border: 1px solid #3f9d67;
    border-radius: 50%;
    background: #1d3a2d;
    color: #a8ebc2;
}
.selection-client-page.game-remaster #settings-modal .as-done-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.selection-client-page.game-remaster #settings-modal .as-done-title { margin: 0; color: var(--as-text) !important; font: 700 16px/1.3 'Libre Franklin', Arial, sans-serif !important; }
.selection-client-page.game-remaster #settings-modal .as-done-text { margin: 0 0 12px; color: var(--as-muted) !important; font: 400 13px/1.4 'Libre Franklin', Arial, sans-serif !important; }
.selection-client-page.game-remaster #settings-modal .as-bug-done .as-form-actions { justify-content: center; }
@media (max-width: 460px) {
    .selection-client-page.game-remaster #settings-modal .as-segments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.selection-client-page.game-remaster #settings-modal fieldset.as-field > legend { margin-bottom: 7px; }
