@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=LXGW+WenKai&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
    --red: #FF3B3B;
    --red-light: #FFF0F0;
    --red-mid: #FF8A8A;
    --yellow: #FFD93D;
    --yellow-light: #FFFBE6;
    --yellow-mid: #FFE78A;
    --blue: #3B7DFF;
    --blue-light: #EEF4FF;
    --blue-mid: #8AB4FF;
    --green: #34C759;
    --green-light: #EEFBF0;

    --bg: #FFFEF7;
    --card: #FFFFFF;
    --text: #2D2D2D;
    --text-muted: #888888;
    --border: #F0ECE0;

    --font-hand: 'LXGW WenKai', 'Caveat', cursive, sans-serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

    --radius-btn: 50px 18px 50px 18px;
    --radius-card: 20px 12px 20px 12px;
    --radius-input: 14px 8px 14px 8px;
    --radius-sm: 10px 6px 10px 6px;
    --radius-xs: 7px 4px 7px 4px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 20px;
    --space-xl: 32px;
    --space-2xl: 60px;

    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --shadow-sm: 0 3px 12px rgba(0,0,0,0.06);
    --shadow: 0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--red); text-decoration: none; transition: all 0.2s var(--ease-bounce); }
a:hover { color: var(--blue); text-decoration: underline wavy var(--red); text-underline-offset: 4px; }
code {
    background: var(--yellow-light);
    color: #C8A000;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-size: 0.9em;
    font-weight: 500;
}
h1, h2, h3, h4 { font-family: var(--font-hand); color: var(--text); margin-top: 0; font-weight: 700; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.grow { flex: 1; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; width: 100%; }
.main { padding: 32px 24px; flex: 1; }

/* ===== Doodles ===== */
.doodle { position: absolute; pointer-events: none; z-index: 0; }

/* ===== Topbar ===== */
.topbar {
    background: var(--card);
    border-bottom: 3px dashed var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner { display: flex; align-items: center; height: 72px; }
.brand {
    font-family: var(--font-hand);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.brand::before {
    content: '🖌️';
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 0 var(--yellow));
}
.brand:hover { color: var(--red); text-decoration: none; transform: rotate(-1deg) scale(1.03); }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topnav a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-bounce);
}
.topnav a:hover { color: var(--red); background: var(--red-light); text-decoration: none; transform: translateY(-2px); }
.topnav a.btn { margin-left: 4px; }
.user-chip { color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.user-chip::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.5);
}

