/* Traiting app screens. Loads after /assets/css/style.css and reuses its color variables. */
body.app { min-height: 100vh; }
.wordmark span { color: var(--accent); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input { height: 48px; padding: 0 14px; border: 1px solid var(--line-3); border-radius: 12px; background: var(--panel); color: var(--text); font-family: var(--body); font-size: 16px; width: 100%; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field input[readonly] { color: var(--muted-2); background: transparent; }
.field .hint { font-size: 12px; color: var(--muted-2); }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #D4F46A; flex-shrink: 0; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-danger { background: transparent; color: #FF8A9A; border: 1px solid #5A2A33; font-weight: 600; }
.btn-danger:hover { border-color: #FF8A9A; color: #FF8A9A; }
.notice { display: none; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.notice.show { display: block; }
.notice.error { background: #2A1418; border: 1px solid #5A2A33; color: #FFB3BE; }
.notice.good { background: #1B2414; border: 1px solid #3F5220; color: #DDF5A0; }

/* Sign-in pages */
.auth { min-height: 100vh; display: flex; max-width: 1440px; margin: 0 auto; }
.auth-form { width: 600px; flex-shrink: 0; padding: 40px 80px; display: flex; flex-direction: column; gap: 32px; }
.auth-body { margin: auto 0; display: flex; flex-direction: column; gap: 20px; }
.auth-body h1 { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -1px; line-height: 1.15; }
.auth-body .sub { font-size: 16px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.auth-form form { display: flex; flex-direction: column; gap: 16px; }
.auth-alt { font-size: 14px; color: var(--muted); text-align: center; }
.auth-foot { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted-2); }
.divider { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted-2); }
.divider::before, .divider::after { content: ""; flex-grow: 1; height: 1px; background: var(--line); }
.google-slot { min-height: 44px; display: flex; justify-content: center; }
.google-wrap[hidden] { display: none; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.auth-side { flex-grow: 1; margin: 24px 24px 24px 0; border-radius: 32px; background: var(--panel); border: 1px solid var(--line); padding: 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side h2 { font-family: var(--display); font-size: 52px; line-height: 1.05; font-weight: 600; letter-spacing: -2.5px; margin: 24px 0 36px; }
.auth-side h2 span { color: var(--accent); }
.auth-side .checks { gap: 14px; }
.auth-side .checks li { font-size: 17px; font-weight: 600; gap: 12px; }
.auth-side .checks li::before { width: 20px; height: 20px; }
.auth-side .faces { display: flex; align-items: center; gap: 16px; font-size: 15px; color: var(--muted); }
.auth-side .faces img { width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--panel); object-fit: cover; margin-left: -12px; }
.auth-side .faces img:first-child { margin-left: 0; }
.auth-side .faces div { display: flex; }

/* Logged-in shell */
.shell { display: flex; min-height: 100vh; max-width: 1440px; margin: 0 auto; }
.side { width: 248px; flex-shrink: 0; padding: 28px 16px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: 100vh; }
.side .logo { padding: 0 10px; font-size: 20px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; gap: 12px; align-items: center; height: 48px; padding: 0 14px; border-radius: 14px; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted); }
.side nav a:hover { color: var(--text); }
.side nav a.on { background: var(--panel-3); color: var(--text); }
.side-user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--accent); flex-shrink: 0; }
.side-user b { display: block; font-size: 14px; }
.side-user span { font-size: 12px; color: var(--muted-2); }
.main { flex-grow: 1; min-width: 0; padding: 36px 40px 64px; display: flex; flex-direction: column; gap: 28px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -1px; }
.page-head p { font-size: 16px; color: var(--muted); margin-top: 6px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.tile-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.tile small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted-2); }
.tile b { display: block; font-size: 17px; margin: 2px 0; }
.tile span { font-size: 13px; color: var(--muted-2); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { font-size: 17px; font-weight: 700; }
.panel p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps-list li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.steps-list li:last-child { border-bottom: 0; }
.steps-list .n { width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted-2); flex-shrink: 0; }
.steps-list li.done .n { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.steps-list li div { flex-grow: 1; }
.steps-list li small { display: block; font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-3); color: var(--muted-2); white-space: nowrap; }
.tag.good { border-color: #3F5220; color: #DDF5A0; }
.empty { text-align: center; padding: 56px 24px; align-items: center; }
.empty h2 { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.empty p { max-width: 460px; font-size: 15px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.line-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.line-row b { display: block; font-size: 15px; }
.line-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.right { display: flex; justify-content: flex-end; gap: 10px; }
form.panel-form { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 1000px) {
  .auth-side { display: none; }
  .auth-form { width: 100%; max-width: 560px; margin: 0 auto; padding: 32px 24px; }
  .cols, .tiles { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 10; width: auto; height: 64px; flex-direction: row; align-items: center; gap: 0; padding: 0 8px; border-right: 0; border-top: 1px solid var(--line); background: var(--bg); }
  .side .logo, .side-user { display: none; }
  .side nav { flex-direction: row; flex-grow: 1; justify-content: space-around; }
  .side nav a { flex-direction: column; gap: 2px; height: 56px; font-size: 11px; padding: 0 16px; }
  .main { padding: 24px 16px 96px; }
  .page-head h1 { font-size: 24px; }
  .row-2 { grid-template-columns: 1fr; }
  .auth-body h1 { font-size: 28px; }
}

/* Date of birth dropdowns */
.row-1 { display: grid; gap: 16px; }
.dob-row { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr; gap: 8px; }
.dob-row select { height: 48px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: 12px; background: var(--panel); color: var(--text); font-family: var(--body); font-size: 16px; width: 100%; min-width: 0; }
.dob-row select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* Video recorder */
.rec { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.rec-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; align-items: center; }
.rec-dots li { display: flex; align-items: center; gap: 10px; }
.rec-dots li + li::before { content: ""; width: 36px; height: 2px; background: var(--line-3); border-radius: 2px; }
.rec-dots span { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line-3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted-2); }
.rec-dots li.done span { background: var(--panel-3); border-color: #3F5220; color: #DDF5A0; }
.rec-dots li.on span { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.rec-card { width: 100%; max-width: 720px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.rec-q small { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--accent); }
.rec-q h2 { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.25; margin-top: 8px; }
.rec-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #000; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-3); }
.rec-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rec-stage video[hidden] { display: none; }
.rec-stage #live { transform: scaleX(-1); }
.rec-stage #play { object-fit: contain; background: #000; }
.rec-cover { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--panel-3); color: var(--muted); }
.rec-cover[hidden] { display: none; }
.rec-cover p { max-width: 340px; font-size: 15px; line-height: 1.5; }
.rec-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 120px; font-weight: 700; color: #fff; background: rgba(13, 14, 18, 0.45); }
.rec-count[hidden] { display: none; }
.rec-live { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 999px; background: rgba(13, 14, 18, 0.72); font-size: 14px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.rec-live[hidden] { display: none; }
.rec-live i { width: 10px; height: 10px; border-radius: 999px; background: #FF3B5C; animation: recPulse 1.1s ease-in-out infinite; }
.rec-live em { font-style: normal; font-weight: 500; color: rgba(255, 255, 255, 0.65); }
@keyframes recPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
.rec-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, 0.18); }
.rec-bar[hidden] { display: none; }
.rec-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.1s linear; }
.rec-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rec-actions .btn { min-width: 170px; justify-content: center; }
.rec-tip { text-align: center; font-size: 13px; color: var(--muted-2); min-height: 18px; }
.empty .right { justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* Video answers on Home and Account */
.steps-list .btn { flex-shrink: 0; }
.va-list { display: flex; flex-direction: column; }
.va { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.va:last-child { border-bottom: 0; padding-bottom: 0; }
.va > div { flex-grow: 1; min-width: 0; }
.va b { display: block; font-size: 14px; line-height: 1.4; }
.va small { display: block; font-size: 13px; color: var(--muted-2); margin-top: 3px; }
.va-links { display: flex; gap: 14px; flex-shrink: 0; font-size: 13px; font-weight: 700; }
.va-links a, .va-links button { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: none; }
.va-links a:hover, .va-links button:hover { text-decoration: underline; }
.va-player { width: 100%; max-height: 360px; border-radius: 14px; background: #000; }
.va-player[hidden] { display: none; }
@media (max-width: 760px) {
  .rec-card { padding: 16px; border-radius: 20px; }
  .rec-q h2 { font-size: 20px; }
  .rec-stage { aspect-ratio: 3 / 4; }
  .rec-count { font-size: 88px; }
  .rec-dots li + li::before { width: 20px; }
  .rec-actions .btn { flex-grow: 1; min-width: 0; }
  .steps-list li { flex-wrap: wrap; }
}
body.app [hidden] { display: none !important; }
@media (max-width: 760px) { .rec-stage { aspect-ratio: auto; height: 46vh; min-height: 240px; } }

/* Weekly drop and match page */
.field select { height: 48px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: 12px; background: var(--panel); color: var(--text); font-family: var(--body); font-size: 16px; width: 100%; min-width: 0; }
.field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.drop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.drop-head h2 { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.5px; }
#dropWrap .notice { margin-bottom: 12px; }
.app-drop { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.app-drop .card-media { height: 300px; text-decoration: none; }
.card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card-initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 84px; font-weight: 600; color: var(--accent); background: var(--panel-3); }
.card-city { font-size: 13px; color: var(--muted-2); margin-top: -6px; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.card-actions .btn { justify-content: center; }
.back { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 8px; }
.back:hover { color: var(--text); }
.fit-big { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--accent); border: 1px solid #3F5220; border-radius: 999px; padding: 10px 18px; }
.match-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.match-cols #player { object-fit: contain; }
.match-cols .rec-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; opacity: 0.55; }
.match-cols .rec-cover p { position: relative; background: rgba(13, 14, 18, 0.78); padding: 10px 16px; border-radius: 12px; color: var(--text); }
.q-tabs { display: flex; gap: 8px; justify-content: center; }
.q-tabs button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-3); background: transparent; color: var(--muted); font: 700 14px var(--body); cursor: pointer; }
.q-tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.q-tabs button[disabled] { opacity: 0.4; cursor: default; }
.right.split { justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 1000px) { .match-cols { grid-template-columns: 1fr; } }
body.app .drop-head { flex-direction: row; text-align: left; align-items: center; justify-content: space-between; width: 100%; max-width: none; margin: 0 0 16px; }

/* Drop grid: three across, and a short last row sits in the middle instead of leaving a gap. */
.app-drop { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.app-drop .card { flex: 0 0 calc((100% - 40px) / 3); min-width: 0; }
.app-drop .reveal { gap: 14px; }
@media (max-width: 1180px) { .app-drop .card { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 760px) { .app-drop .card { flex-basis: 100%; } }

/* Inbox, hello and chat */
.side nav a { position: relative; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.side nav a .badge { margin-left: auto; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row:first-child { padding-top: 0; }
.row > div { flex-grow: 1; min-width: 0; }
.row b { display: block; font-size: 15px; }
.row small { display: block; font-size: 14px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.unread small { color: var(--text); font-weight: 600; }
.row-right { display: flex; gap: 10px; align-items: center; flex-shrink: 0; font-size: 12px; color: var(--muted-2); }
.face { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; object-position: 50% 25%; flex-shrink: 0; background: var(--panel-3); border: 1px solid var(--line-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: var(--accent); }
a.btn.off { opacity: 0.55; pointer-events: none; }
.q-tabs button.wide { width: auto; padding: 0 18px; }
.panel > .btn { align-self: flex-start; }
.chat-main { height: 100vh; padding-bottom: 24px; gap: 16px; }
.chat-head { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.chat-head .back { font-size: 22px; margin: 0; padding: 4px 8px 4px 0; }
.chat-head > div:not(.chat-tools) { flex-grow: 1; min-width: 0; }
.chat-head b { display: block; font-size: 17px; }
.chat-head small { font-size: 13px; color: var(--muted-2); }
.chat-tools { display: flex; gap: 8px; flex-shrink: 0; }
.chat-log { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 4px 0; }
.chat-day { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted-2); margin: 10px 0 2px; }
.bubble { max-width: min(78%, 560px); align-self: flex-start; background: var(--panel-3); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 10px 14px 8px; }
.bubble.mine { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: var(--bg); border-radius: 18px 18px 6px 18px; }
.bubble p { font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: 11px; opacity: 0.6; margin-top: 3px; text-align: right; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { flex-grow: 1; min-height: 48px; max-height: 140px; resize: none; padding: 12px 16px; border: 1px solid var(--line-3); border-radius: 24px; background: var(--panel); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.4; }
.chat-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
@media (max-width: 760px) {
  .chat-main { height: 100dvh; padding-bottom: 80px; }
  .chat-tools .btn { padding: 0 12px; font-size: 13px; }
}
.chat-head b { white-space: nowrap; }
@media (max-width: 760px) {
  .side nav a .badge { position: absolute; top: 4px; left: 50%; margin-left: 8px; min-width: 18px; height: 18px; font-size: 11px; }
  .chat-tools .btn { height: 38px; padding: 0 10px; font-size: 12px; }
}
