/* The people pages. Colours, the top bar and chips come from shared/theme.css. */
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#layout { flex: 1; display: grid; grid-template-columns: 280px 1fr; min-height: 0; }

/* ---- the list of everyone ---- */
#side { border-right: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 14px 12px 30px; }
#q {
  width: 100%; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--field); font-size: 16px; outline: none; margin-bottom: 8px;
}
#q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
#list h2 { margin: 16px 8px 6px; }
.who {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 5px 8px;
  border: 0; background: none; border-radius: 12px; cursor: pointer;
}
.who:hover { background: var(--sel); }
.who.on { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.who .face { width: 34px; height: 34px; flex: none; }
.who .nm { font-size: 16.5px; line-height: 1.15; }
.who .rl { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }

/* a portrait in a circle, or the initial when there's no picture */
.face {
  border-radius: 50%; background: var(--sel) center / cover no-repeat; color: var(--muted);
  display: grid; place-items: center; font: 600 15px "Cormorant Garamond", Georgia, serif;
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--g, var(--line));
}

/* ---- the main page ---- */
#main { overflow: auto; padding: 26px 34px 60px; }
.page { max-width: 980px; margin: 0 auto; }
.back { border: 0; background: none; color: var(--link); cursor: pointer; padding: 0; margin-bottom: 12px; font-size: 15px; display: none; }

.hero { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 28px; align-items: start; }
.portrait {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 15%; border-radius: 22px;
  box-shadow: 0 20px 50px var(--shadow), 0 0 0 1px var(--line); cursor: zoom-in; background: var(--sel);
}
.noportrait {
  aspect-ratio: 3 / 4; border-radius: 22px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, var(--glow), var(--sel) 70%);
  font: 600 110px "Cormorant Garamond", Georgia, serif; color: var(--panel);
}
.hero h1 { font: 600 46px/1.05 "Cormorant Garamond", Georgia, serif; margin: 4px 0 6px; }
.hero .aka { color: var(--muted); font-style: italic; margin: 0 0 10px; }
.hero .role { font-size: 18.5px; margin: 0 0 16px; }
.group { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--g, var(--muted)); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 0 0 16px; }
.facts .wide { grid-column: 1 / -1; }
.k { display: block; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

section.part { margin-top: 38px; }
.inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.card.secret { border-color: var(--bad); border-style: dashed; }
.card.secret .k { color: var(--bad); }

/* the relationship web */
.web { width: 100%; height: auto; display: block; }
.web .line { stroke: var(--muted); stroke-width: 1.6; opacity: .55; fill: none; }
.web .line.in { stroke-dasharray: 5 5; }
.web .rel { font: italic 13px "EB Garamond", Georgia, serif; fill: var(--muted); text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.web .lbl { font: 500 15px "EB Garamond", Georgia, serif; fill: var(--fg); text-anchor: middle; }
.web .node { cursor: pointer; }
.web .node:hover .ring { stroke-width: 4; }
.web .ring { fill: none; stroke-width: 2.5; }
.web .disc { fill: var(--sel); }
.web .init { font: 600 22px "Cormorant Garamond", Georgia, serif; fill: var(--muted); text-anchor: middle; dominant-baseline: central; }
.web .centre .ring { stroke-width: 4; }
.web.narrow .rel { display: none; }
.web.narrow .lbl { font-size: 13px; }
.web.narrow .init { font-size: 17px; }
.legend { font-size: 14px; color: var(--muted); margin: 4px 0 14px; }
.rels { list-style: none; padding: 0; margin: 10px 0 0; columns: 2 300px; column-gap: 28px; }
.rels li { break-inside: avoid; margin-bottom: 8px; }
.rels .lab { color: var(--muted); font-style: italic; }

/* the journey mini-map */
.minimap { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px var(--shadow), 0 0 0 1px var(--line); }
.minimap svg { display: block; width: 100%; height: auto; }
.minimap image { filter: var(--map-filter); }
.stops { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; }
.stops b { color: var(--c); }

.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pics img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; cursor: zoom-in; border: 1px solid var(--line); }
details.rest summary { cursor: pointer; color: var(--link); }
.body p { margin: 0 0 10px; }
.body .field { margin: 0 0 8px; }
.body a, a.link, .link { color: var(--link); text-decoration: none; border-bottom: 1px solid var(--glow); cursor: pointer; }
.body .dead { color: var(--muted); }

/* the everyone page */
.everyone h1 { font: 600 40px "Cormorant Garamond", Georgia, serif; margin: 0 0 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 10px; }
.tile { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 14px 10px 12px; text-align: center; cursor: pointer; }
.tile:hover { border-color: var(--glow); box-shadow: 0 10px 26px var(--shadow); }
.tile .face { width: 86px; height: 86px; margin: 0 auto 8px; font-size: 30px; }
.tile .nm { font: 600 19px/1.1 "Cormorant Garamond", Georgia, serif; }
.tile .rl { font-size: 13px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.everyone #q2 { width: 100%; max-width: 360px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); font-size: 16px; outline: none; display: none; margin: 8px 0 4px; }

#lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 8, 6, .85);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out;
}
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px #000; }
#lightbox p { color: #f0e6d6; font-style: italic; }

@media (max-width: 900px) {
  #layout { grid-template-columns: 1fr; }
  #side { display: none; }
  #main { padding: 18px 16px 50px; }
  .back { display: inline-block; }
  .everyone #q2 { display: block; }
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .portrait, .noportrait { max-width: 320px; }
  .hero h1 { font-size: 38px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .tile .face { width: 70px; height: 70px; }
}
