:root{
  --ink:#16324a;--muted:#6f8191;--line:#dfeaf2;--soft:#f6fbff;--card:#fff;
  --blue:#4285f4;--cyan:#67d3db;--violet:#8b78ff;--pink:#ef8bc9;--warm:#ffbf66;
  --green:#4bb89a;--danger:#d95e6b;--sidebar:#10283d;--shadow:0 18px 55px rgba(31,69,102,.09)
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:linear-gradient(180deg,#f5fbff,#f8f7ff 60%,#fff);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Yu Gothic",Meiryo,sans-serif}
body header.wp-block-template-part,body footer.wp-block-template-part{display:none!important}
body .wp-site-blocks,body main,body .entry-content{max-width:none!important;margin:0!important;padding:0!important}
button,input{font:inherit}
button{cursor:pointer}
.myai-shell{min-height:100vh;display:flex;background:radial-gradient(circle at 95% 2%,rgba(139,120,255,.13),transparent 26%),radial-gradient(circle at 12% 94%,rgba(103,211,219,.12),transparent 30%)}
.myai-sidebar{position:fixed;left:0;top:0;bottom:0;width:242px;background:linear-gradient(180deg,#10283d,#132f48);color:white;padding:22px 14px;display:flex;flex-direction:column;z-index:30}
.brand-button{display:flex;align-items:center;gap:12px;background:none;border:0;color:#fff;text-align:left;padding:6px 8px 20px;width:100%}
.brand-mark{width:48px;height:48px;border-radius:16px;background:linear-gradient(145deg,#dffbff,#d9e9ff);position:relative;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
.brand-eye{position:absolute;top:17px;width:6px;height:10px;background:#1c4768;border-radius:50%}.brand-eye.left{left:14px}.brand-eye.right{right:14px}
.brand-smile{position:absolute;left:16px;top:28px;width:16px;height:7px;border-bottom:2px solid #1c4768;border-radius:0 0 14px 14px}
.brand-copy strong{display:block;font-size:22px;letter-spacing:-.03em}.brand-copy small{opacity:.65}
.side-nav{display:flex;flex-direction:column;gap:5px}
.nav-item{border:0;background:transparent;color:rgba(255,255,255,.72);padding:12px 13px;border-radius:14px;display:flex;align-items:center;gap:12px;text-align:left;font-weight:700}
.nav-item:hover,.nav-item.active{background:rgba(255,255,255,.1);color:#fff}
.nav-icon{display:grid;place-items:center;width:24px;height:24px;font-size:18px}
.sidebar-foot{margin-top:auto;padding:14px 9px;color:rgba(255,255,255,.6);display:flex;align-items:center;gap:7px}.dev-chip{font-size:10px;background:#ef8bc9;color:white;border-radius:999px;padding:4px 7px;font-weight:900}
.myai-main{margin-left:242px;width:calc(100% - 242px);min-height:100vh}
.topbar{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;background:rgba(248,252,255,.88);backdrop-filter:blur(15px);border-bottom:1px solid rgba(219,231,240,.75);z-index:20}
.topbar-left{display:flex;align-items:center;gap:12px}.topbar small,.eyebrow{display:block;color:var(--blue);font-size:11px;font-weight:900;letter-spacing:.12em}.topbar h1{font-size:22px;margin:2px 0 0}
.mobile-menu{display:none;border:0;background:transparent;font-size:24px}
.topbar-actions{display:flex;align-items:center;gap:10px}
.ghost-button,.secondary-button,.primary-button,.danger-button,.text-button,.full-button{border-radius:14px;border:1px solid var(--line);padding:11px 15px;font-weight:800;transition:.18s}
.ghost-button,.secondary-button{background:#fff;color:var(--ink)}
.primary-button{background:linear-gradient(135deg,var(--blue),#6378f4);border-color:transparent;color:#fff;box-shadow:0 9px 24px rgba(66,133,244,.23)}
.primary-button:hover{transform:translateY(-1px)}
.danger-button{background:#fff3f4;color:var(--danger);border-color:#ffd7db}
.text-button{border:0;background:transparent;color:var(--blue);padding:8px}
.full-button{width:100%;background:#f2f7fb;color:var(--ink);border:0;margin-top:12px}
.ai-mini-card{display:flex;align-items:center;gap:9px;border:0;background:#fff;padding:7px 10px;border-radius:14px;box-shadow:0 5px 18px rgba(31,69,102,.07);color:var(--ink);text-align:left}.ai-mini-card strong{display:block}.ai-mini-card small{display:block;color:var(--muted)}.ai-mini-card em{font-style:normal;color:var(--blue)}
.mini-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(145deg,#dffbff,#dce8ff);position:relative}.mini-avatar i{position:absolute;top:12px;width:4px;height:7px;background:#234967;border-radius:50%}.mini-avatar i:first-child{left:10px}.mini-avatar i:nth-child(2){right:10px}.mini-avatar b{position:absolute;left:12px;top:21px;width:12px;height:5px;border-bottom:2px solid #234967;border-radius:0 0 12px 12px}
.page-stage{padding:28px 34px 90px;max-width:1500px;margin:auto}
.app-page{display:none;animation:fade .25s ease}.app-page.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.glass-card,.panel,.metric-card,.quick-card,.flow-card,.growth-summary article{background:rgba(255,255,255,.94);border:1px solid rgba(208,224,235,.8);box-shadow:var(--shadow)}
.home-hero{min-height:285px;border-radius:30px;padding:40px 46px;display:flex;align-items:center;justify-content:space-between;overflow:hidden;background:linear-gradient(135deg,rgba(220,248,255,.96),rgba(237,242,255,.96) 48%,rgba(249,237,255,.96))}
.hero-copy{max-width:760px}.hero-copy h2{font-size:clamp(32px,4.8vw,58px);line-height:1.15;letter-spacing:-.04em;margin:10px 0 15px}.hero-copy p{font-size:16px;color:#587188;line-height:1.9;max-width:720px}
.hero-actions{display:flex;gap:10px;margin-top:20px}
.hero-ai-orb{width:250px;height:220px;position:relative;flex:0 0 auto;display:grid;place-items:center}
.hero-avatar{width:160px;height:160px;border-radius:50%;background:linear-gradient(145deg,#fff,#d7ecff);border:10px solid rgba(255,255,255,.7);display:grid;place-items:center;box-shadow:0 18px 44px rgba(44,75,122,.18);z-index:3}
.hero-face{width:100px;height:74px;border-radius:35px;background:#173552;position:relative;box-shadow:0 0 0 8px #d7f8ff}.hero-face i{position:absolute;top:23px;width:12px;height:20px;border-radius:50%;background:#6ee7f0;box-shadow:0 0 12px rgba(110,231,240,.8)}.hero-face i:first-child{left:27px}.hero-face i:nth-child(2){right:27px}.hero-face b{position:absolute;left:35px;top:46px;width:30px;height:14px;border-bottom:4px solid #6ee7f0;border-radius:0 0 30px 30px}
.pulse{position:absolute;border-radius:50%;border:1px solid rgba(66,133,244,.15)}.p1{width:185px;height:185px}.p2{width:220px;height:220px}.p3{width:260px;height:260px}
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}.metric-card{padding:20px 22px;border-radius:22px}.metric-head{display:flex;justify-content:space-between;color:var(--muted);font-weight:800;font-size:13px}.metric-head small{color:var(--green)}.metric-card>strong{display:block;font-size:44px;line-height:1;margin:10px 0}.metric-card>strong em{font-size:17px;font-style:normal}.metric-card p{color:var(--muted);font-size:12px;margin:10px 0 0;line-height:1.6}.big-sub{margin-top:18px!important}
.meter{height:8px;background:#edf3f7;border-radius:999px;overflow:hidden}.meter i{display:block;height:100%;background:linear-gradient(90deg,var(--blue),var(--cyan));border-radius:inherit}.meter.alt i{background:linear-gradient(90deg,var(--violet),var(--pink))}
.home-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:18px;margin-top:18px}.panel{border-radius:24px;padding:23px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.panel h3,.section-hero h2{margin:4px 0 8px;font-size:26px}.panel p,.section-hero p{color:var(--muted);line-height:1.75}.mini-radar{max-width:520px;margin:auto}.honest-quote{padding:16px 18px;border-radius:16px;background:linear-gradient(135deg,#eef8ff,#f5f1ff)}.honest-quote span{color:var(--blue);font-size:11px;font-weight:900}.honest-quote p{color:var(--ink);font-weight:800;margin:5px 0 0}.log-row{display:grid;grid-template-columns:14px 1fr;gap:10px;padding:14px 0;border-bottom:1px solid #edf2f6}.log-dot{width:10px;height:10px;border-radius:50%;margin-top:5px}.positive{background:var(--green)}.cool{background:var(--blue)}.warm{background:var(--warm)}.log-row strong{display:block}.log-row p{margin:3px 0 0;font-size:13px}
.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}.quick-card{border-radius:20px;padding:20px;text-align:left;color:var(--ink)}.quick-card>span{display:grid;place-items:center;width:38px;height:38px;background:#edf5ff;border-radius:12px;color:var(--blue);font-size:20px;margin-bottom:12px}.quick-card strong{display:block}.quick-card small{display:block;color:var(--muted);margin-top:5px}
.section-hero.compact{display:flex;justify-content:space-between;align-items:center;gap:30px;margin-bottom:20px}.section-hero h2{font-size:36px;letter-spacing:-.03em}.section-hero p{max-width:820px;margin:0}.soft-warning{background:#fff6dc;color:#8a6816;padding:11px 13px;border-radius:12px;font-size:12px;font-weight:800}
.honest-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:18px}.radar-main{min-height:620px}.segment-control{display:flex;background:#f1f5f8;border-radius:12px;padding:3px}.segment-control button{border:0;background:transparent;padding:7px 10px;border-radius:9px;color:var(--muted);font-size:12px}.segment-control button.active{background:#fff;color:var(--ink);box-shadow:0 2px 8px rgba(31,69,102,.08)}.large-radar{max-width:670px;margin:16px auto}
.emotion-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.emotion-card{border-radius:18px;padding:16px;background:#fff;border:1px solid var(--line);position:relative}.emotion-card>div{display:flex;justify-content:space-between;align-items:end}.emotion-card span{font-weight:800}.emotion-card strong{font-size:28px}.emotion-card p{font-size:12px;color:var(--muted);line-height:1.5;margin:7px 0}.emotion-card>small{position:absolute;right:13px;bottom:12px;font-weight:900;color:var(--green)}
.honest-message{display:flex;gap:18px;align-items:center;margin-top:18px}.message-avatar{width:70px;height:70px;border-radius:50%;background:linear-gradient(145deg,#dffbff,#e8e2ff);display:grid;place-items:center}.message-avatar span{width:32px;height:22px;border-radius:12px;background:#1b4565}.honest-message blockquote{font-size:18px;font-weight:800;line-height:1.7;margin:5px 0 0}.share-strip{margin-top:18px;border-radius:22px;padding:20px 22px;background:linear-gradient(135deg,#112c43,#173d5c);color:#fff;display:flex;justify-content:space-between;align-items:center;gap:20px}.share-strip span{display:block;opacity:.7;font-size:12px;margin-top:4px}.share-buttons{display:flex;gap:8px}
.personality-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.personality-side{display:grid;gap:18px}.slider-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(180px,1.3fr) 46px;gap:16px;align-items:center;padding:18px 0;border-bottom:1px solid #edf2f6}.slider-row strong{display:block}.slider-row small{color:var(--muted)}.slider-row input[type=range]{width:100%;accent-color:var(--blue)}.slider-row output{font-weight:900;color:var(--blue);text-align:right}.distance-options,.tag-cloud,.choice-row{display:flex;flex-wrap:wrap;gap:8px}.distance-options button,.tag-cloud button,.choice-pill{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 12px;color:var(--ink);font-weight:800}.distance-options button.selected,.tag-cloud button.selected,.choice-pill:hover{background:#eaf3ff;border-color:#bed7ff;color:#2866bc}.chat-preview{margin-top:12px;background:#f7fafc;border-radius:16px;padding:14px}.chat-preview p{max-width:90%;padding:10px 12px;border-radius:14px;margin:7px 0;line-height:1.6;font-size:13px}.user-bubble{background:#dfeefe;margin-left:auto!important;color:var(--ink)!important}.ai-bubble{background:#fff;color:var(--ink)!important;border:1px solid var(--line)}
.streak{width:90px;height:90px;border-radius:50%;background:linear-gradient(145deg,#fff0c8,#ffe1a5);display:grid;place-items:center;text-align:center}.streak strong{font-size:30px;line-height:1}.streak span{font-size:9px;font-weight:900;color:#9c711b}
.growth-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.growth-summary article{border-radius:18px;padding:17px}.growth-summary span{color:var(--muted);font-size:12px;font-weight:800;display:block}.growth-summary strong{font-size:28px;display:block;margin-top:5px}.growth-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.milestone-list{display:grid;gap:10px}.milestone{display:flex;align-items:center;gap:13px;padding:16px}.milestone>span{width:44px;height:44px;border-radius:14px;background:#edf3f7;display:grid;place-items:center;font-weight:900;color:#8293a2}.milestone.unlocked>span{background:#dcf5eb;color:#2c9878}.milestone strong,.milestone small{display:block}.milestone small{color:var(--muted);margin-top:3px}.growth-event{display:grid;grid-template-columns:76px 1fr;gap:14px;padding:18px 0;border-bottom:1px solid #edf2f6}.event-day{font-size:11px;font-weight:900;color:white;background:var(--blue);border-radius:999px;padding:6px 8px;height:max-content;text-align:center}.event-time{font-size:12px;color:var(--muted);padding-top:4px}.event-body strong{display:block}.event-body p{margin:5px 0 0;font-size:13px}.event-tags{display:flex;gap:6px;margin-top:8px}.event-tags span{font-size:11px;background:#edf5ff;color:#2d69b9;border-radius:999px;padding:5px 8px}
.handover-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:10px;margin-bottom:18px}.flow-card{border-radius:20px;padding:18px}.flow-card span{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#edf3f7;font-weight:900;color:var(--blue);margin-bottom:12px}.flow-card strong{display:block}.flow-card p{font-size:12px;color:var(--muted);line-height:1.5}.flow-card.active{border-color:#bfd6ff;background:#f7fbff}.handover-layout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.check-list{display:grid;gap:10px;margin:15px 0 20px}.check-list label{display:flex;align-items:center;gap:9px;border:1px solid #edf2f6;padding:12px;border-radius:12px}.check-list label.disabled{opacity:.55}.check-list label span{margin-left:auto;font-size:11px;color:var(--danger)}.token-box{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;border:1px dashed #bfd1df;background:#f7fafc;border-radius:14px;padding:18px;margin:15px 0;font-size:18px;letter-spacing:.08em;word-break:break-all}.token-meta{display:flex;gap:10px}.token-meta span{background:#f3f6f8;padding:8px 10px;border-radius:10px;font-size:12px}.security-note{font-size:12px!important;margin-top:14px}
.card-builder-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:20px;align-items:start}.persona-card{min-height:540px;border-radius:32px;padding:32px;color:#fff;position:relative;overflow:hidden;box-shadow:0 24px 70px rgba(32,57,90,.25);background:#15314d}.persona-bg{position:absolute;inset:0;opacity:.95}.pbg1{background:radial-gradient(circle at 80% 20%,rgba(103,211,219,.75),transparent 34%),linear-gradient(145deg,#183552,#4658a4)}.pbg2{background:radial-gradient(circle at 80% 20%,rgba(239,139,201,.7),transparent 34%),linear-gradient(145deg,#3a214a,#7a4e89)}.pbg3{background:radial-gradient(circle at 80% 20%,rgba(255,191,102,.7),transparent 34%),linear-gradient(145deg,#4c3722,#98734f)}.pbg4{background:radial-gradient(circle at 80% 20%,rgba(75,184,154,.7),transparent 34%),linear-gradient(145deg,#163b36,#2c7568)}.persona-top,.persona-score-row,.persona-tags,.persona-card blockquote,.persona-card footer{position:relative;z-index:2}.persona-top{display:flex;align-items:center;gap:18px}.persona-avatar{width:86px;height:86px;border-radius:26px;background:rgba(255,255,255,.15);display:grid;place-items:center;backdrop-filter:blur(9px)}.small-face{width:54px;height:40px;border-radius:18px;background:#e9fcff;position:relative}.small-face i{position:absolute;top:12px;width:6px;height:10px;background:#26485f;border-radius:50%}.small-face i:first-child{left:14px}.small-face i:nth-child(2){right:14px}.small-face b{position:absolute;left:19px;top:24px;width:16px;height:7px;border-bottom:2px solid #26485f;border-radius:0 0 10px 10px}.persona-top span{font-size:10px;letter-spacing:.15em;opacity:.65}.persona-top h2{font-size:44px;margin:2px 0}.persona-top p{margin:0;opacity:.8}.persona-score-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:34px}.persona-score-row div{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.12);padding:15px;border-radius:18px}.persona-score-row span{display:block;font-size:11px;opacity:.7}.persona-score-row strong{display:block;font-size:28px;margin-top:4px}.persona-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}.persona-tags span{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.13);border-radius:999px;padding:7px 10px;font-size:12px}.persona-card blockquote{font-size:22px;line-height:1.65;font-weight:800;margin:34px 0}.persona-card footer{display:flex!important;justify-content:space-between;position:absolute;left:32px;right:32px;bottom:26px;font-size:12px;opacity:.7}.card-controls{display:grid;gap:16px}.theme-row{display:flex;gap:8px;margin-top:10px}.theme-dot{width:36px;height:36px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #d5e0e8}.t1{background:#3f58a0}.t2{background:#85568f}.t3{background:#98734f}.t4{background:#2c7568}.theme-dot.selected{box-shadow:0 0 0 3px var(--blue)}.switch-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:10px 0;border-bottom:1px solid #edf2f6}.switch-row input{width:20px;height:20px;accent-color:var(--blue)}
.provider-list{display:grid;gap:14px}.provider-panel{display:grid;grid-template-columns:70px 1fr auto;align-items:center;gap:18px}.provider-logo{width:62px;height:62px;border-radius:20px;display:grid;place-items:center;font-size:28px;font-weight:900}.provider-logo.chatgpt{background:#e9f7f4;color:#19866f}.provider-logo.gemini{background:linear-gradient(145deg,#e8efff,#f2e8ff);color:#5d68c8}.provider-info strong,.provider-info span{display:block}.provider-info strong{font-size:20px}.provider-info span{color:var(--muted);font-size:12px}.provider-info p{font-size:13px;margin:6px 0 0}.provider-status{text-align:right}.status{display:block;font-size:11px;color:var(--muted);margin-bottom:8px}.connection-rule{margin-top:18px}
.profile-hero{display:grid;grid-template-columns:120px 1fr auto;gap:24px;align-items:center;padding:30px}.profile-avatar.big{width:110px;height:110px;border-radius:32px;background:linear-gradient(145deg,#dffbff,#e4e6ff);display:grid;place-items:center}.profile-copy h2{font-size:38px;margin:3px 0}.profile-copy p{color:var(--muted)}.profile-tags{display:flex;gap:7px;flex-wrap:wrap}.profile-tags span{background:#f0f5f9;border-radius:999px;padding:6px 9px;font-size:11px}.profile-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:18px;margin-top:18px}.relationship-level{display:flex;align-items:end;gap:10px;margin:20px 0}.relationship-level strong{font-size:64px;line-height:.8}.relationship-level span{color:var(--muted);font-weight:800}.profile-dl{margin:14px 0 0}.profile-dl>div{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #edf2f6}.profile-dl dt{color:var(--muted)}.profile-dl dd{margin:0;font-weight:800}
.settings-list{display:grid;gap:16px}.setting-group{display:grid;gap:12px}.setting-title span,.setting-title small{display:block}.setting-title span{font-size:20px;font-weight:900}.setting-title small{color:var(--muted);margin-top:3px}.setting-group>label:not(.switch-row){display:grid;gap:6px;font-weight:800}.setting-group input[type=text],.onboarding-card input[type=text]{width:100%;border:1px solid #d7e3ec;border-radius:14px;padding:13px 14px;background:#fff;outline:none}.setting-group input[type=text]:focus,.onboarding-card input[type=text]:focus{border-color:#9fc4ff;box-shadow:0 0 0 3px rgba(66,133,244,.08)}
.onboarding-wrap{max-width:800px;margin:30px auto}.onboarding-progress{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:24px}.onboarding-progress i{width:70px;height:2px;background:#dce6ee}.step-chip{width:32px;height:32px;border-radius:50%;background:#e9eef2;display:grid;place-items:center;font-weight:900;color:#8a99a7}.step-chip.active{background:var(--blue);color:white}.onboarding-card{display:none;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:30px;padding:36px}.onboarding-card.active{display:block}.big-emoji{font-size:52px;margin-bottom:12px}.onboarding-card h2{font-size:34px;margin:6px 0 10px}.onboarding-card>p{color:var(--muted);line-height:1.7;margin-bottom:20px}.onboarding-card label{display:grid;gap:8px;font-weight:900;margin-bottom:16px}.onboarding-card .primary-button{margin-top:10px}.step-actions{display:flex;justify-content:space-between;margin-top:14px}.preset-grid,.provider-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.preset-card,.provider-card{border:1px solid var(--line);background:#fff;border-radius:18px;padding:18px;text-align:left;color:var(--ink)}.preset-card strong,.preset-card small,.provider-card strong,.provider-card small{display:block}.preset-card small,.provider-card small{color:var(--muted);margin-top:4px}.preset-card.selected,.provider-card.selected{border-color:#9fc4ff;background:#f1f7ff;box-shadow:0 0 0 2px rgba(66,133,244,.08)}.provider-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#eef4ff;color:var(--blue);font-size:22px;margin-bottom:12px}.success-card{text-align:center}.success-orb{width:80px;height:80px;border-radius:50%;display:grid;place-items:center;background:#dcf5eb;color:#27866c;font-size:34px;font-weight:900;margin:0 auto 15px}
.bottom-nav{display:none}
.toast{position:fixed;right:24px;bottom:24px;background:#122f48;color:#fff;padding:12px 16px;border-radius:12px;font-weight:800;box-shadow:0 12px 35px rgba(14,39,60,.25);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:100}.toast.show{opacity:1;transform:none}
svg.radar-svg{width:100%;overflow:visible}.radar-grid polygon,.radar-grid line{fill:none;stroke:#d7e3ed;stroke-width:1.4}.radar-shape{fill:rgba(66,133,244,.22);stroke:var(--blue);stroke-width:4;stroke-linejoin:round}.radar-dot{fill:#fff;stroke:var(--blue);stroke-width:4}.radar-label{fill:var(--ink);font-size:14px;font-weight:900}
@media(max-width:1080px){.myai-sidebar{width:210px}.myai-main{margin-left:210px;width:calc(100% - 210px)}.home-grid,.honest-layout,.personality-grid,.growth-layout,.handover-layout,.card-builder-layout{grid-template-columns:1fr}.emotion-list{grid-template-columns:repeat(3,1fr)}.hero-ai-orb{width:190px}.provider-panel{grid-template-columns:60px 1fr}.provider-status{grid-column:2;text-align:left}}


/* =========================================================
   v0.1-ui02-homepc
   PC HOME ONLY
   スマホ（820px以下）は既存UIを維持。
   ========================================================= */

@media (min-width:821px){

  /* PCは左サイドバー + 広いコンテンツ領域で固定 */
  .myai-sidebar{
    width:232px;
  }

  .myai-main{
    margin-left:232px;
    width:calc(100% - 232px);
  }

  .topbar{
    padding-left:32px;
    padding-right:32px;
  }

  .page-stage{
    width:100%;
    max-width:1540px;
    padding:30px 32px 90px;
  }

  /* HOME HERO */
  .app-page[data-page="home"] .home-hero{
    display:grid;
    grid-template-columns:minmax(0,1fr) 300px;
    gap:32px;
    min-height:310px;
    padding:42px 46px;
  }

  .app-page[data-page="home"] .hero-copy{
    max-width:none;
  }

  .app-page[data-page="home"] .hero-copy h2{
    max-width:900px;
    font-size:clamp(38px,4vw,58px);
  }

  .app-page[data-page="home"] .hero-copy p{
    max-width:800px;
  }

  .app-page[data-page="home"] .hero-ai-orb{
    width:100%;
    height:230px;
  }

  /* 3ステータスはPCでは必ず横並び */
  .app-page[data-page="home"] .stats-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
  }

  .app-page[data-page="home"] .metric-card{
    min-height:174px;
  }

  /* 本音と育成ログはPC専用2カラム */
  .app-page[data-page="home"] .home-grid{
    grid-template-columns:minmax(0,1.55fr) minmax(330px,.75fr);
    gap:18px;
    align-items:stretch;
  }

  .app-page[data-page="home"] .honest-preview,
  .app-page[data-page="home"] .today-log{
    min-height:455px;
  }

  .app-page[data-page="home"] .honest-preview{
    display:flex;
    flex-direction:column;
  }

  .app-page[data-page="home"] .mini-radar{
    width:min(100%,560px);
    flex:1;
    display:grid;
    place-items:center;
  }

  .app-page[data-page="home"] .today-log{
    display:flex;
    flex-direction:column;
  }

  .app-page[data-page="home"] .today-log .full-button{
    margin-top:auto;
  }

  /* 主要導線3つはPCではカード横並び */
  .app-page[data-page="home"] .quick-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
  }

  .app-page[data-page="home"] .quick-card{
    min-height:130px;
    display:grid;
    grid-template-columns:48px 1fr;
    grid-template-rows:auto auto;
    column-gap:14px;
    align-items:center;
  }

  .app-page[data-page="home"] .quick-card>span{
    grid-row:1/3;
    margin:0;
  }

  .app-page[data-page="home"] .quick-card strong{
    align-self:end;
  }

  .app-page[data-page="home"] .quick-card small{
    align-self:start;
  }
}

/* 821〜1180pxも「スマホ化」せず、PCコンパクトとして維持 */
@media (min-width:821px) and (max-width:1180px){

  .myai-sidebar{
    width:196px;
  }

  .myai-main{
    margin-left:196px;
    width:calc(100% - 196px);
  }

  .brand-copy small{
    display:none;
  }

  .nav-item{
    padding-left:10px;
    padding-right:10px;
    gap:8px;
    font-size:13px;
  }

  .page-stage{
    padding-left:22px;
    padding-right:22px;
  }

  .app-page[data-page="home"] .home-hero{
    grid-template-columns:minmax(0,1fr) 205px;
    padding:34px 32px;
  }

  .app-page[data-page="home"] .hero-avatar{
    width:135px;
    height:135px;
  }

  .app-page[data-page="home"] .hero-face{
    transform:scale(.82);
  }

  .app-page[data-page="home"] .home-grid{
    grid-template-columns:minmax(0,1.35fr) minmax(285px,.85fr);
  }

  .app-page[data-page="home"] .panel{
    padding:19px;
  }
}

@media(max-width:820px){.myai-sidebar{transform:translateX(-105%);transition:.2s;width:242px}.myai-shell.menu-open .myai-sidebar{transform:none}.myai-main{margin-left:0;width:100%}.mobile-menu{display:block}.topbar{padding:0 16px;height:76px}.page-stage{padding:18px 14px 95px}.home-hero{padding:26px 22px;min-height:240px}.hero-ai-orb{width:150px;height:170px}.hero-avatar{width:120px;height:120px}.hero-face{transform:scale(.72)}.stats-grid,.quick-grid{grid-template-columns:1fr}.growth-summary{grid-template-columns:repeat(2,1fr)}.emotion-list{grid-template-columns:repeat(2,1fr)}.section-hero.compact{align-items:flex-start;flex-direction:column}.bottom-nav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:10px;right:10px;bottom:10px;background:rgba(16,40,61,.94);backdrop-filter:blur(15px);border-radius:18px;padding:7px;z-index:50;box-shadow:0 12px 40px rgba(18,47,72,.3)}.bottom-nav button{border:0;background:transparent;color:rgba(255,255,255,.58);display:grid;place-items:center;gap:2px;padding:5px;border-radius:12px}.bottom-nav button.active{background:rgba(255,255,255,.12);color:#fff}.bottom-nav span{font-size:18px}.bottom-nav small{font-size:10px}.persona-score-row{grid-template-columns:1fr}.profile-hero{grid-template-columns:90px 1fr}.profile-hero>.primary-button{grid-column:1/-1}.profile-grid{grid-template-columns:1fr}}
@media(max-width:580px){.topbar-actions>.ghost-button{display:none}.ai-mini-card span:last-child{display:none}.hero-ai-orb{display:none}.hero-copy h2{font-size:34px}.hero-actions{flex-direction:column}.hero-actions button{width:100%}.metric-card>strong{font-size:38px}.emotion-list{grid-template-columns:1fr}.honest-message{align-items:flex-start}.share-strip{align-items:flex-start;flex-direction:column}.share-buttons{width:100%;display:grid;grid-template-columns:1fr 1fr}.slider-row{grid-template-columns:1fr 46px}.slider-row input{grid-column:1/-1;grid-row:2}.handover-flow{grid-template-columns:1fr}.handover-flow>i{transform:rotate(90deg);text-align:center}.preset-grid,.provider-grid{grid-template-columns:1fr}.onboarding-card{padding:24px 18px}.onboarding-progress i{width:34px}.persona-card{padding:22px;min-height:520px}.persona-card footer{left:22px;right:22px}.persona-top h2{font-size:36px}.persona-card blockquote{font-size:18px}.provider-panel{grid-template-columns:54px 1fr}.profile-hero{grid-template-columns:1fr;text-align:center}.profile-avatar.big{margin:auto}.profile-tags{justify-content:center}}

/* =========================================================
   v0.1-ui03-pcbase
   PC土台修正
   - WordPressテーマの本文幅制限からmyAIを完全に外す
   - PCサイドバーを細く・文字を小さく
   - スマホUIは820px以下で従来維持
   ========================================================= */

@media (min-width:821px){

  /* Gutenberg / Twenty Twenty-Five の constrained layout を突破 */
  body.home,
  body.page{
    overflow-x:hidden;
  }

  body.home .wp-site-blocks,
  body.home main,
  body.home .wp-block-post-content,
  body.home .entry-content,
  body.page .wp-site-blocks,
  body.page main,
  body.page .wp-block-post-content,
  body.page .entry-content{
    max-width:none !important;
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }

  #dim-myai-app.myai-shell{
    position:relative;
    width:100vw !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:calc(50% - 50vw) !important;
    margin-right:calc(50% - 50vw) !important;
  }

  /* PCサイドバー：情報密度を上げる */
  .myai-sidebar{
    width:208px !important;
    padding:18px 12px !important;
  }

  .myai-main{
    margin-left:208px !important;
    width:calc(100vw - 208px) !important;
  }

  .brand-button{
    gap:10px;
    padding:2px 6px 18px;
  }

  .brand-mark{
    width:42px;
    height:42px;
    border-radius:14px;
  }

  .brand-copy strong{
    font-size:18px !important;
    line-height:1.1;
  }

  .brand-copy small{
    font-size:11px !important;
    line-height:1.3;
    margin-top:4px;
    display:block;
  }

  .side-nav{
    gap:3px;
  }

  .nav-item{
    min-height:46px;
    padding:10px 10px !important;
    gap:9px !important;
    border-radius:12px;
    font-size:14px !important;
    line-height:1.2 !important;
    font-weight:700 !important;
    letter-spacing:0 !important;
  }

  .nav-icon{
    width:22px;
    height:22px;
    font-size:15px !important;
    flex:0 0 22px;
  }

  .sidebar-foot{
    font-size:11px;
  }

  /* PC上部 */
  .topbar{
    width:100%;
    height:76px;
    padding:0 28px !important;
  }

  .topbar h1{
    font-size:20px !important;
    line-height:1.2;
  }

  .topbar small{
    font-size:10px !important;
  }

  .page-stage{
    width:100% !important;
    max-width:1600px !important;
    margin:0 auto !important;
    padding:26px 28px 90px !important;
  }

  /* HOME HEROをPC横長カードとして再固定 */
  .app-page[data-page="home"] .home-hero{
    width:100%;
    min-height:280px;
    grid-template-columns:minmax(0,1fr) 260px !important;
    gap:34px !important;
    padding:36px 40px !important;
  }

  .app-page[data-page="home"] .hero-copy h2{
    font-size:clamp(34px,3.3vw,52px) !important;
    line-height:1.18 !important;
    max-width:900px !important;
    word-break:keep-all;
    overflow-wrap:break-word;
  }

  .app-page[data-page="home"] .hero-copy p{
    font-size:15px !important;
    max-width:760px !important;
  }

  .app-page[data-page="home"] .hero-ai-orb{
    width:260px !important;
    height:210px !important;
  }

  /* HOMEの各段を横幅いっぱい使う */
  .app-page[data-page="home"] .stats-grid,
  .app-page[data-page="home"] .home-grid,
  .app-page[data-page="home"] .quick-grid{
    width:100%;
  }

  .app-page[data-page="home"] .stats-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .app-page[data-page="home"] .home-grid{
    grid-template-columns:minmax(0,1.5fr) minmax(340px,.78fr) !important;
  }

  .app-page[data-page="home"] .quick-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

/* 821〜1100pxだけPCコンパクト。
   スマホ化は820px以下から。 */
@media (min-width:821px) and (max-width:1100px){
  .myai-sidebar{
    width:184px !important;
  }
  .myai-main{
    margin-left:184px !important;
    width:calc(100vw - 184px) !important;
  }
  .nav-item{
    font-size:13px !important;
  }
  .brand-copy small{
    display:none !important;
  }
  .page-stage{
    padding-left:20px !important;
    padding-right:20px !important;
  }
  .app-page[data-page="home"] .home-hero{
    grid-template-columns:minmax(0,1fr) 190px !important;
    padding:30px 28px !important;
  }
  .app-page[data-page="home"] .hero-ai-orb{
    width:190px !important;
  }
  .app-page[data-page="home"] .home-grid{
    grid-template-columns:minmax(0,1.3fr) minmax(280px,.8fr) !important;
  }
}


/* =========================================================
   v0.1-ui04-pcshell
   PC共通骨格のみ再設計
   - WordPress感を消す
   - カード密度を上げる
   - 実ユーザーUI確認のため管理バー非表示
   ========================================================= */

@media (min-width:821px){

  html{
    background:#f6f8fb;
  }

  body{
    background:#f6f8fb !important;
  }

  /* APP SHELL */
  #dim-myai-app.myai-shell{
    background:
      radial-gradient(circle at 90% 8%, rgba(123,143,255,.09), transparent 28%),
      radial-gradient(circle at 18% 90%, rgba(110,210,208,.07), transparent 26%),
      #f6f8fb !important;
  }

  /* SIDEBAR — WordPress管理画面感を排除 */
  .myai-sidebar{
    width:188px !important;
    padding:18px 12px 14px !important;
    background:rgba(255,255,255,.95) !important;
    color:#183247 !important;
    border-right:1px solid #e5ebf0;
    box-shadow:8px 0 30px rgba(28,54,79,.035);
  }

  .myai-main{
    margin-left:188px !important;
    width:calc(100vw - 188px) !important;
  }

  .brand-button{
    color:#183247 !important;
    padding:2px 6px 18px !important;
    border-bottom:1px solid #edf1f4;
    margin-bottom:10px;
  }

  .brand-mark{
    width:38px !important;
    height:38px !important;
    border-radius:13px !important;
    background:linear-gradient(145deg,#e9fbff,#e9ebff) !important;
    box-shadow:inset 0 0 0 1px rgba(55,92,130,.06) !important;
  }

  .brand-copy strong{
    color:#173248 !important;
    font-size:17px !important;
  }

  .brand-copy small{
    color:#8a9aa8 !important;
    opacity:1 !important;
    font-size:9px !important;
    margin-top:3px !important;
  }

  .side-nav{
    gap:4px !important;
    padding-top:3px;
  }

  .nav-item{
    min-height:42px !important;
    padding:8px 9px !important;
    gap:9px !important;
    border-radius:12px !important;
    color:#718292 !important;
    font-size:12.5px !important;
    font-weight:700 !important;
    background:transparent !important;
  }

  .nav-item:hover{
    background:#f3f7fa !important;
    color:#2f5878 !important;
  }

  .nav-item.active{
    background:linear-gradient(135deg,#eaf3ff,#f2f0ff) !important;
    color:#326fbd !important;
    box-shadow:inset 0 0 0 1px rgba(68,124,201,.08);
  }

  .nav-icon{
    width:26px !important;
    height:26px !important;
    flex:0 0 26px !important;
    border-radius:9px;
    background:#f1f5f8;
    color:#6d8190;
    font-size:13px !important;
  }

  .nav-item.active .nav-icon{
    background:#dfeeff;
    color:#3675c6;
  }

  .sidebar-foot{
    color:#8c9aa6 !important;
    padding:10px 6px !important;
    font-size:9px !important;
  }

  .dev-chip{
    font-size:8px !important;
    padding:3px 6px !important;
  }

  /* TOPBAR */
  .topbar{
    height:68px !important;
    padding:0 24px !important;
    background:rgba(246,248,251,.88) !important;
    border-bottom:1px solid #e6ebef !important;
    box-shadow:none !important;
  }

  .topbar h1{
    font-size:18px !important;
    margin-top:1px !important;
  }

  .topbar small{
    font-size:9px !important;
  }

  .ghost-button{
    padding:8px 11px !important;
    font-size:12px !important;
    border-radius:11px !important;
  }

  .ai-mini-card{
    padding:5px 8px !important;
    border-radius:12px !important;
    box-shadow:none !important;
    border:1px solid #e3e9ee !important;
  }

  .mini-avatar{
    width:31px !important;
    height:31px !important;
  }

  /* CONTENT WIDTH / DENSITY */
  .page-stage{
    width:100% !important;
    max-width:1380px !important;
    margin:0 auto !important;
    padding:20px 24px 72px !important;
  }

  .panel,
  .metric-card,
  .quick-card,
  .flow-card,
  .growth-summary article{
    border-radius:18px !important;
    box-shadow:0 8px 24px rgba(31,69,102,.045) !important;
    border-color:#e4ebf0 !important;
  }

  .panel{
    padding:18px !important;
  }

  .panel h3{
    font-size:20px !important;
    margin:3px 0 6px !important;
  }

  .panel p{
    font-size:13px !important;
    line-height:1.65 !important;
  }

  .eyebrow{
    font-size:9px !important;
    letter-spacing:.11em !important;
  }

  .section-hero.compact{
    margin-bottom:14px !important;
  }

  .section-hero.compact h2{
    font-size:28px !important;
    margin:4px 0 6px !important;
  }

  .section-hero.compact p{
    font-size:13px !important;
    line-height:1.6 !important;
  }

  /* PROFILE PAGE: screenshot showed these cards too large */
  .profile-hero{
    grid-template-columns:86px 1fr auto !important;
    gap:18px !important;
    padding:20px !important;
    border-radius:18px !important;
  }

  .profile-avatar.big{
    width:78px !important;
    height:78px !important;
    border-radius:22px !important;
  }

  .profile-avatar.big .hero-face{
    transform:scale(.67);
  }

  .profile-copy h2{
    font-size:28px !important;
    margin:2px 0 !important;
  }

  .profile-copy p{
    font-size:13px !important;
    margin:4px 0 8px !important;
  }

  .profile-tags span{
    font-size:9px !important;
    padding:4px 7px !important;
  }

  .profile-hero .primary-button{
    padding:10px 14px !important;
    border-radius:12px !important;
    font-size:12px !important;
  }

  .profile-grid{
    gap:14px !important;
    margin-top:14px !important;
    grid-template-columns:.72fr 1.28fr !important;
  }

  .relationship-level{
    margin:12px 0 14px !important;
  }

  .relationship-level strong{
    font-size:48px !important;
  }

  .relationship-level span{
    font-size:12px !important;
  }

  .profile-dl{
    margin-top:8px !important;
  }

  .profile-dl>div{
    padding:8px 0 !important;
    font-size:12px !important;
  }

  /* HOME also compact */
  .app-page[data-page="home"] .home-hero{
    min-height:245px !important;
    padding:30px 34px !important;
    border-radius:22px !important;
  }

  .app-page[data-page="home"] .hero-copy h2{
    font-size:clamp(32px,3vw,46px) !important;
  }

  .app-page[data-page="home"] .hero-copy p{
    font-size:13px !important;
    line-height:1.7 !important;
  }

  .app-page[data-page="home"] .metric-card{
    min-height:145px !important;
    padding:16px 18px !important;
  }

  .app-page[data-page="home"] .metric-card>strong{
    font-size:36px !important;
  }

  .app-page[data-page="home"] .honest-preview,
  .app-page[data-page="home"] .today-log{
    min-height:390px !important;
  }

  .app-page[data-page="home"] .quick-card{
    min-height:105px !important;
    padding:16px !important;
  }
}

/* medium desktop */
@media (min-width:821px) and (max-width:1100px){
  .myai-sidebar{
    width:174px !important;
  }
  .myai-main{
    margin-left:174px !important;
    width:calc(100vw - 174px) !important;
  }
  .nav-item{
    font-size:11.5px !important;
  }
  .page-stage{
    padding-left:18px !important;
    padding-right:18px !important;
  }
}


/* =========================================================
   v0.1-ui05-ux
   共通UI / 顔アイコン / 緑レーダー / PC幅 / スマホ中央揃え
   ========================================================= */

:root{
  --emo-fun:#F0A45D;
  --emo-familiar:#55B9A6;
  --emo-affinity:#4F9CE8;
  --emo-hard:#9A78DA;
  --emo-sad:#74869B;
  --emo-happy:#E887B5;
  --emo-serious:#4E70C9;
  --radar-green:#49B389;
  --radar-green-fill:rgba(73,179,137,.20);
  --radar-past:#F29A4A;
  --radar-past-fill:rgba(242,154,74,.16);
}

/* WordPress側のページタイトルはアプリ内ヘッダーと重複するため非表示 */
body.home .wp-block-post-title,
body.page .wp-block-post-title{
  display:none !important;
}

/* 上部myAI帯 */
.topbar{
  position:sticky;
  overflow:hidden;
  background:
    radial-gradient(circle at 76% -70%,rgba(103,211,219,.20),transparent 48%),
    linear-gradient(105deg,rgba(249,253,255,.96),rgba(244,247,255,.96) 56%,rgba(250,246,255,.96)) !important;
}
.topbar::before{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:2px;
  background:linear-gradient(90deg,#69D1D7,#5A8CF5,#9D7BE7,#E990BE);
  opacity:.65;
}
.topbar::after{
  content:"";
  position:absolute;
  width:170px;height:170px;
  right:140px;top:-125px;
  border-radius:50%;
  border:1px solid rgba(91,137,229,.10);
  box-shadow:0 0 0 25px rgba(91,137,229,.025);
  pointer-events:none;
}
.topbar-left,.topbar-actions{position:relative;z-index:2}
.topbar-brandword{
  font-size:24px;
  line-height:1;
  font-weight:850;
  letter-spacing:-.045em;
  background:linear-gradient(135deg,#163D5A,#416BE3 62%,#8B67D4);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  white-space:nowrap;
}
.topbar-divider{
  width:1px;
  height:30px;
  background:#DDE6ED;
  margin:0 2px;
}
.topbar-pagecopy{min-width:0}

/* 顔アイコン */
.myai-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
  display:block;
}
.mini-avatar,
.profile-avatar.big,
.persona-avatar,
.hero-avatar,
.message-avatar{
  overflow:hidden;
}
.ai-mini-card{
  transition:.18s ease;
}
.ai-mini-card:hover{
  transform:translateY(-1px);
  border-color:#CBD9E5 !important;
  box-shadow:0 8px 18px rgba(39,72,102,.07) !important;
}

/* 顔アイコン選択 */
.avatar-select-panel{
  min-width:0;
}
.avatar-picker-host{
  display:grid;
  gap:13px;
  margin-top:12px;
}
.avatar-picker-section{
  display:grid;
  gap:7px;
}
.avatar-group-title{
  color:#7D8E9C;
  font-size:10px;
  font-weight:850;
  letter-spacing:.08em;
}
.avatar-choice-grid{
  display:grid;
  grid-template-columns:repeat(10,minmax(34px,1fr));
  gap:7px;
}
.avatar-choice,
.avatar-upload-choice{
  aspect-ratio:1;
  min-width:0;
  border:1px solid #E0E8EE;
  background:#fff;
  border-radius:13px;
  padding:3px;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:.16s ease;
  overflow:hidden;
}
.avatar-choice img,
.avatar-upload-choice img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
}
.avatar-choice:hover,
.avatar-upload-choice:hover{
  transform:translateY(-1px);
  border-color:#AFC8ED;
}
.avatar-choice.selected,
.avatar-upload-choice.selected{
  border-color:#4D85E7;
  box-shadow:0 0 0 2px rgba(77,133,231,.17);
  background:#F4F8FF;
}
.avatar-upload-choice>span{
  color:#5083D8;
  font-size:23px;
  font-weight:700;
  line-height:1;
}
.avatar-upload-choice small{
  display:block;
  font-size:8px;
  color:#8293A0;
  margin-top:3px;
}

/* レーダーチャート */
.radar-shape{
  fill:var(--radar-green-fill) !important;
  stroke:var(--radar-green) !important;
}
.radar-dot{
  fill:#fff !important;
  stroke:var(--radar-green) !important;
}
.radar-shape-past{
  fill:var(--radar-past-fill);
  stroke:var(--radar-past);
  stroke-width:3;
  stroke-linejoin:round;
}
.radar-label{
  font-size:13px !important;
  font-weight:900 !important;
}
.radar-controls{
  display:grid;
  justify-items:end;
  gap:7px;
}
.radar-legend{
  display:flex;
  gap:11px;
  font-size:10px;
  color:#7A8C99;
  font-weight:800;
}
.radar-legend[hidden]{display:none !important}
.radar-legend span{display:flex;align-items:center;gap:5px}
.radar-legend i{width:15px;height:4px;border-radius:999px;display:inline-block}
.legend-current{background:var(--radar-green)}
.legend-past{background:var(--radar-past)}

/* 本音ラベルと今日ログの●を共通色に */
.emotion-fun .log-dot,
.log-dot.emotion-fun{background:var(--emo-fun)}
.log-dot.emotion-familiar{background:var(--emo-familiar)}
.log-dot.emotion-affinity{background:var(--emo-affinity)}
.log-dot.emotion-hard{background:var(--emo-hard)}
.log-dot.emotion-sad{background:var(--emo-sad)}
.log-dot.emotion-happy{background:var(--emo-happy)}
.log-dot.emotion-serious{background:var(--emo-serious)}
.emotion-card.emotion-fun span{color:var(--emo-fun)}
.emotion-card.emotion-familiar span{color:var(--emo-familiar)}
.emotion-card.emotion-affinity span{color:var(--emo-affinity)}
.emotion-card.emotion-hard span{color:var(--emo-hard)}
.emotion-card.emotion-sad span{color:var(--emo-sad)}
.emotion-card.emotion-happy span{color:var(--emo-happy)}
.emotion-card.emotion-serious span{color:var(--emo-serious)}

@media (min-width:821px){
  /* PC：カード横幅をさらに少し絞る */
  .page-stage{
    max-width:1220px !important;
  }
  .profile-grid{
    grid-template-columns:.72fr 1.28fr !important;
  }
  .profile-grid .avatar-select-panel{
    grid-column:1 / -1;
  }
  .avatar-choice-grid{
    grid-template-columns:repeat(10,44px);
    justify-content:start;
  }
}

@media(max-width:820px){
  /* スマホ：上部プロフィールに名前＋親友度を必ず表示 */
  .topbar{
    min-height:78px;
    height:auto !important;
    padding:9px 12px !important;
  }
  .topbar-left{
    min-width:0;
    gap:8px !important;
  }
  .topbar-brandword{
    font-size:18px;
  }
  .topbar-divider{
    height:25px;
  }
  .topbar-pagecopy h1,
  .topbar h1{
    font-size:16px !important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:112px;
  }
  .topbar-pagecopy small{
    font-size:8px !important;
  }
  .topbar-actions{
    margin-left:auto;
    flex:0 0 auto;
  }
  .ai-mini-card{
    padding:5px 7px !important;
    gap:6px !important;
    min-width:88px;
  }
  .mini-avatar{
    width:31px !important;
    height:31px !important;
    flex:0 0 31px;
  }
  .mini-profile-copy{
    display:block !important;
    min-width:0;
  }
  .mini-profile-copy strong{
    display:block;
    font-size:11px;
    line-height:1.05;
    max-width:50px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .mini-profile-copy small{
    display:block !important;
    font-size:8px !important;
    line-height:1.15;
    white-space:nowrap;
  }

  /* カード自体を中央に揃える。テキストは従来通り左揃え */
  .page-stage{
    padding-left:10px !important;
    padding-right:10px !important;
    padding-bottom:118px !important;
  }
  .home-hero,
  .metric-card,
  .panel,
  .quick-card,
  .growth-summary article,
  .flow-card,
  .provider-panel,
  .profile-hero,
  .persona-card{
    width:calc(100% - 4px) !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
  .stats-grid,
  .home-grid,
  .quick-grid,
  .growth-summary,
  .growth-layout,
  .honest-layout,
  .personality-grid,
  .handover-layout,
  .card-builder-layout,
  .provider-list,
  .profile-grid,
  .settings-list{
    width:100%;
    margin-left:auto;
    margin-right:auto;
  }

  .avatar-choice-grid{
    grid-template-columns:repeat(5,1fr);
  }
}

@media(max-width:580px){
  /* 旧ルールの「プロフィール文字非表示」を明示的に上書き */
  .ai-mini-card .mini-profile-copy{
    display:block !important;
  }
  .topbar::after{
    right:65px;
  }
  .topbar-brandword{
    font-size:17px;
  }
  .topbar-pagecopy h1,
  .topbar h1{
    max-width:88px;
    font-size:15px !important;
  }
}


/* =========================================================
   v0.1-ui06-avatarplus
   顔アイコンの見せ方を強化
   - バリエーションを分かりやすく
   - 上部に大きなプレビュー
   - PCではコンパクトな1カード
   ========================================================= */

.avatar-select-panel,
.avatar-setting-group{
  width:100%;
  max-width:560px;
}
.profile-grid .avatar-select-panel{
  justify-self:start;
}
.avatar-picker-host{
  margin-top:10px;
}
.avatar-picker-frame{
  display:grid;
  gap:12px;
}
.avatar-picker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.avatar-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.avatar-tab{
  border:1px solid #DEE8F0;
  background:#fff;
  color:#5F7486;
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
}
.avatar-tab.active{
  background:linear-gradient(135deg,#4F85E8,#7A87F2);
  color:#fff;
  border-color:transparent;
  box-shadow:0 8px 16px rgba(79,133,232,.18);
}

.avatar-preview-card{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:14px;
  align-items:center;
  min-height:120px;
  padding:14px;
  border-radius:20px;
  background:linear-gradient(135deg,#F4FBFF,#F5F2FF 58%,#FFF5FA);
  border:1px solid #E1EAF1;
}
.avatar-preview-face{
  width:96px;
  height:96px;
  border-radius:24px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 8px 18px rgba(34,64,99,.08);
}
.avatar-preview-face img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.avatar-preview-copy{
  display:grid;
  gap:3px;
  min-width:0;
}
.avatar-preview-eyebrow{
  color:#5A86E8;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}
.avatar-preview-copy strong{
  font-size:24px;
  letter-spacing:-.02em;
}
.avatar-preview-copy small{
  color:#6F8191;
  font-size:13px;
  line-height:1.6;
}
.avatar-picker-section{
  display:grid;
  gap:10px;
}
.avatar-choice-grid.compact{
  grid-template-columns:repeat(5,48px);
  justify-content:start;
  gap:8px;
}
.avatar-choice{
  width:48px;
  height:48px;
  padding:2px;
  border-radius:14px;
}
.avatar-choice img{
  border-radius:11px;
}
.avatar-style-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.avatar-style-chip{
  border:1px solid #E1E9EF;
  background:#fff;
  color:#425667;
  border-radius:14px;
  padding:8px 10px;
  display:grid;
  gap:1px;
  text-align:left;
  min-width:104px;
  transition:.16s ease;
}
.avatar-style-chip span{
  font-size:12px;
  font-weight:800;
  line-height:1.2;
}
.avatar-style-chip small{
  color:#7B8B98;
  font-size:10px;
  line-height:1.2;
}
.avatar-style-chip.selected{
  border-color:#4F85E8;
  background:#F4F8FF;
  box-shadow:0 0 0 2px rgba(79,133,232,.12);
}
.avatar-upload-choice{
  width:96px;
  height:96px;
  border-radius:22px;
  justify-self:start;
}
.avatar-upload-choice > span{
  font-size:28px;
}
.avatar-upload-choice small{
  font-size:9px;
}
.avatar-upload-note{
  margin:0;
  color:#8393A0;
  font-size:12px;
  line-height:1.6;
}

@media (min-width:821px){
  .profile-grid .avatar-select-panel{
    grid-column:1 / -1;
  }
  .avatar-picker-head{
    align-items:flex-start;
  }
}

@media (max-width:820px){
  .avatar-select-panel,
  .avatar-setting-group{
    max-width:none;
  }
  .avatar-preview-card{
    grid-template-columns:84px 1fr;
    min-height:108px;
  }
  .avatar-preview-face{
    width:84px;
    height:84px;
    border-radius:22px;
  }
  .avatar-preview-copy strong{
    font-size:22px;
  }
  .avatar-choice-grid.compact{
    grid-template-columns:repeat(5,1fr);
  }
  .avatar-choice{
    width:auto;
    height:auto;
    aspect-ratio:1;
  }
  .avatar-style-chip{
    min-width:calc(50% - 4px);
    flex:1 1 calc(50% - 4px);
  }
}

@media (max-width:560px){
  .avatar-picker-head{
    align-items:stretch;
  }
  .avatar-tabs{
    width:100%;
  }
  .avatar-tab{
    flex:1 1 0;
    text-align:center;
  }
  .avatar-preview-card{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
  }
  .avatar-preview-copy{
    justify-items:center;
  }
  .avatar-style-chip{
    min-width:100%;
    flex:1 1 100%;
  }
}


/* =========================================================
   v0.1-ui07-status8
   8軸ステータス + PC横幅微縮小
   ========================================================= */
:root{
  --emo-understanding:#9A78DA;
  --emo-reassurance:#5DB7A2;
  --emo-health:#53A86B;
}
.log-dot.emotion-understanding{background:var(--emo-understanding)}
.log-dot.emotion-reassurance{background:var(--emo-reassurance)}
.log-dot.emotion-health{background:var(--emo-health)}
.emotion-card.emotion-understanding span{color:var(--emo-understanding)}
.emotion-card.emotion-reassurance span{color:var(--emo-reassurance)}
.emotion-card.emotion-health span{color:var(--emo-health)}

@media (min-width:821px){
  .page-stage{
    max-width:1120px !important;
  }
  .home-grid{
    grid-template-columns:1.18fr .82fr !important;
  }
  .honest-layout{
    grid-template-columns:1.05fr .95fr !important;
  }
  .panel{
    padding-left:20px;
    padding-right:20px;
  }
}

/* =========================================================
   v0.1-app02 PC CENTER SHELL
   - 本体DIM同様、PCは中央固定幅へ
   - 左固定サイドバーをPCでは外し、上部横タブへ
   - スマホUIは従来維持
   ========================================================= */
.desktop-topnav{display:none}

@media (min-width:821px){
  /* PCでは固定サイドバーを使わず、中央レイアウトへ */
  .myai-sidebar{
    display:none !important;
  }
  .myai-main{
    margin-left:0 !important;
    width:100% !important;
  }

  /* 本体DIMのヘッダー感に合わせ、背景は全幅・中身だけ中央へ */
  .topbar{
    height:82px !important;
    padding-left:max(24px, calc((100vw - 1180px) / 2)) !important;
    padding-right:max(24px, calc((100vw - 1180px) / 2)) !important;
    gap:18px;
  }
  .topbar-left{
    flex:0 0 auto;
    min-width:184px;
    gap:9px !important;
  }
  .topbar-brandword{
    font-size:22px !important;
    font-weight:900;
    letter-spacing:-.03em;
  }
  .topbar-divider{
    height:30px !important;
  }
  .topbar-pagecopy{
    min-width:0;
  }
  .topbar-pagecopy small{
    font-size:8px !important;
    letter-spacing:.09em !important;
  }
  .topbar-pagecopy h1,
  .topbar h1{
    font-size:14px !important;
    line-height:1.15;
    margin-top:2px !important;
    white-space:nowrap;
  }

  /* 左メニューの代わりに上部横タブ */
  .desktop-topnav{
    display:flex;
    flex:1 1 auto;
    align-items:center;
    justify-content:center;
    gap:2px;
    min-width:0;
  }
  .desktop-topnav .nav-item{
    flex:0 0 auto;
    display:block;
    padding:10px 9px !important;
    border-radius:11px !important;
    background:transparent !important;
    color:#607789 !important;
    font-size:12px !important;
    font-weight:800 !important;
    line-height:1;
    white-space:nowrap;
  }
  .desktop-topnav .nav-item:hover{
    background:#F2F7FC !important;
    color:#2E5F9E !important;
  }
  .desktop-topnav .nav-item.active{
    background:#EAF2FF !important;
    color:#326AB8 !important;
    box-shadow:inset 0 0 0 1px rgba(72,126,220,.12);
  }
  .topbar-actions{
    flex:0 0 auto;
  }

  /* コンテンツ領域は本体DIMに近い約1180pxで中央固定 */
  .page-stage{
    width:calc(100% - 48px) !important;
    max-width:1180px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:30px 0 90px !important;
  }

  /* 横幅縮小後も主要2カラムのバランスを維持 */
  .home-grid{
    grid-template-columns:1.18fr .82fr !important;
  }
  .honest-layout{
    grid-template-columns:1.05fr .95fr !important;
  }
}

/* 1180px前後はタブ文字だけ少し詰め、スマホ化はしない */
@media (min-width:821px) and (max-width:1280px){
  .topbar{
    padding-left:20px !important;
    padding-right:20px !important;
    gap:10px;
  }
  .topbar-left{
    min-width:150px;
  }
  .topbar-pagecopy{
    display:none;
  }
  .topbar-divider{
    display:none;
  }
  .desktop-topnav .nav-item{
    padding-left:7px !important;
    padding-right:7px !important;
    font-size:11px !important;
  }
  .page-stage{
    width:calc(100% - 40px) !important;
  }
}

@media (max-width:820px){
  /* スマホは現行構造をそのまま維持 */
  .desktop-topnav{
    display:none !important;
  }
}


/* =========================================================
   v0.1-app04 PC CENTER FINAL
   - 背景は全幅
   - ヘッダー内と各アプリページ本体は最大1180px中央
   - 左PCサイドバーは非表示
   ========================================================= */
.topbar-inner{display:contents;}
@media (min-width:821px){
  .myai-sidebar{display:none !important;}
  .myai-main{margin-left:0 !important;width:100% !important;}

  .topbar{
    width:100% !important;
    padding-left:0 !important;
    padding-right:0 !important;
    justify-content:center !important;
  }
  .topbar-inner{
    display:flex;
    width:calc(100% - 48px);
    max-width:1180px;
    height:100%;
    margin:0 auto;
    align-items:center;
    gap:18px;
  }

  .page-stage{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:30px 24px 90px !important;
  }
  .page-stage > .app-page{
    width:100% !important;
    max-width:1180px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}
@media (min-width:821px) and (max-width:1280px){
  .topbar-inner{width:calc(100% - 40px);gap:10px;}
  .page-stage{padding-left:20px !important;padding-right:20px !important;}
}
@media (max-width:820px){
  .topbar-inner{display:contents;}
}


/* =========================================================
   v0.1-app05 HONEST RADAR FIT
   - PC大レーダーを約1段階縮小
   - 左右ラベル欠け防止のため余白を確保
   - 他ページ/スマホのレイアウトは変更しない
   ========================================================= */
@media (min-width:821px){
  .app-page[data-page="honest"] .radar-main{
    overflow:visible !important;
  }
  .app-page[data-page="honest"] .large-radar{
    width:100%;
    max-width:610px !important;
    margin:18px auto 8px !important;
    padding:0 14px !important;
    box-sizing:border-box;
    overflow:visible !important;
  }
  .app-page[data-page="honest"] .large-radar .radar-svg{
    display:block;
    width:100%;
    max-width:100%;
    margin:0 auto;
    overflow:visible !important;
  }
}


/* =========================================================
   v0.1-app07 COLOR + SUPPORT RESTORE
   app04〜06で欠落したapp03機能を復元。PCセンター/レーダー調整は維持。
   ========================================================= */
/* =========================================================
   v0.1-app03
   myAIカラー6色 + DIM AIサポート + グリーンDIM favicon
   ========================================================= */
#dim-myai-app{
  --myai-personal-color:#7FC8A9;
  --myai-personal-soft:#E9F8F1;
  --myai-personal-deep:#2E6F58;
}
.topbar-brandmark{
  width:38px;height:38px;flex:0 0 38px;border:0;border-radius:13px;
  background:linear-gradient(145deg,var(--myai-personal-soft),#fff);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--myai-personal-color) 40%,white),0 4px 14px rgba(31,69,102,.08);
  position:relative;padding:0;
}
.topbar-brandmark .brand-eye{top:12px;background:var(--myai-personal-deep)}
.topbar-brandmark .brand-eye.left{left:10px}.topbar-brandmark .brand-eye.right{right:10px}
.topbar-brandmark .brand-smile{left:11px;top:22px;width:16px;border-color:var(--myai-personal-deep)}
.brand-mark{
  background:linear-gradient(145deg,var(--myai-personal-soft),#fff)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--myai-personal-color) 40%,white)!important;
}
.brand-mark .brand-eye,.brand-mark .brand-smile{background-color:var(--myai-personal-deep)}
.brand-mark .brand-smile{background:transparent;border-color:var(--myai-personal-deep)}
.myai-color-palette{display:grid;grid-template-columns:repeat(6,minmax(78px,1fr));gap:10px}
.myai-color-choice{border:1px solid #DDE8EF;background:#fff;border-radius:16px;padding:11px 8px;display:grid;justify-items:center;gap:7px;color:#506576;font-weight:800;font-size:12px;transition:.16s ease}
.myai-color-choice i{display:block;width:32px;height:32px;border-radius:50%;background:var(--choice);box-shadow:inset 0 0 0 4px rgba(255,255,255,.58)}
.myai-color-choice:hover{transform:translateY(-1px);border-color:var(--choice)}
.myai-color-choice.selected{border-color:var(--choice);background:color-mix(in srgb,var(--choice) 11%,white);box-shadow:0 0 0 2px color-mix(in srgb,var(--choice) 22%,transparent)}
.myai-color-note{margin:0!important;color:#7B8B98!important;font-size:12px!important}

.dim-ai-support-launcher{position:fixed;right:22px;bottom:22px;z-index:92;border:1px solid rgba(127,200,169,.5);background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-radius:18px;padding:9px 12px;display:flex;align-items:center;gap:9px;color:#18364B;box-shadow:0 14px 38px rgba(27,64,88,.18)}
.dim-ai-support-launcher:hover{transform:translateY(-1px)}
.dim-ai-support-launcher-copy{display:grid;text-align:left;line-height:1.2}.dim-ai-support-launcher-copy strong{font-size:12px}.dim-ai-support-launcher-copy small{font-size:9px;color:#7A8D9B;margin-top:2px}
.dim-ai-support-face{width:34px;height:34px;border-radius:12px;background:#fff;position:relative;display:inline-block;flex:0 0 auto;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(127,200,169,.28),0 3px 10px rgba(28,58,80,.12)}
.dim-ai-support-face img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;border-radius:inherit}
.dim-ai-support-panel{position:fixed;right:22px;bottom:80px;width:min(390px,calc(100vw - 28px));max-height:min(650px,calc(100vh - 110px));z-index:94;background:#fff;border:1px solid #DCE8EF;border-radius:24px;box-shadow:0 24px 70px rgba(28,58,80,.24);display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;overflow:hidden;opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;transition:.18s ease}
.dim-ai-support-panel.open{opacity:1;transform:none;pointer-events:auto}
.dim-ai-support-head{display:flex;align-items:center;justify-content:space-between;padding:14px 15px;border-bottom:1px solid #E8EFF4;background:linear-gradient(135deg,#F7FCF9,#F8FBFF)}
.dim-ai-support-identity{display:flex;align-items:center;gap:10px}.dim-ai-support-identity>div{display:grid}.dim-ai-support-identity strong{font-size:14px}.dim-ai-support-identity small{font-size:10px;color:#778B99;margin-top:2px}
.dim-ai-support-close{width:34px;height:34px;border:0;border-radius:11px;background:#EEF4F7;color:#5D7180;font-size:22px;line-height:1}
.dim-ai-support-body{overflow:auto;padding:15px;display:grid;align-content:start;gap:10px;background:#FBFDFE}
.dim-ai-support-message{max-width:90%;padding:10px 12px;border-radius:15px;font-size:12px;line-height:1.65;white-space:pre-wrap}
.dim-ai-support-message.bot{justify-self:start;background:#EEF7F3;color:#24483A;border-bottom-left-radius:5px}
.dim-ai-support-message.user{justify-self:end;background:#EAF2FF;color:#284C78;border-bottom-right-radius:5px}
.dim-ai-support-quick{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 4px}.dim-ai-support-quick button{border:1px solid #DCE7EE;background:#fff;border-radius:999px;padding:7px 9px;color:#4D6576;font-size:10px;font-weight:800}
.dim-ai-support-form{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 12px;border-top:1px solid #E8EFF4;background:#fff}.dim-ai-support-form input{min-width:0;border:1px solid #D6E3EB;border-radius:12px;padding:10px 11px;outline:none}.dim-ai-support-form input:focus{border-color:#7FC8A9;box-shadow:0 0 0 3px rgba(127,200,169,.12)}.dim-ai-support-form button{border:0;border-radius:12px;background:#356F5B;color:#fff;padding:0 13px;font-weight:800}
.dim-ai-support-foot{padding:9px 12px 11px;color:#82929D;font-size:9px;line-height:1.5;border-top:1px solid #EEF3F6;background:#fff}

@media(max-width:820px){
  .topbar-brandmark{width:34px;height:34px;flex-basis:34px;border-radius:12px}
  .topbar-brandmark .brand-eye{top:10px}.topbar-brandmark .brand-eye.left{left:9px}.topbar-brandmark .brand-eye.right{right:9px}.topbar-brandmark .brand-smile{left:10px;top:19px;width:14px}
  .myai-color-palette{grid-template-columns:repeat(3,1fr)}
  .dim-ai-support-launcher{right:14px;bottom:82px;padding:8px;border-radius:16px}
  .dim-ai-support-launcher-copy{display:none}
  .dim-ai-support-panel{right:8px;left:8px;bottom:80px;width:auto;max-height:70vh;border-radius:22px}
}
@media(max-width:520px){.myai-color-palette{grid-template-columns:repeat(2,1fr)}}


/* 選択色をmyAIサービス内の標準アイコン面にも反映（画像アバター自体は変更しない） */
#dim-myai-app .brand-mark,
#dim-myai-app .mini-avatar,
#dim-myai-app .hero-avatar,
#dim-myai-app .profile-avatar.big{
  background:linear-gradient(145deg,var(--myai-personal-soft),#fff);
}
#dim-myai-app .brand-mark{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--myai-personal-color) 40%,white);}

/* =========================================================
   v0.1-app08 ONBOARDING GUIDE
   - 香里方式を参考に「何を・どこまで・次に何を」を可視化
   - 4設定 + 完了の5ポイント
   - 保存状態はlocalStorageの完了フラグで判定（DEV）
   ========================================================= */
.setup-guide{padding:30px 30px 26px;overflow:hidden;position:relative;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(251,250,255,.98))}
.setup-guide:after{content:"";position:absolute;right:-70px;top:-85px;width:190px;height:190px;border-radius:50%;background:linear-gradient(145deg,rgba(170,152,223,.12),rgba(127,200,169,.10));pointer-events:none}
.setup-guide-head{position:relative;z-index:1}.setup-guide-head h2{font-size:32px;letter-spacing:-.035em;margin:7px 0 9px}.setup-guide-head p{max-width:820px;margin:0;color:var(--muted);line-height:1.8}
.setup-flow{display:grid;grid-template-columns:minmax(120px,1fr) 1fr minmax(120px,1fr) 1fr minmax(120px,1fr) 1fr minmax(120px,1fr) 1fr minmax(110px,.9fr);align-items:start;gap:8px;margin:28px 4px 26px;position:relative;z-index:1}
.setup-flow>i{height:1px;background:#DCE5EB;margin-top:18px;width:100%}
.setup-flow-item{text-align:center;display:grid;justify-items:center;gap:4px;min-width:0;color:#7B8995}
.setup-flow-dot{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#EEF2F5;color:#7B8995;border:1px solid #DCE5EB;font-weight:900;transition:.18s}
.setup-flow-item strong{font-size:12px;color:#536878;white-space:nowrap}.setup-flow-item small{font-size:10px;color:#93A0AA;white-space:nowrap}
.setup-flow-item.current .setup-flow-dot{background:linear-gradient(135deg,#748DF4,#8B78FF);border-color:transparent;color:#fff;box-shadow:0 6px 18px rgba(116,141,244,.22)}
.setup-flow-item.current strong{color:#243E57}
.setup-flow-item.done .setup-flow-dot{background:#E7F6EF;border-color:#C8EADB;color:#2E7A61}.setup-flow-item.done strong{color:#3E6C5D}
.setup-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;position:relative;z-index:1}
.setup-card{min-height:215px;border:1px solid #DDE6EC;border-radius:20px;padding:19px 20px 17px;display:flex;flex-direction:column;transition:.18s;background:#fff}
.setup-card.current{box-shadow:0 0 0 2px rgba(115,134,228,.09),0 10px 30px rgba(31,69,102,.06)}
.setup-card.done{border-color:#CDE8DD}.setup-blue{background:linear-gradient(145deg,#FBFDFF,#F5F9FF)}.setup-purple{background:linear-gradient(145deg,#FEFCFF,#FAF6FF)}.setup-mint{background:linear-gradient(145deg,#FCFFFE,#F4FBF8)}.setup-cream{background:linear-gradient(145deg,#FFFDF9,#FFF9EF)}
.setup-card-step{font-size:10px;font-weight:900;letter-spacing:.12em;color:#667C92}.setup-blue .setup-card-step{color:#5A77BC}.setup-purple .setup-card-step{color:#8668B8}.setup-mint .setup-card-step{color:#4E9B80}.setup-cream .setup-card-step{color:#B47D37}
.setup-card h3{font-size:19px;margin:7px 0 8px}.setup-card p{font-size:13px;color:var(--muted);line-height:1.75;margin:0 0 16px}
.setup-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto}.setup-status{font-size:11px;font-weight:900;padding:6px 9px;border-radius:999px;background:#EEF3F6;color:#71818E}.setup-status.done{background:#E6F6EF;color:#367A64}
.setup-card-button{border:1px solid #D4E0E8;background:#fff;color:#304C63;border-radius:12px;padding:9px 13px;font-weight:900;font-size:12px}.setup-card-button:hover{transform:translateY(-1px);box-shadow:0 5px 15px rgba(31,69,102,.08)}
.setup-ready-strip{margin-top:16px;border-radius:18px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#6D80D7,#A16FB7);color:#fff;position:relative;z-index:1}.setup-ready-strip strong{font-size:16px}.setup-ready-strip p{margin:4px 0 0;color:rgba(255,255,255,.82);font-size:11px}.setup-ready-strip.done{background:linear-gradient(135deg,#4DA989,#7089D4)}
.setup-start-button{border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.92);color:#465A8D;border-radius:12px;padding:10px 14px;font-weight:900;white-space:nowrap}.setup-start-button:disabled{opacity:.58;cursor:not-allowed}.setup-ready-strip.done .setup-start-button{opacity:1;cursor:pointer}
.setup-editor{padding:28px;max-width:980px;margin:0 auto}.setup-editor-head{display:flex;gap:18px;align-items:flex-start;border-bottom:1px solid #E8EFF4;padding-bottom:20px;margin-bottom:22px}.setup-back{border:0;background:#F2F6F9;color:#526B7E;border-radius:11px;padding:9px 11px;font-weight:800;white-space:nowrap}.setup-editor-head h2{font-size:28px;margin:5px 0 6px}.setup-editor-head p{margin:0;color:var(--muted);line-height:1.7}
.setup-pane{display:none}.setup-pane.active{display:block}.setup-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.setup-form-grid label{display:grid;gap:7px;font-weight:900}.setup-form-grid input{width:100%;border:1px solid #D7E3EC;border-radius:14px;padding:13px 14px;background:#fff;outline:none}.setup-form-grid input:focus{border-color:#9FC4FF;box-shadow:0 0 0 3px rgba(66,133,244,.08)}
.setup-subsection{margin-top:22px}.setup-subhead{display:flex;align-items:baseline;gap:9px;margin-bottom:10px}.setup-subhead strong{font-size:16px}.setup-subhead small{font-size:11px;color:var(--muted)}.setup-color-palette{max-width:700px}
.setup-editor-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid #E8EFF4}
.setup-preset-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.setup-preset,.setup-provider{border:1px solid #DCE6EC;background:#fff;border-radius:17px;padding:18px;text-align:left;color:var(--ink);transition:.16s}.setup-preset strong,.setup-preset small,.setup-provider strong,.setup-provider small{display:block}.setup-preset small,.setup-provider small{color:var(--muted);margin-top:5px;line-height:1.5}.setup-preset.selected,.setup-provider.selected{border-color:#9C8CE1;background:#F8F5FF;box-shadow:0 0 0 2px rgba(156,140,225,.10)}
.setup-note{margin-top:16px;background:#F5F8FA;border-radius:14px;padding:13px 14px;color:#667A89;font-size:12px;line-height:1.7}
.setup-provider-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.setup-provider{display:grid;grid-template-columns:46px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center}.setup-provider>span{grid-row:1/3;width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:#EFF4FF;color:#5573C9;font-size:20px;font-weight:900}.setup-provider strong{font-size:17px}.setup-provider small{margin:0}
.setup-handover-box{border:1px solid #DDE7ED;border-radius:18px;padding:20px;background:linear-gradient(145deg,#FBFDFF,#FAFBFF)}.setup-handover-box h3{margin:0 0 14px;font-size:20px}.setup-handover-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.setup-handover-columns>div{background:#fff;border:1px solid #E5EDF2;border-radius:14px;padding:14px}.setup-handover-columns strong{font-size:14px}.setup-handover-columns p{font-size:12px;color:var(--muted);line-height:1.7;margin:6px 0 0}.setup-plan-note{margin-top:12px;border-radius:13px;background:#EEF5FF;padding:12px 13px;color:#526B83;font-size:12px;line-height:1.7}.setup-plan-note b{color:#45689D}
.setup-confirm-check{display:flex;align-items:flex-start;gap:9px;margin-top:16px;padding:13px 14px;border-radius:14px;background:#F7FAFB;font-size:13px;font-weight:800}.setup-confirm-check input{margin-top:2px;width:18px;height:18px;accent-color:#4DA989}

@media(max-width:900px){
  .setup-flow{grid-template-columns:repeat(5,1fr);gap:4px}.setup-flow>i{display:none}.setup-flow-item strong{font-size:10px}.setup-flow-item small{display:none}.setup-card-grid{grid-template-columns:1fr}.setup-card{min-height:0}.setup-form-grid,.setup-handover-columns{grid-template-columns:1fr}
}
@media(max-width:620px){
  .setup-guide{padding:22px 16px 18px}.setup-guide-head h2{font-size:26px}.setup-flow{margin:22px 0 20px}.setup-flow-dot{width:31px;height:31px}.setup-flow-item strong{font-size:9px;white-space:normal;line-height:1.35}.setup-ready-strip{align-items:flex-start;flex-direction:column}.setup-start-button{width:100%}.setup-editor{padding:20px 15px}.setup-editor-head{display:block}.setup-back{margin-bottom:14px}.setup-editor-head h2{font-size:25px}.setup-preset-grid,.setup-provider-grid{grid-template-columns:1fr}.setup-editor-actions{flex-direction:column-reverse}.setup-editor-actions button{width:100%}
}

/* app09: structured browser-local storage status */
.storage-status-dl{display:grid;gap:8px;margin:0}.storage-status-dl>div{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid rgba(36,61,83,.08)}.storage-status-dl>div:last-child{border-bottom:0}.storage-status-dl dt{color:var(--muted);font-weight:700}.storage-status-dl dd{margin:0;font-weight:800;text-align:right}.storage-status-note{margin:0;padding:12px 14px;border-radius:14px;background:#f6faf8;color:var(--muted);font-size:13px;line-height:1.75}.storage-status-card{border-color:rgba(83,168,107,.2)}

/* =========================================================
   v0.1-app11 UI FUNCTIONALIZATION
   - 821〜1280pxでもページタイトルを維持
   - 設定アクション、準備中表示、State空表示を整える
   ========================================================= */
.settings-actions{display:flex;flex-wrap:wrap;gap:10px}
.switch-row.is-disabled{opacity:.68;cursor:not-allowed}
.switch-row.is-disabled span{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.switch-row.is-disabled small{font-size:10px;color:#8A99A7;background:#F1F5F8;border-radius:999px;padding:4px 7px}
.state-empty{padding:18px;border:1px dashed #D9E4EB;border-radius:16px;background:#F9FBFC;color:#7B8D9A;font-size:12px;line-height:1.7}
.state-log-list{display:grid;gap:0}
.growth-timeline-state{display:grid;gap:0}
.persona-score-row [hidden],.persona-card blockquote[hidden],.persona-card footer span[hidden]{display:none!important}

@media (min-width:821px) and (max-width:1280px){
  .topbar-inner{gap:8px!important}
  .topbar-left{min-width:0!important;flex:0 1 196px!important;gap:7px!important}
  .topbar-brandword{font-size:18px!important}
  .topbar-divider{display:block!important;height:26px!important}
  .topbar-pagecopy{display:block!important;flex:0 1 92px!important;min-width:72px!important;max-width:92px!important;overflow:hidden}
  .topbar-pagecopy small{display:block!important;font-size:7px!important;letter-spacing:.05em!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar-pagecopy h1,.topbar h1{display:block!important;font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .desktop-topnav{gap:0!important}
  .desktop-topnav .nav-item{padding:8px 5px!important;font-size:10px!important}
  .ai-mini-card{padding:7px 8px!important;gap:7px!important}
  .mini-profile-copy strong{font-size:11px!important}
  .mini-profile-copy small{font-size:9px!important}
}

@media (min-width:821px) and (max-width:980px){
  .topbar-left{flex-basis:176px!important}
  .topbar-pagecopy{max-width:78px!important}
  .desktop-topnav .nav-item{padding-left:4px!important;padding-right:4px!important;font-size:9.5px!important}
}

/* =========================================================
   v0.1-app15 MOBILE AI SUPPORT UX
   - mobile: bottom-nav above floating labeled pill
   - launcher remains labeled/full-size whenever panel is closed
   - tap: 82dvh bottom sheet
   - desktop: existing panel behavior retained
   ========================================================= */
@keyframes dim-ai-support-mobile-intro{
  0%{opacity:0;transform:translateY(10px) scale(.96)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}

@media(max-width:820px){
  .dim-ai-support-launcher{
    right:14px;
    bottom:calc(96px + env(safe-area-inset-bottom, 0px));
    min-height:54px;
    min-width:148px;
    padding:8px 14px 8px 9px;
    border-radius:999px;
    gap:10px;
    z-index:92;
    box-shadow:0 12px 34px rgba(27,64,88,.22);
    animation:dim-ai-support-mobile-intro .28s ease both;
    transition:width .18s ease,min-width .18s ease,padding .18s ease,transform .18s ease,box-shadow .18s ease;
  }
  .dim-ai-support-launcher .dim-ai-support-face{
    width:38px;
    height:38px;
    border-radius:14px;
  }
  .dim-ai-support-launcher-copy{
    display:grid;
    text-align:left;
    line-height:1.15;
    white-space:nowrap;
  }
  .dim-ai-support-launcher-copy strong{font-size:14px}
  .dim-ai-support-launcher-copy small{display:none}


  .dim-ai-support-panel{
    left:0;
    right:0;
    bottom:0;
    width:100%;
    height:min(82dvh,720px);
    max-height:82vh;
    max-height:82dvh;
    border-radius:24px 24px 0 0;
    border-left:0;
    border-right:0;
    border-bottom:0;
    z-index:120;
    opacity:1;
    transform:translateY(105%);
    pointer-events:none;
    transition:transform .24s cubic-bezier(.2,.8,.2,1);
    box-shadow:0 -18px 60px rgba(20,45,66,.26);
    padding-bottom:env(safe-area-inset-bottom, 0px);
  }
  .dim-ai-support-panel.open{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
  }
  .dim-ai-support-head{padding:15px 16px}
  .dim-ai-support-body{padding:16px;gap:11px}
  .dim-ai-support-message{font-size:13px;line-height:1.65}
  .dim-ai-support-quick button{font-size:11px;padding:8px 10px;min-height:38px}
  .dim-ai-support-form{padding:11px 12px}
  .dim-ai-support-form input{min-height:46px;font-size:16px}
  .dim-ai-support-form button{min-width:58px;min-height:46px;font-size:13px}
  .dim-ai-support-close{width:42px;height:42px;min-width:42px;min-height:42px}
  body.dim-ai-support-sheet-open{overflow:hidden}
  body.dim-ai-support-sheet-open .bottom-nav{visibility:hidden;pointer-events:none}
  body.dim-ai-support-sheet-open .dim-ai-support-launcher{opacity:0;pointer-events:none}
}

@media(max-width:420px){
  .dim-ai-support-launcher{right:12px;bottom:calc(94px + env(safe-area-inset-bottom, 0px))}
  .dim-ai-support-panel{height:84dvh;max-height:84dvh}
}


/* =========================================================
   app16 / Chat-first Home
   ========================================================= */
.app-page[data-page="home"]{min-height:calc(100vh - 140px)}
.chat-home{padding:0!important;overflow:visible;min-height:calc(100vh - 150px);display:grid;grid-template-rows:auto 1fr auto auto;background:rgba(255,255,255,.92)}
.chat-home-head{min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 18px;border-bottom:1px solid var(--line);position:relative;z-index:8}
.chat-ai-switcher{position:relative;min-width:0}
.chat-ai-current{border:0;background:transparent;display:flex;align-items:center;gap:11px;padding:7px 9px;border-radius:14px;cursor:pointer;color:var(--ink);max-width:min(460px,65vw);text-align:left}
.chat-ai-current:hover{background:#f3f7f9}
.chat-ai-avatar,.chat-empty-avatar{position:relative;flex:0 0 auto;border-radius:50%;background:var(--myai-personal-soft,#e9f8f1);border:2px solid color-mix(in srgb,var(--myai-personal-color,#7fc8a9) 72%,white);overflow:hidden}
.chat-ai-avatar{width:42px;height:42px}.chat-empty-avatar{width:72px;height:72px}
.chat-ai-avatar i,.chat-empty-avatar i{position:absolute;top:38%;width:7px;height:7px;border-radius:50%;background:var(--myai-personal-deep,#2e6f58)}
.chat-ai-avatar i:first-child,.chat-empty-avatar i:first-child{left:31%}.chat-ai-avatar i:nth-child(2),.chat-empty-avatar i:nth-child(2){right:31%}
.chat-ai-avatar b,.chat-empty-avatar b{position:absolute;left:34%;right:34%;bottom:28%;height:8px;border-bottom:2px solid var(--myai-personal-deep,#2e6f58);border-radius:0 0 50% 50%}
.chat-ai-current-copy{display:grid;min-width:0}.chat-ai-current-copy strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-ai-current-copy small{font-size:11px;color:var(--muted)}
.chat-ai-chevron{font-size:18px;color:var(--muted);margin-left:2px}
.chat-settings-button{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:12px;padding:9px 13px;font-weight:800;cursor:pointer}
.chat-ai-menu{position:absolute;top:58px;left:0;width:min(360px,calc(100vw - 42px));background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 60px rgba(19,48,70,.18);padding:13px;z-index:40}
.chat-ai-menu[hidden]{display:none!important}.chat-ai-menu-title{display:flex;align-items:center;justify-content:space-between;padding:4px 5px 10px}.chat-ai-menu-title strong{font-size:14px}.chat-ai-menu-title small{font-weight:900;color:var(--myai-personal-deep,#2e6f58);background:var(--myai-personal-soft,#e9f8f1);padding:4px 8px;border-radius:999px}
.chat-ai-list{display:grid;gap:5px}.chat-ai-list-item{border:0;background:#fff;width:100%;display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:10px;text-align:left;padding:11px 10px;border-radius:12px;cursor:pointer;color:var(--ink)}.chat-ai-list-item:hover,.chat-ai-list-item.active{background:#f3f7f9}.chat-ai-list-dot{width:8px;height:8px;border-radius:50%;background:#c9d4dc}.chat-ai-list-item.active .chat-ai-list-dot{background:var(--myai-personal-color,#7fc8a9)}.chat-ai-list-item>span:nth-child(2){display:grid}.chat-ai-list-item strong{font-size:13px}.chat-ai-list-item small{font-size:10px;color:var(--muted)}.chat-ai-list-item em{font-style:normal;font-size:10px;color:var(--myai-personal-deep,#2e6f58);font-weight:900}
.chat-ai-menu-actions{border-top:1px solid var(--line);margin-top:8px;padding-top:10px;display:grid;gap:4px}.chat-ai-menu-actions .secondary-button{width:100%}.chat-ai-menu-actions .secondary-button:disabled{opacity:.45;cursor:not-allowed}.chat-ai-menu-actions .text-button{justify-self:center}.chat-plan-note{font-size:10px;line-height:1.5;color:var(--muted);margin:8px 4px 1px}
.chat-thread{min-height:420px;overflow:auto;padding:28px 24px;display:flex;flex-direction:column}
.chat-empty-state{margin:auto;text-align:center;max-width:560px;display:grid;justify-items:center;gap:12px;padding:34px 20px}.chat-empty-state h2{margin:3px 0 0;font-size:26px}.chat-empty-state p{margin:0 0 8px;color:var(--muted);line-height:1.8;font-size:14px}
.chat-composer{margin:0 18px 10px;border:1px solid #ccd8df;border-radius:22px;background:#fff;display:grid;grid-template-columns:1fr 44px;align-items:end;padding:9px 9px 9px 16px;box-shadow:0 5px 24px rgba(20,50,73,.07)}.chat-composer:focus-within{border-color:var(--myai-personal-color,#7fc8a9);box-shadow:0 0 0 3px var(--myai-personal-soft,#e9f8f1)}.chat-composer textarea{border:0;outline:0;resize:none;min-height:28px;max-height:180px;padding:6px 4px;font:inherit;line-height:1.55;background:transparent;color:var(--ink)}.chat-send{width:42px;height:42px;border:0;border-radius:50%;background:var(--myai-personal-color,#7fc8a9);color:#fff;font-size:22px;font-weight:900;cursor:pointer}.chat-send:hover{filter:brightness(.96)}
.chat-footnote{display:flex;justify-content:center;align-items:center;gap:8px;padding:0 18px 13px;color:var(--muted);font-size:10px;text-align:center}.chat-plan-badge,#chatPlanBadge{display:inline-flex;background:#eef3f6;color:var(--ink);font-weight:900;padding:3px 7px;border-radius:999px;white-space:nowrap}
@media(min-width:821px){.app-page[data-page="home"] .chat-home{min-height:calc(100vh - 132px)}.app-page[data-page="home"]{width:min(1120px,100%);margin:0 auto}.app-page[data-page="home"] .chat-thread{min-height:calc(100vh - 355px)}}
@media(max-width:820px){.app-page[data-page="home"]{min-height:calc(100vh - 170px)}.chat-home{min-height:calc(100vh - 190px);border-radius:18px}.chat-home-head{min-height:66px;padding:9px 10px}.chat-ai-current{padding:6px;max-width:70vw}.chat-ai-current-copy strong{font-size:14px}.chat-settings-button{font-size:12px;padding:8px 10px}.chat-thread{min-height:calc(100vh - 405px);padding:20px 14px}.chat-empty-state{padding:24px 10px}.chat-empty-state h2{font-size:22px}.chat-composer{margin:0 9px 8px;border-radius:20px;padding-left:12px}.chat-footnote{padding:0 10px 76px;font-size:9px;align-items:flex-start}.chat-ai-menu{top:54px;left:0}}

/* =========================================================
   app17 / Mobile fixed topbar + onboarding notice cleanup
   ========================================================= */
@media (max-width:820px){
  .topbar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:0 !important;
    width:100% !important;
    z-index:100 !important;
    min-height:calc(78px + env(safe-area-inset-top, 0px)) !important;
    height:calc(78px + env(safe-area-inset-top, 0px)) !important;
    padding:calc(9px + env(safe-area-inset-top, 0px)) 12px 9px !important;
    margin:0 !important;
    transform:translateZ(0);
    -webkit-transform:translateZ(0);
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
  }
  .page-stage{
    padding-top:calc(18px + 78px + env(safe-area-inset-top, 0px)) !important;
  }
  body.admin-bar .topbar{
    top:46px !important;
  }
  body.admin-bar .page-stage{
    padding-top:calc(18px + 78px + env(safe-area-inset-top, 0px) + 46px) !important;
  }
}


/* =========================================================
   app18 / Locked topbar on desktop + mobile
   - topbar is viewport-fixed on every screen size
   - remove backdrop-filter compositor jitter
   - prevent page overscroll bounce where supported
   - page content receives deterministic top offset
   ========================================================= */
html{
  scroll-behavior:auto !important;
  overscroll-behavior-y:none;
}
body{
  overscroll-behavior-y:none;
  min-height:100dvh;
}
.topbar{
  position:fixed !important;
  top:0 !important;
  left:242px !important;
  right:0 !important;
  width:auto !important;
  height:86px !important;
  min-height:86px !important;
  margin:0 !important;
  padding:0 34px !important;
  z-index:1000 !important;
  background:#f8fcff !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  transform:translate3d(0,0,0);
  -webkit-transform:translate3d(0,0,0);
  will-change:transform;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  contain:layout paint style;
}
.page-stage{
  padding-top:114px !important;
}
body.admin-bar .topbar{
  top:32px !important;
}
body.admin-bar .page-stage{
  padding-top:146px !important;
}

@media (max-width:820px){
  .topbar{
    top:0 !important;
    left:0 !important;
    right:0 !important;
    width:100% !important;
    min-height:calc(78px + env(safe-area-inset-top, 0px)) !important;
    height:calc(78px + env(safe-area-inset-top, 0px)) !important;
    padding:calc(9px + env(safe-area-inset-top, 0px)) 12px 9px !important;
  }
  .page-stage{
    padding-top:calc(96px + env(safe-area-inset-top, 0px)) !important;
  }
  body.admin-bar .topbar{
    top:46px !important;
  }
  body.admin-bar .page-stage{
    padding-top:calc(142px + env(safe-area-inset-top, 0px)) !important;
  }
}

/* WordPress may switch admin-bar geometry at 782px. Keep offsets exact. */
@media (min-width:783px){
  body.admin-bar .topbar{top:32px !important}
  body.admin-bar .page-stage{padding-top:146px !important}
}


/* =========================================================
   app19 / Mobile Chat card width aligned to bottom navigation
   - bottom-nav uses left/right 10px
   - page-stage already uses 10px horizontal padding on mobile
   - override generic .panel width:calc(100% - 4px) only for Chat home
   ========================================================= */
@media (max-width:820px){
  .app-page[data-page="home"] .chat-home{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
}


/* =========================================================
   app20 / Exact mobile Chat width alignment
   Bottom navigation: viewport left/right 10px.
   Mobile page-stage: left/right padding 14px.
   Therefore Chat home must extend 4px beyond its parent on both sides.
   ========================================================= */
@media (max-width:820px){
  .app-page[data-page="home"] .chat-home{
    width:calc(100% + 8px) !important;
    max-width:none !important;
    margin-left:-4px !important;
    margin-right:-4px !important;
    box-sizing:border-box !important;
  }
}

/* =========================================================
   app21 / Exact shell alignment
   - Mobile: Chat home and bottom navigation share exact 10px viewport gutters.
   - Desktop: fixed topbar is centered on the viewport; obsolete sidebar offset removed.
   ========================================================= */
@media (max-width:820px){
  .myai-shell,
  .myai-main{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    min-width:0 !important;
  }

  .page-stage{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .page-stage > .app-page[data-page="home"]{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  .app-page[data-page="home"] .chat-home{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  .bottom-nav{
    left:10px !important;
    right:10px !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
  }
}

@media (min-width:821px){
  .topbar{
    left:0 !important;
    right:0 !important;
    width:100% !important;
    padding-left:0 !important;
    padding-right:0 !important;
    justify-content:center !important;
  }

  .topbar-inner{
    display:flex !important;
    width:calc(100% - 48px) !important;
    max-width:1180px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}

@media (min-width:821px) and (max-width:1280px){
  .topbar-inner{
    width:calc(100% - 40px) !important;
  }
}


/* =========================================================
   app22 / Mobile viewport lock + exact shared gutters
   - Header and bottom navigation are true viewport-fixed UI.
   - Only .page-stage scrolls on mobile.
   - Chat card and bottom navigation use the same 10px gutters.
   - Remove compositor/backdrop effects that can create micro-jitter.
   ========================================================= */
@media (max-width:820px){
  html.dim-myai-runtime,
  body.dim-myai-runtime{
    width:100% !important;
    height:100% !important;
    min-height:100% !important;
    overflow:hidden !important;
    overscroll-behavior:none !important;
  }

  body.dim-myai-runtime{
    position:relative !important;
    margin:0 !important;
  }

  #dim-myai-app.myai-shell{
    position:relative !important;
    width:100% !important;
    height:100dvh !important;
    min-height:100dvh !important;
    overflow:hidden !important;
  }

  #dim-myai-app .myai-main{
    position:relative !important;
    width:100% !important;
    height:100dvh !important;
    min-height:100dvh !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  #dim-myai-app .topbar{
    position:fixed !important;
    inset:0 0 auto 0 !important;
    width:100vw !important;
    height:calc(78px + env(safe-area-inset-top, 0px)) !important;
    min-height:calc(78px + env(safe-area-inset-top, 0px)) !important;
    margin:0 !important;
    padding:calc(9px + env(safe-area-inset-top, 0px)) 12px 9px !important;
    z-index:1000 !important;
    background:#f8fcff !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    transform:none !important;
    -webkit-transform:none !important;
    will-change:auto !important;
    contain:none !important;
    backface-visibility:visible !important;
    -webkit-backface-visibility:visible !important;
  }

  #dim-myai-app .page-stage{
    position:fixed !important;
    top:calc(78px + env(safe-area-inset-top, 0px)) !important;
    right:0 !important;
    bottom:0 !important;
    left:0 !important;
    width:100vw !important;
    height:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:18px 10px calc(118px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior-y:contain !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:auto !important;
  }

  #dim-myai-app .page-stage > .app-page[data-page="home"]{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
  }

  #dim-myai-app .app-page[data-page="home"] .chat-home{
    position:relative !important;
    left:auto !important;
    right:auto !important;
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
    min-width:0 !important;
    margin:0 !important;
    transform:none !important;
    box-sizing:border-box !important;
  }

  #dim-myai-app .bottom-nav{
    position:fixed !important;
    left:10px !important;
    right:auto !important;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    width:calc(100vw - 20px) !important;
    max-width:calc(100vw - 20px) !important;
    margin:0 !important;
    z-index:1100 !important;
    box-sizing:border-box !important;
    background:#16384e !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    transform:none !important;
    -webkit-transform:none !important;
    will-change:auto !important;
  }

  /* WordPress admin-bar geometry on mobile. */
  body.admin-bar #dim-myai-app .topbar{
    top:46px !important;
  }
  body.admin-bar #dim-myai-app .page-stage{
    top:calc(124px + env(safe-area-inset-top, 0px)) !important;
  }
}

/* =========================================================
   app23 / LAB launcher
   ========================================================= */
.lab-launch-button{
  display:inline-flex;align-items:center;gap:6px;border:1px solid #f1c36a;background:#fff9e8;color:#76520b;
  padding:8px 10px;border-radius:12px;font-size:12px;font-weight:900;text-decoration:none;white-space:nowrap;
  box-shadow:0 4px 14px rgba(118,82,11,.08)
}
.lab-launch-button span{display:inline-grid;place-items:center;min-width:28px;height:20px;padding:0 5px;border-radius:7px;background:#f5b942;color:#4a3305;font-size:9px;letter-spacing:.08em}
.lab-launch-button:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(118,82,11,.12)}
@media(max-width:820px){
  .lab-launch-button{padding:7px 8px;font-size:0;gap:0}
  .lab-launch-button span{font-size:9px;min-width:30px}
}


/* app28 / registered normal-view shortcut */
.usual-launch-button{
  display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 13px;
  border:1px solid rgba(56,120,95,.18);border-radius:12px;background:#eef8f3;color:#2f6754;
  text-decoration:none;font-weight:900;font-size:12px;white-space:nowrap;transition:.16s ease;
}
.usual-launch-button:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(46,111,88,.10)}
@media(max-width:760px){
  .usual-launch-button{padding:7px 10px;font-size:10px;min-height:34px}
}
