:root {
  --red: #b7282e;
  --red-dark: #7f1d22;
  --red-soft: #fff0f1;
  --ink: #241f20;
  --muted: #6f6668;
  --border: #ead9db;
  --surface: #ffffff;
  --background: #f7f5f5;
  --danger: #8f2025;
  --shadow: 0 12px 30px rgba(71, 25, 28, .09);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--background); padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-header { display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.header-logo { width: 124px; max-height: 48px; object-fit: contain; object-position: left center; }
.header-copy { flex: 1; min-width: 0; padding-left: 12px; border-left: 1px solid var(--border); }
.header-copy h1 { font-size: 1.05rem; white-space: nowrap; }
.header-count { min-width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--red); color: white; font-weight: 900; }
.eyebrow { margin: 0 0 3px; font-size: .68rem; font-weight: 900; letter-spacing: .14em; color: var(--muted); }
.eyebrow.red { color: var(--red); }
h1, h2 { margin: 0; }
h2 { font-size: 1.18rem; }
.progress-wrap { position: sticky; top: calc(72px + env(safe-area-inset-top)); z-index: 15; background: rgba(247,245,245,.96); backdrop-filter: blur(8px); padding: 10px 16px 8px; border-bottom: 1px solid rgba(234,217,219,.8); }
.progress-track { height: 7px; border-radius: 99px; background: #e8dfe0; overflow: hidden; }
.progress-bar { width: 0; height: 100%; background: var(--red); border-radius: inherit; transition: width .25s ease; }
.progress-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: .7rem; font-weight: 800; color: #93898b; }
.progress-labels .done { color: var(--red); }
.app-shell { width: min(100%, 780px); margin: 0 auto; padding: 18px 14px 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
label { display: block; font-weight: 800; margin-bottom: 14px; }
label:last-child { margin-bottom: 0; }
input, textarea { width: 100%; margin-top: 8px; border: 1.5px solid #d7ccce; border-radius: 14px; padding: 14px; min-height: 52px; background: #fff; color: var(--ink); outline: none; }
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(183,40,46,.12); }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.structure-name-label { flex: 1; margin: 0; }
.trade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trade-button { min-height: 64px; border: 1.5px solid #d7ccce; border-radius: 16px; background: #fff; color: var(--ink); font-weight: 850; padding: 12px; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.trade-button::after { content: "+"; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: #f2eded; color: var(--muted); font-size: 1.15rem; }
.trade-button:active { transform: scale(.97); }
.trade-button.selected { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 8px 18px rgba(183,40,46,.22); }
.trade-button.selected::after { content: "✓"; color: var(--red); background: #fff; }
.misc-input-wrap { grid-column: 1 / -1; padding: 14px; border-radius: 16px; background: var(--red-soft); border: 1px solid #f1cfd2; }
.misc-input-wrap label { margin: 0; }
button { border: 0; border-radius: 14px; min-height: 54px; padding: 13px 16px; font-weight: 900; cursor: pointer; }
.primary-button { background: var(--red); color: #fff; }
.primary-button:active { background: var(--red-dark); }
.secondary-button { background: #fff; color: var(--red-dark); border: 1.5px solid var(--red); }
.danger-button { background: #fff; color: var(--danger); border: 1.5px solid #d8afb2; }
.full-width { width: 100%; margin-bottom: 16px; }
.remove-structure { min-height: 44px; background: #fff; color: var(--danger); border: 1px solid #deb6b9; padding: 10px 12px; }
.mini-actions { display: flex; gap: 6px; }
.mini-button { min-height: 38px; padding: 8px 10px; border-radius: 11px; font-size: .76rem; background: var(--red-soft); color: var(--red-dark); border: 1px solid #efc8cb; }
.structure-actions { justify-content: flex-end; margin: -4px 0 12px; }
.count-card { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 16px; padding: 17px; border-radius: 17px; background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; text-align: center; font-size: 1.08rem; box-shadow: 0 10px 24px rgba(127,29,34,.2); }
.count-icon { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.confirmation-row { display: flex; gap: 12px; align-items: flex-start; margin: 0; line-height: 1.4; padding: 14px; border-radius: 15px; background: #faf7f7; }
.confirmation-row input { width: 28px; height: 28px; min-height: auto; margin: 0; flex: 0 0 auto; accent-color: var(--red); }
.error-message { color: var(--danger); font-weight: 800; margin: 12px 0 0; }
.save-status { text-align: center; color: var(--muted); font-size: .88rem; }
.bottom-actions { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1.5fr 1fr .72fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(43,20,22,.1); backdrop-filter: blur(10px); }
.bottom-actions button { min-height: 58px; padding: 10px 8px; font-size: .83rem; }
.bottom-actions button span { display: block; font-size: 1.15rem; line-height: 1; margin-bottom: 3px; }
.outline-mobile { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.compact { padding-left: 6px; padding-right: 6px; }
@media (min-width: 620px) { .app-shell { padding-left: 20px; padding-right: 20px; } .trade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bottom-actions { left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 780px); border: 1px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; } }
@media (max-width: 390px) { .header-logo { width: 105px; } .header-copy { padding-left: 8px; } .header-copy h1 { font-size: .92rem; } }
@media print { .app-header, .bottom-actions, .save-status, #addStructure, .progress-wrap, .mini-actions, .remove-structure { display: none !important; } body { background: #fff; padding: 0; } .card { box-shadow: none; break-inside: avoid; } }
