/* Shared identity and compact account views within the existing growth theme. */
.growth-account-picture{display:inline-grid;place-items:center;position:relative;flex:none;width:100%;height:100%;border-radius:50%;overflow:hidden;background:linear-gradient(145deg,#e7f2eb,#d3e4db);color:#32604b;font-weight:650;isolation:isolate}
.growth-account-picture>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#f0f0f0}
.site-header .account-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:3px;border:0;border-radius:50%;background:transparent;flex:none;box-shadow:none;cursor:pointer;transition:none}
html[data-theme] .site-header .account-avatar{background:transparent}
.site-header .account-avatar:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#dialog.account-dialog{width:min(620px,calc(100vw - 32px));height:fit-content;max-height:calc(100dvh - 40px);overflow:hidden;border-radius:20px;padding:0}
#dialog.account-dialog[open]{display:flex;flex-direction:column}
#dialog.account-dialog #dialogContent{display:flex;flex-direction:column;min-height:0;overflow:auto;width:100%}
#dialog.account-dialog .dialog-head{padding:19px 26px;flex:none;min-height:0;background:var(--bg);border-bottom:1px solid var(--line)}
#dialog.account-dialog .dialog-head h2{font-size:19px}
.account-body{padding:24px 26px 0}
.account-identity{display:flex;align-items:center;gap:17px;margin-bottom:22px}
.account-picture-large{width:64px;height:64px;font-size:25px;border:3px solid var(--surface)}
.account-identity>div{min-width:0;overflow-wrap:anywhere}
#dialog.account-dialog .account-identity h3{font-size:21px;font-weight:650;line-height:1.35;margin:0 0 4px}
.account-identity p{font-size:13px;color:var(--muted);line-height:1.6;margin:0}
.account-plan-label{display:inline-block;font-size:10px;letter-spacing:.5px;padding:3px 7px;background:var(--surface);border-radius:5px;color:var(--muted);margin-top:7px}
.account-companion{display:flex;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);border-radius:13px;background:linear-gradient(115deg,var(--surface),var(--bg));margin-bottom:18px}
.account-pet{width:76px;height:76px;flex:none;overflow:hidden;border-radius:12px;background:var(--pet-bg)}
#dialog.account-dialog .account-pet>.pet-art{width:76px;height:76px;display:block}
.account-level{flex:1;min-width:0}
.account-level>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
#dialog.account-dialog .account-level strong{font-size:14px;font-weight:600}
.account-level>div>span{font-size:11px;color:var(--muted)}
.account-level p{font-size:11px;line-height:1.6;color:var(--muted);margin:5px 0 9px}
.account-level-track{height:5px;overflow:hidden;border-radius:20px;background:var(--line)}
.account-level-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.account-level>small{display:block;font-size:10px;color:var(--muted);line-height:1.6;margin-top:7px}
.account-wallet{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.account-wallet>div{border:1px solid var(--line);border-radius:12px;padding:16px 18px;display:flex;flex-direction:column;gap:6px}
.account-wallet>div>span{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.account-wallet .icon{width:15px;height:15px;color:var(--accent)}
#dialog.account-dialog .account-wallet strong{font-size:29px;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums}
.account-wallet small{font-size:10px;color:var(--muted);line-height:1.6}
.account-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:20px 0}
.account-shortcuts button{padding:4px 8px;display:flex;flex-direction:column;align-items:center;gap:7px;background:transparent;border-right:1px solid var(--line)}
.account-shortcuts button:last-child{border-right:0}
#dialog.account-dialog .account-shortcuts strong{font-size:19px;font-weight:600}
.account-shortcuts small{font-size:11px;color:var(--muted);font-weight:400}
.account-shortcuts button>span{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--muted)}
.account-shortcuts .icon{width:12px;height:12px}
.account-shortcuts button:hover>span{color:var(--accent)}
.account-records-entry{display:flex;align-items:center;gap:12px;width:100%;padding:16px 0;border-top:1px solid var(--line);background:transparent;text-align:left}
.account-entry-icon{display:grid;place-items:center;flex:none;width:37px;height:37px;border-radius:10px;background:var(--surface);color:var(--muted)}
.account-records-entry>span:nth-child(2){display:flex;flex-direction:column;gap:5px;min-width:0}
#dialog.account-dialog .account-records-entry strong{font-size:13px;font-weight:600}
.account-records-entry small{font-size:11px;color:var(--muted);line-height:1.5}
.account-records-entry>.icon{margin-left:auto;color:var(--muted);width:16px;height:16px}
.account-records-entry:hover .account-entry-icon{color:var(--accent)}
.account-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 26px;border-top:1px solid var(--line);background:var(--surface)}
.account-footer>span{display:flex;align-items:center;gap:6px;font-size:10px;color:var(--muted);line-height:1.6}
.account-footer .icon{width:12px;height:12px;flex:none}
#dialog.account-dialog .account-logout{font-size:12px;min-height:30px;flex:none;color:var(--muted)}
#dialog.account-dialog .account-logout:hover{color:#d66a53}
.account-ledger-top{display:flex;align-items:center;justify-content:space-between;padding:12px 26px;gap:12px;border-bottom:1px solid var(--line)}
#dialog.account-dialog .account-ledger-top .text-button{font-size:12px;min-height:30px}
.account-ledger-top>span{font-size:12px;color:var(--muted)}
#dialog.account-dialog .account-ledger-top strong{font-size:16px;padding-left:5px;font-variant-numeric:tabular-nums}
.account-ledger-body{padding:18px 26px 8px;min-height:230px}
.account-ledger-note{display:flex;align-items:flex-start;gap:7px;font-size:11px;line-height:1.8;color:var(--muted);margin-bottom:20px}
.account-ledger-note .icon{width:14px;height:14px;margin-top:3px;flex:none}
#dialog.account-dialog .account-ledger-day h3{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:600;padding:8px 0;color:var(--muted)}
.account-ledger-day h3>span{font-weight:400;font-size:10px}
.account-ledger-day{margin-bottom:16px}
.account-ledger-row{border-bottom:1px solid var(--line);margin:0}
.account-ledger-row>summary{display:flex;align-items:center;gap:12px;padding:17px 0;cursor:pointer;list-style:none;border-radius:7px}
.account-ledger-row>summary::-webkit-details-marker{display:none}
.account-ledger-icon{width:35px;height:35px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);flex:none}
.account-ledger-icon .icon{width:17px;height:17px}
.account-ledger-copy{display:flex;flex-direction:column;gap:6px;min-width:0}
#dialog.account-dialog .account-ledger-copy strong{font-size:13px;font-weight:600}
.account-ledger-copy small{font-size:11px;color:var(--muted);line-height:1.6}
.account-ledger-values{margin-left:auto;display:flex;gap:14px;text-align:right;flex:none}
.account-delta{display:flex;flex-direction:column;gap:3px}
#dialog.account-dialog .account-delta strong{font-size:17px;font-weight:600;font-variant-numeric:tabular-nums;color:inherit}
.account-delta small{font-size:10px;color:var(--muted)}
.account-delta.is-gain{color:var(--activity-ink,#14834d)}
.account-delta.is-spent{color:#b67647}
.account-no-change{font-size:11px;color:var(--muted)}
.account-ledger-chevron{color:var(--muted);flex:none;display:flex}
.account-ledger-chevron .icon{width:13px;height:13px;transition:transform .15s}
.account-ledger-row[open] .account-ledger-chevron .icon{transform:rotate(90deg)}
.account-ledger-row>summary:hover .account-ledger-icon{border-color:var(--accent);color:var(--accent)}
.account-ledger-detail{padding:12px 15px;margin:0 0 16px 47px;background:var(--surface);border-radius:8px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font-size:11px;color:var(--muted)}
#dialog.account-dialog .account-ledger-detail strong{font-size:12px;font-weight:500}
.account-ledger-detail i{font-style:normal;margin:0 6px;color:var(--muted)}
.account-ledger-detail small{width:100%;font-size:10px}
.account-ledger-paging{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 26px;border-top:1px solid var(--line)}
.account-ledger-paging>span{font-size:12px;color:var(--muted)}
#dialog.account-dialog .account-ledger-paging .button{font-size:12px;min-height:35px;padding:6px 12px}
.account-ledger-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;min-height:220px;text-align:center;padding:22px}
.account-ledger-empty>.icon{width:32px;height:32px;color:var(--muted)}
#dialog.account-dialog .account-ledger-empty h3{font-size:16px;margin:0}
.account-ledger-empty p{font-size:12px;color:var(--muted);line-height:1.8;margin:0}
.account-loading{width:24px;height:24px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:account-loading-spin .9s linear infinite}
@keyframes account-loading-spin{to{transform:rotate(360deg)}}
html[data-theme="light"] #dialog.account-dialog .account-companion{background:linear-gradient(115deg,#f5f8f6,#fbfbfb)}
html[data-theme="dark"] .growth-account-picture{background:linear-gradient(145deg,#304a3c,#283b32);color:#b2d5bf}
@media(max-width:600px){.site-header .account-avatar{display:inline-flex;width:32px;height:32px}#dialog.account-dialog{border-radius:16px}#dialog.account-dialog .dialog-head{padding:16px 18px}.account-body{padding:20px 18px 0}.account-identity{gap:13px}.account-picture-large{width:56px;height:56px}.account-companion{gap:12px;padding:13px}.account-pet,#dialog.account-dialog .account-pet>.pet-art{width:60px;height:60px}.account-wallet{gap:10px}.account-wallet>div{padding:14px}.account-footer{padding:12px 18px;flex-wrap:wrap}.account-ledger-top{padding:10px 18px}.account-ledger-body{padding:16px 18px 6px}.account-ledger-row>summary{gap:9px;flex-wrap:wrap}.account-ledger-copy{flex:1}.account-ledger-copy small{font-size:10px}.account-ledger-values{gap:12px}.account-ledger-copy strong{font-size:12px}.account-ledger-detail{margin-left:0}.account-ledger-paging{padding:14px 18px}}
@media(prefers-reduced-motion:reduce){.account-loading{animation:none}.account-ledger-chevron .icon{transition:none}}
/* Keep the whole account overview visible on ordinary laptop screens. */
#dialog.account-dialog .dialog-head{padding-block:12px}
#dialog.account-dialog .dialog-head .icon-button{width:34px;height:34px;min-height:34px}
.account-body{padding-top:20px}
.account-identity{margin-bottom:18px}
.account-wallet>div{padding:12px 16px;gap:5px}
.account-shortcuts{margin-block:16px}
.account-level p{font-size:12px}
.account-level>small,.account-wallet small,.account-plan-label{font-size:11px}
.account-shortcuts button>span,.account-records-entry small{font-size:12px}
#dialog.account-dialog .account-records-entry strong,#dialog.account-dialog .account-ledger-copy strong{font-size:14px}
.account-ledger-copy small,.account-ledger-note{font-size:12px}
.account-delta small,.account-ledger-day h3>span,.account-footer>span{font-size:11px}

/* A steady, compact ledger with its pager always outside the scrolling list. */
html[data-theme] #dialog.growth-dialog.account-ledger-dialog {
  height: min(680px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
}
html[data-theme] #dialog.growth-dialog.account-ledger-dialog > #dialogContent > .account-ledger-body {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 14px;
}
.account-ledger-dialog .account-ledger-note { margin-bottom: 14px; }
.account-ledger-dialog .account-ledger-day { margin-bottom: 8px; }
.account-ledger-dialog .account-ledger-day + .account-ledger-day { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.account-ledger-dialog .account-ledger-row { border-bottom: 0; }
.account-ledger-dialog .account-ledger-row > summary { padding-block: 12px; }
.account-ledger-dialog .account-ledger-copy { gap: 4px; }
.account-ledger-page-controls { display: flex; align-items: center; gap: 14px; }
.account-ledger-page-controls > span { min-width: 70px; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.account-ledger-paging .account-ledger-total { font-size: 11px; color: var(--muted); }
.account-ledger-dialog .account-ledger-paging { padding-block: 12px; }
@media (max-width: 600px) {
  html[data-theme] #dialog.growth-dialog.account-ledger-dialog { height: min(680px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); }
  .account-ledger-dialog .account-ledger-paging { flex-wrap: wrap; gap: 8px; }
  .account-ledger-page-controls { flex: 1; justify-content: space-between; gap: 8px; }
  .account-ledger-paging .account-ledger-total { width: 100%; text-align: center; }
}
