* {
    box-sizing: border-box;
}

:root {
    --pm-green: #059669;
    --pm-green-light: #10b981;
    --pm-green-dark: #047857;
    --pm-red: #ef4444;

    --pm-bg: #f6f8fb;
    --pm-card: #ffffff;
    --pm-text: #0f172a;
    --pm-muted: #64748b;
    --pm-soft: #f8fafc;
    --pm-soft-2: #f1f5f9;
    --pm-border: #e5e7eb;

    --pm-radius-sm: 16px;
    --pm-radius-md: 20px;
    --pm-radius-lg: 22px;
    --pm-radius-xl: 26px;
    --pm-radius-full: 999px;

    --pm-shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
    --pm-shadow-strong: 0 14px 34px rgba(15, 23, 42, 0.14);
    --pm-shadow-green: 0 14px 30px rgba(5, 150, 105, 0.24);
    --pm-shadow-nav: 0 -10px 30px rgba(15, 23, 42, 0.10);

    --pm-font-xs: 11px;
    --pm-font-sm: 13px;
    --pm-font-md: 14px;
    --pm-font-lg: 15px;

    --pm-title-page: 26px;
    --pm-title-card: 22px;

    --pm-button-height: 54px;
    --pm-input-height: 52px;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--pm-bg);
    color: var(--pm-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.pm-page {
    min-height: 100vh;
    padding-bottom: 112px;
}

/* HERO */

.pm-hero {
    position: relative;
    height: clamp(300px, 52vh, 390px);
    background: #e5e7eb;
    overflow: hidden;
}

.pm-slider {
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.pm-slider::-webkit-scrollbar {
    display: none;
}

.pm-slide {
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
}

.pm-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* TOP BUTTONS */

.pm-topbar {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    left: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pm-fav-form,
.pm-scroll-form {
    margin: 0;
}

.pm-top-btn,
.pm-scroll-btn {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: var(--pm-radius-md);
    background: rgba(255, 255, 255, 0.96);
    color: var(--pm-text);
    box-shadow: var(--pm-shadow-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
    flex-shrink: 0;
}

.pm-fav-btn.active,
.pm-scroll-btn.active {
    color: var(--pm-red);
}

.pm-image-count {
    position: absolute;
    right: 16px;
    bottom: 18px;
    z-index: 10;
    padding: 8px 12px;
    border-radius: var(--pm-radius-full);
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: var(--pm-font-sm);
    font-weight: 900;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* CONTENT */

.pm-content {
    position: relative;
    z-index: 3;
    margin-top: -28px;
    padding: 0 14px 24px;
}

.pm-main-card,
.pm-card {
    background: var(--pm-card);
    border-radius: var(--pm-radius-xl);
    padding: 22px;
    box-shadow: var(--pm-shadow-card);
    margin-bottom: 16px;
}

.pm-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--pm-green);
    font-size: var(--pm-font-sm);
    line-height: 1.35;
    font-weight: 900;
}

.pm-kicker span {
    color: #2563eb;
}

.pm-main-card h1 {
    margin: 0;
    font-size: var(--pm-title-page);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.pm-card h2 {
    margin: 0 0 14px;
    font-size: var(--pm-title-card);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.pm-address,
.pm-auth-intro {
    color: var(--pm-muted);
    font-size: var(--pm-font-md);
    line-height: 1.55;
    font-weight: 700;
}

.pm-address {
    margin-top: 12px;
}

.pm-text {
    color: #475569;
    font-size: var(--pm-font-lg);
    line-height: 1.65;
    font-weight: 600;
}

/* TAGS */

.pm-rating-row,
.pm-review-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.pm-review-summary {
    margin-top: 0;
    margin-bottom: 14px;
}

.pm-rating-row span,
.pm-review-summary span,
.pm-chip-list span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--pm-radius-full);
    background: var(--pm-soft-2);
    color: #334155;
    font-size: var(--pm-font-sm);
    font-weight: 900;
}

/* ACTION BUTTONS */

.pm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.pm-action-btn,
.pm-mobile-inline-btn,
.pm-review-submit,
.pm-owner-question,
.pm-auth-submit {
    min-height: var(--pm-button-height);
    height: var(--pm-button-height);
    border: 0;
    border-radius: var(--pm-radius-md);
    padding: 0 16px;
    background: var(--pm-green);
    color: #ffffff;
    box-shadow: var(--pm-shadow-green);
    font-size: var(--pm-font-lg);
    font-weight: 950;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.pm-action-btn {
    width: 100%;
    background: #ffffff;
    color: var(--pm-text);
    box-shadow: var(--pm-shadow-card);
}

.pm-action-btn.primary,
.pm-mobile-inline-btn,
.pm-review-submit,
.pm-owner-question,
.pm-auth-submit {
    background: linear-gradient(135deg, var(--pm-green-light), var(--pm-green));
    color: #ffffff;
    box-shadow: var(--pm-shadow-green);
}

.pm-actions .pm-action-btn {
    flex-direction: column;
    gap: 5px;
    font-size: var(--pm-font-sm);
}

.pm-action-btn span {
    font-size: 22px;
    line-height: 1;
}

.pm-action-btn:active,
.pm-mobile-inline-btn:active,
.pm-review-submit:active,
.pm-owner-question:active,
.pm-auth-submit:active,
.pm-top-btn:active,
.pm-scroll-btn:active,
.pm-bottom-btn:active {
    transform: scale(0.98);
}

/* INFO */

.pm-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.pm-info-box {
    background: var(--pm-card);
    border-radius: var(--pm-radius-lg);
    padding: 18px;
    box-shadow: var(--pm-shadow-card);
}

.pm-info-box span,
.pm-detail-list span {
    display: block;
    color: var(--pm-muted);
    font-size: var(--pm-font-sm);
    font-weight: 800;
    margin-bottom: 5px;
}

.pm-info-box strong,
.pm-detail-list strong {
    display: block;
    color: var(--pm-text);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 950;
}

.pm-extra {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--pm-border);
}

.pm-detail-list {
    display: grid;
    gap: 14px;
}

.pm-detail-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
}

.pm-detail-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.pm-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pm-chip-list span {
    min-height: 40px;
    padding: 10px 13px;
}

/* MAP */

.pm-map-lock-wrap {
    position: relative;
    width: 100%;
    border-radius: var(--pm-radius-lg);
    overflow: hidden;
    background: #e5e7eb;
}

.pm-map {
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: var(--pm-radius-lg);
    display: block;
}

.pm-map-login-lock {
    position: absolute;
    inset: 0;
    z-index: 20;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pm-map-route-box,
.pm-review-action {
    margin-top: 12px;
}

.pm-mobile-inline-btn {
    width: 100%;
}

/* REVIEWS */

.pm-reviews {
    display: grid;
    gap: 12px;
}

.pm-review {
    background: var(--pm-soft);
    border-radius: var(--pm-radius-md);
    padding: 16px;
}

.pm-review-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: var(--pm-font-sm);
}

.pm-review-head strong {
    font-weight: 950;
}

.pm-review-head span {
    color: var(--pm-muted);
    font-weight: 800;
}

/* OWNER */

.pm-owner-box {
    display: flex;
    gap: 14px;
    align-items: center;
}

.pm-owner-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--pm-radius-full);
    overflow: hidden;
    flex: 0 0 64px;
    background: var(--pm-soft-2);
    box-shadow: var(--pm-shadow-card);
}

