/* 公众端公共样式 */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Keep every visible native select consistent across desktop and mobile WebViews. */
select:not(.sr-only) {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    cursor: pointer;
    padding-right: 2.5rem !important;
}
select:not(.sr-only):focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}
select:not(.sr-only):disabled {
    background-color: #f8fafc;
    cursor: not-allowed;
    opacity: 0.65;
}

/* iOS and embedded WebKit do not auto-zoom editable controls whose computed font size is at least 16px. */
@media (max-width: 639px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
    textarea {
        font-size: 16px !important;
    }
    input::placeholder,
    textarea::placeholder {
        font-size: 14px;
    }
}

/* The route shell keeps this header mounted while content changes, so fix it to the viewport rather than relying on sticky inside an overflow container. */
#app {
    padding-top: 4.5rem;
}
#app > header {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 40;
    box-sizing: border-box;
    width: min(100%, 28rem);
    transform: translateX(-50%);
}
#app:not(.auth-app):not(.home-page-shell) {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* Keep the first fixed-footer paint stable while mobile WebViews dismiss the login keyboard. */
#public-bottom-nav {
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    box-sizing: border-box;
    margin-inline: auto !important;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    visibility: visible;
    transform: none !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 登录和身份选择页没有公共固定页头，不应继承业务页的顶部占位。 */
/* Render all enabled issue types in a compact four-column public homepage grid. */
.quick-category-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.375rem;
}
.quick-category-card {
    min-width: 0;
    min-height: 5.5rem;
    gap: 0.375rem;
    padding: 0.625rem 0.25rem 0.5rem;
    border-radius: 0.75rem;
}
.quick-category-icon {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 0.75rem;
}
.category-tone-air {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}
.category-tone-air img {
    filter: invert(57%) sepia(88%) saturate(1642%) hue-rotate(164deg) brightness(97%) contrast(96%);
}
.category-tone-water {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
}
.category-tone-water img {
    filter: invert(38%) sepia(80%) saturate(1728%) hue-rotate(204deg) brightness(96%) contrast(96%);
}
.category-tone-noise {
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.category-tone-noise img {
    filter: invert(68%) sepia(92%) saturate(719%) hue-rotate(349deg) brightness(101%) contrast(94%);
}
.category-tone-waste {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}
.category-tone-waste img {
    filter: invert(52%) sepia(66%) saturate(625%) hue-rotate(117deg) brightness(93%) contrast(91%);
}
.category-tone-other {
    background: #ede9fe;
    border: 1px solid #ddd6fe;
}
.category-tone-other img {
    filter: invert(42%) sepia(70%) saturate(999%) hue-rotate(226deg) brightness(95%) contrast(93%);
}
.quick-category-name {
    width: 100%;
    font-size: 0.625rem;
    line-height: 0.875rem;
    word-break: break-word;
}
.quick-category-loading {
    grid-column: 1 / -1;
    padding: 0.75rem 0;
    color: #94a3b8;
    font-size: 0.75rem;
    text-align: center;
}

/* The home view is intentionally compact so its primary actions stay visible on small phones. */
body.home-page-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
#app.home-page-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding-top: 3.5rem;
    /* 首页内容可延伸至固定菜单栏下方，仅由菜单栏本身遮挡。 */
    padding-bottom: 0;
}
#app.home-page-shell > .home-header {
    min-height: 3.5rem;
    padding: 0.5rem 1rem;
}
#app.home-page-shell .home-brand { gap: 0.5rem; }
#app.home-page-shell .home-brand-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
}
#app.home-page-shell .home-brand-title { font-size: 0.875rem; }
#app.home-page-shell .home-brand-subtitle {
    font-size: 0.625rem;
    line-height: 0.875rem;
}
#app.home-page-shell .home-main {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.5rem;
    overflow-x: hidden;
    overscroll-behavior: contain;
}
#app.home-page-shell .home-hero {
    flex: 0 0 auto;
    padding: 1rem;
    border-radius: 1rem;
}
#app.home-page-shell .home-hero-decoration { width: 6rem; height: 6rem; }
#app.home-page-shell .home-hero-tag {
    margin-bottom: 0.375rem;
    font-size: 0.625rem;
}
#app.home-page-shell .home-hero-title {
    font-size: 1.125rem;
    line-height: 1.3;
}
#app.home-page-shell .home-hero-description {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    line-height: 1rem;
}
#app.home-page-shell .home-hero-action {
    min-height: 2.75rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    font-size: 0.875rem;
}
#app.home-page-shell .home-category-section,
#app.home-page-shell .home-feed-section {
    margin-top: 0;
}
#app.home-page-shell .home-category-section,
#app.home-page-shell .home-feed-section { gap: 0.5rem; }
#app.home-page-shell .quick-category-card {
    min-height: 3.75rem;
    gap: 0.125rem;
    padding: 0.25rem 0.125rem;
    border-radius: 0.625rem;
}
#app.home-page-shell .quick-category-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
}
#app.home-page-shell .quick-category-name {
    font-size: 0.5625rem;
    line-height: 0.75rem;
}
#app.home-page-shell .home-feed-list { gap: 0.5rem; }
#app.home-page-shell .home-feed-item {
    min-height: 3.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.875rem;
}
#app.home-page-shell .home-feed-item > div:first-child { gap: 0.625rem; }
#app.home-page-shell .home-feed-item .w-11 {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
}

