*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:radial-gradient(circle at 20% -10%,rgba(183,255,53,.18),transparent 32%),linear-gradient(180deg,var(--bg-main),color-mix(in srgb,var(--bg-main) 90%,#fff));color:var(--text-primary);letter-spacing:-.01em}button,input,textarea{font:inherit}button{touch-action:manipulation}.hidden{display:none!important}.shell{width:min(100%,430px);margin:0 auto;padding:0 12px}.app-shell{min-height:100vh;padding-bottom:74px}.topbar{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg-main) 92%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--border)}.topbar-inner{display:flex;align-items:center;justify-content:space-between;padding-top:9px;padding-bottom:9px}.brand-wrap{display:flex;align-items:center;gap:9px;min-width:0}.brand-logo-wide{width:48px;height:auto;display:block;filter:drop-shadow(0 2px 7px rgba(6,63,51,.11))}.brand-title{font-size:1.02rem;font-weight:950;line-height:1;letter-spacing:-.04em}.brand-subtitle{font-size:.72rem;color:var(--text-secondary);margin-top:2px;max-width:185px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-actions{display:flex;gap:6px}.app-main{padding-top:10px}.screen-root{min-height:calc(100vh - 126px)}.screen{display:grid;gap:10px;animation:screenIn .15s ease}@keyframes screenIn{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}.surface-section{display:grid;gap:5px}.list-title{display:flex;gap:8px;align-items:center}.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:55;display:grid;grid-template-columns:repeat(4,1fr);gap:5px;width:min(100%,430px);margin:0 auto;padding:7px 10px max(8px,env(safe-area-inset-bottom));background:linear-gradient(to top,rgba(238,241,231,.98) 68%,rgba(238,241,231,.74),transparent)}html[data-theme="dark"] .bottom-nav{background:linear-gradient(to top,rgba(7,17,14,.98) 68%,rgba(7,17,14,.74),transparent)}body.debug-access .bottom-nav{grid-template-columns:repeat(5,1fr)}.debug-strip{position:fixed;right:12px;bottom:84px;z-index:90;display:flex;align-items:center;gap:6px;max-width:min(360px,calc(100vw - 24px));padding:6px;border:1px solid var(--border);border-radius:12px;background:var(--bg-surface);box-shadow:var(--shadow);backdrop-filter:blur(12px)}.debug-strip .status-pill:not(:first-child){display:none}.debug-strip:hover .status-pill,.debug-strip:focus-within .status-pill{display:inline-flex}.debug-strip .btn{min-height:28px;padding:0 8px;font-size:.68rem}@media(min-width:740px){.shell,.bottom-nav{width:min(100%,460px)}}


/* Phase 2C.4B — topbar identity responsive polish */
.topbar-actions{align-items:center}.topbar-profile-chip{display:inline-flex;align-items:center;gap:8px;min-height:34px;max-width:165px;border:1px solid var(--border);background:rgba(255,255,255,.86);border-radius:999px;padding:3px 9px 3px 3px;box-shadow:var(--shadow-soft);color:var(--text-primary);cursor:pointer}.topbar-profile-chip span{display:grid;text-align:left;line-height:1.05;min-width:0}.topbar-profile-chip strong{font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:105px}.topbar-profile-chip small{font-size:.58rem;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:105px;text-transform:none;font-weight:850}.topbar-profile-chip:empty{display:none}@media(max-width:520px){.brand-subtitle{max-width:130px}.topbar-profile-chip span{display:none}.topbar-profile-chip{padding-right:3px;max-width:40px}.topbar-actions{gap:4px}.lang-switch button,.icon-btn{min-width:32px}}

/* Phase 2D Final Visual Polish — centralized header foundation */
.topbar-inner{position:relative;gap:10px}.app-brand-lock{flex:1 1 auto;max-width:190px}.brand-logo-mark{width:28px;height:28px;display:block;flex:0 0 28px}.brand-copy{min-width:0}.brand-title{font-size:.92rem;letter-spacing:.02em;text-transform:none;white-space:nowrap}.brand-subtitle{font-size:.66rem;max-width:128px}.topbar-alert-slot{display:none;flex:0 1 auto;min-width:0;max-width:120px;align-items:center;justify-content:center}.topbar-alert-slot:not(:empty){display:flex;padding:5px 8px;border:1px solid var(--border);border-radius:999px;background:var(--bg-surface);color:var(--text-secondary);font-size:.65rem;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-actions{flex:0 0 auto;min-width:0}.topbar-profile-chip{max-width:118px}.topbar-profile-chip strong{max-width:58px}.topbar-profile-chip small{max-width:58px}.icon-btn .icon-img{width:18px;height:18px}.nav-icon{display:flex;align-items:center;justify-content:center;min-height:22px}.nav-icon .icon-img{width:19px;height:19px}.title-icon .icon-img,.hero-icon .icon-img,.meta-icon .icon-img,.btn-icon .icon-img{width:20px;height:20px;display:inline-block;vertical-align:-4px}.hero-icon{display:grid;place-items:center}.hero-icon .icon-img{width:28px;height:28px}.empty-state-visual{width:min(180px,65vw);height:auto;margin:0 auto 12px;display:block}.debug-screen .empty-state-visual{width:116px}.debug-hero-card{overflow:hidden}.debug-result{border:1px solid var(--border);border-radius:18px;background:var(--bg-surface);padding:14px;box-shadow:var(--shadow-soft)}.debug-result-list{display:grid;gap:10px}.debug-result-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.debug-result-head strong{display:block;font-size:.9rem}.debug-result-head span{display:block;font-size:.68rem;color:var(--text-secondary);word-break:break-all}.debug-suggest{margin-top:8px;font-size:.72rem;color:var(--text-secondary);padding:8px 10px;border-radius:12px;background:color-mix(in srgb,var(--bg-main) 84%,#fff)}.debug-child-list{display:grid;gap:6px;margin-top:10px}.debug-child{display:grid;gap:4px;padding:8px 10px;border-radius:12px;background:color-mix(in srgb,var(--bg-main) 82%,#fff);border-left:3px solid var(--border)}.debug-child.pass{border-left-color:#16a34a}.debug-child.warn{border-left-color:#f59e0b}.debug-child.fail{border-left-color:#dc2626}.debug-child strong{font-size:.74rem}.debug-child span,.debug-child em{font-size:.68rem;color:var(--text-secondary);font-style:normal}.status-chip{border-radius:999px;padding:5px 8px;font-size:.68rem;font-weight:950;text-transform:uppercase}.status-pass{background:#dcfce7;color:#166534}.status-warn{background:#fef3c7;color:#92400e}.status-fail{background:#fee2e2;color:#991b1b}@media(max-width:420px){.topbar-inner{padding-left:10px;padding-right:10px}.app-brand-lock{max-width:148px}.brand-subtitle{max-width:92px}.topbar-profile-chip{max-width:38px}.topbar-profile-chip span{display:none}.lang-switch button,.icon-btn{min-width:31px}.topbar-actions{gap:4px}}

/* PHASE 3E-10 — central topbar contrast sync */
html[data-theme="dark"] .topbar{
  background:rgba(5,12,10,.96)!important;
  border-bottom-color:rgba(183,255,53,.20)!important;
}
html[data-theme="dark"] .topbar-profile-chip,
html[data-theme="dark"] .topbar-alert-slot{
  background:#102a22!important;
  color:#f8fff9!important;
  border-color:rgba(183,255,53,.30)!important;
}
html[data-theme="dark"] .topbar-profile-chip strong,
html[data-theme="dark"] .topbar-profile-chip small,
html[data-theme="dark"] .brand-title,
html[data-theme="dark"] .brand-subtitle{
  color:#f8fff9!important;
  opacity:1!important;
}
html[data-theme="dark"] .brand-subtitle,
html[data-theme="dark"] .topbar-profile-chip small{
  color:#d9ebe4!important;
}
