/* Pals Post Accounts — scoped styles. Self-contained: duplicates the .pp-scope
   token block from palspost-decks so these pages never depend on it loading. */

.pp-scope {
  --pp-bg: #faf9f7; --pp-surface: #ffffff; --pp-surface2: #f1efeb; --pp-border: #e2dfd8;
  --pp-ink: #1c1e22; --pp-muted: #5c6069; --pp-faint: #8b8f97;
  --pp-accent: #0b8d80; --pp-accent-hi: #0aa393; --pp-on-accent: #ffffff;
  --pp-tcg: #8a6d00; --pp-good: #217a4b; --pp-bad: #b3323e;
  --pp-shadow: 0 1px 2px rgba(28,30,34,.05), 0 4px 16px rgba(28,30,34,.06);
  color: var(--pp-ink);
  font-size: 14px; line-height: 1.6;
}
.s-dark .pp-scope {
  --pp-bg: #0f1114; --pp-surface: #16191e; --pp-surface2: #1d2127; --pp-border: #262b33;
  --pp-ink: #edeae0; --pp-muted: #8f929c; --pp-faint: #676c76;
  --pp-accent: #12d6c2; --pp-accent-hi: #3ee2d0; --pp-on-accent: #06211e;
  --pp-tcg: #ffd429; --pp-good: #3ef08c; --pp-bad: #ff6e7c;
  --pp-shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}
.pp-scope *, .pp-scope *::before, .pp-scope *::after { box-sizing: border-box; }
.pp-scope button { font: inherit; cursor: pointer; }
.pp-eyebrow {
  font-family: Consolas, "Cascadia Code", ui-monospace, monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .17em; color: var(--pp-muted);
}

/* buttons (mirrors decks plugin; every hover sets explicit background — SmartMag bleed rule) */
.pp-btn, .pp-scope a.pp-btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px; border: none;
  background: var(--pp-accent); color: var(--pp-on-accent); font-size: 13px; font-weight: 700;
  text-decoration: none; text-align: center; transition: background .15s;
}
.pp-btn:hover { background: var(--pp-accent-hi); color: var(--pp-on-accent); }
.pp-btn-ghost, .pp-scope a.pp-btn-ghost { background: var(--pp-surface); color: var(--pp-muted); border: 1px solid var(--pp-border); }
.pp-btn-ghost:hover { color: var(--pp-ink); border-color: var(--pp-faint); background: var(--pp-surface); }
.pp-btn-wide { display: block; width: 100%; }
.pp-btn-sm { padding: 4px 10px; font-size: 12px; }
.pp-btn-discord, .pp-scope a.pp-btn-discord { background: #5865f2; color: #fff; }
.pp-btn-discord:hover { background: #4752c4; color: #fff; }

/* ── auth card (/login) ── */
.pp-auth-wrap { display: flex; justify-content: center; margin: 30px 0 60px; }
.pp-auth-card {
  width: 100%; max-width: 420px; background: var(--pp-surface); border: 1px solid var(--pp-border);
  border-radius: 14px; box-shadow: var(--pp-shadow); padding: 26px 28px 20px;
}
.pp-auth-h { font-size: 18px; font-weight: 800; margin: 8px 0 14px; color: var(--pp-ink); }
.pp-pane { display: none; }
[data-pane-scope][data-pane="signin"]   .pp-pane[data-pane="signin"],
[data-pane-scope][data-pane="register"] .pp-pane[data-pane="register"],
[data-pane-scope][data-pane="lost"]     .pp-pane[data-pane="lost"],
[data-pane-scope][data-pane="reset"]    .pp-pane[data-pane="reset"] { display: block; }

/* ── header trigger ── */
.pp-acct { position: relative; display: flex; align-items: center; margin-left: 12px; }
.pp-acct .pp-signin-link, .smart-head .pp-acct a.pp-signin-link {
  display: inline-block; padding: 6px 13px; border-radius: 999px;
  background: var(--pp-accent); color: var(--pp-on-accent); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-decoration: none; transition: background .15s;
}
.pp-acct .pp-signin-link:hover { background: var(--pp-accent-hi); color: var(--pp-on-accent); }
/* Pin the box square: SmartMag gives bare <button> a fixed height, which made
   the 50% radius render as an ellipse (hover ring came out oval). */
.pp-acct-chip, .smart-head .pp-acct-chip {
  border: none; background: transparent; padding: 0; border-radius: 50%;
  line-height: 0; display: block; flex: none;
  width: 28px; height: 28px; min-width: 28px; min-height: 28px;
}
.pp-acct-chip:hover { background: transparent; box-shadow: 0 0 0 2px var(--pp-accent); }
.pp-acct-chip img { border-radius: 50%; width: 28px; height: 28px; object-fit: cover; display: block; }
.pp-acct-menu[hidden] { display: none; } /* author display:flex beats the UA [hidden] rule */
.pp-acct-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 170px; z-index: 100001;
  background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 10px;
  box-shadow: var(--pp-shadow); padding: 6px; display: flex; flex-direction: column;
}
.pp-acct-menu-name { font-size: 12px; font-weight: 800; color: var(--pp-faint); padding: 7px 10px 5px; border-bottom: 1px solid var(--pp-border); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-acct-menu a, .smart-head .pp-acct-menu a { display: block; padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--pp-ink); text-decoration: none; }
.pp-acct-menu a:hover { background: var(--pp-surface2); color: var(--pp-ink); }
.pp-acct-menu .pp-acct-logout {
  text-align: left; border: none; background: transparent; padding: 7px 10px; border-radius: 7px;
  font-size: 13px; color: var(--pp-bad);
}
.pp-acct-menu .pp-acct-logout:hover { background: var(--pp-surface2); color: var(--pp-bad); }
.pp-field { display: block; margin: 0 0 12px; }
.pp-field span { display: block; font-size: 12px; font-weight: 700; color: var(--pp-muted); margin-bottom: 4px; }
.pp-field i { font-style: normal; font-weight: 400; color: var(--pp-faint); }
.pp-input {
  width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--pp-border);
  background: var(--pp-bg); color: var(--pp-ink); font-size: 14px;
}
.pp-input:focus { outline: none; border-color: var(--pp-accent); }
textarea.pp-input { resize: vertical; }
.pp-file { padding: 7px; font-size: 12px; }
.pp-check { display: flex; gap: 7px; align-items: center; font-size: 13px; color: var(--pp-muted); margin: 0 0 12px; }
.pp-form-err { color: var(--pp-bad); font-size: 13px; margin: 0 0 10px; }
.pp-form-ok { color: var(--pp-good); font-size: 13px; margin: 0 0 10px; }
.pp-pane-links { font-size: 13px; margin: 14px 0 0; color: var(--pp-faint); text-align: center; }
.pp-scope .pp-pane-links a { color: var(--pp-muted); }
.pp-scope .pp-pane-links a:hover { color: var(--pp-accent); }
.pp-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--pp-faint); font-size: 11px; }
.pp-divider::before, .pp-divider::after { content: ""; flex: 1; height: 1px; background: var(--pp-border); }
.pp-auth-foot { font-size: 12px; color: var(--pp-faint); text-align: center; margin: 18px 0 0; }

