:root { font-family: Inter, system-ui, sans-serif; color: #291d25; background: #f4eee9; line-height: 1.45; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.install-panel { padding: 16px 22px; display: flex; gap: 12px; align-items: center; background: #f5e5e8; color: #56102f; }
.install-panel p { font-size: 13px; margin: 4px 0 0; }
.install-panel button { flex-shrink: 0; }
.secondary { background: transparent; color: #6e173e; border: 1px solid #6e173e; }
button:focus-visible, .upload:focus-within { outline: 3px solid #b36b8b; outline-offset: 3px; }
@media(max-width: 380px) { .install-panel { flex-direction: column; align-items: stretch; } header small { font-size: 10px; } }
main { max-width: 520px; min-height: 100vh; margin: auto; background: #fff8f3; box-shadow: 0 0 40px #59324d22; }
header { height: 70px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eadad3; color: #6e173e; }
header span { font-weight: 850; letter-spacing: .08em; }
header small { color: #8c777f; }
.hero { padding: 42px 22px 28px; background: linear-gradient(150deg, #fff8f3, #f5e5e8); }
.eyebrow { margin: 0; color: #9b2357; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.hero h1 { font-family: Georgia, serif; font-size: 48px; line-height: .94; margin: 16px 0; color: #56102f; }
.hero > p { color: #67545c; }
.upload { display: flex; flex-direction: column; gap: 4px; padding: 20px; border: 1.5px dashed #9b2357; border-radius: 16px; background: #fff; cursor: pointer; }
.upload input { position: absolute; opacity: 0; pointer-events: none; }
.upload span { font-size: 13px; color: #8b747d; }
button { border: 0; border-radius: 12px; padding: 14px 18px; background: #6e173e; color: #fff; font-weight: 750; font-size: 15px; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
#scan { width: 100%; margin-top: 14px; }
#preview { display: block; width: 100%; max-height: 330px; object-fit: contain; border-radius: 14px; margin-top: 14px; background: #eee; }
.card { margin: 18px; padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 8px 30px #4811261a; }
.state { display: inline-block; padding: 6px 10px; border-radius: 99px; background: #f5e5e8; color: #791b43; font-size: 12px; font-weight: 800; }
.card h2 { font-family: Georgia, serif; font-size: 31px; color: #56102f; margin: 14px 0; }
.card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card dl div { border-top: 1px solid #eadad3; padding-top: 8px; }
.card dt { font-size: 11px; color: #947e86; text-transform: uppercase; }
.card dd { margin: 2px 0; font-weight: 650; }
.card details { background: #f8f1ed; padding: 12px; border-radius: 12px; }
.card hr { border: 0; border-top: 1px solid #eadad3; margin: 22px 0; }
.pairing { display: flex; gap: 8px; }
.pairing input { min-width: 0; flex: 1; padding: 13px; border: 1px solid #d6c3c8; border-radius: 10px; font-size: 15px; }
#message { min-height: 24px; }
.low { background: #fff0ca; color: #765500; }
.candidates-panel { margin-top: 12px; }
.candidates-panel summary { cursor: pointer; font-weight: 750; }
.candidates-panel summary:focus-visible { outline: 3px solid #b36b8b; outline-offset: 3px; }
.candidates-panel p, #selection-note { font-size: 13px; color: #67545c; }
#candidates { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.candidate { width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; background: #fff; color: #56102f; border: 2px solid #eadad3; }
.candidate[aria-pressed="true"] { border-color: #6e173e; background: #f5e5e8; }
.candidate span, .candidate small { display: block; }
.candidate small { margin-top: 5px; color: #67545c; font-weight: 400; }
.card h2, .card dd, #description { overflow-wrap: anywhere; }
@media(max-width: 380px) { .hero h1 { font-size: 39px; } .card dl { grid-template-columns: 1fr; } }
.pairing-score { font-weight: 750; color: #6e173e; margin-bottom: 6px; }
#pairing-meter { width: 100%; height: 18px; }
#pairing-details ul { padding-left: 20px; }
#pairing-details li { margin: 8px 0; }
#pairing-disclaimer { display: block; color: #67545c; }
@media(max-width: 380px) { .pairing { flex-direction: column; } }