@media (max-height: 640px) {
    #app.home-page-shell {
        padding-top: 3.125rem;
        padding-bottom: 0;
    }
    #app.home-page-shell > .home-header { min-height: 3.125rem; }
    #app.home-page-shell .home-main {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem 0.375rem;
    }
    #app.home-page-shell .home-hero { padding: 0.75rem; }
    #app.home-page-shell .home-hero-tag,
    #app.home-page-shell .home-hero-description { display: none; }
    #app.home-page-shell .home-hero-title { font-size: 1rem; }
    #app.home-page-shell .home-hero-action {
        min-height: 2.375rem;
        margin-top: 0.5rem;
        font-size: 0.8125rem;
    }
    #app.home-page-shell .quick-category-card { min-height: 3.25rem; }
    #app.home-page-shell .quick-category-icon {
        width: 1.375rem;
        height: 1.375rem;
    }
    #app.home-page-shell .quick-category-name { font-size: 0.5rem; }
    #app.home-page-shell .home-feed-item {
        min-height: 2.875rem;
        padding: 0.5rem 0.625rem;
    }
    #app.home-page-shell .home-feed-item .w-11 {
        width: 1.875rem;
        height: 1.875rem;
    }
}

@media (max-height: 520px) {
    #app.home-page-shell .home-brand-subtitle,
    #app.home-page-shell .home-feed-section > div:first-child a { display: none; }
    #app.home-page-shell .home-hero-decoration { display: none; }
    #app.home-page-shell .home-hero-title { font-size: 0.875rem; }
    #app.home-page-shell .home-hero-action { min-height: 2.125rem; }
    #app.home-page-shell .quick-category-card { min-height: 2.875rem; }
    #app.home-page-shell .quick-category-icon { display: none; }
    #app.home-page-shell .home-feed-item {
        min-height: 2.5rem;
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }
}

#app.auth-app {
    padding-top: 0;
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.92; transform: scale(0.98); }
}
.pulse-btn { animation: pulse-subtle 3s infinite ease-in-out; }

/* The static bundle contains the solid Font Awesome face only. */
.fa-regular {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Stable layout for auth views; these do not depend on generated utility classes. */
.auth-main {
    padding-top: 2.75rem;
}
.auth-brand {
    margin-bottom: 1.375rem;
}
.auth-brand > p {
    font-size: 0.6875rem;
    line-height: 1rem;
}
.auth-form {
    margin-top: 0;
}
.auth-remember {
    min-height: 1.25rem;
}
.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translateY(-50%);
}
.auth-note {
    display: none;
}
.auth-role-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.auth-role-back {
    margin-top: 1rem;
}

/* Shared operation feedback: compact, square-cornered, and content-sized. */
#toast.app-toast {
    z-index: 10000 !important;
    align-items: flex-start;
    box-sizing: border-box;
    width: fit-content;
    max-width: calc(100vw - 2rem);
    padding: 0.625rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    background: rgba(71, 85, 105, 0.86);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(8px);
}
#toast.app-toast .toast-icon {
    flex: 0 0 auto;
    margin-top: 0.125rem;
}
#toast.app-toast .toast-message {
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* All public dialog backdrops use the same restrained blur so form and detail views feel consistent. */
.public-modal-backdrop {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* The report view occupies only the space between the fixed public header and bottom navigation. */
body.report-page-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
#app.report-page-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding-bottom: 5.75rem;
    overflow: hidden;
}
#app.report-page-shell > .report-page-main,
#app.report-page-shell > .public-route-view[data-public-route-view="report"] {
    min-height: 0;
    flex: 1 1 auto;
}
#app.report-page-shell > .public-route-view[data-public-route-view="report"] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#app.report-page-shell .report-page-main {
    width: 100%;
    min-height: 0;
    overflow-x: hidden;
    padding: 0.75rem 1rem;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
