/* R7 — full-bleed illustrated headers and light, edge-to-edge living panels. */
:root{--r7-head:72px;--r7-gutter:14px;--r7-hand:'LXGW WenKai TC','Noto Sans TC',serif}
.app-shell,.rail-collapsed .app-shell{position:relative;isolation:isolate;max-width:1600px!important;padding:0 var(--r7-gutter) calc(118px + env(safe-area-inset-bottom))!important;overflow:clip}
#main{padding:0!important}.topbar{position:relative!important;z-index:30;min-height:var(--r7-head)!important;height:auto!important;display:flex;flex-wrap:nowrap;gap:6px!important;padding:10px 0!important;align-items:center;background:transparent!important;border:0;box-shadow:none;margin:0!important}
.topbar .brand{flex:1 1 auto;min-width:0;margin:0!important;display:flex!important}.r7-brand-button{border:0;background:transparent;color:var(--ink);display:flex;gap:5px;align-items:center;min-width:0;min-height:44px;padding:0;text-align:left;font-family:var(--r7-hand);font-size:17px;font-weight:700;letter-spacing:-.05em;line-height:1.2}.r7-brand-button:disabled{opacity:1;cursor:default;color:var(--ink)}.r7-brand-cat{width:29px;height:31px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 2px 4px #0001)}.r7-brand-title{min-width:0;overflow-wrap:anywhere}.r7-brand-chevron{font-family:system-ui;font-size:14px;flex:none}
.topbar .scopebar,.rail-collapsed .topbar .scopebar{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;flex:0 1 100px;max-width:180px!important;min-width:68px;padding:0!important;margin:0!important;gap:0!important;display:flex!important;background:transparent!important;border:0!important}.topbar .scopebar select{appearance:none;-webkit-appearance:none;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0;padding:8px 14px 8px 2px!important;min-height:44px;width:100%;min-width:0;max-width:none!important;line-height:1.2;font-size:12px;color:var(--ink);font-weight:500;text-overflow:ellipsis}.scopebar:after{content:'⌄';position:absolute;right:0;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none}.scopebar option{background:var(--paper);color:var(--ink)}.scopebar .scope-icon{display:none!important}.topbar #notifications-button,.topbar #theme-button{flex:0 0 34px;width:34px;min-width:34px;min-height:40px;padding:5px;background:transparent;border:0}.topbar svg{width:24px;height:24px}
.welcome-hero,.r7-tool-hero{position:relative;isolation:isolate;margin:0 calc(-1 * var(--r7-gutter)) 18px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;min-height:250px;overflow:visible!important;display:flex;align-items:center}
.welcome-art,.r7-tool-art{position:absolute!important;inset:calc(-1 * var(--r7-head)) 0 0!important;width:100%!important;height:auto!important;overflow:hidden!important;z-index:-1;pointer-events:none;opacity:1!important}
.welcome-art img,.r7-tool-backdrop{display:block;position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none;object-fit:cover!important;object-position:58% center!important;border-radius:0!important}
.welcome-art:after,.r7-tool-art:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,color-mix(in srgb,var(--bg) 93%,transparent),color-mix(in srgb,var(--bg) 45%,transparent) 43%,transparent 70%);pointer-events:none}
.welcome-copy,.r7-tool-copy{position:relative;z-index:1;max-width:63%!important;width:63%;padding:12px 0 30px calc(var(--r7-gutter) + 8px)!important;min-width:0}.welcome-copy h1{font-family:var(--r7-hand);font-size:clamp(28px,6.3vw,42px)!important;font-weight:700;letter-spacing:.01em!important;line-height:1.45!important;margin:9px 0 16px!important;text-wrap:balance;text-shadow:0 1px 0 color-mix(in srgb,var(--paper) 70%,transparent)}.welcome-copy h1:after,.r7-tool-slogan:after{content:'';display:block;width:min(130px,75%);height:5px;background:var(--accent);opacity:.38;border-radius:80% 20% 60% 40%;transform:rotate(-3deg);margin-top:2px}
.welcome-copy p:not(.eyebrow),.r7-tool-copy>p:not(.r7-tool-slogan){font-family:var(--r7-hand);font-size:16px!important;line-height:1.8;letter-spacing:.04em;font-weight:500;margin:8px 0;max-width:320px}.r7-hero-date{display:inline-flex;align-items:center;gap:4px;font-size:12px;letter-spacing:.05em;color:var(--ink);opacity:.75;padding:4px 8px;border-radius:30px;background:color-mix(in srgb,var(--paper) 65%,transparent);white-space:normal}
.r7-tool-copy h1{display:inline-block;font-size:13px!important;letter-spacing:.04em;font-weight:600;margin:8px 0 2px!important;padding:4px 8px;border-radius:18px;background:color-mix(in srgb,var(--paper) 60%,transparent)}.r7-tool-slogan{font-family:var(--r7-hand);font-size:clamp(26px,5.8vw,38px)!important;line-height:1.45;font-weight:700;letter-spacing:.02em;margin:0 0 10px;max-width:390px;text-wrap:balance}.r7-tool-character{position:absolute;right:2%;bottom:0;width:42%;height:min(95%,260px);object-fit:contain;filter:drop-shadow(0 8px 18px #0001);z-index:1}.r7-tool-backdrop{opacity:.28}.r7-tool-art:after{background:linear-gradient(90deg,var(--bg),color-mix(in srgb,var(--bg) 60%,transparent) 55%,transparent)}
.today-panel.panel,.stock-reminders.panel,.spaced-panel,.record-inner,.asset-summary,.r7-tool-overview{border-color:transparent!important;box-shadow:0 5px 22px color-mix(in srgb,var(--ink) 3%,transparent)!important;border-radius:19px}.today-panel.panel{margin:0 0 12px!important;padding:20px 16px!important;background:color-mix(in srgb,var(--paper) 86%,transparent)}.today-panel .section-head{margin:0 0 5px}.today-panel h2{font-size:19px;letter-spacing:0}.today-row{border-color:color-mix(in srgb,var(--line) 40%,transparent);padding:14px 0}.today-row strong{font-weight:600}.today-panel .privacy-toggle{border:0;background:var(--surface-2);min-height:36px;padding:7px 10px;font-size:12px}.overview-layout{margin:0!important;gap:16px!important}.overview-secondary:empty{display:none!important}
.r7-tool-overview{margin:14px 0 20px;padding:15px 8px;background:color-mix(in srgb,var(--paper) 65%,transparent)}.r7-section-label{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 8px 8px}.r7-section-label h2{font-size:17px;margin:0;font-weight:600}.r7-section-label>span{font-size:11px;color:var(--muted)}.r7-tool-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}.r7-tool-glance{display:flex;flex-direction:column;align-items:center;min-width:0;gap:5px;padding:4px 1px 7px;min-height:120px;background:transparent;border:0;border-radius:14px;color:var(--ink)}.r7-tool-glance:hover{background:var(--surface-2)}.r7-tool-glance img{width:58px;height:58px;max-width:100%;object-fit:contain}.r7-tool-glance strong{font-size:14px;font-weight:600}.r7-tool-glance small{font-size:10px;line-height:1.5;color:var(--muted);max-width:100%;overflow-wrap:anywhere;text-align:center}
#fab-wrap{gap:0!important;filter:drop-shadow(0 6px 10px #0002);align-items:center;bottom:calc(106px + env(safe-area-inset-bottom))!important}#fab{position:relative;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:25px;width:78px;height:80px;min-height:70px;padding:0!important;overflow:visible;display:grid;place-items:center}.r7-fab-cat{display:block;width:78px;height:78px;object-fit:contain;transition:transform .2s}#fab:hover .r7-fab-cat{transform:translateY(-3px)}.r7-fab-plus{position:absolute;right:1px;bottom:3px;display:grid;place-items:center;width:25px;height:25px;background:var(--accent);color:var(--accent-ink);border:2px solid var(--paper);border-radius:50%;font:700 22px/1 system-ui;box-shadow:0 2px 5px #0002}#fab-toggle{width:21px;min-width:21px;min-height:36px;height:36px;padding:0;border:0;background:color-mix(in srgb,var(--paper) 85%,transparent);border-radius:12px;color:var(--muted)}.fab-wrap.folded #fab .r7-fab-cat{width:43px;height:43px}.fab-wrap.folded #fab{width:48px;height:48px;min-height:48px}.fab-wrap.folded .r7-fab-plus{width:18px;height:18px;font-size:15px;bottom:0;right:0}
.r7-series-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.r7-series-tile{padding:16px;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;text-decoration:none;border:1px solid color-mix(in srgb,var(--line) 40%,transparent);border-radius:18px;background:var(--surface-2);color:var(--ink);text-align:center}.r7-series-tile img{object-fit:contain}.r7-series-tile small{font-size:12px;color:var(--muted)}.r7-series-unset{opacity:.65}.r7-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:16px 0;border-bottom:1px solid var(--line)}.r7-link-row label{grid-column:1;display:grid;gap:6px;min-width:0}.r7-link-row input{width:100%}.r7-link-row button{grid-column:2;grid-row:1/3;align-self:center}
body[data-theme=cyber-neo-tech-cat] .r7-fab-cat{filter:drop-shadow(0 0 9px #38bdf878)}body[data-theme=cyber-neo-tech-cat] .r7-brand-cat{filter:drop-shadow(0 0 5px #38bdf856)}
@media(min-width:1000px) and (min-height:550px){:root{--r7-gutter:26px;--r7-head:78px}.r7-brand-button{font-size:22px;letter-spacing:0}.r7-brand-cat{width:39px;height:39px}.topbar .scopebar{flex-basis:180px}.topbar .scopebar select{font-size:14px}.topbar #notifications-button,.topbar #theme-button{flex-basis:42px;width:42px}.welcome-hero,.r7-tool-hero{min-height:305px;margin-bottom:24px!important}.welcome-copy,.r7-tool-copy{max-width:53%!important;width:53%;padding-left:calc(var(--r7-gutter) + 28px)!important}.welcome-copy h1{font-size:46px!important;line-height:1.4!important}.welcome-copy p:not(.eyebrow),.r7-tool-copy>p:not(.r7-tool-slogan){font-size:19px!important}.r7-tool-slogan{font-size:43px!important;max-width:500px}.r7-tool-character{right:12%;width:30%;height:300px}.r7-tool-glance{min-height:135px}.r7-tool-glance img{width:75px;height:75px}.r7-tool-glance small{font-size:13px}.r7-tool-glance strong{font-size:16px}.r7-tool-strip{gap:12px}.r7-tool-overview{padding:18px;margin-top:20px}}
@media(max-width:374px){.r7-brand-button{font-size:15px}.r7-brand-cat{width:24px}.topbar .scopebar{flex-basis:77px;min-width:60px}.topbar #notifications-button,.topbar #theme-button{width:29px;flex-basis:29px;padding:3px}.topbar{gap:3px!important}.welcome-copy,.r7-tool-copy{max-width:65%!important;width:65%}.r7-tool-glance img{width:48px;height:48px}}
@media(orientation:landscape) and (max-height:549px){:root{--r7-head:58px}.welcome-hero,.r7-tool-hero{min-height:205px}.welcome-copy,.r7-tool-copy{width:55%;max-width:55%!important;padding-bottom:15px!important}.welcome-copy h1{font-size:30px!important}.r7-tool-slogan{font-size:28px!important}.r7-tool-character{height:195px;right:9%;width:30%}.topbar .scopebar{flex-basis:145px}.topbar .brand{display:flex!important}#fab-wrap{bottom:83px!important}#fab,.r7-fab-cat{width:65px;height:65px;min-height:60px}}
@media(prefers-reduced-motion:reduce){.r7-fab-cat{transition:none}}

#main{padding-bottom:74px!important}.welcome-art{background:var(--bg)!important}
@media(min-width:1000px) and (min-height:550px){.welcome-art img{object-fit:contain!important;object-position:right center!important}.welcome-art:after{background:linear-gradient(90deg,var(--bg),color-mix(in srgb,var(--bg) 92%,transparent) 36%,transparent 72%)}}

@media(min-width:1000px) and (min-height:550px){.overview-layout:has(.overview-secondary:empty){grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:999px) and (min-height:550px){.r7-tool-copy{width:58%!important;max-width:58%!important}.r7-tool-character{width:38%;right:1%}}

/* R8: portrait composition keeps the complete cat subject inside the viewport. */
@media(max-width:599px) and (orientation:portrait){
 .welcome-hero{min-height:380px;align-items:flex-start}
 .welcome-copy{width:100%!important;max-width:100%!important;padding:18px calc(var(--r7-gutter) + 8px) 142px!important}
 .welcome-copy h1{max-width:100%;font-size:clamp(28px,7.6vw,37px)!important;line-height:1.32!important;margin:12px 0!important;text-wrap:pretty}
 .welcome-copy p:not(.eyebrow){max-width:100%;font-size:16px!important;line-height:1.5}
 .welcome-art img{inset:auto 0 0 auto!important;width:145%!important;height:auto!important;object-fit:contain!important;object-position:center bottom!important;mask-image:linear-gradient(to bottom,transparent,#000 15%);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 15%)}
 .welcome-art:after{background:linear-gradient(180deg,var(--bg),color-mix(in srgb,var(--bg) 75%,transparent) 28%,transparent 65%)}
 .r7-tool-backdrop{object-fit:contain!important;object-position:center bottom!important}
}
.today-row .r8-today-icon{background:transparent!important;box-shadow:none;border-radius:0;width:48px;height:48px;flex:0 0 48px}
.r8-today-icon img{display:block;width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 2px 3px #0001)}
.privacy-compact .r8-today-icon{display:none!important}
.r8-health-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px;margin:16px 0}.r8-health-summary>div{padding:12px;background:var(--surface-2);border-radius:14px}.r8-health-summary strong{display:block;font-size:20px}.r8-health-summary small{color:var(--muted)}.r8-health-item{padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.r8-health-item p{margin:4px 0}.r8-health-status{font-weight:600}.r8-health-status[data-status=ok]{color:var(--accent)}
