/* Lost Sheep Tracker additions on top of the shared styles. */
body.locked .tabs, body.locked #lock-btn { display: none; }
body.locked { padding-bottom: 0; }
.top-actions { display: flex; gap: 8px; }
.lock-card { max-width: 380px; margin: 40px auto; text-align: center; }
.lock-card h1 { font-size: 24px; }
.lock-art { display: grid; place-items: center; margin: 6px 0 10px; }
.code-input {
  text-align: center; font-family: var(--pixel-font); font-size: 24px !important; letter-spacing: 8px;
  margin: 8px 0 14px; padding: 14px !important;
}

.toolbar { display: grid; gap: 8px; padding: 12px; }
.toolbar input[type=search] { width: 100%; }
.list-summary { margin: -6px 0 12px; font-size: 15px; }
.todo-text { color: var(--coral); font-weight: 700; }
.people { display: grid; gap: 10px; }
.person {
  display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: inherit;
  background: var(--card); border: 3px solid var(--purple-ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--purple-ink); padding: 10px 12px;
}
.person:active { transform: translate(3px, 3px); box-shadow: none; }
.person-body { flex: 1; min-width: 0; }
.person-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.person-top b { font-size: 17px; line-height: 1.2; }
.rank {
  flex: none; min-width: 30px; text-align: center; font-family: var(--pixel-font); font-size: 10px; color: var(--muted); padding-top: 4px;
}
.branch-tag {
  display: inline-block; padding: 1px 7px; font-size: 12px; font-weight: 800; background: #e9e1ff; color: var(--purple);
  border: 2px solid var(--purple-ink);
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 12px; font-weight: 800;
  border: 2px solid var(--purple-ink); background: #fff;
}
.chip.todo { background: #ffe0dd; color: #a8322a; }
.chip.done { background: #e4f5dc; color: #2f6d22; }
.chip.ok { background: var(--leaf); color: #fff; }
.chip.due { background: #fff1c4; color: #7a4a00; }
.chip.late { background: var(--coral); color: #fff; }
.chip.flag { background: #fff; color: var(--coral); border-color: var(--coral); }
.chip.info { background: #fff; color: var(--muted); }
.hearts { display: inline-flex; gap: 1px; vertical-align: middle; }
.hearts span { opacity: .2; }
.hearts span.on { opacity: 1; }
.add-btn { margin-top: 16px; }

.back-link { display: inline-block; margin-bottom: 10px; font-weight: 800; color: var(--purple); text-decoration: none; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-art {
  width: 76px; height: 76px; flex: none; display: grid; place-items: center; background: var(--sky);
  border: 3px solid var(--purple-ink); box-shadow: 3px 3px 0 var(--purple-ink);
}
.profile-head h1 { font-size: 24px; }
.profile-actions { margin: -4px 0 18px; }
.profile-actions .btn { padding: 9px 12px; font-size: 15px; }
.field .label, label.field > span { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
div.field { margin-bottom: 12px; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.result-btn {
  display: flex; align-items: center; gap: 6px; padding: 9px 10px; text-align: left; cursor: pointer;
  background: #fff; border: 3px solid var(--purple-ink); font: inherit; font-size: 14px; font-weight: 700; color: var(--purple-ink);
}
.result-btn.on { background: var(--yellow); box-shadow: 3px 3px 0 var(--purple-ink); }
.rating { display: flex; gap: 6px; }
.heart-btn { background: none; border: 0; padding: 2px; cursor: pointer; opacity: .25; }
.heart-btn.on { opacity: 1; }
.visit-form { border-color: var(--purple); }
.attend-form { background: #f1faec; }
.ok-btn { background: var(--leaf); }
.timeline-item { display: flex; gap: 10px; padding: 10px 0; border-top: 2px dashed var(--line); }
.timeline-item:first-of-type { border-top: 0; }
.timeline-item.attended { background: #f1faec; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.tl-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--cream); border: 2px solid var(--purple-ink); }
.note { margin: 4px 0; white-space: pre-wrap; background: #fffbe8; padding: 6px 8px; border-left: 3px solid var(--orange); }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px; align-self: flex-start; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 2px dashed var(--line); }
.info-row:first-of-type { border-top: 0; }
.info-row span:last-child { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.flag-card.on { border-color: var(--coral); background: #fff4f2; }
.flag-toggle { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.flag-toggle input { width: 22px; height: 22px; accent-color: var(--coral); }

.coverage .num, .top-row .num, .branch-row .num { font-family: var(--pixel-font); font-size: 11px; color: var(--purple); }
.coverage .bar { margin-top: 8px; }
.tiles .tile .l.warn { color: var(--coral); font-weight: 800; }
.branch-row { padding: 10px 0; border-top: 2px dashed var(--line); }
.branch-row:first-of-type { border-top: 0; }
.branch-row .bar { margin: 6px 0 4px; height: 18px; }
.top-row { padding: 5px 0; }
.award + .award { margin-top: 8px; }
h3 { font-size: 16px; color: var(--purple); margin: 4px 0 6px; }
.day-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 6px; }
.day-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.day-bar .fill { width: 100%; background: var(--purple); min-height: 2px; }
.day-bar .fill.today { background: var(--coral); }
.day-bar span { font-size: 10px; color: var(--muted); }
@media (max-width: 420px) {
  .toolbar .grid3 { grid-template-columns: 1fr 1fr; }
  .toolbar .grid3 > :last-child { grid-column: span 2; }
}
input[type=search] {
  width: 100%; padding: 11px 12px; border: 3px solid var(--purple-ink); border-radius: 0;
  background: #fff; color: var(--text); font: inherit; font-size: 16px;
}
#lock-btn { font-size: 16px; padding: 6px 10px; }

.lock-kicker { color: #9a5a2a; font-weight: 800; font-size: 15px; }
.lock-brand { color: var(--purple); font-weight: 800; font-size: 22px; line-height: 1.1; margin-bottom: 8px; }
.lock-card h1 { font-size: 19px; margin-top: 8px; }
.admin-page { max-width: 720px; margin: 0 auto; }

/* ---------- Computer layout ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 24px; }
  main { max-width: 1180px; padding: 100px 28px 24px; }
  body.locked main { padding-top: 24px; }
  .topbar { padding: 10px 28px; }
  .brand-text b { font-size: 20px; }
  /* Tabs move from the bottom to a bar under the header. */
  .tabs {
    top: 66px; bottom: auto; justify-content: center; gap: 6px; padding: 6px 28px;
    border-top: 0; border-bottom: var(--px) solid var(--purple-ink); background: var(--card);
  }
  .tabs a { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 8px 18px; font-size: 16px; border-radius: 4px; }
  .tabs a .ico { height: 24px; }
  .toolbar { grid-template-columns: 1.3fr 2fr; align-items: center; }
  .toolbar .grid3 { margin: 0; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .add-btn { max-width: 360px; margin-left: auto; margin-right: auto; }
  .profile-head, .profile-actions { max-width: none; }
  .profile-cols, .tops-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .lock-card { margin-top: 60px; }
  .footer-links { margin-top: 18px; }
}
@media (min-width: 1300px) {
  .people { grid-template-columns: repeat(3, 1fr); }
}
