/* Scratch — Friends + Challenges screens. Everything here is .soc- prefixed.
   Tokens only (from app.css). Flat: no glow, no pulse. */

.soc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.soc-sec { margin-top: 24px; min-width: 0; }
.soc-sec > h2 { margin-bottom: 10px; }
.soc-pad { padding: 24px 0; }
.soc-note { margin-top: 24px; }

.soc-top .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-sum { line-height: 1.6; margin: 0 0 12px; }

/* Messages */
.soc-msg { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); min-height: 0; }
.soc-msg:empty { display: none; }
.soc-msg.err { color: var(--bad); }
.soc-msg.ok { color: var(--good); }

/* Invite panel */
.soc-invite { display: flex; flex-direction: column; gap: 10px; }
.soc-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.soc-code { margin: 0; font-size: 44px; line-height: 1.1; font-weight: 500; letter-spacing: 0.08em; color: var(--ink); overflow-wrap: anywhere; }
.soc-gap { display: inline-block; width: 0.35em; }
.soc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soc-two .btn { min-width: 0; }
.soc-new { width: 100%; }

/* Enter a code */
.soc-join-row { display: flex; gap: 10px; align-items: stretch; }
.soc-join-row .input { flex: 1; min-width: 0; }
.soc-join-row .btn { flex: none; min-width: 88px; }
.soc-code-in { font-family: var(--serif); font-size: 20px; letter-spacing: 0.1em; text-transform: uppercase; }
.soc-code-in::placeholder { letter-spacing: 0.04em; text-transform: none; font-size: 16px; font-family: var(--sans); }

/* Lists */
.soc-friend .r, .soc-idx { font-size: 22px; font-weight: 500; }
.soc-ch { color: inherit; }
.soc-tag { flex: none; font-size: 12px; font-weight: 600; color: var(--brass-ink); background: var(--brass-soft); padding: 3px 10px; border-radius: 999px; }
.soc-tag.is-done { color: var(--quiet); background: var(--surface-2); }
.soc-empty { padding: 20px 0; color: var(--quiet); }
.soc-empty h3 { color: var(--ink); margin-bottom: 6px; }
.soc-empty .btn { margin-top: 14px; }

/* Create form */
.soc-form { display: flex; flex-direction: column; gap: 14px; }
.soc-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soc-dates .field { min-width: 0; }
.soc-dates .input { min-width: 0; max-width: 100%; }
.soc-form .seg > button { cursor: default; }

/* Leaderboard */
.soc-board { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.soc-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.soc-row.is-me { background: var(--brass-soft); border-bottom-color: var(--brass); }
.soc-rank { font-size: 24px; font-weight: 500; text-align: center; color: var(--ink); }
.soc-row.is-unranked .soc-rank, .soc-row.is-unranked .soc-total { color: var(--quiet); }
.soc-who { display: flex; flex-direction: column; min-width: 0; }
.soc-who .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-who .s { font-size: 13px; color: var(--quiet); }
.soc-total { font-size: 24px; font-weight: 500; text-align: right; }
.soc-you { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--brass-ink); border: 1px solid var(--brass); border-radius: 999px; padding: 0 7px; vertical-align: 2px; }
.soc-honest { margin-top: 10px; }

/* Post a round */
.soc-pr { gap: 12px; }
.soc-postbtn { flex: none; min-width: 88px; min-height: 44px; }

/* Share */
.soc-link { margin: 0 0 12px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); overflow-wrap: anywhere; user-select: all; }

@media (max-width: 360px) {
  .soc-code { font-size: 38px; }
  .soc-dates { grid-template-columns: 1fr; }
}

/* The shared select has no native arrow (appearance: none); draw a flat one. */
.soc-form select.input {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--quiet) 50%), linear-gradient(135deg, var(--quiet) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
