:root {
    --ink: #25231f;
    --muted: #7e786f;
    --paper: #f8f4ec;
    --card: #fffdf8;
    --line: #e6dfd3;
    --accent: #d25b34;
    --accent-dark: #ad4224;
    --green: #46735a;
    --shadow: 0 24px 70px rgba(60, 48, 29, .09);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E"); }
.topbar { max-width: 1120px; margin: auto; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 21px 'Manrope', sans-serif; letter-spacing: -.8px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-size: 17px; }
.history-picker { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.history-picker select { min-width: 220px; border: 1px solid var(--line); background: rgba(255,255,255,.65); padding: 10px 34px 10px 12px; border-radius: 10px; color: var(--ink); }
main { width: min(840px, calc(100% - 40px)); margin: 0 auto; }
.hero { text-align: center; padding: 70px 0 56px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 2.4px; font-size: 11px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 9px; }
.eyebrow span { width: 20px; height: 1px; background: var(--accent); }
.hero h1 { margin: 20px 0 18px; font: 800 clamp(46px, 8vw, 74px)/.98 'Manrope', sans-serif; letter-spacing: -4px; }
.hero h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.hero p { max-width: 520px; margin: auto; color: var(--muted); line-height: 1.65; }
.notice { border-radius: 12px; padding: 14px 18px; margin: 0 0 18px; font-size: 14px; }
.notice p { margin: 2px 0; }
.notice-error { color: #8e3428; background: #fae7df; border: 1px solid #efc7b8; }
.notice-success { color: #356246; background: #e7f0e7; border: 1px solid #c4dcc8; }
.review-card, .history { background: var(--card); border: 1px solid rgba(221,212,198,.9); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(24px, 6vw, 52px); }
.card-heading { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 38px; }
.step-number { color: var(--accent); font: 700 12px 'Manrope'; padding-top: 5px; }
h2 { margin: 0; font: 800 28px/1.15 'Manrope'; letter-spacing: -1px; }
.card-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.field-label, fieldset legend { display: block; margin: 0 0 10px; font-weight: 700; font-size: 13px; }
.text-input, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; font: inherit; outline: none; transition: border .2s, box-shadow .2s; }
.text-input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(210,91,52,.1); }
.place-search { position: relative; }
.place-search .text-input { padding-right: 44px; }
.place-search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; pointer-events: none; }
.place-results { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; right: 0; max-height: 330px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 45px rgba(43,34,22,.16); }
.place-result { width: 100%; min-height: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; }
.place-result:hover, .place-result:focus { background: #faf4ea; outline: none; }
.place-result-content { min-width: 0; }
.place-result-content strong, .place-result-content small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-result-content strong { font-size: 13px; }
.place-result-content small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.place-result-source { flex: 0 0 auto; color: var(--muted); background: var(--soft, #f1ebe1); border-radius: 999px; padding: 5px 7px; font-size: 9px; }
.place-help { margin: 7px 2px 0; color: var(--muted); font-size: 10px; }
.place-help.is-error { color: #a84232; }
.place-empty { color: var(--muted); margin: 0; padding: 18px 14px; text-align: center; font-size: 11px; }
.google-attribution { display: flex; justify-content: flex-end; padding: 7px 10px; background: #fff; }
.google-attribution img { width: 120px; height: auto; }
.selected-place { margin-top: 10px; padding: 12px; border-radius: 11px; background: #edf3ec; display: grid; grid-template-columns: 25px 1fr 32px; align-items: center; gap: 9px; }
.selected-place > div { min-width: 0; }
.selected-place-check { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 12px; }
.selected-place strong, .selected-place small { display: block; }
.selected-place strong { font-size: 12px; }
.selected-place small { color: var(--muted); margin-top: 2px; font-size: 10px; line-height: 1.35; }
.selected-place button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.service-choice { border: 0; padding: 0; margin: 30px 0 0; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice-card { position: relative; min-height: 145px; border: 1px solid var(--line); border-radius: 16px; padding: 23px; display: flex; flex-direction: column; justify-content: center; cursor: pointer; transition: .2s; }
.choice-card:has(input:checked) { border-color: var(--accent); background: #fff8f2; box-shadow: 0 0 0 1px var(--accent); }
.choice-card input { position: absolute; opacity: 0; }
.choice-icon { color: var(--accent); font-size: 26px; margin-bottom: 10px; }
.choice-card strong { font-size: 16px; }
.choice-card small, .rating-row small { display: block; color: var(--muted); margin-top: 4px; }
.section-divider { display: flex; align-items: center; gap: 14px; margin: 36px 0 15px; text-transform: uppercase; letter-spacing: 1.7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.section-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.rating-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rating-row strong { font-size: 14px; }
.rating-row small { font-size: 11px; }
.stars { display: inline-flex; flex-direction: row-reverse; }
.stars input { position: absolute; opacity: 0; }
.stars label { color: #d9d2c6; font-size: 27px; padding: 0 2px; cursor: pointer; transition: color .15s, transform .15s; }
.stars label:hover { transform: translateY(-2px); }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #e8a23f; }
.review-label { margin-top: 28px; }
.review-label span { color: var(--muted); float: right; font-weight: 400; }
.textarea-wrap { position: relative; }
.textarea-wrap textarea { resize: vertical; min-height: 98px; padding-bottom: 28px; }
.textarea-wrap > small { position: absolute; right: 13px; bottom: 11px; color: var(--muted); font-size: 11px; }
.submit-button { width: 100%; margin-top: 18px; border: 0; border-radius: 12px; padding: 16px 20px; background: var(--accent); color: #fff; font: 700 14px inherit; cursor: pointer; transition: background .2s, transform .2s; }
.submit-button span { float: right; font-size: 18px; line-height: 14px; }
.submit-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.submit-button:disabled { opacity: .45; cursor: not-allowed; }
.history-button { width: 100%; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 15px 20px; background: rgba(255,255,255,.45); color: var(--ink); display: flex; justify-content: space-between; text-decoration: none; font-size: 14px; font-weight: 700; transition: background .2s, transform .2s; }
.history-button:hover { background: var(--card); transform: translateY(-1px); }
.small-link { color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.page-intro { padding: 55px 0 30px; }
.page-intro h1, .admin-heading h1 { margin: 7px 0 8px; font: 800 clamp(38px, 7vw, 58px)/1 'Manrope', sans-serif; letter-spacing: -2px; }
.page-intro p, .admin-heading p { color: var(--muted); margin: 0; }
.restaurant-filter { display: block; margin-bottom: 14px; font-size: 12px; font-weight: 700; }
.restaurant-filter select { width: 100%; display: block; margin-top: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 14px; font: inherit; }
.history.history-page { margin-top: 0; }
.history-empty { margin-top: 20px; }
.history { margin-top: 36px; }
.history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.restaurant-address { max-width: 520px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.kicker { display: block; color: var(--accent); text-transform: uppercase; letter-spacing: 1.8px; font-size: 10px; font-weight: 700; margin-bottom: 7px; }
.entry-count, .type-pill { border-radius: 999px; background: #f0ebe1; color: var(--muted); padding: 7px 11px; font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats-grid article { background: #f6f1e8; border-radius: 14px; padding: 18px; }
.stats-grid small, .stats-grid span { display: block; color: var(--muted); font-size: 10px; }
.stats-grid strong { display: block; margin: 7px 0 2px; font: 800 27px 'Manrope'; }
.stats-grid .mini-stars { color: #e8a23f; letter-spacing: -1px; }
.stats-grid .positive { color: var(--green); }
.stats-grid .negative { color: #a84232; }
.chart-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 8px; }
.chart-card > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart-card strong { font-size: 13px; }
.chart-card small { color: var(--muted); font-size: 10px; }
.chart-card canvas { width: 100%; margin-top: 12px; }
.timeline { margin-top: 28px; }
.timeline-item { display: grid; grid-template-columns: 54px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline-date { text-align: center; }
.timeline-date strong { display: block; font: 800 25px 'Manrope'; }
.timeline-date span { color: var(--muted); font-size: 10px; }
.timeline-top { display: flex; justify-content: space-between; align-items: center; }
.timeline-top > strong { font: 800 18px 'Manrope'; }
.timeline-top > strong span { color: #e8a23f; }
.timeline-content p { margin: 14px 0; color: #575249; font-family: Georgia, serif; font-style: italic; line-height: 1.5; }
.score-list { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.empty-state { color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 14px; padding: 30px; }
footer { text-align: center; color: var(--muted); padding: 54px 20px 36px; font-size: 11px; letter-spacing: .4px; }
footer span { color: var(--accent); margin-left: 5px; }
footer a { color: inherit; }
[hidden] { display: none !important; }

/* Administración */
.admin-body { background: #f3efe7; }
.admin-topbar { min-height: 72px; padding: 18px 28px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.admin-topbar > div { display: flex; align-items: center; gap: 20px; }
.admin-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.3px; }
.admin-main { width: min(1100px, calc(100% - 40px)); padding: 46px 0 70px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.updated-at { color: var(--muted); font-size: 11px; white-space: nowrap; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.admin-stats article { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 21px; }
.admin-stats small, .admin-stats span { display: block; color: var(--muted); font-size: 11px; }
.admin-stats strong { display: block; margin: 9px 0 3px; font: 800 30px 'Manrope'; }
.admin-panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; margin-top: 16px; }
.admin-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-panel-head > span { color: var(--muted); font-size: 11px; }
.restaurant-admin-row { display: grid; grid-template-columns: 42px minmax(170px, 1fr) 90px 100px 22px; gap: 16px; align-items: center; color: var(--ink); text-decoration: none; padding: 15px 0; border-top: 1px solid var(--line); }
.restaurant-admin-row:first-child { border-top: 0; }
.restaurant-monogram { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: #f8e9df; font-weight: 800; }
.restaurant-name strong, .restaurant-name small, .restaurant-metric strong, .restaurant-metric small { display: block; }
.restaurant-name small, .restaurant-metric small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.restaurant-metric { text-align: right; }
.restaurant-metric.score strong span, .admin-score span { color: #e8a23f; }
.row-arrow { color: var(--accent); }
.review-admin-row { padding: 18px 0; border-top: 1px solid var(--line); }
.review-admin-row:first-child { border-top: 0; }
.review-admin-top, .review-admin-top > div { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.review-admin-row p { margin: 11px 0; color: #575249; font-family: Georgia, serif; font-style: italic; }
.admin-review-address { color: var(--muted); font-size: 10px; font-weight: 400; }
.review-admin-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--muted); font-size: 10px; }
.admin-tool-grid, .restaurant-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-form { background: #f7f2e9; border-radius: 14px; padding: 18px; }
.admin-form h3 { margin: 0 0 5px; font: 800 16px 'Manrope'; }
.admin-form p { min-height: 34px; margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.admin-form label, .compact-admin-form label { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
.admin-form input, .admin-form select, .compact-admin-form input { width: 100%; margin-top: 5px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: 13px 'DM Sans'; }
.admin-button { width: 100%; margin-top: 12px; padding: 11px 14px; border: 0; border-radius: 9px; background: var(--ink); color: var(--card); font: 700 11px 'DM Sans'; cursor: pointer; }
.admin-button.secondary { background: var(--accent); color: #fff; }
.admin-button.danger-soft { background: #8f4638; color: #fff; }
.restaurant-admin-item { border-top: 1px solid var(--line); }
.restaurant-admin-item:first-child { border-top: 0; }
.restaurant-admin-item .restaurant-admin-row { border-top: 0; }
.source-badge { display: inline-block; margin-left: 5px; padding: 3px 6px; border-radius: 999px; font: 700 8px 'DM Sans'; vertical-align: 2px; }
.source-badge.google { color: #356246; background: #e5f0e6; }
.source-badge.manual { color: #85562d; background: #f4e9d8; }
.restaurant-actions { padding: 0 0 16px 53px; }
.restaurant-actions summary { color: var(--accent); font-size: 10px; font-weight: 700; cursor: pointer; }
.restaurant-action-grid { margin-top: 12px; padding: 14px; background: #f7f2e9; border-radius: 12px; }
.compact-admin-form small { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.duplicate-alert { margin-top: 16px; padding: 15px 17px; border-radius: 12px; color: #805226; background: #f7ead6; font-size: 11px; }
.duplicate-alert ul { margin: 8px 0; padding-left: 18px; line-height: 1.6; }
.duplicate-alert small { color: #805226; }
.legal-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 6vw, 48px); box-shadow: var(--shadow); }
.legal-card h2 { margin-top: 28px; font-size: 20px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { color: #5f594f; line-height: 1.7; }
.legal-card a { color: var(--accent-dark); }

@media (max-width: 640px) {
    .topbar { align-items: flex-start; }
    .history-picker { display: block; }
    .history-picker span { display: none; }
    .history-picker select { min-width: 150px; max-width: 190px; }
    .hero { padding: 45px 0 38px; }
    .hero h1 { letter-spacing: -2.7px; }
    .choice-grid, .stats-grid { grid-template-columns: 1fr; }
    .choice-card { min-height: 115px; }
    .rating-row { align-items: flex-start; flex-direction: column; }
    .stars { align-self: flex-start; }
    .stars label { min-width: 42px; min-height: 44px; padding: 5px; display: grid; place-items: center; }
    .history-heading { align-items: flex-start; }
    main { width: min(100% - 24px, 520px); }
    .topbar { padding: 18px 16px; }
    .hero { padding-top: 35px; }
    .hero p { font-size: 14px; }
    .review-card, .history { border-radius: 18px; padding: 22px 18px; }
    .card-heading { margin-bottom: 26px; }
    .choice-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .choice-card { padding: 15px; min-height: 118px; }
    .choice-icon { font-size: 22px; }
    .admin-topbar { padding: 16px; flex-wrap: wrap; gap: 10px 16px; }
    .admin-topbar > div { flex-wrap: wrap; gap: 8px 16px; }
    .admin-label { display: none; }
    .admin-main { width: calc(100% - 24px); padding-top: 30px; }
    .admin-heading { display: block; }
    .updated-at { display: block; margin-top: 12px; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-stats article { padding: 16px; }
    .admin-panel { padding: 20px 16px; }
    .restaurant-admin-row { grid-template-columns: 38px 1fr auto; gap: 11px; }
    .restaurant-metric { display: none; }
    .review-admin-top { align-items: flex-start; }
    .review-admin-top > div { align-items: flex-start; flex-direction: column; gap: 5px; }
    .admin-tool-grid, .restaurant-action-grid { grid-template-columns: 1fr; }
    .restaurant-actions { padding-left: 0; }
}

.auth-switch { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 700; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.home { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px 20px; text-align: center; position: relative; }
.home .brand { font-size: 38px; gap: 14px; }
.home .brand-mark { width: 60px; height: 60px; font-size: 30px; }
.home h1 { margin: 0; font: 800 clamp(34px, 8vw, 54px)/1.05 'Manrope', sans-serif; letter-spacing: -1.6px; }
.home-button { display: block; width: min(100%, 360px); padding: 22px 28px; border-radius: 16px; background: var(--accent); color: #fff; text-decoration: none; font: 700 18px 'DM Sans', sans-serif; box-shadow: 0 14px 30px -12px var(--accent); transition: background .2s, transform .2s; }
.home-button:hover { background: var(--accent-dark); transform: translateY(-2px); }
.text-input + .field-label { margin-top: 18px; }
