#nativeHome{display:none}
.halwa-native.native-home-open #nativeHome{display:block;position:fixed;top:68px;left:0;right:0;bottom:64px;padding:4px 14px 20px;overflow-y:auto;overscroll-behavior-y:contain;background:#f3f5f6;color:#172927;z-index:50;box-sizing:border-box;scroll-padding-bottom:20px}
.halwa-native.native-home-open .workspace{visibility:hidden;pointer-events:none}
.home-content{max-width:720px;margin:0 auto;letter-spacing:0}
.home-carousel{border-radius:8px;overflow:hidden;background:#fff;border:1px solid #dce3e3}
.home-carousel[hidden],.home-slide-controls[hidden]{display:none}
.home-slide{display:block;width:100%;aspect-ratio:16/9;padding:0;border:0;background:#142b29;cursor:pointer}
.home-slide img{display:block;width:100%;height:100%;object-fit:contain}
.home-slide-controls{display:flex;align-items:center;justify-content:center;gap:2px;height:44px;padding:0 6px;border-top:1px solid #e5eaea;position:relative}
.home-slide-controls button{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;padding:0;border:0;background:transparent;color:#385a50;border-radius:6px;cursor:pointer}
.home-slide-controls .home-slide-pause{position:absolute;right:4px;top:0}
.home-slide-controls i{display:block;width:18px;height:18px;background:currentColor;mask:url('assets/icons/arrow-right.svg') center/contain no-repeat}
.home-slide-prev i{transform:rotate(180deg)}
.home-slide-pause i{mask-image:url('assets/icons/pause.svg')}
.home-slide-pause[aria-pressed=true] i{mask-image:url('assets/icons/play.svg')}
.home-slide-counter{width:48px;text-align:center;font:600 12px/1 system-ui;color:#536760;font-variant-numeric:tabular-nums}
.home-tools-heading{display:flex;align-items:center;margin:18px 0 10px;gap:8px}
.home-tools-heading h2{font:700 17px/1.4 system-ui;margin:0;letter-spacing:0}
.home-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.home-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:86px;padding:8px 4px;border:1px solid #dce3e3;border-radius:8px;background:#fff;color:#243b35;font:600 13px/1.35 system-ui;text-align:center;letter-spacing:0;box-sizing:border-box;cursor:pointer}
.home-tool>span:not(.tool-icon){display:flex;align-items:center;justify-content:center;min-height:2.7em;max-width:100%;overflow-wrap:anywhere}
.home-tool .tool-icon,.home-tool .native-icon{display:block;width:26px!important;height:26px!important;min-width:26px!important;background-color:currentColor;color:#267759;flex:0 0 26px}
.home-tool:nth-child(3n+2) .tool-icon,.home-tool:nth-child(3n+2) .native-icon{color:#316c92}.home-tool:nth-child(3n) .tool-icon,.home-tool:nth-child(3n) .native-icon{color:#80578d}
.home-primary-tools .home-tool{background:#edf5f0;border-color:#ccded4;font-weight:700}
.home-primary-tools .home-tool:nth-child(2){background:#edf3fb;border-color:#d2dfed}
.home-primary-tools .home-tool:nth-child(3){background:#f4eff8;border-color:#e2d7e8}
.home-tool:active{background:#e4eddd}
.home-tool:focus-visible,.home-slide-controls button:focus-visible{outline:2px solid #267759;outline-offset:2px}
.template-v3.menu-rail.halwa-native.native-home-open .app-header .brand-copy strong{font-size:14px;line-height:1.3;letter-spacing:0}
.template-v3.menu-rail.halwa-native.native-home-open .app-header .brand-mark{width:36px;height:36px;flex:0 0 36px}
.native-icon-home{mask-image:url('assets/icons/home.svg')}
.halwa-native:not(.native-signed-in) .app-header #profileButton{display:none!important}
.home-sidebar-profile{width:100%;min-height:48px;padding:12px;margin:8px 0 16px;border:1px solid #4a6454;border-radius:12px;background:#253e31;color:#d3f779;font:600 14px system-ui;text-align:left}
.halwa-native #mathToolsSidebar .tab-nav{display:none!important}
.halwa-native .app-shell:not(.mobile-menu-open) #mathToolsSidebar{box-shadow:none}
@media(max-width:700px){.halwa-native .app-shell:not(.mobile-menu-open) #mathToolsSidebar{visibility:hidden;pointer-events:none}}
.halwa-native #mathToolsSidebar{box-sizing:border-box;height:calc(100dvh - 64px)!important;min-height:0!important;max-height:calc(100dvh - 64px)!important;padding-top:max(32px,env(safe-area-inset-top))!important;padding-bottom:20px!important}
.halwa-native #mathToolsSidebar #sidebarToggle{top:max(32px,env(safe-area-inset-top))!important}
.home-sidebar-account{margin-top:auto;flex:0 0 auto;width:100%;min-height:48px;padding:12px;border:1px solid #496056;border-radius:12px;background:#263d32;color:#e4f3e7;font:600 15px system-ui}
.native-signed-in .home-sidebar-account{color:#ffd4ca;background:#392825;border-color:#705047}
.slider-admin-actions,.slider-row-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.slider-upload{display:inline-flex;align-items:center;cursor:pointer;min-height:42px;padding:8px 14px;background:#cef43d;color:#162014;border-radius:8px;font-weight:700}
.slider-upload input{max-width:220px;margin-left:10px}
.slider-editor-card{display:grid;grid-template-columns:minmax(160px,280px) minmax(0,1fr);gap:20px;border:1px solid #42544d;padding:16px;border-radius:14px;margin-bottom:14px}
.slider-editor-card>img{width:100%;aspect-ratio:16/9;object-fit:contain;background:#142b29;border-radius:10px}
.slider-editor-card label{display:block;margin-bottom:12px}
.slider-editor-card input:not([type=checkbox]),.slider-editor-card select{display:block;width:100%;min-height:42px;margin-top:6px;padding:8px;box-sizing:border-box}
.slider-editor-card input[type=checkbox]{width:auto}
.slider-admin-actions button,.slider-row-actions button,#homeSliderRefresh{min-height:40px;padding:8px 14px;border:1px solid #4c6058;border-radius:9px;background:#263c32;color:#edf4f0;font:600 12px system-ui}
.slider-admin-actions button:disabled,.slider-row-actions button:disabled{opacity:.4}
#homeSliderSave{background:#cef43d;color:#172315;border:0}
.slider-editor-card input:not([type=checkbox]),.slider-editor-card select{border:1px solid #4c6058;border-radius:8px;background:#202d29;color:#edf4f0;font:14px system-ui}
.slider-upload input{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.slider-upload:focus-within{outline:2px solid #fff;outline-offset:3px}
#homeSliderStatus{min-height:24px}
.slider-url-field{margin-bottom:16px;min-width:0}
.slider-editor-card [hidden]{display:none!important}
.slider-url-error{margin:0 0 8px;color:#ffb9aa;font-size:13px;overflow-wrap:anywhere}
.slider-url-error:empty{display:none}
.slider-url-preview{color:#cef43d;text-underline-offset:3px;font-size:14px}
@media(max-width:600px){.slider-editor-card{grid-template-columns:1fr}}
html[data-theme=night] .halwa-native #nativeHome{background:#111c20;color:#e8f1ed}
html[data-theme=night] .home-tool{background:#1d292d;border-color:#3b4b4c;color:#e2ede7}
html[data-theme=night] .home-tool .tool-icon,html[data-theme=night] .home-tool .native-icon{color:#83cbb0}
html[data-theme=night] .home-tool:nth-child(3n+2) .tool-icon,html[data-theme=night] .home-tool:nth-child(3n+2) .native-icon{color:#8fbce0}
html[data-theme=night] .home-tool:nth-child(3n) .tool-icon,html[data-theme=night] .home-tool:nth-child(3n) .native-icon{color:#c1a1d4}
html[data-theme=night] .home-primary-tools .home-tool{background:#213b31;border-color:#426052}
html[data-theme=night] .home-primary-tools .home-tool:nth-child(2){background:#263749;border-color:#475e78}
html[data-theme=night] .home-primary-tools .home-tool:nth-child(3){background:#392d42;border-color:#62506c}
html[data-theme=night] .home-carousel{background:#1d292d;border-color:#3b4b4c}
html[data-theme=night] .home-slide-controls{border-color:#3b4b4c}
html[data-theme=night] .home-slide-controls button,html[data-theme=night] .home-slide-counter{color:#cbded5}
html[data-theme=night] .halwa-native .native-navigation button:not([aria-current=page]){color:#b7c6d3}

.home-store{text-decoration:none;box-sizing:border-box}.native-icon-store{mask-image:url("assets/icons/store.svg")}

.halwa-native .app-header #profileButton{display:none!important}
.halwa-native .app-header .notification-bell{display:grid!important;place-items:center;width:42px;height:42px;min-width:42px;padding:8px;border:1px solid #cbd7cd;border-radius:50%;background:#fff;color:#244f41;font-size:0}
.native-icon-bell{display:block;width:24px;height:24px;background:currentColor;mask:url('assets/icons/bell.svg') center/contain no-repeat}
.halwa-native .home-sidebar-identity{flex-direction:column;text-align:center;padding:18px 6px 22px;gap:12px;flex-shrink:0}
.halwa-native .home-sidebar-identity .profile-avatar{width:80px;height:80px;flex-basis:80px;border:2px solid #cef43d}
.halwa-native .home-sidebar-identity strong{font-size:18px;white-space:normal;overflow-wrap:anywhere}
.halwa-native .home-sidebar-identity small{font-size:12px;color:#abc1b8;white-space:normal;overflow-wrap:anywhere}
.halwa-native #mathToolsSidebar #profileNightMode{flex-shrink:0;width:100%;padding:12px;margin:0 0 16px;border:1px solid #4a6454;border-radius:12px;background:#253e31;color:#edf4ee;font:600 14px system-ui}
html[data-theme=night] .halwa-native .app-header .notification-bell{background:#203138;color:#cef43d;border-color:#43564e}

.halwa-native .home-sidebar-identity .profile-avatar:not(.has-image){background:#142422 url('assets/icons/profile-person.svg') center/contain no-repeat}.halwa-native .home-sidebar-identity .profile-avatar:not(.has-image)::before,.halwa-native .home-sidebar-identity .profile-avatar:not(.has-image)::after{display:none}

.home-slide{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.home-slide img{pointer-events:none}

.home-slide{position:relative;overflow:hidden}.home-slide img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;will-change:transform}

/* Account controls stay reachable when the native app rotates or the menu grows. */
.halwa-native #mathToolsSidebar { overflow-y:auto!important; overflow-x:hidden!important; overscroll-behavior:contain; }
.halwa-native #mathToolsSidebar > * { flex-shrink:0; }
html[data-theme=night] .halwa-native .home-legal-links a { color:#a7d6c7; }
@media (min-width:701px) {
  .halwa-native .mobile-menu-button { display:grid!important; place-content:center; gap:4px; flex:0 0 38px; width:38px; height:38px; padding:0; border:1px solid #b5c9be; border-radius:6px; background:#fff; color:#172923; }
  .halwa-native .mobile-menu-button span { display:block; width:16px; height:2px; background:currentColor; }
  .template-v3.menu-rail.halwa-native .app-shell #mathToolsSidebar { position:fixed; inset:0 auto auto 0; z-index:100; display:flex; flex-direction:column; gap:10px; width:min(328px,calc(100vw - 42px)); min-width:0; padding-inline:14px; border-radius:0 8px 8px 0; transform:translateX(calc(-100% - 20px)); background:#111618; visibility:hidden; pointer-events:none; }
  .template-v3.menu-rail.halwa-native .app-shell.mobile-menu-open #mathToolsSidebar { transform:translateX(0); visibility:visible; pointer-events:auto; }
  .template-v3.menu-rail.halwa-native #sidebarToggle { position:absolute; right:14px; display:grid; place-items:center; width:36px; height:36px; padding:0; border:1px solid #4a6055; background:#24372e; color:#fff; }
  .template-v3.menu-rail.halwa-native #sidebarToggle::before { content:"\00d7"; font-size:24px; }
  .template-v3.menu-rail.halwa-native #sidebarToggle span { display:none; }
  .template-v3.menu-rail.halwa-native .app-shell.mobile-menu-open .mobile-nav-backdrop { display:block; position:fixed; inset:0; z-index:90; background:#06130fa6; }
}
