:root {
    --wtp-ink: #13243c;
    --wtp-muted: #5d6d82;
    --wtp-navy: #10213a;
    --wtp-navy-2: #1b365d;
    --wtp-blue: #2f7ee6;
    --wtp-red: #e5484d;
    --wtp-yellow: #f4c95d;
    --wtp-mint: #53c8a4;
    --wtp-paper: #f8fbff;
    --wtp-line: rgba(19, 36, 60, 0.14);
    --wtp-shadow: 0 24px 70px rgba(16, 33, 58, 0.17);
}

.wtp-page {
    color: var(--wtp-ink);
}

.wtp-main {
    padding-bottom: 5rem;
}

.wtp-intro {
    max-width: 920px;
    margin-inline: auto;
    text-align: center;
    padding-top: clamp(1.25rem, 3vw, 2.6rem);
    padding-bottom: clamp(0.85rem, 1.5vw, 1.1rem);
}

.wtp-intro h1,
.wtp-console-head h2,
.wtp-content-section h2,
.wtp-related h2,
.wtp-panel-heading h3 {
    font-family: "Avenir Next Rounded", "Trebuchet MS", ui-rounded, sans-serif;
    letter-spacing: -0.035em;
}

.wtp-intro h1 {
    max-width: 760px;
    margin: 0.35rem auto 0.8rem;
    font-size: clamp(2.35rem, 7vw, 5rem);
    line-height: 0.98;
}

.wtp-intro .lead {
    max-width: 760px;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.wtp-eyebrow,
.wtp-console-kicker {
    margin: 0;
    color: var(--wtp-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.wtp-intro-notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.wtp-intro-notes span {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--wtp-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--wtp-muted);
    font-size: 0.82rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.wtp-shell {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 12% 8%, rgba(47, 126, 230, 0.3), transparent 31%),
        radial-gradient(circle at 88% 12%, rgba(229, 72, 77, 0.22), transparent 26%),
        linear-gradient(145deg, #142844 0%, #0d1a2d 100%);
    background-size: 24px 24px, 24px 24px, auto, auto, auto;
    box-shadow: var(--wtp-shadow);
    color: #f7fbff;
}

.wtp-shell::before,
.wtp-shell::after {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 2px 5px rgba(0, 0, 0, 0.32);
    content: "";
}

.wtp-shell::before {
    top: 15px;
    left: 15px;
}

.wtp-shell::after {
    right: 15px;
    bottom: 15px;
}

.wtp-console-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.6rem 2rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.wtp-console-head h2,
.wtp-panel-heading h3 {
    margin: 0.18rem 0 0;
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.wtp-console-kicker {
    color: #8bbcff;
}

.wtp-scoreboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(62px, 1fr));
    gap: 0.5rem;
    min-width: min(100%, 360px);
    margin: 0;
}

.wtp-scoreboard div {
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.065);
    text-align: center;
}

.wtp-scoreboard dt {
    color: #9eb1c9;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wtp-scoreboard dd {
    margin: 0.15rem 0 0;
    color: #fff;
    font-family: "Avenir Next Rounded", "Trebuchet MS", ui-rounded, sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
}

.wtp-tabs {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem 2rem 0;
}

.wtp-tab {
    appearance: none;
    padding: 0.62rem 1rem;
    border: 0;
    border-radius: 11px 11px 0 0;
    background: transparent;
    color: #aebdd0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.wtp-tab:hover,
.wtp-tab:focus-visible {
    color: #fff;
}

.wtp-tab.is-active {
    background: #f7fbff;
    color: var(--wtp-navy);
}

.wtp-tab-panel {
    margin: 0 1rem 1rem;
    padding: clamp(1rem, 2vw, 1.4rem);
    border-radius: 20px;
    background: var(--wtp-paper);
    color: var(--wtp-ink);
}

.wtp-system-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 210px;
    margin: 0 1rem 1rem;
    padding: 2rem;
    border-radius: 20px;
    background: var(--wtp-paper);
    color: var(--wtp-ink);
}

.wtp-system-panel h3,
.wtp-system-panel p {
    margin: 0;
}

.wtp-system-panel p {
    margin-top: 0.35rem;
    color: var(--wtp-muted);
}

.wtp-loader {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 4px solid rgba(47, 126, 230, 0.18);
    border-top-color: var(--wtp-blue);
    border-radius: 50%;
    animation: wtp-spin 0.8s linear infinite;
}

.wtp-error-panel {
    border: 1px solid rgba(229, 72, 77, 0.28);
}

.wtp-error-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #ffe8e9;
    color: #bd2731;
    font-size: 1.3rem;
    font-weight: 900;
}

