:root {
    --bg: #0f0f12;
    --panel: #191a1f;
    --card: #20222a;
    --text: #e9ecf1;
    --muted: #a9b0bb;
    --accent: #ff4d6d;
    --accent-2: #6dd3ff;
    --warn: #ffcc00;
    --bad: #ff6b6b;
    --good: #22c55e;
    --pill: #2a2d36;
    --border: #2b2e38;
    --shadow: rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.site-header {
    padding: 24px 16px;
    background: linear-gradient(180deg, #ff4d6d 0%, #ea4f86 100%);
    color: white;
    box-shadow: 0 2px 10px var(--shadow);
}

.site-header h1 {
    margin: 0 0 6px;
    font-size: 24px;
}

.site-header p {
    margin: 0;
    opacity: 0.95;
}

.container {
    max-width: 1100px;
    margin: 20px auto 40px;
    padding: 0 16px;
}

.controls {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.control-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 0;
}

.control-row label {
    color: var(--muted);
    font-weight: 600;
}

.control-row input[type="text"] {
    flex: 1 1 260px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.control-row select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    cursor: pointer;
}

.toggle input {
    accent-color: var(--accent);
}

.list-and-total {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 16px;
}

@media (max-width: 920px) {
    .list-and-total {
        grid-template-columns: 1fr;
    }
}

.modifiers-list {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: clip;
}

.modifier-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

.modifier-row:nth-child(odd) {
    background: #1f222b;
}

.modifier-row.unmet {
    outline: 1px dashed var(--warn);
    outline-offset: -4px;
}

.modifier-row:last-child {
    border-bottom: none;
}

.mod-left {
    min-width: 0;
}

.mod-title {
    font-weight: 700;
    margin-bottom: 4px;
    word-break: break-word;
}

.mod-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.pill {
    background: var(--pill);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.pill.value {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, #2b2e38 0%, #343847 100%);
}

.mod-desc {
    color: var(--text);
    opacity: 0.95;
}

.mod-notes {
    margin-top: 6px;
    color: var(--muted);
    font-style: italic;
}

.mod-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mod-right input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
}

.mod-right input[type="number"] {
    width: 92px;
    padding: 8px 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.summary {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    position: sticky;
    top: 12px;
    height: fit-content;
}

.summary h2 {
    margin: 0 0 10px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 8px;
}

.total-label {
    color: var(--muted);
    font-weight: 600;
}

.total-value {
    font-weight: 800;
    font-size: 22px;
    color: var(--accent-2);
}

.footnote {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    color: var(--muted);
    text-align: center;
    margin: 24px 0 32px;
    font-size: 13px;
}
