/* v183: clear anime UI outlines and flat cel shading. Saved frame IDs stay intact. */
body.v175-illustrated-profile-frames #v105-home-profile-button,
body.v175-illustrated-profile-frames #v105-profile-preview { isolation:isolate; }
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-home-profile-button,
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview {
    overflow:visible !important;clip-path:none !important;border:1px solid color-mix(in srgb,var(--v105-frame-main) 25%,#1a1b20) !important;
    border-radius:8px !important;background:radial-gradient(ellipse at 15% 10%,color-mix(in srgb,var(--v105-frame-main) 12%,transparent),transparent 65%),#080b11 !important;
}
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) :is(#v105-home-profile-button,#v105-profile-preview)::before,
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) :is(#v105-home-profile-button,#v105-profile-preview)::after,
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) :is(#v105-home-profile-button,#v105-profile-preview) > .v158-profile-ornament { display:none !important; }

.v175-illustrated-profile-frame {
    position:absolute;inset:auto;z-index:15;display:block;pointer-events:none;aspect-ratio:1/1;
    filter:drop-shadow(0 2px 0 rgba(0,0,0,.6));overflow:visible;
}
.v175-frame-art { position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none;pointer-events:none; }
.v175-illustrated-profile-frame > .v160-theme { display:none; }
:is(#v105-profile-preview,#v105-home-profile-button)[data-v105-frame="imperial"] > .v175-illustrated-profile-frame .v160-theme--imperial,
:is(#v105-profile-preview,#v105-home-profile-button)[data-v105-frame="crimson"] > .v175-illustrated-profile-frame .v160-theme--crimson,
:is(#v105-profile-preview,#v105-home-profile-button)[data-v105-frame="sapphire"] > .v175-illustrated-profile-frame .v160-theme--sapphire,
:is(#v105-profile-preview,#v105-home-profile-button)[data-v105-frame="silver"] > .v175-illustrated-profile-frame .v160-theme--silver,
:is(#v105-profile-preview,#v105-home-profile-button)[data-v105-frame="emerald"] > .v175-illustrated-profile-frame .v160-theme--emerald,
:is(#v105-profile-preview,#v105-home-profile-button)[data-v105-frame="obsidian"] > .v175-illustrated-profile-frame .v160-theme--obsidian { display:block; }

body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-home-profile-button {
    width:clamp(236px,20vw,302px);min-height:88px !important;grid-template-columns:76px minmax(0,1fr) 14px !important;gap:10px !important;padding:5px 9px 5px 5px !important;
}
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-home-profile-button .v105-profile-emblem { width:76px !important;height:76px !important; }
body.v175-illustrated-profile-frames #v105-profile-editor .v105-profile-panel-body { grid-template-columns:minmax(250px,.72fr) minmax(0,1.5fr) !important;grid-auto-rows:max-content !important;align-content:start !important;align-items:start !important; }
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview { flex:0 0 auto !important;justify-content:center !important;min-height:426px !important;padding:20px 14px 20px !important; }
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview .v105-profile-emblem { width:220px !important;height:auto !important;aspect-ratio:1/1 !important;max-width:100%;flex:none; }
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) :is(#v105-home-profile-button,#v105-profile-preview) .v105-profile-emblem {
    position:relative !important;overflow:visible !important;clip-path:none !important;padding:0 !important;border:0 !important;background:none !important;box-shadow:none !important;
}
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) :is(#v105-home-profile-button,#v105-profile-preview) .v105-profile-emblem::after { display:none !important; }
/* A broad portrait opening keeps the illustration visible inside the slim rail. */
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) :is(#v105-home-profile-button,#v105-profile-preview) .v105-profile-emblem > img {
    position:absolute !important;inset:7% !important;width:86% !important;height:86% !important;clip-path:none !important;object-fit:cover;object-position:50% 24%;border-radius:7px;
    background:#080b11;filter:saturate(1.02) contrast(1.02);
}
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview .v105-preview-character { margin-top:8px; }
body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview .v105-preview-name { margin-top:10px; }

/* The same square image is cloned for both player and CPU profiles. */
body.v175-illustrated-profile-frames .v167-match-portrait:has(> .v175-illustrated-profile-frame) {
    aspect-ratio:1/1 !important;overflow:visible !important;background:none !important;box-shadow:none !important;
}
body.v175-illustrated-profile-frames .v167-match-portrait > .v175-illustrated-profile-frame {
    inset:0 !important;width:100% !important;height:100% !important;z-index:5 !important;display:block !important;filter:drop-shadow(0 2px 0 #0009) !important;
}
body.v175-illustrated-profile-frames .v167-match-portrait:has(> .v175-illustrated-profile-frame) > img {
    inset:7% !important;width:86% !important;height:86% !important;clip-path:none;object-position:50% 24%;border-radius:7px;
}
body.v175-illustrated-profile-frames .v167-match-portrait:has(> .v175-illustrated-profile-frame) > :is(.v167-match-image-shade,.v167-match-image-fallback) {
    inset:7% !important;border-radius:7px;
}

/* The same portrait and rail are shown in all six selection previews. */
body.v175-illustrated-profile-frames #v105-frame-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:9px !important; }
body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-choice { min-height:86px !important;gap:9px !important;padding:7px !important; }
body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-swatch.v160-frame-swatch {
    flex:0 0 70px;width:70px !important;height:70px !important;display:block;padding:0 !important;overflow:visible !important;clip-path:none !important;
    border:0 !important;border-radius:0 !important;background:none !important;box-shadow:none !important;
}
body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-swatch.v160-frame-swatch::before,
body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-swatch.v160-frame-swatch::after { display:none !important; }
.v160-mini-frame { position:relative;width:100%;height:100%;display:block;pointer-events:none;filter:drop-shadow(0 1px 0 #0009); }
.v175-mini-portrait { position:absolute;inset:7%;width:86%;height:86%;clip-path:none;border-radius:5px;object-fit:cover;object-position:50% 24%;pointer-events:none; }
.v183-mini-frame-art {position:absolute;inset:0;display:block;width:100%;height:100%;z-index:2;overflow:visible;}
.v183-mini-frame-art .v160-theme {display:block;}
body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-choice.is-selected .v160-mini-frame { filter:drop-shadow(0 1px 0 #0009); }
.v160-frame-copy { min-width:0;display:flex;flex-direction:column;gap:5px; }
.v160-frame-copy strong { color:#eee1c8;font-size:10px;line-height:1.35;letter-spacing:.02em; }
.v160-frame-copy small { color:#9c907d;font:700 7px/1.3 "Courier New",monospace;letter-spacing:.04em; }

/* Earned seasonal frames continue to override only the owner's basic frame. */
body.v175-illustrated-profile-frames[data-v137-profile-frame] :is(#v105-home-profile-button,#v105-profile-preview) > .v175-illustrated-profile-frame { display:none !important; }

@media(max-width:700px) {
    body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-home-profile-button { width:min(180px,45vw) !important;min-height:72px !important;grid-template-columns:62px minmax(0,1fr) 10px !important;gap:6px !important;padding:4px !important; }
    body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-home-profile-button .v105-profile-emblem { width:62px !important;height:62px !important; }
    body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview { min-height:338px !important; }
    body.v175-illustrated-profile-frames #v105-profile-editor .v105-profile-panel-body { grid-template-columns:minmax(0,1fr) !important; }
    body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview .v105-profile-emblem { width:156px !important; }
    body.v175-illustrated-profile-frames #v105-frame-grid { gap:7px !important; }
    body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-choice { min-height:72px !important;padding:5px !important;gap:5px !important; }
    body.v175-illustrated-profile-frames #v105-frame-grid .v105-frame-swatch.v160-frame-swatch { flex-basis:60px;width:60px !important;height:60px !important; }
    .v160-frame-copy strong { font-size:8px; }
    .v160-frame-copy small { display:none; }
}
@media(orientation:landscape) and (max-height:520px) {
    body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview { min-height:320px !important; }
    body.v175-illustrated-profile-frames:not([data-v137-profile-frame]) #v105-profile-preview .v105-profile-emblem { width:146px !important; }
}
@media(prefers-reduced-motion:reduce) { .v160-mini-frame,.v175-illustrated-profile-frame { transition:none !important;animation:none !important; } }

/* Flat paint and a single dark ink outline replace carved metal and bloom. */
.v160-theme {filter:none;}
.v160-theme :is(.v160-rim,.v160-accent,.v160-jewel,.v160-dark,.v160-bright,.v160-cloth) {
    vector-effect:non-scaling-stroke;stroke-width:1.3;stroke-linejoin:round;
}
.v160-theme .v160-dark {stroke-width:1.8;}
.v160-theme .v160-inlay {vector-effect:non-scaling-stroke;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;}
.v160-theme .v160-line {fill:none;vector-effect:non-scaling-stroke;stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round;}
.v183-mini-frame-art .v160-theme :is(.v160-rim,.v160-accent,.v160-jewel,.v160-dark,.v160-bright) {stroke-width:.8;}
.v183-mini-frame-art .v160-inlay {stroke-width:1.2;}
.v183-mini-frame-art .v160-line {stroke-width:.7;}

/* Retired season rewards keep their own saved IDs and a quieter anime outline. */
body:is([data-v137-profile-frame="jade-order"],[data-v137-profile-frame="ruby-command"],[data-v137-profile-frame="black-seal-crown"])
:is(#v105-home-profile-button,#v105-profile-preview) {
    overflow:hidden !important;clip-path:none !important;border-radius:10px !important;
    border:2px solid var(--v105-frame-main) !important;
    background:color-mix(in srgb,var(--v105-frame-dark) 22%,#080b11) !important;
    box-shadow:0 2px 0 #030507,inset 0 -3px 0 var(--v105-frame-dark) !important;
}
body:is([data-v137-profile-frame="jade-order"],[data-v137-profile-frame="ruby-command"],[data-v137-profile-frame="black-seal-crown"])
:is(#v105-home-profile-button,#v105-profile-preview)::before {
    inset:4px !important;clip-path:none !important;border-radius:6px !important;border:1px solid var(--v105-frame-light) !important;
    background:none !important;box-shadow:none !important;
}
body:is([data-v137-profile-frame="jade-order"],[data-v137-profile-frame="ruby-command"],[data-v137-profile-frame="black-seal-crown"])
:is(#v105-home-profile-button,#v105-profile-preview)::after,
body:is([data-v137-profile-frame="jade-order"],[data-v137-profile-frame="ruby-command"],[data-v137-profile-frame="black-seal-crown"])
:is(#v105-home-profile-button,#v105-profile-preview) > .v158-profile-ornament {display:none !important;}
body:is([data-v137-profile-frame="jade-order"],[data-v137-profile-frame="ruby-command"],[data-v137-profile-frame="black-seal-crown"])
:is(#v105-home-profile-button,#v105-profile-preview) .v105-profile-emblem {clip-path:none !important;border-radius:9px;box-shadow:none !important;}