.wtp-error-panel .wtp-button {
    margin-top: 1rem;
}

.wtp-difficulty-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.wtp-mode {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.05rem 0.65rem;
    align-items: center;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--wtp-line);
    border-radius: 15px;
    background: #fff;
    color: var(--wtp-ink);
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.wtp-mode:hover,
.wtp-mode:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(47, 126, 230, 0.45);
    box-shadow: 0 9px 22px rgba(16, 33, 58, 0.1);
}

.wtp-mode.is-selected {
    border-color: var(--wtp-blue);
    box-shadow: 0 0 0 3px rgba(47, 126, 230, 0.12);
}

.wtp-mode-icon {
    display: grid;
    grid-row: 1 / 3;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 10px;
    background: #eaf3ff;
    color: var(--wtp-blue);
    font-size: 1.1rem;
    font-weight: 900;
}

.wtp-mode[data-difficulty="hard"] .wtp-mode-icon {
    background: #fff2d0;
    color: #9a6500;
}

.wtp-mode[data-difficulty="elite"] .wtp-mode-icon {
    background: #f0eaff;
    color: #7153bd;
}

.wtp-mode[data-difficulty="easy"] .wtp-mode-icon {
    background: #e7f8f1;
    color: #187a5f;
}

.wtp-mode strong {
    font-size: 0.92rem;
}

.wtp-mode small {
    overflow: hidden;
    color: var(--wtp-muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wtp-game-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 1rem;
    align-items: start;
}

.wtp-clue-stage {
    position: relative;
    display: flex;
    min-height: 560px;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.8), transparent 35%),
        linear-gradient(145deg, #dcecff, #c7daf1);
    box-shadow: inset 0 0 0 1px rgba(19, 36, 60, 0.08);
}

.wtp-clue-stage::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(19, 36, 60, 0.045) 49.5%, rgba(19, 36, 60, 0.045) 50.5%, transparent 50.5%),
        linear-gradient(transparent 49.5%, rgba(19, 36, 60, 0.045) 49.5%, rgba(19, 36, 60, 0.045) 50.5%, transparent 50.5%);
    background-size: 42px 42px;
    content: "";
    pointer-events: none;
}

.wtp-stage-topline,
.wtp-attempts-wrap {
    position: relative;
    z-index: 3;
}

.wtp-stage-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
}

.wtp-difficulty-badge,
.wtp-generation-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--wtp-navy);
    font-size: 0.74rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.wtp-generation-badge {
    color: var(--wtp-muted);
}

.wtp-clue-loading,
.wtp-image-clue,
.wtp-audio-clue,
.wtp-asset-fallback {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 420px;
    flex: 1;
    place-items: center;
    align-content: center;
    padding: 1.2rem;
    text-align: center;
}

.wtp-clue-loading {
    gap: 0.85rem;
    color: var(--wtp-muted);
    font-weight: 700;
}

.wtp-image-clue img {
    width: min(100%, 390px);
    height: min(44vw, 390px);
    min-height: 250px;
    object-fit: contain;
    transform-origin: center;
    transition: filter 420ms ease, transform 420ms ease, opacity 220ms ease;
}