#app.report-page-shell .report-form-card {
    display: flex;
    width: 100%;
    min-height: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
}
#app.report-page-shell .report-form-heading {
    min-width: 0;
    flex: 0 0 auto;
    gap: 0.5rem;
    padding-bottom: 0.625rem;
}
#app.report-page-shell .report-form {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 0 auto;
    flex-direction: column;
    gap: 0.75rem;
}
#app.report-page-shell .report-category-toggle {
    height: 2.875rem;
}
#app.report-page-shell .report-description {
    height: 4.5rem;
    min-height: 4.5rem;
}
#app.report-page-shell .report-anonymous-row {
    min-height: 2.75rem;
}
#app.report-page-shell .report-submit-button {
    min-height: 3rem;
}
#app.report-page-shell .report-submit-actions {
    display: grid;
    min-width: 0;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.5rem;
}
#app.report-page-shell .report-return-button {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    transition: background-color 150ms ease, transform 150ms ease;
}
#app.report-page-shell .report-return-button:hover {
    background: #f8fafc;
}
#app.report-page-shell .report-return-button:active {
    transform: scale(0.98);
}
#app.report-page-shell .report-return-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
#app.report-page-shell .report-form > div,
#app.report-page-shell .report-form-heading > h2 {
    min-width: 0;
}
#app.report-page-shell .report-form-heading > span {
    flex: 0 1 auto;
    white-space: nowrap;
}
#app.report-page-shell #page-back-button {
    display: none;
}

/* The location picker follows the same header/navigation boundaries and lets the map absorb remaining height. */
#location-picker-modal {
    top: 4.5rem;
    bottom: 5.75rem;
}
#location-picker-modal .location-picker-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: calc(28rem - 1.5rem);
    height: 100%;
    max-height: 100%;
    padding: 1rem;
    overflow: hidden;
    border-radius: 1rem;
}
.location-picker-header,
.location-picker-search,
.location-picker-selection,
.location-picker-actions {
    flex: 0 0 auto;
}
#location-picker-modal .location-picker-search,
#location-picker-modal .location-picker-map-wrap,
#location-picker-modal .location-picker-selection,
#location-picker-modal .location-picker-actions {
    margin-top: 0.75rem;
}
#location-picker-modal .location-picker-map-wrap {
    height: auto;
    min-height: 10rem;
    flex: 1 1 auto;
}
#location-picker-modal .location-picker-address {
    max-height: 3rem;
    overflow-y: auto;
}
@media (max-height: 760px) {
    #app.report-page-shell .report-page-main {
        padding: 0.5rem 0.75rem;
    }
    #app.report-page-shell .report-form-card {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    #app.report-page-shell .report-form-heading {
        padding-bottom: 0.5rem;
    }
    #app.report-page-shell .report-form {
        gap: 0.5rem;
    }
    #app.report-page-shell .report-form label {
        margin-bottom: 0.25rem;
    }
    #app.report-page-shell .report-category-toggle {
        height: 2.875rem;
    }
    #form-location {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }
    #app.report-page-shell .report-description {
        height: 3.25rem;
        min-height: 3.25rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    #app.report-page-shell .report-photo-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.375rem;
    }
    #app.report-page-shell .report-anonymous-row {
        min-height: 2.375rem;
        padding: 0.5rem 0.75rem;
    }
    #app.report-page-shell .report-submit-button {
        min-height: 2.625rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    #app.report-page-shell .report-return-button {
        min-height: 2.625rem;
    }
    #location-picker-modal .location-picker-panel {
        padding: 0.75rem;
    }
    #location-picker-modal .location-picker-header {
        padding-bottom: 0.5rem;
    }
    #location-picker-modal .location-picker-search,
    #location-picker-modal .location-picker-map-wrap,
    #location-picker-modal .location-picker-selection,
    #location-picker-modal .location-picker-actions {
        margin-top: 0.5rem;
    }
    #location-picker-modal .location-picker-search input {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }
    #location-picker-modal .location-picker-map-wrap {
        min-height: 8rem;
    }
    #location-picker-modal .location-picker-selection {
        padding: 0.625rem;
    }
    #location-picker-modal .location-picker-selection p + p {
        margin-top: 0.25rem;
    }
    #location-picker-modal .location-picker-actions button {
        height: 2.5rem;
    }
}

