:root{color-scheme:light;--navy:#071d36;--blue:#155f91;--green:#079654;--ink:#101820;--muted:#69767f;--line:#d6e0e4;--surface:#fff;--page:#eef4f6;--red:#d9273e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif}*{box-sizing:border-box}html{min-height:100%;background:var(--page)}body{min-width:320px;margin:0;color:var(--ink);background:radial-gradient(circle at 4% 4%,rgba(21,95,145,.12),transparent 28%),radial-gradient(circle at 96% 8%,rgba(7,150,84,.1),transparent 26%),var(--page)}button,select,input{font:inherit}.portfolio-header{position:sticky;z-index:30;top:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:76px;border-bottom:1px solid rgba(146,163,173,.35);padding:9px clamp(14px,3vw,36px);background:rgba(255,255,255,.92);backdrop-filter:blur(16px)}.portfolio-logo img{display:block;width:clamp(190px,24vw,290px);height:55px;object-fit:contain}.portfolio-back{justify-self:start;border:1px solid rgba(7,150,84,.25);border-radius:13px;padding:10px 14px;color:#087d49;background:#fff;box-shadow:0 5px 15px rgba(17,60,51,.09);font-weight:900;text-decoration:none}.theme-toggle{justify-self:end;width:46px;height:46px;border:1px solid #cad6dc;border-radius:13px;background:#fff;box-shadow:0 5px 15px rgba(17,60,51,.09);font-size:1.25rem;cursor:pointer}main{width:min(1180px,calc(100% - 28px));margin:18px auto 44px}.portfolio-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.8fr);align-items:center;gap:20px;overflow:hidden;border:1px solid rgba(20,73,109,.28);border-radius:24px;padding:clamp(22px,4vw,42px);color:#fff;background:linear-gradient(115deg,var(--navy) 0%,#0b3d55 55%,var(--green) 125%);box-shadow:0 18px 40px rgba(15,54,72,.16)}.portfolio-hero p,.section-title small{margin:0;color:#50efa0;font-size:.72rem;font-weight:1000;letter-spacing:.18em}.portfolio-hero h1{margin:4px 0;font-size:clamp(1.9rem,4vw,3.2rem);letter-spacing:-.05em}.portfolio-hero>div>span{font-size:.85rem;font-weight:750;opacity:.8}.portfolio-total{display:grid;min-height:126px;align-content:center;border:1px solid rgba(255,255,255,.18);border-radius:18px;padding:18px;background:rgba(255,255,255,.11);text-align:right}.portfolio-total small{font-weight:800;opacity:.75}.portfolio-total strong{font-size:clamp(2rem,5vw,3.6rem);font-weight:1000;letter-spacing:-.06em}.portfolio-total span{font-size:.78rem;font-weight:850}.portfolio-total span.is-up{color:#61ffae}.portfolio-total span.is-down{color:#ff8d98}.portfolio-workspace{display:grid;grid-template-columns:minmax(310px,.78fr) minmax(0,1.22fr);gap:14px;margin-top:14px}.holding-form,.allocation-card,.history-card,.holdings-card{border:1px solid var(--line);border-radius:21px;padding:20px;background:var(--surface);box-shadow:0 10px 27px rgba(26,56,70,.08)}.section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.section-title h2{margin:2px 0 0;font-size:1.35rem}.section-title>strong{color:var(--muted);font-size:.78rem}.holding-form{display:grid;gap:12px}.holding-form label{display:grid;gap:6px;color:var(--muted);font-size:.75rem;font-weight:900}.holding-form select,.holding-form input{width:100%;height:48px;border:1px solid #cbd7dc;border-radius:11px;padding:0 12px;color:var(--ink);background:#f9fbfb;font-weight:850}.holding-form button{min-height:50px;border:0;border-radius:12px;color:#fff;background:linear-gradient(115deg,var(--navy),var(--blue) 55%,var(--green));font-weight:1000;cursor:pointer}.holding-form button:disabled{opacity:.5}.holding-form>p{min-height:1.2em;margin:0;color:var(--green);font-size:.75rem;font-weight:800}.allocation-body{display:grid;grid-template-columns:200px minmax(0,1fr);align-items:center;gap:20px;margin-top:14px}.allocation-chart{position:relative;width:190px;aspect-ratio:1;border-radius:50%;background:#e8eef0}.allocation-chart:after{position:absolute;inset:31%;border-radius:50%;background:var(--surface);content:""}.allocation-chart>span{position:absolute;z-index:2;inset:0;display:grid;place-items:center;color:var(--muted);font-size:.75rem;font-weight:900}.allocation-legend{display:grid;gap:8px;margin:0;padding:0;list-style:none}.allocation-legend li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;font-size:.78rem;font-weight:800}.allocation-legend i{width:10px;height:10px;border-radius:50%}.allocation-legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.allocation-legend b{font-size:.72rem}.history-card,.holdings-card{margin-top:14px}.history-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.history-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.history-tabs button{min-height:38px;border:1px solid #cad6dc;border-radius:10px;padding:0 12px;color:var(--muted);background:#fff;font-size:.75rem;font-weight:900;cursor:pointer}.history-tabs button[aria-selected="true"]{border-color:var(--green);color:#fff;background:linear-gradient(135deg,#0c5271,#079654)}.history-summary{margin-top:14px;border-radius:11px;padding:10px 13px;color:var(--muted);background:#eef4f3;font-size:.78rem;font-weight:850}.history-chart{height:260px;margin-top:10px}.history-chart svg{display:block;width:100%;height:100%;overflow:visible}.history-grid{stroke:#dbe5e7;stroke-width:1}.history-line{fill:none;stroke:#087f54;stroke-linecap:round;stroke-linejoin:round;stroke-width:4}.history-fill{fill:url(#history-gradient)}.history-label{fill:var(--muted);font-size:11px;font-weight:800}.history-note{margin:8px 0 0;color:var(--muted);font-size:.72rem;font-weight:700}.holdings-list{display:grid;gap:8px;margin-top:14px}.holding-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#fbfcfc}.holding-icon{display:grid;width:44px;height:44px;place-items:center;border-radius:12px;background:#edf3f4;font-size:1.55rem}.holding-copy{display:grid;min-width:0}.holding-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.holding-copy span,.holding-value small{color:var(--muted);font-size:.7rem;font-weight:750}.holding-value{text-align:right}.holding-value strong{display:block;font-size:1.05rem}.holding-row button{width:38px;height:38px;border:1px solid #f0c7cd;border-radius:10px;color:var(--red);background:#fff3f4;font-weight:1000;cursor:pointer}.empty-state{margin:16px 0;color:var(--muted);text-align:center}.portfolio-disclaimer{margin:24px 5px;color:var(--muted);font-size:.72rem;font-weight:700;line-height:1.65;text-align:center}html[data-theme="dark"]{color-scheme:dark;--ink:#edf3f6;--muted:#a7b1b8;--line:#34434c;--surface:#151d22;--page:#0b1115}html[data-theme="dark"] body{background:radial-gradient(circle at 6% 5%,rgba(21,95,145,.18),transparent 30%),#0b1115}html[data-theme="dark"] .portfolio-header{background:rgba(12,18,22,.93)}html[data-theme="dark"] .portfolio-back,html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .history-tabs button{border-color:#3a4952;background:#172027}html[data-theme="dark"] .holding-form select,html[data-theme="dark"] .holding-form input,html[data-theme="dark"] .holding-row{border-color:#37464f;background:#10171c;color:var(--ink)}html[data-theme="dark"] .allocation-chart:after{background:var(--surface)}html[data-theme="dark"] .history-summary{background:#202c2d}html[data-theme="dark"] .holding-icon{background:#263239}html[data-theme="dark"] .holding-row button{border-color:#63343d;background:#3a2025}@media(max-width:760px){.portfolio-header{min-height:66px;padding:7px 10px}.portfolio-logo img{width:180px;height:48px}.portfolio-back{padding:9px 11px}.portfolio-back span{display:none}.theme-toggle{width:42px;height:42px}.portfolio-hero{grid-template-columns:1fr;gap:13px;border-radius:19px;padding:20px}.portfolio-total{min-height:104px;text-align:left}.portfolio-workspace{grid-template-columns:1fr}.history-head{display:block}.history-tabs{margin-top:12px}.allocation-body{grid-template-columns:150px minmax(0,1fr);gap:12px}.allocation-chart{width:145px}.holding-row{grid-template-columns:auto minmax(0,1fr) auto}.holding-value{grid-column:2;text-align:left}.holding-row button{grid-column:3;grid-row:1/3}.history-chart{height:220px}}@media(max-width:430px){main{width:min(100% - 18px,1180px);margin-top:10px}.portfolio-logo img{width:150px}.portfolio-hero h1{font-size:1.8rem}.holding-form,.allocation-card,.history-card,.holdings-card{border-radius:17px;padding:14px}.allocation-body{grid-template-columns:125px minmax(0,1fr)}.allocation-chart{width:120px}.allocation-legend li{font-size:.68rem}.history-tabs button{padding:0 5px;font-size:.67rem}.holding-icon{width:40px;height:40px}}
/* Shared StockBull theme control: animated line icon on navy glass. */
.portfolio-header>.theme-toggle{display:inline-grid;width:44px;height:44px;padding:0;place-items:center;border:1px solid rgba(10,55,94,.3);border-radius:13px;color:#f39800;background:linear-gradient(145deg,rgba(255,255,255,.96) 16%,rgba(228,240,249,.94) 100%);box-shadow:0 4px 12px rgba(10,52,88,.14),inset 0 0 4px rgba(44,119,174,.13),inset 0 0 13px rgba(44,119,174,.08),inset 0 1px 0 rgba(255,255,255,.98);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.portfolio-header>.theme-toggle .theme-icon{grid-area:1/1;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:opacity .18s ease,transform .22s ease}.portfolio-header>.theme-toggle .theme-icon-sun circle{fill:currentColor;stroke:none}.portfolio-header>.theme-toggle .theme-icon-moon{opacity:0;transform:rotate(-24deg) scale(.62)}.portfolio-header>.theme-toggle[aria-pressed="true"] .theme-icon-sun{opacity:0;transform:rotate(28deg) scale(.62)}.portfolio-header>.theme-toggle[aria-pressed="true"] .theme-icon-moon{opacity:1;transform:rotate(0) scale(1)}
html[data-theme="dark"] .portfolio-header>.theme-toggle{border-color:rgba(69,128,174,.46);color:#ffd260;background:linear-gradient(145deg,#172735,#0d1924);box-shadow:0 4px 12px rgba(0,0,0,.34),inset 0 0 4px rgba(56,137,197,.16),inset 0 0 13px rgba(56,137,197,.08),inset 0 1px 0 rgba(255,255,255,.05)}
@media(max-width:760px){.portfolio-header>.theme-toggle{width:40px;height:40px;border-radius:11px}}
