/* Shared component geometry. Theme files own materials, fonts and effects, not layout. */
:root {--ui-panel-radius:12px;--ui-control-radius:8px;--ui-composer-radius:12px;--ui-composer-inset:6px;--ui-composer-button:36px;--ui-composer-button-radius:6px}
@media(min-width:801px){
 html[data-theme] body .app-layout-wrapper>header{justify-content:flex-end!important;gap:10px}
 html[data-theme] body .app-layout-wrapper>header>.header-brand{margin-inline-end:auto}
 html[data-theme] body .soft-intro>.dashboard-clock{top:calc(50% - 12px)}
 html[data-theme] body .soft-intro:has(>.dashboard-clock){min-height:82px!important;max-height:none!important}
}
.account-storage-actions,.account-storage-actions>.tracker-file-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.account-storage-actions{margin-block:12px}
html[data-theme][data-scheme] body :is(#mainSidebar,.monthly-overview,#card-discord,.premium-added-panel){
 border-radius:var(--ui-panel-radius)!important
}
.dashboard-resolution{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-block:12px}
.dashboard-resolution>.screen-mode{margin-inline-start:auto}
.profile-name-line{display:flex;align-items:center;gap:8px;min-width:0}
.profile-name-line>:is(h2,strong){margin:0;min-width:0;overflow-wrap:anywhere}
.profile-name-line>.premium-badge{flex:none;margin:0}
.profile-name-line>.nickname-brush{flex:none}
.friend-preview .friend-avatar{width:60px;height:60px}
.friend-profile-dialog .friend-avatar{width:clamp(84px,15vw,124px);height:clamp(84px,15vw,124px)}
html[data-theme] body .profile-dialog:not(.welcome-dialog) .profile-picture{
 width:clamp(96px,18vw,146px);height:clamp(96px,18vw,146px);flex-shrink:0
}
html[data-theme] body .friend-developer .friend-identity>div{padding-right:0}
html[data-theme] body .friend-identity .developer-badge{position:static;margin-inline-start:auto}
.profile-milestones{margin-block:10px;display:grid;gap:7px}
.profile-milestones[hidden]{display:none}
.profile-milestones time{font-size:.8rem;color:var(--text-muted)}
.profile-badge-row{display:flex;flex-wrap:wrap;gap:6px}
.profile-milestone{position:relative;display:inline-flex}
.profile-milestone>button{display:grid;place-items:center;width:31px;height:31px;padding:0;border:1px solid var(--border);border-radius:7px;background:var(--accent-soft);font-size:16px}
.profile-milestone[data-rank="10"]>button{border-color:var(--accent)}
.profile-badge-detail{display:none;position:absolute;z-index:5;inset-block-start:calc(100% + 5px);inset-inline-start:0;width:min(195px,55vw);padding:9px;border-radius:8px;border:1px solid var(--border);background:var(--card);color:var(--text);font-size:.75rem;box-shadow:0 5px 20px #0006;overflow-wrap:anywhere;pointer-events:none}
.profile-milestone:is(:hover,:focus-within)>.profile-badge-detail{display:grid;gap:4px}
.profile-badge-detail progress{width:100%;height:6px;accent-color:var(--accent)}
@media(max-width:540px){
 .friend-developer .friend-identity{flex-wrap:wrap}
 .friend-identity .developer-badge{flex-basis:100%;text-align:end}
}
html[data-screen=fhd] {--ui-composer-button:40px}
html[data-theme][data-scheme] body :is(#daysPanel,#activeDayPanel,#chatPanel,#card-subtasks-mandatory,#card-subtasks-general,.snap-card,.added-panel,.kpi-card,.friend-card,.master-chart-card,.shared-chart-card,.catalog-gallery>button,.custom-add-tile,dialog,.full-graph-modal-dialog) {border-radius:var(--ui-panel-radius)!important;box-sizing:border-box;min-width:0}
html[data-theme][data-scheme] body :is(button.btn-mini,button.swaga-send-icon-btn,.friends-space button,.theme-swatches button,select,input:not([type=checkbox]):not([type=radio]),textarea) {border-radius:var(--ui-control-radius)!important;box-sizing:border-box}
html[data-theme][data-scheme] body :is(.swaga-chat-header,.panel-fullscreen-dialog .swaga-chat-header) {border-radius:11px 11px 0 0!important}
html[data-theme][data-scheme] body .swaga-input-outer {border-radius:0 0 11px 11px!important;min-width:0;padding:12px!important;box-sizing:border-box}
html[data-theme][data-scheme] body .swaga-input-bar-aligned {border-radius:var(--ui-composer-radius)!important;padding:var(--ui-composer-inset)!important;gap:8px!important;min-width:0;min-height:0!important;align-items:flex-end;border-width:1px!important;box-sizing:border-box;overflow:visible}
html[data-theme][data-scheme] body .swaga-input-bar-aligned>button {width:var(--ui-composer-button)!important;min-width:var(--ui-composer-button)!important;max-width:var(--ui-composer-button)!important;height:var(--ui-composer-button)!important;min-height:var(--ui-composer-button)!important;max-height:var(--ui-composer-button)!important;flex:0 0 var(--ui-composer-button)!important;padding:0!important;margin:0!important;border-radius:var(--ui-composer-button-radius)!important;display:flex;align-items:center;justify-content:center;line-height:1!important;transform:none!important}
html[data-theme][data-scheme] body .swaga-input-bar-aligned>button[style*="display:none"],html[data-theme][data-scheme] body .swaga-input-bar-aligned>button[style*="display: none"] {display:none!important}
html[data-theme][data-scheme] body .swaga-input-bar-aligned .swaga-aligned-input {min-width:0!important;width:0;flex:1 1 0!important;min-height:var(--ui-composer-button)!important;max-height:140px!important;margin:0!important;padding:8px!important;border:0!important;border-radius:var(--ui-composer-button-radius)!important;resize:none!important;line-height:1.45!important;background:transparent!important;color:var(--text)!important;box-shadow:none!important}
html[data-theme][data-scheme] body .friends-chat-pane form {align-items:flex-end;gap:8px;padding:6px;border:1px solid var(--border);border-radius:var(--ui-composer-radius);box-sizing:border-box}
html[data-theme][data-scheme] body .friends-chat-pane form :is(textarea,button) {border-radius:var(--ui-composer-button-radius)!important;min-height:var(--ui-composer-button)!important;margin:0!important;box-sizing:border-box}
html[data-theme][data-scheme] body .friends-chat-pane form textarea {min-width:0;flex:1;resize:none}
html[data-theme][data-scheme] body .swaga-msg-bubble {border-radius:10px!important;box-sizing:border-box;overflow-wrap:anywhere;min-width:0}
/* Decorative notebook edges inherit the same bounds as their live card. */
html[data-theme=paper][data-scheme] body :is(.snap-card,.panel,.kpi-card,.added-panel)::before,html[data-theme=paper][data-scheme] body :is(.snap-card,.panel,.kpi-card,.added-panel)::after {border-radius:inherit!important}
@media(max-width:700px){.swaga-input-bar-aligned{--ui-composer-button:36px}html[data-theme][data-scheme] body .swaga-input-outer{padding:8px!important}}

@media(min-width:1501px){
 html[data-theme][data-scheme] body :is(.kpi-grid>.kpi-card,.cockpit-4col-grid :is(#daysPanel,#activeDayPanel,#chatPanel,#card-discord,#card-subtasks-mandatory,#card-subtasks-general,.monthly-overview)) {
  padding:18px!important;
 }
 html[data-theme][data-scheme] body .cockpit-4col-grid :is(#daysPanel>.panel-header,#chatPanel>.swaga-chat-header) {
  padding:0 0 10px!important;
 }
 html[data-theme][data-scheme] body .cockpit-4col-grid #activeDayPanel>.col2-wrapper {padding:0!important}
}
:root[data-theme] body #categoryManagerModal>.full-graph-modal-dialog{
 width:min(520px,calc(100vw - 24px));max-width:none!important;
 max-height:calc(100dvh - 24px);overflow:auto!important;background:var(--card)!important
}
:root[data-theme] body #categoryManagerModal :is(.full-graph-modal-dialog>div,#categoryEmojiGrid,#categoryManagerList){
 background:var(--card)!important;color:var(--text)!important;border-color:var(--border)!important
}
:root[data-theme] body #categoryManagerModal #categoryEmojiGrid{
 grid-template-columns:repeat(auto-fill,48px)!important;grid-auto-rows:48px;justify-content:start;gap:6px;min-width:0;width:100%;box-sizing:border-box;max-height:min(280px,40dvh);overflow:auto
}
:root[data-theme] body #categoryManagerModal :is(#newCategoryInput,#categoryManagerList>div){
 min-width:0;background:var(--bg-panel)!important;border-color:var(--border)!important;color:var(--text)!important
}
:root[data-theme] body #categoryManagerModal :is(.full-graph-modal-dialog>div:first-child span,#categoryManagerList>div>span){
 color:var(--text)!important;overflow-wrap:anywhere
}
@media (min-width:1100px){
 html[data-theme] body .app-layout-wrapper{padding-inline-start:calc(5.9rem + 8px)!important}
 html[data-theme] body #mainSidebar.soft-sidebar{width:5.1rem!important}
 html[data-theme] body #mainSidebar>.soft-nav:not([hidden]){
  width:100%!important;height:3.25rem!important;min-height:3.25rem!important;
  margin-block:0!important;padding:4px!important;box-sizing:border-box
 }
 html[data-theme] body #mainSidebar>.soft-nav small{font-size:.62rem!important;overflow-wrap:normal}
}
@media (prefers-reduced-motion:no-preference){
 dialog[open],#categoryManagerModal>.full-graph-modal-dialog{animation:swaga-window-enter 170ms ease-out}
 @keyframes swaga-window-enter{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
}
/* Shared attachment preview and chat composer geometry. */
.chat-image-preview{display:block;max-width:100%;max-height:240px;object-fit:contain;border-radius:8px;margin-block:4px}
.friend-image-draft:not([hidden]){display:flex;align-items:start;gap:8px}
.friend-image-draft .chat-image-preview,#swagaAttachedFileChip .chat-image-preview{max-height:100px}
html[data-theme] body .friend-chat-message:not(.mine){background:color-mix(in srgb,var(--card) 84%,var(--text));width:fit-content;max-width:90%}
html[data-theme][data-scheme] body .friends-chat-pane form{align-items:center}
html[data-theme][data-scheme] body .friends-chat-pane form button{flex:0 0 var(--ui-composer-button);width:var(--ui-composer-button);height:var(--ui-composer-button);padding:0!important}
#activeDayPanel .task-quick-add-bar{padding:4px;flex-wrap:wrap}
#activeDayPanel .task-quick-add-bar>*{min-width:0;max-width:100%;box-sizing:border-box}
#activeDayPanel #taskInput:focus-visible{outline-offset:-2px}
.custom-editor-button{grid-column:1/-1;justify-self:start}
@media(min-width:801px){
 html[data-theme] body .custom-space.custom-editor-layout{grid-template-columns:repeat(24,minmax(0,1fr))!important;column-gap:0!important;row-gap:0!important;grid-auto-rows:minmax(32px,auto)}
 .custom-editor-layout>.snap-card{min-width:0;min-height:0;margin:5px}
}
@media(max-width:800px){
 .custom-editor-layout>:is(.snap-card,.custom-add-tile){grid-column:1!important;grid-row:auto!important}
}
