:root { color-scheme: light; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #ffffff; color: #1a1a1a; line-height: 1.5; font-size: 14px; }
.app { max-width: 1200px; margin: 0 auto; padding: 20px; }

.open-mode-banner {
  background: #fbe6e6; color: #b04545; border-bottom: 1px solid #f0c5c5;
  padding: 10px 20px; font-size: 13px; text-align: center;
}
.open-mode-banner strong { font-weight: 700; margin-right: 6px; }
.open-mode-banner code { background: rgba(176, 69, 69, 0.12); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f5f3ee; padding: 20px; }
.login-card { width: 100%; max-width: 460px; background: #ffffff; border: 1px solid #e8e4dc; border-radius: 14px; padding: 36px 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.login-brand-line { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #8a8a8a; font-weight: 600; }
.login-brand-title { font-size: 26px; font-weight: 600; color: #1a1a1a; letter-spacing: -0.02em; margin-top: 4px; }
.login-sub { font-size: 14px; color: #6b6b6b; margin: 14px 0 22px 0; line-height: 1.55; }
.login-note { font-size: 12px; color: #8a8a8a; margin-top: 20px; line-height: 1.55; }
.login-note a { color: #8b3a3a; }
.login-error { background: #fbe6e6; color: #b04545; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-top: 14px; border-left: 3px solid #b04545; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 20px; background: #ffffff; color: #1a1a1a; text-decoration: none; border: 1px solid #d4cfc4; border-radius: 8px; font-size: 14px; font-weight: 500; transition: all 0.15s; }
.google-btn:hover { background: #faf8f4; border-color: #b8a98a; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #f7f5f1; border-radius: 12px; border: 1px solid #e8e4dc; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.header h1 { font-size: 18px; font-weight: 600; color: #1a1a1a; letter-spacing: -0.01em; }
.header h1 .sub { font-size: 12px; font-weight: 400; color: #6b6b6b; margin-left: 8px; }
.user-line { font-size: 11px; color: #8a8a8a; margin-top: 2px; }
.header-right { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.view-selector { display: flex; gap: 8px; align-items: center; }
.view-selector label { font-size: 12px; color: #6b6b6b; font-weight: 500; }
.view-selector select { padding: 6px 10px; border: 1px solid #d4cfc4; border-radius: 6px; background: #ffffff; font-size: 13px; color: #1a1a1a; cursor: pointer; min-width: 220px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e5e0; margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 10px 16px; cursor: pointer; font-size: 13px; font-weight: 500; color: #6b6b6b; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: #1a1a1a; }
.tab.active { color: #8b3a3a; border-bottom-color: #8b3a3a; }

/* KPI strip */
.kpi-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: #ffffff; border: 1px solid #e8e4dc; border-radius: 8px; padding: 14px 16px; }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #8a8a8a; font-weight: 600; }
.kpi-value { font-size: 24px; font-weight: 600; color: #1a1a1a; margin-top: 4px; letter-spacing: -0.02em; }
.kpi-sub { font-size: 11px; color: #6b6b6b; margin-top: 2px; }

/* Locations grid */
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b6b6b; font-weight: 600; margin: 24px 0 10px 0; }
.locations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 24px; }
.location-card { background: #ffffff; border: 1px solid #e8e4dc; border-radius: 8px; padding: 12px 14px; }
.loc-name { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.loc-brand { font-size: 11px; color: #6b6b6b; margin-top: 1px; }
.loc-stats { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: #6b6b6b; flex-wrap: wrap; }
.loc-stat strong { color: #1a1a1a; font-weight: 600; }
.loc-stars { color: #c98810; font-weight: 600; }

/* Review cards */
.review-card { background: #ffffff; border: 1px solid #e8e4dc; border-radius: 10px; padding: 18px; margin-bottom: 14px; scroll-margin-top: 80px; transition: box-shadow 0.3s, border-color 0.3s; }
.review-card.highlight { border-color: #8b3a3a; box-shadow: 0 0 0 4px rgba(139, 58, 58, 0.12); }
.review-card.posted { opacity: 0.55; }
.review-card.retention { border-color: #b04545; border-width: 2px; }
.review-anchor { display: inline-block; font-size: 11px; color: #b8a98a; text-decoration: none; margin-left: 8px; font-family: ui-monospace, SFMono-Regular, monospace; }
.review-anchor:hover { color: #8b3a3a; }
.review-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.review-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.platform-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #ffffff; text-transform: uppercase; letter-spacing: 0.04em; }
.platform-OpenTable { background: #da3743; }
.platform-Google { background: #4285f4; }
.platform-Yelp { background: #d32323; }
.platform-TripAdvisor { background: #00aa6c; }
.platform-Facebook { background: #1877f2; }
.platform-GrubHub { background: #ff8000; }
.platform-DoorDash { background: #ff3008; }
.platform-UberEats { background: #06c167; }
.platform-Skip { background: #f57b20; }
.reviewer { font-weight: 600; font-size: 14px; color: #1a1a1a; }
.review-loc { color: #6b6b6b; font-size: 12px; }
.review-date { color: #8a8a8a; font-size: 12px; }
.review-stars { color: #c98810; font-size: 16px; letter-spacing: -1px; }
.review-status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.status-auto { background: #e8f5ec; color: #2d7a4f; }
.status-pending { background: #fdf3e0; color: #8a5a10; }
.status-risk { background: #fbe6e6; color: #b04545; }
.status-rating-only { background: #eef0f4; color: #555; }
.status-posted { background: #2d7a4f; color: #ffffff; }
.review-subscores { display: flex; gap: 14px; font-size: 12px; color: #6b6b6b; margin-bottom: 8px; padding: 6px 10px; background: #faf8f4; border-radius: 6px; flex-wrap: wrap; }
.review-subscores strong { color: #1a1a1a; font-weight: 600; }
.review-tags { font-size: 11px; color: #8a6c5c; margin-bottom: 8px; font-style: italic; }
.review-body { font-size: 13px; color: #2a2a2a; padding: 10px 12px; background: #faf8f4; border-radius: 6px; margin-bottom: 10px; border-left: 3px solid #d4cfc4; }
.review-private { font-size: 12px; color: #6b6b6b; padding: 8px 10px; background: #f0ede5; border-radius: 6px; margin-bottom: 10px; border-left: 3px solid #b8a98a; }
.review-private-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #8a6c5c; font-weight: 600; margin-bottom: 4px; }
.no-text-marker { font-size: 12px; color: #8a8a8a; font-style: italic; padding: 8px 12px; background: #faf8f4; border-radius: 6px; margin-bottom: 10px; }

/* Response options */
.responses { margin-top: 14px; border-top: 1px solid #e8e4dc; padding-top: 14px; }
.responses-title { display: flex; justify-content: space-between; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b6b6b; font-weight: 600; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.responses-title .picker { display: flex; gap: 6px; flex-wrap: wrap; }
.opt-tab { padding: 5px 12px; font-size: 11px; font-weight: 600; background: #ffffff; color: #6b6b6b; border: 1px solid #d4cfc4; border-radius: 6px; cursor: pointer; text-transform: uppercase; letter-spacing: 0.04em; }
.opt-tab.active { background: #8b3a3a; color: #ffffff; border-color: #8b3a3a; }
.opt-body { white-space: pre-wrap; font-size: 13px; line-height: 1.65; padding: 14px 16px; background: #ffffff; border: 1px solid #d4cfc4; border-radius: 8px; color: #1a1a1a; font-family: Georgia, "Times New Roman", serif; min-height: 80px; }
.opt-body[contenteditable="true"] { outline: 2px solid #8b3a3a; outline-offset: -2px; }

.draft-private { margin-top: 12px; padding: 12px 14px; background: #f3eee5; border: 1px dashed #b8a98a; border-radius: 8px; }
.draft-private-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #8a6c5c; font-weight: 600; margin-bottom: 6px; }
.draft-private-body { white-space: pre-wrap; font-family: Georgia, serif; font-size: 13px; line-height: 1.65; color: #1a1a1a; }

.action-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.btn { padding: 8px 14px; font-size: 12px; font-weight: 600; border-radius: 6px; cursor: pointer; border: 1px solid #d4cfc4; background: #ffffff; color: #1a1a1a; text-decoration: none; display: inline-block; }
.btn-small { padding: 6px 12px; font-size: 11px; }
.btn:hover { background: #faf8f4; border-color: #b8a98a; }
.btn-primary { background: #8b3a3a; color: #ffffff; border-color: #8b3a3a; }
.btn-primary:hover { background: #6f2e2e; border-color: #6f2e2e; }
.btn-success { background: #2d7a4f; color: #ffffff; border-color: #2d7a4f; }
.btn-success:hover { background: #226039; border-color: #226039; }
.btn-secondary { background: #f7f5f1; }

.internal-notes { margin-top: 12px; padding: 8px 12px; background: #f7f5f1; border-radius: 6px; font-size: 12px; color: #555; border-left: 3px solid #b8a98a; }
.internal-notes-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #8a6c5c; font-weight: 600; margin-bottom: 4px; }

.state { text-align: center; padding: 60px 20px; color: #6b6b6b; }
.state-title { font-size: 18px; color: #1a1a1a; font-weight: 600; margin-bottom: 8px; }
.state-sub { font-size: 13px; color: #6b6b6b; max-width: 480px; margin: 0 auto; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #e8e4dc; border-top-color: #8b3a3a; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1a1a1a; color: #ffffff; padding: 10px 18px; border-radius: 6px; font-size: 13px; opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 100; }
.toast.visible { opacity: 1; }

.settings { background: #ffffff; border: 1px solid #e8e4dc; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.settings h3 { font-size: 14px; margin-bottom: 12px; color: #1a1a1a; font-weight: 600; }
.settings-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0ede5; font-size: 13px; 