/* play.stellarclient.net: "Your Stellar profile" (stellar_server/account_portal.py, served at /static/portal.css).
   The website's look (web/preview/css/site.css tokens), self-contained: fonts and images are the portal's own
   files under /static/. No inline styles anywhere: the pages run under style-src 'self' and no script. */

@font-face {
  font-family: "Chakra Petch";
  src: url("/static/fonts/chakra-petch-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/static/fonts/chakra-petch-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090c13;
  --bg-deep: #06080d;
  --surface: #10121c;
  --raised: #171a26;
  --hover: #201a32;
  --line: #202333;
  --line-strong: #34324a;
  --text: #f6f6fa;
  --muted: #bbc1dd;
  --dim: #9699b5;
  --accent: #9633ff;
  --accent-bright: #ac34ff;
  --accent-light: #c797ff;
  --btn-a: #9140ff;
  --btn-b: #7827fb;
  --focus: #dbc0ff;
  --discord: #5865f2;
  --ok: #19d785;
  --bad: #ff6b86;
  --font-display: "Chakra Petch", "Bahnschrift", "Arial Narrow", system-ui, sans-serif;
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 32px);
  --glow: 0 18px 50px -18px rgba(150, 51, 255, .65);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(1100px 520px at 50% -180px, rgba(150, 51, 255, .20), transparent 70%);
  background-repeat: no-repeat;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-light); text-underline-offset: 3px; }
