/* Spelarens skärm (1.15.21): varning och regeltest. Fristående från panelens stilar. Ljust kort, spelet syns bakom (ingen blur: kostar i CEF). */
.psk-warn, .psk-rt {
  --psk-ink: #1b1f27; --psk-muted: #626b7a; --psk-line: #e4e7ec; --psk-soft: #f5f6f8; --psk-card: #ffffff;
  --psk-accent: #2f5bea; --psk-accent-soft: #eef2fe; --psk-red: #d6383e; --psk-red-soft: #fdf1f1; --psk-green: #1f9d5a; --psk-amber-soft: #fff6e5; --psk-amber: #8a5a00;
  font-family: Poppins, system-ui, sans-serif; color: var(--psk-ink); color-scheme: light;
}

/* ── Varning ── */
.psk-warn { position: fixed; left: 50%; top: 16vh; transform: translateX(-50%); z-index: 200; width: min(760px, calc(100vw - 32px)); padding: 26px 32px 22px;
  text-align: center; pointer-events: none; background: var(--psk-card); border-radius: 18px; box-shadow: 0 18px 50px rgba(10, 14, 22, .35); animation: psk-in .3s ease-out; }
.psk-warn.out { animation: psk-out .4s ease-in forwards; }
.psk-wlab { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: var(--psk-red-soft); color: var(--psk-red); font-weight: 600; font-size: 13px; letter-spacing: .14em; }
.psk-wtext { margin-top: 14px; color: var(--psk-red); font-weight: 700; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.12; letter-spacing: .01em; text-transform: uppercase; word-break: break-word; text-wrap: balance; }
.psk-wfrom { margin-top: 10px; color: var(--psk-muted); font-size: 14px; }
.psk-wbar { margin: 18px auto 0; width: 60%; height: 4px; border-radius: 2px; background: var(--psk-line); overflow: hidden; }
.psk-wbar span { display: block; height: 100%; background: var(--psk-red); animation: psk-bar linear forwards; }

/* ── Regeltest ── */
.psk-rt { position: fixed; inset: 0; z-index: 180; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(12, 18, 28, .38); animation: psk-fade .25s ease-out; }
.psk-rt.out { animation: psk-fadeout .35s ease-in forwards; }
.psk-card { display: flex; flex-direction: column; gap: 18px; width: min(920px, 100%); max-height: calc(100vh - 48px); padding: 28px 30px 24px; border-radius: 20px;
  background: var(--psk-card); box-shadow: 0 24px 70px rgba(10, 14, 22, .32); }
.psk-head { display: flex; flex-direction: column; gap: 6px; }
.psk-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--psk-accent); }
.psk-card.ok .psk-eyebrow { color: var(--psk-green); }
.psk-card.bad .psk-eyebrow { color: var(--psk-red); }
.psk-head h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.psk-sub { color: var(--psk-muted); font-size: 14.5px; line-height: 1.55; max-width: 70ch; }
.psk-note { padding: 10px 14px; border-radius: 10px; background: var(--psk-amber-soft); color: var(--psk-amber); font-size: 14px; }
.psk-rules { flex: 1; min-height: 200px; overflow-y: auto; padding: 8px 24px 22px; border-radius: 14px; background: var(--psk-soft); font-size: 14.5px; line-height: 1.6; }
.psk-rules h2 { margin: 16px 0 4px; font-size: 19px; font-weight: 600; letter-spacing: .02em; }
.psk-rules h3 { margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--psk-line); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--psk-ink); }
.psk-rules h4 { margin: 14px 0 2px; font-size: 14.5px; font-weight: 600; }
.psk-rules p { margin: 0; color: #3d4452; max-width: 78ch; }
.psk-rules i { color: var(--psk-muted); }
.psk-rules hr { display: none; }
.psk-gap { height: 4px; }
.psk-nr { margin-right: 8px; color: var(--psk-accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.psk-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 2px; }
.psk-info { color: var(--psk-muted); font-size: 14px; }
.psk-info.c { text-align: center; }
.psk-btn { padding: 12px 22px; border: 0; border-radius: 12px; background: var(--psk-accent); color: #fff; font: 600 15px Poppins, system-ui, sans-serif; cursor: pointer; transition: background .15s; }
.psk-btn:hover:not(:disabled) { background: #2449c9; }
.psk-btn:focus-visible { outline: 3px solid rgba(47, 91, 234, .35); outline-offset: 2px; }
.psk-btn:disabled { background: #e3e6ec; color: #9aa1ad; cursor: not-allowed; }
.psk-quiz { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; padding: 2px; }
.psk-q { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--psk-soft); }
.psk-qt { font-weight: 600; font-size: 15px; line-height: 1.4; margin-bottom: 2px; }
.psk-opt { text-align: left; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--psk-line); background: var(--psk-card); color: var(--psk-ink); font: 14px/1.4 Poppins, system-ui, sans-serif; cursor: pointer; transition: border-color .12s, background .12s; }
.psk-opt:hover { border-color: #b9c6f5; }
.psk-opt.on { border-color: var(--psk-accent); background: var(--psk-accent-soft); color: #18308a; font-weight: 500; }
.psk-wrong { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; background: var(--psk-red-soft); }
.psk-wrong .psk-info { color: var(--psk-red); font-weight: 600; }
.psk-wr { display: flex; align-items: baseline; gap: 4px; font-size: 14px; }
.psk-wr .psk-nr { color: var(--psk-red); min-width: 44px; }
.psk-count { text-align: center; font-size: 60px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.psk-score { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--psk-muted); }
.psk-score b { font-size: 40px; font-weight: 600; color: var(--psk-ink); font-variant-numeric: tabular-nums; }
.psk-card.ok .psk-score b { color: var(--psk-green); }
.psk-card.bad .psk-score b { color: var(--psk-red); }

@keyframes psk-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes psk-out { to { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes psk-bar { from { width: 100%; } to { width: 0; } }
@keyframes psk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes psk-fadeout { to { opacity: 0; } }
@media (max-width: 760px) { .psk-quiz { grid-template-columns: 1fr; } .psk-card { padding: 22px 18px 18px; } }
@media (prefers-reduced-motion: reduce) { .psk-warn, .psk-rt, .psk-wbar span { animation-duration: .01ms; } }
