/* Play Space — After-Hours Plum & Silver, responsive phone-first + desktop app layout */
:root {
  --bg: #0a0a10;
  --nav: #050509;
  --card: #14131f;
  --accent: #8b4fe0;
  --accent-text: #ffffff;
  --trim: #d7c4ff;
  --gold: #d7c4ff; /* Legacy alias mapped to soft orchid-silver trim */
  --text: #f1effa;
  --muted: #a19cb8;
  --line: #2c2942;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
body.has-dock {
  padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
}
a { color: var(--trim); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sticky Header */
.top {
  position: sticky;
  top: 0;
  background: rgba(5, 5, 9, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--accent);
  z-index: 100;
}
.top-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  color: var(--trim);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; opacity: 0.92; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; display: block; flex-shrink: 0; border-radius: 50%; }

/* Hide full tab strip on mobile (replaced by bottom thumb dock); show on PC */
.desktop-tabs {
  display: none;
  align-items: center;
  gap: 4px;
}
.desktop-tabs a, .top-util a:not(.btn) {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.desktop-tabs a:hover, .top-util a:not(.btn):hover {
  color: var(--trim);
  background: rgba(139, 79, 224, 0.14);
  text-decoration: none;
}
.desktop-tabs a.active, .top-util a.active {
  color: var(--trim);
  background: rgba(139, 79, 224, 0.22);
  font-weight: 700;
}
.top-util {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.logout-link { color: var(--muted) !important; font-size: 13px !important; }

/* Mobile Bottom Thumb Dock */
.mobile-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 9, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
}
.mobile-dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 2px;
  text-decoration: none;
}
.mobile-dock a svg { width: 20px; height: 20px; }
.mobile-dock a.active { color: var(--trim); }

/* Main Containers */
.wrap {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}
.wrap-wide {
  max-width: 1120px;
}

/* Landing Hero */
.hero-brand { text-align: center; padding: 12px 0 8px; }
.hero-logo { width: 176px; height: 176px; object-fit: contain; display: block; margin: 0 auto 2px; border-radius: 50%; }
.hero-title { font-size: 30px; font-weight: 900; letter-spacing: 3px; margin: 0; color: var(--trim); }
.hero-tagline { font-size: 17px; color: var(--text); margin: 6px auto 18px; max-width: 460px; }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }

/* Cards & Forms */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
}
input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  margin: 6px 0 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0 6px 0 0;
  accent-color: var(--accent);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
button, .btn {
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  padding: 11px 18px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: opacity 0.15s;
}
button:hover, .btn:hover { opacity: 0.9; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--trim);
  border: 1px solid var(--accent);
}
.muted { color: var(--muted); }
.badge {
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: bold;
}
video {
  width: 100%;
  border-radius: 10px;
  background: #000;
}
.pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 12px;
  margin: 2px;
  font-size: 13px;
  color: var(--trim);
  background: rgba(139, 79, 224, 0.12);
}
h1, h2, h3 { color: var(--trim); margin-top: 18px; margin-bottom: 10px; }
label { font-weight: 600; font-size: 14px; }
details summary { outline: none; }
.foot {
  background: var(--nav);
  border-top: 1px solid var(--line);
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 40px;
}
.foot a { color: var(--muted); margin: 0 6px; }
.foot a:hover { color: var(--trim); }

/* Responsive Multi-Column Helpers */
.split-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.chat-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.conv-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.conv-item {
  display: inline-block;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  text-decoration: none;
}
.conv-item:hover { border-color: var(--accent); text-decoration: none; }
.conv-item.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 700;
}

@media (min-width: 900px) {
  body.has-dock { padding-bottom: 0; }
  .mobile-dock { display: none; }
  .desktop-tabs { display: flex; }
  .wrap { max-width: 840px; padding: 24px; }
  .wrap-wide { max-width: 1120px; }
  .hero-logo { width: 210px; height: 210px; }
  .hero-title { font-size: 36px; }

  .split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
    align-items: start;
    gap: 24px;
  }

  .chat-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
  }
  .chat-sidebar {
    position: sticky;
    top: 76px;
  }
  .conv-list {
    flex-direction: column;
    overflow-x: visible;
    gap: 8px;
  }
  .conv-item {
    display: block;
    white-space: normal;
  }
  .msg-scroll {
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 6px;
  }
}

/* Guided Interview Profile Setup */
.setup-progress {
  width: 100%;
  height: 6px;
  background: var(--card);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.setup-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}
.setup-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}
.setup-opt:hover { border-color: var(--accent); }
.setup-opt input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.setup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}
.setup-chip input { display: none; }
.setup-chip span {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.setup-chip input:checked + span {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
