:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --ink: #171a20;
    --muted: #5c5e62;
    --line: #e6e7e8;
    --accent: #171a20;
    --accent-strong: #000000;
    --warm: #3e6ae1;
    --soft: #f4f4f4;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 5vw;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.brand {
    font-weight: 700;
    font-size: 20px;
}

nav {
    display: flex;
    gap: 8px;
}

nav a,
.ghost-button {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 13px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    font-weight: 700;
}

nav a.active,
nav a:hover,
.ghost-button:hover {
    color: var(--accent-strong);
    background: var(--soft);
}

.page {
    width: min(1180px, 92vw);
    margin: 0 auto;
    padding: 18px 0 64px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 16px;
}

.compact-heading {
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.page-heading h1,
.login-panel h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.05;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--warm);
    font-weight: 800;
    letter-spacing: 0;
}

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

.gender-male {
    color: #2876d0;
    font-weight: 900;
}

.gender-female {
    color: #d85a9c;
    font-weight: 900;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 22px;
    align-items: start;
}

.single-column {
    display: grid;
    gap: 16px;
}

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(520px, 1fr) minmax(220px, 280px);
    gap: 18px;
    align-items: start;
}

.calendar-layout-main {
    grid-template-columns: minmax(520px, 1fr) minmax(220px, 280px);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-nav strong {
    min-width: 118px;
    text-align: center;
    font-size: 20px;
}

.calendar-toolbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

.calendar-toolbar .calendar-nav {
    justify-content: flex-end;
}

.map-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.map-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
}

.map-header-row > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.map-header-actions {
    justify-content: flex-end;
}

.map-tools {
    position: relative;
    z-index: 1200;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.filter-group,
.map-action-group,
.map-search-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.map-search-group {
    flex: 1 1 320px;
}

.map-search-group input:first-child {
    flex: 1 1 220px;
}

.filter-button {
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    background: var(--soft);
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
    background: var(--ink);
    color: #ffffff;
}

.filter-button:hover:not(.active) {
    background: #e8e8e8;
    color: var(--accent-strong);
}

.map {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f2f3f3;
    overflow: hidden;
}

.map-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    transition: max-height 0.24s ease, opacity 0.2s ease;
    max-height: 460px;
    opacity: 1;
}

.map-wrap.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.map-status,
.distance-text {
    color: var(--muted);
    font-weight: 700;
}

.map-status {
    font-size: 14px;
}

.tag-filter-dropdown {
    position: relative;
    flex: 0 0 auto;
    z-index: 1300;
}

.tag-filter-trigger {
    min-width: 112px;
}

.tag-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1600;
    display: grid;
    gap: 10px;
    width: min(320px, 86vw);
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.tag-filter-menu.hidden {
    display: none;
}

.tag-filter-actions {
    display: flex;
    gap: 8px;
}

.tag-filter-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.tag-filter-option {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    border-radius: 8px;
    padding: 6px 8px;
    background: var(--soft);
    color: var(--ink);
    font-size: 13px;
}

.tag-filter-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--ink);
}

.panel,
.pet-card,
.timeline-item,
.place-card,
.login-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}

.panel {
    padding: 22px;
}

.collapsible-panel {
    padding: 0;
    overflow: hidden;
}

.collapsible-panel summary {
    padding: 14px 18px;
    color: var(--accent-strong);
    font-weight: 900;
    cursor: pointer;
    list-style-position: inside;
}

.collapsible-panel[open] summary {
    border-bottom: 1px solid var(--line);
}

.collapsible-panel > form,
.collapsible-panel > .form-stack {
    padding: 18px;
}

.collapsible-panel > .delete-form {
    padding: 0 18px 18px;
}

.panel h2,
.pet-card h2,
.timeline-item h2,
.place-card h2 {
    margin: 0 0 12px;
}

.form-stack {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(23, 26, 32, 0.12);
    border-color: var(--accent);
}

