.owner-profile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding-bottom: 22px;
}
.profile-panorama {
  height: clamp(124px, 14vw, 172px);
  background: #65766c url("/assets/profile-road.webp") center 51% / cover no-repeat;
  border-radius: 17px 17px 0 0;
}
.profile-identity { position: relative; padding: 0 28px 20px; display: flow-root; }
.profile-avatar {
  display: flex; width: max-content; margin-top: -33px;
  border: 4px solid #fff; border-radius: 50%; background: #fff;
}
.profile-avatar > .avatar, .profile-avatar > svg { display: block; width: 84px; height: 84px; border-radius: 50%; }
.profile-avatar > .letter { display: grid; place-items: center; font-size: 33px; }
.profile-name, .profile-tools, .profile-location, .profile-stats, .profile-bar,
.profile-bar nav, .profile-menu a, .profile-friend, .profile-pages { display: flex; align-items: center; }
.profile-name { gap: 9px; flex-wrap: wrap; margin-top: 7px; }
.profile-name h1 { margin: 0; font-size: clamp(1.6rem, 2.7vw, 2.1rem); line-height: 1.25; overflow-wrap: anywhere; }
.profile-bio, .profile-add-bio { font-size: .93rem; line-height: 1.5; }
.profile-bio { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-add-bio { display:inline-block; margin-top: 5px; color: var(--muted); }
.profile-add-bio:hover, .profile-stats a:hover span { color: var(--purple); text-decoration: underline; }
.profile-location { gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: .84rem; }
.profile-location span { display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.profile-tools { position: absolute; right: 28px; top: 13px; gap: 8px; }
.profile-tools .btn, .profile-empty .btn, .profile-write { min-height: 35px; border-radius: 999px; padding: 6px 15px; }
.profile-more { position: relative; }
.profile-more > summary {
  display: grid; place-items: center; letter-spacing: 2px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); list-style: none;
}
.profile-more > summary::-webkit-details-marker { display: none; }
.profile-more[open] > summary, .profile-more > summary:hover { background: var(--soft); }
.profile-menu {
  position: absolute; z-index: 5; right: 0; top: calc(100% + 6px);
  min-width: 166px; padding: 5px; background: white;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 23px #26282b20;
}
.profile-menu a, .profile-menu .profile-logout { gap: 9px; padding: 8px 12px; font-size: .86rem; border-radius: 7px; }
.profile-menu a:hover { background: var(--soft); }
.profile-menu .profile-logout { display: block; width: 100%; border-top: 1px solid var(--line); text-align: left; color: var(--muted); }
.profile-stats { gap: 20px; margin-top: 12px; }
.profile-stats > * { display: inline-flex; align-items: baseline; gap: 5px; }
.profile-stats strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.profile-stats span span, .profile-stats a span { color: var(--muted); font-size: .83rem; }
.profile-bar { gap: 12px; justify-content: space-between; margin: 0 28px; border-bottom: 1px solid var(--line); }
.profile-bar nav { gap: 25px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.profile-bar nav a { position: relative; padding: 13px 2px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.profile-bar nav a[aria-current] { color: var(--ink); }
.profile-bar nav a[aria-current]::after { content: ""; position: absolute; inset: auto 2px 0; height: 3px; border-radius: 4px; background: var(--purple); }
.profile-bar .profile-write { flex-shrink: 0; }
.profile-empty { display: grid; justify-items: center; align-content: center; gap: 12px; min-height: 210px; text-align: center; }
.profile-empty-icon { display: grid; place-items: center; background: var(--soft); color: var(--purple); width: 49px; height: 49px; border-radius: 15px; }
.profile-empty h2 { font-size: 1.02rem; margin: 0; font-weight: 600; }
.profile-empty .profile-write { margin-top: 2px; }
.profile-notes, .profile-records, .profile-friends { margin: 20px 28px 0; }
.profile-notes { grid-template-columns: repeat(4,minmax(0,1fr)); }
.profile-notes .note-open { position: relative; }
.profile-note-status { position: absolute; top: 8px; left: 8px; z-index: 1; background: #fffffff0; border-radius: 99px; padding: 3px 8px; color: var(--ink); font-size: .72rem; }
.profile-friends { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill,minmax(165px,1fr)); }
.profile-friend { gap: 9px; }
.profile-friend small { display: block; color: var(--muted); }
.profile-pages { justify-content: center; gap: 16px; padding: 18px 5px 0; }
@media(max-width:840px) {
  .profile-notes { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:620px) {
  .owner-profile { border-radius: 13px; }
  .profile-panorama { border-radius: 12px 12px 0 0; }
  .profile-identity { padding: 0 14px 12px; }
  .profile-avatar { margin-top: -26px; border-width: 3px; }
  .profile-avatar > .avatar, .profile-avatar > svg { width: 64px; height: 64px; }
  .profile-tools { top: 9px; right: 12px; }
  .profile-bar { margin: 0 12px; flex-wrap: wrap; gap: 0 8px; }
  .profile-bar nav { gap: 14px; flex: 1 1 auto; }
  .profile-bar nav a { padding-block: 12px; font-size: .9rem; }
  .profile-bar .profile-write { margin: 5px 0; min-height: 32px; }
  .profile-notes, .profile-records, .profile-friends { margin: 14px 10px 0; }
  .profile-notes { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-empty { min-height: 175px; }
}
.profile-shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 28px 18px; }
.profile-shortcuts a { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #43474e; font-size: .9rem; font-weight: 600; }
.profile-shortcuts a:hover { color: var(--purple); border-color: #e0dfd9; }
.profile-shortcuts .nav-dot { position: absolute; top: -6px; right: -4px; }
@media (max-width: 720px) {
  .profile-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 14px 14px; }
}
.profile-excerpt { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:pre-line; overflow-wrap:anywhere; }
.profile-about, .profile-album { margin:18px 28px; min-width:0; }
.layout .profile-album { margin:0; padding:20px; background:white; border:1px solid var(--line); border-radius:var(--radius); }
.profile-about h2, .profile-album h2 { margin:0; font-size:1.15rem; }
.profile-album > header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.profile-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(165px,100%),1fr)); gap:12px 22px; padding:14px 0; margin:0; }
.profile-facts dt { color:var(--muted); font-size:.85rem; }
.profile-facts dd { margin:3px 0 0; overflow-wrap:anywhere; }
.profile-answer { border-top:1px solid var(--line); padding:12px 0 4px; }
.profile-answer h3 { font-size:1rem; margin:0; }
.profile-answer p,.profile-story { margin:.5em 0; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.profile-form-section { border:0; border-top:1px solid var(--line); padding:12px 0 0; margin:10px 0 0; min-width:0; }
.profile-form-section legend { font-weight:700; padding-right:10px; }
.album-grid { display:grid; gap:16px; grid-template-columns:repeat(auto-fill,minmax(min(165px,100%),1fr)); align-items:start; }
.album-item,.album-viewer { min-width:0; margin:0; }
.album-thumb { display:block; position:relative; width:100%; aspect-ratio:1; overflow:hidden; border:0; padding:0; border-radius:10px; background:var(--paper); cursor:pointer; }
.album-thumb img,.album-thumb video { display:block; width:100%; height:100%; object-fit:cover; }
.album-video-label { position:absolute; right:8px; bottom:8px; padding:2px 7px; border-radius:8px; background:#282a2ed9; color:white; font-size:.8rem; }
.album-item figcaption,.album-viewer figcaption { margin-top:6px; overflow-wrap:anywhere; white-space:pre-line; }
.album-item footer { display:flex; justify-content:space-between; align-items:center; color:var(--muted); }
.album-viewer img,.album-viewer video { display:block; max-height:68vh; max-width:100%; margin:auto; }
.wallet-view { max-width: 760px; margin-inline: auto; }
.wallet-balance { background: var(--soft); }
.wallet-balance p { margin: .25rem 0 0; color: var(--purple); }
.wallet-balance strong { font-size: clamp(2.25rem, 6vw, 3rem); line-height: 1.15; font-variant-numeric: tabular-nums; }
.wallet-balance small { display: block; margin: .5rem 0 0; color: var(--muted); }
.wallet-balance .wallet-rate { margin-top: .8rem; font-size: .92rem; color: var(--muted); }
.wallet-form { max-width: 28rem; }
.wallet-form [data-wallet-quote] { color: var(--purple); font-weight: 650; }
.wallet-orders, .wallet-entries { margin: 0; padding: 0; list-style: none; }
.wallet-order, .wallet-entries > li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .8rem 0; }
.wallet-order + .wallet-order, .wallet-entries li + li { border-top: 1px solid var(--line); }
.wallet-order small, .wallet-entries small { display: block; color: var(--muted); margin-top: .25rem; }
.wallet-entries strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wallet-detail { display: grid; grid-template-columns: max-content 1fr; gap: .65rem 1rem; }
.wallet-detail dt { color: var(--muted); }
.wallet-detail dd { margin: 0; overflow-wrap: anywhere; }
@media(max-width:620px) {
  .profile-about,.profile-album { margin:16px 12px; }
  .album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
}