a:hover { color: #e2cbff; }
b, strong { color: var(--text); font-weight: 650; }
h1, h2 { color: var(--text); margin: 0; line-height: 1.1; font-family: var(--font-display); font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- header / footer ---------- */
.bar { border-bottom: 1px solid var(--line); background: rgba(6, 8, 13, .72); }
.bar-in, .foot-in, .wrap { width: 100%; max-width: calc(980px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; flex: none; border-radius: 8px; }
.brand img { width: 132px; height: auto; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who form { margin: 0; flex: none; }
.who-name { font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.who-name b { color: var(--text); font-weight: 600; }
.wrap { flex: 1; padding-top: clamp(28px, 6vw, 56px); padding-bottom: 48px; }
.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 11px 22px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: #fff;
  font: 650 16px/1.2 var(--font-ui); text-decoration: none; cursor: pointer;
  box-shadow: var(--glow);
}
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost {
  min-height: 38px; padding: 8px 14px; font-size: 14px; background: transparent; color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn-ghost:hover { background: var(--hover); }
.btn-discord { background: var(--discord); box-shadow: 0 18px 50px -20px rgba(88, 101, 242, .8); min-height: 52px; padding: 13px 26px; font-size: 17px; }
.ico { width: 22px; height: 22px; flex: none; }

/* ---------- small text ---------- */
.eyebrow {
  margin: 0 0 10px; color: var(--accent-light); font: 600 12px/1.2 var(--font-display);
  letter-spacing: .28em; text-transform: uppercase;
}
.lead { font-size: 17px; color: var(--muted); max-width: 46ch; }
.fine { font-size: 14px; color: var(--dim); margin: 14px 0 0; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(23, 26, 38, .92), rgba(16, 18, 28, .96));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 30px);
}

/* ---------- sign-in ---------- */
.signin { position: relative; max-width: 620px; margin: 0 auto; padding-top: clamp(40px, 9vw, 96px); }
.signin-art {
  position: absolute; inset: 0 -12% auto; height: 220px; overflow: hidden; border-radius: var(--radius);
  opacity: .55;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.signin-art img { width: 100%; height: 100%; object-fit: cover; }
.signin-card { position: relative; text-align: center; padding-top: 34px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.signin-card h1 { font-size: clamp(32px, 6vw, 44px); margin-bottom: 14px; }
.signin-card .lead { margin-inline: auto; }
.signin-card .fine { max-width: 40ch; margin-inline: auto; }
.signin-star { width: 84px; margin: 0 auto 16px; filter: drop-shadow(0 10px 26px rgba(150, 51, 255, .55)); }
.signin-form { margin: 26px 0 0; }

/* ---------- messages ---------- */
.message { max-width: 560px; margin: clamp(20px, 6vw, 60px) auto 0; }
.message h1 { font-size: clamp(26px, 5vw, 34px); margin-bottom: 14px; }
.actions { margin: 22px 0 0; }

/* ---------- profile page ---------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 10px; }
.page-head .lead { margin: 0; }

.plate {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-strong);
  aspect-ratio: 4 / 1; min-height: 120px; background: var(--raised); box-shadow: var(--glow);
}
.plate-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plate::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 8, 13, .88) 0%, rgba(6, 8, 13, .55) 45%, rgba(6, 8, 13, .05) 100%);
}
.plate-text { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(18px, 4vw, 34px); }
.plate-name {
  margin: 0; color: var(--text); font: 700 clamp(26px, 5.4vw, 46px)/1.05 var(--font-display);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plate-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; color: var(--text); font-size: 14px; }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-weight: 650; font-size: 12px; letter-spacing: .04em; }
.pill-public { background: rgba(25, 215, 133, .16); color: var(--ok); border: 1px solid rgba(25, 215, 133, .35); }
.pill-hidden { background: rgba(255, 107, 134, .14); color: var(--bad); border: 1px solid rgba(255, 107, 134, .35); }

.notice { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.notice-ok { background: rgba(25, 215, 133, .12); border: 1px solid rgba(25, 215, 133, .35); color: #b6f5d8; }
.notice-bad { background: rgba(255, 107, 134, .12); border: 1px solid rgba(255, 107, 134, .35); color: #ffd0d9; }

.settings { margin-top: 22px; display: grid; gap: 16px; }
.set-head { margin-bottom: 16px; }
.set-head h2 { font-size: 22px; margin-bottom: 6px; }
.set-head p { margin: 0; color: var(--dim); font-size: 14px; }
.empty { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(150, 51, 255, .08); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 15px; }

/* toggle (a real checkbox, drawn) */
.toggle { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.toggle + .toggle { margin-top: 18px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui {
  position: relative; flex: none; width: 48px; height: 28px; margin-top: 2px; border-radius: 999px;
  background: var(--line-strong); transition: background-color .15s;
}
.toggle-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .15s;
}
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--focus); outline-offset: 3px; }
.toggle-text { display: grid; gap: 3px; }
.toggle-text b { font-size: 16px; }
.toggle-text small { color: var(--dim); font-size: 14px; }

/* radio options */
.options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.options.two { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.option { position: relative; cursor: pointer; display: block; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-ui {
  display: grid; gap: 3px; height: 100%; padding: 14px 16px 14px 46px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); position: relative;
  transition: border-color .15s, background-color .15s;
}
.option-ui::before {
  content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--bg);
}
.option-ui b { font-size: 15px; font-weight: 650; }
.option-ui small { color: var(--dim); font-size: 13px; }
.option:hover .option-ui { background: var(--hover); }
.option input:checked + .option-ui { border-color: var(--accent); background: rgba(150, 51, 255, .12); }
.option input:checked + .option-ui::before { border-color: var(--accent-light); background: radial-gradient(circle, var(--accent-light) 0 4px, var(--bg) 5px); }
.option input:focus-visible + .option-ui { outline: 2px solid var(--focus); outline-offset: 3px; }

/* banner tiles */
.banners { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.banners:last-of-type { margin-bottom: 0; }
.banners legend { padding: 0; margin: 0 0 10px; color: var(--accent-light); font: 600 12px/1.2 var(--font-display); letter-spacing: .24em; text-transform: uppercase; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile { position: relative; display: block; cursor: pointer; border-radius: 10px; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile img {
  width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 10px;
  border: 2px solid transparent; outline: 1px solid var(--line); background: var(--raised);
  transition: border-color .15s, transform .15s;
}
.tile:hover img { transform: translateY(-1px); outline-color: var(--line-strong); }
.tile input:checked + img { border-color: var(--accent-light); outline: 2px solid var(--accent); outline-offset: 2px; }
.tile input:focus-visible + img { outline: 2px solid var(--focus); outline-offset: 3px; }

/* membership (Stellar / Stellar+) */
.member { margin-top: 22px; }
.plan { margin-bottom: 14px; }
.plan-label { margin: 0 0 4px; color: var(--dim); font-size: 13px; letter-spacing: .04em; }
.plan-name { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font: 700 26px/1.15 var(--font-display); }
.plan-meta { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.pill-free { background: rgba(150, 153, 181, .14); color: var(--muted); border: 1px solid var(--line-strong); }
.upsell { padding: 16px 18px; border-radius: var(--radius-sm); background: rgba(150, 51, 255, .08); border: 1px solid rgba(199, 151, 255, .22); }
.upsell-title { margin: 0 0 8px; color: var(--accent-light); font: 600 15px/1.2 var(--font-display); letter-spacing: .06em; }
.perks { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.perks li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; }
.perks li::before { content: ""; position: absolute; left: 0; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.manage { border-top: 1px solid var(--line); padding-top: 16px; }
.manage h3 { margin: 0 0 10px; color: var(--text); font: 600 16px/1.2 var(--font-ui); }
.manage-note { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.manage-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; }
.soon { color: var(--dim); font-size: 13px; padding: 3px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; }
.btn[disabled] { cursor: not-allowed; filter: grayscale(.45) brightness(.8); box-shadow: none; }
.btn-danger { background: linear-gradient(180deg, #ff5d7d, #e0335a); box-shadow: 0 18px 50px -20px rgba(255, 93, 125, .7); }
.btn-danger-ghost { background: transparent; color: #ffb3c2; border: 1px solid rgba(255, 107, 134, .45); box-shadow: none; min-height: 42px; }
.btn-danger-ghost:hover { background: rgba(255, 107, 134, .12); color: #ffd0d9; }
.confirm-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.confirm-actions form { margin: 0; }
.confirm-actions .btn-ghost { min-height: 46px; padding: 11px 20px; font-size: 16px; }

/* save bar: stays in view at the bottom while the form is on screen */
.savebar { position: sticky; bottom: 0; z-index: 5; padding: 14px 0 6px; background: linear-gradient(180deg, rgba(9, 12, 19, 0), var(--bg) 40%); }
.savebar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 14px 12px 18px; border-radius: var(--radius); background: var(--raised); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .9);
}
.savebar-in p { margin: 0; color: var(--dim); font-size: 14px; }

@media (max-width: 560px) {
  .who-name { display: none; }
  .brand img { width: 112px; }
  .plate { aspect-ratio: 3 / 1; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .savebar-in { padding: 10px; }
  .savebar-in p { display: none; }
  .savebar-in .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Stellar+ payments (stellar_server/stellar_plus_portal.py: /me/stellar-plus) ---------- */
.pay-step { margin-top: 16px; }
.member + .pay-step { margin-top: 16px; }
.set-head h2 .step {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 10px;
  border-radius: 50%; background: rgba(150, 51, 255, .18); border: 1px solid rgba(199, 151, 255, .4);
  color: var(--accent-light); font: 700 15px/1 var(--font-display); vertical-align: 3px;
}
.pay-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin: 0; }
.field { display: grid; gap: 6px; margin: 0; }
.field span { color: var(--text); font-size: 14px; font-weight: 600; }
.field input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-deep); border: 1px solid var(--line-strong); color: var(--text);
  font: 500 16px/1.3 var(--font-ui);
}
.field input::placeholder { color: var(--dim); opacity: 1; }
.field input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--accent); }
.pay-link { font-size: 14px; }
.pay-more { margin: 16px 0 0; }
.pay-other summary { cursor: pointer; color: var(--text); font-weight: 600; }
.pay-other[open] summary { margin-bottom: 16px; }
@media (max-width: 720px) {
  .pay-form { grid-template-columns: 1fr; }
  .pay-form .btn { width: 100%; }
}
