/* Material identities for signature themes. Color-only themes retain the base layout. */
@font-face{font-family:'Flowdeck Pencil';src:url('../js/assets/fonts/Caveat.ttf') format('truetype');font-style:normal;font-weight:400 700;font-display:swap}
.theme-scenery{display:none;position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0;contain:strict}
.theme-scenery>i{position:absolute;display:block;pointer-events:none}
html[data-theme-group=signature] body .app-layout-wrapper{position:relative;z-index:1}
html[data-theme-group=signature].theme-effects .theme-scenery{display:block}
/* Solid controls in every palette, including old inline button styles. */
html[data-theme] body :is(button,summary,.btn-mini,.btn-cyan,.btn-primary,.swaga-send-btn,.soft-avatar,.save-badge){background-image:none!important}
html[data-theme] body :is(button,summary)::before,html[data-theme] body :is(button,summary)::after{background-image:none!important}
html[data-theme] body :is(.weight-entry,.body-measure-controls) button{background:var(--accent)!important;color:var(--on-accent)!important;border-color:var(--accent)!important}
html[data-theme] .skill-card progress::-webkit-progress-value{background:var(--accent)!important}
html[data-theme] .muscle-ribbon{background:var(--plate-color)!important;color:var(--bg)!important;text-shadow:none!important;opacity:1!important}
html[data-theme] .muscle-plate-row.untrained .muscle-ribbon{opacity:.75!important}
html[data-theme] .muscle-plate-row small{background:var(--card)!important;color:var(--text)!important}
html[data-theme] .donut-percent{paint-order:stroke;stroke:var(--card);stroke-width:3px;text-shadow:none!important}
html[data-theme] .current-peak .mountain-peak{fill:var(--accent)!important;stroke:var(--accent-2)!important}
html[data-theme] .muscle-focus-bar,html[data-theme] .focus-banner{background:var(--accent-soft)!important;border-color:var(--border)!important}
html[data-theme] .soft-avatar{background:var(--accent)!important;color:var(--on-accent)!important}
/* A real notebook: yellow stock, blue rulings, red margin, graphite and a local Cyrillic hand. */
html[data-theme=paper]{--notebook-rule:#72868a38;--notebook-margin:#ae666f66;--pencil:#403d36;--paper-stock:#f4e9bd;--paper-shade:#e2d3a0}
html[data-theme=paper] body,html[data-theme=paper] body :is(button,input,textarea,select,summary,h1,h2,h3,h4,span,p,small,label,strong,b,div,pre,code,svg text){font-family:'Flowdeck Pencil','Segoe Print',cursive!important;letter-spacing:.01em}
html[data-theme=paper] body{font-size:18px}
html[data-theme=paper] body .app-layout-wrapper{background-color:var(--paper-stock)!important;background-image:linear-gradient(90deg,transparent 0 88px,var(--notebook-margin) 88px 90px,transparent 90px),repeating-linear-gradient(0deg,transparent 0 27px,var(--notebook-rule) 27px 28px)!important;border-color:#807360!important;box-shadow:3px 5px 0 #b9a577!important}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.skill-card,.master-chart-card,.training-dialog,.training-card,.plan-card,.small-records,.swaga-right-panel,dialog,.full-graph-modal-dialog){background-color:var(--paper-stock)!important;background-image:repeating-linear-gradient(0deg,transparent 0 27px,var(--notebook-rule) 27px 28px)!important;border:1.4px solid #6a6252!important;border-radius:7px 13px 8px 11px/11px 7px 12px 8px!important;box-shadow:2px 3px 0 #9c8a5a28!important;color:var(--pencil)!important}
html[data-theme=paper] body :is(.panel-header,.side-sub-header,.center-day-header,.swaga-chat-header,.soft-sidebar,.mini-card-box){background-color:var(--paper-stock)!important;background-image:none!important}
html[data-theme=paper] body :is(.soft-sidebar,.appearance-menu>.theme-options){border-radius:9px 12px 7px 10px!important;background:var(--paper-stock)!important}
html[data-theme=paper] body :is(button,summary,input,select,textarea,.plan-editor,.plan-preview,.swaga-msg-bubble,.task-card-row,.day-card){border-radius:5px 10px 6px 8px/8px 5px 10px 6px!important;border-color:#776d57!important;box-shadow:none!important}
html[data-theme=paper] body :is(button,summary,input,select,textarea){font-size:17px!important;font-weight:600}
html[data-theme=paper] body :is(.side-sub-header,.panel-title,.task-title-text,.subtask-title-text,.swaga-msg-bubble,.profile-description,.hours-row){font-size:19px!important;font-weight:600!important}
html[data-theme=paper] body :is(small,.rules-note,.deadline-label,.month-label,.hours-row b,.day-sub-info,.theme-swatches span){font-size:15px!important;color:var(--pencil)!important}
html[data-theme=paper] body :is(h1,h2){font-size:28px!important;font-weight:700}
html[data-theme=paper] .soft-intro h1 span{color:var(--pencil)!important}
html[data-theme=paper] body .btn-cyan{background:#d9cda4!important;color:var(--pencil)!important;border:1.4px solid var(--pencil)!important}
html[data-theme=paper] body :is(.hours-ring,.mountain-chart) text{font-weight:600!important}
html[data-theme=paper] .mountain-peak{filter:none;stroke-width:1.3;stroke-dasharray:8 1.3}
html[data-theme=paper] :is(.catalog-chart,.hours-ring) :is(path,polygon,line){stroke-linecap:round;stroke-linejoin:round}
html[data-theme=paper] .snap-drag-handle{border-style:dashed!important}
html[data-theme=paper] .theme-scenery{display:none!important}
/* Matrix is a terminal, with readable code rather than decorative Japanese glyphs. */
html[data-theme=matrix] body .app-layout-wrapper{background:transparent!important;border-radius:10px!important;border-color:#427449!important}
html[data-theme=matrix] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.master-chart-card,.skill-card,.swaga-right-panel,dialog,.full-graph-modal-dialog){background:color-mix(in srgb,var(--card),transparent 9%)!important;border-radius:4px!important;border-color:#2d603d!important;box-shadow:inset 0 0 28px #050a0777,0 0 0 1px #5bd1770c!important}
html[data-theme=matrix] body :is(.panel-header,.side-sub-header,.training-header,.swaga-chat-header){border-bottom:1px dashed #4c8152!important;background:transparent!important}
html[data-theme=matrix] body :is(h1,h2,h3,.panel-title,.side-sub-header,.swaga-chat-header,.day-num-title){font-family:ui-monospace,Consolas,monospace!important;color:var(--accent)!important;text-shadow:0 0 14px #6add7c30}
html[data-theme=matrix] body :is(button,input,select,textarea,.task-card-row,.swaga-msg-bubble,.day-card){border-radius:3px!important;font-family:ui-monospace,Consolas,monospace!important}
html[data-theme=matrix] body .soft-sidebar{border-radius:4px!important}
html[data-theme=matrix] .space-stage{opacity:.85!important;filter:none!important}
html[data-theme=matrix] .theme-scenery{background:repeating-linear-gradient(0deg,transparent 0 3px,#48a95e06 3px 4px)}
/* Space: illuminated glass over a distant, oversized orbital system. */
html[data-theme=space] body .app-layout-wrapper{background:color-mix(in srgb,var(--bg),transparent 34%)!important}
html[data-theme=space] .theme-scenery{background:radial-gradient(ellipse at 20% 0,#563a7e55,transparent 60%),radial-gradient(ellipse at 90% 75%,#235c7c38,transparent 58%)}
html[data-theme=space] .theme-scenery>i:nth-child(1){width:480px;height:480px;right:-100px;top:-210px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#c4b5ed,#65568e 30%,#211b43 64%,#121021);box-shadow:0 0 90px #b9a0ff20;opacity:.45}
html[data-theme=space] .theme-scenery>i:nth-child(2){width:840px;height:310px;right:-260px;top:-80px;border:2px solid #b9c9ff35;border-radius:50%;transform:rotate(-27deg)}
html[data-theme=space] body :is(.panel,.snap-card,.master-chart-card,.skill-card,.swaga-right-panel){border-radius:22px!important;border-color:#ad9bdf45!important;box-shadow:inset 0 1px 0 #ddd8ff0c,0 16px 50px #00000020!important}
/* Synthwave: sunset disk and an actual perspective horizon. */
html[data-theme=synth] body .app-layout-wrapper{background:color-mix(in srgb,var(--bg),transparent 18%)!important}
html[data-theme=synth] .theme-scenery{background:linear-gradient(0deg,#70163e35,transparent 58%)}
html[data-theme=synth] .theme-scenery>i:nth-child(1){width:410px;height:410px;right:7vw;top:-200px;border-radius:50%;background:repeating-linear-gradient(0deg,#ffaf9466 0 22px,transparent 22px 30px);box-shadow:0 0 100px #ff568c25}
html[data-theme=synth] .theme-scenery>i:nth-child(2){inset:48% -50% -80%;background-image:linear-gradient(#c564c64a 1px,transparent 1px),linear-gradient(90deg,#63d9ed42 1px,transparent 1px);background-size:70px 70px;transform:perspective(480px) rotateX(60deg);transform-origin:center top;animation:synth-horizon 24s linear infinite}
html[data-theme=synth] body :is(.panel,.snap-card,.master-chart-card,.skill-card,.swaga-right-panel){border-radius:12px 24px 12px 24px!important;border-color:#ce79ba70!important;box-shadow:inset 0 1px 0 #b4eeff14,0 0 16px #dc67ac0d!important}
html[data-theme=synth] body :is(.panel-title,.side-sub-header,h2){color:var(--accent-2)!important}
@keyframes synth-horizon{to{background-position:0 70px,0 70px}}
/* Aurora is broad light ribbons; sunset is a warm horizon, forest a botanical silhouette. */
html[data-theme=aurora] body .app-layout-wrapper,html[data-theme=sunset] body .app-layout-wrapper,html[data-theme=forest] body .app-layout-wrapper{background:color-mix(in srgb,var(--bg),transparent 18%)!important}
html[data-theme=aurora] .theme-scenery>i{width:140vw;height:35vh;left:-20vw;top:-15vh;border-radius:50%;filter:blur(38px);transform:rotate(-12deg);background:linear-gradient(90deg,transparent,#43d5a74a,#6466d447,transparent);animation:aurora-ribbon 22s ease-in-out infinite alternate}
html[data-theme=aurora] .theme-scenery>i:nth-child(2){top:70vh;left:0;opacity:.55;animation-delay:-8s;transform:rotate(20deg)}
html[data-theme=aurora] body :is(.panel,.snap-card,.skill-card,.master-chart-card){border-color:#83e6be33!important;border-radius:26px 10px 26px 10px!important}
@keyframes aurora-ribbon{to{transform:translate(5vw,7vh) rotate(6deg)}}
html[data-theme=sunset] .theme-scenery>i:nth-child(1){width:600px;height:600px;border-radius:50%;right:-180px;bottom:-330px;background:#ed9d7555;box-shadow:0 0 0 45px #ed9d7510,0 0 0 110px #ed9d7508}
html[data-theme=sunset] body :is(.panel,.snap-card,.skill-card,.master-chart-card){border-radius:28px!important;border-color:#b9959e40!important;box-shadow:0 12px 40px #08020d24!important}
html[data-theme=forest] .theme-scenery>i{width:260px;height:540px;right:-40px;bottom:-90px;border-radius:100% 0 100% 0;border:2px solid #9ac38335;transform:rotate(-30deg);background:linear-gradient(45deg,transparent 48%,#99bb7a22 49% 50%,transparent 51%)}
html[data-theme=forest] .theme-scenery>i:nth-child(2){width:190px;height:420px;right:120px;bottom:-160px;transform:rotate(-65deg);opacity:.5}
html[data-theme=forest] body :is(.panel,.snap-card,.skill-card,.master-chart-card){border-radius:18px 7px 18px 7px!important;border-color:#77957055!important}
/* Retro, Nord and Dracula also change the visual language rather than just the accent. */
html[data-theme=retro] body :is(.panel,.snap-card,.skill-card,.master-chart-card,dialog){border-radius:7px!important;border:1px solid #9c845955!important;box-shadow:inset 0 0 0 3px #352e211f!important}
html[data-theme=retro] body :is(h1,h2,h3,.panel-title,.side-sub-header){font-family:ui-monospace,Consolas,monospace!important;color:#edc06a!important}
html[data-theme=retro] .theme-scenery{background:repeating-linear-gradient(0deg,transparent 0 3px,#d2af6a05 3px 4px)}
html[data-theme=nord] body :is(.panel,.snap-card,.skill-card,.master-chart-card){border-radius:10px!important;border-color:#b4d6e24a!important;box-shadow:inset 0 1px 0 #c6e9f11a!important}
html[data-theme=nord] .theme-scenery{background:linear-gradient(140deg,transparent 0 30%,#c1e4ed09 30% 43%,transparent 43% 75%,#a1bfd212 75%)}
html[data-theme=dracula] body :is(.panel,.snap-card,.skill-card,.master-chart-card){border-radius:7px 20px 7px 20px!important;border-color:#a187c14a!important;box-shadow:inset 0 1px 0 #cdb3f30e!important}
html[data-theme=dracula] body :is(h1,h2){font-family:Georgia,'Times New Roman',serif!important;letter-spacing:.02em}
html[data-theme=pastel] body :is(.panel,.snap-card,.skill-card,.master-chart-card){border-radius:28px!important;border-color:#cdb2f540!important;box-shadow:inset 0 2px 0 #f4b8dc15!important}
/* The training sheet: one compact header, two large content columns, internal scrolling. */
.training-header{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:none;min-height:50px}
.training-header h2{margin:0 0 3px!important;font-size:22px}
.training-header p{margin:0!important;line-height:1.4;font-size:13px}
.training-header>button{align-self:center;flex:none;min-height:38px;padding:8px 16px!important}
html body dialog.training-dialog[open]{inset:4dvh 0!important;top:4dvh!important;margin:auto!important;width:min(94vw,2200px)!important;max-width:2200px!important;height:92dvh!important;max-height:92dvh!important;padding:18px!important;display:flex!important;flex-direction:column!important;gap:14px;overflow:hidden!important}
html body dialog.training-dialog[open] .training-grid{flex:1 1 0!important;height:0!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,.95fr) minmax(0,1.05fr) auto!important;gap:14px!important;overflow:hidden!important}
html body dialog.training-dialog[open] .training-grid>#card-weight{grid-area:1/1/2/2!important}
html body dialog.training-dialog[open] .training-grid>#card-muscles{grid-area:2/1/3/2!important}
html body dialog.training-dialog[open] .training-grid>.plan-card{grid-area:1/2/3/3!important}
html body dialog.training-dialog[open] .training-grid>.small-records{grid-area:3/1/4/3!important}
html body dialog.training-dialog[open] .training-grid>:is(#card-weight,#card-muscles,.plan-card){height:auto!important;min-height:0!important;padding:14px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
html body dialog.training-dialog[open] #card-weight .lollipop-preview-box{height:auto!important;min-height:110px!important;max-height:none!important;flex:1 1 0!important;overflow:hidden!important}
html body dialog.training-dialog[open] #card-weight canvas{height:100%!important;min-height:0!important;width:100%!important;max-height:none!important}
html body dialog.training-dialog[open] #card-muscles .lollipop-preview-box{height:auto!important;min-height:80px!important;max-height:none!important;flex:1 1 0!important;overflow:auto!important}
html body dialog.training-dialog[open] #card-muscles .muscle-plates{padding:3px 4px!important;gap:5px!important}
html body dialog.training-dialog[open] #card-muscles .muscle-plate-row{min-height:32px!important;flex:1 0 32px!important}
html body dialog.training-dialog[open] :is(.weight-entry,.body-measure-controls){margin:5px 0!important;padding:4px 0!important;gap:8px!important}
html body dialog.training-dialog[open] :is(.weight-entry,.body-measure-controls) :is(input,select){min-height:36px!important;height:36px!important;max-width:140px!important}
html body dialog.training-dialog[open] :is(.weight-entry,.body-measure-controls) button{min-height:36px!important}
html body dialog.training-dialog[open] .small-records{padding:10px 14px!important;gap:12px!important}
html body dialog.training-dialog[open] .small-records input{height:36px!important;min-height:36px!important}
html body dialog.training-dialog[open] .plan-editor{flex:1 1 0!important;min-height:0!important;height:0!important;overflow:auto!important;line-height:1.65!important;padding:14px!important}
html body dialog.training-dialog[open] .plan-card>label{margin:4px 0!important;font-size:12px}
html body dialog.training-dialog[open] .plan-actions{margin:6px 0!important}
html body #allChartsMasterModal>.full-graph-modal-dialog{height:90dvh!important;max-height:90dvh!important;width:min(94vw,2260px)!important;max-width:2260px!important}
@media(max-width:1000px){html body dialog.training-dialog[open]{width:96vw!important;inset:2dvh 0!important;top:2dvh!important;height:96dvh!important;max-height:96dvh!important;overflow:auto!important}html body dialog.training-dialog[open] .training-grid{height:auto!important;flex:1 0 auto!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;overflow:visible!important}html body dialog.training-dialog[open] .training-grid>:is(#card-weight,#card-muscles,.plan-card,.small-records){grid-area:auto!important;min-height:300px!important}html body dialog.training-dialog[open] .training-grid>.small-records{min-height:0!important}html body dialog.training-dialog[open] .plan-editor{min-height:300px!important}}
@media(prefers-reduced-motion:reduce){.theme-scenery i{animation:none!important}}
html[data-theme] body button.btn-mini.btn-cyan{background-color:var(--accent)!important;color:var(--on-accent)!important}
html[data-theme=paper] body :is(button.btn-mini.btn-cyan,.weight-entry button,.body-measure-controls button){background:#d9cda4!important;color:var(--pencil)!important;border:1.4px solid var(--pencil)!important}
html[data-theme=paper] .muscle-ribbon{background:#e4d8af!important;color:var(--pencil)!important;border:1px solid #7c7360;clip-path:none;border-radius:5px!important}
html[data-theme=matrix] .soft-nav small{font-size:10px!important;letter-spacing:-.5px;overflow-wrap:normal!important}
html[data-theme=paper] .soft-nav small{font-size:13px!important;overflow-wrap:normal!important}
html.clean-product #allChartsMasterModal .all-charts-bento{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important}
html.clean-product #allChartsMasterModal .all-charts-bento>[data-chart-area=hours]{grid-area:1/1/2/2!important}
html.clean-product #allChartsMasterModal .all-charts-bento>[data-chart-area=months]{grid-area:1/2/2/3!important}
@media(max-width:800px){html.clean-product #allChartsMasterModal .all-charts-bento{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:repeat(2,minmax(280px,1fr))!important}html.clean-product #allChartsMasterModal .all-charts-bento>[data-chart-area=months]{grid-area:2/1/3/2!important}}
html[data-theme=paper] :is(.panel,.draggable-card,.kpi-card,.day-card,.task-card-row):hover{animation:none!important}
html body dialog.training-dialog[open] .training-grid>:is(#card-weight,#card-muscles,.plan-card)[hidden]{display:none!important}

/* Form geometry belongs to the same theme as its container. */
.action-dialog{padding:28px!important;width:min(960px,94vw);max-height:90dvh;overflow:auto;box-sizing:border-box}
.action-dialog :is(form,label){display:grid;gap:10px}
.action-dialog form{gap:20px;margin:18px 0}
.action-dialog label{color:var(--text-muted);font-size:14px}
.action-dialog :is(input,select,textarea){box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 14px;background:var(--input-bg,var(--bg));color:var(--text);border:1px solid var(--border);border-radius:10px;font:inherit}
.action-dialog button{min-height:40px;padding:10px 16px;color:var(--text);background:var(--card);border:1px solid var(--border);border-radius:10px;cursor:pointer}
.action-dialog p{color:var(--text-muted);line-height:1.6;max-width:70ch}
.account-dialog{width:min(480px,94vw)}
.action-dialog form>button[type=submit],.plain-goal-form button{background:var(--accent)!important;color:var(--on-accent,var(--bg))!important}
.plain-goal-form{padding:20px;border:1px solid var(--border);border-radius:12px;grid-template-columns:2fr 1fr auto;align-items:end}
.profile-goals .goals-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.goals-top h2{margin-right:auto}
.chart-settings{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}.chart-settings label{display:grid;gap:6px;flex:1;min-width:130px;color:var(--text-muted);font-size:12px}.chart-settings select{width:100%;padding:8px;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:8px}
.chart-source-caption{font-size:12px;color:var(--text-muted);margin:8px 0}.overview-chart-configured{min-height:200px}.catalog-gallery{gap:16px}.catalog-gallery>button{text-align:left;padding:18px!important}.catalog-gallery strong{font-size:16px}.catalog-gallery small{display:block;font-size:13px;line-height:1.5}
html[data-theme-group=signature] body :is(.swaga-chat-header,.swaga-chat-footer,.swaga-input-area,.swaga-chat-input){border-radius:inherit;max-width:100%;box-sizing:border-box}
html[data-theme=matrix] body :is(#chatPanel,.swaga-right-panel){overflow:hidden}
/* A notebook is an imperfect physical object; controls stay legible and clickable. */
html[data-theme=paper] body :is(.snap-card,.panel,.skill-card,dialog){border-width:1.5px!important;border-radius:7px 19px 11px 15px/15px 8px 18px 9px!important;box-shadow:2px 3px 5px #51443918!important}
html[data-theme=paper] body :is(.snap-card,.skill-card):nth-child(3n+1){rotate:-.22deg;border-radius:14px 8px 20px 6px/6px 17px 8px 13px!important}
html[data-theme=paper] body :is(.snap-card,.skill-card):nth-child(3n+2){rotate:.18deg}
html[data-theme=paper] body :is(h2,h3,.panel-title){rotate:-.6deg;text-decoration:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-underline-offset:5px}
html[data-theme=paper] body :is(button,input,select,textarea):nth-child(2n){border-radius:12px 5px 9px 6px/5px 11px 7px 13px!important}
html[data-theme=paper] .catalog-chart svg{font-family:'Flowdeck Pencil',cursive!important}
html[data-theme=dracula] body :is(.snap-card,.skill-card,dialog){border-radius:6px 6px 22px 6px!important;border-top:2px solid var(--accent)!important}
html[data-theme=nord] body :is(.snap-card,.skill-card,dialog){border-radius:6px!important;box-shadow:0 8px 20px #070e1525!important}
html[data-theme=retro] body :is(.snap-card,.skill-card,dialog){border-radius:5px!important;border:2px solid var(--border)!important;box-shadow:3px 4px 0 #08060360!important}
html[data-theme=forest] body :is(.snap-card,.skill-card,dialog){border-radius:24px 8px 24px 8px!important}
html[data-theme=pastel] body :is(.snap-card,.skill-card,dialog){border-radius:28px!important;border-color:color-mix(in srgb,var(--accent),transparent 65%)!important}
html[data-theme=aurora] body :is(.snap-card,.skill-card,dialog){border-radius:18px 30px 18px 30px!important}
html[data-theme=sunset] body :is(.snap-card,.skill-card,dialog){border-radius:28px 28px 10px 10px!important}
@media(max-width:700px){.plain-goal-form{grid-template-columns:1fr}.action-dialog{padding:18px!important}.chart-settings{gap:8px}}

html[data-theme=paper] body :is(.draggable-card,.swaga-right-panel){border-radius:8px 19px 11px 16px/17px 7px 18px 8px!important;border:1.5px solid var(--pencil)!important}
html[data-theme=paper] body .draggable-card:nth-child(odd){rotate:-.22deg}
html[data-theme=paper] body .draggable-card:nth-child(even){rotate:.18deg}
.monthly-overview:has(.overview-chart-configured)>canvas,.monthly-overview:has(.overview-chart-configured)>.mountain-chart{display:none!important}
.monthly-overview:has(.overview-chart-configured) .day-pts-badge{display:none!important}

/* Pencil contours: distortion applies only to the drawn edge, never to text. */
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card){position:relative;border-color:transparent!important;background-color:#f5e8b8!important;box-shadow:3px 5px 9px #51443920!important}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card)::after{content:"";position:absolute;inset:2px;pointer-events:none;border:1.6px solid #695b42;border-radius:13px 7px 19px 8px/8px 17px 6px 14px;filter:url(#pencil-edge);z-index:3}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.skill-card)::before{content:"";position:absolute;inset:5px 3px 3px 5px;pointer-events:none;border:1px solid #695b4238;border-radius:8px 16px 7px 18px/15px 6px 16px 8px;filter:url(#pencil-edge);z-index:3}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card):nth-child(odd){rotate:-.45deg!important}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card):nth-child(even){rotate:.35deg!important}
html[data-theme=paper] body :is(.task-card-row,.day-card,.swaga-msg-bubble){border-style:solid!important;border-width:1.3px!important;border-radius:16px 6px 20px 9px/7px 18px 8px 14px!important}
html[data-theme=paper] body button:not(.snap-drag-handle):nth-child(odd){rotate:-.7deg}
html[data-theme=paper] body button:not(.snap-drag-handle):nth-child(even){rotate:.6deg}
html[data-theme=paper] body :is(.side-sub-header,.panel-title){text-decoration:underline;text-decoration-style:wavy;text-decoration-thickness:1.2px;text-underline-offset:7px}

/* Inner cards share the same pencil edge as the dashboard panels. */
html[data-theme=paper] body :is(.day-card,.task-card-row,.subtask-item-card,.swaga-msg-bubble){
 position:relative;border-color:transparent!important;
 border-radius:16px 6px 20px 9px/7px 18px 8px 14px!important;
}
html[data-theme=paper] body :is(.day-card,.task-card-row,.subtask-item-card,.swaga-msg-bubble)::after{
 content:"";position:absolute;inset:1px;pointer-events:none;
 border:1.3px solid #77694e;border-radius:inherit;
 filter:url(#pencil-edge);z-index:1;
}

/* One surface contract for legacy panels, builder panels and dialog cards. */
html[data-theme]{
 --surface-radius:18px;
 --surface-border:var(--border);
 --surface-shadow:none;
 --inner-radius:12px;
}
html[data-theme=dracula]{--surface-radius:6px 6px 22px 6px;--surface-border:color-mix(in srgb,var(--accent),transparent 48%);--inner-radius:6px}
html[data-theme=nord]{--surface-radius:6px;--surface-border:color-mix(in srgb,var(--accent),transparent 55%);--surface-shadow:0 8px 20px #070e1525;--inner-radius:4px}
html[data-theme=pastel]{--surface-radius:28px;--surface-border:color-mix(in srgb,var(--accent),transparent 55%);--inner-radius:18px}
html[data-theme=retro]{--surface-radius:5px;--surface-border:color-mix(in srgb,var(--accent),transparent 45%);--surface-shadow:3px 4px 0 #08060360;--inner-radius:3px}
html[data-theme=forest]{--surface-radius:24px 8px 24px 8px;--surface-border:color-mix(in srgb,var(--accent),transparent 50%);--inner-radius:14px 6px}
html[data-theme=space]{--surface-radius:22px;--surface-border:color-mix(in srgb,var(--accent),transparent 48%);--surface-shadow:inset 0 1px 0 #ddd8ff0c,0 16px 50px #00000020;--inner-radius:14px}
html[data-theme=synth]{--surface-radius:12px 24px 12px 24px;--surface-border:color-mix(in srgb,var(--accent),transparent 35%);--surface-shadow:inset 0 1px 0 #b4eeff14,0 0 16px #dc67ac30;--inner-radius:6px 14px}
html[data-theme=aurora]{--surface-radius:18px 30px 18px 30px;--surface-border:color-mix(in srgb,var(--accent),transparent 48%);--inner-radius:10px 18px}
html[data-theme=matrix]{--surface-radius:3px;--surface-border:#2d603d;--surface-shadow:inset 0 0 28px #050a0777,0 0 0 1px #5bd1770c;--inner-radius:3px}
html[data-theme=sunset]{--surface-radius:28px 28px 10px 10px;--surface-border:color-mix(in srgb,var(--accent),transparent 48%);--inner-radius:16px 16px 6px 6px}
html[data-theme]:not([data-theme=paper]) body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card,.master-chart-card,.training-card,.plan-card,.small-records,dialog,.full-graph-modal-dialog){
 border:1px solid var(--surface-border)!important;
 border-radius:var(--surface-radius)!important;
 box-shadow:var(--surface-shadow)!important;
}
html[data-theme]:not([data-theme=paper]) body :is(.day-card,.task-card-row,.subtask-item-card,.swaga-msg-bubble,.plan-preview){
 border:1px solid var(--surface-border)!important;
 border-radius:var(--inner-radius)!important;
}
html[data-theme]:not([data-theme=paper]) body :is(.panel-header,.side-sub-header,.center-day-header,.swaga-chat-header){
 background-color:transparent!important;
 border-top-left-radius:inherit;
 border-top-right-radius:inherit;
}

/* Shared geometry across every palette. Material, color and scenery carry identity. */
html[data-theme]{
 --surface-radius:18px;
 --inner-radius:12px;
 --surface-shadow:0 7px 20px #00000018;
}
html[data-theme] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card,.master-chart-card,.training-card,.plan-card,.small-records,dialog,.full-graph-modal-dialog){
 border:1px solid var(--surface-border,var(--border))!important;
 border-radius:18px!important;
 box-shadow:var(--surface-shadow)!important;
 rotate:0deg!important;
}
html[data-theme] body :is(.day-card,.task-card-row,.subtask-item-card,.swaga-msg-bubble,.plan-preview){
 border-radius:12px!important;
 border-width:1px!important;
}
html[data-theme] body :is(input,select,textarea,.plan-editor){border-radius:10px!important}
html[data-theme] body :is(.panel-header,.side-sub-header,.center-day-header,.swaga-chat-header){
 border-radius:17px 17px 0 0!important;
 background-color:transparent!important;
}
html[data-theme] body :is(.swaga-input-wrap,.swaga-input-area,.swaga-chat-input,.swaga-chat-footer){border-radius:12px!important}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card)::after{
 border-radius:16px!important;
}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.skill-card)::before{border-radius:14px!important}
html[data-theme=paper] body :is(.day-card,.task-card-row,.subtask-item-card,.swaga-msg-bubble)::after{border-radius:11px!important}
html[data-theme-group=signature].theme-effects .space-stage{display:block;opacity:.8;filter:none}
html[data-theme-group=signature]:not(.theme-effects) .space-stage{display:none}
html[data-theme-group=signature] body .app-layout-wrapper{
 background-color:color-mix(in srgb,var(--bg),transparent 24%)!important;
}
html[data-theme=paper] body .app-layout-wrapper{background-color:var(--paper-stock)!important}
/* Retro — a pixel observatory over a warm city skyline. */
html[data-theme=retro] .theme-scenery{
 background:radial-gradient(ellipse at 70% 0,#b8752738,transparent 60%),linear-gradient(0deg,#7c461d22,transparent 55%);
}
html[data-theme=retro] .theme-scenery>i:nth-child(1){
 width:210px;height:210px;right:12vw;top:9vh;opacity:.35;
 background:repeating-linear-gradient(0deg,#edb86a 0 7px,transparent 7px 11px);
 clip-path:polygon(24% 0,76% 0,76% 7%,90% 7%,90% 24%,100% 24%,100% 76%,90% 76%,90% 90%,76% 90%,76% 100%,24% 100%,24% 90%,10% 90%,10% 76%,0 76%,0 24%,10% 24%,10% 7%,24% 7%);
}
html[data-theme=retro].theme-effects .theme-scenery>i:nth-child(1){animation:retro-moon 16s ease-in-out infinite alternate}
@keyframes retro-moon{to{translate:0 14px;opacity:.5}}
/* Forest — layered canopy, drifting leaves, sunlight and fireflies. */
html[data-theme=forest] .theme-scenery{background:radial-gradient(ellipse at 25% -5%,#c6db7838,transparent 65%),linear-gradient(0deg,#06191255,transparent 70%)}
html[data-theme=forest] .theme-scenery>i{
 width:180px;height:440px;top:-250px;left:3vw;bottom:auto;right:auto;
 border:1px solid #91b87c44;border-radius:100% 0 100% 0;
 background:linear-gradient(45deg,#24483188,transparent 46%,#aacb7544 48% 49%,transparent 51%);
 transform:rotate(38deg);transform-origin:center top;opacity:.6;
}
html[data-theme=forest] .theme-scenery>i:nth-child(2){left:auto;right:5vw;top:-210px;transform:rotate(-42deg);opacity:.5}
html[data-theme=forest] .theme-scenery>i:nth-child(3){left:43vw;top:-320px;transform:rotate(10deg);opacity:.35}
html[data-theme=forest].theme-effects .theme-scenery>i{animation:forest-canopy 12s ease-in-out infinite alternate}
html[data-theme=forest].theme-effects .theme-scenery>i:nth-child(2){animation-delay:-5s}
@keyframes forest-canopy{to{translate:16px 12px;rotate:4deg}}
/* The remaining signature worlds use distinct atmospheric landmarks. */
html[data-theme=dracula] .theme-scenery{
 background:radial-gradient(ellipse at 85% 10%,#80507c33,transparent 48%),linear-gradient(120deg,#38223a22,transparent 70%);
}
html[data-theme=dracula] .theme-scenery>i:nth-child(1){
 width:220px;height:220px;right:8vw;top:5vh;border-radius:50%;
 box-shadow:inset 32px -14px 0 #bda7d82e;transform:rotate(-20deg);
}
html[data-theme=nord] .theme-scenery>i:nth-child(1){
 inset:58% -5% -5%;background:linear-gradient(150deg,#93b8cc22,#bedbe80d);
 clip-path:polygon(0 100%,0 75%,18% 18%,29% 53%,44% 0,62% 59%,78% 10%,100% 69%,100% 100%);
}
html[data-theme=pastel] .theme-scenery>i{
 width:32vw;height:32vw;border-radius:50%;left:-10vw;top:-12vw;
 background:radial-gradient(circle,#eab7dc20,transparent 70%);
}
html[data-theme=pastel] .theme-scenery>i:nth-child(2){left:auto;right:-8vw;top:45vh;background:radial-gradient(circle,#a9c9e222,transparent 70%)}
html[data-theme=sunset] .theme-scenery>i:nth-child(3){
 width:65vw;height:20vh;left:18vw;bottom:0;top:auto;
 background:repeating-linear-gradient(0deg,transparent 0 11px,#f4b59a15 11px 12px);
 mask-image:radial-gradient(ellipse at center,black,transparent 70%);
}
html[data-theme=sunset].theme-effects .theme-scenery>i:nth-child(3){animation:sunset-water 16s linear infinite}
@keyframes sunset-water{to{background-position:0 48px}}
html[data-theme=space].theme-effects .theme-scenery>i:nth-child(2){animation:space-orbit 24s ease-in-out infinite alternate}
@keyframes space-orbit{to{translate:-22px 18px;rotate:4deg}}
html[data-theme=synth] .theme-scenery>i:nth-child(3){
 inset:0;background:repeating-linear-gradient(0deg,transparent 0 3px,#df9ecf06 3px 4px);
}
@media(prefers-reduced-motion:reduce){
 html[data-theme] .theme-scenery>i{animation:none!important}
 html[data-theme] .space-stage{display:none!important}
}

/* Panel paint is translucent; text and controls retain their own opacity. */
html[data-theme] body :is(#daysPanel,#activeDayPanel,#chatPanel,#card-discord,.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card,.master-chart-card,.training-card,.plan-card,.small-records,dialog,.full-graph-modal-dialog,.soft-sidebar,.theme-options){
 background-color:color-mix(in srgb,var(--card) 80%,transparent)!important;
}
html[data-theme=paper] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.skill-card,dialog){
 background-color:color-mix(in srgb,var(--paper-stock) 80%,transparent)!important;
}
.soft-sidebar .admin-shortcut{width:100%;min-height:52px;margin-top:8px;flex-shrink:0}
.soft-sidebar .admin-shortcut[hidden]{display:none!important}
html[data-theme=clay]{--surface-border:#c3c3bf;--surface-shadow:8px 8px 18px #74757138,-7px -7px 18px #ffffffb3}
html[data-theme=clay] body .app-layout-wrapper{background:#deddd9!important}
html[data-theme=clay] body :is(button,summary){box-shadow:3px 3px 7px #85868240,-3px -3px 7px #ffffffb3!important;border-color:#d5d5d0!important}
html[data-theme=clay] body button:active{box-shadow:inset 3px 3px 6px #85868240,inset -3px -3px 6px #ffffffb3!important}
html[data-theme=clay] body :is(input,select,textarea,.plan-editor){
 background-color:#e8e7e2!important;box-shadow:inset 3px 3px 6px #85868238,inset -3px -3px 6px #ffffffb3!important;border-color:#d3d3ce!important;
}
html[data-theme=clay] .theme-scenery{background:radial-gradient(ellipse at 20% 5%,#ffffff80,transparent 70%)}
html[data-theme=pop]{--surface-border:#181818;--surface-shadow:5px 6px 0 #181818}
html[data-theme=pop] body .app-layout-wrapper{background:color-mix(in srgb,var(--bg) 50%,transparent)!important}
html[data-theme=pop] .theme-scenery{background:#ffe148}
html[data-theme=pop] .theme-scenery>i:nth-child(1){width:42vw;height:42vw;border-radius:50%;left:-18vw;top:10vh;background:#f34f91}
html[data-theme=pop] .theme-scenery>i:nth-child(2){inset:60% -30% -40% 50%;background:#7b5de4;transform:rotate(-18deg)}
html[data-theme=pop] body :is(button,summary){border:1px solid #181818!important;box-shadow:2px 3px 0 #181818!important}
html[data-theme=pop] body button:active{translate:1px 2px;box-shadow:none!important}
html[data-theme=pop] body :is(.day-card,.task-card-row,.subtask-item-card,.swaga-msg-bubble){border-color:#181818!important;background-color:#fffdf6!important}
html[data-theme=studio]{--surface-border:#8298ac55;--surface-shadow:0 10px 30px #03060c44,inset 0 1px 0 #d8ecff10}
html[data-theme=studio] .theme-scenery{background:radial-gradient(ellipse at 0 0,#8caacb55,transparent 70%),radial-gradient(ellipse at 90% 90%,#b9695d22,transparent 65%)}
html[data-theme=studio] body :is(.soft-nav.active,.save-badge){background:var(--accent-soft)!important;box-shadow:0 0 15px #ffa19630}
html[data-theme=studio] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,dialog){backdrop-filter:blur(6px)}
html[data-theme=glass]{--surface-border:#f3ffff99;--surface-shadow:inset 0 1px 0 #ffffffc9,inset 0 -1px 0 #ffffff55,0 12px 32px #30546226}
html[data-theme=glass] .theme-scenery{background:radial-gradient(ellipse at 20% 10%,#dceff0,transparent 65%),linear-gradient(135deg,#8fadb5,#adc6cb 55%,#7296a3)}
html[data-theme=glass] .theme-scenery>i{width:40vw;height:40vw;border-radius:50%;left:-15vw;top:35vh;background:#eefbfc50;filter:blur(15px)}
html[data-theme=glass] .theme-scenery>i:nth-child(2){left:auto;right:-10vw;top:-20vh;background:#4d7d8e33}
html[data-theme=glass] body :is(.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,dialog,.soft-sidebar){
 backdrop-filter:blur(8px);box-shadow:var(--surface-shadow)!important;
}
html[data-theme=glass] body :is(button,summary,input,select,textarea){border-color:#ffffffaa!important;box-shadow:inset 0 1px 0 #ffffffb3,0 3px 8px #30546220}
html[data-theme=glass] body :is(.task-card-row,.day-card,.swaga-msg-bubble){background-color:#e5eff2d9!important;border-color:#ffffff99!important}
html[data-theme=glass].theme-effects .theme-scenery>i{animation:glass-drift 20s ease-in-out infinite alternate}
html[data-theme=glass].theme-effects .theme-scenery>i:nth-child(2){animation-delay:-10s}
@keyframes glass-drift{to{translate:30px -20px}}
html[data-theme] body :is(input,select,textarea,button,summary):focus-visible{outline:2px solid var(--accent)!important;outline-offset:3px}
@media(prefers-reduced-motion:reduce){html[data-theme=glass] .theme-scenery>i{animation:none!important}}

html[data-theme=paper] body :is(.panel,.snap-card,.skill-card):nth-child(n){border-radius:18px!important}

html[data-theme] body button.btn-mini.btn-cyan-pill{background:var(--accent)!important;color:var(--on-accent)!important}
