.wc {
    --wc-ink: #24494d;
    --wc-green: #477f70;
    --wc-line: #d6ddcd;
    --wc-paper: #f7f5e9;
    background: radial-gradient(ellipse at 80% 0, #e4eadb88, transparent 55%), #f0f0e5;
    color: var(--wc-ink);
    font-family: "DM Sans", "Microsoft JhengHei", sans-serif;
    line-height: 1.6;
    padding: 54px 20px 58px;
    margin-top: -40px;
}

.wc * {
    box-sizing: border-box
}

.wc [hidden] {
    display: none !important
}

.wc p,
.wc h1,
.wc h2,
.wc h3,
.wc h4 {
    margin: 0
}

.wc button {
    font: inherit;
    cursor: pointer
}

.wc a {
    color: var(--wc-green)
}

.wc button:disabled {
    cursor: default;
    opacity: .45
}

.wc button:focus-visible,
.wc a:focus-visible,
.wc canvas:focus-visible,
.wc summary:focus-visible {
    outline: 3px solid #c29b43;
    outline-offset: 4px
}

.wc-wrap {
    max-width: 1140px;
    margin: auto
}

.wc-intro {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 26px
}

.wc-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 13px !important;
    color: #6e8777
}

.wc-eyebrow span {
    margin-left: 12px;
    color: #919d89;
    font-size: 9px;
    letter-spacing: 1px
}

.wc h1 {
    font-family: Georgia, "Microsoft JhengHei", serif;
    font-size: 38px;
    color: #2c5051;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px
}

.wc h1 em {
    font-style: normal;
    color: #7a9b7d
}

.wc-intro>div>p:last-child {
    font-size: 13px;
    color: #7a8977
}

.wc-home {
    font-size: 12px;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-bottom: 5px
}

.wc-cabinet {
    border: 1px solid #c8d1c1;
    background: #fffef8;
    border-radius: 17px;
    overflow: hidden;
    box-shadow: 0 16px 40px #24494d12
}

.wc-toolbar {
    background: #0b1150;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 26px
}

.wc-brand {
    display: flex;
    gap: 24px;
    align-items: center
}

.wc-brand img {
    display: block;
    width: 132px;
    height: 49px;
    object-fit: contain
}

.wc-brand>div {
    border-left: 1px solid #858caa55;
    padding-left: 23px
}

.wc-brand h2 {
    font-size: 23px;
    letter-spacing: 4px;
    font-weight: 700;
    color: #f3efdf
}

.wc-brand span {
    font-size: 8px;
    letter-spacing: 1.7px;
    color: #b4bad0
}

.wc-toolbar>button {
    font-size: 12px;
    background: #ffffff10;
    color: #e0e6d7;
    border: 1px solid #a5b5ad55;
    border-radius: 6px;
    min-height: 40px;
    padding: 7px 12px
}

.wc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px
}

.wc-play {
    padding: 24px 28px 18px;
    border-right: 1px solid var(--wc-line)
}

.wc-mission {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px
}

.wc-mission span {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #87977b
}

.wc-mission h3 {
    font-size: 17px;
    color: #315657;
    margin-top: 4px;
    line-height: 1.5
}

.wc-mission button {
    font-size: 11px;
    background: #f0f3e6;
    border: 1px solid #d3dcc7;
    border-radius: 6px;
    padding: 8px 11px;
    min-height: 40px;
    color: #52745d;
    white-space: nowrap
}

.wc-board-wrap {
    position: relative;
    margin: auto;
    max-width: 520px;
    background: #d7e0c7;
    border-radius: 9px;
    padding: 8px;
    border: 1px solid #b1c0a6;
    box-shadow: inset 0 0 0 3px #edf0d9, 0 8px 20px #39575012;
    isolation: isolate
}

.wc canvas {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    touch-action: none;
    border-radius: 4px;
    outline-offset: 7px
}

.wc-overlay {
    position: absolute;
    inset: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #f3f3dc22;
    border-radius: 4px
}

.wc-overlay>div {
    padding: 22px;
    max-width: 310px;
    background: #fffef1f2;
    border: 1px solid #d4dcc5;
    box-shadow: 5px 6px 0 #24494d25;
    text-align: center
}

.wc-overlay span {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #799378;
    font-weight: 700
}