.wtp-clue-stage[data-difficulty="normal"] .wtp-image-clue img:not(.is-revealed),
.wtp-clue-stage[data-difficulty="hard"] .wtp-image-clue img:not(.is-revealed) {
    filter: brightness(0) drop-shadow(0 22px 26px rgba(16, 33, 58, 0.28));
}

.wtp-clue-stage[data-difficulty="hard"] .wtp-image-clue img {
    width: min(66%, 250px);
    height: min(34vw, 250px);
    min-height: 190px;
    image-rendering: pixelated;
}

.wtp-image-clue img.is-revealed {
    filter: drop-shadow(0 22px 28px rgba(16, 33, 58, 0.22));
    transform: scale(1.025);
}

.wtp-audio-clue {
    color: var(--wtp-ink);
}

.wtp-sound-orbit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 150px;
    height: 150px;
    margin-bottom: 0.4rem;
    border: 1px solid rgba(113, 83, 189, 0.18);
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 34%, #eee9ff 35% 64%, rgba(238, 233, 255, 0.45) 65% 100%);
    box-shadow: 0 18px 40px rgba(67, 48, 112, 0.15);
}

.wtp-sound-orbit span {
    width: 8px;
    border-radius: 999px;
    background: linear-gradient(#8467ca, #5636a1);
    animation: wtp-wave 1.05s ease-in-out infinite;
}

.wtp-sound-orbit span:nth-child(1),
.wtp-sound-orbit span:nth-child(5) { height: 28px; animation-delay: -0.35s; }
.wtp-sound-orbit span:nth-child(2),
.wtp-sound-orbit span:nth-child(4) { height: 50px; animation-delay: -0.18s; }
.wtp-sound-orbit span:nth-child(3) { height: 72px; }

.wtp-audio-title {
    margin: 0.2rem 0 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.wtp-audio-copy,
.wtp-audio-status {
    max-width: 420px;
    margin: 0.35rem auto 0;
    color: var(--wtp-muted);
    font-size: 0.88rem;
}

.wtp-cry-button {
    margin-top: 1rem;
}

.wtp-asset-fallback {
    color: var(--wtp-ink);
}

.wtp-fallback-icon {
    display: grid;
    width: 80px;
    height: 80px;
    place-items: center;
    border-radius: 22px;
    background: #fff2d0;
    color: #9a6500;
    font-size: 2rem;
    box-shadow: 0 15px 35px rgba(122, 79, 0, 0.15);
}

.wtp-asset-fallback h3 {
    margin: 1rem 0 0.35rem;
}

.wtp-asset-fallback p {
    max-width: 430px;
    margin: 0;
    color: var(--wtp-muted);
}

.wtp-clue-stage > .wtp-asset-fallback {
    display: grid;
    min-height: auto;
    flex: 0 0 auto;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.15rem 0.7rem;
    align-items: center;
    margin: 0 1rem 0.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(154, 101, 0, 0.18);
    border-radius: 14px;
    background: rgba(255, 248, 226, 0.92);
    text-align: left;
    backdrop-filter: blur(8px);
}

.wtp-clue-stage > .wtp-asset-fallback .wtp-fallback-icon {
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.05rem;
    box-shadow: none;
}

.wtp-clue-stage > .wtp-asset-fallback h3 {
    margin: 0;
    font-size: 0.83rem;
}

.wtp-clue-stage > .wtp-asset-fallback p {
    font-size: 0.72rem;
    line-height: 1.4;
}

.wtp-attempts-wrap {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 1rem 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--wtp-muted);
    font-size: 0.8rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.wtp-attempts-wrap strong {
    margin-left: auto;
    color: var(--wtp-ink);
}

.wtp-attempt-lights {
    display: flex;
    gap: 0.38rem;
}

.wtp-attempt-lights span {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(19, 36, 60, 0.14);
    border-radius: 50%;
    background: #dce3eb;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.wtp-attempt-lights span.is-live {
    background: var(--wtp-mint);
    box-shadow: 0 0 0 4px rgba(83, 200, 164, 0.18);
}

.wtp-attempt-lights span.is-lost {
    background: var(--wtp-red);
    transform: scale(0.83);
}

.wtp-guess-column {
    display: grid;
    gap: 0.8rem;
}

.wtp-hint-panel,
.wtp-guess-form,
.wtp-guess-log,
.wtp-result {
    border: 1px solid var(--wtp-line);
    border-radius: 18px;
    background: #fff;
}

.wtp-hint-panel {
    padding: 0.9rem;
    background: #fffaf0;
}

.wtp-hint-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.wtp-hint-head > div {
    display: grid;
}

.wtp-hint-head strong {
    font-size: 0.9rem;
}

.wtp-hint-head span:not(.wtp-hint-bulb) {
    color: var(--wtp-muted);
    font-size: 0.75rem;
}

.wtp-hint-bulb {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--wtp-yellow);
    color: #6c4a00;
    font-weight: 900;
}

.wtp-hint-content {
    margin-top: 0.75rem;
}

.wtp-empty-hint {
    margin: 0;
    color: var(--wtp-muted);
    font-size: 0.82rem;
}

.wtp-hint-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.wtp-hint-item {
    padding: 0.62rem 0.7rem;
    border: 1px solid rgba(154, 101, 0, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
}

.wtp-hint-item span {
    display: block;
    color: var(--wtp-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wtp-hint-item strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.9rem;
}

.wtp-type-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.25rem;
}

.wtp-type-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--type-color, #6b7280);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: capitalize;
}

.wtp-guess-form {
    padding: 0.95rem;
}

.wtp-guess-form label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.86rem;
    font-weight: 900;
}

