.dir-page { padding: 18px 40px 0; max-width: 1280px; }

.dir-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.mini-logo { display: flex; align-items: flex-end; color: var(--ink); text-decoration: none;
  font-family: var(--blackletter); font-size: 40px; line-height: 1; }
.mini-logo img { height: 52px; margin-right: 1px; }
.mini-logo span { padding-bottom: 4px; }
.dir-nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-family: var(--gothic); font-size: 21px; }
.dir-nav a { color: var(--blue); text-decoration: none; }
.dir-nav a:hover { text-decoration: underline; }

.dir-title { margin: 18px 0 0; font-family: var(--gothic); font-weight: 700; color: var(--blue);
  font-size: clamp(36px, 5vw, 58px); line-height: 1; }
.dir-page .tagline { margin-top: 4px; }

.dir-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 8px; }
#search { flex: 1 1 240px; max-width: 340px; font: 18px var(--body); padding: 7px 12px;
  border: 2px solid var(--border); background: #fbf5e4; color: var(--ink); border-radius: 3px; }
#search:focus { outline: 3px solid var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 17px var(--gothic); padding: 3px 12px; border: 2px solid var(--border); border-radius: 20px;
  background: #f6ecd2; color: var(--ink); cursor: pointer; }
.chip[aria-pressed=true] { background: var(--blue); color: #f6ecd2; border-color: var(--gold); }
.sort { margin-left: auto; font-size: 17px; }
.sort select { font: 17px var(--body); padding: 4px 6px; border: 2px solid var(--border); background: #fbf5e4; }
.count { font-size: 15px; font-style: italic; opacity: .75; margin: 0 0 10px; }

.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; border: 2px solid var(--border);
  background: #efe2bf; text-align: left; padding: 0; font: inherit; color: inherit; cursor: pointer;
  transition: transform .15s, box-shadow .15s; }
.card:hover, .card:focus-visible { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(60,35,10,.3); outline: none; }
.card:focus-visible { box-shadow: 0 0 0 3px var(--gold); }
.card-banner { height: 92px; background-size: cover; background-position: center; border-bottom: 2px solid var(--border); }
.card-avatar { position: absolute; top: 46px; left: 14px; width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; object-position: center 20%; border: 3px solid var(--gold); background: #c9b27c;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.card-body { padding: 40px 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h2 { margin: 0; font-family: var(--gothic); font-weight: 700; font-size: 23px; line-height: 1.05; }
.handle { font-size: 15px; opacity: .7; margin: 0; }
.seal { display: inline-block; font: 13px var(--gothic); color: #f6ecd2; background: var(--red); border-radius: 10px;
  padding: 0 7px; margin-left: 4px; vertical-align: 2px; }
.card .bio { margin: 4px 0 6px; font-size: 16px; line-height: 1.3; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; }
.price { font-family: var(--gothic); font-size: 17px; color: #f6ecd2; background: var(--blue); padding: 1px 10px;
  border-radius: 2px; white-space: nowrap; }
.price.serf { background: var(--red); }
.price.royal { background: linear-gradient(#b8892a, #8a6418); }
.status { position: absolute; top: 102px; left: 84px; width: 16px; height: 16px; border-radius: 50%;
  background: #4f8a2b; border: 2px solid #efe2bf; }
.sub-ribbon { position: absolute; top: 8px; right: 8px; padding: 1px 10px; font-family: var(--gothic); font-size: 15px;
  color: var(--ink); background: var(--gold); border: 1px solid var(--border); }
.more-wrap { text-align: center; margin: 18px 0 0; }
.empty { grid-column: 1 / -1; text-align: center; font-style: italic; padding: 30px; }

/* ---------- profile dialog ---------- */
.profile { width: min(760px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 32px);
  padding: 0 0 18px; overflow-y: auto; }
.pf-banner { height: 170px; background-size: cover; background-position: center; border-bottom: 3px solid var(--gold); }
.pf-close { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold);
  background: rgba(20,34,82,.85); color: #f6ecd2; font-size: 28px; line-height: 1; cursor: pointer; }
.pf-head { display: flex; align-items: flex-end; gap: 14px; padding: 0 22px; margin-top: -56px; flex-wrap: wrap; }
.pf-avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 4px solid var(--gold); background: #c9b27c; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.pf-id { flex: 1; min-width: 180px; padding: 62px 0 6px; } /* text starts below the banner; only the avatar overlaps it */
.pf-id h2 { margin: 0; font-family: var(--gothic); font-size: 32px; line-height: 1.05; color: var(--ink); }
.pf-handle { margin: 2px 0 0; opacity: .7; }
.pf-sub { width: auto; font-size: 20px; padding: 8px 18px; text-decoration: none; margin-bottom: 8px; }
.pf-msg { padding: 0 22px; margin: 8px 0 0; font-style: italic; color: var(--red); }
.pf-msg:empty { display: none; }
.pf-msg a { color: var(--blue); }
.pf-bio { padding: 0 22px; margin: 12px 0 8px; font-size: 18px; }
.pf-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0 22px 12px;
  border-bottom: 2px solid var(--border); font-size: 16px; }
.pf-stats strong { font-family: var(--gothic); font-size: 20px; color: var(--red); }
.pf-posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px 22px 0; }
.pf-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 22px; padding: 10px 0 12px;
  border-bottom: 1px dotted var(--border); }
.pf-tip-label { font-family: var(--gothic); font-size: 20px; color: var(--red); }
.pf-tip .btn-small { margin: 0; }
.pf-tipped { flex-basis: 100%; margin: 2px 0 0; font-style: italic; }
.pf-tipped:empty { display: none; }
.pf-tipped a { color: var(--blue); }
.pp { border: 2px solid var(--border); background: #efe2bf; position: relative; overflow: hidden; }
.pp video, .pp .lock-img { display: block; width: 100%; aspect-ratio: 1280 / 704; object-fit: cover; }
.pp .lock-img { background-size: cover; background-position: center; filter: blur(9px) saturate(.7); transform: scale(1.1); }
.pp .lock { position: absolute; inset: 0 0 auto 0; aspect-ratio: 1280 / 704; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; color: #f6ecd2; text-align: center;
  background: rgba(20,34,82,.45); font-family: var(--gothic); font-size: 19px; padding: 8px; }
.pp .lock .btn { font-size: 16px; padding: 2px 14px; text-decoration: none; }
.pp .lock .lock-hint { font-family: var(--body); font-size: 14px; font-style: italic; opacity: .9; }
.pp.unlocked .lock-img { filter: none; transform: scaleX(-1); }   /* premium content: the same scene, mirrored */
.unlocked-tag { position: absolute; top: 8px; left: 8px; padding: 1px 10px; font-family: var(--gothic); font-size: 15px;
  color: var(--ink); background: var(--gold); border: 1px solid var(--border); }
.pp p { margin: 0; padding: 8px 10px; font-size: 16px; }
.pp.note { display: flex; align-items: center; padding: 16px; font-size: 19px; font-style: italic;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.4), rgba(0,0,0,0) 70%), #f3e8cc; }
.pp.note p { padding: 0; font-size: 19px; }
.pp.note p::before { content: "\201C"; font-size: 36px; line-height: 0; vertical-align: -12px; color: var(--red); margin-right: 3px; }

.dir-page .foot { margin: 22px -38px 0; }
@media (max-width: 640px) {
  .dir-page { padding: 14px 16px 0; }
  .sort { margin-left: 0; }
  .pf-posts { grid-template-columns: 1fr; padding: 14px 14px 0; }
  .pf-head, .pf-bio, .pf-stats { padding-left: 14px; padding-right: 14px; }
  .pf-tip { margin: 0 14px; }
  .pf-avatar { width: 104px; height: 104px; }
  .pf-banner { height: 130px; }
  .dir-page .foot { margin: 22px -16px 0; }
}
