/* Home-only visual direction. The original four asset files remain unchanged. */
.phone-container:has(.home-fit) { background: radial-gradient(ellipse at 50% 25%, #35307b, #27235f 90%); border: 0; }
.home-fit #home-view .header { flex-wrap: nowrap; margin: 0 10px 12px; gap: 8px; }
.home-fit .profile-section { gap: 10px; flex: 1; min-width: 0; }
.home-fit .profile-avatar { flex-shrink: 0; width: 43px; height: 43px; background: linear-gradient(125deg,#ffc184,#ffae8e); }
.home-fit .greeting-text { font-size: 22px; }
.home-fit .header-date { display: block; width: auto; text-align: left; margin-top: 3px; font-size: 10px; white-space: nowrap; }
.home-tools { display: flex; gap: 6px; }
.home-tool { border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; background: #21194f; color: #d0c1ff; }
.home-tool svg, .goal-symbol svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.home-fit #home-view .quote-card { min-height: 100px; padding: 15px 18px; border-radius: 21px; gap: 6px; background: radial-gradient(ellipse at 112% 128%,#f576fa 0 30%,transparent 31%),radial-gradient(ellipse at 100% 135%,#bb65f5 0 49%,transparent 50%),linear-gradient(120deg,#3fa1f5,#5745ff 65%,#9d41ea); }
.home-fit .quote-eyebrow { font-size: 9px; letter-spacing: .8px; }
.home-fit .quote-card blockquote { font-size: 18px; line-height: 1.35; }
.home-fit .quote-card footer { display: none; }
.home-fit .dashboard-wrapper { padding: 0; margin: 9px 0 0; background: none; }
.home-fit .calendar-card { margin: 0 0 6px; background: #201b50a6; border-color: #6e62bc; border-radius: 18px; }
.home-fit .calendar-header { min-height: 38px; padding: 6px 12px 3px; font-size: 12px; font-weight: 600; }
.week-arrows { display:flex; gap: 6px; }
.week-arrow { width: 25px; height: 25px; border-radius: 50%; background: #4b4294; display: grid; place-items: center; font-size: 20px; line-height: 1; padding: 0 0 2px; }
.home-fit .calendar-header .icon-btn, .home-fit .calendar-header .icon-btn img { width: 27px; height: 27px; flex-basis: 27px; }
.home-fit .calendar-grid { background: transparent; padding: 4px 12px 8px; gap: 7px; min-height: 0; }
.home-fit .calendar-day { height: 40px; padding: 4px 0 7px; gap: 2px; border-radius: 12px; background: #d8d6ec; }
.home-fit .calendar-day.active { background: #ff6b1a; }
.daily-goals { padding: 8px 12px; border-radius: 19px; background: #1c173fbd; margin-bottom: 7px; }
.goal-row { display: grid; grid-template-columns: 34px 1fr 23px; align-items: center; gap: 9px; padding: 2px 0 7px; }
.goal-row + .goal-row { border-top: 1px solid #7771bd25; padding-top: 8px; padding-bottom: 3px; }
.goal-symbol { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(120deg,#b877fc,#8653ff); }
.goal-symbol.red { background: linear-gradient(120deg,#ff7371,#f44355); }
.goal-label { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; font-size: 12px; margin-bottom: 6px; }
.goal-label small { font-size: 10px; color: #bcb0ec; text-align: right; }
.goal-meter { height: 13px; background: #373171; border-radius: 20px; overflow: hidden; }
.goal-meter > div { height: 100%; width: 0; background: linear-gradient(90deg,#9c66f8,#ba80ff); border-radius: inherit; transition: width .2s; }
.goal-meter.red > div { background: linear-gradient(90deg,#ff555e,#ff7778); }
.goal-more { background: #3b3279; border-radius: 50%; width: 23px; height: 23px; display: grid; place-items: center; font-size: 19px; line-height: 1; padding: 0 0 2px; }
.recovery-preview { display: block; border: 0; background: #393071; border-radius: 14px; width: calc(100% - 43px); margin: 4px 0 0 43px; color: #d1c5fd; font-size: 10px; text-align: left; padding: 6px 9px; }
.home-fit .mosaic-grid { gap: 7px; }
.home-fit .art-card { position: relative; overflow: visible; box-shadow: 0 5px 6px #100c352e; border-radius: 18px; }
.art-card .card-art { display:block; width:100%; height:auto; }
.art-card .card-art text { font-family: Inter, 'Segoe UI', sans-serif; font-weight: 800; }
.dashboard-dialog { position: fixed; inset: 0; margin: auto; width: min(370px,calc(100vw - 24px)); max-height: min(680px,calc(100dvh - 32px)); overflow-y: auto; padding: 22px; border: 1px solid #7977d4; border-radius: 23px; background: #29245b; color: white; box-shadow: 0 20px 90px #0008; }
.dashboard-dialog::backdrop { background: #0d0926b3; }
.dashboard-dialog h2 { font-size: 21px; margin: 8px 0 12px; }
.dashboard-dialog .dialog-close { float: right; background: #51468d; border-radius: 50%; width: 29px; height: 29px; }
.dashboard-dialog p { font-size: 12px; line-height: 1.6; color:#d0c8ed; margin: 10px 0; }
.dashboard-dialog .goal-entry { border-top: 1px solid #8475bc50; padding: 12px 0; }
.dashboard-dialog label { display:block; margin:12px 0 5px; font-size:12px; }
.dashboard-dialog .primary-button { margin-top: 10px; }
.library-switch { display:flex; gap:8px; margin: 12px 0; }
.library-switch button { padding: 9px 16px; border-radius: 18px; background:#252150; color:#bfb5e5; }
.library-switch button[aria-pressed=true] { background:#b2b2eb; color:#211e43; }
@media (prefers-reduced-motion: reduce) { .goal-meter > div { transition:none; } }

/* Home only: reference-aligned horizontal capsules; calculations stay in their existing models. */
#home-view .daily-goals.goals-capsules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:0;background:transparent;border:0;margin-bottom:9px;}
.goals-capsules .goal-capsule{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:17px 26px 6px;align-content:space-between;align-items:center;column-gap:7px;min-width:0;height:80px;min-height:80px;padding:10px 10px 9px;border:1px solid #8970da40;border-radius:18px;background:linear-gradient(140deg,#29234f,#211c43 75%);color:#f0eafb;text-decoration:none;box-sizing:border-box;text-align:left;cursor:pointer;font-family:'Rounded Mplus 1c',sans-serif;box-shadow:inset 0 1px 0 #b69aef08,0 2px 9px #12102918;}
.goals-capsules .goal-capsule:focus-visible{outline:2px solid #d6baf4;outline-offset:2px;}
.goals-capsules .capsule-icon{grid-column:1;grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:radial-gradient(circle at 36% 26%,#8b6ad0,#54408c 75%);color:#d8bbff;box-shadow:0 0 13px #a883ec20,inset 0 1px 1px #e3c6ff12;}
.goals-capsules .capsule-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
.goals-capsules .capsule-title{grid-column:2;grid-row:1;font-family:'Rounded Mplus 1c',sans-serif!important;font-size:9px!important;line-height:1.15;font-weight:500;white-space:nowrap;color:#e6dcf8;}
.goals-capsules .capsule-value{grid-column:2;grid-row:2;align-self:start;font-size:19px;font-weight:800;line-height:1.2;color:#f0eafb;}
.goals-capsules .capsule-detail{grid-column:2;grid-row:2;align-self:end;font-size:7px;line-height:1.15;color:#c9bcdf;font-weight:500;min-width:0;}
.goals-capsules .overdue-capsule .capsule-value{font-size:18px;line-height:1;}
.goals-capsules .overdue-capsule .capsule-icon{background:radial-gradient(circle at 35% 25%,#79528b,#483358 80%);color:#ee99df;box-shadow:0 0 13px #df7cd918,inset 0 1px 1px #ffd1fa0f;}
.goals-capsules .habits-capsule .capsule-icon{background:radial-gradient(circle at 35% 25%,#795b70,#42334e 80%);color:#ffcf98;box-shadow:0 0 13px #f8bb8215;}
.goals-capsules .habits-capsule .capsule-icon svg{fill:currentColor;stroke-width:1;}
.goals-capsules .goal-meter{grid-column:1/-1;grid-row:3;display:block;width:100%;height:5px;min-height:5px;margin:0;background:#463c70;border-radius:20px;overflow:hidden;}
.goals-capsules .goal-meter>span{display:block;height:100%;width:0;border-radius:inherit;background:#b18af1;transition:width .2s;box-shadow:0 0 6px #b18af130;}
.goals-capsules .today-capsule.is-achieved .capsule-value{color:#98d8c9;}
.goals-capsules .today-capsule.is-achieved .goal-meter>span{background:#98d8c9;}
.goals-capsules .is-recovering .capsule-detail{color:#e9bc87;}
.goals-capsules .has-overdue:not(.is-recovering) .capsule-detail{color:#f4a6b4;}
.goals-capsules .capsule-heatmap{grid-column:2;grid-row:2;align-self:start;display:flex;align-items:center;gap:2px;min-height:13px;margin-top:3px;}
.goals-capsules .capsule-day{display:block;flex:1 1 0;max-width:7px;min-width:0;height:10px;box-sizing:border-box;border:1px solid #a593cc38;border-radius:2px;background:#4a406b;}
.goals-capsules .capsule-day.completed{background:#bea2f2;border-color:#d1b9ff66;}
.goals-capsules .capsule-day.partial{background:#8c71bc;}
.goals-capsules .capsule-day.missed{background:#b76d8455;border-color:#ce8598;}
.goals-capsules .capsule-day.rest{background:repeating-linear-gradient(45deg,#544560 0 2px,#b9a2d0 2px 3px);}
.goals-capsules .capsule-day.unscheduled{background:transparent;border-style:dotted;}
.goals-capsules .habits-period{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap;}
.goals-capsules [hidden]{display:none!important;}
.goals-capsules #dashboard-warning{grid-column:1/-1;margin:0;}
@media(max-width:350px){#home-view .daily-goals.goals-capsules{gap:4px}.goals-capsules .goal-capsule{grid-template-columns:27px minmax(0,1fr);column-gap:4px;padding-inline:6px;border-radius:15px}.goals-capsules .capsule-icon{width:27px;height:27px}.goals-capsules .capsule-icon svg{width:20px;height:20px}.goals-capsules .capsule-title{font-size:8px!important;letter-spacing:-.15px}.goals-capsules .capsule-value{font-size:18px}.goals-capsules .capsule-detail{font-size:6.5px}.goals-capsules .capsule-heatmap{gap:1px}}
@media(prefers-reduced-motion:reduce){.goals-capsules .goal-meter>span{transition:none}}
/* Approved compact layout: strengthen only the narrow-phone recovery copy. */
@media(max-width:350px){.goals-capsules .overdue-capsule .capsule-detail{font-size:7.5px;line-height:1.1;font-weight:800;color:#e4d7f5}.goals-capsules .is-recovering .capsule-detail{color:#f3d1a8}}