.wtp-input-wrap {
    position: relative;
}

.wtp-input-wrap input {
    width: 100%;
    min-height: 49px;
    padding: 0.8rem 3.4rem 0.8rem 0.85rem;
    border: 1px solid rgba(19, 36, 60, 0.2);
    border-radius: 13px;
    background: #fbfdff;
    color: var(--wtp-ink);
    font: inherit;
    font-size: 0.95rem;
    outline: 0;
}

.wtp-input-wrap input:focus {
    border-color: var(--wtp-blue);
    box-shadow: 0 0 0 4px rgba(47, 126, 230, 0.12);
}

.wtp-input-wrap input[aria-invalid="true"] {
    border-color: var(--wtp-red);
    box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.1);
}

.wtp-key-hint {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    padding: 0.2rem 0.38rem;
    transform: translateY(-50%);
    border: 1px solid var(--wtp-line);
    border-radius: 7px;
    background: #fff;
    color: var(--wtp-muted);
    font-size: 0.67rem;
    font-weight: 800;
}

.wtp-guess-form p {
    min-height: 1.2em;
    margin: 0.42rem 0 0;
    color: var(--wtp-muted);
    font-size: 0.72rem;
}

.wtp-guess-form p.is-error {
    color: #b4232c;
    font-weight: 700;
}

.wtp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0.72rem 0.95rem;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.wtp-button:hover:not(:disabled),
.wtp-button:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.wtp-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.wtp-button-primary {
    background: linear-gradient(135deg, #2f7ee6, #2464bd);
    color: #fff;
    box-shadow: 0 8px 20px rgba(47, 126, 230, 0.22);
}

.wtp-button-secondary {
    border: 1px solid rgba(47, 126, 230, 0.22);
    background: #edf5ff;
    color: #1f65ba;
}

.wtp-button-quiet {
    background: #eef2f6;
    color: var(--wtp-muted);
}

.wtp-button-danger {
    border: 1px solid rgba(229, 72, 77, 0.24);
    background: #fff0f0;
    color: #b4232c;
}

.wtp-submit {
    width: 100%;
    margin-top: 0.75rem;
}

.wtp-secondary-actions,
.wtp-result-actions {
    display: flex;
    gap: 0.6rem;
}

.wtp-secondary-actions .wtp-button,
.wtp-result-actions .wtp-button {
    flex: 1;
}

.wtp-guess-log {
    padding: 0.85rem 0.95rem;
}

.wtp-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wtp-log-head strong {
    font-size: 0.82rem;
}

.wtp-log-head span {
    color: var(--wtp-muted);
    font-size: 0.72rem;
}

.wtp-guess-log ol {
    display: grid;
    gap: 0.4rem;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}

.wtp-guess-log li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.5rem 0.62rem;
    border-radius: 10px;
    background: #f3f6f9;
    color: var(--wtp-muted);
    font-size: 0.78rem;
}

