:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; color: #20352e; background: #f2f6f3; }
* { box-sizing: border-box; }
body { margin: 0; }
.app { max-width: 800px; margin: auto; padding: 32px 20px; padding-bottom: max(32px, env(safe-area-inset-bottom)); }
header { margin-bottom: 28px; }
.eyebrow { color: #16745b; letter-spacing: .16em; font-size: 12px; font-weight: 700; }
h1 { font-size: clamp(25px, 5vw, 34px); margin: 8px 0; }
header > p:last-child, .hint, footer { color: #53685e; line-height: 1.7; }
.card { background: white; border: 1px solid #dde6e0; border-radius: 20px; padding: 24px; margin-bottom: 20px; box-shadow: 0 4px 20px #20352e05; }
h2 { font-size: 20px; margin: 0 0 20px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
input, select, button { font: inherit; font-size: 16px; min-height: 48px; border-radius: 10px; }
input, select { width: 100%; border: 1px solid #9eafa5; background: white; color: #20352e; padding: 12px; }
button { cursor: pointer; padding: 12px 16px; font-weight: 600; touch-action: manipulation; }
button:disabled { opacity: .6; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #de9b24; outline-offset: 3px; }
.voice { width: 100%; border: 1px solid #16745b; color: #12614c; background: #edf7f1; }
.primary { width: 100%; background: #16745b; color: white; border: 0; margin-top: 24px; }
.hint { font-size: 13px; margin-bottom: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; }
#item-count { white-space: nowrap; background: #edf7f1; padding: 6px 12px; border-radius: 20px; font-size: 14px; }
.empty { text-align: center; line-height: 1.9; color: #53685e; padding: 24px 0; }
#inventory-list { list-style: none; padding: 0; margin: 16px 0 0; }
.item { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid #e5ebe7; }
.item-info { flex: 1; min-width: 0; }
.item-name { display: block; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 6px; }
.item-amount { color: #12614c; font-variant-numeric: tabular-nums; }
.delete { border: 1px solid #ddd; color: #9a3434; background: white; flex-shrink: 0; }
footer { text-align: center; font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 480px) { .app { padding: 24px 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); } .card { padding: 20px 16px; } }
.tabs, .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs button, .actions button { flex: 1; }
button { border: 1px solid #9eafa5; background: #fff; color: #20352e; }
.tabs button[aria-pressed="true"] { background: #16745b; color: white; }
.actions .primary { margin-top: 0; }
.actions { margin-top: 16px; }
#products { list-style: none; padding: 0; }
#products .item { display: block; }
.product-select { text-align: left; width: 100%; line-height: 1.6; overflow-wrap: anywhere; }
.product-select[aria-pressed="true"] { border: 2px solid #16745b; background: #edf7f1; }
.amounts { color: #12614c; font-weight: 600; overflow-wrap: anywhere; }
.result { line-height: 1.8; font-weight: 600; overflow-wrap: anywhere; }
.danger { color: #9a3434; }
#progress { display: inline-block; background: #dceee3; padding: 10px 16px; border-radius: 12px; }
dialog { border: 1px solid #9eafa5; border-radius: 18px; padding: 24px; width: min(92vw, 600px); max-height: 85dvh; overflow: auto; color: #20352e; }
dialog::backdrop { background: #102c2466; }
dialog p { line-height: 1.8; }
.dialog-error { color: #9a3434; }
#selected { line-height: 1.7; overflow-wrap: anywhere; }