.suggestion-box {
    display: grid;
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.suggestion-item {
    display: grid;
    gap: 4px;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.suggestion-item:last-child {
    border-bottom: 0;
}

.suggestion-item:hover {
    background: var(--soft);
}

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

.primary-button {
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    background: var(--accent-strong);
}

.small-action-button,
.compact-primary-button {
    min-height: 36px;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.small-action-button {
    border: 0;
    background: var(--soft);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}

.small-action-button:hover {
    background: #e8e8e8;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(23, 26, 32, 0.36);
    backdrop-filter: blur(8px);
}

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

.modal-panel {
    width: min(560px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2);
}

.small-modal {
    width: min(420px, 92vw);
}

.modal-body {
    padding: 18px;
}

.modal-body p {
    margin: 0;
    line-height: 1.6;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--accent-strong);
    background: var(--soft);
}

.modal-panel > form,
.modal-panel > .form-stack {
    padding: 18px;
}

.modal-panel > .delete-form {
    padding: 0 18px 18px;
}

.danger-button {
    border: 1px solid #f0c9bf;
    border-radius: 8px;
    padding: 10px 14px;
    background: #fff0ed;
    color: #9d3d27;
    font-weight: 800;
    cursor: pointer;
}

.danger-button:hover {
    background: #ffe1da;
}

.pet-list,
.timeline,
.place-list {
    display: grid;
    gap: 16px;
}

.calendar-panel {
    display: grid;
    gap: 10px;
}

.weekday-grid,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.weekday-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.calendar-day {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 118px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.calendar-day:hover {
    border-color: #b7b8bb;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.calendar-day.muted-day {
    background: #fafafa;
    color: #aaa195;
}

.calendar-day.today {
    border-color: var(--accent);
}

.day-number {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    font-weight: 900;
}

.calendar-day.today .day-number {
    background: var(--accent);
    color: white;
}

.event-tags {
    display: grid;
    gap: 5px;
}

.event-tag {
    display: block;
    width: 100%;
    border-radius: 7px;
    padding: 5px 7px;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-tag.vaccine {
    background: #171a20;
}

.event-tag.bath {
    background: #3e6ae1;
}

.event-tag.birthday {
    background: #d88a3d;
}

.split-actions {
    justify-content: space-between;
    gap: 10px;
}

.hidden {
    display: none;
}

.pet-card {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
}

.pet-summary {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
}

.pet-card img,
.avatar-fallback {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--soft);
}

.avatar-fallback {
    display: grid;
    place-items: center;
    color: var(--accent-strong);
    font-size: 30px;
    font-weight: 900;
}

.pet-summary h2 {
    margin-bottom: 6px;
}

.pet-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pet-meta-row span {
    line-height: 1.2;
}

.timeline-item,
.place-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.place-card {
    min-height: 168px;
}

.place-card[hidden] {
    display: none;
}

.timeline-body {
    flex: 1;
}

.agenda-panel {
    display: grid;
    gap: 14px;
}

.agenda-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}

.agenda-section h2 {
    margin: 0 0 10px;
    font-size: 16px;
}

.agenda-list {
    display: grid;
    gap: 8px;
}

.agenda-list.hidden {
    display: none;
}

.segmented-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 8px;
    background: var(--soft);
}

.calendar-tabs {
    margin-bottom: 0;
}

.segment-button {
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.segment-button.active {
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.agenda-item {
    display: grid;
    gap: 3px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.agenda-item.bath {
    border-left-color: #3377b8;
}

.agenda-item.birthday {
    border-left-color: #d88a3d;
}

.agenda-item span,
.agenda-empty {
    color: var(--muted);
    font-size: 13px;
}

.edit-box {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.edit-box summary {
    width: fit-content;
    color: var(--accent-strong);
    font-weight: 800;
    cursor: pointer;
}

.compact-form {
    margin-top: 12px;
}

.action-row,
.delete-form {
    display: flex;
    justify-content: flex-end;
}

.compact-left {
    justify-content: flex-start;
    margin-top: -6px;
}

.delete-form {
    margin-top: 10px;
}

.date-pill,
.tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 8px;
    padding: 6px 10px;
    background: var(--soft);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.map-link {
    border: 1px solid var(--line);
    background: #ffffff;
    font: inherit;
    cursor: pointer;
    align-self: start;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--accent-strong);
    white-space: nowrap;
}

.focus-place-button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-size: 20px;
    font-weight: 900;
}

.place-content {
    flex: 1;
    min-width: 0;
}

.place-actions {
    display: grid;
    gap: 8px;
    align-content: end;
    justify-items: end;
    min-width: 54px;
}

.place-actions form {
    margin: 0;
}

.rating-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 8px;
}

.place-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.place-title-row h2 {
    margin: 0 4px 0 0;
    font-size: 19px;
    line-height: 1.25;
}

.place-info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 8px 0;
    color: var(--muted);
}

.place-info-row p {
    margin: 0;
    line-height: 1.5;
}

.place-info-row p:first-child {
    color: var(--ink);
}

.place-description {
    max-width: min(560px, 100%);
}

.stars {
    color: #f5a623;
    font-weight: 900;
    letter-spacing: 0;
}

.comment-box {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.comment-box summary {
    width: fit-content;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

.comment-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.comment-item {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.comment-item p {
    margin: 0;
    color: var(--ink);
    line-height: 1.55;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.comment-image {
    width: min(240px, 100%);
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.comment-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--soft);
}

.comment-edit-box {
    margin-top: 8px;
}

.comment-edit-box summary {
    width: fit-content;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.compact-comment-form {
    padding: 10px;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.checkbox-grid legend {
    padding: 0 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    color: var(--ink);
}

.checkbox-grid input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ink);
}

.tag-picker {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.tag-group-list {
    display: grid;
    gap: 8px;
}

.tag-group {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.tag-group-heading {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.tag-group-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: hidden;
}

.tag-group-body.collapsed {
    max-height: 78px;
}

.tag-palette,
.selected-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-option,
.selected-tag {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    background: var(--soft);
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

.tag-option.recommended {
    border-color: #cfd8dc;
    background: #f8fafb;
}

.tag-option.active,
.selected-tag {
    border-color: var(--ink);
    background: var(--ink);
    color: #ffffff;
}

.feature-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0 8px;
    max-height: 58px;
    overflow: hidden;
}

.feature-chip {
    border-radius: 8px;
    padding: 4px 7px;
    background: #eef6f3;
    color: #1f6258;
    font-size: 11px;
    font-weight: 900;
}

.place-visible-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
}

.more-chip {
    background: var(--soft);
    color: var(--muted);
}

.feature-chip.caution {
    background: #fff3e6;
    color: #9d5a12;
}

.policy-note {
    margin: 8px 0;
    border-left: 3px solid var(--ink);
    padding: 8px 10px;
    background: var(--soft);
    color: var(--ink);
    line-height: 1.55;
}

.empty,
.alert {
    border-radius: 8px;
    padding: 14px;
    background: var(--soft);
    color: var(--muted);
}

.alert.error {
    background: #fff0ed;
    color: #9d3d27;
}

.alert.success {
    background: var(--soft);
    color: var(--accent-strong);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #ffffff;
}

.login-shell {
    width: min(920px, 92vw);
}

.login-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
    padding: clamp(26px, 5vw, 54px);
}

.login-panel-with-visual {
    width: min(1040px, 94vw);
    min-height: min(680px, 88vh);
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.login-panel-with-visual form {
    align-self: center;
    padding: clamp(28px, 4vw, 56px);
}

.login-visual {
    position: relative;
    min-height: 520px;
    background:
        linear-gradient(180deg, rgba(18, 20, 24, 0.2), rgba(18, 20, 24, 0.72)),
        url("/img/login.png") center / cover no-repeat;
}

.login-visual-copy {
    position: absolute;
    left: clamp(24px, 4vw, 52px);
    right: clamp(24px, 4vw, 52px);
    bottom: clamp(28px, 5vw, 64px);
    color: #ffffff;
}

.login-visual-copy .eyebrow,
.login-visual-copy p {
    color: rgba(255, 255, 255, 0.78);
}

.login-visual-copy h1 {
    max-width: 12em;
    margin: 10px 0 12px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 64px);
}

.login-visual-copy p {
    max-width: 26em;
    margin: 0;
    line-height: 1.7;
}

.auth-link {
    justify-self: center;
    color: var(--muted);
    font-weight: 700;
}

.auth-link:hover {
    color: var(--ink);
}

.qa-page {
    min-height: calc(100vh - 72px);
    display: grid;
}

.qa-shell {
    min-height: min(720px, calc(100vh - 136px));
    display: grid;
    grid-template-rows: 1fr auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.qa-thread {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
    overflow: auto;
}

.qa-message {
    max-width: min(680px, 86%);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--soft);
    color: var(--ink);
}

.qa-message.user {
    justify-self: end;
    background: var(--ink);
    color: #ffffff;
}

.qa-message.ai {
    justify-self: start;
}

.qa-message strong {
    display: block;
    margin-bottom: 6px;
}

.qa-message p {
    margin: 0;
    line-height: 1.6;
}

.qa-composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.qa-composer textarea {
    min-height: 48px;
    max-height: 160px;
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    .topbar {
        position: static;
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .brand {
        font-size: 18px;
    }

    .topbar nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .topbar nav a,
    .topbar .ghost-button {
        width: 100%;
        padding: 8px 6px;
        text-align: center;
        font-size: 13px;
    }

    .topbar form {
        width: 100%;
    }

    .page {
        width: min(100% - 24px, 1180px);
        padding: 12px 0 44px;
    }

    .content-grid,
    .calendar-layout,
    .calendar-layout-main,
    .login-panel {
        grid-template-columns: 1fr;
    }

    .login-panel-with-visual {
        min-height: 0;
    }

    .login-panel-with-visual form {
        padding: 24px;
    }

    .login-visual {
        min-height: 260px;
    }

    .login-visual-copy h1 {
        font-size: 32px;
    }

    .page-heading {
        align-items: start;
        flex-direction: column;
        gap: 14px;
    }

    .page-heading h1,
    .login-panel h1 {
        font-size: 30px;
    }

    .compact-heading,
    .map-tools {
        align-items: stretch;
        justify-content: flex-start;
    }

    .map-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .map-header-actions,
    .map-header-row > div {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .map-header-row > div:first-child {
        display: flex;
    }

    .map-status {
        line-height: 1.5;
    }

    .map-tools {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tag-filter-dropdown,
    .tag-filter-trigger,
    .map-search-group,
    .map-search-group input:first-child,
    .map-search-group button,
    .small-action-button,
    .primary-button {
        width: 100%;
    }

    .tag-filter-menu {
        left: 0;
        right: 0;
        width: auto;
        min-width: 0;
        max-height: min(55vh, 420px);
        overflow: auto;
    }

    .filter-group,
    .feature-filter-group,
    .map-action-group,
    .map-search-group {
        width: 100%;
    }

    .timeline-item,
    .place-card {
        flex-direction: column;
    }

    .place-card {
        gap: 10px;
        padding: 12px;
    }

    .place-title-row,
    .place-meta-row,
    .place-info-row,
    .place-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .place-actions {
        width: 100%;
    }

    .place-actions form,
    .place-actions button {
        width: 100%;
    }

    .place-location-button {
        align-self: flex-start;
    }

    .map-wrap,
    .map {
        min-height: 320px;
    }

    .map-wrap.collapsed {
        min-height: 0;
    }

    .modal-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        overflow: auto;
    }

    .modal-body,
    .modal-panel form {
        max-width: 100%;
    }

    .two-cols {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .weekday-grid,
    .calendar-grid {
        gap: 4px;
    }

    .calendar-toolbar {
        grid-template-columns: 1fr;
    }

    .calendar-toolbar .calendar-nav {
        justify-content: space-between;
        width: 100%;
    }

    .calendar-tabs {
        width: 100%;
    }

    .calendar-tabs button {
        flex: 1;
    }

    .qa-composer {
        grid-template-columns: 1fr;
    }

    .weekday-grid span {
        font-size: 12px;
    }

    .calendar-day {
        min-height: 76px;
        padding: 6px;
    }

    .event-tag {
        font-size: 11px;
        padding: 4px 5px;
    }
}

@media (max-width: 420px) {
    .topbar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-header-actions {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 66px;
    }

    .event-tag {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Admin console */
.admin-body {
    min-height: 100vh;
    background: #f5f5f3;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 14px 5vw;
    border-bottom: 1px solid #e6e6e3;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.admin-brand {
    font-size: 18px;
    font-weight: 800;
}

.admin-nav {
    justify-content: center;
}

.admin-nav a {
    color: #62615d;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 800;
}

.admin-nav a.active,
.admin-nav a:hover {
    color: #111111;
    background: #eeeeeb;
}

.admin-logout,
.admin-primary,
.admin-secondary,
.admin-danger,
.admin-primary-link,
.admin-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.admin-logout,
.admin-secondary,
.admin-secondary-link {
    background: #eeeeeb;
    color: #171717;
}

.admin-primary,
.admin-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111111;
    color: #ffffff;
}

.admin-danger {
    background: #fff1f0;
    color: #b42318;
}

.admin-secondary-link.disabled {
    pointer-events: none;
    opacity: 0.42;
}

.admin-page {
    width: min(1680px, 92vw);
    margin: 0 auto;
    padding: 28px 0 72px;
}

.admin-hero,
.admin-page-title {
    margin-bottom: 20px;
}

.admin-list-title {
    align-items: center;
}

.admin-hero h1,
.admin-page-title h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
}

.admin-hero p:last-child {
    margin: 12px 0 0;
    color: #62615d;
}

.admin-eyebrow {
    margin: 0 0 8px;
    color: #178f5d;
    font-weight: 900;
}

.admin-page-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.admin-page-title > span {
    color: #62615d;
    font-weight: 800;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-stat-card,
.admin-card {
    border: 1px solid #e6e6e3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(20, 20, 20, 0.04);
}

.admin-stat-card {
    padding: 22px;
}

.admin-stat-card span,
.admin-list-row span,
.admin-user-row span,
.admin-card p {
    color: #62615d;
}

.admin-stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 38px;
}

.admin-card {
    padding: 22px;
    margin-bottom: 18px;
}

.admin-card h2 {
    margin: 0 0 14px;
}

.crawl-card {
    display: grid;
    gap: 14px;
}

.crawl-source-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.crawl-source-card {
    display: grid;
    align-content: space-between;
    gap: 14px;
    min-height: 178px;
    border: 1px solid #ececea;
    border-radius: 12px;
    padding: 16px;
    background: #fafaf8;
}

.crawl-source-card strong {
    display: block;
    margin: 7px 0 8px;
    color: #171717;
    font-size: 18px;
}

.crawl-source-card p {
    margin: 0;
    line-height: 1.55;
}

.crawl-source-name,
.crawl-source-tags {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.crawl-source-name {
    min-height: 28px;
    padding: 6px 10px;
    background: #eeeeeb;
    color: #171717;
}

.active-source {
    border-color: #cfe4d7;
    background: #f5fbf7;
}

.active-source .crawl-source-name {
    background: #178f5d;
    color: #ffffff;
}

.pending-source {
    opacity: 0.82;
}

.crawl-source-tags {
    min-height: 30px;
    padding: 7px 10px;
    background: #ffffff;
    color: #62615d;
}

.pending-source .admin-secondary {
    justify-self: start;
    min-height: 34px;
    padding: 8px 12px;
}

.crawl-toolbar {
    display: grid;
    grid-template-columns: 360px 112px;
    align-items: end;
    gap: 12px;
}

.crawl-toolbar label {
    display: grid;
    gap: 8px;
    color: #62615d;
    font-weight: 800;
}

.crawl-status {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, auto);
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid #ececea;
    border-radius: 10px;
    background: #fafaf8;
}

.crawl-status.running {
    border-color: #b9d8ca;
    background: #f1f8f4;
}

.crawl-status span {
    color: #62615d;
    font-weight: 800;
}

.crawl-status strong {
    color: #171717;
}

.admin-primary:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.admin-section-head h2,
.admin-section-head p {
    margin: 0;
}

.admin-list,
.admin-user-table,
.admin-place-table {
    display: grid;
    gap: 12px;
}

.admin-list-row,
.admin-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid #ececea;
    border-radius: 10px;
    background: #fafaf8;
}

.admin-list-row strong,
.admin-list-row span,
.admin-user-row strong,
.admin-user-row span {
    display: block;
}

.admin-list-row em {
    color: #178f5d;
    font-style: normal;
    font-weight: 900;
}

.admin-empty {
    padding: 30px;
    border-radius: 10px;
    background: #fafaf8;
    color: #62615d;
    text-align: center;
}

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

.admin-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.admin-toolbar label {
    display: grid;
    gap: 8px;
    color: #62615d;
    font-weight: 800;
}

.admin-toolbar-left {
    display: flex;
    align-items: end;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.admin-toolbar .compact-filter {
    width: 220px;
}

.admin-toolbar .place-city-filter,
.admin-toolbar .compact-filter:has(.area-combo) {
    width: 260px;
}

.area-combo {
    position: relative;
    display: block;
    width: 100%;
}

.area-combo-trigger {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #ddddda;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: #171717;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.area-combo-trigger::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid #77756f;
    border-bottom: 2px solid #77756f;
    transform: rotate(45deg) translateY(-2px);
}

.area-combo-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 140;
    display: grid;
    grid-template-columns: 150px minmax(220px, 1fr);
    width: min(560px, 82vw);
    max-height: 320px;
    overflow: hidden;
    border: 1px solid #e4e4df;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.16);
}

.area-combo-menu.hidden {
    display: none;
}

.area-combo-provinces,
.area-combo-cities {
    display: grid;
    align-content: start;
    gap: 6px;
    max-height: 320px;
    overflow: auto;
    padding: 10px;
}

.area-combo-provinces {
    border-right: 1px solid #eeeeeb;
    background: #fafaf8;
}

.area-combo-province,
.area-combo-city {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    background: transparent;
    color: #4f4e49;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.area-combo-province:hover,
.area-combo-city:hover {
    background: #eeeeeb;
    color: #111111;
}

.area-combo-province.active,
.area-combo-city.selected {
    background: #111111;
    color: #ffffff;
}

.admin-toolbar > span,
.admin-toolbar-left > span {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.admin-form-grid label,
.admin-place-edit label {
    display: grid;
    gap: 8px;
    color: #62615d;
    font-weight: 800;
}

.admin-form-grid .wide {
    grid-column: 1 / -1;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.admin-place-edit input,
.admin-place-edit select,
.admin-place-edit textarea,
.admin-toolbar input,
.admin-toolbar select,
.crawl-toolbar select,
.admin-comment-row select,
.admin-comment-row textarea,
.admin-comment-create select,
.admin-comment-create textarea {
    width: 100%;
    border: 1px solid #ddddda;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: #171717;
    font: inherit;
}

.admin-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-table-wrap .admin-table {
    min-width: 1180px;
}

.admin-table th,
.admin-table td {
    height: 72px;
    padding: 12px 12px;
    border-bottom: 1px solid #ececea;
    text-align: left;
    vertical-align: middle;
    overflow: hidden;
}

.admin-table th {
    color: #62615d;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-table td strong,
.admin-table td span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table td span {
    margin-top: 4px;
    color: #62615d;
    font-size: 13px;
}

.admin-table .inline-text {
    display: inline;
    margin-top: 0;
}

.ellipsis-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-name {
    width: 20%;
}

.col-type {
    width: 7%;
}

.col-city {
    width: 9%;
}

.col-address {
    width: 30%;
}

.col-rating {
    width: 8%;
}

.col-uploader {
    width: 8%;
}

.col-actions {
    width: 20%;
}

.col-area-name {
    width: 15%;
}

.area-table-wrap .admin-table {
    min-width: 1360px;
}

.action-cell {
    overflow: visible;
}

.admin-row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    overflow: visible;
}

.admin-row-actions form {
    margin: 0;
    flex: 0 0 auto;
}

.admin-row-actions .admin-secondary,
.admin-row-actions .admin-danger {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 14px;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.38);
}

.admin-modal-backdrop.hidden {
    display: none;
}

.admin-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 22px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
}

.admin-modal.wide-modal {
    width: min(920px, 100%);
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-modal-head h2 {
    margin: 0;
}

.admin-modal-head button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #eeeeeb;
    color: #171717;
    font-size: 24px;
    cursor: pointer;
}

.admin-comment-list {
    display: grid;
    gap: 12px;
}

.admin-comment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid #ececea;
    border-radius: 12px;
    background: #fafaf8;
}

.admin-comment-row form:first-child {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
}

.admin-comment-row textarea {
    grid-column: 1 / -1;
}

.admin-comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #62615d;
    align-items: center;
}

.admin-comment-create {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #ececea;
}

.admin-comment-create h3 {
    grid-column: 1 / -1;
    margin: 0;
}

.admin-table-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
}

.admin-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.admin-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3f3f3b;
    font-weight: 700;
}

.admin-tag-groups {
    display: grid;
    gap: 12px;
}

.admin-tag-group {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #ececea;
    border-radius: 10px;
    background: #fafaf8;
}

.admin-tag-group > strong {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    color: #171717;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-tag-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.admin-tag-option {
    position: relative;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #e1e1de;
    border-radius: 999px;
    background: #ffffff;
    color: #3f3f3b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.admin-tag-option:has(input:checked) {
    border-color: #171717;
    background: #171717;
    color: #ffffff;
}

.admin-tag-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.admin-tag-option span {
    display: inline-flex;
    align-items: center;
    position: relative;
    z-index: 1;
    line-height: 1;
    white-space: nowrap;
}

.admin-place-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid #ececea;
    border-radius: 12px;
    background: #fafaf8;
}

.admin-place-edit {
    display: grid;
    grid-template-columns: 1.3fr 150px 1.4fr 110px 110px;
    gap: 10px;
}

.admin-place-edit textarea,
.admin-place-edit .admin-checks,
.admin-place-edit .admin-row-meta {
    grid-column: 1 / -1;
}

.admin-checks.compact {
    gap: 8px 14px;
}

.admin-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #62615d;
    font-size: 13px;
}

.admin-error {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f0;
    color: #b42318;
    font-weight: 800;
}

.admin-user-row {
    grid-template-columns: 56px minmax(0, 1fr) 120px 120px;
}

.admin-user-row img,
.admin-avatar-fallback {
    width: 56px;
    height: 56px;
    border-radius: 16px;
}

.admin-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #178f5d;
    color: #ffffff;
    font-weight: 900;
}

