/* Umbra / projection. Shared geometry and surfaces, with page-owned layouts. */
:root {
  --radius: 10px;
  --radius-small: 8px;
  --radius-card: 16px;
  --radius-panel: 20px;
  --line-soft: #ffffff12;
  --line-interactive: #ffffff30;
  --surface-recessed: #111418;
  --surface-overlay: #171a20;
  --poster-ink: #f4f4f6;
  --poster-overlay: #12151cec;
  --shadow-card: 0 3px 8px #0002, 0 18px 36px #0002;
  --shadow-dialog: 0 24px 100px #0009;
}
.button, .icon-button, input:not([type=checkbox]):not([type=radio]), select, textarea {border-radius:var(--radius)}
.button {transition:background-color 160ms ease,border-color 160ms ease,color 160ms ease,transform 160ms ease}
.button.secondary {background:var(--surface-recessed);border-color:var(--line-interactive)}
.button.secondary:hover {background:var(--raised);border-color:var(--primary)}
.button:active:not(:disabled):not([aria-disabled=true]) {transform:translateY(1px)}
.text-link {text-underline-offset:5px}
.site-header {border-bottom-color:var(--line-soft)}
.site-footer {border-color:var(--line-soft);padding-block:28px;gap:24px}
.site-footer>p {margin:0;color:var(--subtle);font-size:12px}
.site-footer>div {gap:16px}
.site-footer a {font-size:12px}
.main-nav>a.active:after {height:2px;border-radius:2px}
.search-box,.search-box.large {border-radius:12px;border-color:var(--line-interactive)}
.search-region {isolation:isolate;z-index:5}
.suggestions {max-height:min(390px,55dvh);overflow-y:auto;overscroll-behavior:contain;background:var(--surface-overlay);border:1px solid var(--line-interactive);border-radius:14px;box-shadow:var(--shadow-dialog);z-index:20;scrollbar-width:thin}
.suggestions a {border-radius:8px}
.suggestions li[aria-selected=true] {border-radius:8px;outline:1px solid var(--primary);outline-offset:-1px}

