:root {
  --bg: #f3f1ec;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(18, 24, 32, 0.08);
  --text: #171b20;
  --muted: #707781;
  --deep-muted: #515862;
  --accent: #222831;
  --positive: #c64f45;
  --negative: #2f8f68;
  --shadow: 0 24px 60px rgba(20, 26, 34, 0.08);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at top left, rgba(255,255,255,.9), transparent 28%), linear-gradient(135deg, #efede8 0%, #f7f5f1 46%, #ece9e2 100%);
  min-height: 100vh;
}
button, input, select { font: inherit; }
.app-shell { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 28px 22px; border-right: 1px solid var(--line); backdrop-filter: blur(18px); background: rgba(248,246,241,.72); }
.main { padding: 30px; }
.site-footer { padding: 0 30px 24px; text-align: center; font-size: 12px; color: var(--muted); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.brand-block, .panel, .card, .drawer-panel { background: var(--panel); backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow); }
.brand-block, .panel { border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; }
.eyebrow, .section-kicker { margin: 0 0 10px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.brand-block h1, .hero h2, .card h3, .drawer-panel h3 { margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif; font-weight: 600; letter-spacing: .01em; }
.brand-block h1 { font-size: 34px; line-height: 1.05; margin-bottom: 12px; }
.muted, .footnote { color: var(--muted); line-height: 1.7; }
.footnote { font-size: 12px; }
.share-hint { margin: 12px 0 0; }
.auth-action { width: 100%; margin-top: 10px; }
.auth-gate { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(18, 24, 32, .34); backdrop-filter: blur(12px); }
.auth-gate.hidden { display: none; }
.auth-card { width: min(440px, 100%); padding: 32px; border-radius: var(--radius-lg); background: var(--panel-strong); border: 1px solid rgba(255,255,255,.76); box-shadow: var(--shadow); }
.auth-card h2 { margin: 0 0 10px; font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif; font-size: 30px; }
.auth-card input { width: 100%; min-height: 46px; margin: 8px 0 12px; }
.auth-card .btn { width: 100%; }
.auth-message { min-height: 22px; margin: 0 0 12px; color: var(--negative); font-size: 13px; }
body.auth-pending .app-shell, body.auth-pending .site-footer { visibility: hidden; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  color: var(--deep-muted);
  font-size: 12px;
  line-height: 1.6;
}
.checkbox-row input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin-top: 2px;
  padding: 0;
  border-radius: 4px;
}
.annual-note { margin: 14px 0 0; }
.panel-header, .card-header, .section-head-inline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.status-dot, .pill { padding: 8px 12px; border-radius: 999px; font-size: 12px; color: var(--deep-muted); background: rgba(27,32,38,.05); border: 1px solid rgba(27,32,38,.08); }
.currency-tag { display: inline-flex; align-items: center; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; color: var(--deep-muted); background: rgba(27,32,38,.05); border: 1px solid rgba(27,32,38,.08); vertical-align: middle; }
.currency-tag.exited-tag { background: rgba(114,125,139,.08); color: #8d949c; border-color: rgba(114,125,139,.12); }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 18px; }
.meta-grid label, .field-label { display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.meta-grid strong { font-size: 14px; }
.action-stack { display: grid; gap: 10px; }
.action-stack.compact { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.btn, .icon-btn, select, input { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.btn { min-height: 44px; padding: 0 16px; background: transparent; color: var(--text); cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #f5f4f0; }
.btn-secondary { background: rgba(27,32,38,.06); }
.btn-ghost { background: rgba(255,255,255,.6); }
.upload-btn { display: inline-flex; align-items: center; justify-content: center; }
.upload-btn input { display: none; }
select, input { width: 100%; min-height: 44px; padding: 0 14px; background: rgba(255,255,255,.76); color: var(--text); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 18px; }
.hero h2 { font-size: clamp(34px, 4vw, 56px); line-height: .98; }
.hero-note { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; color: var(--deep-muted); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.monthly-audit-card { padding-bottom: 18px; }
.kpi-card { border-radius: 24px; padding: 18px 20px; background: var(--panel-strong); border: 1px solid rgba(255,255,255,.7); box-shadow: var(--shadow); }
.kpi-card label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 22px; }
.kpi-card strong { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.kpi-card span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 18px; margin-bottom: 18px; }
.card { border-radius: var(--radius-lg); padding: 22px; }
.ytd-bars-card { min-height: 820px; }
.wide-card { min-height: 420px; }
.stack-column { display: grid; gap: 18px; align-content: start; }
.bars { display: grid; gap: 12px; margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 70px; align-items: center; gap: 12px; }
.bar-label { display: flex; flex-direction: column; gap: 3px; }
.bar-label strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.bar-label span { font-size: 12px; color: var(--deep-muted); }
.bar-track { position: relative; height: 8px; border-radius: 999px; background: rgba(16,24,32,.08); overflow: hidden; }
.bar-fill { position: absolute; top: 0; bottom: 0; border-radius: inherit; }
.bar-value, .bar-label { font-size: 13px; }
.bar-value.positive, .positive { color: var(--positive); }
.bar-value.negative, .negative { color: var(--negative); }
.donut-layout { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; margin-top: 22px; }
.donut { width: 180px; height: 180px; border-radius: 50%; position: relative; }
.donut::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: rgba(246,245,241,.96); box-shadow: inset 0 0 0 1px rgba(18,24,32,.05); }
.donut-center { position: absolute; inset: 28px; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 4px; }
.donut-center strong { font-size: 16px; color: var(--text); }
.donut-center span { font-size: 12px; color: var(--muted); }
.legend { display: grid; gap: 12px; }
.allocation-note { margin: 14px 2px 0; }
.legend-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.summary-chip { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(20,26,34,.04); }
.summary-chip label { font-size: 12px; color: var(--muted); }
.summary-chip strong { font-size: 13px; }
.legend-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.legend-item span { display: flex; align-items: center; gap: 8px; }
.legend-item em { font-style: normal; font-size: 11px; color: var(--muted); }
.swatch { width: 12px; height: 12px; border-radius: 50%; }
.table-wrap { overflow: auto; margin-top: 16px; }
.monthly-audit-card .table-wrap { margin-top: 10px; }
.monthly-audit-card table { min-width: 100%; }
.monthly-audit-card th,
.monthly-audit-card td { padding: 10px 6px; font-size: 12px; }
.monthly-audit-card .footnote { margin-top: 10px; line-height: 1.6; }
.collapsed-history-card details[open] .history-summary { margin-bottom: 12px; }
.history-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.history-summary::-webkit-details-marker { display: none; }
.history-summary h3 { margin: 0; }
.mobile-card-list { display: none; }
.mobile-audit-card h4 { font-size: 17px; }
.mobile-data-card { border-radius: 22px; padding: 16px; background: rgba(255,255,255,.78); border: 1px solid rgba(18,24,32,.06); box-shadow: 0 12px 28px rgba(20,26,34,.05); }
.mobile-data-card.mobile-data-card-exited { opacity: .62; }
.mobile-data-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.mobile-data-head h4 { margin: 0; font-size: 18px; line-height: 1.25; }
.mobile-data-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mobile-ytd-pill { min-width: 104px; padding: 10px 12px; border-radius: 16px; background: rgba(20,26,34,.04); text-align: right; }
.mobile-ytd-pill span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.mobile-ytd-pill strong { font-size: 18px; }
.mobile-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mobile-meta-grid div,
.mobile-mini-metric { padding: 10px 12px; border-radius: 14px; background: rgba(20,26,34,.035); }
.mobile-meta-grid span,
.mobile-mini-metric span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.mobile-meta-grid strong,
.mobile-mini-metric strong { font-size: 14px; }
.mobile-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mobile-mini-grid.annual { grid-template-columns: repeat(3, minmax(0, 1fr)); }
table { width: 100%; border-collapse: collapse; min-width: 1180px; }
.compact-table table { min-width: 100%; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 13px; }
thead th { color: var(--muted); font-weight: 500; }
.sort-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.sort-arrows { display: inline-flex; flex-direction: column; line-height: .8; font-size: 10px; color: rgba(23,27,32,.28); }
.sort-btn.active { color: var(--text); }
.sort-btn.asc .sort-arrows .up, .sort-btn.desc .sort-arrows .down { color: var(--text); }
tbody tr:hover { background: rgba(18,24,32,.025); }
tbody tr.holding-row-exited { opacity: .58; }
tbody tr.holding-row-exited:hover { background: rgba(18,24,32,.018); opacity: .7; }
.drawer.hidden { display: none; }
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15,18,22,.28); backdrop-filter: blur(8px); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); padding: 24px; background: rgba(247,245,240,.96); overflow: auto; }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.icon-btn { width: 42px; height: 42px; background: rgba(27,32,38,.06); cursor: pointer; }
.drawer-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.drawer-mode-switch { display: inline-flex; gap: 8px; padding: 6px; margin-bottom: 16px; border-radius: 16px; background: rgba(20,26,34,.05); }
.mode-chip { min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--deep-muted); cursor: pointer; }
.mode-chip.active { background: rgba(255,255,255,.9); color: var(--text); border-color: rgba(18,24,32,.08); box-shadow: 0 8px 18px rgba(20,26,34,.06); }
.drawer-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.drawer-meta-card { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.62); border: 1px solid rgba(18,24,32,.06); }
.drawer-meta-card.is-inactive { opacity: .48; }
.drawer-meta-card .footnote { margin: 10px 2px 0; }
.drawer-mode-note { margin: 10px 2px 0; }
.drawer-mode-subnote { margin: 4px 2px 0; color: #8b9098; }
.monthly-edit-grid { display: grid; gap: 12px; margin-top: 16px; }
.edit-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr); gap: 12px; align-items: center; }
.row-meta strong, .row-meta span { display: block; }
.row-meta-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-meta strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-meta span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.entry-status { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.entry-status.is-filled { background: rgba(27,24,32,.07); color: #4f6073; }
.entry-status.is-empty { background: rgba(114,125,139,.1); color: #7d8896; }
.holding-status-btn { border: 1px solid rgba(18,24,32,.1); background: rgba(255,255,255,.72); color: #6f7782; border-radius: 999px; min-height: 32px; padding: 0 12px; font-size: 12px; cursor: pointer; }
.holding-status-btn:hover { color: #2a313b; border-color: rgba(18,24,32,.2); }
.holding-status-btn.is-exited { background: rgba(20,26,34,.06); color: #5a6571; }
.row-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-field span { display: block; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.mini-field input { min-height: 44px; }
.mini-field.is-disabled { opacity: .42; }
.add-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.holding-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.form-field { display: block; }
.form-field span { display: block; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.form-field-wide { grid-column: 1 / -1; }
.holding-info-hint { margin: 12px 2px 0; }
.holding-return-editor { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.holding-return-editor h5 { margin: 0; font-size: 15px; font-weight: 600; }
.holding-return-editor .footnote { margin-top: 6px; }
.holding-return-editor .holding-info-hint { margin: 12px 2px 0; }
.mobile-tab-bar,
.mobile-manage-panel,
.mobile-section-toggle { display: none; }
body.auth-pending .mobile-tab-bar { visibility: hidden; }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .kpi-grid, .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1480px) {
  .donut-layout { grid-template-columns: 1fr; gap: 18px; }
  .donut { margin: 0 auto; }
  .legend-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-chip { grid-template-columns: 12px auto auto; justify-content: start; }
  .summary-chip label,
  .legend-item em { white-space: nowrap; }
  .legend-item { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .legend-item span { min-width: 0; }
}
@media (max-width: 720px) {
  .main, .sidebar { padding: 18px; }
  .site-footer { padding: 0 18px 18px; }
  .brand-block h1 { font-size: 28px; }
  .hero h2 { font-size: 28px; line-height: 1.04; }
  .card, .brand-block, .panel { padding: 18px; border-radius: 24px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-note { align-items: flex-start; }
  .kpi-grid { grid-template-columns: 1fr; gap: 12px; }
  .kpi-card { padding: 16px 18px; }
  .kpi-card strong { font-size: 28px; }
  .donut-layout, .meta-grid, .action-stack.compact, .mini-stats, .add-form-grid, .holding-info-grid, .edit-row, .stack-column, .row-inputs, .drawer-meta-grid { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .row-meta-head { align-items: flex-start; flex-direction: column; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-label strong { font-size: 14px; }
  .bar-track { height: 10px; }
  .manager-chart { gap: 10px; }
  .legend-summary { grid-template-columns: 1fr; }
  .summary-chip { grid-template-columns: 12px 1fr auto; }
  .summary-chip,
  .legend-item { align-items: center; }
  .table-wrap { display: block; margin-top: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 1080px; }
  .mobile-card-list { display: none; }
  .monthly-audit-card .table-wrap { display: none; }
  .monthly-audit-card .mobile-card-list { display: grid; gap: 12px; margin-top: 14px; }
  .mobile-meta-grid,
  .mobile-mini-grid,
  .mobile-mini-grid.annual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-data-head { flex-direction: column; }
  .mobile-ytd-pill { width: 100%; text-align: left; min-width: 0; }
}
body.readonly-mode .action-stack,
body.readonly-mode #openUpdatePanel,
body.readonly-mode #resetSeed,
body.readonly-mode #exportData,
body.readonly-mode .checkbox-row,
body.readonly-mode .upload-btn,
body.readonly-mode .drawer { display: none !important; }

@media (max-width: 720px) {
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 20px 16px calc(104px + env(safe-area-inset-bottom)); }
  .site-footer { display: none; }
  .hero { margin: 0 0 16px; gap: 12px; }
  .hero .eyebrow { margin-bottom: 6px; font-size: 9px; letter-spacing: .2em; }
  .hero h2 { font-size: clamp(22px, 7.2vw, 27px); line-height: 1.1; letter-spacing: 0; white-space: nowrap; }
  .hero-note { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; }
  .hero-note span:first-child { padding: 6px 9px; border-radius: 999px; background: rgba(20,26,34,.05); }
  .content-grid,
  .stack-column { display: contents; }
  [data-mobile-panel] { display: none !important; }
  body[data-mobile-tab="overview"] #heroSection { display: flex !important; }
  body[data-mobile-tab="overview"] #kpiGrid { display: grid !important; }
  body[data-mobile-tab="overview"] .ytd-bars-card { display: block !important; }
  body[data-mobile-tab="monthly"] .monthly-audit-card { display: block !important; }
  body[data-mobile-tab="products"] #holdingsSection,
  body[data-mobile-tab="products"] .collapsed-history-card,
  body[data-mobile-tab="products"] #annualHoldingsSection { display: block !important; }
  body[data-mobile-tab="overview"] #styleAllocationSection { display: block !important; }
  body[data-mobile-tab="manage"] #mobileManagePanel { display: block !important; }

  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .kpi-card { min-height: 142px; padding: 16px; border-radius: 20px; }
  .kpi-card label { min-height: 32px; margin-bottom: 14px; font-size: 11px; line-height: 1.4; }
  .kpi-card strong { font-size: clamp(21px, 6vw, 27px); line-height: 1.1; overflow-wrap: anywhere; }
  .kpi-card span { margin-top: 8px; font-size: 11px; line-height: 1.45; }
  .card { padding: 18px 16px; border-radius: 24px; }
  .card-header { gap: 10px; }
  .card-header h3 { font-size: 24px; }
  .section-kicker { margin-bottom: 6px; font-size: 9px; }
  .pill { padding: 6px 9px; font-size: 11px; white-space: nowrap; }

  .ytd-bars-card { min-height: 0; }
  .ytd-bars-card .bars { gap: 10px; margin-top: 14px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .bar-row:last-child { border-bottom: 0; }
  .bar-label { grid-column: 1; min-width: 0; }
  .bar-label strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; height: 7px; }
  .bar-value { grid-column: 2; grid-row: 1; font-size: 13px; }

  .monthly-audit-card .mobile-card-list { gap: 10px; }
  .monthly-audit-card .mobile-data-card { padding: 14px; border-radius: 18px; box-shadow: none; }
  .monthly-audit-card .mobile-data-head { margin-bottom: 10px; }
  .monthly-audit-card .mobile-data-head h4 { font-size: 16px; }
  .monthly-audit-card .mobile-meta-grid { margin: 0; }

  #styleAllocationSection .donut-layout { grid-template-columns: 122px minmax(0, 1fr); gap: 14px; margin-top: 16px; }
  #styleAllocationSection .donut { width: 122px; height: 122px; margin: 0; }
  #styleAllocationSection .donut::after { inset: 20px; }
  #styleAllocationSection .donut-center { inset: 20px; gap: 2px; }
  #styleAllocationSection .donut-center strong { font-size: 13px; }
  #styleAllocationSection .donut-center span { font-size: 10px; }
  #styleAllocationSection .legend { gap: 8px; }
  #styleAllocationSection .legend-summary { grid-template-columns: 1fr; gap: 6px; margin: 0; }
  #styleAllocationSection .summary-chip { padding: 8px 9px; border-radius: 12px; gap: 7px; }
  #styleAllocationSection .summary-chip label,
  #styleAllocationSection .summary-chip strong { font-size: 11px; }
  #styleAllocationSection .legend-item { gap: 7px; font-size: 12px; }
  #styleAllocationSection .legend-item em { font-size: 10px; }
  #styleAllocationSection .legend-item.detail:nth-of-type(n+6) { display: none; }
  #styleAllocationSection .allocation-note { margin-top: 12px; font-size: 11px; }

  body[data-mobile-tab="products"] #holdingsSection .table-wrap,
  body[data-mobile-tab="products"] .collapsed-history-card .table-wrap,
  body[data-mobile-tab="products"] #annualHoldingsSection .table-wrap { display: none; }
  body[data-mobile-tab="products"] #holdingsCards,
  body[data-mobile-tab="products"] #exitedHoldingsCards,
  body[data-mobile-tab="products"] #annualHoldingsCards { display: grid; gap: 10px; margin-top: 14px; }
  .mobile-data-card { padding: 15px; border-radius: 18px; box-shadow: none; }
  .mobile-data-head { flex-direction: row; margin-bottom: 12px; }
  .mobile-data-head h4 { font-size: 16px; }
  .mobile-data-head p { margin-top: 4px; font-size: 11px; }
  .mobile-ytd-pill { width: auto; min-width: 86px; padding: 8px 10px; text-align: right; }
  .mobile-ytd-pill strong { font-size: 16px; }
  .mobile-meta-grid { gap: 8px; margin-bottom: 0; }
  .mobile-meta-grid div,
  .mobile-mini-metric { padding: 8px 9px; border-radius: 12px; }
  .mobile-meta-grid strong,
  .mobile-mini-metric strong { font-size: 13px; }
  .mobile-card-details { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .mobile-card-details summary { color: var(--deep-muted); font-size: 12px; cursor: pointer; }
  .mobile-card-details .mobile-mini-grid { margin-top: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collapsed-history-card .history-summary { padding: 2px 0; }
  .mobile-section-toggle { display: block; width: 100%; margin-top: 14px; }
  #annualHoldingsSection .annual-mobile-content { display: none; }
  #annualHoldingsSection.mobile-expanded .annual-mobile-content { display: block; }

  .mobile-manage-panel .footnote { margin: 14px 0; }
  .mobile-auth-action { width: 100%; }
  .mobile-admin-actions { display: grid; gap: 10px; margin-top: 10px; }
  body.readonly-mode .mobile-admin-actions { display: none !important; }

  .mobile-tab-bar { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(250,249,246,.92); border-top: 1px solid rgba(18,24,32,.08); backdrop-filter: blur(18px); box-shadow: 0 -12px 30px rgba(20,26,34,.06); }
  .mobile-tab { min-height: 48px; padding: 0 2px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
  .mobile-tab.active { color: #0c6e52; background: rgba(12,110,82,.08); font-weight: 700; }
  .drawer-panel { width: 100%; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
}