.pm-owner-avatar img,
.pm-owner-avatar-auto {
    width: 64px;
    height: 64px;
    border-radius: var(--pm-radius-full);
    object-fit: cover;
    background: linear-gradient(135deg, var(--pm-green-light), var(--pm-green));
    color: #ffffff;
    font-size: 26px;
    font-weight: 950;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-owner-info {
    min-width: 0;
    flex: 1;
}

.pm-owner-title {
    color: var(--pm-muted);
    font-size: var(--pm-font-sm);
    font-weight: 800;
    margin-bottom: 3px;
}

.pm-owner-name {
    color: var(--pm-text);
    font-size: 18px;
    font-weight: 950;
    margin-bottom: 12px;
}

.pm-owner-question {
    width: 100%;
}

/* FORMS */

.pm-review-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.pm-review-form select,
.pm-review-form textarea,
.pm-review-form input[type="file"],
.pm-auth-box input {
    width: 100%;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    padding: 12px 14px;
    background: #ffffff;
    color: var(--pm-text);
    font-size: var(--pm-font-md);
    font-weight: 700;
    outline: none;
}

.pm-review-form select,
.pm-auth-box input {
    min-height: var(--pm-input-height);
}

.pm-review-form textarea {
    min-height: 110px;
    resize: vertical;
}

.pm-review-form select:focus,
.pm-review-form textarea:focus,
.pm-auth-box input:focus {
    border-color: var(--pm-green);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.10);
}

