/* Minification failed. Returning unminified contents.
(2,22): run-time error CSS1039: Token not allowed after unary operator: '-panel'
(3,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(7,22): run-time error CSS1039: Token not allowed after unary operator: '-shadow'
(44,17): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(72,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(80,21): run-time error CSS1039: Token not allowed after unary operator: '-primary'
(95,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(100,17): run-time error CSS1039: Token not allowed after unary operator: '-primary'
(134,21): run-time error CSS1039: Token not allowed after unary operator: '-primary'
(136,32): run-time error CSS1039: Token not allowed after unary operator: '-border'
(158,17): run-time error CSS1039: Token not allowed after unary operator: '-primary'
(159,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(178,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(198,17): run-time error CSS1039: Token not allowed after unary operator: '-muted'
 */
.stroke-code-tool .shell {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: clamp(18px, 4vw, 32px);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(20px, 3vw, 32px);
    position: relative;
    overflow: hidden;
}

    .stroke-code-tool .shell::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(226, 85, 45, 0.09), rgba(27, 59, 90, 0.05));
        pointer-events: none;
    }

.stroke-code-tool header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.stroke-code-tool .title {
    font-family: "Noto Serif SC", "Space Grotesk", serif;
    font-weight: 700;
    letter-spacing: 0.6px;
    font-size: clamp(24px, 4vw, 34px);
    margin: 0;
}

.stroke-code-tool .subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.stroke-code-tool .badge {
    background: #1b3b5a;
    color: #fef7e8;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .stroke-code-tool .badge span {
        display: inline-flex;
        width: 8px;
        height: 8px;
        background: #e2552d;
        border-radius: 999px;
    }

.stroke-code-tool .panel {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

    .stroke-code-tool .panel h2 {
        margin: 0 0 12px;
        font-size: 18px;
        color: var(--primary);
        letter-spacing: 0.3px;
    }

.stroke-code-tool .input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stroke-code-tool input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f8f5ef;
    font-size: 16px;
    font-family: "Noto Serif SC", "Space Grotesk", serif;
    outline: none;
    color: var(--primary);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

    .stroke-code-tool input[type="text"]:focus {
        box-shadow: 0 10px 28px rgba(27, 59, 90, 0.15);
        transform: translateY(-1px);
        border-color: #d2c3b0;
    }

.stroke-code-tool .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stroke-code-tool button {
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: linear-gradient(135deg, #1d4c7d, #142f4f);
    box-shadow: 0 10px 24px rgba(27, 59, 90, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

    .stroke-code-tool button.secondary {
        background: #f8f5ef;
        color: var(--primary);
        box-shadow: none;
        border: 1px solid var(--border);
    }

    .stroke-code-tool button:hover {
        transform: translateY(-1px);
    }

    .stroke-code-tool button:active {
        transform: translateY(0);
    }

.stroke-code-tool .chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.stroke-code-tool .chip {
    padding: 8px 12px;
    border-radius: 12px;
    background: #f1ebe2;
    color: var(--primary);
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
}

    .stroke-code-tool .chip:hover {
        background: #e6ddd1;
        transform: translateY(-1px);
    }

.stroke-code-tool .grid-frame {
    position: relative;
    width: min(420px, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: repeating-linear-gradient(0deg, transparent, transparent 24%, rgba(27, 59, 90, 0.08) 24%, rgba(27, 59, 90, 0.08) 26%), repeating-linear-gradient(90deg, transparent, transparent 24%, rgba(27, 59, 90, 0.08) 24%, rgba(27, 59, 90, 0.08) 26%), conic-gradient(from -45deg, rgba(27, 59, 90, 0.12) 0 25%, transparent 25% 50%, rgba(27, 59, 90, 0.12) 50% 75%, transparent 75% 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    border-radius: 18px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: inset 0 0 0 2px rgba(27, 59, 90, 0.06);
}

.stroke-code-tool #writer {
    position: absolute;
    inset: 12px;
}

.stroke-code-tool #userCanvas {
    position: absolute;
    inset: 12px;
    background: transparent;
    cursor: crosshair;
    touch-action: none;
}

.stroke-code-tool .guide {
    font-size: 14px;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.5;
}

.stroke-code-tool .pinyin {
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0 0;
    letter-spacing: 0.6px;
}

.stroke-code-tool .status {
    margin-top: 8px;
    color: #c23a2b;
    font-weight: 600;
    min-height: 22px;
}

.stroke-code-tool .score {
    margin-top: 6px;
    color: #1b3b5a;
    font-weight: 700;
}

.stroke-code-tool .spark {
    margin-top: auto;
    color: #1b3b5a;
    font-size: 13px;
    line-height: 1.6;
}