/* A poster is the image first; its signature carries only two priority facts. */
.film-card {position:relative;perspective:none;container-type:inline-size}
.film-card .poster-wrap {border-radius:12px;transform-origin:center;transition:transform 200ms ease}
.film-card .poster-link {border-radius:12px;border:1px solid var(--line-soft);box-shadow:var(--shadow-card);background:var(--surface-recessed)}
.film-card .poster-link img {object-fit:cover;transition:transform 350ms ease;filter:none}
.film-card .poster-link:focus-visible {outline:2px solid var(--primary);outline-offset:4px}
.film-card .poster-title {bottom:50px;font-size:clamp(20px,12cqw,34px);line-height:1.07}
.poster-signature {position:absolute;inset:auto 8px 8px;display:flex;align-items:stretch;justify-content:space-between;min-width:0;max-width:max-content;gap:0;color:var(--poster-ink);background:var(--poster-overlay);border:1px solid var(--line-interactive);border-radius:7px;box-shadow:0 3px 10px #0003;overflow:hidden}
.poster-kind {display:flex;align-items:center;gap:5px;min-width:0;padding:6px 8px;font:500 10px/1.2 var(--font);letter-spacing:.025em}
.poster-kind>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.poster-kind .icon {width:11px;height:11px;flex:none;opacity:.85;stroke-width:1.5}
.poster-definition {display:inline-flex;align-items:center;gap:1px;flex:none;padding:6px 8px;border-left:1px solid var(--line-interactive);font:700 10px/1.2 var(--font);letter-spacing:.02em;color:var(--primary);font-variant-numeric:tabular-nums}
.poster-partial {font-size:10px;align-self:flex-start;line-height:.9}
.card-caption {gap:10px;padding-top:12px;align-items:flex-start}
.card-caption>div {min-width:0;flex:1}
.card-caption h3 {font:550 14px/1.45 var(--font);letter-spacing:-.015em;margin-bottom:5px}
.card-caption h3 a {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-caption h3 a:hover {color:var(--primary)}
.card-caption p {display:flex;align-items:center;gap:10px;font-size:11px;line-height:1.5;min-height:18px}
.card-caption p>span {margin:0;color:var(--muted)}
.card-caption .card-rating {display:inline-flex;gap:4px;align-items:center;margin-left:auto;color:var(--muted)}
.card-caption .card-rating svg {height:11px;width:11px;color:var(--primary)}
.card-caption .card-rating strong {font-weight:550;color:var(--ivory);font-variant-numeric:tabular-nums}
.card-caption .rank {font:500 38px/1 var(--display);color:var(--subtle);opacity:.7;padding-top:1px}
.film-grid {gap:28px 20px}
.film-row {padding-top:5px;gap:20px}
.section-top h2 {font-size:clamp(26px,3vw,34px);letter-spacing:.02em}
.section-top .eyebrow {color:var(--subtle);font-size:9px;margin-bottom:8px}
.collection-card {border-radius:var(--radius-card);border-color:var(--line-soft);box-shadow:var(--shadow-card)}
.genre-pills>a {border-radius:var(--radius-small);border-color:var(--line-interactive);font-size:12px}
.genre-pills>a.selected {border-color:var(--primary);background:rgba(var(--accent-rgb),.09)}

/* Related surfaces share a quiet edge, not a heavy frame. */
.community-panel,.community-feature,.account-panel,.stats-panel,.mfa-panel,.version-card,.contribution-card,.legal-card,.staff-panel {border-radius:var(--radius-panel);border-color:var(--line-soft);box-shadow:var(--shadow-card);background:var(--surface)}
.community-panel {padding:26px}
.community-panel>h2,.community-toolbar h2 {font-size:28px}
.community-dialog,dialog.community-dialog {border-radius:22px;background:var(--surface-overlay);border-color:var(--line-interactive);box-shadow:var(--shadow-dialog)}
.community-nav {gap:3px;border-color:var(--line-soft);padding-bottom:14px;margin-bottom:28px}
.community-nav a {border-radius:var(--radius-small);padding:10px 13px;font-size:12px}
.community-nav a[aria-current] {background:rgba(var(--accent-rgb),.08);border-color:rgba(var(--accent-rgb),.18)}
.community-shell[data-community-page=contributions] .community-heading,.community-shell[data-community-page=moderation] .community-heading {margin-bottom:22px}
.community-toolbar {align-items:center;gap:24px;margin-bottom:20px}
.community-toolbar h2 {margin-bottom:9px}
.community-toolbar p {max-width:600px;font-size:13px;line-height:1.65;color:var(--muted)}
.community-filter {max-width:235px;margin-bottom:20px}
.community-contributions {display:grid;gap:14px}
.contribution-card {position:relative;display:flex;align-items:center;justify-content:space-between;gap:26px;padding:23px 26px;margin:0;transition:border-color 180ms ease,background-color 180ms ease}
.contribution-card:hover {border-color:var(--line-interactive)}
.contribution-card>div:first-child {min-width:0;flex:1}
.contribution-card h3 {font:550 18px/1.45 var(--font);margin:10px 0 5px;letter-spacing:-.02em;overflow-wrap:anywhere}
.contribution-card p:empty {display:none}
.contribution-card p {font-size:13px;line-height:1.65;margin:0 0 9px;max-width:720px;color:var(--muted);overflow-wrap:anywhere}
.contribution-card .contribution-revision {font-size:11px;color:var(--subtle);font-variant-numeric:tabular-nums}
.contribution-card .community-actions {margin:0;gap:9px;flex:none}
.contribution-card .community-actions .button {min-height:42px;padding:9px 13px;font-size:12px}
.state-tag {border-radius:6px;letter-spacing:.035em;font-size:10px;line-height:1.45;padding:5px 8px}
.community-disclosure {border-radius:12px;border-color:var(--line-soft)}
.empty,.staff-empty {border:1px dashed var(--line-interactive);border-radius:var(--radius-panel);background:var(--surface-recessed)}
.empty h2,.empty h3 {font-size:clamp(25px,4vw,34px);max-width:560px}
.table-wrap {border-radius:var(--radius-card);border-color:var(--line-soft);overflow:auto}
.table-wrap th {color:var(--subtle);font-size:11px;font-weight:500;letter-spacing:.04em}
.table-wrap td {border-color:var(--line-soft)}
.profile-popover,.locale-choices {border-radius:14px;box-shadow:var(--shadow-dialog);background:var(--surface-overlay);border-color:var(--line-interactive)}
@media(hover:hover) and (pointer:fine) {
  .film-card:hover .poster-wrap {transform:translateY(-3px)}
  .film-card:hover .poster-link {border-color:rgba(var(--accent-rgb),.55)}
  .film-card:hover .poster-link img {transform:scale(1.035)}
}
@container (max-width:160px) {
  .poster-kind {padding:5px 6px;font-size:9px;gap:4px}
  .poster-kind .icon {display:none}
  .poster-definition {padding:5px 6px;font-size:9px}
  .card-caption h3 {font-size:12px}
}
@media(max-width:700px) {
  .community-panel {padding:20px}
  .contribution-card {padding:20px;align-items:flex-start;flex-direction:column;gap:18px}
  .contribution-card .community-actions {width:100%;justify-content:flex-start;flex-wrap:wrap}
  .community-toolbar {align-items:flex-start}
  .community-toolbar>.button {font-size:12px;padding:10px 12px}
  .film-grid {gap:24px 13px}
  .poster-signature {inset:auto 6px 6px}
  .site-footer {flex-direction:column;align-items:flex-start;padding-inline:20px}
  .site-footer>div {justify-content:flex-start;gap:12px 18px}
}
@media(max-width:600px) {
  .site-header .main-nav {gap:10px;justify-content:space-between}
  .site-header .main-nav>a {font-size:12px}
  .community-shell {padding-top:28px}
  .community-heading {margin-bottom:20px}
  .community-nav {margin-bottom:22px;padding-bottom:10px}
}
@media(prefers-reduced-motion:reduce) {
  .film-card .poster-wrap,.film-card .poster-link img,.button,.contribution-card {transition:none}
  .film-card:hover .poster-wrap,.film-card:hover .poster-link img {transform:none}
}
@media(forced-colors:active) {
  .poster-signature {background:Canvas;color:CanvasText;border-color:CanvasText}
  .poster-definition {color:CanvasText;border-color:CanvasText}
}
