:root {
  --aa-ink: #11110f;
  --aa-paper: #f4f1e7;
  --aa-lime: #d9ff36;
  --aa-muted: #bbb7aa;
  --aa-danger: #ff7b62;
}

.aa-profile-overlay {
  align-items: center;
  background: rgba(10, 10, 8, .84);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1000;
}

.aa-profile-modal {
  background: var(--aa-paper);
  border: 2px solid var(--aa-lime);
  box-shadow: 12px 12px 0 var(--aa-lime);
  color: var(--aa-ink);
  max-height: min(720px, calc(100vh - 48px));
  overflow-y: auto;
  padding: 28px;
  width: min(680px, 100%);
}

.aa-profile-header { border-bottom: 2px solid var(--aa-ink); margin-bottom: 22px; }
.aa-profile-kicker { color: #5a5a51; font: 700 12px/1.2 sans-serif; letter-spacing: .12em; margin: 0 0 8px; text-transform: uppercase; }
.aa-profile-title { font: 800 clamp(28px, 5vw, 46px)/.98 Georgia, serif; letter-spacing: -.04em; margin: 0; }
.aa-profile-intro { font: 16px/1.5 sans-serif; margin: 14px 0 20px; max-width: 50ch; }

.aa-profile-form { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aa-profile-field { display: grid; gap: 7px; font: 700 14px/1.25 sans-serif; }
.aa-profile-label { letter-spacing: .02em; }
.aa-profile-error { background: #2e1612; color: #fff4eb; font: 700 14px/1.4 sans-serif; grid-column: 1 / -1; margin: 0; padding: 11px 12px; }
.aa-profile-control, .aa-profile-submit {
  border: 2px solid var(--aa-ink);
  border-radius: 0;
  box-sizing: border-box;
  font: 16px/1.2 sans-serif;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
.aa-profile-control { background: #fffdf5; color: var(--aa-ink); }
.aa-profile-control:focus { outline: 3px solid var(--aa-lime); outline-offset: 2px; }
.aa-profile-submit { background: var(--aa-lime); color: var(--aa-ink); cursor: pointer; font-weight: 800; grid-column: 1 / -1; text-transform: uppercase; }
.aa-profile-submit:hover, .aa-profile-submit:focus { background: var(--aa-ink); color: var(--aa-lime); }
.aa-profile-submit:disabled { cursor: wait; opacity: .7; }

.aa-match-board {
  background: var(--aa-paper);
  box-sizing: border-box;
  color: var(--aa-ink);
  margin: 0 auto;
  max-width: 1180px;
  overflow-x: hidden;
  padding: 28px;
  width: 100%;
}
.aa-match-header { align-items: end; border-bottom: 3px solid var(--aa-ink); display: flex; gap: 18px; justify-content: space-between; padding-bottom: 18px; }
.aa-match-heading { font: 800 clamp(32px, 5vw, 58px)/.92 Georgia, serif; letter-spacing: -.05em; margin: 0; }
.aa-match-header-actions, .aa-match-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.aa-match-layout { align-items: start; display: grid; gap: 24px; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .8fr); margin-top: 22px; }
.aa-match-list { display: grid; gap: 14px; }
.aa-match-card { background: #fffdf5; border: 2px solid var(--aa-ink); box-shadow: 5px 5px 0 var(--aa-ink); padding: 18px; }
.aa-match-card-top { align-items: center; display: flex; justify-content: space-between; }
.aa-match-kicker { color: #5a5a51; font: 800 11px/1.2 sans-serif; letter-spacing: .12em; margin: 0; text-transform: uppercase; }
.aa-match-slots { background: var(--aa-lime); border: 2px solid var(--aa-ink); font: 800 14px/1 sans-serif; padding: 7px 9px; }
.aa-match-team-title { font: 800 24px/1.05 Georgia, serif; margin: 16px 0; }
.aa-match-facts { display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.aa-match-fact { border-top: 1px solid #cbc7ba; padding: 9px 8px 9px 0; }
.aa-match-fact:nth-child(odd) { padding-right: 12px; }
.aa-match-fact dt { color: #69665d; font: 700 11px/1.2 sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.aa-match-fact dd { font: 700 15px/1.3 sans-serif; margin: 4px 0 0; overflow-wrap: anywhere; }
.aa-match-note { border-left: 4px solid var(--aa-lime); font: 14px/1.45 sans-serif; margin: 14px 0; overflow-wrap: anywhere; padding-left: 10px; }
.aa-match-actions { margin-top: 16px; }
.aa-match-owner { align-items: center; background: var(--aa-lime); border: 2px solid var(--aa-ink); display: inline-flex; font: 800 14px/1.1 sans-serif; min-height: 44px; padding: 10px 12px; }
.aa-match-action, .aa-match-submit {
  align-items: center;
  background: var(--aa-lime);
  border: 2px solid var(--aa-ink);
  border-radius: 0;
  box-sizing: border-box;
  color: var(--aa-ink);
  cursor: pointer;
  display: inline-flex;
  font: 800 14px/1.1 sans-serif;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  text-decoration: none;
}
.aa-match-action:hover, .aa-match-action:focus, .aa-match-submit:hover, .aa-match-submit:focus { background: var(--aa-ink); color: var(--aa-lime); }
.aa-match-action-secondary { background: #fffdf5; }
.aa-match-action-link { background: var(--aa-ink); color: var(--aa-lime); }
.aa-match-action:disabled, .aa-match-submit:disabled { cursor: wait; opacity: .65; }
.aa-match-form { background: var(--aa-ink); color: var(--aa-paper); display: grid; gap: 13px; padding: 20px; position: sticky; top: 16px; }
.aa-match-form-title { color: var(--aa-lime); font: 800 24px/1 Georgia, serif; margin: 0 0 4px; }
.aa-match-field { display: grid; gap: 6px; font: 700 13px/1.2 sans-serif; }
.aa-match-label { letter-spacing: .04em; }
.aa-match-control { background: #fffdf5; border: 2px solid var(--aa-paper); border-radius: 0; box-sizing: border-box; color: var(--aa-ink); font: 16px/1.2 sans-serif; min-height: 44px; padding: 10px; width: 100%; }
.aa-match-control:focus { outline: 3px solid var(--aa-lime); outline-offset: 2px; }
.aa-match-voice { align-items: center; display: flex; font: 700 14px/1.2 sans-serif; gap: 9px; min-height: 44px; }
.aa-match-check { accent-color: var(--aa-lime); height: 20px; width: 20px; }
.aa-match-submit { width: 100%; }
.aa-match-notice { border: 2px solid var(--aa-ink); font: 700 14px/1.4 sans-serif; margin: 18px 0 0; padding: 11px 13px; white-space: pre-line; }
.aa-match-notice-success { background: var(--aa-lime); }
.aa-match-notice-error, .aa-match-form-error { background: #4a1d16; color: #fff4eb; }
.aa-match-dashboard {
  border-bottom: 2px solid var(--aa-ink);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  padding: 18px 0;
}
.aa-match-dashboard[hidden] { display: none; }
.aa-match-points, .aa-match-recent {
  background: #fffdf5;
  border: 2px solid var(--aa-ink);
  padding: 16px;
}
.aa-match-points-value {
  display: block;
  font: 900 52px/.9 Georgia, serif;
  margin: 10px 0;
}
.aa-match-points-hint, .aa-match-teammate { font: 700 14px/1.4 sans-serif; margin: 8px 0; }
.aa-match-teammate { border-top: 1px solid #cbc7ba; padding-top: 8px; }
.aa-match-form-error { font: 700 14px/1.4 sans-serif; margin: 0; padding: 10px; }
.aa-match-empty { border: 2px dashed #77736a; font: 700 18px/1.4 Georgia, serif; margin: 0; padding: 32px 20px; text-align: center; }
.aa-match-skeleton { animation: aa-match-pulse 1.1s ease-in-out infinite alternate; background: linear-gradient(110deg, #d7d3c6, #f8f5ea, #d7d3c6); border: 2px solid #d7d3c6; height: 240px; }
@keyframes aa-match-pulse { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 850px) {
  .aa-profile-overlay { align-items: flex-end; padding: 10px; }
  .aa-profile-modal { max-height: calc(100vh - 20px); overflow-y: auto; padding: 22px 18px; width: 100%; }
  .aa-profile-form { grid-template-columns: 1fr; }
  .aa-profile-control, .aa-profile-submit { min-height: 44px; }
  .aa-profile-error { grid-column: 1; order: 20; }
  .aa-profile-submit { grid-column: 1; order: 21; }
  .aa-match-board { padding: 18px 14px; }
  .aa-match-header { align-items: stretch; flex-direction: column; }
  .aa-match-layout { grid-template-columns: 1fr; }
  .aa-match-dashboard { grid-template-columns: 1fr; }
  .aa-match-form { position: static; }
  .aa-match-facts { grid-template-columns: 1fr; }
  .aa-match-action, .aa-match-submit { min-height: 44px; }
}