/* ── /account ── */
.pp-account { max-width: 620px; margin: 20px auto 60px; }
.pp-acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pp-acct-avatar { border-radius: 50%; width: 72px; height: 72px; object-fit: cover; background: var(--pp-surface2); }
.pp-acct-head > div { flex: 1; }
.pp-acct-name { font-size: 18px; font-weight: 800; }
.pp-acct-handle { font-size: 13px; color: var(--pp-faint); }
.pp-card {
  background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 12px;
  box-shadow: var(--pp-shadow); padding: 16px 18px; margin-bottom: 14px;
}
.pp-card-h { font-size: 15.5px; font-weight: 800; margin: 0 0 10px; color: var(--pp-ink); }
.pp-acct-line { font-size: 13px; color: var(--pp-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.pp-badge {
  font-family: Consolas, ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 999px; background: var(--pp-surface2); color: var(--pp-faint); border: 1px solid var(--pp-border);
}
.pp-badge-ok { color: var(--pp-good); border-color: var(--pp-good); background: transparent; }
.pp-hint-inline { font-size: 12px; color: var(--pp-faint); }

/* ── split auth landing (/login) ── */
.pp-auth-split {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0;
  max-width: 940px; margin: 26px auto 60px;
  border: 1px solid var(--pp-border); border-radius: 16px; overflow: hidden;
  box-shadow: var(--pp-shadow); background: var(--pp-surface);
}
@media (max-width: 820px) { .pp-auth-split { grid-template-columns: 1fr; } }
.pp-auth-sell {
  padding: 30px 30px 26px; background: var(--pp-surface2);
  border-right: 1px solid var(--pp-border);
}
@media (max-width: 820px) { .pp-auth-sell { border-right: none; border-bottom: 1px solid var(--pp-border); } }
.pp-sell-h { font-size: 18px; font-weight: 800; line-height: 1.35; margin: 8px 0 18px; color: var(--pp-ink); }
.pp-sell-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.pp-sell-list li { display: flex; gap: 11px; align-items: flex-start; }
.pp-sell-icon {
  flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--pp-accent) 14%, transparent); color: var(--pp-accent);
  font-size: 12px; font-weight: 700;
}
.pp-sell-list b { display: block; font-size: 13px; color: var(--pp-ink); }
.pp-sell-list span { display: block; font-size: 12px; color: var(--pp-muted); line-height: 1.5; }
.pp-sell-foot { margin: 20px 0 0; font-size: 11px; color: var(--pp-faint); }
.pp-auth-split .pp-auth-card { border: none; border-radius: 0; box-shadow: none; max-width: none; background: var(--pp-surface); }

