* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #14161a;
  color: #eee;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px max(20px, calc((100% - 960px) / 2));
  background: #1d2026;
  border-bottom: 1px solid #2f3741;
}
a {
  color: #7dd3fc;
}
a:hover {
  color: #bae6fd;
}
.brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.headerActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.headerActions a {
  white-space: nowrap;
}
.headerActions .headerBackLink {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #3c5264;
  border-radius: 8px;
  background: transparent;
  color: #c4ced9;
  font-weight: 700;
  text-decoration: none;
}
.headerActions .headerBackLink:hover {
  border-color: #526c82;
  background: #24313d;
  color: #fff;
}
.headerActions .accountLink {
  margin-top: 0;
  padding: 7px 10px;
  white-space: nowrap;
}
.headerActions #accountLogout[hidden],
.headerActions #accountLogin[hidden] {
  display: none;
}
main {
  width: min(840px, calc(100% - 32px));
  margin: 48px auto;
}
.hero {
  padding: 32px;
  border: 1px solid #2f3741;
  border-radius: 18px;
  background: linear-gradient(135deg, #1d2026, #182534);
}
.eyebrow {
  color: #7dd3fc;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, calc(6vw * var(--accessibility-scale, 1)), 3rem);
  line-height: 1.1;
}
.lead {
  max-width: 680px;
  margin: 0;
  color: #c4ced9;
  font-size: 1.125rem;
}
.accountJoined {
  margin: 8px 0 0;
  color: #9fb3c5;
  font-size: 0.875rem;
  font-weight: 700;
}
section {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid #2f3741;
  border-radius: 14px;
  background: #1d2026;
}
h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}
h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}
p {
  color: #c4ced9;
}
section p:last-child,
section ul:last-child {
  margin-bottom: 0;
}
.playedMatchesSummary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 420px;
}
.playedMatchesType {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 96px;
  padding: 14px 18px;
  border: 1px solid #344957;
  border-radius: 12px;
  background: #111c24;
  text-align: center;
}
.playedMatchesType strong {
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}
.playedMatchesType span {
  color: #c4ced9;
  line-height: 1.2;
}
.recordPills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.recordPill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #344957;
  border-radius: 12px;
  background: #111c24;
  text-align: center;
}
.recordPill strong {
  font-size: 1.5rem;
  line-height: 1.1;
}
.recordPill span {
  color: #c4ced9;
  font-size: 0.8125rem;
  font-weight: 700;
}
.recordWin strong {
  color: #86efac;
}
.recordDraw strong {
  color: #fde68a;
}
.recordLoss strong {
  color: #fca5a5;
}
.privacyReminder {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #7dd3fc;
  border-radius: 6px;
  background: #111c24;
  color: #c4ced9;
  font-size: 0.875rem;
}
.privacyActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.privacyActions .accountLink {
  margin: 0;
  border: 1px solid #526c82;
  cursor: pointer;
  font: inherit;
}
.privacyData {
  max-height: 420px;
  margin-top: 16px;
  overflow: auto;
  padding: 16px;
  border: 1px solid #344957;
  border-radius: 10px;
  background: #111c24;
  color: #c4ced9;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.dangerButton {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #991b1b;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.dangerButton:hover {
  background: #b91c1c;
}
.dangerButton:disabled {
  cursor: wait;
  opacity: 0.65;
}
.emptyMatchState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  margin: 16px 0;
  padding: 24px;
  border: 1px dashed #526c82;
  border-radius: 12px;
  background: rgba(17, 28, 36, 0.55);
  text-align: center;
}
.emptyMatchState p {
  margin: 0;
  color: #c4ced9;
  font-weight: 700;
}
.emptyMatchIcon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #526c82;
  border-radius: 50%;
  background: #182531;
  color: #7dd3fc;
  font-size: 1.25rem;
}
.accountHistory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.accountHistory li {
  padding: 14px;
  border: 1px solid #344957;
  border-radius: 10px;
  background: #111c24;
}
.accountHistory p {
  margin: 4px 0 10px;
}
.friendSearchForm {
  display: grid;
  gap: 8px;
  max-width: 520px;
}
.friendSearchRow {
  display: flex;
  gap: 10px;
}
.friendSearchRow input {
  min-width: 0;
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #526c82;
  border-radius: 8px;
  background: #111c24;
  color: #fff;
}
.friendSearchRow .accountLink {
  margin: 0;
  background: #1d3a4d;
  cursor: pointer;
  font: inherit;
}
.ownFriendIdBlock {
  max-width: 520px;
  padding: 12px;
  border: 1px dashed #526c82;
  border-radius: 10px;
  background: #0d171f;
}
.ownFriendIdHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ownFriendIdHeading label {
  color: #c4ced9;
  font-weight: 800;
}
.readOnlyBadge {
  padding: 3px 8px;
  border: 1px solid #526c82;
  border-radius: 999px;
  background: #263746;
  color: #d8e2ea;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}
.ownFriendIdRow {
  display: flex;
  gap: 10px;
}
.ownFriendIdField {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #526c82;
  border-radius: 8px;
  background: #1b2934;
  color: #94a3b8;
}
.ownFriendId {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: default;
}
.ownFriendIdRow .accountLink {
  margin: 0;
  white-space: nowrap;
}
.inviteLinkPill {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  margin-top: 10px;
  border: 1px solid #526c82;
  border-radius: 999px;
  background: #1b2934;
  overflow: hidden;
}
.inviteLinkPill[hidden] {
  display: none;
}
.inviteLinkPill input {
  min-width: 0;
  flex: 1;
  padding: 9px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  cursor: default;
}
.inviteLinkCopy {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 0;
  border-left: 1px solid #526c82;
  background: #304957;
  color: #fff;
  cursor: pointer;
}
.inviteLinkCopy:hover {
  background: #3c6073;
}
.inviteLinkCopy svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.friendList {
  list-style: none;
  margin: 12px 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.friendList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #344957;
  border-radius: 8px;
  background: #111c24;
}
.friendActions {
  display: flex;
  gap: 8px;
}
.friendIdentity {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.friendIdentity strong {
  color: #f8fafc;
}
.friendId {
  color: #aebfd0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}
.friendActions button {
  padding: 7px 10px;
  border: 1px solid #526c82;
  border-radius: 7px;
  background: #1d3a4d;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.accountLink {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid #3c5264;
  border-radius: 8px;
  background: #304957;
  color: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
ul {
  padding-left: 22px;
  color: #c4ced9;
}
li + li {
  margin-top: 8px;
}
.roadmap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.roadmap article {
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 10px;
  background: #12171d;
}

.roadmap p {
  margin: 6px 0 0;
  font-size: 0.875rem;
}
.status {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #377450;
  color: #bafddb;
  font-size: 0.75rem;
  font-weight: 600;
}
.next {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #26364a;
  color: #bae6fd;
  font-size: 0.75rem;
  font-weight: 600;
}
.callout {
  padding: 16px;
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  background: #12171d;
}
.callout p {
  margin: 0;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
footer {
  padding: 0 16px 36px;
  color: #8ca0b8;
  text-align: center;
  font-size: 0.875rem;
}
@media (max-width: 520px) {
  .ownFriendIdRow {
    align-items: stretch;
  }
  .ownFriendIdField {
    min-width: 0;
  }
  header {
    align-items: flex-start;
    padding: 12px 16px;
  }
  .headerActions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .headerActions .accountLink {
    max-width: 190px;
  }
  .playedMatchesSummary {
    max-width: none;
  }
  .recordPills {
    gap: 6px;
  }
  .recordPill {
    padding: 10px 6px;
  }
  main {
    margin: 24px auto;
  }
  .hero,
  section {
    padding: 20px;
  }
}
