:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #111827;
}

body {
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    margin: 18px;
    color: var(--accent)
}

.container {
    max-width: 1100px;
    margin: 18px auto;
    background: var(--card);
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08)
}

h1 {
    margin: 6px 0 12px 0;
    font-size: 20px;
    text-align: center
}

.top {
    display: flex;
    gap: 16px
}

.left {
    flex: 1
}

.right {
    width: 320px
}

canvas#triangleCanvas {
    display: block;
    width: 800px;
    height: 520px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6eef6
}

.controls {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center
}

label {
    font-size: 13px
}

select,
input[type=number],
button {
    font-size: 13px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db
}

button {
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer
}

button.secondary {
    background: #6b7280
}

button.danger {
    background: #b91c1c
}

.legend {
    background: #fafafa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee
}

.legend .box {
    display: inline-block;
    width: 16px;
    height: 12px;
    margin-right: 8px;
    vertical-align: middle
}

.muted {
    color: var(--muted);
    font-size: 13px
}

.measure-list {
    margin-top: 8px;
    font-size: 13px;
    max-height: 220px;
    overflow: auto
}

.center-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    text-align: center
}

.small {
    font-size: 13px;
    padding: 6px 8px
}