/* ===== Buttons ===== */
.btn {
    font-family: var(--font-hand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    border: 3px solid transparent;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s var(--ease-bounce);
    box-shadow: var(--shadow-sm);
}
.btn:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.btn-primary {
    background: var(--red);
    color: #ffffff;
    border-color: var(--red);
}
.btn-primary:hover { background: #E62E2E; color: #ffffff; border-color: #E62E2E; }
.btn-secondary {
    background: var(--yellow);
    color: var(--text);
    border-color: #E8C430;
}
.btn-secondary:hover { background: #FFE135; color: var(--text); border-color: #E8C430; }
.btn-blue { background: var(--blue); color: #ffffff; border-color: var(--blue); }
.btn-blue:hover { background: #2E6EE8; color: #ffffff; border-color: #2E6EE8; }
.btn-green { background: var(--green); color: #ffffff; border-color: var(--green); }
.btn-green:hover { background: #2DB14D; color: #ffffff; border-color: #2DB14D; }
.btn-ghost { background: transparent; border: 2.5px dashed var(--red); color: var(--red); box-shadow: none; }
.btn-ghost:hover { background: var(--red-light); color: var(--red); }
.btn-sm { font-size: 0.85rem; padding: 7px 18px; }
.btn-lg { font-size: 1.15rem; padding: 14px 32px; }
.btn-block { display: flex; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== Forms ===== */
.form-card, .auth-card {
    max-width: 760px;
    margin: 40px auto;
    background: var(--card);
    padding: 36px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border);
    transform: rotate(0.3deg);
}
.auth-card { max-width: 440px; }
.form-card h1, .auth-card h1 { font-family: var(--font-hand); font-size: 2rem; margin-bottom: 8px; }
.form-card > .muted, .auth-card > .muted { margin-bottom: 28px; }
.form label { display: block; margin-bottom: 18px; font-family: var(--font-hand); font-weight: 600; color: var(--text); font-size: 1rem; }
.form input[type=text], .form input[type=email], .form input[type=password],
.form input[type=number], .form textarea, .form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 14px;
    border: 2.5px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: #FEFDF8;
    color: var(--text);
    transition: all 0.2s var(--ease-bounce);
    outline: none;
}
.form input::placeholder, .form textarea::placeholder { color: #C8C0B0; }
.form input:focus, .form textarea:focus, .form select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(255, 59, 59, 0.1);
}
.form .row { display: flex; gap: 16px; }
.form .row > label { flex: 1; }
.form fieldset {
    border: 2.5px solid var(--border);
    border-radius: var(--radius-input);
    padding: 16px 18px;
    margin: 20px 0;
    background: var(--yellow-light);
}
.form legend {
    padding: 0 8px;
    color: var(--text-muted);
    font-family: var(--font-hand);
    font-size: 0.95rem;
    font-weight: 600;
}
.form .radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 400;
    transition: background 0.15s;
}
.form .radio:hover { background: var(--red-light); }
.form .radio input { margin-top: 4px; }
.form .radio strong { display: block; color: var(--text); }
.form .checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; }

/* ===== Alerts ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-input);
    margin-bottom: 16px;
    font-size: 0.95rem;
    border: 2.5px dashed;
    font-family: var(--font-body);
}
.alert-success { background: var(--green-light); color: #1A6B2D; border-color: var(--green); }
.alert-error   { background: var(--red-light); color: #991b1b; border-color: var(--red); }
.alert-info    { background: var(--blue-light); color: #1E40AF; border-color: var(--blue); }
.alert-warning { background: #FFF8E1; color: #7C5A00; border-color: #FFD93D; }

/* ===== Hero ===== */
.hero {
    position: relative;
    text-align: center;
    padding: 90px 20px 70px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--red-light) 0%, var(--bg) 70%);
    border-radius: 0 0 40px 40px;
    margin: 0 -24px;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 217, 61, 0.25), transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(59, 125, 255, 0.15), transparent 25%),
        radial-gradient(circle at 60% 80%, rgba(255, 59, 59, 0.12), transparent 30%);
    pointer-events: none;
}
.hero h1 {
    font-family: var(--font-hand);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.25;
    position: relative;
}
.hero .hl { color: var(--red); position: relative; }
.hero .hl::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 0; right: 0;
    height: 8px;
    background: var(--yellow);
    opacity: 0.6;
    border-radius: 4px;
    z-index: -1;
}
.hero .lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 24px auto 34px;
    max-width: 620px;
    line-height: 1.8;
}
.hero-cta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; position: relative; }

.hero-doodle {
    position: absolute;
    pointer-events: none;
    opacity: 0.35;
}

/* ===== Section Headers ===== */
.sec-header { text-align: center; margin-bottom: 36px; position: relative; }
.sec-tag {
    display: inline-block;
    font-family: var(--font-hand);
    font-size: 0.9rem;
    letter-spacing: 2px;
    padding: 4px 16px;
    border-radius: 50px;
    margin-bottom: 8px;
}
.sec-title { font-family: var(--font-hand); font-size: 2.2rem; font-weight: 700; margin: 0 0 10px; }
.sec-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.8; margin: 0; }
.wavy-line { display: block; margin: 8px auto 0; }

/* ===== Features ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; padding: 20px 0 60px; }
.feature {
    background: var(--card);
    padding: 30px 22px;
    border-radius: var(--radius-card);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border);
    transition: all 0.25s var(--ease-bounce);
    transform: rotate(-0.4deg);
}
.feature:nth-child(2) { transform: rotate(0.4deg); }
.feature:nth-child(3) { transform: rotate(-0.2deg); }
.feature:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--red-mid);
}
.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    background: var(--yellow-light);
    border-radius: 16px 10px 16px 10px;
    border: 2.5px solid var(--border);
}
.feature h3 { font-family: var(--font-hand); margin-bottom: 10px; font-size: 1.35rem; }
.feature p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin: 0; }

/* ===== Tutorial Section ===== */
.tutorial {
    padding: 60px 0;
    position: relative;
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: step; }
.step {
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: var(--radius-card);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s var(--ease-bounce);
    position: relative;
}
.step:nth-child(1) { transform: rotate(-0.5deg); }
.step:nth-child(2) { transform: rotate(0.5deg); }
.step:nth-child(3) { transform: rotate(-0.3deg); }
.step:nth-child(4) { transform: rotate(0.4deg); }
.step:hover { transform: rotate(0deg) translateY(-6px); box-shadow: var(--shadow); border-color: var(--yellow-mid); }
.step-num {
    width: 48px; height: 48px;
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-hand);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(255,59,59,0.3);
}
.step:nth-child(2) .step-num { background: var(--blue); box-shadow: 0 3px 10px rgba(59,125,255,0.3); }
.step:nth-child(3) .step-num { background: var(--yellow); color: var(--text); box-shadow: 0 3px 10px rgba(255,217,61,0.4); }
.step:nth-child(4) .step-num { background: var(--green); box-shadow: 0 3px 10px rgba(52,199,89,0.3); }
.step h3 { font-family: var(--font-hand); font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin: 0; }