.wc-overlay h3 {
    font-size: 22px;
    color: #305757;
    line-height: 1.5;
    margin: 9px 0
}

.wc-overlay p {
    font-size: 12px;
    color: #7a8974;
    margin-bottom: 17px
}

.wc-primary,
.wc-secondary {
    border: 1px solid #477366;
    background: #5b8d79;
    color: #fffef1;
    min-height: 44px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 0 #325d51
}

.wc-primary:hover {
    background: #6a9b87
}

.wc-secondary {
    border-color: #d0d9c5;
    background: #f1f3e7;
    color: #55715c;
    box-shadow: none
}

.wc-status {
    min-height: 24px;
    margin: 15px 0 10px !important;
    text-align: center;
    font-size: 12px;
    color: #6d8168
}

.wc-mobile-pad {
    display: grid;
    grid-template-columns: 48px 48px 48px;
    grid-template-rows: 44px 44px 44px;
    gap: 5px;
    justify-content: center;
    touch-action: none;
    user-select: none
}

.wc-mobile-pad button {
    border: 1px solid #c5d2b9;
    border-bottom: 3px solid #a4b69c;
    border-radius: 7px;
    background: linear-gradient(#f8f9ed, #e3e9d6);
    color: #5b7b62;
    font-size: 16px;
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none
}

.wc-mobile-pad button.is-held {
    background: #c8d7bb;
    transform: translateY(2px);
    border-bottom-width: 1px
}

.wc-mobile-pad button[data-direction=U] {
    grid-column: 2;
    grid-row: 1
}

.wc-mobile-pad button[data-direction=L] {
    grid-column: 1;
    grid-row: 2
}

.wc-mobile-pad button[data-direction=R] {
    grid-column: 3;
    grid-row: 2
}

.wc-mobile-pad button[data-direction=D] {
    grid-column: 2;
    grid-row: 3
}

.wc-mobile-pad>span {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: center;
    color: #c3ceb7;
    font-size: 22px
}

.wc-sidebar {
    padding: 25px 23px;
    background: #f8f8ef
}

.wc-shift {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--wc-line);
    margin-bottom: 22px
}

.wc-shift>span {
    font-size: 10px;
    color: #8b977d;
    letter-spacing: 1px
}

.wc-shift strong {
    display: block;
    font-size: 18px;
    color: #496d61;
    margin: 7px 0
}

.wc-shift p {
    font-size: 12px;
    color: #819079
}

.wc-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 10px;
    margin-bottom: 23px
}

.wc-stats span {
    display: block;
    color: #839279;
    font-size: 8px;
    letter-spacing: 1px;
    margin-bottom: 5px
}

.wc-stats strong {
    font: 700 28px "Courier New", monospace;
    color: #355b57;
    letter-spacing: 1px
}

.wc-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 23px
}

.wc-action-grid button {
    padding: 10px 3px;
    border: 1px solid #d0dbc5;
    border-radius: 6px;
    background: #fcfdf3;
    color: #5d7961;
    font-size: 11px;
    min-height: 54px
}

.wc-action-grid small {
    display: block;
    font-size: 8px;
    color: #94a085;
    margin-top: 4px
}

.wc-best {
    padding-top: 20px;
    border-top: 1px solid var(--wc-line);
    margin-bottom: 22px
}

.wc-best>span {
    font-size: 11px;
    font-weight: 700;
    color: #5b7a61
}

.wc-best p {
    font-size: 12px;
    color: #657d65;
    margin: 9px 0
}

.wc-best small {
    font-size: 9px;
    color: #96a087;
    line-height: 1.8;
    display: block
}

.wc-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
    font-size: 9px;
    color: #7b8c73
}

.wc-legend span {
    display: flex;
    align-items: center;
    gap: 4px
}

.wc-legend i {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    display: inline-block
}

.wc-legend-target {
    background: #d6d9af;
    border: 1px dashed #a18a47
}

.wc-legend-box {
    background: #c99b61;
    border: 1px solid #a47e4f
}

.wc-legend-done {
    background: #73aa95;
    border: 1px solid #4e8a77
}

.wc-tip {
    font-size: 11px;
    line-height: 1.9;
    padding: 13px;
    background: #eaf0df;
    border: 1px solid #d6e0c8;
    border-radius: 6px;
    color: #7c8e71
}

