/* ============================================================
   q■ — Auth Pages (signin, profile)
   css/auth.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #222;
}

a { text-decoration: none; color: inherit; }

/* ── Header (reused from mosaic.css, standalone for auth pages) */

#header {
  background: #fff;
  border-bottom: 2px solid #111;
  padding: 0 20px;
}

.auth-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 65px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 22px;
  font-weight: 900;
  color: #111;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  display: flex;
  align-items: center;
}

.logo-block { font-weight: 900; color: #111; }

.header-link {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.03em;
}

.header-link:hover { opacity: 0.6; }

/* ── Auth Card (signin / signup) */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 20px;
  min-height: calc(100vh - 67px);
}

.auth-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
  margin-bottom: 6px;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 20px;
  outline: none;
  transition: border-color 0.15s;
}

.auth-input:focus {
  border-color: #111;
}

.auth-btn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.auth-btn:hover { background: #333; }
.auth-btn:disabled { background: #999; cursor: not-allowed; }

.auth-error {
  color: #d32f2f;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  min-height: 18px;
  margin: 0 0 12px;
}

.auth-toggle {
  text-align: center;
  font-size: 13px;
  color: #777;
  margin-top: 20px;
}

.auth-toggle a {
  color: #111;
  font-weight: 700;
  margin-left: 4px;
}

.auth-toggle a:hover { text-decoration: underline; }

/* ============================================================
   Sign-In Page — layered over lineup background (glass card)
   ============================================================ */

body.view-signin .lineup {
  overflow: visible;
  min-height: 100vh;
  padding-bottom: 120px;
}

body.view-signin .lineup-header {
  z-index: 10;
}

body.view-signin .lineup-logo {
  cursor: pointer;
  transition: color 0.15s ease;
}

body.view-signin .lineup-logo:hover {
  color: #8b6914;
}

body.view-signin .auth-container {
  position: relative;
  z-index: 1;
  padding: calc(max(0.8vw, 0.8vh) + max(3.5vw, 36px) + 36px) 20px 60px;
  align-items: center;
  min-height: 100vh;
}

body.view-signin .auth-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 32px 32px 28px;
  max-width: 420px;
}

body.view-signin .auth-title {
  font-family: 'Montserrat Alternates', sans-serif;
  font-weight: 800;
  font-size: 28px;
  text-transform: lowercase;
  color: #2a2a2a;
  text-align: left;
  margin: 0 0 20px;
}

body.view-signin .auth-label {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(42, 42, 42, 0.65);
}

body.view-signin .auth-input {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #2a2a2a;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  margin-bottom: 18px;
  transition: border-color 0.15s, background 0.15s;
}

body.view-signin .auth-input:focus {
  border-color: #2a2a2a;
  background: rgba(255, 255, 255, 0.9);
}

body.view-signin .auth-btn {
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #2a2a2a;
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
  transition: background 0.15s;
}

body.view-signin .auth-btn:hover { background: #8b6914; }
body.view-signin .auth-btn:disabled { background: #999; }

body.view-signin .auth-error {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #d32f2f;
  text-align: left;
}

body.view-signin .auth-toggle {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 13px;
  color: rgba(42, 42, 42, 0.7);
  text-align: center;
  margin-top: 18px;
}

body.view-signin .auth-toggle a {
  color: #8b6914;
  font-weight: 700;
}

body.view-signin .auth-toggle a:hover {
  color: #2a2a2a;
  text-decoration: underline;
}

/* ============================================================
   Profile Page — layered over lineup background
   ============================================================ */

/* Let profile content flow (lineup default is overflow: hidden + absolute text) */
body.view-profile .lineup {
  overflow: visible;
  min-height: 100vh;
  padding-bottom: 120px;
}

body.view-profile .lineup-header {
  z-index: 10;
}

body.view-profile .lineup-logo {
  cursor: pointer;
  transition: color 0.15s ease;
}

body.view-profile .lineup-logo:hover {
  color: #8b6914;
}

.profile-text {
  position: relative;
  top: auto;
  left: auto;
  max-width: min(960px, 92vw);
  margin: 0 auto;
  padding-top: calc(max(0.8vw, 0.8vh) + max(3.5vw, 36px) + 36px);
  z-index: 1;
}

.profile-text .lineup-section {
  margin-bottom: max(3vw, 3vh);
}

.archive-count {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 0.45em;
  font-weight: 700;
  color: rgba(42, 42, 42, 0.55);
  margin-left: 10px;
  vertical-align: middle;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Archive tile grid ───────────────────────────────────── */

.archive-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: max(1vw, 10px);
}

.archive-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.archive-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.archive-tile:hover .archive-tile-img,
.archive-tile:focus-visible .archive-tile-img {
  transform: scale(1.04);
  filter: brightness(0.75);
}

.archive-tile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.archive-tile:hover .archive-tile-overlay,
.archive-tile:focus-visible .archive-tile-overlay {
  opacity: 1;
}

.archive-tile-title {
  font-family: 'Sofia Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-tile-sub {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-tile-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.15s;
  padding: 0;
}

.archive-tile:hover .archive-tile-remove,
.archive-tile:focus-visible .archive-tile-remove {
  opacity: 1;
}

.archive-tile-remove:hover {
  background: #d32f2f;
}

.archive-empty {
  grid-column: 1 / -1;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 14px;
  color: rgba(42, 42, 42, 0.6);
  text-align: center;
  padding: 40px 0;
}

/* ── Account card ────────────────────────────────────────── */

.account-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 20px 24px;
  max-width: 520px;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.account-avatar-wrap {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.account-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #e0e0e0;
}

.account-avatar-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 2px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.15s;
}

.account-avatar-wrap:hover .account-avatar-hint {
  opacity: 1;
}

.account-identity-text {
  flex: 1;
  min-width: 0;
}

.account-email {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-signout {
  margin-top: 4px;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #8b6914;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.account-signout:hover {
  color: #d32f2f;
}

.account-pandora {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pandora-steps {
  flex: 1 0 100%;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  counter-reset: step;
}

.pandora-steps li {
  position: relative;
  padding-left: 28px;
  margin-top: 10px;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #2a2a2a;
  line-height: 1.5;
  counter-increment: step;
}

.pandora-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #fff;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pandora-steps strong {
  font-weight: 700;
}

.pandora-steps a:not(.pandora-bookmarklet) {
  color: #8b6914;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pandora-steps a:not(.pandora-bookmarklet):hover {
  color: #2a2a2a;
}

.pandora-steps .pandora-bookmarklet {
  display: inline-block;
  padding: 3px 10px;
  /* font-size:0 hides the real DOM text (which stays "q■ Link Pandora" so
     dragging to bookmarks captures that name). ::before renders the
     instructional label visually. */
  font-size: 0;
  line-height: 1.4;
  background: #2a2a2a;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  margin: 0 2px;
  vertical-align: 1px;
}

.pandora-steps .pandora-bookmarklet::before {
  content: "THIS BOOKMARKLET";
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}

.pandora-steps .pandora-bookmarklet:hover {
  background: #8b6914;
}

.account-pandora-label {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(42, 42, 42, 0.55);
}

.account-pandora-state {
  font-family: 'Sofia Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #8a8a8a;
}

.account-pandora-state--linked {
  color: #2e7d32;
}

.account-pandora-action {
  margin-left: auto;
  font-family: 'Sofia Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 7px 14px;
  border-radius: 4px;
  background: #2a2a2a;
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}

.account-pandora-action:hover {
  background: #8b6914;
}

/* Bookmarklet inherits .account-pandora-action look; only tweaks draggability */
.pandora-bookmarklet {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