@media (max-width: 760px) {
    .admin-topbar,
    .admin-page-title,
    .admin-section-head {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .admin-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-stats,
    .admin-form-grid,
    .admin-place-edit,
    .admin-place-row,
    .admin-user-row,
    .crawl-toolbar,
    .crawl-status {
        grid-template-columns: 1fr;
    }

    .admin-tag-group {
        grid-template-columns: 1fr;
    }
}
.feedback-admin-list{display:grid;gap:16px}.feedback-admin-item{padding:18px;border-top:1px solid #e7e9e8}.feedback-admin-meta{display:flex;align-items:center;gap:14px;color:#848b87;font-size:14px}.feedback-admin-meta strong{color:#28312c}.feedback-state{margin-left:auto;color:#4f8a70}.feedback-admin-content{white-space:pre-wrap;line-height:1.7}.feedback-reply-form{display:flex;align-items:flex-end;gap:12px}.feedback-reply-form textarea{flex:1;resize:vertical}
.feedback-thread{display:grid;gap:8px;margin:12px 0}.feedback-thread-message{display:grid;grid-template-columns:52px 1fr auto;gap:10px;padding:10px 12px;border-radius:10px;background:#f5f6f5}.feedback-thread-message.admin{background:#edf7f2}.feedback-thread-message small{color:#979d99}
