/*!
 * 图片画廊样式（替代 tailwindcss.js Play CDN）
 * 仅包含详情页图片画廊用到的 preflight 与工具类，避免运行时生成 400KB+ 的 Tailwind。
 */

/* ===== Tailwind Preflight（与 v3 默认值保持一致，保持现有页面外观） ===== */
*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

::before,
::after {
    --tw-content: "";
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    line-height: inherit;
}

hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
}

abbr:where([title]) {
    text-decoration: underline dotted;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}

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

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
}

:-moz-focusring {
    outline: auto;
}

:-moz-ui-invalid {
    box-shadow: none;
}

progress {
    vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

summary {
    display: list-item;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
    margin: 0;
}

fieldset {
    margin: 0;
    padding: 0;
}

legend {
    padding: 0;
}

ol,
ul,
menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: #9ca3af;
}

button,
[role="button"] {
    cursor: pointer;
}

:disabled {
    cursor: default;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
    vertical-align: middle;
}

img,
video {
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none;
}

/* ===== 页面布局类（Tailwind 运行时同样会生成，必须保留，否则整页宽度会回退到 Bootstrap 的 1170px） ===== */
.container {
    width: 100%;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.collapse {
    visibility: collapse;
}

.table {
    display: table;
}

dialog {
    padding: 0;
}

/* ===== 图片画廊工具类 ===== */
.image-preview-overlay {
    color: #000;
}

.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.z-\[9999\] {
    z-index: 9999;
}

.top-4 {
    top: 1rem;
}

.right-4 {
    right: 1rem;
}

.left-4 {
    left: 1rem;
}

.top-1\/2 {
    top: 50%;
}

.-translate-y-1\/2 {
    transform: translateY(-50%);
}

.transform {
    transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}

.rotate-180 {
    transform: rotate(180deg);
}

.flex {
    display: flex;
}

.inline-block {
    display: inline-block;
}

.hidden {
    display: none;
}

.flex-row {
    flex-direction: row;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-grow {
    flex-grow: 1;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

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

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.max-w-full {
    max-width: 100%;
}

.max-h-full {
    max-height: 100%;
}

.min-h-\[50px\] {
    min-height: 50px;
}

.h-auto {
    height: auto;
}

.object-contain {
    object-fit: contain;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.pt-12 {
    padding-top: 3rem;
}

.pb-1 {
    padding-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.gap-2 {
    gap: 0.5rem;
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.5rem;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.leading-none {
    line-height: 1;
}

.font-semibold {
    font-weight: 600;
}

.text-black {
    color: #000;
}

.text-white {
    color: #fff;
}

.text-gray-400 {
    color: #9ca3af;
}

.bg-white {
    --tw-bg-opacity: 1;
    background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
}

.bg-black {
    --tw-bg-opacity: 1;
    background-color: rgba(0, 0, 0, var(--tw-bg-opacity));
}

.bg-\[\#ffffff\] {
    background-color: #fff;
}

.bg-opacity-0 {
    --tw-bg-opacity: 0;
}

.bg-opacity-30 {
    --tw-bg-opacity: 0.3;
}

.bg-opacity-95 {
    --tw-bg-opacity: 0.95;
}

.hover\:bg-opacity-60:hover {
    --tw-bg-opacity: 0.6;
}

.group:hover .group-hover\:bg-opacity-50 {
    --tw-bg-opacity: 0.5;
}

.opacity-0 {
    opacity: 0;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.disabled\:opacity-30:disabled {
    opacity: 0.3;
}

.disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
}

.border {
    border-width: 1px;
}

.border-2 {
    border-width: 2px;
}

.border-transparent {
    border-color: transparent;
}

.border-gray-700 {
    border-color: #374151;
}

.rounded {
    border-radius: 0.25rem;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

@media (min-width: 1024px) {
    .lg\:flex {
        display: flex;
    }

    .lg\:grid {
        display: grid;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:flex-shrink {
        flex-shrink: 1;
    }

    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .lg\:gap-2 {
        gap: 0.5rem;
    }

    .lg\:w-\[50\%\] {
        width: 50%;
    }

    .lg\:w-full {
        width: 100%;
    }

    .lg\:h-full {
        height: 100%;
    }

    .lg\:h-auto {
        height: auto;
    }

    .lg\:max-h-\[160px\] {
        max-height: 160px;
    }

    .lg\:p-0 {
        padding: 0;
    }

    .lg\:p-8 {
        padding: 2rem;
    }

    .lg\:pt-8 {
        padding-top: 2rem;
    }

    .lg\:overflow-x-hidden {
        overflow-x: hidden;
    }

    .lg\:overflow-y-auto {
        overflow-y: auto;
    }
}