/* NOTICES */

.pm-notice-ok,
.pm-notice-error {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--pm-radius-sm);
    font-size: var(--pm-font-md);
    line-height: 1.4;
    font-weight: 800;
}

.pm-notice-ok {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.pm-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pm-card-anchor {
    scroll-margin-top: 90px;
}

/* BOTTOM NAV */

.pm-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;

    min-height: 86px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));

    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    border-top: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--pm-shadow-nav);

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pm-bottom-btn {
    width: 100%;
    min-height: 60px;
    border: 0;
    border-radius: 22px;
    background: #f8fafc;
    color: #64748b;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    font-size: 11px;
    line-height: 1;
    font-weight: 950;
    text-align: center;

    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.pm-bottom-btn span {
    font-size: 23px;
    line-height: 1;
}

.pm-bottom-btn.active {
    background: linear-gradient(135deg, var(--pm-green-light), var(--pm-green));
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.22);
}

.pm-bottom-btn:active {
    transform: scale(0.96);
}

/* SCROLL TOPBAR */

.pm-scroll-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 78px;
    padding: env(safe-area-inset-top, 0px) 14px 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
}

.pm-scroll-topbar.show {
    transform: translateY(0);
}

.pm-scroll-title {
    flex: 1;
    min-width: 0;
    color: var(--pm-text);
    font-size: 16px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-scroll-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* AUTH MODAL */

.pm-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pm-auth-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 28px;
    padding: 26px 22px 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.pm-auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: var(--pm-radius-full);
    background: var(--pm-soft-2);
    color: var(--pm-text);
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pm-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.pm-auth-logo {
    width: 50px;
    height: 50px;
    border-radius: var(--pm-radius-sm);
    background: linear-gradient(135deg, #22c55e, var(--pm-green));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 950;
    flex: 0 0 50px;
}

.pm-auth-brand strong {
    display: block;
    color: var(--pm-text);
    font-size: 19px;
    font-weight: 950;
}

.pm-auth-brand span {
    display: block;
    color: var(--pm-muted);
    font-size: var(--pm-font-sm);
    font-weight: 700;
    margin-top: 2px;
}

.pm-auth-box h2 {
    margin: 0 0 8px;
    color: var(--pm-text);
    font-size: 25px;
    font-weight: 950;
}

.pm-auth-intro {
    margin: 0 0 18px;
}

.pm-auth-label {
    display: block;
    color: #334155;
    font-size: var(--pm-font-sm);
    font-weight: 900;
    margin: 12px 0 7px;
}

.pm-auth-submit {
    width: 100%;
    margin-top: 18px;
}

.pm-auth-switch {
    margin: 16px 0 0;
    color: var(--pm-muted);
    font-size: var(--pm-font-md);
    text-align: center;
}

.pm-auth-switch a,
.pm-auth-forgot a {
    color: var(--pm-green);
    font-weight: 950;
}

.pm-auth-forgot {
    margin: 10px 0 0;
    text-align: right;
}

.pm-auth-forgot a {
    font-size: var(--pm-font-sm);
}

/* RESPONSIVE */

@media (min-width: 700px) {
    .pm-page {
        max-width: 620px;
        margin: 0 auto;
        background: var(--pm-bg);
    }
}

@media (max-width: 420px) {
    .pm-main-card,
    .pm-card {
        padding: 18px;
        border-radius: var(--pm-radius-lg);
    }

    .pm-main-card h1 {
        font-size: 25px;
    }

    .pm-card h2 {
        font-size: 20px;
    }

    .pm-actions {
        gap: 10px;
    }

    .pm-hero {
        height: 330px;
    }

    .pm-bottom-bar {
        min-height: 82px;
        padding-left: 10px;
        padding-right: 10px;
        gap: 8px;
    }

    .pm-bottom-btn {
        min-height: 56px;
        border-radius: 20px;
    }
}