/* GYA design system v1: typography, rhythm, surfaces, accessible contrast. */
:root{--ui-bg:#f7f5f6;--ui-paper:#fff;--ui-ink:#29222d;--ui-muted:#625966;--ui-accent:#603c61;--ui-accent-hover:#4b2c4d;--ui-border:#e8e1e7;--ui-focus:#80558b;--ui-radius:18px;--ui-shadow:0 3px 18px rgba(42,24,45,.055);font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.55;color:var(--ui-ink);font-synthesis:none;-webkit-text-size-adjust:100%}
body{background:var(--ui-bg);color:var(--ui-ink);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;letter-spacing:-.025em;text-wrap:balance;color:var(--ui-ink)}
p{line-height:1.65}.muted,.small-text{color:var(--ui-muted)}
.topbar h1{font-family:inherit;font-size:clamp(1.85rem,3.2vw,2.65rem);font-weight:760;line-height:1.14;letter-spacing:-.045em;color:var(--ui-ink)}
.topbar p{font-size:.9rem;max-width:65ch}.overline{color:#71536f;letter-spacing:.12em;font-size:.69rem;font-weight:750}
.hero{background:linear-gradient(125deg,#35283d 0%,#60435e 68%,#79546d 100%);padding:clamp(24px,3vw,38px);box-shadow:var(--ui-shadow)}
.hero h2{font-family:inherit;font-size:clamp(1.5rem,2.6vw,2.15rem);font-weight:750;letter-spacing:-.035em;color:#fff;max-width:25ch;line-height:1.2}
.hero p{font-size:.92rem;color:#f3e9f0;max-width:58ch}.hero-kicker{color:#f0dbe9;letter-spacing:.12em;font-size:.68rem}
.section-title h2{font-size:clamp(1.18rem,2vw,1.5rem);font-weight:740;letter-spacing:-.03em;color:var(--ui-ink)}
.section-title p{color:var(--ui-muted)}
.stat,.record-card,.settings-card,.activity-row,.agenda-row,.memory-searchbar{background:var(--ui-paper);border:1px solid var(--ui-border);box-shadow:var(--ui-shadow)}
.stat{border-radius:var(--ui-radius);padding:20px}.stat .stat-label{font-size:.79rem;color:var(--ui-muted);font-weight:550}.stat .stat-value{font-size:clamp(1.5rem,2.6vw,2.1rem);font-weight:760;letter-spacing:-.045em;color:var(--ui-ink)}
.record-card{border-radius:var(--ui-radius);padding:21px;gap:12px}.record-card h3,#memoryList .record-card h3{font-size:1.04rem;line-height:1.42;font-weight:730;color:var(--ui-ink)}
.excerpt,#memoryList .record-body{font-size:.9rem;line-height:1.7;color:#4e4652}.tiny,.status{font-size:.76rem;color:var(--ui-muted)}
.kind,.tag{font-size:.72rem;font-weight:650;background:#f4edf3;color:#694466;border-radius:8px}
.button{font-size:.86rem;font-weight:680;line-height:1.3;min-height:44px;border-radius:12px;padding:11px 16px;letter-spacing:-.005em}.button.primary{background:var(--ui-accent);color:white}.button.primary:hover{background:var(--ui-accent-hover);filter:none}.button.outline{color:var(--ui-accent);border-color:#d9cbd8}
.form label,#memoryArea .toolbar label{font-size:.82rem;font-weight:650;color:#4e4250}.form input,.form select,.form textarea,.toolbar input,.toolbar select{border-color:#d9d0d9;border-radius:12px;min-height:46px;font-size:1rem;color:var(--ui-ink)}
.form textarea{line-height:1.65}.link-button{font-size:.84rem;font-weight:680;min-height:40px;padding:8px 10px}
.auth-panel h1,.dialog-heading h2{font-family:inherit;font-weight:760;letter-spacing:-.035em;color:var(--ui-ink)}
.auth-panel{box-shadow:0 22px 65px rgba(23,14,27,.2)}
.nav-button{font-size:.87rem;min-height:45px}.brand{font-size:1.05rem}.sidebar{background:#2f2334}.nav-button.active{background:#6a4b6b}
.mobile-nav{background:#2f2334}.mobile-nav button{font-size:.71rem;font-weight:600;line-height:1.25;min-width:0;min-height:52px}
#memoryArea .memory-searchbar{border-radius:var(--ui-radius);padding:15px;gap:12px}
#memoryArea #memoryCount{font-size:.8rem;color:var(--ui-muted)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
@media(max-width:740px){.main{padding:24px 16px calc(112px + env(safe-area-inset-bottom))}.topbar h1{font-size:2rem}.hero{border-radius:20px;padding:24px}.hero h2{font-size:1.65rem}.stats{gap:10px}.stat{padding:16px}.stat .stat-value{font-size:1.65rem}.record-card,#memoryList .record-card{padding:18px}.mobile-nav{padding:7px 5px calc(8px + env(safe-area-inset-bottom))}.mobile-nav button{padding:8px 3px}.section-title{gap:10px}.section-title h2{font-size:1.28rem}}
@media(max-width:360px){.main{padding-inline:12px}.top-actions{gap:6px}.button{padding-inline:11px}.mobile-nav button{font-size:.66rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* GYA visual refresh v2 — cohesive mobile-first editorial utility interface */
:root{--ui-bg:#f6f3f6;--ui-paper:#ffffff;--ui-ink:#241e29;--ui-muted:#655b69;--ui-accent:#663e68;--ui-border:#e6dee7;--ui-radius:20px;--ui-shadow:0 9px 28px rgba(44,24,46,.065)}
body{background:radial-gradient(ellipse 850px 520px at 80% -140px,#f0e4ee 0%,transparent 72%),var(--ui-bg)}
.main{max-width:1600px;margin-inline:auto}
.topbar{padding-bottom:20px;border-bottom:1px solid #e9e1e9;margin-bottom:22px}
.topbar .overline{font-size:.67rem;font-weight:800;letter-spacing:.16em;color:#795b79}
.topbar h1{font-size:clamp(2rem,3.7vw,3rem);letter-spacing:-.055em;font-weight:800}
.topbar p{margin-top:7px;color:#716775}
.hero{position:relative;overflow:hidden;border-radius:26px;background:linear-gradient(115deg,#34233b,#684468 72%,#815a77);box-shadow:0 18px 38px rgba(66,39,68,.14)}
.hero::after{content:"";position:absolute;width:250px;height:250px;border:1px solid rgba(255,255,255,.13);border-radius:50%;right:-95px;top:-110px;pointer-events:none}
.hero-decoration{opacity:.12!important;pointer-events:none}
.stats{gap:14px}.stat{border-radius:20px;box-shadow:0 5px 18px rgba(44,24,46,.04);transition:transform .18s ease,box-shadow .18s ease}
.stat .stat-label{font-size:.78rem;font-weight:680;letter-spacing:.01em}.stat .stat-value{font-size:clamp(1.8rem,3vw,2.4rem);font-weight:800}
.section-title{margin-top:26px;margin-bottom:15px}.section-title h2{font-size:clamp(1.25rem,2.1vw,1.6rem);letter-spacing:-.04em;font-weight:800}
.record-card,.settings-card,.home-agenda{border-radius:22px;border:1px solid var(--ui-border);box-shadow:0 5px 24px rgba(46,25,47,.045)}
.record-card{transition:box-shadow .18s ease,transform .18s ease}.record-card:hover{box-shadow:0 12px 28px rgba(46,25,47,.085)}
.button{border-radius:13px;font-weight:720;transition:background-color .15s ease,box-shadow .15s ease}.button.primary{box-shadow:0 5px 13px rgba(91,53,94,.16)}
.form input,.form select,.form textarea,.toolbar input,.toolbar select,#globalSearchInput{background:#fff;border:1px solid #dcd2dd;box-shadow:0 1px 2px rgba(40,20,40,.02);border-radius:13px}
#globalSearchArea{border:1px solid var(--ui-border);background:#fff;box-shadow:var(--ui-shadow)}
#globalSearchInput{padding:13px 16px}
#memoryArea .memory-searchbar{background:#fff;border-radius:20px;padding:18px;box-shadow:var(--ui-shadow)}
#memoryList{gap:15px}#memoryList .record-card{border-radius:19px}#memoryList .record-body{font-size:.94rem;line-height:1.75}
.mobile-nav{box-shadow:0 -8px 24px rgba(30,16,34,.16)}
@media(hover:hover){.stat:hover,.record-card:hover{transform:translateY(-2px)}}
@media(max-width:740px){.main{padding-top:20px}.topbar{gap:16px;align-items:start}.topbar h1{font-size:2.2rem}.topbar p{font-size:.86rem}.hero{padding:27px 22px;border-radius:24px}.hero h2{font-size:1.8rem}.stats{gap:11px}.stat{padding:18px 15px}.stat .stat-value{font-size:1.9rem}.section-title{margin-top:23px}.record-card{padding:18px}.mobile-nav{border-top:1px solid rgba(255,255,255,.12)}.mobile-nav button{border-radius:11px}.top-actions{gap:9px}}
@media(prefers-reduced-motion:reduce){.stat,.record-card,.button{transition:none!important;transform:none!important}}

/* GYA 3.0 — deliberate visual redesign based on the supplied four-screen reference.
   CSS-only, retains existing DOM ids, forms, security and data operations. */
:root{--ui-bg:#fff1f4;--ui-paper:#fff8f8;--ui-ink:#481a37;--ui-muted:#795c70;--ui-accent:#a41e61;--ui-accent-hover:#801449;--ui-border:#efcfdd;--ui-radius:23px;--ui-shadow:0 9px 26px rgba(93,21,57,.11)}
body{background:linear-gradient(160deg,#351127 0,#6d254a 32%,#f6cbd9 65%,#fff1f4 100%) fixed;color:var(--ui-ink)}
.sidebar{background:linear-gradient(175deg,#2c0c22,#541b3b 62%,#37102d);border-right:1px solid #a6658b;color:#fff4f7}
.brand{font-family:Georgia,'Times New Roman',serif;font-size:1.75rem;letter-spacing:.08em;color:#fff0f6}
.brand small{font-family:Inter,Arial,sans-serif;font-size:.59rem;letter-spacing:.12em}
.brand-mark{color:#ffb4d3;text-shadow:0 0 18px rgba(255,143,194,.8)}
.nav-button{border-radius:15px;color:#fbe4ef}.nav-button.active{background:linear-gradient(110deg,#a91e63,#69214b);color:#fff;box-shadow:0 6px 18px #20081840}
.main{background:linear-gradient(180deg,#4c1736 0,#74284f 220px,#f9dce5 420px,#fff0f3 750px);min-height:100dvh}
.topbar{border:0;margin-bottom:12px;align-items:center}.topbar .overline{color:#f6b7d4;font-size:.7rem}.topbar h1{font-family:Georgia,'Times New Roman',serif;color:#fff5f8;font-weight:500;letter-spacing:-.045em}.topbar p{color:#f7d6e5}
.top-actions .connection{color:#fff3f8}.top-actions .button.outline{background:#ffffff18;color:#fff;border:1px solid #ffffff5c}
.hero{min-height:225px;border:1px solid #ffc3df6e;background:radial-gradient(circle at 88% 16%,#ffbfd988 0 2%,transparent 18%),radial-gradient(ellipse at 18% 105%,#a83f7a 0,transparent 55%),linear-gradient(135deg,#2a0a23,#6c204a 65%,#8b3763);box-shadow:0 18px 36px #2a09284a;border-radius:28px;padding:30px}
.hero::before{content:'✧';position:absolute;right:7%;top:8%;font-size:92px;font-weight:200;line-height:1;color:#ffc6e3a6;text-shadow:0 0 32px #f87bb4;pointer-events:none}
.hero::after{content:'';width:75%;height:130px;right:-7%;top:auto;bottom:-90px;border:0;background:radial-gradient(ellipse,#f59cc64d,transparent 72%);pointer-events:none}
.hero-kicker{color:#ffd0e4}.hero h2{font-family:Georgia,'Times New Roman',serif;font-weight:500;font-size:clamp(1.8rem,4vw,2.6rem);letter-spacing:-.04em}.hero p{color:#f8dce9}
.section-title h2{color:#682344;font-family:Georgia,'Times New Roman',serif;font-weight:650}.section-title p{color:#825c73}
.stat,.record-card,.settings-card,.home-agenda,.agenda-row,#globalSearchArea,#memoryArea .memory-searchbar{background:linear-gradient(145deg,#fffaf9,#ffe9f0);border:1px solid #f4c7d9;border-radius:23px;box-shadow:0 7px 22px #70274817}
.stat .stat-label{color:#81536e}.stat .stat-value,.record-card h3,#memoryList .record-card h3{color:#76274e}
.button.primary{background:linear-gradient(135deg,#b72270,#7c204e);box-shadow:0 5px 14px #9e286344;color:white}.button.outline{background:#fff4f8;color:#8e2456;border-color:#e5a8c5}
.kind,.tag{background:#f5c8dd;color:#77284d}.record-card .excerpt{color:#674d5e}
#globalSearchInput,.form input,.form select,.form textarea,.toolbar input,.toolbar select{background:#fff9fb;border:1px solid #e5b8cf;color:#55223f}
.mobile-nav{background:linear-gradient(110deg,#fff4f6,#ffe0eb);border-top:1px solid #eebbd2;box-shadow:0 -8px 28px #4e143b29}
.mobile-nav button{color:#6e3555;border-radius:16px}.mobile-nav button.active{background:linear-gradient(145deg,#b32770,#75234e);color:#fff;box-shadow:0 4px 13px #8b265b50}
#homeOverviewStatus,#globalSearchStatus{color:#784d67}
@media(max-width:740px){
 body{background:#fff0f3}.main{background:linear-gradient(180deg,#321025 0,#672247 210px,#f7cddc 420px,#fff1f4 720px);padding:22px 14px calc(112px + env(safe-area-inset-bottom))}
 .topbar{display:flex;flex-wrap:wrap;gap:10px;padding:5px 3px 8px;margin-bottom:12px}.topbar h1{font-size:2.15rem}.topbar p{font-size:.78rem}
 .top-actions{width:100%;grid-template-columns:1fr 1fr}.top-actions .connection{font-size:.76rem}
 .hero{min-height:200px;padding:26px 20px;border-radius:25px}.hero h2{font-size:1.8rem;max-width:19ch}.hero p{font-size:.82rem;max-width:32ch}.hero::before{font-size:70px;right:5%;top:9%}
 .stats{gap:10px}.stat{padding:16px 14px}.stat .stat-value{font-size:1.75rem}.stat .stat-label{font-size:.74rem}
 .section-title h2{font-size:1.42rem}.record-card{padding:17px}.home-agenda{padding:15px;border-radius:22px}
 .mobile-nav{padding:8px 6px calc(9px + env(safe-area-inset-bottom))}.mobile-nav button{min-height:54px;font-size:.72rem}
}
