:root { --bg:#14161c; --panel:#1f232d; --text:#f2f4f8; --muted:#8b93a5; --go:#2ea44f; --fail:#d73a49; --neutral:#3a4155; --ph:min(36dvh, 380px); }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { -webkit-text-size-adjust:100%; }
body { display:flex; flex-direction:column; margin:0; min-height:100dvh; font-family:system-ui, sans-serif; background:var(--bg); color:var(--text); touch-action:manipulation; }
nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 16px; background:var(--panel); }
nav .brand { margin-right:auto; font-weight:700; color:var(--text); text-decoration:none; }
.pill { background:var(--neutral); color:var(--text); border:0; border-radius:999px; padding:9px 14px; font:inherit; font-size:.9rem; text-decoration:none; cursor:pointer; }
main { width:100%; max-width:960px; margin:0 auto; padding:16px; flex:1; min-height:0; }
h1 { margin:.3em 0; }
.center { text-align:center; } .big { font-size:1.3rem; } .muted, .stats { color:var(--muted); }
.stats { text-align:center; margin-bottom:10px; font-size:.95rem; }
.flash { background:#3b3420; border:1px solid #8a6d1d; padding:10px 14px; border-radius:8px; margin-bottom:14px; }

/* poster: every poster gets the same 2:3 box, cropped to fit */
.card { text-align:center; flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; }
.card-inner { margin:auto 0; }  /* centred, but scrolls instead of clipping when the name is long */
body.fixed { height:100dvh; overflow:hidden; }
body.fixed main { display:flex; flex-direction:column; }
.play { flex:1; min-height:0; display:flex; flex-direction:column; }
.play > .stats, .play > .actions, .play > form { flex:none; }
.poster-wrap { position:relative; width:calc(var(--ph) * 2 / 3); height:var(--ph); margin:0 auto 12px; border-radius:12px; overflow:hidden; background:var(--panel); box-shadow:0 8px 30px #0008; }
.ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:4rem; }
.poster-wrap img, .thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
html[data-images="off"] .poster-wrap { display:none; }
html[data-images="off"] .thumb { opacity:.35; }

/* names (English / Danish) */
.name { display:block; } .name span { display:block; }
.card h1 { font-size:clamp(1.8rem, 8vw, 3.2rem); line-height:1.15; margin:.2em 0; overflow-wrap:anywhere; }
.name .t-da { font-size:.6em; font-weight:500; color:var(--muted); }
.compact .name span { display:inline; }
.compact .name .t-da { font-size:1em; }
.compact .name .t-da::before { content:" · "; }
html[data-lang="da"] .t-en:not(.always) { display:none; }
html[data-lang="da"] .name .t-da { font-size:1em; font-weight:inherit; color:inherit; }
html[data-lang="da"] .compact .name .t-da::before { content:""; }
html[data-lang="en"] .t-da { display:none; }

/* buttons */
.btn { display:block; width:100%; min-height:56px; padding:16px 10px; font:inherit; font-size:1.25rem; font-weight:700; color:#fff; border:0; border-radius:12px; cursor:pointer; text-decoration:none; text-align:center; margin:6px 0; }
.btn.small { display:inline-block; width:auto; min-height:44px; padding:10px 14px; font-size:1rem; border-radius:10px; margin:0; }
.center .btn { width:auto; min-width:min(240px, 100%); margin:6px auto; }
.hero { max-width:440px; margin:6vh auto 0; }
.hero .btn { width:100%; min-height:76px; font-size:1.7rem; margin:16px auto; border-radius:16px; }
.go { background:var(--go); } .fail { background:var(--fail); } .neutral { background:var(--neutral); }
.btn:hover { filter:brightness(1.15); } .btn:disabled { opacity:.5; }
.actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:10px 0 6px; }
.actions form { margin:0; }

/* results */
.cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
section { background:var(--panel); padding:4px 18px 14px; border-radius:12px; }
ul { padding-left:20px; }
.scroll { overflow-x:auto; }
table { width:100%; border-collapse:collapse; margin:12px 0; }
td, th { padding:8px; text-align:left; border-bottom:1px solid #2c3140; }

/* editor */
.item { display:flex; gap:12px; background:var(--panel); padding:12px; border-radius:12px; margin:10px 0; }
.thumb { position:relative; flex:0 0 60px; height:90px; border-radius:6px; overflow:hidden; background:var(--bg); }
.thumb .ph { font-size:1.6rem; }
.fields { flex:1; min-width:0; display:grid; grid-template-columns:1fr 1fr 100px; gap:8px; }
.fields .wide, .btns { grid-column:1 / -1; }
.btns { display:flex; flex-wrap:wrap; gap:8px; }
.fields input { width:100%; min-width:0; padding:10px; font:inherit; font-size:16px; color:var(--text); background:var(--bg); border:1px solid #3a4155; border-radius:8px; }

@media (max-width:640px) {
  main { padding:12px; }
  .cols { grid-template-columns:1fr; }
  .fields { grid-template-columns:1fr 90px; }
  .fields .title { grid-column:1 / -1; }
  .thumb { flex-basis:44px; height:66px; }
}
