/* Smart Muslim V2 · final reference-match layer v2.
   Kept separate so palette, spacing and components can be tuned safely. */
:root{--r-page:#f7f1e8;--r-card:#fffdf9;--r-tile:#fbf7f0;--r-ink:#17372f;--r-muted:#6f7771;--r-line:#e9dfd2;--r-green:#1d5b4b;--r-purple:#73579a;--r-coral:#ce7069;--r-sand:#b78b54;--r-shadow:0 5px 16px rgba(62,51,38,.055);--r-radius:13px}
body:not(.dark-theme){background:#e9e0d4}
.app-container{padding:11px 12px 78px;gap:10px;background:var(--r-page);box-shadow:0 0 30px rgba(55,43,31,.09)}
.app-container>footer{display:none}.bottom-nav-item:focus{outline:none}
.app-container>header{margin:0;padding:0 2px 3px}.top-bar{margin:0 0 2px;min-height:30px}.home-toggle-btn{padding:0!important;min-width:auto!important;min-height:30px!important;font-size:.66rem!important}.assistant-quick-btn{width:30px;height:30px;min-width:30px;min-height:30px;padding:6px}.app-container>header h1{font:800 1.16rem/1.1 Inter,-apple-system,sans-serif;color:var(--r-ink)}.brand-desc{font-size:.68rem;color:var(--r-muted)}
body:has(#view-routine-hub[style*="display: block"]) .app-container>header,body:has(#view-impara-hub[style*="display: block"]) .app-container>header,body:has(#view-vita-hub[style*="display: block"]) .app-container>header,body:has(#view-profilo-hub[style*="display: block"]) .app-container>header{display:none}
#view-home[style*="display: block"]{display:flex!important;flex-direction:column;gap:9px}#view-home[style*="display: block"] .smart-hero{order:-10}#view-home[style*="display: block"] .home-prayer-priority{order:-9}#view-home[style*="display: block"] .home-continue-section{order:-8}#view-home[style*="display: block"] .home-icon-grid{order:-7}#view-home[style*="display: block"] .daily-message-card{order:-6}#view-home[style*="display: block"] .home-insight-card{order:-5}#view-home[style*="display: block"] .home-quiz-card{order:-4}
.smart-hero{min-height:0;margin:0;padding:12px 11px 10px;border:1px solid var(--r-line);border-radius:var(--r-radius);background:var(--r-card);box-shadow:var(--r-shadow)}.smart-hero::after{display:none}.smart-hero h2{margin:0 0 2px;font:750 .83rem/1.2 Inter,sans-serif;color:var(--r-ink)}.smart-hero p{margin:0;font-size:.58rem;line-height:1.3}.smart-hero-action{display:none}
.home-need-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:9px}.home-need-grid button{min-width:0;padding:7px 2px 6px;display:grid;justify-items:center;gap:4px;color:var(--r-ink);border:0;border-radius:10px;background:var(--r-tile);font-family:Inter,sans-serif}.home-need-grid span{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;color:var(--r-green);background:#e6efe8}.home-need-grid button:nth-child(2) span{color:var(--r-purple);background:#eee8f4}.home-need-grid button:nth-child(3) span{color:#bb842e;background:#faefd8}.home-need-grid button:nth-child(4) span{color:#5d86a5;background:#e8f0f5}.home-need-grid .sm-icon{width:15px;height:15px}.home-need-grid small{overflow:hidden;text-overflow:ellipsis;font-size:.54rem;font-weight:650}
.home-prayer-priority{margin:0;position:relative}.home-prayer-priority>.card{min-height:118px;padding:13px 48% 12px 12px!important;overflow:hidden;color:var(--r-ink)!important;border:1px solid var(--r-line)!important;border-radius:var(--r-radius)!important;background:var(--r-card)!important;box-shadow:var(--r-shadow)!important}.home-prayer-priority>.card::after{content:"";position:absolute;inset:0 0 0 45%;background:url('assets/ui/pearl/prayer-mosque.jpg') center/cover no-repeat;pointer-events:none}.home-prayer-priority>.card>*{position:relative;z-index:1}.home-prayer-priority h3{font-size:1.2rem!important;color:var(--r-ink)!important}.home-prayer-priority span{color:var(--r-green)!important;font-size:.87rem!important}.home-prayer-priority button{color:var(--r-green)!important}
.home-continue-section,.daily-message-card,.home-insight-card,.home-quiz-card,.home-icon-grid{margin:0;border-color:var(--r-line);border-radius:var(--r-radius);background:var(--r-card);box-shadow:var(--r-shadow)}.home-continue-section{padding:10px}.home-icon-grid{padding:7px 5px;gap:3px}.home-icon-grid button{padding:4px 1px;font-size:.54rem}.home-menu-icon{width:29px;height:29px;border-radius:9px}.daily-message-card,.home-insight-card,.home-quiz-card{padding:10px 11px}
.hub-section{padding:0 0 8px}.hub-header{display:flex;flex-direction:column;margin:0 1px 9px;padding:3px 1px 1px;border:0;border-radius:0;background:transparent;box-shadow:none}.hub-header .hub-title{order:1;margin:0 0 3px;font:800 1.24rem/1.1 Inter,sans-serif;letter-spacing:-.025em;color:var(--r-ink)!important}.hub-header .hub-eyebrow{order:2;font-size:.65rem;font-weight:450;letter-spacing:0;text-transform:none;color:var(--r-muted)}
.hub-group{margin:0 0 9px;padding:9px;border:1px solid var(--r-line);border-radius:var(--r-radius);background:var(--r-card);box-shadow:var(--r-shadow)}.hub-group-label{margin:0 0 7px;color:var(--r-ink);font-size:.61rem;font-weight:750;letter-spacing:0;text-transform:none}.hub-grid{gap:6px}
.hub-card,.hub-section.hub-routine .hub-card,.hub-section.hub-impara .hub-card,.hub-section.hub-vita .hub-card,.hub-section.hub-profilo .hub-card{min-height:0;padding:8px;gap:4px;border:1px solid #eee6dc;border-radius:10px;background:var(--r-tile);box-shadow:0 3px 9px rgba(53,45,36,.035)}.hub-card .hub-icon{width:31px;height:31px;flex-basis:31px;border-radius:9px}.hub-card .hub-icon .sm-icon{width:17px;height:17px}.hub-card strong{font-size:.66rem;color:var(--r-ink)}.hub-card small{font-size:.54rem;line-height:1.2;color:var(--r-muted)}
.hub-routine .hub-grid{gap:6px}.hub-routine .hub-card{min-height:82px;align-content:start;text-align:center;justify-items:center;padding:8px 5px}.hub-routine .hub-card small{display:none}.hub-routine .hub-group:last-child .hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.hub-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 9px}.hub-quick-grid button{min-height:76px;padding:9px 4px 7px;display:grid;justify-items:center;align-content:center;gap:6px;color:var(--r-ink);border:1px solid var(--r-line);border-radius:11px;background:var(--r-card);box-shadow:var(--r-shadow);font-family:Inter,sans-serif}.hub-quick-grid span{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;color:var(--r-purple);background:#efe9f5}.hub-quick-grid button:first-child span{color:#c56288;background:#f8e9ef}.hub-quick-grid button:last-child span{color:#6774ae;background:#e9eaf6}.hub-quick-grid .sm-icon{width:17px;height:17px}.hub-quick-grid strong{font-size:.6rem}
.hub-impara .hub-group-stories .hub-grid,.hub-impara .hub-group-library .hub-grid,.hub-vita .hub-grid,.hub-profilo .hub-grid{grid-template-columns:1fr}.hub-impara .hub-group-stories .hub-card,.hub-impara .hub-group-library .hub-card,.hub-vita .hub-card,.hub-profilo .hub-card{min-height:52px;display:grid;grid-template-columns:37px minmax(0,1fr) 13px;grid-template-rows:auto auto;column-gap:8px;row-gap:1px;align-items:center;padding:6px 8px}.hub-story-thumb{width:37px;height:37px;grid-row:1/3;border-radius:8px;object-fit:cover;border:1px solid rgba(23,55,47,.08)}.hub-impara .hub-group-stories .hub-card strong,.hub-impara .hub-group-library .hub-card strong,.hub-vita .hub-card strong,.hub-profilo .hub-card strong{grid-column:2;align-self:end}.hub-impara .hub-group-stories .hub-card small,.hub-impara .hub-group-library .hub-card small,.hub-vita .hub-card small,.hub-profilo .hub-card small{grid-column:2;align-self:start}.hub-impara .hub-group-stories .hub-card::after,.hub-impara .hub-group-library .hub-card::after,.hub-vita .hub-card::after,.hub-profilo .hub-card::after{content:'›';grid-column:3;grid-row:1/3;color:var(--r-muted);font-size:1rem}.hub-impara .hub-group-library .hub-icon,.hub-vita .hub-icon,.hub-profilo .hub-icon{grid-row:1/3}
.hub-vita .hub-group,.hub-profilo .hub-group{padding:0;border:0;background:transparent;box-shadow:none}.hub-vita .hub-group-label,.hub-profilo .hub-group-label{margin-left:2px}.hub-vita .hub-card,.hub-profilo .hub-card{background:var(--r-card)}.hub-card-soon{opacity:1;border-style:solid}
.profile-assistant-card{width:100%;min-height:96px;margin:0 0 10px;padding:13px;display:flex;justify-content:space-between;align-items:center;text-align:left;color:var(--r-ink);border:1px solid #f0dedb;border-radius:var(--r-radius);background:radial-gradient(circle at 91% 50%,#f7dcd9 0 31px,transparent 32px),linear-gradient(135deg,#fffdf9,#fbefec);box-shadow:var(--r-shadow);font-family:Inter,sans-serif}.profile-assistant-copy{display:grid;gap:3px}.profile-assistant-copy strong{font-size:.88rem}.profile-assistant-copy small{max-width:190px;font-size:.58rem;color:var(--r-muted)}.profile-assistant-copy em{width:max-content;margin-top:5px;padding:5px 8px;border-radius:7px;color:var(--r-coral);background:#fae7e4;font-size:.55rem;font-style:normal;font-weight:700}.profile-assistant-icon{width:42px;height:42px;display:grid;place-items:center;color:var(--r-coral)}.profile-assistant-icon .sm-icon{width:25px;height:25px}
.bottom-nav{bottom:0;width:min(430px,100%);height:calc(61px + env(safe-area-inset-bottom));padding:6px 8px max(6px,env(safe-area-inset-bottom));border:0;border-top:1px solid var(--r-line);border-radius:0;background:rgba(255,253,249,.97);box-shadow:0 -3px 14px rgba(48,38,28,.045)}.bottom-nav-item{gap:2px;border-radius:0;font-size:.51rem;font-weight:550;background:transparent!important}.bottom-nav-item svg{width:18px;height:18px}.bottom-nav-item.active[data-nav-key="oggi"],.bottom-nav-item.active[data-nav-key="routine"]{color:var(--r-green)}.bottom-nav-item.active[data-nav-key="impara"]{color:var(--r-purple)}.bottom-nav-item.active[data-nav-key="vita"]{color:var(--r-coral)}.bottom-nav-item.active[data-nav-key="profilo"]{color:var(--r-sand)}
.amin-fab{right:12px;bottom:calc(68px + env(safe-area-inset-bottom));width:43px;height:43px;border-width:3px;box-shadow:0 8px 19px rgba(29,91,75,.23)}.amin-fab svg{width:18px;height:18px}
body.dark-theme{--r-page:#101a17;--r-card:#17231f;--r-tile:#1d2a25;--r-ink:#f4f0e9;--r-muted:#aab6af;--r-line:#314039;--r-shadow:0 5px 18px rgba(0,0,0,.2)}body.dark-theme .app-container{background:var(--r-page)}body.dark-theme .smart-hero,body.dark-theme .hub-group,body.dark-theme .hub-quick-grid button,body.dark-theme .hub-card,body.dark-theme .hub-vita .hub-card,body.dark-theme .hub-profilo .hub-card{background:var(--r-card);border-color:var(--r-line)}body.dark-theme .home-need-grid button{background:var(--r-tile);color:var(--r-ink)}body.dark-theme .home-prayer-priority>.card{background:var(--r-card)!important;border-color:var(--r-line)!important}body.dark-theme .home-prayer-priority h3{color:var(--r-ink)!important}body.dark-theme .bottom-nav{background:rgba(23,35,31,.97);border-color:var(--r-line);box-shadow:0 -3px 16px rgba(0,0,0,.25)}body.dark-theme .profile-assistant-card{color:var(--r-ink);border-color:#593d3d;background:radial-gradient(circle at 91% 50%,#583b3b 0 31px,transparent 32px),linear-gradient(135deg,#1b2723,#2a2221)}
@media(max-width:400px){.app-container{padding-inline:11px}.hub-routine .hub-card{min-height:78px;padding:7px 3px}.hub-routine .hub-card strong{font-size:.61rem}.amin-fab{width:41px;height:41px}}
