/* ─────────────────────────────────────────────
   /me — view + edit your RSVP (listening party)
   ───────────────────────────────────────────── */

.me-body { overflow-x: hidden; }

[hidden] { display: none !important; }

.me {
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  position: relative;
  z-index: 5;
}

.state {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  animation: state-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes state-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.state-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1;
  margin: 0.4rem 0 0.85rem;
  letter-spacing: -0.015em;
}
.state-title em { color: var(--ink); font-style: italic; }
.state-sub {
  font-size: 0.98rem;
  opacity: 0.7;
  line-height: 1.55;
  margin-bottom: 2rem;
  max-width: 440px;
  align-self: center;
}

.state-footnote {
  font-size: 0.85rem;
  opacity: 0.55;
  margin-top: 1.5rem;
}
.state-footnote a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Sign-in form ───────────────────────────── */
.me-signin-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  max-width: 360px;
  align-self: center;
}
.me-signin-form input[type="email"] {
  padding: 0.95rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}
.me-signin-form input[type="email"]:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 53, 128, 0.1);
}

.signin-error {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--label-color);
  font-weight: 500;
}
.signin-error a { color: inherit; text-decoration: underline; }

/* ── Banner (after save) ────────────────────── */
.me-banner {
  text-align: left;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  animation: state-in 0.3s ease both;
}
.me-banner--ok   { background: rgba(149, 182, 44, 0.18); color: var(--green-deep); border: 1px solid rgba(149, 182, 44, 0.35); }
.me-banner--err  { background: rgba(184, 54, 42, 0.12); color: var(--label-color); border: 1px solid rgba(184, 54, 42, 0.35); }
.me-banner--flat { background: rgba(0, 0, 0, 0.04); color: rgba(0, 0, 0, 0.6); border: 1px solid rgba(0, 0, 0, 0.08); }

/* ── Cards ──────────────────────────────────── */
.me-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 1.2rem 1.3rem 1.3rem;
  text-align: left;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
.me-card-label {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.5;
  margin-bottom: 0.55rem;
}
.me-card-hint {
  font-size: 0.85rem;
  opacity: 0.65;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.me-displayname {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  line-height: 1.1;
  margin-bottom: 0.15rem;
}
.me-email {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  opacity: 0.55;
}
.me-team {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  opacity: 0.65;
  font-style: italic;
}

/* ── Party cards (selectable) ───────────────── */
.me-parties {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.me-party-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.me-party-card:hover { background: rgba(255, 255, 255, 0.85); }
.me-party-card.is-selected {
  border-color: var(--ink);
  background: rgba(26, 53, 128, 0.07);
  box-shadow: 0 0 0 3px rgba(26, 53, 128, 0.08);
}

.me-party-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  align-self: center;
  position: relative;
  transition: border-color 0.15s;
}
.me-party-card.is-selected .me-party-radio {
  border-color: var(--ink);
}
.me-party-card.is-selected .me-party-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--ink);
}

.me-party-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.me-party-name {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
}
.me-party-sub {
  font-size: 0.78rem;
  opacity: 0.6;
}

.me-party-card--solo .me-party-name {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 1.05rem;
}

.me-hostlink {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}
.me-hostlink a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.me-empty {
  padding: 0.65rem 0;
  margin: 0;
}

/* ── Actions ────────────────────────────────── */
.me-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.muted { opacity: 0.55; font-size: 0.88rem; }

/* ── Buttons (local copy of /play's tokens) ── */
.btn-primary {
  padding: 0.95rem 1.5rem;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(26, 53, 128, 0.25);
  min-width: 200px;
}
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-text {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.7;
  padding: 0.5rem 0.25rem;
}
.btn-text:hover { opacity: 1; }

@media (max-width: 600px) {
  .me { padding: 3rem 1rem 4rem; }
  .me-card { padding: 1rem 1.1rem; }
}
