/* Culling Game: shared palette, profile artwork and restrained manga geometry. */
:root{--bg:#0d0c12;--surface:#191720;--surface2:#24212e;--border:#474050;--text:#f5f1e8;--text-muted:#bbb5c7;--text-dim:#aba3b9;--teal:#ff633d;--teal-rgb:255,99,61;--coral:#ff633d;--coral-rgb:255,99,61;--amber:#f4c95d;--amber-rgb:244,201,93;--grid:#312c3c;--violet:#a78bfa;--danger:#ff4967;--danger-rgb:255,73,103;--danger-soft:#ff8095;--violet-rgb:167,139,250;--surface3:#352f41;--on-accent:#1b0d08;}
[data-theme="light"]{--bg:#f5f2f8;--surface:#fff;--surface2:#ede7f3;--border:#bdb0cd;--text:#21182b;--text-muted:#63536f;--text-dim:#6d5e79;--teal:#b33213;--teal-rgb:179,50,19;--coral:#b33213;--coral-rgb:179,50,19;--amber:#785500;--amber-rgb:120,85,0;--grid:#e0d7e9;--violet:#7143bb;--danger:#b91d41;--danger-rgb:185,29,65;--danger-soft:#a51d41;--violet-rgb:113,67,187;--surface3:#dfd4e9;--on-accent:#fff;}
:focus-visible{outline:2px solid var(--violet);outline-offset:4px;}
#topbar{border-bottom:1px solid var(--border);box-shadow:0 2px 0 rgba(var(--teal-rgb),.18);}
#topbar-logo,.picker-brand{font-weight:900;letter-spacing:-.055em;}
.page-intro{border-left:3px solid var(--teal);padding-left:16px;}
.page-intro h1{letter-spacing:-.045em;}
.eyebrow{color:var(--violet);}
.card,.day-card,.library-card{border-radius:12px;}
.home-metrics{border-top:1px solid var(--border);border-bottom:1px solid var(--border);}
.home-metrics strong{color:var(--text);}
.home-metrics>div+div strong{color:var(--violet);}
#tabs .tab-btn{position:relative;}
#tabs .tab-btn.active::before{content:'';position:absolute;top:0;left:28%;right:28%;height:3px;background:var(--teal);}
.profile-shell{width:min(920px,100%);padding-top:36px;}
.picker-brand{margin-bottom:32px;}
.picker-intro{max-width:52ch;}
#profile-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.profile-card{margin:0;min-width:0;transition:border-color .18s,transform .18s;}
.profile-card:hover{transform:translateY(-3px);}
.profile-card-illustrated{position:relative;isolation:isolate;min-height:470px;overflow:hidden;align-items:flex-end;padding:24px;background:#0d0c12;color:#f5f1e8;border-color:#474050;}
.profile-card-illustrated::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#0d0c12 0%,rgba(13,12,18,.93) 9%,transparent 42%);pointer-events:none;}
.profile-portrait{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center top;z-index:-2;}
.profile-card-copy{min-width:0;overflow-wrap:anywhere;}
.profile-card-illustrated strong{font-size:1.35rem;}
.profile-card-illustrated small{color:#bbb5c7;}
.profile-card-illustrated .profile-arrow{color:#ff633d;}
.profile-card-illustrated:nth-child(2){border-top:3px solid #a78bfa;}
.profile-card-illustrated:first-child{border-top:3px solid #ff633d;}
.new-profile{margin-top:24px;}
#profile-character{position:fixed;top:88px;bottom:90px;width:250px;left:16px;pointer-events:none;overflow:hidden;background:#0d0c12;border-radius:14px;}
#profile-character img{width:100%;height:100%;object-fit:contain;}
#profile-character[hidden]{display:none;}
.profile-header-portrait{width:42px;height:42px;object-fit:cover;object-position:50% 7%;border-radius:50%;border:1px solid var(--violet);background:#0d0c12;flex-shrink:0;}
@media(min-width:1200px){
 [data-character="pessoal"] #app{padding-left:280px;}
 [data-character="ela"] #app{padding-right:280px;}
 [data-character="ela"] #profile-character{left:auto;right:16px;}
 .profile-header-portrait{display:none;}
}
@media(max-width:1199px){#profile-character{display:none;}}
@media(max-width:540px){
 .profile-shell{padding:28px 16px;}
 #profile-list{gap:12px;}
 .profile-card-illustrated{min-height:320px;padding:14px 12px;}
 .profile-card-illustrated strong{font-size:1.05rem;}
 .profile-card-illustrated small{font-size:.8rem;}
 .profile-card-illustrated .profile-arrow{display:none;}
 .profile-card:not(.profile-card-illustrated){grid-column:1/-1;}
 #topbar{height:auto;min-height:68px;flex-wrap:wrap;}
 .profile-header-portrait{width:34px;height:34px;}
}
@media(max-width:360px){.profile-card-illustrated{min-height:290px;}#topbar-logo{font-size:1rem;}#topbar-action{gap:2px;}}
@media(prefers-reduced-motion:reduce){.profile-card{transition:none;}.profile-card:hover{transform:none;}}
/* Stronger arc identity: ink purple, electric gold and orange-red. */
:root{--bg:#140d23;--surface:#211632;--surface2:#302044;--surface3:#3d2b55;--border:#604775;--grid:#39264e;--violet:#b995ff;--violet-rgb:185,149,255;--amber:#ffe05b;--amber-rgb:255,224,91;--teal:#ff643d;--coral:#ff643d;}
#topbar{background:linear-gradient(110deg,#1c112d,#302044);color:#f5f1e8;border-bottom:2px solid #ffe05b;}
#topbar-logo{color:#fff5dd;}#topbar-logo span{color:#ffe05b;}
#topbar-title,#topbar .profile-switch,#topbar .settings-btn{color:#e1cee9;}
#tabs{background:#1c112d;border-top:1px solid #785b91;}
#tabs .tab-btn{color:#c8b6d9;}#tabs .tab-btn.active{color:#ffe05b;background:#32203e;}
#tabs .tab-btn.active::before{background:#ffe05b;}
.page-intro{background:linear-gradient(110deg,rgba(185,149,255,.13),transparent);border-left-color:var(--amber);padding:18px;border-radius:0 16px 16px 0;}
.page-intro h1{color:var(--amber);}
.home-metrics{background:var(--surface);border-radius:12px;border-color:var(--border);}
.home-metrics>div:first-child strong{color:var(--amber);}
.profile-page{background:radial-gradient(ellipse at 50% 0,#422453 0,#1c112e 45%,#100c18 100%);color:#fff5df;}
.profile-page .picker-intro,.profile-page .picker-footer,.profile-page .new-profile summary{color:#d4c3e0;}
.profile-page .picker-brand span{color:#ffe05b;}
.profile-shell h1{color:#ffe05b;}
.profile-card-illustrated{border-color:#785193;box-shadow:0 12px 45px #09061266;}
.profile-card-illustrated:first-child{border-top:4px solid #ff643d;}
.profile-card-illustrated:nth-child(2){border-top:4px solid #ffe05b;}
.profile-card-illustrated .profile-arrow{color:#ffe05b;}
.profile-card:hover,.profile-card:focus-visible{border-color:#ffe05b;outline-color:#ffe05b;}
.anatomy-toggle{display:flex;gap:8px;margin:14px 0;}
.anatomy-toggle button,.anatomy-toolbar button{min-height:44px;padding:8px 16px;background:var(--surface2);color:var(--text);border:1px solid var(--border);border-radius:8px;font:inherit;cursor:pointer;}
.anatomy-toggle [aria-pressed="true"]{background:var(--amber);color:#211323;border-color:var(--amber);font-weight:800;}
#anatomy-panel{border:1px solid var(--border);border-radius:16px;overflow:hidden;background:var(--surface);}
#anatomy-panel[hidden],#body-svg-wrap[hidden],#anatomy-toggle[hidden]{display:none;}
.anatomy-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:12px;}
.anatomy-toolbar label{font-size:.875rem;}.anatomy-toolbar select{flex:1;min-width:180px;width:auto;font-size:.875rem;}
#anatomy-canvas{height:clamp(420px,62dvh,650px);width:100%;position:relative;}
#anatomy-canvas canvas{display:block;width:100%;height:100%;touch-action:none;}
#anatomy-selection{font-weight:700;margin:14px 16px;}
.anatomy-hint,.anatomy-credit{font-size:.875rem;line-height:1.5;color:var(--text-muted);margin:12px 16px;}
#anatomy-status{padding:12px;border-left:3px solid var(--amber);}
@media(max-width:540px){#anatomy-canvas{height:470px;}.anatomy-toolbar label{width:100%;}.anatomy-toolbar select{width:100%;flex-basis:100%;}}
[data-theme="light"]{--bg:#f5f0fa;--surface:#fff;--surface2:#eee2f6;--surface3:#e0cfea;--border:#b9a1ca;--grid:#ddcce8;--violet:#7038ac;--violet-rgb:112,56,172;--amber:#795400;--amber-rgb:121,84,0;--teal:#b33213;--coral:#b33213;}
/* Integrated application shell; the portrait belongs to the same frame as the content. */
html[data-character] #app{padding:0;max-width:1440px;margin-inline:auto;border-inline:1px solid var(--border);}
#app-workspace{display:flex;flex:1;min-height:0;width:100%;max-width:1120px;margin:0 auto;gap:16px;padding:0 20px;}
#app-workspace #content{min-width:0;flex:1;max-width:820px;margin:0;padding:24px 12px 32px;}
#app-workspace #profile-character{display:block;position:relative;inset:auto;flex:0 0 230px;width:230px;align-self:stretch;margin:24px 0;background:transparent;border-radius:0;}
#app-workspace #profile-character[hidden]{display:none;}
#profile-character img{object-fit:contain;max-height:100%;mask-image:linear-gradient(to right,transparent,#000 8%,#000 92%,transparent);}
[data-character="ela"] #profile-character{order:2;}
.profile-header-portrait{display:block;}
#topbar{padding-inline:24px;}
#tabs{width:100%;}
[data-theme="light"] #topbar{background:#eee5f5;border-color:#b33213;color:#24182f;}
[data-theme="light"] #topbar-logo{color:#24182f;}
[data-theme="light"] #topbar-logo span{color:#aa3618;}
[data-theme="light"] #topbar-title,[data-theme="light"] #topbar .profile-switch,[data-theme="light"] #topbar .settings-btn{color:#684976;}
[data-theme="light"] #tabs{background:#eee5f5;border-color:#c5afd5;}
[data-theme="light"] #tabs .tab-btn{color:#614c70;}
[data-theme="light"] #tabs .tab-btn.active{color:#982e16;background:#e5d5ee;}
[data-theme="light"] #tabs .tab-btn.active::before{background:#b33213;}
[data-theme="light"] .profile-page{background:#f5f0fa;color:#24182f;}
[data-theme="light"] .profile-shell h1,[data-theme="light"] .picker-brand span{color:#982e16;}
[data-theme="light"] .profile-page .picker-intro,[data-theme="light"] .profile-page .picker-footer,[data-theme="light"] .profile-page .new-profile summary{color:#63536f;}
[data-theme="light"] .profile-card-illustrated{background:#f5f0fa;color:#24182f;border-color:#baa3ca;box-shadow:none;}
[data-theme="light"] .profile-card-illustrated::after{background:linear-gradient(0deg,#f5f0fa 0%,#f5f0faed 9%,transparent 42%);}
[data-theme="light"] .profile-card-illustrated small{color:#63536f;}
[data-theme="light"] .profile-card-illustrated .profile-arrow{color:#982e16;}
[data-theme="light"] .profile-header-portrait{background:#f5f0fa;}
@media(max-width:1000px){#app-workspace{padding:0 16px;gap:8px;}#app-workspace #profile-character{flex-basis:170px;width:170px;}}
@media(max-width:760px){#app-workspace #profile-character{display:none;}#app-workspace{padding:0 8px;}#app-workspace #content{padding:16px 8px 28px;}#topbar{padding:10px 12px;}}
#app-workspace .view{max-width:none;margin:0;padding:16px 4px;}
#app-workspace{max-width:1080px;}
#app-workspace #profile-character{flex-basis:210px;width:210px;}
#profile-character img{mask-image:linear-gradient(to bottom,transparent,#000 5%,#000 95%,transparent);}
@media(max-width:1000px){#app-workspace #profile-character{flex-basis:170px;width:170px;}}

/* Opaque source art: dark-only compositing removes its darker rectangular backdrop.
   This is not an alpha cutout. Light-mode images are deliberately left unchanged. */
html:not([data-theme="light"]) #app-workspace #profile-character{isolation:isolate;background:var(--bg);}
html:not([data-theme="light"]) #profile-character img{mix-blend-mode:lighten;mask-image:none;}
