:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171b27;
  background: #f7f6f3;
  font-synthesis: none;
  --accent: #7138f4;
  --accent-soft: #f2edff;
  --line: #e5e2dc;
  --muted: #687184;
}
* { box-sizing: border-box; }
/* The scrollbar is invisible at rest and fades in only while the page scrolls. */
html { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0) transparent; }
html.is-scrolling { scrollbar-color: rgba(104, 113, 132, .55) transparent; }
body { margin: 0; background: radial-gradient(circle at 75% -10%, #fff 0, rgba(255,255,255,0) 36rem), #f7f6f3; }
button, input, select { font: inherit; }
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
aside { display: flex; flex-direction: column; padding: 26px 18px 22px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .9); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 6px 24px; padding: 4px 8px 20px; border-bottom: 1px solid #efede9; color: inherit; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 16px; letter-spacing: -.01em; }
.brand small { color: #7a8291; font-size: 11px; }
nav { display: grid; gap: 4px; }
nav button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 11px 13px; text-align: left; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #667084; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
nav button > span { display: grid; gap: 4px; min-width: 0; }
nav button strong { color: #222735; font-size: 14px; font-weight: 650; }
nav button small { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
nav button i { color: #a4a9b4; font-size: 20px; font-style: normal; opacity: 0; transform: translateX(-3px); transition: .15s ease; }
nav button:hover { border-color: #ece8e2; background: #f8f7f4; }
nav button:hover i { opacity: .7; transform: none; }
nav button.active { border-color: #e6dcff; background: var(--accent-soft); color: var(--accent); }
nav button.active strong { color: #48219b; }
nav button.active i { color: var(--accent); opacity: 1; transform: none; }
.device-note { display: grid; gap: 5px; margin: auto 8px 0; padding: 16px 12px 0; border-top: 1px solid #efede9; color: #7a8190; font-size: 11px; line-height: 1.45; }
.device-note strong { color: #505869; font-size: 11px; font-weight: 650; }
main { width: min(760px, calc(100% - 72px)); margin: 0 auto; padding: 68px 0 72px; }
.account-page { width: min(800px, calc(100% - 88px)); padding-top: 52px; }
.page-header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.page-header > p, .label { margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.page-header h1 { margin: 0; font-size: 36px; letter-spacing: -.04em; line-height: 1.1; }
.page-header span, .card p, .state p { display: block; margin: 9px 0 0; color: var(--muted); line-height: 1.55; }
.page-header span { font-size: 15px; }
.stack { display: grid; gap: 12px; margin-top: 24px; }
.card { padding: 24px 26px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px rgba(25, 22, 18, .045); }
.card h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.02em; }
.card .label + h2 { font-size: 25px; }
.account-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 26px; }
.account-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; background: linear-gradient(135deg, #7138f4, #a573ff); color: #fff; font-size: 20px; font-weight: 750; box-shadow: 0 6px 14px rgba(113, 56, 244, .2); }
.identity-copy { min-width: 0; }
.identity-copy .label { margin-bottom: 5px; }
.identity-copy h2 { margin-bottom: 8px; overflow-wrap: anywhere; font-size: clamp(17px, 2.1vw, 22px); }
.status { display: inline-flex; align-items: center; gap: 6px; color: #5f6878; font-size: 12px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #35ad76; box-shadow: 0 0 0 3px #e6f6ee; }
.account-card > .account-signout { flex: 0 0 auto; margin-top: 0; padding: 9px 14px; border: 1px solid #ddd9e4; border-radius: 9px; background: #fff; color: #51596a; font-size: 13px; font-weight: 650; cursor: pointer; }
.account-card > .account-signout:hover { border-color: #cbbaf4; background: #f8f5ff; color: #5c2acb; }
.account-signout:focus-visible, .handoff-actions a:focus-visible { outline: 3px solid rgba(113, 56, 244, .25); outline-offset: 3px; }
.card p { font-size: 14px; }
.button, .card > button, .form button, .copy-row button { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 13px; border: 1px solid transparent; border-radius: 9px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover, .card > button:hover, .form button:hover, .copy-row button:hover { filter: brightness(.96); }
.secondary { border-color: #e5dcfa; background: var(--accent-soft); color: #6429dd; }
.handoff-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 24px; border-color: #e5dcfa; background: linear-gradient(115deg, #f6f1ff 0%, #fcfaff 60%, #fff 100%); box-shadow: none; }
.handoff-symbol { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #e9ddff; color: #7138f4; font-size: 21px; font-weight: 750; }
.handoff-card.is-verified .handoff-symbol { background: #e0f5e9; color: #198459; }
.handoff-copy { min-width: 0; }
.handoff-copy .label { margin-bottom: 4px; }
.handoff-copy h2 { margin-bottom: 0; font-size: 19px; }
.handoff-copy p { margin-top: 5px; font-size: 13px; }
.handoff-actions { display: grid; justify-items: center; gap: 8px; }
.handoff-actions .button { margin-top: 0; }
.handoff-download { color: #66548a; font-size: 12px; font-weight: 600; text-decoration: none; }
.handoff-download:hover { color: var(--accent); text-decoration: underline; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.form label { display: grid; gap: 7px; color: #51596a; font-size: 13px; }
.form input, .form select, .copy-row input { width: 100%; padding: 11px 12px; border: 1px solid #dcd8d2; border-radius: 9px; background: #fff; }
.form button { align-self: end; }
.purchase-actions { display: grid; grid-column: 1 / -1; justify-items: start; gap: 8px; margin-top: 2px; }
.purchase-actions button { min-width: 176px; margin-top: 0; }
.purchase-actions span { color: #7a8190; font-size: 12px; line-height: 1.4; }
.purchase-feedback { display: grid; gap: 4px; margin-top: 18px; padding: 14px 15px; border: 1px solid #cce9d9; border-radius: 11px; background: #f0faf4; color: #246a47; }
.purchase-feedback.error { border-color: #f1c7c3; background: #fff5f4; color: #a33a34; }
.purchase-feedback strong { font-size: 13px; }
.purchase-feedback span { font-size: 13px; line-height: 1.45; }
.activity { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.activity li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid #ece9e4; }
.activity li span:last-child { color: #72798a; font-size: 13px; }
.copy-row { display: flex; gap: 8px; margin-top: 16px; }
.copy-row button { margin-top: 0; }
.state { margin-top: 22vh; text-align: center; }
.state-auth { width: min(100%, 460px); margin: clamp(0px, 3vh, 28px) auto 0; padding: 42px 44px 38px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .88); box-shadow: 0 20px 50px rgba(25, 22, 18, .07); }
main:has(> .state-auth) { padding-top: 32px; }
.handoff-card + .state-auth { margin-top: 24px; }
.state-mark { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 14px; background: var(--accent-soft); }
.state-mark img { width: 30px; height: 30px; }
.state-auth .label { margin-bottom: 10px; }
.state-auth h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; line-height: 1.12; }
.state-auth > p { margin: 12px auto 0; max-width: 330px; font-size: 14px; }
.auth-form { display: grid; gap: 14px; margin-top: 28px; text-align: left; }
.auth-submit:disabled { cursor: wait; opacity: .72; }
.auth-feedback { display: grid; gap: 3px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.auth-feedback strong { font-size: 14px; }
.auth-feedback.success, .auth-feedback.sending { color: #24613d; background: #edf8f0; }
.auth-feedback.error { color: #9a2f2f; background: #fff0f0; }
.auth-label { display: grid; gap: 8px; color: #51596a; font-size: 13px; font-weight: 650; }
.auth-label > span { color: #7a8291; font-size: 11px; font-weight: 400; }
.auth-input { width: 100%; padding: 12px 13px; border: 1px solid #dcd8d2; border-radius: 10px; outline: 0; background: #fff; color: #171b27; transition: border-color .15s ease, box-shadow .15s ease; }
.auth-input::placeholder { color: #a0a6b1; }
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(113, 56, 244, .13); }
.auth-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 4px; padding: 11px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.auth-submit:hover { background: #6429dd; transform: translateY(-1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(113, 56, 244, .22); outline-offset: 2px; }
@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app:has(.state-auth) > aside { display: none; }
  aside { position: sticky; top: 0; z-index: 2; min-width: 0; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand, .device-note { display: none; }
  nav { display: flex; gap: 6px; margin: 0 -14px; padding: 0 14px 4px; overflow-x: auto; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  nav button { flex: 0 0 auto; min-height: 42px; padding: 8px 7px; text-align: center; white-space: nowrap; }
  nav button strong { font-size: 12px; }
  nav button > span { width: 100%; }
  nav button small, nav button i { display: none; }
  main { width: min(100% - 32px, 760px); padding: 34px 0 48px; }
  .account-page { width: min(100% - 32px, 800px); }
  .page-header { padding-bottom: 22px; }
  .page-header h1 { font-size: 32px; }
  .form { grid-template-columns: 1fr; }
  .state-auth { margin-top: 0; padding: 32px 22px 28px; }
  .handoff-card { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .handoff-actions { grid-column: 1 / -1; justify-items: stretch; margin-top: 4px; }
  .handoff-actions .button { justify-content: center; }
  .handoff-download { text-align: center; }
  .account-card { align-items: flex-start; flex-direction: column; gap: 18px; padding: 20px; }
  .account-identity { gap: 12px; }
  .account-identity .avatar { width: 48px; height: 48px; flex-basis: 48px; }
  .identity-copy h2 { font-size: 16px; }
  .account-signout { align-self: flex-start; }
}

.support-form { grid-template-columns: minmax(0, 1fr); }
.support-form textarea { width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; line-height: 1.5; background: #fff; color: inherit; }
.support-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.support-form > button { justify-self: start; }
.support-attachments { display: grid; justify-items: start; gap: 10px; }
.support-attachments small { color: var(--muted); }
.support-attachments ul { display: grid; gap: 8px; width: 100%; padding: 0; margin: 0; list-style: none; }
.support-attachments li { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.support-attachments li span { min-width: 0; overflow-wrap: anywhere; }
.support-attachments button { margin-top: 0; }
.support-form .secondary { border-color: var(--line); background: var(--accent-soft); color: var(--accent); }

.publishing-list { list-style: none; padding: 0; margin: 24px 0 0; }
.publishing-list > li { padding: 20px 0; border-top: 1px solid var(--line); }
.publishing-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.publishing-heading h3 { margin: 6px 0 0; }
.publishing-note { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) { .publishing-heading { align-items: flex-start; flex-direction: column; gap: 10px; } }

.agent-admin-detail { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border, #e2e5eb); overflow-wrap: anywhere; }
.agent-admin-detail dd { margin: 0 0 12px; }
.agent-admin-text { white-space: pre-wrap; overflow-wrap: anywhere; }
