.profile-main { max-width:1040px; min-height:calc(100vh - 120px); padding-top:calc(var(--header-h) + clamp(30px,4vw,60px)); padding-bottom:70px; }
.profile-main [hidden] { display:none !important; }
.profile-heading,.history-heading,.identity-row,.name-actions,.history-nav { display:flex; align-items:center; gap:14px; }
.profile-heading,.history-heading { justify-content:space-between; }
.profile-heading { margin-bottom:26px; }
.profile-heading h1,.profile-main h2,.profile-main p { margin:0; }
.profile-heading h1 { font-size:var(--type-page); font-weight:620; letter-spacing:-.055em; line-height:1.07; }
.profile-link { display:inline-flex; align-items:center; min-height:36px; padding:4px 0; color:#cacbd7; background:none; border:0; font:inherit; font-size:14px; font-weight:550; cursor:pointer; text-decoration:none; }
.profile-link:hover { color:var(--ink); }
.profile-main :is(a,button,summary,input):focus-visible { outline:2px solid #bccbf0; outline-offset:3px; }
.profile-overview { display:grid; grid-template-columns:1.35fr 1fr; gap:16px; align-items:start; }
.profile-panel,.history-order,.history-empty,.profile-gate { border:1px solid var(--line); border-radius:22px; background:linear-gradient(145deg,#22232b,#191a21 80%); box-shadow:var(--edge); }
.profile-panel { padding:24px 27px; min-height:155px; }
.identity-row { margin:0 0 15px; min-width:0; }
.profile-avatar { display:grid; place-items:center; width:54px; height:54px; flex:none; border-radius:18px; font-size:24px; font-weight:600; color:#dce4f8; background:linear-gradient(145deg,#414a61,#2d3243); border:1px solid #51596d; }
.identity-copy { min-width:0; }
.identity-copy h2 { font-size:clamp(21px,2vw,29px); letter-spacing:-.045em; overflow-wrap:anywhere; line-height:1.18; }
.identity-copy p,.balance-panel>span,.history-status-line { color:var(--muted); font-size:14px; }
.identity-copy p { margin-top:5px; overflow-wrap:anywhere; }
.balance-panel { background:linear-gradient(115deg,#2c3547d9,#202633c9 70%,#232938cb); border-color:#485169; }
.balance-panel h2 { display:flex; align-items:center; gap:8px; color:#d9dfef; font-size:15px; font-weight:550; }
.balance-panel svg { width:20px; height:20px; }
#pageBalance { margin:11px 0 2px; font-size:clamp(29px,3.3vw,42px); font-weight:620; line-height:1.15; letter-spacing:-.055em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.profile-feedback:empty { display:none; }
.profile-feedback:not(:empty) { margin-top:9px; }
.profile-feedback,#nameHint { font-size:13px; color:var(--muted); }
#nameForm label { font-size:14px; display:block; margin:5px 0 7px; }
#nameInput { width:100%; min-height:44px; border:1px solid #555867; border-radius:12px; background:#14151b; color:var(--ink); font:inherit; padding:9px 13px; }
#nameHint { margin:7px 0 12px; }
.history { margin-top:34px; }
.history-heading { margin-bottom:15px; }
.history-heading h2 { font-size:clamp(23px,2.4vw,32px); font-weight:620; letter-spacing:-.045em; }
.history #historyStatus:not(:empty) { margin-bottom:10px; color:var(--muted); }
.history-order { background:#1b1c23; margin-bottom:9px; border-radius:17px; overflow:hidden; }
.history-order summary { display:grid; grid-template-columns:42px minmax(0,1fr) auto auto 12px; align-items:center; gap:16px; min-height:79px; padding:13px 18px; list-style:none; cursor:pointer; }
.history-order summary::-webkit-details-marker { display:none; }
.history-order summary:focus-visible { outline-offset:-3px; border-radius:16px; }
.history-order summary::after { content:""; width:7px; height:7px; border:solid var(--muted); border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.history-order[open] summary::after { transform:rotate(225deg); }
.order-icon { display:grid; place-items:center; width:42px; height:42px; border:1px solid #ffffff16; border-radius:13px; background:#262830; }
.order-icon img,.order-icon svg { width:23px; height:23px; object-fit:contain; }
.order-icon img.invert { filter:invert(1); }
.order-title,.order-meta { display:block; }
.order-title { font-size:16px; font-weight:620; overflow-wrap:anywhere; }
.order-meta { margin-top:3px; color:var(--muted); font-size:13px; }
.order-state { color:#c3c6d3; font-size:13px; white-space:nowrap; }
.order-state.done { color:#a8d4be; }
.order-price { min-width:75px; font-weight:650; text-align:right; font-variant-numeric:tabular-nums; }
.order-body { margin:0 18px; padding:12px 0 15px; border-top:1px solid var(--line-soft); font-size:14px; color:var(--muted); }
.order-body pre { margin:6px 0 0; padding:10px 12px; font:inherit; color:var(--ink); border-radius:10px; background:#13141a; white-space:pre-wrap; overflow-wrap:anywhere; }
.history-empty,.profile-gate { padding:22px; color:var(--muted); }
.history-empty p { margin-bottom:8px; }
.history-nav { justify-content:flex-end; font-size:13px; color:var(--muted); }
.profile-main button:disabled { opacity:.5; cursor:default; }
@media(max-width:650px) {
  .profile-main { padding-top:calc(var(--header-h) + 24px); padding-bottom:46px; }
  .profile-overview { grid-template-columns:minmax(0,1fr); gap:10px; }
  .profile-panel { min-height:0; padding:17px 18px; border-radius:17px; }
  .identity-row { margin-bottom:6px; }
  .balance-panel { display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 12px; }
  #pageBalance { grid-column:2; grid-row:1 / 3; margin:0; max-width:55vw; }
  .balance-panel>span { grid-column:1; font-size:12px; }
  .history { margin-top:24px; }
  .history-order summary { grid-template-columns:34px minmax(0,1fr) auto 8px; gap:2px 9px; padding:12px; }
  .order-state { grid-column:2; grid-row:2; font-size:12px; }
  .order-icon { width:34px; height:34px; border-radius:10px; grid-row:1 / 3; }
  .order-icon img { width:20px; height:20px; }
  .order-price { grid-column:3; grid-row:1 / 3; min-width:0; font-size:15px; }
  .history-order summary::after { grid-column:4; grid-row:1 / 3; }
  .order-title { font-size:14px; }
  .order-meta { font-size:12px; }
  .profile-link { min-height:44px; }
}