:root {
    --ink: #1a1a1a;
    --muted: #666;
    --line: #ddd;
    --accent: #b01116;
    --ok-bg: #eef7ee;
    --ok-line: #3a7d3a;
    --err-bg: #fdf0f0;
    --err-line: #b01116;
    --note-bg: #f4f6fa;
    --note-line: #5b7bb2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #fafafa;
}

.site-header {
    background: #111;
    color: #fff;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.brand { font-weight: 800; letter-spacing: 0.12em; }
.brand-sub { color: #bbb; font-size: 0.9rem; }

main {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.2rem;
}

h1 { margin: 0.4rem 0 0.2rem; font-size: 1.5rem; }
.sub { color: var(--muted); margin-top: 0; }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    margin: 0.8rem 0;
}

.panel.success { background: var(--ok-bg); border-color: var(--ok-line); }
.panel.error { background: var(--err-bg); border-color: var(--err-line); }
.panel.notice { background: var(--note-bg); border-color: var(--note-line); }

section.line {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    margin: 1rem 0;
}

section.line.locked { opacity: 0.65; }

section.line h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.35rem;
}

.line-desc {
    color: var(--muted);
    font-weight: 400;
    font-size: 1rem;
}

section.line h3 {
    margin: 0.9rem 0 0.4rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.badge {
    display: inline-block;
    background: var(--note-bg);
    border: 1px solid var(--note-line);
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
}

.size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.size-cell input,
.other-row input[type="number"] {
    width: 4.2rem;
    padding: 0.45rem 0.3rem;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 1rem;
}

.other-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.other-row label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.other-row input[type="text"] {
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 1rem;
    min-width: 16rem;
}

.roster-hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 0.4rem;
}

.roster-wrap {
    overflow-x: auto;
}

table.roster {
    border-collapse: collapse;
    width: 100%;
}

table.roster th {
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--line);
}

table.roster td {
    padding: 0.15rem 0.25rem;
}

table.roster td.idx,
table.roster th.idx {
    width: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: right;
    padding-right: 0.5rem;
}

table.roster input,
table.roster select {
    width: 100%;
    min-width: 5.5rem;
    padding: 0.4rem 0.4rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

button.add-rows {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    margin-top: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

button.add-rows:hover { border-color: var(--accent); }

button.submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0.5rem 0 1.5rem;
}

button.submit:hover { filter: brightness(1.1); }

.site-footer {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.2rem 2rem;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 520px) {
    .size-cell input { width: 3.6rem; }
}
