.one-stroke {
    --stroke-ink: #242346;
    --stroke-muted: #5b5a74;
    --stroke-accent: #4d4bb3;
    --stroke-border: #e0e0f1;
    background: linear-gradient(160deg, #f3f2fc 0%, #ecf3fc 100%);
    color: var(--stroke-ink);
}

.one-stroke .game-container { max-width: 900px; }
.one-stroke .game-header, .one-stroke .game-main { box-shadow: 0 6px 24px rgba(59, 56, 117, .08); }
.one-stroke .game-header { padding: 12px 18px; }
.one-stroke .back-btn, .one-stroke .stroke-next, .one-stroke .stroke-submit { background: var(--stroke-accent); color: #fff; }
.one-stroke .back-btn { display: inline-flex; align-items: center; text-decoration: none; }
.one-stroke .info-label { color: var(--stroke-muted); }
.one-stroke .info-value, .one-stroke .game-title { color: var(--stroke-accent); }
.one-stroke .info-value { font-variant-numeric: tabular-nums; }
.one-stroke .game-title { margin-bottom: 5px; }
.stroke-rule { text-align: center; color: var(--stroke-muted); line-height: 1.55; margin-bottom: 22px; }

.stroke-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.stroke-play, .stroke-panel {
    padding: 16px;
    border: 1px solid var(--stroke-border);
    border-radius: 16px;
}

.stroke-play { background: #f8f8ff; text-align: center; }
.stroke-level-header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.stroke-level-header h2, .stroke-panel h2 { margin: 0; font-size: 16px; }
#level-goal { margin: 0; font-size: 14px; color: var(--stroke-muted); }

.stroke-paper {
    width: 100%;
    max-width: 335px;
    margin: auto;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #d7b990;
    background: #fffaf0;
    box-shadow: 0 5px 13px #a478361c;
}

#stroke-board {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}

.stroke-status {
    margin: 8px 0 0;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--stroke-muted);
    font-size: 14px;
    line-height: 1.4;
}
.stroke-status[data-tone="success"] { color: #18654e; font-weight: 700; }
.stroke-status[data-tone="retry"] { color: #9b382e; }
.stroke-status[data-tone="hint"] { color: #875010; }

.stroke-controls { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px; margin-top: 12px; }
.stroke-controls .btn, .stroke-form .btn { width: 100%; min-width: 0; min-height: 44px; padding: 8px 6px; font-size: 15px; }
.stroke-controls .stroke-secondary { color: var(--stroke-accent); background: #eaeafe; }
.stroke-controls .stroke-secondary:not(:disabled):hover { background: #dedffd; }
.stroke-controls .stroke-next:not(:disabled):hover { background: #3a388e; }
.stroke-controls .btn:disabled { background: #ececf5; color: #676681; opacity: 1; cursor: default; }

.stroke-form { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--stroke-border); text-align: left; }
.stroke-form label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 700; }
.stroke-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 8px; }
.stroke-form input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #c9c8e2;
    border-radius: 8px;
    background: #fff;
    color: var(--stroke-ink);
    font: inherit;
    font-size: 16px;
    padding: 8px 10px;
}
.stroke-form .stroke-submit:hover { background: #3a388e; }

.stroke-sidebar { display: grid; gap: 12px; }
.stroke-panel-heading { display: flex; justify-content: space-between; align-items: baseline; }
#answer-count { color: var(--stroke-muted); font-size: 14px; font-weight: 700; }
.stroke-answers {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    margin: 10px 0 0;
    list-style: none;
}
.stroke-answers li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border: 1px dashed #d5d5e9;
    border-radius: 8px;
    background: #f8f8fc;
    color: #676681;
    font-size: 20px;
    line-height: 1.1;
}
.stroke-answers .found { color: #413f99; border-style: solid; border-color: #d7d6f5; background: #eeedff; font-weight: 700; }
.stroke-answers small { font-size: 11px; margin-top: 3px; font-weight: 500; }
.stroke-reference { margin-top: 10px; border-top: 1px solid var(--stroke-border); }
.stroke-reference summary { padding: 10px 0 0; color: var(--stroke-accent); font-size: 14px; font-weight: 700; cursor: pointer; }
.stroke-reference p { margin-top: 7px; color: var(--stroke-muted); font-size: 13px; }
.stroke-example-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stroke-example-list button {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--stroke-border);
    border-radius: 8px;
    background: #f8f8ff;
    color: var(--stroke-accent);
    font: inherit;
    font-size: 20px;
    cursor: pointer;
    touch-action: manipulation;
}

.stroke-tier { margin-top: 10px; }
.stroke-tier h3 { color: var(--stroke-muted); font-size: 13px; margin: 0 0 4px; }
.stroke-tier-levels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.stroke-level {
    position: relative;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--stroke-border);
    border-radius: 8px;
    background: #fff;
    color: var(--stroke-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
}
.stroke-level:disabled { color: #686880; background: #f5f5fa; cursor: default; }
.stroke-level.is-cleared { color: #13634c; background: #e7f6ee; border-color: #c3e3d4; }
.stroke-level.is-cleared::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.stroke-level[aria-current="step"] { color: #fff; background: var(--stroke-accent); border-color: var(--stroke-accent); }
.stroke-save { color: var(--stroke-muted); font-size: 12px; text-align: center; margin: 0; }

@media (min-width: 1024px) {
    .one-stroke .game-container { max-width: 1140px; grid-template-columns: 222px minmax(0, 1fr); }
    .one-stroke .game-header { padding: 18px; min-height: 0; }
    .one-stroke .game-main { display: block; align-self: start; min-height: 0; }
    .one-stroke .game-title { text-align: center; }
}

@media (max-width: 660px) {
    .one-stroke .game-container { padding: 10px; }
    .one-stroke .game-header { margin-bottom: 10px; padding: 9px 11px; }
    .one-stroke .game-main { padding: 14px 10px; }
    .one-stroke .game-title { font-size: 25px; }
    .stroke-rule { margin-bottom: 12px; font-size: 14px; }
    .stroke-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .stroke-play, .stroke-panel { padding: 10px; }
    .stroke-paper { max-width: 290px; }
    .stroke-sidebar { gap: 8px; }
}