@media (max-height: 640px) {
    #app.report-page-shell .report-page-main {
        padding: 0.375rem 0.625rem;
    }
    #app.report-page-shell .report-form-card {
        gap: 0.375rem;
        padding: 0.625rem;
    }
    #app.report-page-shell .report-form-heading {
        padding-bottom: 0.375rem;
    }
    #app.report-page-shell .report-form {
        gap: 0.375rem;
    }
    #app.report-page-shell .report-category-toggle {
        height: 2.625rem;
    }
    #app.report-page-shell .report-description {
        height: 2.75rem;
        min-height: 2.75rem;
    }
    #app.report-page-shell .report-photo-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    #app.report-page-shell .report-anonymous-row {
        min-height: 2.125rem;
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }
    #app.report-page-shell .report-submit-button {
        min-height: 2.5rem;
    }
    #app.report-page-shell .report-return-button {
        min-height: 2.5rem;
    }
    #location-picker-modal .location-picker-panel {
        padding: 0.625rem;
    }
    #location-picker-modal .location-picker-header > div > p {
        display: none;
    }
    #location-picker-modal .location-picker-map-wrap {
        min-height: 6.5rem;
    }
}

@media (max-width: 380px) {
    #app.report-page-shell .report-form-heading > span {
        display: none;
    }
}

@media (max-height: 520px) {
    #location-picker-modal .location-picker-panel {
        overflow-y: auto;
    }
}

/* Public issue details use the same fixed, bottom-aligned card treatment as the enforcement portal. */
.public-detail-overlay {
    position: fixed;
    inset: 0;
    bottom: 4.25rem;
    z-index: 50;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.public-detail-overlay.is-open { display: flex; }
.public-detail-modal {
    box-sizing: border-box;
    display: flex;
    width: calc(100% - 2rem);
    max-width: 24.875rem;
    height: 66.667vh;
    height: 66.667dvh;
    max-height: calc(100dvh - 2rem);
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
    margin-bottom: 0.5rem;
    animation: public-detail-card-enter 160ms ease-out;
}
@keyframes public-detail-card-enter {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}
.public-detail-header {
    display: flex;
    min-height: 4rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}
.public-detail-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 0.9375rem;
    font-weight: 700;
}
.public-detail-close {
    display: flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 0.75rem;
}
.public-detail-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    color: #475569;
    font-size: 0.75rem;
}
.public-detail-footer {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}
.public-detail-footer button {
    border: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}

/* The category list is positioned against the full-width trigger, not its content width. */
#category-picker-menu {
    box-sizing: border-box;
    left: 0;
    right: auto;
    width: 100%;
}

/* The public shell remains mounted while navigation replaces only this business view. */
.public-route-view {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.public-route-enter {
    animation: public-route-enter 140ms ease-out;
}
@keyframes public-route-enter {
    from { opacity: 0.45; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
    .public-detail-overlay {
        bottom: 0;
        align-items: center;
    }
    .public-detail-modal { margin-bottom: 0; }
}

/* Public image previews mirror the enforcement detail card instead of opening a full-screen dark layer. */
.public-image-preview {
    position: fixed;
    bottom: 4.25rem;
    left: 50%;
    z-index: 9999;
    box-sizing: border-box;
    display: none;
    width: calc(100% - 2rem);
    max-width: 24.875rem;
    height: 66.667vh;
    height: 66.667dvh;
    max-height: calc(100dvh - 2rem);
    transform: translate(-50%, -0.5rem);
}
.public-image-preview.is-open { display: block; }
.public-image-preview-dialog {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
    animation: public-image-preview-enter 160ms ease-out;
}
@keyframes public-image-preview-enter {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}
.public-image-preview-header {
    display: flex;
    min-height: 4rem;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    color: #0f172a;
}
.public-image-preview-header p {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
}
.public-image-preview-close,
.public-image-preview-tool {
    display: flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
}
.public-image-preview-close { color: #94a3b8; }
.public-image-preview-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
    background: #f8fafc;
    touch-action: none;
}
.public-image-preview-body.is-draggable { cursor: grab; }
.public-image-preview-body.is-dragging { cursor: grabbing; }
.public-image-preview-content {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
    object-fit: contain;
    transform: translate(var(--public-preview-offset-x, 0), var(--public-preview-offset-y, 0)) scale(var(--public-preview-scale, 1));
    transform-origin: center;
    transition: transform 160ms ease-out;
}
.public-image-preview-controls {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}
.public-image-preview-scale {
    min-width: 2.75rem;
    padding: 0.25rem 0.375rem;
    flex: 0 0 auto;
    border: 0;
    border-radius: 0.375rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.6875rem;
    font-weight: 700;
}
.public-image-preview-tool:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}
@media (min-width: 640px) {
    .public-image-preview {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
    }
}