/* ===== Project Grid ===== */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.page-head h1 { font-family: var(--font-hand); font-size: 2rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.project-card {
    background: var(--card);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border);
    transition: all 0.25s var(--ease-bounce);
    transform: rotate(-0.4deg);
}
.project-card:nth-child(2n) { transform: rotate(0.4deg); }
.project-card:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--red-mid);
}
.project-card-thumb {
    background: var(--red-light);
    color: var(--red);
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 3px dashed var(--border);
}
.big-letter { font-family: var(--font-hand); font-size: 4.5rem; font-weight: 700; position: relative; }
.project-card-body { padding: 20px; }
.project-card-body h3 { font-family: var(--font-hand); margin: 0 0 4px; font-size: 1.25rem; }
.project-card-body > .muted { margin-bottom: 14px; display: block; }
.progress {
    height: 10px;
    background: var(--yellow-light);
    border-radius: 5px;
    overflow: hidden;
    margin: 12px 0 8px;
    border: 2px solid var(--border);
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--yellow));
    border-radius: 4px;
    transition: width 0.5s var(--ease-bounce);
}
.project-card-actions { display: flex; gap: 10px; margin-top: 16px; }

.empty { text-align: center; padding: 70px 20px; color: var(--text-muted); background: var(--card); border-radius: var(--radius-card); border: 3px dashed var(--border); transform: rotate(0.3deg); }
.empty h1 { font-family: var(--font-hand); font-size: 3.5rem; margin: 0 0 16px; color: var(--text-muted); }
.empty p { font-size: 1.05rem; margin: 0; }

/* ===== Editor ===== */
.editor-shell {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border);
    transform: rotate(0.2deg);
}
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 3px dashed var(--border);
    margin-bottom: 4px;
}
.editor-title { font-family: var(--font-hand); font-size: 1.35rem; margin: 0; font-weight: 700; }
#save-status {
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--yellow-light);
    font-family: var(--font-hand);
    font-size: 0.85rem;
    font-weight: 600;
    color: #C8A000;
}

.editor-grid { display: grid; grid-template-columns: 88px 1fr 340px; gap: 20px; margin-top: 20px; }
@media (max-width: 1024px) { .editor-grid { grid-template-columns: 1fr; } }

