body { grid-template-columns: clamp(220px, 20vw, 290px) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 430px; padding-bottom: 18px; }
.sidebar nav { margin-top: clamp(22px, 3vw, 45px); }
.sidebar nav a { min-height: 48px; font-size: clamp(15px, 1.3vw, 18px); }
.account-menu { position: relative; margin-top: auto; padding-top: 12px; }
.account-menu summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 12px; background: #392039; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.account-menu[open] summary::after { transform: rotate(225deg); }
.account-menu summary:hover, .account-menu[open] summary { background: #532e48; }
#account-name { overflow: hidden; font-size: .9rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.avatar { position: relative; display: grid; flex: none; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: #f5d6c4; color: var(--ink); font-size: .8rem; font-weight: 750; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-menu form { position: absolute; z-index: 2; right: 0; bottom: calc(100% - 6px); left: 0; padding: 5px; border: 1px solid #76556f; border-radius: 12px; background: #392039; box-shadow: 0 8px 24px #16081e55; }
.account-menu button { width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.account-menu button:hover { background: #532e48; }
#logout-error { padding: 4px 12px 8px; font-size: .8rem; }
main { max-width: 1240px; padding: clamp(25px, 3vw, 46px) clamp(22px, 4.3vw, 66px) 32px; }
h1 { font-size: clamp(40px, 5.2vw, 72px); text-wrap: balance; }
h2 { font-size: clamp(24px, 2.8vw, 34px); }
h3 { font-size: clamp(20px, 2vw, 26px); }
p { margin: 0; }
.overview-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 16px; margin-top: clamp(19px, 2.8vw, 38px); }
.surface { min-width: 0; padding: clamp(18px, 2.4vw, 32px); border: 1px solid var(--line); border-radius: 16px; background: #fffaf5; }
.balance-card { background: #f7e6dc; }
.label { color: var(--muted); font-size: 1rem; font-weight: 650; line-height: 1.4; letter-spacing: 0; }
.point-total { display: block; margin: 3px 0 5px; font-size: clamp(49px, 6vw, 78px); font-weight: 800; line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.plan-status { display: block; margin: 8px 0 7px; font-size: clamp(23px, 2.8vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -.045em; }
.plan-card .text-link { margin-top: 8px; }
.support { color: var(--muted); font-size: .875rem; }
progress { display: block; width: 100%; height: 9px; margin: 11px 0 8px; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: #e9cbb9; color: #9a4a37; }
progress::-webkit-progress-bar { background: #e9cbb9; }
progress::-webkit-progress-value { border-radius: 999px; background: #9a4a37; }
progress::-moz-progress-bar { background: #9a4a37; }
.group { margin-top: clamp(28px, 3.4vw, 44px); }
.group > h2 { margin-bottom: 10px; }
.product-row { display: grid; grid-template-columns: clamp(75px, 10vw, 128px) minmax(0, 1fr) auto; gap: 5px 18px; align-items: center; min-height: 92px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.product-row img { display: block; width: 100%; height: 75px; object-fit: contain; mix-blend-mode: multiply; }
.product-row h3 { margin-bottom: 4px; }
.text-link { display: inline-flex; gap: .45em; align-items: center; min-height: 44px; color: var(--link); font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 18px; }
.activity { margin: 0; padding: 0; list-style: none; }
.activity li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity time { grid-row: 2; color: var(--muted); font-size: .875rem; }
.activity strong { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; }
.payment-history .support { grid-column: 1; }
.payment-history strong { align-self: start; }
.detail-card { margin-top: clamp(19px, 2.8vw, 38px); }
.details { margin: 12px 0; }
.details div { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.subscription-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; }
.subscription-actions:not(:has(:not([hidden]))) { display: none; }
.subscription-actions button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fffaf5; color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
.subscription-actions button:hover { background: #f7e6dc; }
.subscription-actions button:disabled { opacity: .6; cursor: wait; }
#cancel-dialog { width: min(440px, 90vw); padding: clamp(18px, 5vw, 28px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); }
#cancel-dialog::backdrop { background: #25112a85; }
#cancel-dialog p:not(:empty), #subscription-result:not(:empty) { margin-top: 10px; }
#confirm-cancel { border-color: var(--plum); background: var(--plum); color: var(--paper); }
#confirm-cancel:hover { background: #532e48; }
#cancel-error { color: #8b3428; }
.page-footer { display: flex; gap: 20px; margin-top: 30px; color: var(--muted); font-size: .875rem; }
.page-footer a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 860px) {
  .product-row { grid-template-columns: 80px minmax(0, 1fr); column-gap: 12px; }
  .product-row img { grid-row: span 2; }
  .product-row a { grid-column: 2; }
}
@media (max-width: 760px) {
  .sidebar { min-height: 0; }
  .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
  .sidebar nav a { padding-inline: 9px; font-size: 14px; }
  main { padding-inline: 6%; }
  .overview-grid { grid-template-columns: 1fr; }
}
#account-message { min-height: 90px; }
.page-footer { flex-wrap: wrap; }
#retry { min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