.wtp-guess-log li strong {
    color: var(--wtp-ink);
}

.wtp-guess-log li span {
    color: #b4232c;
    font-weight: 800;
}

.wtp-result {
    padding: 1rem;
    border-color: rgba(83, 200, 164, 0.34);
    background: linear-gradient(145deg, #f3fff9, #fff);
}

.wtp-result.is-loss {
    border-color: rgba(229, 72, 77, 0.26);
    background: linear-gradient(145deg, #fff3f3, #fff);
}

.wtp-result-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.wtp-result-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--wtp-mint);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
}

.wtp-result.is-loss .wtp-result-icon {
    background: var(--wtp-red);
}

.wtp-result-head p,
.wtp-result-head h3 {
    margin: 0;
}

.wtp-result-head p {
    color: var(--wtp-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wtp-result-head h3 {
    font-size: 1.25rem;
}

.wtp-result-time {
    color: var(--wtp-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.wtp-answer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.wtp-answer-meta > span:not(.wtp-type-pill) {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #edf1f5;
    color: var(--wtp-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.wtp-answer-description {
    margin: 0.75rem 0 0;
    color: var(--wtp-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.wtp-result-actions {
    margin-top: 0.85rem;
}

.wtp-panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.wtp-panel-heading h3 {
    color: var(--wtp-ink);
}

.wtp-panel-heading > p {
    max-width: 520px;
    margin: 0;
    color: var(--wtp-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.wtp-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.wtp-setting-card {
    display: block;
    padding: 1rem;
    border: 1px solid var(--wtp-line);
    border-radius: 17px;
    background: #fff;
}

.wtp-setting-wide {
    grid-column: 1 / -1;
}

.wtp-setting-title {
    display: block;
    color: var(--wtp-ink);
    font-size: 0.9rem;
    font-weight: 900;
}

.wtp-setting-copy {
    display: block;
    margin: 0.2rem 0 0;
    color: var(--wtp-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.wtp-setting-card select {
    width: 100%;
    min-height: 45px;
    margin-top: 0.8rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(19, 36, 60, 0.2);
    border-radius: 12px;
    background: #f8fbff;
    color: var(--wtp-ink);
    font: inherit;
}

.wtp-setting-row,
.wtp-volume-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wtp-switch {
    position: relative;
    width: 50px;
    height: 28px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
}

.wtp-switch span {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(16, 33, 58, 0.22);
    transition: transform 160ms ease;
}

.wtp-switch[aria-checked="true"] {
    background: var(--wtp-blue);
}

.wtp-switch[aria-checked="true"] span {
    transform: translateX(22px);
}

.wtp-volume-label {
    margin-top: 1rem;
    color: var(--wtp-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.wtp-setting-card input[type="range"] {
    width: 100%;
    margin-top: 0.45rem;
    accent-color: var(--wtp-blue);
}

.wtp-setting-wide .wtp-button {
    margin-top: 0.85rem;
}

.wtp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
}

.wtp-stats-grid div {
    padding: 0.95rem;
    border: 1px solid var(--wtp-line);
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.wtp-stats-grid dt {
    color: var(--wtp-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wtp-stats-grid dd {
    margin: 0.25rem 0 0;
    color: var(--wtp-ink);
    font-family: "Avenir Next Rounded", "Trebuchet MS", ui-rounded, sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
}

.wtp-stats-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #eef4fa;
}

.wtp-stats-note p {
    margin: 0;
    color: var(--wtp-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.wtp-content-section,
.wtp-related {
    max-width: 1120px;
    margin: clamp(3.2rem, 7vw, 6rem) auto 0;
}

.wtp-section-heading {
    max-width: 760px;
    margin-bottom: 1.3rem;
}

.wtp-content-section h2,
.wtp-related h2 {
    margin: 0.32rem 0 0;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.06;
}

.wtp-step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.wtp-step-grid article,
.wtp-info-grid article {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
    border: 1px solid var(--wtp-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 35px rgba(16, 33, 58, 0.07);
}

.wtp-step-grid article > span {
    display: inline-flex;
    min-width: 38px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--wtp-navy);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
}

.wtp-step-grid h3,
.wtp-info-grid h2 {
    margin: 1rem 0 0.45rem;
    font-family: "Avenir Next Rounded", "Trebuchet MS", ui-rounded, sans-serif;
    font-size: 1.12rem;
}

.wtp-step-grid p,
.wtp-info-grid p,
.wtp-table-note {
    margin: 0;
    color: var(--wtp-muted);
    font-size: 0.9rem;
    line-height: 1.68;
}

.wtp-mode-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--wtp-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(16, 33, 58, 0.07);
}

.wtp-mode-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    text-align: left;
}

.wtp-mode-table th,
.wtp-mode-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--wtp-line);
    vertical-align: top;
}

.wtp-mode-table thead th {
    background: #13243c;
    color: #fff;
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wtp-mode-table tbody th {
    color: var(--wtp-ink);
    font-size: 0.9rem;
}

.wtp-mode-table td {
    color: var(--wtp-muted);
    font-size: 0.86rem;
}

.wtp-mode-table tbody tr:last-child th,
.wtp-mode-table tbody tr:last-child td {
    border-bottom: 0;
}

.wtp-table-note {
    margin-top: 0.8rem;
}

.wtp-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.wtp-info-grid article:nth-child(1) {
    background: linear-gradient(145deg, #f1edff, #fff);
}

.wtp-info-grid article:nth-child(2) {
    background: linear-gradient(145deg, #eaf4ff, #fff);
}

.wtp-info-grid article:nth-child(3) {
    background: linear-gradient(145deg, #eafaf4, #fff);
}

.wtp-info-grid article:nth-child(4) {
    background: linear-gradient(145deg, #fff8e8, #fff);
}

.wtp-info-grid .wtp-eyebrow {
    margin: 0;
    color: var(--wtp-blue);
    font-size: 0.72rem;
}

.wtp-info-grid h2 {
    font-size: 1.25rem;
}

.wtp-faq-list {
    display: grid;
    gap: 0.65rem;
}

.wtp-faq-list details {
    padding: 1rem 1.1rem;
    border: 1px solid var(--wtp-line);
    border-radius: 16px;
    background: #fff;
}

.wtp-faq-list summary {
    color: var(--wtp-ink);
    font-weight: 900;
    cursor: pointer;
}

.wtp-faq-list p {
    margin: 0.8rem 0 0;
    color: var(--wtp-muted);
    font-size: 0.9rem;
    line-height: 1.68;
}

.wtp-related {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 1.2rem;
    align-items: start;
    padding: clamp(1.4rem, 4vw, 2.2rem);
    border-radius: 24px;
    background: var(--wtp-navy);
    color: #fff;
}

.wtp-related .wtp-eyebrow {
    color: #8bbcff;
}

.wtp-related h2 {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.wtp-related-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.wtp-related-links a {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease;
}

.wtp-related-links a:hover,
.wtp-related-links a:focus-visible {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.11);
}

.wtp-related-links strong {
    font-size: 0.88rem;
}

.wtp-related-links span {
    color: #aebdd0;
    font-size: 0.75rem;
    line-height: 1.45;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

@keyframes wtp-spin {
    to { transform: rotate(360deg); }
}

@keyframes wtp-wave {
    0%, 100% { transform: scaleY(0.55); opacity: 0.65; }
    50% { transform: scaleY(1.1); opacity: 1; }
}

@media (max-width: 900px) {
    .wtp-console-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .wtp-scoreboard {
        width: 100%;
    }

    .wtp-game-grid {
        grid-template-columns: 1fr;
    }

    .wtp-clue-stage {
        min-height: 480px;
    }

    .wtp-clue-loading,
    .wtp-image-clue,
    .wtp-audio-clue,
    .wtp-asset-fallback {
        min-height: 350px;
    }

    .wtp-image-clue img {
        height: min(45vw, 340px);
    }

    .wtp-step-grid,
    .wtp-related {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .wtp-main {
        padding-inline: 0.65rem;
    }

    .wtp-intro {
        padding-inline: 0.45rem;
    }

    .wtp-intro h1 {
        font-size: clamp(2.25rem, 12vw, 3.55rem);
    }

    .wtp-shell {
        border-radius: 22px;
    }

    .wtp-console-head {
        gap: 1rem;
        padding: 1.35rem 1rem 1rem;
    }

    .wtp-scoreboard {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
        min-width: 0;
    }

    .wtp-scoreboard div {
        padding: 0.5rem 0.25rem;
    }

    .wtp-scoreboard dt {
        font-size: 0.57rem;
    }

    .wtp-scoreboard dd {
        font-size: 1rem;
    }

    .wtp-tabs {
        padding-inline: 1rem;
    }

    .wtp-tab-panel,
    .wtp-system-panel {
        margin-inline: 0.5rem;
        padding: 0.7rem;
        border-radius: 17px;
    }

    .wtp-difficulty-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .wtp-mode {
        padding: 0.65rem;
    }

    .wtp-clue-stage {
        min-height: 410px;
        border-radius: 17px;
    }

    .wtp-clue-loading,
    .wtp-image-clue,
    .wtp-audio-clue,
    .wtp-asset-fallback {
        min-height: 285px;
        padding: 0.8rem;
    }

    .wtp-image-clue img {
        width: min(100%, 290px);
        height: min(66vw, 290px);
        min-height: 220px;
    }

    .wtp-clue-stage[data-difficulty="hard"] .wtp-image-clue img {
        width: min(62%, 190px);
        height: min(46vw, 190px);
        min-height: 150px;
    }

    .wtp-sound-orbit {
        width: 118px;
        height: 118px;
    }

    .wtp-stage-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.75rem;
    }

    .wtp-attempts-wrap {
        margin: 0 0.7rem 0.7rem;
    }

    .wtp-hint-grid,
    .wtp-settings-grid,
    .wtp-info-grid,
    .wtp-related-links {
        grid-template-columns: 1fr;
    }

    .wtp-setting-wide {
        grid-column: auto;
    }

    .wtp-panel-heading,
    .wtp-stats-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .wtp-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wtp-result-head {
        grid-template-columns: auto 1fr;
    }

    .wtp-result-time {
        grid-column: 2;
    }

    .wtp-secondary-actions,
    .wtp-result-actions {
        flex-direction: column;
    }

    .wtp-content-section,
    .wtp-related {
        margin-top: 3.6rem;
    }

    .wtp-step-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .wtp-main {
        padding-inline: 0.4rem;
    }

    .wtp-intro-notes span {
        font-size: 0.72rem;
    }

    .wtp-tabs {
        justify-content: stretch;
    }

    .wtp-tab {
        flex: 1;
        padding-inline: 0.5rem;
    }

    .wtp-mode-icon {
        width: 31px;
        height: 31px;
    }

    .wtp-mode strong {
        font-size: 0.84rem;
    }

    .wtp-mode small {
        font-size: 0.66rem;
    }

    .wtp-clue-stage {
        min-height: 390px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