.editor-tools {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 14px 10px;
    background: var(--yellow-light);
    border-radius: var(--radius-card);
    border: 3px solid var(--border);
    transform: rotate(-0.3deg);
}
.tool-group { display: flex; flex-direction: column; gap: 8px; }
.tool {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    border: 2.5px solid var(--border);
    background: var(--card);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.tool:hover { transform: scale(1.1) translateY(-2px); box-shadow: var(--shadow); border-color: var(--red); }
.tool.active { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 12px rgba(255, 59, 59, 0.35); }
.tool-group label.small { font-family: var(--font-hand); font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-align: center; }
#brush-size { width: 100%; accent-color: var(--red); }

.editor-canvas-wrap { display: flex; flex-direction: column; align-items: center; }
.canvas-meta {
    width: 500px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px 10px;
    font-size: 1rem;
}
.canvas-meta strong { font-family: var(--font-hand); font-size: 1.8rem; color: var(--text); }
.canvas-meta .muted { font-size: 0.9rem; }
.canvas-stage {
    position: relative;
    width: 500px;
    height: 500px;
    max-width: 100%;
    aspect-ratio: 1;
    background: #fff;
    border: 3px solid var(--text);
    border-radius: var(--radius-card);
    overflow: hidden;
    cursor: crosshair;
    box-shadow: var(--shadow-lg);
}
.canvas-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.guide { position: absolute; left: 0; right: 0; height: 2px; background: rgba(255, 59, 59, 0.25); pointer-events: none; display: none; }
.guide.baseline { bottom: 18%; }
.guide.cap { top: 12%; }
.canvas-stage.show-guide .guide { display: block; }

.canvas-foot {
    width: 500px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
}
#progress-label { font-family: var(--font-hand); font-weight: 700; color: var(--text-muted); background: var(--yellow-light); padding: 6px 14px; border-radius: 50px; }

.editor-side { display: flex; flex-direction: column; gap: 16px; max-height: 720px; }
.side-card {
    background: var(--blue-light);
    padding: 16px;
    border-radius: var(--radius-card);
    border: 3px solid var(--border);
}
.side-card h4 { font-family: var(--font-hand); margin: 0 0 12px; font-size: 0.95rem; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; }
.cur-preview { display: flex; justify-content: center; }
.cur-preview canvas { background: #fff; border: 2.5px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

.glyph-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.glyph-grid::-webkit-scrollbar { width: 6px; }
.glyph-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.glyph-cell {
    aspect-ratio: 1;
    background: var(--card);
    border: 2.5px solid var(--border);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    transition: all 0.2s var(--ease-bounce);
}
.glyph-cell:hover { border-color: var(--red); transform: scale(1.08) rotate(-2deg); z-index: 2; }
.glyph-cell.active { outline: 3px solid var(--red); border-color: var(--red); color: var(--red); background: var(--red-light); }
.glyph-cell.has-content {
    background: var(--green-light);
    border-color: var(--green);
    color: #1A6B2D;
}
.glyph-cell.has-content::after {
    content: '✓';
    position: absolute;
    top: 1px;
    right: 3px;
    color: var(--green);
    font-weight: 800;
    font-size: 0.65rem;
}
.glyph-cell canvas { width: 100%; height: 100%; border-radius: 4px; }

.editor-bottom { display: flex; justify-content: center; gap: 14px; margin-top: 20px; padding-top: 20px; border-top: 3px dashed var(--border); }

/* ===== Settings Tabs ===== */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 3px dashed var(--border);
    margin-bottom: 28px;
    padding: 0 4px;
}
.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-hand);
    font-weight: 600;
    transition: all 0.2s var(--ease-bounce);
    border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--red); background: var(--red-light); text-decoration: none; }
.tab.active { color: var(--red); border-bottom-color: var(--red); background: var(--red-light); }

.section-card {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--border);
    transform: rotate(0.2deg);
}
.section-card h2 { font-family: var(--font-hand); font-size: 1.6rem; margin-bottom: 8px; }
.section-card > .muted { margin-bottom: 24px; }

.status-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.status-list li {
    background: var(--yellow-light);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 2.5px solid var(--border);
}
.status-list strong { color: var(--red); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 2px dashed var(--border); text-align: left; font-size: 0.9rem; }
.table th { color: var(--text-muted); font-weight: 600; background: var(--yellow-light); }
.table tr:hover td { background: var(--yellow-light); }

.result { margin-top: 20px; }

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 3px dashed var(--border);
    background: var(--card);
    margin-top: auto;
}

/* ===== Auth page extras ===== */
.auth-card .form { margin-top: 8px; }
.auth-card .btn-block { margin-top: 8px; }
.auth-card .muted.center { margin-top: 20px; padding-top: 20px; border-top: 2.5px dashed var(--border); }

/* ===== Toast / floating ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--card);
    color: var(--text);
    padding: 14px 20px;
    border-radius: var(--radius-input);
    box-shadow: var(--shadow-lg);
    border: 3px dashed var(--red);
    z-index: 1000;
    transform: translateY(120%);
    transition: transform 0.3s var(--ease-bounce);
    font-family: var(--font-hand);
    font-weight: 600;
}
.toast.show { transform: translateY(0); }

/* ===== Tag / Badge ===== */
.tag {
    display: inline-block;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 500;
}
.tag-red { background: var(--red-light); color: var(--red); }
.tag-yellow { background: var(--yellow-light); color: #C8A000; }
.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-green { background: var(--green-light); color: var(--green); }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 60px 16px; border-radius: 0 0 24px 24px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .editor-grid { grid-template-columns: 1fr; }
    .editor-tools { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .tool-group { flex-direction: row; align-items: center; }
    .editor-side { max-height: none; }
    .glyph-grid { max-height: 240px; grid-template-columns: repeat(8, 1fr); }
    .form .row { flex-direction: column; gap: 0; }
    .sec-title { font-size: 1.7rem; }
    .steps { grid-template-columns: 1fr; }
}