.wc-save {
    padding: 14px 23px;
    background: #edf1e2;
    border-top: 1px solid #d9e1ce;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    flex-wrap: wrap;
    font-size: 10px;
    color: #7b8e73
}

.wc-save>div {
    display: flex;
    align-items: center;
    gap: 7px
}

.wc-save p {
    font-size: 10px;
    line-height: 1.6;
    max-width: 600px
}

.wc-save-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7caa86;
    flex-shrink: 0
}

.wc-save a {
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 4px
}

.wc-save button {
    border: 1px solid #c7d4bc;
    background: #f8faef;
    color: #5c7a60;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 11px;
    min-height: 36px
}

.wc-route {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    margin: 22px 4px;
    color: #8b9b80;
    font-size: 10px
}

.wc-route b {
    font-family: monospace;
    font-size: 11px;
    color: #6c8c71;
    margin-right: 5px
}

.wc-route p {
    font-size: 10px;
    margin-left: auto
}

.wc-help {
    border-top: 1px solid #d0d8c7;
    margin-top: 24px;
    padding-top: 17px
}

.wc-help summary {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    list-style: none
}

.wc-help summary::-webkit-details-marker {
    display: none
}

.wc-help>div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
    padding-top: 22px
}

.wc-help p {
    font-size: 11px;
    line-height: 1.9;
    color: #75896f
}

.wc-help strong {
    color: #56755b
}

.wc-selection {
    padding: 28px
}

.wc-selection-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px
}

.wc-selection-heading span {
    font-size: 9px;
    letter-spacing: 2px;
    color: #8a9c7f
}

.wc-selection-heading h3 {
    font-size: 24px;
    margin-top: 7px;
    color: #355c56
}

.wc-selection-heading button {
    border: 1px solid #d5ddc8;
    border-radius: 5px;
    background: #f1f5e6;
    color: #698263;
    min-height: 44px;
    font-size: 12px;
    padding: 9px
}

.wc-selection h4 {
    font-size: 13px;
    color: #7d9473;
    margin-bottom: 12px
}

.wc-selection section+section {
    margin-top: 26px
}

.wc-level-cards {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px
}

.wc-level-cards button {
    border: 1px solid #d2ddc7;
    border-bottom: 3px solid #b9cbae;
    background: #f8faef;
    padding: 12px 5px;
    min-height: 80px;
    color: #4e755f;
    border-radius: 7px
}

.wc-level-cards strong {
    font: 700 24px monospace;
    display: block
}

.wc-level-cards span {
    display: block;
    font-size: 8px;
    margin-top: 6px
}

.wc-level-cards .is-complete {
    background: #dcebd4;
    border-color: #8faf93
}

.wc-level-cards button:disabled {
    background: #edf0e6;
    border-color: #d7ddce;
    opacity: .5
}

.wc-completion {
    border-top: 1px solid #d2deca;
    padding: 24px 28px;
    background: #edf4e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px
}

.wc-completion span {
    font-size: 9px;
    letter-spacing: 2px;
    color: #7d9a73
}

.wc-completion h3 {
    font-size: 23px;
    margin: 6px 0 10px;
    color: #355d4e
}

.wc-completion p {
    font-size: 12px;
    color: #718a69;
    line-height: 1.9
}

.wc-completion>div:nth-child(2) {
    display: flex;
    gap: 9px;
    flex-wrap: wrap
}

.wc-completion>a {
    flex-basis: 100%;
    border-top: 1px solid #d3dfca;
    padding-top: 14px;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 5px
}

.wc-dialog {
    max-width: min(440px, 90vw);
    padding: 26px;
    border: 1px solid #b8caae;
    border-radius: 12px;
    background: #fffdf0;
    color: #355d53
}

.wc-dialog::backdrop {
    background: #143c3d99
}

.wc-dialog h3 {
    font-size: 21px;
    margin-bottom: 14px
}

.wc-dialog p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 22px;
    color: #7b8f72
}

.wc-dialog form>div {
    display: flex;
    justify-content: end;
    gap: 12px
}

