@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap");

:root{
    --bg: #f7f1e3;
    --bg-accent: #fef6e9;
    --panel: #fff8f0;
    --ink: #1a1c1e;
    --muted: #4d5b5f;
    --accent: #1f7a8c;
    --accent-strong: #166372;
    --accent-warm: #f4a261;
    --line: #1a1c1e;
    --shadow: 0 12px 24px rgba(22, 46, 52, 0.14);
}

*{
    box-sizing: border-box;
}

body{
    margin:0;
    min-height:100vh;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color:var(--ink);
    background:
        radial-gradient(circle at 12% 18%, rgba(244, 162, 97, 0.25), transparent 55%),
        radial-gradient(circle at 90% 10%, rgba(31, 122, 140, 0.2), transparent 50%),
        linear-gradient(120deg, #f7f1e3 0%, #f2efe9 100%);
}

h1{
    margin:0;
    font-size:26px;
    letter-spacing:-0.5px;
}

h2{
    margin:0;
    font-size:15px;
    text-transform:uppercase;
    letter-spacing:1px;
}

p{
    margin:0;
}

.app{
    max-width:1200px;
    margin:0 auto;
    padding:20px 24px 16px;
}

.app-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
    margin-bottom:16px;
    flex-wrap:wrap;
}

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

.badge{
    background:var(--accent);
    color:white;
    font-weight:700;
    padding:10px 14px;
    border-radius:12px;
    box-shadow:var(--shadow);
}

.subtitle{
    margin-top:6px;
    color:var(--muted);
}

.status-bar{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

.status-item{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:10px;
    padding:6px 10px;
    display:flex;
    align-items:center;
    gap:8px;
    box-shadow:var(--shadow);
}

.status-item .label{
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:1px;
    font-size:12px;
}

.status-item .value{
    font-family: "IBM Plex Mono", "Courier New", monospace;
    font-weight:600;
}

.content{
    display:grid;
    grid-template-columns:320px 1fr;
    gap:24px;
}

.panel{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:18px;
    padding:16px;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
    gap:12px;
    max-height:calc(100vh - 120px);
    overflow-y:auto;
}

.group{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.group-note{
    font-size:11px;
    color:var(--muted);
}

.hint-list{
    display:flex;
    flex-direction:column;
    gap:3px;
    font-size:12px;
    color:var(--muted);
}

.button-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
}

.btn{
    padding:8px 10px;
    border:1px solid var(--line);
    background:white;
    color:var(--ink);
    cursor:pointer;
    border-radius:10px;
    font-size:13px;
    font-weight:600;
    font-family:inherit;
    transition:transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow:0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn:hover{
    transform:translateY(-1px);
    background:var(--bg-accent);
}

.btn.is-active{
    background:var(--accent);
    color:white;
    border-color:var(--accent-strong);
    box-shadow:0 8px 18px rgba(31, 122, 140, 0.3);
}

.btn.danger{
    background:var(--accent-warm);
    border-color:#d07a3f;
    color:#1a1c1e;
}

.color-row{
    display:flex;
    align-items:center;
    gap:12px;
}

.color-label{
    font-size:12px;
    color:var(--muted);
}

input[type="color"]{
    width:40px;
    height:30px;
    border:none;
    background:transparent;
    cursor:pointer;
}

.line-width-range{
    flex:1;
    accent-color:var(--accent);
    cursor:pointer;
}

.range-label{
    font-size:13px;
    color:var(--muted);
    white-space:nowrap;
}

.range-value{
    font-family:"IBM Plex Mono","Courier New",monospace;
    font-size:13px;
    color:var(--ink);
    min-width:18px;
    text-align:center;
}

.canvas-area{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.canvas-card{
    background:white;
    border:2px solid var(--line);
    border-radius:14px;
    padding:12px;
    box-shadow:var(--shadow);
}

canvas{
    width:100%;
    height:auto;
    background:white;
    border:1px solid rgba(0, 0, 0, 0.2);
    border-radius:10px;
}

.canvas-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.meta-chip{
    background:var(--panel);
    border:1px dashed var(--line);
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    color:var(--muted);
}

.app-footer{
    margin-top:16px;
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:8px;
    color:var(--muted);
    font-size:12px;
}

.footer-names{
    font-family: "IBM Plex Mono", "Courier New", monospace;
}

@media (max-width: 980px){
    .content{
        grid-template-columns:1fr;
    }

    .app-header{
        flex-direction:column;
        align-items:flex-start;
    }
}

@media (max-width: 640px){
    .button-grid{
        grid-template-columns:1fr;
    }

    .status-item{
        width:100%;
        justify-content:space-between;
    }

    .app{
        padding:24px 16px 20px;
    }
}