/* ── identity hero (shared by /account and /u) ── */
.pp-hero {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 20px 22px; margin: 16px 0 0;
  background: var(--pp-surface); border: 1px solid var(--pp-border);
  border-radius: 14px 14px 0 0; box-shadow: var(--pp-shadow);
}
.pp-hero-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--pp-surface2); flex: none; }
.pp-hero-id { flex: 1; min-width: 190px; }
.pp-hero-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.pp-hero-handle { font-size: 12px; color: var(--pp-faint); margin-bottom: 11px; }
.pp-tiles { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-tile {
  min-width: 74px; padding: 7px 12px; border-radius: 10px;
  background: var(--pp-surface2); border: 1px solid var(--pp-border); text-align: center;
}
.pp-tile b { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; color: var(--pp-ink); }
.pp-tile span { font-family: Consolas, ui-monospace, monospace; font-size: 10px; letter-spacing: .12em; color: var(--pp-faint); }
.pp-tile-on b { color: var(--pp-good); }
.pp-hero-cta { margin-left: auto; }

/* ── account tabs ── */
.pp-tabs {
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 0 12px;
  background: var(--pp-surface); border: 1px solid var(--pp-border); border-top: none;
  border-radius: 0 0 14px 14px; margin-bottom: 18px; box-shadow: var(--pp-shadow);
}
.pp-tab {
  border: none; background: transparent; padding: 12px 13px; font-size: 13px; font-weight: 700;
  color: var(--pp-muted); border-bottom: 2px solid transparent; border-radius: 0;
}
.pp-tab:hover { background: var(--pp-surface2); color: var(--pp-ink); }
.pp-tab.pp-on { color: var(--pp-accent); border-bottom-color: var(--pp-accent); background: transparent; }
.pp-tabs-out { margin-left: auto; }
.pp-panel { display: none; }
.pp-account[data-tab="decks"]       .pp-panel[data-panel="decks"],
.pp-account[data-tab="profile"]     .pp-panel[data-panel="profile"],
.pp-account[data-tab="security"]    .pp-panel[data-panel="security"],
.pp-account[data-tab="connections"] .pp-panel[data-panel="connections"] { display: block; }
.pp-panel-foot { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.pp-card-sub { font-size: 12px; color: var(--pp-faint); margin: -4px 0 12px; }
.pp-empty { color: var(--pp-faint); font-size: 13px; padding: 22px; text-align: center;
  border: 1px dashed var(--pp-border); border-radius: 12px; }

/* ── public profile ── */
.pp-profile { max-width: 900px; margin: 0 auto 60px; }
.pp-profile .pp-hero { border-radius: 14px; }
.pp-profile-bio { font-size: 14px; color: var(--pp-muted); margin: 14px 2px 0; line-height: 1.6; }
.pp-section-h {
  display: flex; align-items: center; gap: 9px; margin: 24px 2px 12px;
  font-family: Consolas, ui-monospace, monospace; font-size: 10px; font-weight: 700;
  letter-spacing: .16em; color: var(--pp-muted);
}
.pp-section-h i { font-style: normal; color: var(--pp-faint); }
.pp-section-h::after { content: ""; flex: 1; height: 1px; background: var(--pp-border); }

.pp-account .pp-comm-grid, .pp-profile .pp-comm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
}
.pp-turnstile { margin: 0 0 12px; min-height: 65px; }
.pp-turnstile:empty { min-height: 0; }

.pp-notice {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; margin: 0 0 16px; border-radius: 12px; font-size: 13px;
  background: color-mix(in srgb, var(--pp-tcg) 12%, var(--pp-surface));
  border: 1px solid color-mix(in srgb, var(--pp-tcg) 40%, var(--pp-border));
  color: var(--pp-ink);
}
.pp-notice span { color: var(--pp-muted); }
.pp-notice .pp-btn { margin-left: auto; }
