.page-narrow {
    max-width: 860px;
    margin: 0 auto;
    padding: 12px 20px 60px;
}
.page-narrow h1 { margin: 22px 0 8px; text-align: center; font-size: 2rem; }
.lead { margin: 0 0 24px; text-align: center; color: var(--muted); }
.page-narrow code { padding: 2px 6px; border-radius: 4px; background: #2b2d31; color: #dbdee1; }
.tools { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tools input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
}
.tools input:focus { outline: none; border-color: rgba(154, 140, 255, 0.6); }
#count { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
#prices { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
#prices th, #prices td { padding: 9px 16px; text-align: left; }
#prices th { background: rgba(255, 255, 255, 0.04); }
#prices th button { background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
#prices th button:hover { color: var(--accent-2); }
#prices td { border-top: 1px solid var(--border); }
#prices .num { text-align: right; font-variant-numeric: tabular-nums; }
#prices tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
#prices tbody tr { content-visibility: auto; contain-intrinsic-size: auto 44px; }
.empty { margin: 24px 0; text-align: center; color: var(--muted); }
.apply-form { display: grid; gap: 16px; }
.apply-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.apply-form input, .apply-form textarea, .apply-form select {
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-weight: 400;
}
.apply-form input:focus, .apply-form textarea:focus, .apply-form select:focus { outline: none; border-color: rgba(154, 140, 255, 0.6); }
.apply-form textarea { min-height: 120px; resize: vertical; }
.apply-form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.apply-form .hp { position: absolute; left: -9999px; }
.apply-form button[type="submit"] {
    justify-self: center;
    padding: 12px 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #7b6cff, #ff6ec7);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.apply-form button[disabled] { opacity: 0.5; cursor: not-allowed; }
.form-msg { min-height: 1.4em; margin: 0; text-align: center; }
.form-msg.ok { color: #55FF55; }
.form-msg.error { color: #FF5555; }
@media (max-width: 600px) { .apply-form .row { grid-template-columns: 1fr; } }
.page-wide { max-width: 1180px; margin: 0 auto; padding: 12px 20px 60px; }
.page-wide h1 { margin: 22px 0 8px; text-align: center; font-size: 2rem; }
.page-wide code { padding: 2px 6px; border-radius: 4px; background: #2b2d31; color: #dbdee1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prices-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips button {
    padding: 5px 12px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; color: var(--muted); font: inherit; font-size: 0.82rem; cursor: pointer;
}
.chips button[aria-pressed="true"] { background: rgba(154, 140, 255, 0.2); border-color: rgba(154, 140, 255, 0.6); color: var(--text); }
#prices td.ico, #prices th.ico { width: 44px; padding-right: 0; }
.item-icon { display: block; width: 28px; height: 28px; image-rendering: pixelated; }
#prices .act { width: 44px; text-align: right; }
#prices .add {
    width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface); color: var(--text); font-size: 1.1rem; cursor: pointer;
}
#prices .add:hover { border-color: rgba(255, 159, 67, 0.6); color: var(--accent-2); }
.calc { min-width: 0; position: sticky; top: 76px; display: grid; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calc h2 { margin: 0; font-size: 1.15rem; }
.calc-clear, .mults-all button, .stepper button, .cl-stack, .calc-line .cl-top > button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 10px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.calc-clear svg { width: 14px; height: 14px; }
.calc-clear:hover, .mults-all button:hover, .stepper button:hover, .cl-stack:hover, .calc-line .cl-top > button:hover { border-color: rgba(255, 159, 67, 0.55); color: var(--accent-2); }
.calc-help { margin: 0 0 10px; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.calc-lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-height: 380px; overflow-y: auto; }
.calc-empty { display: grid; justify-items: center; gap: 8px; padding: 20px 10px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.calc-empty svg { width: 34px; height: 34px; opacity: 0.6; }
.calc-empty p { margin: 0; }
.calc-line { display: grid; min-width: 0; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.cl-top { display: flex; align-items: flex-start; gap: 10px; }
.cl-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cl-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.cl-sub { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.05rem; color: var(--accent-2); }
.cl-top > button { padding: 2px 9px; font-size: 1rem; flex: none; }
.cl-bottom { display: flex; align-items: center; gap: 8px; }
.cl-unit { color: var(--muted); font-size: 0.78rem; }
.stepper { display: inline-flex; align-items: stretch; }
.stepper button { padding: 0; width: 28px; font-size: 1rem; }
.stepper button:first-child { border-radius: 8px 0 0 8px; }
.stepper button:last-child { border-radius: 0 8px 8px 0; }
.stepper input {
    width: 46px; padding: 4px 4px; text-align: center; background: var(--bg, #181414); border: 1px solid var(--border); border-left: 0; border-right: 0;
    color: var(--text); font: inherit; font-size: 0.88rem; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-total { display: grid; gap: 6px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.ct-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.ct-main { align-items: baseline; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text); font-size: 1rem; }
.ct-main strong { font-size: 1.6rem; color: var(--accent-2); }
.mults { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.mults-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: var(--surface-2); border: 0;
    color: var(--text); font: inherit; font-size: 0.92rem; font-weight: 600; text-align: left; cursor: pointer;
}
.mt-label { display: inline-flex; align-items: center; gap: 8px; }
.mt-label svg { width: 16px; height: 16px; color: var(--accent); }
.mults-sum { margin-left: auto; padding: 1px 9px; border-radius: 999px; background: rgba(154, 140, 255, 0.15); color: var(--accent); font-size: 0.75rem; font-weight: 600; }
.chev { width: 16px; height: 16px; transition: transform .2s; }
.mults-toggle.open .chev { transform: rotate(180deg); }
.mults-body { padding: 14px; border-top: 1px solid var(--border); }
.mults-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.mults-all label { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; font-size: 0.85rem; color: var(--muted); }
.mults-all input {
    width: 62px; padding: 5px 6px; text-align: center; background: var(--bg, #181414); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit;
}
.mult-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mult-cell { display: grid; min-width: 0; gap: 5px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.mc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.78rem; }
.mult-cell .stepper { justify-self: stretch; }
.mult-cell .stepper { display: flex; }
.mult-cell .stepper input { flex: 1 1 0; width: 0; min-width: 0; }
@media (max-width: 900px) {
    .prices-layout { grid-template-columns: 1fr; }
    .calc { position: static; order: -1; }
}
.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto 22px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
.notice svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.item-icon.ph { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: hsl(var(--h) 35% 26%); color: hsl(var(--h) 70% 82%); font-size: 0.8rem; font-weight: 700; line-height: 1; }
#iconNote { margin-top: 2rem; }
