:root {
    color-scheme: light;
    --ink: #1f2933;
    --muted: #627386;
    --line: #dbe3ea;
    --panel: #ffffff;
    --soft: #f5f7f9;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --warning: #8a5a00;
    --error: #9f1239;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--soft);
}

a {
    color: var(--accent-dark);
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.topbar,
.business-header,
.section-head,
.review-top,
.review-actions,
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    margin-bottom: 24px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 32px;
}

h2 {
    font-size: 22px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.button.secondary {
    color: var(--accent-dark);
    background: #ffffff;
}

.connect-panel,
.empty,
.business,
.reviews,
.sidebar,
.metric {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.connect-panel,
.empty {
    max-width: 680px;
    padding: 28px;
}

.connect-panel p,
.empty p {
    color: var(--muted);
    line-height: 1.6;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.metric {
    padding: 18px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

.sidebar {
    padding: 18px;
}

.location-link {
    display: block;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ink);
    text-decoration: none;
}

.location-link + .location-link {
    margin-top: 8px;
}

.location-link span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.location-link.active {
    border-color: #9ad6cf;
    background: #e8f6f4;
}

.details {
    display: grid;
    gap: 20px;
}

.business,
.reviews {
    padding: 22px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 0;
}

.info-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.info-grid .wide {
    grid-column: 1 / -1;
}

dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

dd {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

.review {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.review p {
    color: var(--ink);
    line-height: 1.55;
}

.review time {
    color: var(--muted);
    font-size: 13px;
}

.review-actions {
    margin-top: 14px;
}

.review-actions span {
    color: var(--muted);
    font-size: 13px;
}

.stars {
    color: #b7791f;
    white-space: nowrap;
}

.posted-reply {
    margin-top: 14px;
    padding: 14px;
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: #f2fbfa;
}

.posted-reply strong {
    display: block;
    margin-bottom: 6px;
}

.posted-reply p {
    margin-bottom: 0;
}

.reply-form {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f2fbfa;
}

.reply-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.reply-form textarea {
    display: block;
    width: 100%;
    min-height: 104px;
    padding: 12px;
    border: 1px solid #bfd7d4;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    line-height: 1.45;
    resize: vertical;
}

.reply-form textarea:focus {
    border-color: var(--accent);
    outline: 3px solid #ccece8;
}

.reply-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.reply-actions span {
    color: var(--muted);
    font-size: 13px;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(31, 41, 51, 0.55);
}

.modal-backdrop[hidden] {
    display: none;
}

.modal {
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 22px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 70px rgba(31, 41, 51, 0.28);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.notice {
    padding: 12px 14px;
    border-radius: 6px;
    background: #edf2f7;
}

.notice.warning {
    color: var(--warning);
    background: #fff8e1;
}

.notice.error {
    color: var(--error);
    background: #fff1f2;
}

.notice.success {
    color: var(--accent-dark);
    background: #e8f6f4;
}

.empty-line {
    color: var(--muted);
}

@media (max-width: 860px) {
    .topbar,
    .business-header,
    .section-head,
    .review-actions,
    .modal-head,
    .reply-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-grid,
    .layout,
    .info-grid {
        grid-template-columns: 1fr;
    }
}
