/* "Sex gráður" (Tengdu tvo leikara): template-sex-gradur.php + js/sex-gradur.js. Same dark stage as "Hvað langar þig að sjá?". */
.sg-page {
    --sg-ink: #1a1f24;
    --sg-card: #1a1f24;
    --sg-card-2: #242b31;
    --sg-line: rgba(255, 255, 255, .12);
    --sg-muted: rgba(255, 255, 255, .68);
    --sg-teal: var(--kvik-seen, #62b0ba);
    --sg-coral: var(--kvik-want, #e0654f);
    background: #f3f5f6;
    padding: 0 0 52px;
}
.sg-page [hidden] { display: none !important; }
.sg-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sg-stage { background: radial-gradient(120% 90% at 100% 0%, #2b3640 0%, #14181c 65%); padding: 34px 0 40px; margin-bottom: 28px; }

.sg-head { margin-bottom: 20px; }
.sg-head__title { margin: 0 0 6px; font-size: clamp(28px, 4.6vw, 40px); line-height: 1.15; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.sg-head__sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--sg-muted); }

.sg-card {
    position: relative; padding: 22px; border-radius: 18px; background: var(--sg-card-2); color: #fff;
    border: 1px solid var(--sg-line); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55);
}
.sg-card p { color: inherit; }
.sg-msg { margin: 0; font-size: 16px; color: var(--sg-muted) !important; }

/* Pickers */
.sg-pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.sg-and { padding-bottom: 14px; font-size: 14px; color: var(--sg-muted); }
.sg-field { position: relative; min-width: 0; }
.sg-field__label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sg-muted); }
.sg-input {
    width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--sg-line);
    background: var(--sg-card); color: #fff; font: inherit; font-size: 16px; box-sizing: border-box;
}
.sg-input::placeholder { color: rgba(255, 255, 255, .4); }
.sg-input:focus { outline: none; border-color: var(--sg-teal); }
.sg-chosen {
    display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 6px 0 6px; border-radius: 12px;
    background: var(--sg-card); border: 1px solid var(--sg-teal); box-sizing: border-box;
}
.sg-chosen__img img, .sg-chosen__img .sg-ph { width: 38px; height: 38px; border-radius: 9px; }
.sg-chosen__name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-chosen__x { flex: 0 0 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--sg-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.sg-chosen__x:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.sg-ph { display: inline-flex; align-items: center; justify-content: center; background: #3a454e; color: #fff; font-weight: 700; }
.sg-page img, .sg-ph { object-fit: cover; flex: 0 0 auto; }

.sg-sugg {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
    border-radius: 12px; background: #fff; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .5); max-height: 340px; overflow-y: auto;
}
.sg-sugg__item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--sg-ink); cursor: pointer; font-size: 15px; }
.sg-sugg__item img, .sg-sugg__item .sg-ph { width: 34px; height: 34px; border-radius: 8px; }
.sg-sugg__item.is-active, .sg-sugg__item:hover { background: #eef3f4; }
.sg-sugg__none { padding: 10px; color: #6b7280; font-size: 14px; }

.sg-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.sg-btn {
    height: 48px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--sg-teal); color: #0f1a1c;
    font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; transition: transform .12s, opacity .15s;
}
.sg-btn:disabled { opacity: .4; cursor: default; }
.sg-btn:not(:disabled):active { transform: scale(.98); }
.sg-btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.sg-link { padding: 0; border: 0; background: none; color: var(--sg-muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sg-link:hover { color: #fff; }

/* Guess */
.sg-guess { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--sg-line); animation: sg-in .25s ease both; }
.sg-guess__q { margin: 0 0 12px; font-size: clamp(19px, 3vw, 24px); font-weight: 800; }
.sg-guess__opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.sg-guess__opt {
    height: 54px; border-radius: 12px; border: 1px solid var(--sg-line); background: var(--sg-card); color: #fff;
    font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; transition: background .15s, border-color .15s;
}
.sg-guess__opt:hover, .sg-guess__opt:focus-visible { border-color: rgba(255, 255, 255, .4); outline: none; }
.sg-guess__opt.is-picked { background: var(--sg-teal); border-color: var(--sg-teal); color: #0f1a1c; }

/* Result */
.sg-result { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--sg-line); animation: sg-in .25s ease both; }
.sg-verdict { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--sg-muted) !important; }
.sg-verdict--yes { color: var(--sg-teal) !important; font-size: 18px; }
.sg-count { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sg-count__n {
    flex: 0 0 64px; height: 64px; border-radius: 16px; background: var(--sg-teal); color: #0f1a1c;
    display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800;
}
.sg-count__label { font-size: 16px; line-height: 1.4; }

.sg-chain { margin: 0; padding: 0; list-style: none; }
.sg-chain li { position: relative; }
.sg-chain a { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.sg-chain a:hover .sg-chain__name, .sg-chain a:hover em { text-decoration: underline; text-underline-offset: 3px; }
.sg-chain__person { padding: 4px 0; }
.sg-chain__person img, .sg-chain__person .sg-ph { width: 48px; height: 48px; border-radius: 50%; font-size: 18px; }
.sg-chain__name { font-weight: 700; font-size: 16px; }
.sg-chain__film { margin-left: 23px; padding: 8px 0 8px 25px; border-left: 2px solid rgba(98, 176, 186, .5); }
.sg-chain__film img { width: 34px; height: 50px; border-radius: 5px; }
.sg-chain__film em { font-style: normal; font-weight: 600; }
.sg-chain__title { font-size: 14px; color: var(--sg-muted); }
.sg-chain__title em { color: #fff; }
.sg-chain__step {
    position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
    background: var(--sg-card-2); border: 2px solid var(--sg-teal); color: #fff; font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.sg-after { display: flex; align-items: center; gap: 16px; margin-top: 20px; }

.sg-spin { width: 34px; height: 34px; margin: 10px auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--sg-teal); animation: sg-spin .8s linear infinite; }
@keyframes sg-spin { to { transform: rotate(360deg); } }
@keyframes sg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Explainer */
.sg-about h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; color: var(--sg-ink); }
.sg-about p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: #374151; }

@media (max-width: 600px) {
    .sg-stage { padding: 24px 0 28px; }
    .sg-card { padding: 16px; }
    .sg-pick { grid-template-columns: 1fr; gap: 10px; }
    .sg-and { padding: 0; text-align: center; }
    .sg-guess__opts { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .sg-guess, .sg-result { animation: none; }
}