:root {
  --gold: #d2a04f;
  --ink: #343230;
  --muted: #77736e;
  --line: #e5e2dd;
  --paper: #ffffff;
  --screen: #f7f7f7;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--screen); color: var(--ink); font-family: Arial, sans-serif; }
button, input { font: inherit; }
.app { max-width: 480px; min-height: 100vh; margin: auto; background: var(--screen); padding-bottom: 76px; }
.topbar { height: 94px; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px 17px; background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.topbar h1 { margin: 0; font: 700 25px Georgia, serif; letter-spacing: .2px; }
.back, .help { position: absolute; bottom: 13px; border: 0; background: transparent; color: var(--gold); cursor: pointer; }
.back { left: 14px; font-size: 34px; line-height: 28px; font-weight: 200; }
.help { right: 16px; width: 24px; height: 24px; border: 2px solid var(--gold); border-radius: 50%; font-weight: bold; }
.content { padding: 20px 16px; }
.view { display: none; }
.view.active { display: block; }
.card { background: var(--paper); padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 2px 8px #00000015; }
h2, h3 { font-family: Georgia, serif; }
.card h2 { margin: 0 0 14px; font-size: 22px; }
.progress-row { display: flex; justify-content: space-between; color: #55514d; margin-bottom: 10px; }
.progress-track { height: 3px; background: #d8d8d8; }
.progress-fill { width: 0; height: 3px; background: #3c917b; transition: width .3s ease; }
.photo { height: 180px; background: #bababa; display: grid; place-items: center; overflow: hidden; margin-bottom: 13px; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-icon { width: 77px; height: 77px; border: 2px solid #fff; border-radius: 10px; position: relative; opacity: .9; }
.placeholder-icon::before { content: ''; position: absolute; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; top: 15px; left: 14px; }
.placeholder-icon::after { content: ''; position: absolute; width: 48px; height: 48px; border-top: 2px solid #fff; transform: rotate(-45deg); left: 21px; top: 33px; }
.description { font-size: 17px; line-height: 1.4; margin: 0; }
.stats { display: flex; justify-content: space-around; text-align: center; color: var(--gold); margin: 9px 0 17px; font-family: Georgia, serif; }
.stats strong { display: block; font-size: 24px; }
.stats span { font-weight: bold; }
.primary { border: 0; width: 100%; background: var(--gold); color: #fff; padding: 10px; cursor: pointer; font-size: 19px; box-shadow: 0 2px 4px #00000018; }
.primary small { display: block; margin-top: 3px; font-size: 14px; }
.install-button { display: block; margin: 14px auto 0; border: 0; background: transparent; color: var(--gold); cursor: pointer; font-size: 15px; }
.install-button:disabled { opacity: .6; cursor: wait; }
.install-status { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 0; }
.question-status { padding: 9px 11px; background: #fff; box-shadow: 0 2px 8px #00000015; margin-bottom: 15px; }
.question-status.correct { border-left: 5px solid #24c63a; }
.error-popup { position: fixed; top: 50%; left: 50%; z-index: 20; width: min(300px, calc(100% - 40px)); padding: 14px 18px; transform: translate(-50%, -50%) scale(.95); background: #fff; color: var(--ink); text-align: center; box-shadow: 0 4px 20px #0004; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.error-popup.visible { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.answers { padding: 13px 14px 6px; }
.answer { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; font-size: 18px; cursor: pointer; }
.answer input { appearance: none; width: 20px; height: 20px; border: 2px solid var(--gold); border-radius: 50%; margin: 0; }
.answer input:checked { box-shadow: inset 0 0 0 4px #fff; background: var(--gold); }
.places-view { padding: 0; }
.places-list { display: grid; gap: 20px; }
.place-item { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.place-photo { height: 120px; background: #bababa; display: grid; place-items: center; overflow: hidden; box-shadow: 0 2px 6px #00000015; }
.place-photo .placeholder-icon { width: 58px; height: 58px; }
.place-copy h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.1; }
.place-copy p { margin: 0; font-size: 15px; line-height: 1.17; }
.place-item.missing .place-photo .placeholder-icon { border: 0; color: #fff; font: 700 60px Georgia, serif; opacity: 1; }
.place-item.missing .place-copy h2 { color: var(--ink); }
.scanner { text-align: center; }
.scanner h2 { font-size: 24px; margin: 4px 0 8px; }
.scanner p { color: var(--muted); line-height: 1.4; }
#camera { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #242321; margin: 16px 0; }
.scanner-note { font-size: 13px; }
.manual { display: flex; gap: 8px; margin-top: 14px; }
.manual input { min-width: 0; flex: 1; border: 1px solid var(--line); padding: 11px; background: #fff; }
.manual .primary { width: auto; padding-inline: 16px; font-size: 15px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); height: 76px; display: flex; background: #fff; border-top: 1px solid #d7d4cf; z-index: 5; }
.nav-button { flex: 1; border: 0; background: transparent; color: #bdbdbd; cursor: pointer; font-size: 12px; }
.nav-button.active { color: var(--gold); }
.nav-icon { display: block; font-size: 27px; line-height: 31px; }
.modal-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: #0008; z-index: 10; }
.modal { width: min(340px, 100%); background: #fff; padding: 24px 20px; text-align: center; box-shadow: 0 4px 20px #0004; }
.modal h2 { margin: 0 0 8px; }
.location-modal { padding: 19px 20px 20px; text-align: left; }
.location-modal h2 { font-size: 21px; line-height: 1.12; margin-bottom: 16px; }
.location-modal .photo { height: 179px; margin-bottom: 17px; }
.location-modal p { margin: 0 0 16px; font-size: 17px; line-height: 1.42; }
.coupon { color: #3c917b; font: bold 21px monospace; letter-spacing: 1px; margin: 17px 0; }
.close { border: 0; background: transparent; color: var(--gold); cursor: pointer; }
@media (min-width: 481px) { body { padding: 18px 0; } .app { box-shadow: 0 0 15px #00000018; } .bottom-nav { bottom: 18px; } }
