/* App — clean lookup + board */

.app-body {
  min-height: 100vh;
  background: var(--bg);
}

.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.lookup-hero {
  text-align: center;
  margin: 0 auto 2rem;
}

.lookup-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lookup-hero h1 em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
}

.lookup-hero .lede {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 0.98rem;
}

.lookup-form {
  margin-top: 1.5rem;
  text-align: left;
}

.platform-toggle {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.plat {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.plat.active {
  color: var(--accent-fg);
  background: var(--accent);
  border-color: var(--accent);
}

.lookup-row {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lookup-row:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.lookup-row .at {
  padding: 0 0 0 1rem;
  font-weight: 600;
  color: var(--muted);
  font-size: 1.05rem;
}

.lookup-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  padding: 0.95rem 0.55rem;
  font-family: var(--font);
  outline: none;
}

.lookup-row .btn {
  margin: 0.4rem;
  border-radius: 10px;
  height: 40px;
}

.lookup-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.25em;
}

.lookup-hint.err {
  color: var(--bad);
}

.lookup-hint.ok {
  color: var(--good);
}

/* Sample boards */
.demo-strip {
  margin: 0 auto 2rem;
}

.demo-title {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}

.demo-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.demo-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.demo-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-transform: uppercase;
}

.demo-card strong {
  font-size: 0.88rem;
  color: var(--text);
}

.demo-card span:last-child {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Profile board panel */
.profile-panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.profile-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.profile-head .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-muted);
  border: 1px solid var(--line);
}

.profile-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.profile-head .bio {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 36ch;
}

.profile-head .stats {
  margin: 0;
  font-size: 0.85rem;
  color: var(--dim);
}

.profile-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dossier-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  margin-left: 0.35rem;
}

/* Tabs */
.board-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  border-top: 1px solid var(--line);
  margin: 0 0 0.75rem;
}

.board-tab {
  appearance: none;
  background: none;
  border: none;
  border-top: 1px solid transparent;
  margin-top: -1px;
  padding: 0.85rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  cursor: pointer;
  font-family: var(--font);
}

.board-tab.active {
  color: var(--text);
  border-top-color: var(--text);
}

/* IG-style grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.media-grid.stories-mode .media-cell {
  aspect-ratio: 9 / 16;
}

.media-cell {
  position: relative;
  aspect-ratio: 1;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}

.media-cell:hover {
  opacity: 0.92;
}

.media-cell img,
.media-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #1a1a1a;
}

.media-cell .badge-type {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.media-cell .btn-dl {
  position: absolute;
  right: 6px;
  top: 6px;
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #0a0a0a;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.media-cell:hover .btn-dl {
  opacity: 1;
}

.grid-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.grid-lock {
  grid-column: 1 / -1;
  background: var(--bg-elev);
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.grid-lock p {
  margin: 0.35rem 0;
}

.grid-lock .btn {
  margin: 0.25rem;
}

@media (max-width: 520px) {
  .profile-actions {
    margin-left: 0;
    width: 100%;
  }
}
