/* MoneyBuddy v68 — restrained premium-wide design refinement.
   Loaded AFTER legacy theme, v65 tools, v66 calculator, v67 modal centering.
   Purpose: clear hierarchy, consistent spacing and quality, no visual clutter. */
:root {
 --mb68-ink:#1b2c2a; --mb68-forest:#174e42; --mb68-forest-deep:#103d34;
 --mb68-muted:#60716b; --mb68-gold:#c6a35b; --mb68-border:rgba(27,70,57,.115);
 --mb68-card:#fffefa; --mb68-canvas:#f7f8f4;
 --mb68-soft-shadow:0 16px 42px -35px rgba(20,57,47,.34),0 3px 10px -9px rgba(20,57,47,.17);
 --mb68-hero-shadow:0 24px 64px -42px rgba(18,56,46,.48),0 6px 22px -18px rgba(18,56,46,.22);
}
html {color-scheme:light;scroll-padding-top:95px;}
body {font-synthesis:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
body,main,html[data-season] body,html[data-season] main{background-color:var(--mb68-canvas)!important;}
body { background-image:radial-gradient(ellipse 55% 28% at 95% 7%,rgba(209,226,212,.20),transparent 85%) !important; }
button,input,select,textarea{font-family:Inter,system-ui,-apple-system,sans-serif;}
button,a,[role="button"]{-webkit-tap-highlight-color:transparent;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role="button"]:focus-visible{outline:2px solid var(--mb68-gold)!important;outline-offset:3px!important;}
/* Header / navigation: no independent floating sync badge overlapping page content. */
header.sticky{background:rgba(255,254,250,.96)!important;border-bottom:1px solid var(--mb68-border)!important;box-shadow:0 12px 26px -28px rgba(17,57,47,.45)!important;backdrop-filter:blur(20px) saturate(1.08)!important;}
#mb-header-inner{max-width:1360px!important;display:flex!important;gap:clamp(8px,1vw,16px)!important;min-width:0!important;}
#mb-header-inner > div:first-child{flex:0 1 auto!important;min-width:0!important;}
#mb-header-inner > div:last-child{min-width:0!important;flex:0 1 auto!important;gap:clamp(6px,.8vw,12px)!important;}
#mb-header-inner .moneybuddy-brand-title{font-family:"Plus Jakarta Sans",Inter,sans-serif!important;font-weight:800!important;letter-spacing:-.047em!important;color:var(--mb68-ink)!important;}
#mb-header-inner .mb-product-nav{gap:4px!important;min-width:0!important;margin-left:auto!important;margin-right:6px!important;}
#mb-header-inner .mb-product-nav button{padding:10px clamp(8px,1vw,13px)!important;border-radius:12px!important;font-size:12.5px!important;color:#5c6c66!important;white-space:nowrap!important;transition:background .16s ease,color .16s ease!important;}
#mb-header-inner .mb-product-nav button.is-active{background:#e8f1eb!important;color:var(--mb68-forest-deep)!important;box-shadow:inset 0 0 0 1px rgba(27,87,65,.08)!important;}
#mb-header-inner .mb-product-nav button:hover{background:#f0f5f0!important;color:var(--mb68-forest-deep)!important;}
#headerSignInBtn{min-width:0!important;min-height:40px!important;padding:0 13px!important;border-radius:12px!important;white-space:nowrap!important;background:#f2f6f1!important;}
#mb-header-inner button[onclick="openAddEntryModal()"]{border-radius:12px!important;min-height:42px!important;box-shadow:0 10px 20px -16px rgba(9,64,46,.72)!important;}
#moneyBuddyAutoSaveStatus{
 position:static!important;inset:auto!important;top:auto!important;right:auto!important;
 flex:0 0 35px!important;width:35px!important;min-width:35px!important;height:35px!important;
 min-height:35px!important;max-width:35px!important;padding:0!important;margin:0!important;
 justify-content:center!important;border-radius:11px!important;box-shadow:none!important;
 white-space:nowrap!important;transform:none!important;
}
#moneyBuddyAutoSaveStatus .autosave-icon{font-size:18px!important;}
#moneyBuddyAutoSaveStatus .autosave-label{display:none!important;}
#moneyBuddyAutoSaveStatus[data-state="idle"],
#moneyBuddyAutoSaveStatus[data-state="local"]{display:none!important;}
/* Dashboard: distinct hero, quiet supporting cards, consistently weighted typography. */
#mb-main-shell{max-width:1360px!important;}
#mb-main-shell section,#mb-main-shell .money-summary-card{min-width:0;}
#mb-main-shell h2,#mb-main-shell h3,.mb-feature-heading h1,.mb-learn-hero h2,.mb-tool-card h3,.mb-lesson-card h3{
 font-family:"Plus Jakarta Sans",Inter,system-ui,sans-serif!important;letter-spacing:-.028em!important;color:var(--mb68-ink)!important;
}
#mb-main-shell p,#mb-main-shell span,.mb-feature-shell p,.mb-feature-shell label{overflow-wrap:break-word;}
:is(#where-it-goes-section,#money-plant-section,#upcoming-obligations-card,#recent-activity-card,#net-worth-section,#buddy-insight-card,#daily-tip-card,.money-summary-card){
 border:1px solid var(--mb68-border)!important;border-radius:23px!important;box-shadow:var(--mb68-soft-shadow)!important;
}
#buddyHeroCard,#flexible-money-card{border-radius:26px!important;box-shadow:var(--mb68-hero-shadow)!important;}
#buddyHeroCard{border-color:rgba(35,77,63,.13)!important;}
#flexible-money-card{border-color:rgba(24,97,70,.19)!important;}
#upcoming-obligations-card,#recent-activity-card{background:var(--mb68-card)!important;}
#where-it-goes-section{background:linear-gradient(158deg,#fffefa 0%,#f8f8f2 100%)!important;}
#net-worth-section{background:linear-gradient(165deg,#fffefa,#f5f8f5)!important;}
#money-plant-section{background:linear-gradient(146deg,#fffefa,#f0f7ef)!important;}
#moneybuddy-brand-hero{isolation:isolate;}
#moneybuddy-brand-hero .moneybuddy-brand-hero-inner{border-radius:24px!important;box-shadow:0 16px 48px -38px rgba(17,57,47,.55)!important;}
#heroBuddyName{letter-spacing:-.04em!important;}
#heroBuddyDescription{line-height:1.55!important;}
#heroBuddyMessage{line-height:1.6!important;}
#mb-main-shell .font-label-sm,#mb-main-shell .mb-eyebrow{letter-spacing:.08em;}
/* Premium but approachable interactive elements — no huge hover jumps. */
#mb-main-shell button:not(.buddy-card):not(.first-run-choice),
.mb-feature-shell button,.mb-product-modal-card button{transition:background-color .17s ease,border-color .17s ease,color .17s ease,box-shadow .17s ease,transform .17s ease!important;}
#mb-main-shell button:disabled,.mb-feature-shell button:disabled{opacity:.6;cursor:not-allowed;}
#moneyBuddyLearnPreview{border-radius:24px!important;box-shadow:var(--mb68-soft-shadow)!important;}
#moneyBuddyLearnPreview .mb-lesson-mini{background:rgba(255,255,255,.84)!important;border-radius:17px!important;}
#moneyBuddyLearnPreview .mb-learn-preview-cta{border-radius:13px!important;}
/* Learn, Activity and Money Tools each share one editorial surface system. */
#moneyBuddyFeatureLayer{background:var(--mb68-canvas)!important;background-image:radial-gradient(ellipse 65% 30% at 93% 0%,rgba(223,238,225,.48),transparent 78%)!important;}
#moneyBuddyFeatureLayer .mb-feature-shell{max-width:1200px!important;padding-top:clamp(24px,3.6vw,45px)!important;padding-bottom:98px!important;}
#moneyBuddyFeatureLayer .mb-feature-topbar{margin-bottom:clamp(21px,2.8vw,30px)!important;}
#moneyBuddyFeatureLayer .mb-feature-heading h1{font-size:clamp(30px,3.7vw,44px)!important;line-height:1.12!important;letter-spacing:-.045em!important;font-weight:800!important;}
#moneyBuddyFeatureLayer .mb-feature-heading p{line-height:1.65!important;color:var(--mb68-muted)!important;max-width:60ch;}
#moneyBuddyFeatureLayer .mb-eyebrow{letter-spacing:.14em!important;color:#34735c!important;}
#moneyBuddyFeatureLayer .mb-feature-close{border-radius:14px!important;box-shadow:0 7px 20px -18px rgba(16,62,47,.5)!important;}
#moneyBuddyFeatureLayer .mb-surface{border:1px solid var(--mb68-border)!important;border-radius:24px!important;box-shadow:var(--mb68-soft-shadow)!important;}
#moneyBuddyFeatureLayer .mb-learn-hero{overflow:hidden!important;}
#moneyBuddyFeatureLayer .mb-learn-hero-copy{background:linear-gradient(125deg,#fffefa,#f7f9f4)!important;padding:clamp(22px,2.6vw,34px)!important;}
#moneyBuddyFeatureLayer .mb-learn-hero-copy h2{font-size:clamp(22px,2.4vw,30px)!important;line-height:1.2!important;}
#moneyBuddyFeatureLayer .mb-learn-progress{background:linear-gradient(155deg,#174b40,#10372f)!important;}
#moneyBuddyFeatureLayer .mb-learn-progress .ring{border-color:rgba(255,255,255,.2)!important;}
#moneyBuddyFeatureLayer .mb-feature-toolbar{gap:8px!important;}
#moneyBuddyFeatureLayer .mb-chip{border-radius:12px!important;background:#fffefa!important;border:1px solid var(--mb68-border)!important;color:#50665c!important;padding:10px 14px!important;}
#moneyBuddyFeatureLayer .mb-chip.is-active{background:var(--mb68-forest)!important;border-color:var(--mb68-forest)!important;color:#fff!important;}
#moneyBuddyFeatureLayer .mb-lesson-grid,#moneyBuddyFeatureLayer .mb-toolkit-grid{gap:clamp(12px,1.4vw,17px)!important;}
#moneyBuddyFeatureLayer .mb-lesson-card,#moneyBuddyFeatureLayer .mb-tool-card{
 background:linear-gradient(155deg,#fffefa 0%,#ffffff 82%)!important;
 border:1px solid var(--mb68-border)!important;border-radius:22px!important;
 box-shadow:0 13px 30px -29px rgba(16,62,47,.35)!important;
 padding:clamp(17px,1.7vw,22px)!important;min-width:0;
}
#moneyBuddyFeatureLayer .mb-lesson-card:hover,#moneyBuddyFeatureLayer .mb-tool-card:hover{
 transform:translateY(-2px)!important;border-color:rgba(30,109,77,.35)!important;
 box-shadow:0 20px 35px -27px rgba(16,62,47,.38)!important;
}
#moneyBuddyFeatureLayer .mb-tool-icon,#moneyBuddyFeatureLayer .mb-lesson-icon{background:#e9f2e9!important;color:#185340!important;border-radius:14px!important;}
#moneyBuddyFeatureLayer .mb-tool-card h3,#moneyBuddyFeatureLayer .mb-lesson-card h3{font-size:15.5px!important;line-height:1.38!important;}
#moneyBuddyFeatureLayer .mb-tool-card p,#moneyBuddyFeatureLayer .mb-lesson-card p{font-size:12.5px!important;line-height:1.6!important;color:var(--mb68-muted)!important;}
#moneyBuddyFeatureLayer .mb-tool-card small{color:#206c53!important;}
#moneyBuddyFeatureLayer .mb-activity-summary .mb-summary-cell{background:#fffefa!important;border:1px solid var(--mb68-border)!important;border-radius:20px!important;box-shadow:var(--mb68-soft-shadow)!important;}
#moneyBuddyFeatureLayer .mb-activity-filterbar{padding:17px!important;gap:10px!important;}
#moneyBuddyFeatureLayer .mb-activity-full-row{background:#fffefa!important;}
#moneyBuddyFeatureLayer .mb-activity-full-row:hover{background:#f7faf5!important;}
#moneyBuddyFeatureLayer .mb-activity-date-group{background:#f4f8f3!important;}
#moneyBuddyFeatureLayer .mb-edit-icon{border-radius:12px!important;}
/* Modals: consistent radius, subtle elevation and stable controls. Safety Cushion untouched. */
:is(#add-entry-modal-content,#edit-entry-modal-content,#buddy-modal-content,#sign-in-modal-content,
#moneyBuddyProductModal .mb-product-modal-card,#moneyBuddyFeedbackModal > div,
#bill-modal > div,#all-bills-modal > div,#afford-modal > div,#asset-modal > div,
#debt-modal > div,#manage-net-worth-modal > div,#moneyBuddySeasonModal .season-modal-card,
#moneyBuddyPrivacyModal .privacy-card){
 border-radius:24px!important;border:1px solid rgba(35,70,59,.14)!important;
 background:#fffefa!important;box-shadow:0 32px 82px -40px rgba(13,49,39,.55)!important;
}
#moneyBuddyProductModal .mb-product-modal-head{background:#fffefa!important;border-bottom-color:var(--mb68-border)!important;padding:21px 24px!important;}
#moneyBuddyProductModal .mb-product-modal-body{padding:22px 24px!important;}
#moneyBuddyProductModal .mb-product-modal-actions{background:#fffefa!important;border-top-color:var(--mb68-border)!important;}
.mb-btn-primary,.mb-product-modal-card .mb-btn-primary{background:var(--mb68-forest)!important;border-color:var(--mb68-forest)!important;color:#fff!important;border-radius:13px!important;}
.mb-btn-secondary,.mb-product-modal-card .mb-btn-secondary{border-radius:13px!important;}
.mb-tool-result{background:#edf5ed!important;border:1px solid rgba(28,98,68,.17)!important;border-radius:18px!important;}
.mb-tool-form label{font-size:12px!important;letter-spacing:.012em!important;color:#425c50!important;}
.mb-product-modal-card input,.mb-product-modal-card select,.mb-product-modal-card textarea{
 border-radius:12px!important;min-height:42px!important;border-color:rgba(29,77,57,.2)!important;background:#fff!important;
}
#buddy-modal-content .buddy-card{border-radius:17px!important;}
#buddy-modal-content .buddy-picker-grid{gap:11px!important;}
/* Keep unlocked character art bright and original; locked art stays blurred per v63. */
.mb-v62-locked-art,.mb-v63-mystery-art{animation-duration:inherit;}
/* Layout limits: avoid icon/title crashes at intermediate widths. */
@media (min-width:1000px) and (max-width:1279px){
 #mb-header-inner .mb-product-nav button{padding-left:8px!important;padding-right:8px!important;font-size:11.75px!important;}
 #mb-header-inner #moneyBuddyXFollow .mb-x-label{display:none!important;}
 #mb-header-inner .moneybuddy-brand-title{font-size:clamp(13px,1.1vw,16px)!important;}
}
@media(max-width:999px){
 #mb-header-inner .mb-product-nav{display:none!important;}
}
@media(max-width:767px){
 #mb-header-inner{padding-left:12px!important;padding-right:12px!important;}
 #mb-header-inner #moneyBuddyAutoSaveStatus[data-state="idle"],
#moneyBuddyAutoSaveStatus[data-state="local"]{display:none!important;}
 #mb-header-inner #moneyBuddyAutoSaveStatus:not([data-state="idle"]){width:32px!important;min-width:32px!important;height:32px!important;flex-basis:32px!important;}
 #moneyBuddyFeatureLayer .mb-feature-shell{padding-top:20px!important;padding-left:14px!important;padding-right:14px!important;}
 #moneyBuddyFeatureLayer .mb-feature-heading h1{font-size:clamp(25px,6.5vw,31px)!important;}
 #moneyBuddyFeatureLayer .mb-feature-heading p{font-size:13px!important;}
 #moneyBuddyFeatureLayer .mb-lesson-card,#moneyBuddyFeatureLayer .mb-tool-card{min-height:0!important;}
 #moneyBuddyFeatureLayer .mb-learn-hero-copy{padding:20px!important;}
 #mb-main-shell #buddyHeroCard,#mb-main-shell #flexible-money-card{border-radius:21px!important;}
 #mb-main-shell :is(#where-it-goes-section,#money-plant-section,#upcoming-obligations-card,#recent-activity-card,#net-worth-section){border-radius:20px!important;}
 .mb65-mobile-shortcuts button{border-radius:14px!important;box-shadow:0 8px 18px -17px rgba(24,74,51,.55)!important;}
 #moneyBuddyProductModal .mb-product-modal-head{padding:15px 17px!important;}
 #moneyBuddyProductModal .mb-product-modal-body{padding:17px!important;}
}
@media (max-width:350px){
 #mb-header-inner .moneybuddy-brand-title{font-size:12px!important;}
 #moneyBuddyFeatureLayer .mb-chip{padding:8px 10px!important;}
}
@media(prefers-reduced-motion:reduce){
 #moneyBuddyFeatureLayer .mb-lesson-card,#moneyBuddyFeatureLayer .mb-tool-card{transition:none!important;transform:none!important;}
}
