:root {
  --ink: #050505;
  --void: #000000;
  --surface: #df765a;
  --elevated: #c85a3e;
  --border: rgba(244,241,234,.16);
  --cream: #f4f1ea;
  --muted: #f3d4c6;
  --coral: #df765a;
  --coral-deep: #9e3520;
  --leaf: #df765a;
  --green: #3d9b6a;
  --amber: #d4a017;
  --red: #c44a30;
  --font: "Lexend", system-ui, sans-serif;
  --radius: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --dust: url("/leaf-dust.png?v=4");
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font); }
html, body { height: 100%; }
html, body, button, input, select, textarea { font-family: var(--font); }
body {
  font-family: var(--font);
  background-color: var(--ink);
  background-image: var(--dust);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
.tabular { font-variant-numeric: tabular-nums; }

.entry {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  transition: opacity .7s cubic-bezier(.22,1,.36,1), filter .7s cubic-bezier(.22,1,.36,1);
}
.entry.exiting { opacity: 0; filter: blur(10px); pointer-events: none; }
.entry-glow { display: none; }
.entry video {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 62dvh;
  object-fit: contain;
  background: #000;
  z-index: 1;
}
.entry-actions {
  position: absolute;
  left: 50%;
  top: calc(46% + min(31dvh, 34vw));
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 0 1rem;
}
.entry-actions .entry-leaf {
  min-width: 0;
  width: 8.6rem;
  height: 3.8rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: grid;
  place-items: center;
  animation: leafPulse 2.4s ease-in-out infinite;
}
.entry-actions .entry-leaf img,
.entry-actions .entry-leaf span { grid-area: 1 / 1; }
.entry-actions .entry-leaf img {
  width: 6.6rem;
  height: 6.6rem;
  object-fit: contain;
  transform: rotate(90deg) scaleX(0.55);
  filter: drop-shadow(0 6px 18px rgba(223,118,90,.45));
}
.entry-actions .entry-leaf span {
  position: relative;
  z-index: 1;
  color: #fff8f3;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(80, 18, 8, .55);
}
.entry-actions .entry-leaf:active { transform: scale(.92); animation: none; }
@keyframes leafPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.entry-actions .skip { height: 2.75rem; padding: 0 1rem; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(244,241,234,.5); }
.entry-mute { position: absolute; top: max(.75rem, var(--safe-t)); right: .75rem; width: 2.75rem; height: 2.75rem; border-radius: 8px; display: grid; place-items: center; }
.entry-cta { opacity: 1; transition: opacity .45s ease; }
.entry-cta.is-waiting { opacity: 0; pointer-events: none; }

.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .75rem 1rem; padding-top: max(.75rem, var(--safe-t));
  background: rgba(0, 0, 0, .78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.brand-stack { display: flex; flex-direction: column; gap: .08rem; min-width: 0; }
.brand-mark { width: 2.7rem; height: 2.15rem; border-radius: 8px; background: #fff; border: 1px solid rgba(244,241,234,.4); display: grid; place-items: center; flex-shrink: 0; padding: .2rem .28rem; }
.brand-mark img, .brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: block; font-size: .95rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.who-block { text-align: right; min-width: 0; max-width: 13.5rem; cursor: pointer; }
.who-name { display: block; font-size: .78rem; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-role { display: block; font-size: .68rem; font-weight: 500; color: var(--cream); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-meta { display: block; font-size: .58rem; color: var(--muted); line-height: 1.25; margin-top: .08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 2.35rem; height: 2.35rem; border-radius: 999px; background: var(--elevated); border: 1px solid var(--border); display: grid; place-items: center; font-size: .75rem; font-weight: 600; overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.role-chip { display: none; }
.nav { display: flex; gap: .25rem; overflow-x: auto; padding: .5rem 1rem; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { flex-shrink: 0; height: 2.25rem; padding: 0 .9rem; border-radius: 999px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.nav button.active { background: var(--elevated); color: var(--cream); }
@media (max-width: 820px) {
  .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
    gap: .35rem;
    padding: .55rem .55rem .7rem;
  }
  .nav button {
    width: 100%;
    height: 2.7rem;
    padding: 0 .2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(244,241,234,.07);
    font-size: .68rem;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav button.active {
    background: var(--elevated);
    border-color: transparent;
    color: var(--cream);
  }
}
.dash-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: 0 0 1.25rem; }
.dash-tools .btn { width: 100%; }
.main { flex: 1; padding: 1rem; padding-bottom: max(1.5rem, var(--safe-b)); max-width: 1100px; margin: 0 auto; width: 100%; }

.page-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: .25rem; }
.page-sub { color: var(--muted); font-size: .875rem; margin-bottom: 1.25rem; }
.grid { display: grid; gap: .75rem; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .page-title { font-size: 1.75rem; }
}
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.card h3 { font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.stat { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; }
.stat-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.gauge { height: .5rem; border-radius: 999px; background: var(--elevated); overflow: hidden; margin-top: .75rem; }
.gauge > span { display: block; height: 100%; border-radius: 999px; background: var(--cream); }
.gauge.green > span { background: var(--green); }
.gauge.amber > span { background: var(--amber); }
.badge { display: inline-flex; align-items: center; height: 1.35rem; padding: 0 .45rem; border-radius: 999px; font-size: .65rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.badge.gold { background: rgba(212,160,23,.18); color: #e8c04a; }
.badge.silver { background: rgba(180,190,200,.15); color: #c0c8d0; }
.badge.elite { background: rgba(244,241,234,.18); color: var(--cream); }
.badge.ok { background: rgba(47,122,82,.28); color: #d4f0e0; }
.badge.warn { background: rgba(212,160,23,.28); color: #ffe08a; }
.badge.bad { background: rgba(90,20,12,.35); color: #ffd0c4; }
.list { display: flex; flex-direction: column; gap: .5rem; }
.row { display: flex; align-items: center; gap: .75rem; padding: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; width: 100%; text-align: left; }
.rank { width: 1.75rem; text-align: center; font-weight: 600; font-size: .9rem; color: var(--muted); }
.rank.top { color: var(--cream); }
.person { flex: 1; min-width: 0; }
.person .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .meta { font-size: .75rem; color: var(--muted); }
.score { font-weight: 600; font-size: 1.05rem; }
.photo { width: 2.5rem; height: 2.5rem; border-radius: 999px; background: var(--elevated); display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex-shrink: 0; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.75rem; padding: 0 1.1rem; border-radius: 8px; font-weight: 500; font-size: .875rem; }
.btn-primary { background: var(--cream); color: #7a2416; }
.btn-ghost { background: var(--elevated); border: 1px solid var(--border); }
.btn-block { width: 100%; }
.field { margin-bottom: .85rem; }
.field label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .35rem; }
.field input, .field select, .field textarea { width: 100%; height: 2.75rem; padding: 0 .85rem; background: var(--elevated); border: 1px solid var(--border); border-radius: 8px; outline: none; }
.field textarea { height: auto; padding: .75rem .85rem; min-height: 5rem; }

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 22rem;
  background: #7a2a18;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 1.5rem 1.4rem 1.6rem;
  color: #fff;
}
.login-mark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.login-mark img {
  width: 118%;
  max-width: none;
  height: 118%;
  object-fit: contain;
  opacity: .42;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
}
.login-mark span {
  position: absolute;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: #fff;
  opacity: .24;
  text-align: center;
}
.login-card > *:not(.login-mark) { position: relative; z-index: 1; }
.login-brand { margin-bottom: 1.15rem; }
.login-brand .brand-text { color: #fff; }
.login-card h1 { font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 1.15rem; color: #fff; }
.login-card p { color: rgba(255,255,255,.86); font-size: .875rem; margin-bottom: 1.25rem; }
.login-card .field { margin-bottom: 1rem; }
.login-card .field label { color: #fff; font-size: .78rem; font-weight: 500; }
.login-card .field input {
  background: rgba(0,0,0,.28);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}
.login-card .field input::placeholder { color: rgba(255,255,255,.5); }
.login-otp { letter-spacing: .35em; font-size: 1.25rem; text-align: center; font-weight: 600; }
.login-hint { color: rgba(255,255,255,.86); font-size: .8rem; margin: 0 0 .85rem; line-height: 1.4; }
.login-hint strong { font-weight: 600; color: #fff; }
.login-back {
  display: block;
  width: 100%;
  margin-top: .55rem;
  height: 2.5rem;
  background: transparent;
  color: #fff;
  font-size: .8rem;
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 .75rem; }
.section-head h2 { font-size: 1.05rem; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th, td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; background: var(--surface); letter-spacing: .04em; text-transform: uppercase; font-size: .65rem; }
.status { display: inline-flex; height: 1.35rem; padding: 0 .45rem; border-radius: 999px; font-size: .65rem; font-weight: 600; }
.tv { min-height: 100dvh; background-color: var(--ink); background-image: var(--dust); background-size: cover; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.tv-header { display: flex; justify-content: space-between; align-items: center; }
.tv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; flex: 1; }
.tv-card { background: var(--surface); border-radius: 16px; padding: 1.25rem; }
.tv-big { font-size: 3rem; font-weight: 600; line-height: 1; }
.toast { position: fixed; bottom: max(1.25rem, var(--safe-b)); left: 50%; transform: translateX(-50%); background: var(--cream); color: #7a2416; padding: .75rem 1.25rem; border-radius: 999px; font-size: .85rem; font-weight: 500; z-index: 200; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.legend-card { padding: .5rem; overflow: hidden; }
.legend-card img { width: 100%; height: auto; border-radius: 8px; background: #faf6ef; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem; margin-bottom: 1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { height: 2rem; padding: 0 .75rem; border-radius: 999px; font-size: .75rem; border: 1px solid var(--border); color: var(--muted); }
.chip.active { background: var(--cream); border-color: var(--cream); color: #7a2416; }
.hidden { display: none !important; }

.dir-mvp { width: 100%; display: flex; align-items: center; justify-content: center; gap: .55rem; height: 2.85rem; margin-bottom: .7rem; border-radius: 10px; background: #c65a3c; color: #fff8f3; font-weight: 600; }
.dir-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .35rem; }
.dir-count { font-size: .8rem; color: var(--muted); }
.dir-modes { display: flex; gap: .45rem; margin: .65rem 0 .9rem; }
.dir-search-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; }
.dir-search { flex: 1; display: flex; align-items: center; gap: .55rem; height: 2.75rem; padding: 0 .9rem; border-radius: 999px; background: rgba(244,241,234,.08); border: 1px solid var(--border); color: var(--muted); }
.dir-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; color: var(--cream); font-size: .95rem; }
.dir-filter-btn { width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(244,241,234,.08); color: var(--muted); display: grid; place-items: center; }
.dir-section { margin-bottom: 1.35rem; }
.dir-section-title { font-size: 1.05rem; font-weight: 600; margin: .35rem 0 .85rem; }
.dir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem .7rem; }
.dir-card { text-align: center; }
.dir-avatar-wrap { position: relative; width: 7.4rem; height: 7.4rem; margin: 0 auto .7rem; }
.dir-avatar { width: 100%; height: 100%; border-radius: 999px; overflow: hidden; background: var(--elevated); display: grid; place-items: center; font-weight: 600; font-size: 1.4rem; }
.dir-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dir-more { position: absolute; top: .1rem; right: -.15rem; width: 1.85rem; height: 1.85rem; border-radius: 999px; background: rgba(20,16,12,.55); display: grid; place-items: center; }
.dir-menu { position: absolute; top: 2rem; right: -.35rem; z-index: 5; min-width: 8.5rem; padding: .3rem; border-radius: 10px; background: #2a1b14; border: 1px solid var(--border); text-align: left; }
.dir-menu button, .dir-menu a { display: block; width: 100%; text-align: left; padding: .5rem .65rem; border-radius: 7px; font-size: .8rem; }
.dir-place { font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #f0a489; margin-bottom: .25rem; }
.dir-name { display: flex; flex-direction: column; align-items: center; width: 100%; font-size: 1.02rem; font-weight: 600; }
.dir-role { font-size: .78rem; color: var(--muted); margin: .15rem 0 0; }
.peer-stars {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: .4rem;
  padding: 0;
  background: none;
  border: 0;
}
.peer-stars-row {
  display: flex;
  gap: .12rem;
  justify-content: center;
  align-items: center;
}
.peer-slot {
  position: relative;
  width: .95rem;
  height: .95rem;
  display: block;
  flex: 0 0 .95rem;
  overflow: hidden;
}
.peer-slot .star { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.peer-slot .star.empty { fill: rgba(244,241,234,.22); }
.peer-slot .star.full { fill: #E8C04A; clip-path: inset(0 calc(100% - var(--fill, 0%)) 0 0); }
.prof .peer-stars { justify-content: flex-start; margin: .45rem 0 1rem; }
.stars {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  width: 5.6rem;
  height: 1.05rem;
  margin: 0 auto;
  padding: .4rem 0 0;
  border-top: 1px solid rgba(255,227,74,.28);
  box-sizing: content-box;
}
.star-slot {
  position: relative;
  display: block;
  width: .88rem;
  height: .88rem;
  flex: 0 0 .88rem;
  overflow: hidden;
}
.star-slot .star { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.star { width: .88rem; height: .88rem; fill: rgba(255,227,74,.22); }
.star.empty { fill: rgba(255,227,74,.22); }
.star.full { fill: #FFE34A; clip-path: inset(0 calc(100% - var(--fill, 0%)) 0 0); }
.score-stars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  flex-shrink: 0;
  isolation: isolate;
  min-width: 5.8rem;
  padding: .1rem 0 0;
}
.score-stars .score-num {
  position: static;
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  padding-bottom: .05rem;
}
.score-stars.inline,
.score-stars.peer {
  flex-direction: column;
  align-items: center;
}
.stars-btn, .stars-static {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: .45rem auto 0;
  width: 100%;
}
.dash-kpi .score-stars { align-items: flex-start; min-width: 0; }
.dash-kpi .stars { margin: 0; width: 6rem; }
.dash-kpi .star-slot { width: .94rem; height: .94rem; flex-basis: .94rem; }
.dash-kpi .score-num { font-size: 1.45rem; }
.pillar .score-stars { align-items: center; width: 100%; min-width: 0; margin-top: .15rem; }
.pillar .stars { width: 4.8rem; }
.pillar .star-slot { width: .74rem; height: .74rem; flex-basis: .74rem; }
.pillar .score-num { font-size: .95rem; }
.score { flex-shrink: 0; margin-left: .85rem; }
.score .score-stars { align-items: center; }
.row .person { min-width: 0; padding-right: .35rem; }
.fives-card .score-stars { margin-top: .55rem; align-items: flex-start; min-width: 0; }
.fives-card .stars { margin: 0; }
.tv-score { align-items: flex-start; min-width: 0; }
.tv-score .stars { width: 7.2rem; }
.tv-score .star-slot { width: 1.15rem; height: 1.15rem; flex-basis: 1.15rem; }
.tv-score .score-num { font-size: 3rem; font-weight: 600; line-height: 1; padding-bottom: .25rem; }
.data-table .score-stars { min-width: 0; }
.data-table .stars { width: 4.6rem; }
.data-table .score-stars .star-slot { width: .7rem; height: .7rem; flex-basis: .7rem; }
.data-table .score-num { font-size: .8rem; }
.data-name { background: none; border: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }

.photo-pick {
  width: 100%;
  min-height: 3.1rem;
  border-radius: 10px;
  background: #efe8df;
  border: 1px dashed #c9b6a6;
  color: #8a7366;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: .88rem;
}
.photo-pick img { width: 100%; height: 7.5rem; object-fit: cover; display: block; }
.add-user-sheet { max-height: min(94dvh, 48rem); }
.dir-peer-label { font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .35rem 0 .1rem; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .55rem 0 .15rem; }
@media (min-width: 640px) {
  .pillars { grid-template-columns: repeat(4, 1fr); }
}
.pillars.compact { gap: .25rem; }
.pillar { background: rgba(0,0,0,.28); border: 1px solid rgba(244,241,234,.12); border-radius: 8px; padding: .5rem .4rem .55rem; text-align: center; overflow: hidden; }
.pillar span { display: block; font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pillar strong { display: block; font-size: .92rem; }
.pillar.combined { background: rgba(244,241,234,.14); border-color: rgba(244,241,234,.28); }

.prof-back { width: 2.4rem; height: 2.4rem; border-radius: 999px; background: rgba(244,241,234,.1); border: 1px solid var(--border); display: grid; place-items: center; margin-bottom: .75rem; }
.prof-hero { width: 100%; aspect-ratio: 1 / 1.02; max-height: 22rem; border-radius: 10px; overflow: hidden; background: var(--elevated); margin-bottom: .85rem; display: grid; place-items: center; font-size: 2.4rem; }
.prof-hero img { width: 100%; height: 100%; object-fit: cover; }
.prof-kicker { font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #f0a489; }
.prof-name { font-size: 1.7rem; font-weight: 600; margin: .15rem 0; }
.prof-tenure { font-size: .88rem; color: var(--muted); }
.prof-self-edit { display: flex; justify-content: flex-end; }
.prof-self-edit .dir-more { position: static; background: rgba(244,241,234,.1); }
.prof-h { font-size: 1.15rem; font-weight: 700; margin: 1.35rem 0 .45rem; }
.prof-race-row { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.prof-race-copy { flex: 1; }
.prof-race-rank { font-weight: 600; }
.prof-race-month { font-size: .78rem; color: var(--muted); }
.prof-facts { margin-top: .5rem; border-top: 1px solid var(--border); }
.prof-fact { display: flex; justify-content: space-between; gap: 1rem; padding: .78rem 0; border-bottom: 1px solid var(--border); }
.prof-fact span { color: var(--muted); }
.prof-reach { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 0 1rem; }
.prof-reach-who { display: flex; align-items: center; gap: .7rem; }
.prof-reach-photo { width: 2.7rem; height: 2.7rem; border-radius: 999px; overflow: hidden; background: var(--elevated); display: grid; place-items: center; }
.prof-reach-photo img { width: 100%; height: 100%; object-fit: cover; }
.prof-reach-hint { font-size: .72rem; color: var(--muted); }
.prof-reach-acts { display: flex; gap: .35rem; }
.prof-act { width: 2.35rem; height: 2.35rem; border-radius: 999px; background: rgba(244,241,234,.1); color: #f0a489; display: grid; place-items: center; }
.prof-mates { display: flex; flex-direction: column; }
.prof-mate { display: flex; align-items: flex-start; gap: .35rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.prof-mate-main { display: flex; align-items: flex-start; gap: .7rem; flex: 1; text-align: left; }
.prof-mate-photo { width: 3.1rem; height: 3.1rem; border-radius: 8px; overflow: hidden; background: var(--elevated); display: grid; place-items: center; }
.prof-mate-photo img { width: 100%; height: 100%; object-fit: cover; }
.prof-mate-name { font-size: 1.02rem; font-weight: 600; }

.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(8,12,8,.55); display: flex; align-items: flex-end; justify-content: center; padding: .45rem; }
.modal-sheet { width: 100%; max-width: 26.5rem; max-height: min(94dvh, 42rem); overflow: auto; background: #f6f0e8; color: #2a1812; border-radius: 18px 18px 12px 12px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
@media (min-width: 560px) { .modal-back { align-items: center; } .modal-sheet { border-radius: 16px; } }
.modal-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .85rem .4rem; position: sticky; top: 0; background: #f6f0e8; z-index: 1; }
.modal-head h2 { flex: 1; font-size: 1.02rem; font-weight: 600; text-align: center; }
.modal-head .prof-back { margin: 0; background: #efe6dc; color: #2a1812; }
.modal-x { width: 2.4rem; height: 2.4rem; border-radius: 999px; display: grid; place-items: center; color: #5c463c; }
.modal-body { padding: .4rem 1.1rem 0; }
.modal-sheet .field label { color: #6a5348; display: flex; justify-content: space-between; }
.modal-sheet .field label em { font-style: normal; font-size: .68rem; color: #9a8376; }
.modal-sheet .field input, .modal-sheet .field select, .modal-sheet .field textarea { background: #efe8df; border-color: #e0d3c6; color: #2a1812; }
.modal-foot { display: flex; justify-content: flex-end; gap: .55rem; padding: .9rem 1.1rem 1.1rem; position: sticky; bottom: 0; background: #f6f0e8; }
.modal-sheet .btn-ghost { background: #efe6dc; color: #2a1812; }
.modal-sheet .btn-primary { background: #e8a090; color: #fff; }
.edit-photo-preview { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #efe6dc; margin-bottom: .85rem; }

.sg-stars { display: flex; gap: .45rem; align-items: center; min-height: 3.2rem; padding: .15rem 0 .4rem; }
.sg-star { width: 2.85rem; height: 2.85rem; display: grid; place-items: center; border-radius: 8px; background: #efe6dc; border: 1px solid #c9b6a6; }
.sg-star svg { width: 1.7rem; height: 1.7rem; fill: #fff; stroke: #4a342c; stroke-width: 1.4; stroke-linejoin: round; }
.sg-star.on { background: #fff6d8; border-color: #e8c04a; }
.sg-star.on svg { fill: #E8C04A; stroke: #b8860b; }

.dash-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .35rem; }
.dash-kpis-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .dash-kpis { grid-template-columns: repeat(4, 1fr); }
  .dash-kpis-3 { grid-template-columns: repeat(3, 1fr); }
}
.dash-kpi .stat { font-size: 1.45rem; }
.dash-split { display: grid; grid-template-columns: 1fr; }
@media (min-width: 860px) { .dash-split { grid-template-columns: 1fr 1fr; } }

.fives-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin: 0 0 .85rem; }
.fives-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-bottom: 1.4rem; }
@media (min-width: 640px) { .fives-grid { grid-template-columns: 1fr 1fr; } }
.fives-card { background: var(--surface); border-radius: 12px; overflow: hidden; }
.fives-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.fives-card figcaption { padding: .65rem .75rem .8rem; }
.fives-card strong { display: block; font-size: 1.05rem; }
.fives-card span { display: block; font-size: .78rem; color: var(--muted); margin-top: .2rem; line-height: 1.35; }
.fives-fix { display: block; font-style: normal; font-size: .78rem; color: #ffe08a; margin-top: .45rem; line-height: 1.4; }
.fives-coach { font-size: .82rem; color: #ffe08a; margin: -.35rem 0 .85rem; line-height: 1.4; }

.data-access { margin: 0 0 1rem; }
.data-access h2 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.data-access-list { list-style: none; display: flex; flex-direction: column; gap: .45rem; margin: 0 0 .85rem; }
.data-access-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.data-access-list strong { display: block; font-size: .92rem; }
.data-access-list em { display: block; font-style: normal; font-size: .72rem; color: var(--muted); }
.data-you { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.data-revoke { height: 2.25rem; padding: 0 .7rem; border-radius: 8px; background: rgba(0,0,0,.22); border: 1px solid var(--border); font-size: .75rem; }
.data-add { display: flex; gap: .5rem; align-items: center; }
.data-add select { flex: 1; min-width: 0; height: 2.75rem; padding: 0 .75rem; background: var(--elevated); border: 1px solid var(--border); border-radius: 8px; color: var(--cream); }
.data-add .btn { flex-shrink: 0; height: 2.75rem; }
.data-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .35rem 0 .75rem; }
.data-search { margin-bottom: .85rem; }
.data-table { background: var(--surface); margin-bottom: .5rem; }
.data-table .data-row { cursor: pointer; }
.data-table .data-row:hover { background: rgba(0,0,0,.16); }

@media (max-width: 390px) {
  .dir-avatar-wrap { width: 6.5rem; height: 6.5rem; }
  .fives-cats { grid-template-columns: repeat(3, 1fr); }
  .data-add { flex-direction: column; align-items: stretch; }
}