.wc-fallback {
    background: #0b1150;
    padding: 15px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.wc-fallback img {
    display: block;
    object-fit: contain
}

.wc-fallback a {
    color: #f6f1de;
    font-family: sans-serif
}

@media(max-width:900px) {
    .wc-layout {
        grid-template-columns: minmax(0, 1fr) 245px
    }

    .wc-play {
        padding: 20px
    }

    .wc-sidebar {
        padding: 22px 17px
    }

    .wc h1 {
        font-size: 32px
    }

    .wc-level-cards {
        grid-template-columns: repeat(5, minmax(0, 1fr))
    }
}

@media(max-width:720px) {
    .wc {
        padding: 48px 12px 40px;
        margin-top: -40px;
    }

    .wc-intro {
        display: block
    }

    .wc h1 {
        font-size: 28px
    }

    .wc-eyebrow {
        font-size: 9px;
        letter-spacing: 1px
    }

    .wc-eyebrow span {
        font-size: 8px;
        margin-left: 8px
    }

    .wc-intro>div>p:last-child {
        font-size: 12px
    }

    .wc-home {
        display: inline-block;
        margin-top: 13px
    }

    .wc-toolbar {
        padding: 12px 16px
    }

    .wc-brand {
        gap: 14px
    }

    .wc-brand img {
        width: 104px;
        height: 39px
    }

    .wc-brand>div {
        padding-left: 14px
    }

    .wc-brand h2 {
        font-size: 20px
    }

    .wc-brand span {
        font-size: 6px;
        letter-spacing: 1px
    }

    .wc-toolbar>button {
        font-size: 10px;
        padding: 6px 8px;
        min-height: 36px
    }

    .wc-layout {
        grid-template-columns: minmax(0, 1fr)
    }

    .wc-sidebar {
        display: contents
    }

    .wc-shift {
        display: none
    }

    .wc-stats {
        grid-row: 1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 15px 18px;
        margin: 0;
        border-bottom: 1px solid #dce2d0;
        gap: 10px
    }

    .wc-stats span {
        font-size: 7px;
        letter-spacing: 0
    }

    .wc-stats strong {
        font-size: 21px
    }

    .wc-play {
        grid-row: 2;
        padding: 18px;
        border: 0
    }

    .wc-mission h3 {
        font-size: 14px
    }

    .wc-mission span {
        font-size: 8px;
        letter-spacing: .7px
    }

    .wc-mission button {
        font-size: 10px;
        padding: 6px 8px
    }

    .wc-mission {
        margin-bottom: 15px
    }

    .wc-board-wrap {
        padding: 5px
    }

    .wc-overlay {
        inset: 5px;
        padding: 10px
    }

    .wc-overlay>div {
        padding: 18px
    }

    .wc-overlay h3 {
        font-size: 19px
    }

    .wc-overlay p {
        font-size: 11px
    }

    .wc-status {
        font-size: 11px;
        margin-top: 13px !important
    }

    .wc-action-grid,
    .wc-best,
    .wc-legend,
    .wc-tip {
        margin-left: 18px;
        margin-right: 18px
    }

    .wc-action-grid {
        margin-top: 3px;
        margin-bottom: 17px
    }

    .wc-action-grid button {
        font-size: 12px;
        min-height: 48px
    }

    .wc-best {
        padding-top: 15px;
        margin-bottom: 0
    }

    .wc-legend {
        margin-top: 15px;
        margin-bottom: 15px
    }

    .wc-tip {
        margin-bottom: 18px
    }

    .wc-save {
        padding: 13px 18px;
        gap: 10px
    }

    .wc-route {
        gap: 12px;
        font-size: 9px;
        margin: 19px 2px
    }

    .wc-route p {
        margin-left: 0;
        flex-basis: 100%
    }

    .wc-help>div {
        grid-template-columns: 1fr;
        gap: 13px
    }

    .wc-selection {
        padding: 20px 16px
    }

    .wc-selection-heading h3 {
        font-size: 20px
    }

    .wc-level-cards {
        gap: 6px
    }

    .wc-level-cards button {
        min-height: 72px;
        padding: 10px 3px
    }

    .wc-level-cards strong {
        font-size: 22px
    }

    .wc-level-cards span {
        font-size: 7px
    }

    .wc-completion {
        padding: 20px 18px
    }

    .wc-completion h3 {
        font-size: 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    .wc * {
        scroll-behavior: auto
    }
}