/* ==========================================================================
   Account, sign-in and not-found pages: a header and one content column,
   both on the same width and gutter so their left edges line up.
   Uses only the tokens defined in styles.css.
   ========================================================================== */

.frame { width:100%; max-width:calc(var(--content-max) + var(--gutter) * 2); margin:0 auto; padding:0 var(--gutter); }
.account-footer { padding-top:var(--s-5); padding-bottom:var(--s-6); }
.account-footer .legal-notice { margin-top:0; color:var(--muted); border-top-color:var(--rule); }
.account-footer .legal-notice a:hover { color:var(--ink); }

.account-header { position:sticky; top:0; z-index:20; border-bottom:1px solid var(--rule); background:var(--paper); }
.account-header .frame { display:flex; align-items:center; justify-content:space-between; gap:var(--s-4); height:var(--header-h); }
.account-header .frame > a:not(.brand) { font-size:var(--text-ui); font-weight:500; }

.account-layout {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,420px); gap:var(--s-8);
  padding-top:var(--s-8); padding-bottom:var(--s-8);
}
.account-intro { display:flex; flex-direction:column; border-top:1px solid var(--rule); padding-top:var(--s-4); }
.account-hero { flex:1; }
.account-intro h1 { font-size:var(--text-h1); }
.account-lede { color:var(--ink-2); font-size:var(--text-lede); line-height:1.6; max-width:42ch; margin:var(--s-4) 0 var(--s-6); }
.account-intro > p { color:var(--muted); font-size:var(--text-small-body); max-width:52ch; margin:0; }
.account-intro .account-note { padding-top:var(--s-4); border-top:1px solid var(--rule); }
.account-steam-link { display:inline-block; margin-top:var(--s-3); font-size:var(--text-ui); font-weight:500; }
/* The sign-in column is a form, so it sits on a surface. */
.account-form {
  min-width:0; align-self:start; padding:var(--s-6);
  background:var(--surface); border:1px solid var(--rule-strong); border-radius:var(--radius);
}
.account-form h2 { font-size:var(--text-h2); margin-bottom:var(--s-3); }
.account-form p { color:var(--ink-2); font-size:var(--text-small-body); }
.account-form p + p { margin-top:var(--s-3); }
.account-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-2) var(--s-4); margin:var(--s-5) 0; }
.account-actions > a:not(.button) { font-size:var(--text-ui); font-weight:500; }
.account-form .account-status { margin:0 0 var(--s-4); color:var(--muted); }
.account-form .account-status:empty { display:none; }
.account-form label { display:flex; gap:var(--s-2); align-items:flex-start; font-size:var(--text-ui); margin-top:var(--s-4); }
#link-context { margin-bottom:var(--s-5); }
#link-context .button { margin-top:var(--s-4); }
#clerk-sign-in { max-width:100%; }
/* Sub-sections of the form are separated by rules, not nested boxes. */
.account-steam, .account-psn { margin:var(--s-5) 0 0; padding-top:var(--s-4); border-top:1px solid var(--rule); }
.account-steam h3, .account-psn h3 { font-size:var(--text-body); line-height:22px; font-weight:700; margin-bottom:var(--s-2); }
.account-steam p { margin-bottom:var(--s-4); }
.account-psn .account-status { margin:var(--s-3) 0 0; color:var(--ink); }
.account-psn form { margin-top:var(--s-4); }
.account-form .account-psn label { display:block; margin:0 0 var(--s-2); color:var(--ink); font-weight:500; }
.account-psn input {
  width:100%; max-width:24ch; height:var(--control-h); padding:0 var(--s-3);
  font:inherit; color:var(--ink); background:var(--paper); border:1px solid var(--rule-strong); border-radius:var(--radius);
}
.account-psn input:focus-visible { outline:none; border-color:var(--accent); }
.account-psn .helper { margin:var(--s-2) 0 var(--s-3); }
.psn-code-row { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-3); margin:var(--s-3) 0; }
.psn-code {
  font-size:var(--text-lede); font-weight:800; letter-spacing:0.06em; color:var(--accent);
  padding:var(--s-2) var(--s-3); background:var(--paper); border:1px solid var(--rule-strong); border-radius:var(--radius);
  user-select:all; overflow-wrap:anywhere;
}

/* Not found: a label, a title, one sentence, one way back. */
.plain-page { padding-top:var(--s-8); padding-bottom:var(--s-8); }
.not-found-content { max-width:640px; border-top:1px solid var(--rule); padding-top:var(--s-4); }
.plain-page h1.not-found-title { margin-top:var(--s-3); font-size:var(--text-display); }
.plain-page p:not(.micro) { color:var(--ink-2); font-size:var(--text-body); max-width:48ch; margin:var(--s-3) 0 var(--s-6); }

@media (max-width:760px) {
  :root { --gutter:16px; }
  .account-layout { grid-template-columns:minmax(0,1fr); gap:var(--s-6); padding-top:var(--s-6); padding-bottom:var(--s-6); }
  .account-intro h1 { font-size:40px; }
  .account-lede { font-size:var(--text-body); }
  .account-form { padding:var(--s-5); }
  .plain-page { padding-top:var(--s-6); padding-bottom:var(--s-6); }
  .plain-page h1.not-found-title { font-size:56px; }
}
@media (pointer:coarse) { .account-header .frame > a:not(.brand) { min-height:44px; display:inline-flex; align-items:center; } }

/* Profile and blocked players, under the other account sections. */
.account-profile textarea {
  display:block; width:100%; padding:var(--s-2) var(--s-3); resize:vertical;
  font:inherit; color:var(--ink); background:var(--paper); border:1px solid var(--rule-strong); border-radius:var(--radius);
}
.account-profile textarea:focus-visible { outline:none; border-color:var(--accent); }
.account-profile .select { margin-bottom:var(--s-2); }
.account-profile h3 + .helper { margin-top:0; }
.account-profile form + h3, .account-profile .blocked-list ~ h3 { margin-top:var(--s-5); padding-top:var(--s-4); border-top:1px solid var(--rule); }
.blocked-list { list-style:none; margin:var(--s-3) 0; padding:0; }
.blocked-list li { display:flex; align-items:center; justify-content:space-between; gap:var(--s-3); padding:var(--s-2) 0; border-bottom:1px solid var(--rule); font-size:var(--text-ui); }
.blocked-list li.helper { display:block; border-bottom:0; }
.request-actions { display:flex; align-items:center; gap:var(--s-3); }

/* The @ sits inside the field, like a prefix. */
.handle-field { display:flex; align-items:center; border:1px solid var(--rule); border-radius:var(--radius); background:var(--paper-2); }
.handle-field > span { padding:0 0 0 var(--s-3); color:var(--muted); font-weight:700; }
.handle-field input { flex:1; min-width:0; border:0; background:none; }
.favorite-slots { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:var(--s-2) var(--s-3); max-width:480px; }
.favorite-slots select { width:100%; }
.profile-images { padding:var(--s-4); margin:var(--s-4) 0; border:1px solid var(--rule); min-width:0; }
.profile-images legend { font-weight:700; }
.image-preview { display:block; object-fit:cover; margin:var(--s-3) 0; max-width:100%; }
.avatar-preview { width:100px; height:100px; border-radius:50%; }
.cover-preview { width:100%; aspect-ratio:3/1; }
.profile-images input[type=file] { width:100%; max-width:100%; font-size:13px; }
