[hidden] {
    display: none !important;
}

#site-auth-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#site-auth-container:not([data-ready]) .auth-unlogged,
#site-auth-container:not([data-ready]) .site-account-wrap {
    visibility: hidden;
}

.site-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.auth-unlogged {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px;
    border-radius: 999px;
    background: rgba(244, 245, 247, 0.92);
    border: 1px solid rgba(22, 24, 30, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 12px 30px rgba(22, 24, 30, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.site-auth-btn svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.site-notice-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 50%;
    color: #171923;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(22, 24, 30, 0.08);
}

.site-notice-button svg {
    width: 19px;
    height: 19px;
}

.site-notice-button span {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
}

.site-notice-list {
    display: grid;
    gap: 12px;
    max-height: min(68vh, 720px);
    overflow: auto;
    padding-right: 6px;
}

.site-notice-item {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 18px;
    padding: 14px;
    background: #fbfbf8;
}

.site-notice-item img {
    width: 100%;
    max-height: 360px;
    border-radius: 14px;
    object-fit: contain;
    background: #f1f3f0;
}

.site-notice-item h3,
.site-notice-item p {
    margin: 0;
}

.site-notice-item h3 {
    color: #171923;
    font-size: 18px;
}

.site-notice-item p,
.site-notice-item span {
    color: #687180;
    line-height: 1.7;
}

.site-auth-btn--login {
    color: #171923;
    background: #fff;
    border: 1px solid rgba(22, 24, 30, 0.12);
    box-shadow: 0 8px 18px rgba(22, 24, 30, 0.08);
}

.site-auth-btn--login:hover {
    background: #fcfcfc;
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.site-auth-btn--register {
    color: #fff;
    background: #050505;
    border: 1px solid #050505;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.site-auth-btn--register:hover {
    background: #222;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.site-account-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.site-account-wrap::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 14px;
}

.site-account-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 24px rgba(18, 18, 18, 0.06);
    cursor: default;
}

.site-account-avatar img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(22, 24, 30, 0.08);
}

.site-account-avatar span {
    max-width: 120px;
    overflow: hidden;
    color: #171923;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 90;
    display: grid;
    min-width: 178px;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(22, 24, 30, 0.14);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.redeem-help {
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    background: #f8faf9;
    color: #687180;
    font-size: 13px;
    line-height: 1.7;
}

.redeem-help strong {
    display: block;
    margin-bottom: 4px;
    color: #171923;
}

.site-account-menu[hidden] {
    display: none;
}

.site-account-wrap:hover .site-account-menu,
.site-account-wrap:focus-within .site-account-menu,
.site-account-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-account-menu-head {
    padding: 4px 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 8px;
}

#auth-user-name {
    color: #171923;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#auth-user-meta {
    margin-top: 3px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 900;
}

.site-account-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 12px;
    padding: 8px 10px;
    color: #171923;
    background: transparent;
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-account-menu-item svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    opacity: 0.55;
}

.site-account-menu-item:hover,
.site-account-menu-item:focus-visible {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.09);
    outline: 0;
}

.site-account-menu-item--danger {
    color: #ef4444;
}

.site-account-menu-separator {
    height: 1px;
    margin: 6px 0;
    background: rgba(0, 0, 0, 0.04);
}

.mobile-auth-slot {
    display: grid;
    gap: 12px;
}

.mobile-auth-slot #site-auth-container {
    width: 100%;
    display: grid;
    justify-items: start;
    gap: 12px;
}

.mobile-auth-slot .auth-unlogged {
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.mobile-auth-slot .site-auth-btn,
.mobile-auth-slot .site-account-avatar {
    width: 100%;
    justify-content: flex-start;
}

.mobile-auth-slot .site-account-wrap,
.mobile-auth-slot .site-account-avatar {
    width: 100%;
}

.mobile-auth-slot .site-account-wrap::after {
    left: 0;
    right: auto;
    width: 100%;
}

.mobile-auth-slot .site-account-menu {
    left: 0;
    right: 0;
    min-width: 0;
}

@media (max-width: 640px) {
    .auth-unlogged {
        gap: 6px;
        padding: 6px;
    }

    .site-auth-btn {
        min-height: 40px;
        gap: 5px;
        padding: 0 12px;
        font-size: 13px;
    }

    .site-auth-btn svg {
        width: 18px;
        height: 18px;
    }
}

body.prompt-window-open,
body.auth-dialog-open {
    overflow: hidden;
}

body.announcement-dialog-open {
    overflow: hidden;
}

.prompt-window {
    position: fixed;
    inset: 80px 0 0;
    z-index: 70;
    padding: 0;
}

.prompt-window[aria-hidden="true"] {
    pointer-events: none;
}

.prompt-window-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(247, 247, 244, 0.72);
    backdrop-filter: blur(10px);
}

.prompt-window-panel {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(15, 118, 110, 0.12), transparent 28rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 249, 246, 0.9));
    box-shadow: 0 -18px 70px rgba(22, 24, 30, 0.14);
}

.prompt-window-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: clamp(14px, 2vw, 22px) clamp(18px, 4vw, 54px);
    border-bottom: 1px solid rgba(22, 24, 30, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
}

.prompt-window-top h2 {
    margin: 5px 0 4px;
    color: #171923;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.05;
}

.prompt-window-top p {
    max-width: 800px;
    margin: 0;
    color: #5d6572;
    line-height: 1.75;
}

.prompt-window-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #171923;
    background: #fff;
    box-shadow: 0 10px 26px rgba(22, 24, 30, 0.12);
    font-size: 26px;
    line-height: 1;
}

.prompt-shell {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 16px;
    min-height: 0;
    padding: clamp(16px, 3vw, 30px) clamp(18px, 4vw, 54px) clamp(22px, 3vw, 34px);
    overflow: hidden;
}

.prompt-window-actions,
.prompt-toolbar,
.empty-state {
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
}

.prompt-window-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
}

.prompt-actions,
.prompt-mini-stats {
    display: grid;
    gap: 12px;
}

.prompt-mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.prompt-mini-stat {
    position: relative;
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 86px;
    padding: 16px 18px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 245, 0.94)),
        #fff;
    box-shadow: 0 14px 34px rgba(22, 24, 30, 0.07);
    overflow: hidden;
}

.prompt-mini-stat::after {
    content: "";
    position: absolute;
    inset: auto 16px 0;
    height: 3px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.16);
}

.prompt-mini-stat--prompts::after {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.86), rgba(94, 234, 212, 0.76));
}

.prompt-mini-stat--images::after {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.82), rgba(129, 140, 248, 0.78));
}

.prompt-mini-stat--quota::after {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.82), rgba(251, 191, 36, 0.8));
}

.prompt-mini-stat-label {
    display: block;
    color: #657082;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.prompt-mini-stat strong {
    color: #171923;
    font-size: clamp(1.75rem, 2.4vw, 2.2rem);
    line-height: 1;
    font-weight: 950;
}

.prompt-solid-btn,
.prompt-ghost-btn,
.prompt-text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.prompt-solid-btn {
    border: 1px solid transparent;
    padding: 10px 18px;
    color: #fff;
    background: #111111;
}

.prompt-ghost-btn {
    border: 1px solid rgba(15, 118, 110, 0.22);
    padding: 10px 18px;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.78);
}

.prompt-ghost-btn.small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.prompt-text-btn {
    border: 0;
    color: #0f766e;
    background: transparent;
}

.prompt-solid-btn:hover,
.prompt-ghost-btn:hover {
    transform: translateY(-2px);
}

.prompt-solid-btn:hover {
    background: #30323a;
}

.prompt-ghost-btn:hover {
    border-color: rgba(15, 118, 110, 0.42);
    background: #fff;
}

.prompt-ghost-btn.danger {
    border-color: rgba(239, 68, 68, 0.24);
    color: #dc2626;
}

.prompt-ghost-btn.danger:hover {
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(254, 242, 242, 0.88);
}

.prompt-channel-filter,
.tag-filter,
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prompt-channel-filter button,
.tag-filter button,
.pill {
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 999px;
    padding: 9px 13px;
    color: #505866;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
}

.prompt-channel-filter button.active,
.tag-filter button.active,
.pill {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
}

.prompt-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
}

.prompt-search,
.stack-form label {
    display: grid;
    gap: 8px;
}

.prompt-search span,
.stack-form span {
    color: #747987;
    font-size: 13px;
    font-weight: 900;
}

.auth-inline-message {
    margin: 0 0 14px;
    border: 1px solid rgba(217, 85, 69, 0.28);
    border-radius: 16px;
    padding: 12px 14px;
    color: #9f2f24;
    background: rgba(217, 85, 69, 0.08);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.55;
}

.auth-inline-message[data-type="success"] {
    border-color: rgba(18, 138, 92, 0.24);
    color: #0f6f4f;
    background: rgba(18, 138, 92, 0.08);
}

.site-auth-email-fields {
    display: grid;
    gap: 12px;
}

.site-code-row,
.profile-security-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.profile-email-meta {
    margin: 0;
    color: #687180;
    font-size: 13px;
}

.profile-security-panel {
    width: 100%;
}

.profile-security-card {
    width: 100%;
}

.profile-security-card h3 {
    margin: 0 0 8px;
    color: #171923;
    font-size: 16px;
    font-weight: 900;
}

.profile-security-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 20px;
}

.profile-security-check input {
    width: 18px;
    min-height: auto;
}

#profile-password-code-fields {
    display: grid;
    gap: 12px;
}

.auth-inline-message[hidden] {
    display: none;
}

.prompt-window input,
.prompt-window textarea,
.prompt-page-main input,
.prompt-page-main textarea,
.prompt-dialog input,
.prompt-dialog textarea,
.prompt-dialog select {
    width: 100%;
    border: 1px solid rgba(23, 25, 35, 0.12);
    border-radius: 16px;
    color: #171923;
    background: #fff;
    outline: 0;
}

.prompt-window input,
.prompt-page-main input,
.prompt-dialog input,
.prompt-dialog select {
    min-height: 46px;
    padding: 10px 14px;
}

.prompt-window textarea,
.prompt-page-main textarea,
.prompt-dialog textarea {
    resize: vertical;
    padding: 13px 14px;
    line-height: 1.65;
}

.prompt-window input:focus,
.prompt-window textarea:focus,
.prompt-page-main input:focus,
.prompt-page-main textarea:focus,
.prompt-dialog input:focus,
.prompt-dialog textarea:focus,
.prompt-dialog select:focus {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    min-height: 0;
    overflow: auto;
    padding: 4px 4px 16px;
    align-content: start;
}

.prompt-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 50px rgba(22, 24, 30, 0.1);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
    content-visibility: auto;
    contain-intrinsic-size: 520px 420px;
}

.prompt-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(22, 24, 30, 0.15);
}

.card-summary {
    min-width: 0;
}

.prompt-card--expanded {
    grid-column: 1 / -1;
    padding: 0;
    overflow: hidden;
    border-color: rgba(15, 118, 110, 0.18);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 30px 90px rgba(22, 24, 30, 0.18);
    content-visibility: visible;
    contain-intrinsic-size: auto;
}

.prompt-card--expanded:hover {
    transform: none;
}

.prompt-card--expanded > .card-summary {
    display: none;
}

.card-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: #050505;
}

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

.card-media.is-empty {
    display: grid;
    place-items: center;
    color: #303030;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 950;
}

.image-count,
.review-badge {
    position: absolute;
    top: 14px;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    font-size: 12px;
    font-weight: 950;
}

.image-count {
    left: 14px;
}

.review-badge {
    right: 14px;
    background: rgba(217, 85, 69, 0.92);
}

.review-badge.pending {
    background: rgba(212, 157, 56, 0.95);
}

.card-summary h2,
.prompt-card--preview h2 {
    display: -webkit-box;
    min-height: 58px;
    margin: 10px 0 10px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #171923;
    font-size: 19px;
    line-height: 1.48;
}

.prompt-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 28px;
    margin-top: 12px;
}

.prompt-card-badges span {
    border-radius: 999px;
    padding: 5px 8px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    font-size: 11px;
    font-weight: 950;
}

.prompt-card-excerpt {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #4d5562;
    font-size: 14px;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
}

.card-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #656b75;
    background: #fff;
    box-shadow: 0 8px 18px rgba(22, 24, 30, 0.08);
    font-size: 12px;
    font-weight: 900;
}

.author-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0 18px;
    color: #747987;
    font-size: 13px;
    font-weight: 900;
}

.author-row img,
.comment-avatar,
.profile-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f1ed;
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.card-actions button,
.review-actions button {
    min-width: 0;
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    color: #171923;
    background: #fff;
    box-shadow: 0 10px 24px rgba(22, 24, 30, 0.08);
    font: inherit;
    font-size: 13px;
    font-weight: 950;
}

.prompt-card--preview {
    max-width: 320px;
    pointer-events: none;
}

.prompt-preview-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(23, 25, 35, 0.1);
    border-radius: 20px;
    background: #fbfbf8;
}

.prompt-preview-block > div:first-child {
    display: grid;
    gap: 6px;
}

.prompt-preview-block > div:first-child span {
    color: #747987;
    font-size: 13px;
    font-weight: 900;
}

.prompt-preview-block > div:first-child strong {
    color: #171923;
    line-height: 1.7;
}

.prompt-upload-field {
    display: grid;
    gap: 12px;
}

.prompt-upload-head {
    display: grid;
    gap: 4px;
}

.prompt-upload-head span {
    color: #3d4552;
    font-size: 13px;
    font-weight: 900;
}

.prompt-upload-head strong {
    color: #8a92a0;
    font-size: 12px;
    font-weight: 800;
}

.prompt-image-dropzone {
    display: grid;
    gap: 6px;
    min-height: 116px;
    place-items: center;
    border: 1.5px dashed rgba(15, 118, 110, 0.32);
    border-radius: 18px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.045);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.prompt-image-dropzone:hover,
.prompt-image-dropzone.is-dragover {
    border-color: rgba(15, 118, 110, 0.72);
    background: rgba(15, 118, 110, 0.085);
    transform: translateY(-1px);
}

.prompt-image-dropzone span {
    color: #0f766e;
    font-size: 16px;
    font-weight: 950;
}

.prompt-image-dropzone small {
    color: #7a8391;
    font-size: 12px;
    font-weight: 800;
}

.prompt-image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.prompt-upload-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
}

.prompt-upload-item {
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 14px;
    background: #fbfbf8;
}

.prompt-upload-item img {
    width: 100%;
    aspect-ratio: 1.15;
    border-radius: 10px;
    object-fit: cover;
    background: #eef1ed;
}

.prompt-upload-item span {
    color: #171923;
    font-size: 12px;
    font-weight: 900;
}

.prompt-upload-item button {
    border: 0;
    border-radius: 999px;
    padding: 6px 10px;
    color: #e11d48;
    background: #fff1f2;
    font-size: 12px;
    font-weight: 900;
}

.card-actions button:hover,
.review-actions button:hover {
    color: white;
    background: #111;
}

.empty-state {
    padding: 32px;
    color: #747987;
    text-align: center;
    font-weight: 900;
}

.prompt-page-main {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 76px;
}

body[data-page="prompt"] {
    overflow-x: hidden;
}

.prompt-page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 18px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 42px);
    background: linear-gradient(135deg, #ffffff, #f7f9f3 58%, #edf7f3);
    box-shadow: 0 24px 70px rgba(22, 24, 30, 0.08);
}

.prompt-page-hero > div {
    min-width: 0;
}

.prompt-page-hero h1 {
    margin: 8px 0 10px;
    color: #171923;
    font-size: clamp(36px, 5vw, 76px);
    line-height: 0.98;
}

.prompt-page-hero p:last-child {
    max-width: 760px;
    margin: 0;
    color: #5d6572;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.prompt-page-hero-actions {
    position: static;
    align-self: end;
    justify-self: end;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 240px);
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.prompt-page-hero-actions > * {
    width: 100%;
    min-height: 52px;
    justify-content: center;
}

.prompt-page-hero-actions #open-editor {
    box-shadow: 0 16px 38px rgba(17, 17, 17, 0.22);
}

.prompt-page-shell {
    overflow: visible;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 24px 70px rgba(22, 24, 30, 0.08);
}

.prompt-page-grid {
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prompt-page-detail {
    position: relative;
    grid-column: 1 / -1;
    margin-top: 22px;
    scroll-margin-top: 96px;
}

.prompt-card--expanded .prompt-page-detail {
    display: block;
    margin-top: 0;
    animation: detailReveal 260ms ease both;
}

.prompt-page-detail .detail-layout {
    border: 1px solid rgba(22, 24, 30, 0.08);
}

.prompt-card--expanded .detail-layout {
    border: 0;
    border-radius: 30px;
    box-shadow: none;
}

@keyframes detailReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.prompt-page-detail-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #171923;
    background: #fff;
    box-shadow: 0 12px 30px rgba(22, 24, 30, 0.12);
    font-size: 26px;
    line-height: 1;
}

.prompt-dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    margin: 0;
    max-height: calc(100vh - 36px);
    max-width: calc(100vw - 28px);
    overflow: auto;
    transform: translate(-50%, -50%);
    border: 0;
    padding: 0;
    color: #171923;
    background: transparent;
}

.prompt-dialog::backdrop {
    background: rgba(15, 17, 23, 0.56);
    backdrop-filter: blur(8px);
}

.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    padding: clamp(18px, 4vw, 54px);
    opacity: 0;
    background: rgba(15, 17, 23, 0.78);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
    transition: opacity 160ms ease;
}

.image-viewer[hidden] {
    display: none;
}

.image-viewer.show {
    opacity: 1;
}

.image-viewer img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 18px;
    object-fit: contain;
    background: #050505;
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.36);
    transform: scale(0.98);
    transition: transform 180ms ease;
}

.image-viewer.show img {
    transform: scale(1);
}

body.image-viewer-open {
    overflow: hidden;
}

.prompt-detail-dialog {
    width: min(1180px, calc(100% - 28px));
}

.detail-layout,
.prompt-form-dialog {
    position: relative;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(22, 24, 30, 0.16);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
    gap: 24px;
    padding: 24px;
}

.prompt-dialog-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: #171923;
    background: #fff;
    box-shadow: 0 10px 26px rgba(22, 24, 30, 0.12);
    font-size: 24px;
    line-height: 1;
}

.detail-media {
    display: grid;
    align-content: start;
    gap: 12px;
}

.detail-media-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(100dvh - 260px);
    max-height: calc(100dvh - 260px);
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    border-radius: 30px;
    background: #050505;
}

#detail-main-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.detail-nav-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #171923;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 32px rgba(22, 24, 30, 0.18);
    font-size: 30px;
    line-height: 1;
    transform: translateY(-50%);
}

.detail-nav-btn--prev {
    left: 16px;
}

.detail-nav-btn--next {
    right: 16px;
}

.detail-image-indicator {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    padding: 7px 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.65);
    font-size: 12px;
    font-weight: 900;
}

.detail-thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.detail-thumbs button {
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    aspect-ratio: 1;
    background: #f0f1ed;
}

.detail-thumbs button.active {
    border-color: #0f766e;
}

.detail-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-copy {
    min-width: 0;
    padding: 12px 6px 6px;
}

.detail-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-right: 46px;
    color: #747987;
    font-size: 13px;
    font-weight: 900;
}

.detail-copy h2,
.prompt-form-dialog h2 {
    margin: 10px 0 14px;
    color: #171923;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
}

#detail-prompt {
    max-height: 330px;
    margin: 18px 0;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid rgba(23, 25, 35, 0.1);
    border-radius: 18px;
    padding: 18px;
    background: #f8f8f5;
    font: inherit;
    line-height: 1.75;
}

.detail-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.comments h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.comment-note,
.form-note {
    margin: 0 0 14px;
    color: #747987;
    font-size: 14px;
}

.comment-list {
    position: relative;
    display: grid;
    gap: 10px;
    max-height: 250px;
    overflow: auto;
    margin-bottom: 12px;
}

.comment-list.locked-preview {
    max-height: 190px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
    mask-image: linear-gradient(180deg, #000 72%, transparent);
}

.comment-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(23, 25, 35, 0.1);
    border-radius: 16px;
    background: #fbfbf8;
}

.comment-item.is-reply {
    margin-left: 24px;
    border-color: rgba(15, 118, 110, 0.16);
    background: #f8fffc;
}

.comment-item strong {
    display: block;
    font-size: 13px;
}

.comment-item p {
    margin: 4px 0 0;
    color: #4d5562;
}

.comment-images,
.comment-image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.comment-images img,
.comment-image-item img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: #edf1ee;
}

.comment-tools {
    display: flex;
    margin-top: 8px;
}

.comment-tools button,
.comment-image-button,
.profile-admin-actions button {
    border: 1px solid rgba(23, 25, 35, 0.1);
    border-radius: 999px;
    padding: 7px 12px;
    color: #0f766e;
    background: #fff;
    font-size: 12px;
    font-weight: 900;
}

.comment-reply-target {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    font-size: 12px;
    font-weight: 900;
}

.comment-reply-target[hidden] {
    display: none;
}

.comment-image-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-image-item {
    position: relative;
}

.comment-image-item button {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(17, 17, 17, 0.84);
}

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

.comment-lock {
    display: grid;
    gap: 8px;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.92)),
        #fff;
}

.comment-lock[hidden] {
    display: none;
}

.comment-lock strong {
    color: #171923;
}

.comment-lock span {
    color: #747987;
    font-size: 14px;
    line-height: 1.6;
}

.prompt-form-dialog {
    width: min(520px, calc(100% - 28px));
    padding: 28px;
}

.announcement-dialog {
    width: min(760px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    padding: 0;
    overflow: hidden;
}

.announcement-dialog[hidden],
.announcement-dialog:not([open]) {
    display: none;
}

.announcement-dialog-shell {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 14px;
    max-height: calc(100vh - 28px);
    padding: 28px;
}

.announcement-dialog-scroll {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 0;
    overflow: auto;
    padding-right: 6px;
}

.announcement-dialog p {
    margin: 0;
    color: #4d5562;
    line-height: 1.75;
}

.announcement-image-wrap {
    overflow: hidden;
    border-radius: 18px;
    background: #f6f7f5;
}

.announcement-image-wrap[hidden] {
    display: none;
}

.announcement-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(46vh, 460px);
    object-fit: contain;
}

.announcement-skip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: fit-content;
    color: #687180;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.announcement-skip input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: #0f766e;
}

.announcement-skip span {
    display: inline-block;
}

.prompt-form-dialog.wide {
    width: min(760px, calc(100% - 28px));
}

.site-notice-dialog {
    max-height: calc(100vh - 28px);
    padding: 28px;
    overflow: hidden;
}

.avatar-upload-row {
    display: flex;
    justify-content: center;
    padding: 4px 0 8px;
}

.avatar-picker,
.profile-avatar-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.avatar-picker {
    width: 96px;
    height: 96px;
}

.avatar-picker img,
.profile-avatar-button img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f1ed;
    box-shadow: 0 14px 34px rgba(22, 24, 30, 0.16);
}

.avatar-picker span {
    position: absolute;
    inset: auto 7px 7px;
    border-radius: 999px;
    padding: 4px 6px;
    color: #fff;
    background: rgba(17, 17, 17, 0.72);
    font-size: 11px;
    font-weight: 900;
}

.profile-body {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
}

.profile-avatar-button {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
}

.profile-home-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 6px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.profile-mini-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-mini-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(23, 25, 35, 0.1);
    border-radius: 16px;
    padding: 8px;
    color: #171923;
    background: #fbfbf8;
    text-decoration: none;
}

.profile-mini-card img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0f1ed;
}

.profile-mini-card span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.45;
}

.profile-list,
.review-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-list li,
.review-item {
    padding: 10px 12px;
    border: 1px solid rgba(23, 25, 35, 0.1);
    border-radius: 14px;
    background: #fbfbf8;
}

.review-item {
    display: grid;
    gap: 8px;
}

.review-item span {
    color: #747987;
    font-size: 13px;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-admin-body {
    padding: 24px 28px 28px;
}

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

.profile-admin-card {
    display: grid;
    align-content: start;
    gap: 12px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 18px;
    padding: 16px;
    background: #fbfbf8;
}

.profile-admin-card--accent {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(255, 255, 255, 0.92)),
        #fbfbf8;
}

.profile-admin-card--planner {
    background:
        linear-gradient(160deg, rgba(14, 165, 233, 0.08), rgba(15, 118, 110, 0.06) 45%, rgba(255, 255, 255, 0.96)),
        #fbfbf8;
}

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

.profile-admin-stock-card-wrap {
    min-width: 0;
}

.profile-admin-stock-card-wrap .profile-admin-list {
    overflow: visible;
    max-height: none;
}

.profile-admin-card h3 {
    margin: 0;
    color: #171923;
    font-size: 18px;
}

.admin-collapsible-card {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.admin-collapsible-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 66px;
    padding: 18px 22px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.admin-collapsible-summary::-webkit-details-marker {
    display: none;
}

.admin-collapsible-summary h3 {
    margin: 0;
}

.admin-collapsible-summary::after {
    content: "展开";
    flex-shrink: 0;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.admin-collapsible-card[open] .admin-collapsible-summary::after {
    content: "收起";
    background: #171923;
    color: #fff;
}

.admin-collapsible-body {
    display: grid;
    gap: 14px;
    padding: 0 22px 22px;
}

.profile-admin-card textarea,
.profile-admin-card input:not([type="checkbox"]),
.profile-admin-card select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(22, 24, 30, 0.1);
    border-radius: 12px;
    padding: 9px 12px;
    background: #fff;
}

.profile-admin-toggle-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    padding: 2px 2px 0;
}

.profile-admin-toggle-row > .profile-admin-check {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
    margin: 0;
    color: #687180;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.profile-admin-toggle-row > .profile-admin-check input {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    accent-color: #0f766e;
}

.profile-admin-toggle-row > .profile-admin-check span {
    display: inline;
    margin: 0;
    color: #171923;
}

.stack-form label.profile-admin-check {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: fit-content;
    margin: 2px 0 0;
    color: #171923;
}

.stack-form label.profile-admin-check input {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: #0f766e;
}

.stack-form label.profile-admin-check span {
    margin: 0;
    color: #171923;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.profile-admin-list {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
    color: #687180;
}

.profile-admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.profile-admin-link,
.admin-card-output code {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.admin-card-output {
    display: grid;
    gap: 8px;
    max-height: 190px;
    overflow: auto;
}

.admin-card-output code {
    justify-content: flex-start;
    border-radius: 12px;
    word-break: break-all;
    white-space: normal;
}

.admin-campaign-tags-wrap {
    display: grid;
    gap: 10px;
}

.admin-campaign-tags-head {
    color: #687180;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.admin-campaign-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.admin-campaign-chip {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 249, 247, 0.96));
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-campaign-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.admin-campaign-chip__title {
    color: #171923;
    font-size: 14px;
    font-weight: 900;
}

.admin-campaign-chip__meta {
    color: #687180;
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.admin-campaign-chip__status {
    justify-self: start;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
    font-size: 11px;
    font-weight: 900;
}

.admin-campaign-chip__status.is-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.admin-campaign-chip__status.is-expired,
.admin-campaign-chip__status.is-disabled {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}

.admin-stock-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0 10px;
}

.admin-stock-tab {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #475569;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.admin-stock-tab.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.admin-stock-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.admin-stock-section {
    display: grid;
    gap: 14px;
}

.admin-stock-section + .admin-stock-section {
    margin-top: 18px;
}

.admin-stock-section-title {
    color: #171923;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.admin-stock-card {
    flex: 1 1 0;
    min-width: 170px;
    display: grid;
    gap: 14px;
    min-height: 184px;
    padding: 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(244, 114, 182, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 247, 0.92)),
        #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.admin-stock-card--danger {
    border-color: rgba(244, 63, 94, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 239, 242, 0.95)),
        #fff;
}

.admin-stock-card--warning {
    border-color: rgba(251, 146, 60, 0.25);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.95)),
        #fff;
}

.admin-stock-card--healthy {
    border-color: rgba(45, 212, 191, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.95)),
        #fff;
}

.admin-stock-title {
    color: #171923;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
}

.admin-stock-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-stock-metrics div {
    display: grid;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(22, 24, 30, 0.06);
    text-align: center;
}

.admin-stock-metrics span {
    color: #687180;
    font-size: 12px;
    font-weight: 800;
}

.admin-stock-metrics strong {
    color: #171923;
    font-size: 28px;
    line-height: 1;
}

.profile-admin-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
    min-width: 0;
    margin-bottom: 16px;
    overflow: visible;
}

.profile-admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(320px, 1.35fr);
    gap: 12px;
    min-width: 0;
}

.profile-admin-filter-grid > * {
    min-width: 0;
}

.profile-admin-filters select,
.profile-admin-filters input {
    min-height: 42px;
    min-width: 0;
    flex: 1 1 180px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.profile-admin-filters input {
    min-width: 0;
}

.admin-card-key-list {
    gap: 14px;
    max-height: none;
    overflow: visible;
}

.admin-license-table {
    display: grid;
    gap: 14px;
}

.admin-license-head,
.admin-license-row {
    display: grid;
    grid-template-columns: 64px 72px minmax(320px, 2.4fr) 116px 112px 136px 168px 126px 126px 116px 132px 150px;
    align-items: center;
    gap: 16px;
}

.admin-license-head {
    padding: 0 20px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-license-row {
    padding: 18px 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.95)),
        #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.04);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.admin-license-row:hover {
    transform: translateY(-1px);
    border-color: rgba(168, 85, 247, 0.18);
    box-shadow: 0 18px 40px rgba(168, 85, 247, 0.08);
}

.admin-license-row > span {
    min-width: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.admin-license-cell {
    min-width: 0;
}

.admin-license-code {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.04);
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    font-weight: 800;
    word-break: break-all;
}

.admin-license-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(168, 85, 247, 0.16));
    color: #7c3aed;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-license-time {
    color: #6b7280;
}

.admin-license-issue-wrap {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-license-submeta {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.admin-license-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.admin-license-status--unused {
    color: #16a34a;
    background: #dcfce7;
}

.admin-license-status--active {
    color: #2563eb;
    background: #dbeafe;
}

.admin-license-status--expired {
    color: #dc2626;
    background: #fee2e2;
}

.admin-license-status--disabled {
    color: #6b7280;
    background: #f3f4f6;
}

.admin-license-row .profile-inline-delete {
    justify-self: end;
    min-width: 74px;
    min-height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(244, 63, 94, 0.12);
    background: linear-gradient(180deg, #fff1f2, #ffe4e6);
    color: #e11d48;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .profile-admin-filters {
        gap: 12px;
    }

    .profile-admin-filters select,
    .profile-admin-filters input {
        min-width: 0;
    }

    .profile-admin-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-license-head,
    .admin-license-row {
        grid-template-columns: 56px 64px minmax(240px, 2fr) 104px 104px 132px 150px 118px 118px 104px 118px 132px;
        gap: 12px;
    }
}

@media (max-width: 560px) {
    .admin-inventory-overview,
    .admin-inventory-detail-grid,
    .admin-import-category-tabs {
        grid-template-columns: 1fr;
    }

    .admin-plugin-stock-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stock-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(220px, 82vw);
        overflow-x: auto;
        overflow-y: visible;
        padding: 2px 2px 8px;
        scroll-snap-type: x proximity;
    }

    .admin-stock-card {
        min-width: 220px;
        min-height: 0;
        gap: 12px;
        padding: 16px 14px;
        scroll-snap-align: start;
    }

    .admin-stock-title {
        font-size: 16px;
        text-align: left;
    }

    .admin-stock-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .admin-stock-metrics strong {
        font-size: 22px;
    }

    .admin-stock-metrics div {
        padding: 10px 8px;
        text-align: left;
    }

    .admin-stock-metrics span {
        font-size: 11px;
    }

    .admin-license-head {
        display: none;
    }

    .admin-license-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px 14px;
        border-radius: 20px;
    }

    .admin-license-cell {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        justify-self: stretch;
    }

    .admin-license-cell::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.45;
        letter-spacing: 0.01em;
    }

    .admin-license-cell--check {
        grid-template-columns: 76px auto;
        align-items: center;
    }

    .admin-license-cell--code .admin-license-code {
        min-height: 0;
        padding: 10px 12px;
        line-height: 1.45;
        white-space: normal;
    }

    .admin-license-cell--type .admin-license-pill,
    .admin-license-cell--status .admin-license-status {
        justify-self: start;
    }

    .admin-license-cell--actions {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .admin-license-cell--actions .profile-inline-delete,
    .admin-license-cell--actions button {
        justify-self: stretch;
        min-height: 40px;
    }

    .admin-license-cell--actions.profile-admin-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-license-row .profile-inline-delete {
        min-width: 0;
    }

    .admin-license-pagination {
        display: grid;
        gap: 10px;
    }

    .admin-license-pagination button {
        min-height: 42px;
    }

    .profile-admin-filter-grid {
        grid-template-columns: 1fr;
    }

    .profile-admin-actions--toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        padding-bottom: 0;
    }

    .profile-admin-actions--toolbar button {
        width: 100%;
        justify-content: center;
    }
}

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

.profile-admin-row strong {
    color: #171923;
}

.profile-admin-row span {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
}

.profile-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-admin-download-btn {
    margin-left: auto;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 999px;
    background: #171923;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.profile-admin-download-btn:disabled {
    cursor: wait;
    opacity: 0.68;
}

.profile-admin-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 4px;
}

.admin-import-category-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}

.admin-import-category-tabs button {
    min-height: 44px;
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 14px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.admin-import-category-tabs button.active {
    background: #171923;
    border-color: #171923;
    color: #fff;
}

.admin-import-panels {
    display: grid;
    gap: 10px;
}

.admin-import-panel[hidden] {
    display: none;
}

.admin-import-count {
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

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

.admin-inventory-summary-card {
    display: grid;
    gap: 5px;
    min-height: 104px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(22, 24, 30, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.admin-inventory-summary-card span,
.admin-inventory-summary-card small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
}

.admin-inventory-summary-card strong {
    color: #171923;
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
}

.admin-inventory-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.admin-inventory-detail-card {
    display: grid;
    gap: 12px;
    min-height: 118px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(22, 24, 30, 0.07);
    background: #fff;
}

.admin-inventory-detail-card--danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: #fff7f7;
}

.admin-inventory-detail-card--warning {
    border-color: rgba(234, 88, 12, 0.2);
    background: #fffaf3;
}

.admin-inventory-detail-card--healthy {
    border-color: rgba(22, 163, 74, 0.16);
    background: #f7fff9;
}

.admin-inventory-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.admin-inventory-detail-head strong {
    color: #171923;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 900;
}

.admin-inventory-detail-head span {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 11px;
    font-weight: 900;
}

.admin-inventory-detail-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.admin-inventory-detail-metrics div {
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.82);
    text-align: center;
}

.admin-inventory-detail-metrics span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.admin-inventory-detail-metrics b {
    color: #171923;
    font-size: 16px;
    line-height: 1;
    font-weight: 900;
}

.admin-plugin-stock-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.admin-plugin-stock-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 560px) {
    .admin-plugin-stock-grid {
        grid-template-columns: 1fr;
    }

    .admin-plugin-stock-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-admin-actions button.active {
    color: #fff;
    border-color: #0f766e;
    background: #0f766e;
}

.profile-admin-actions button.is-admin {
    background: #064e49;
    border-color: #064e49;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.profile-admin-actions button.danger {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
    background: #fff1f2;
}

.profile-admin-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.admin-card-key-row strong {
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.admin-card-key-status {
    align-self: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-card-key-status.unused {
    color: #16a34a;
    background: #dcfce7;
}

.admin-card-key-status.used {
    color: #9ca3af;
    background: #f3f4f6;
}

.toast {
    position: fixed;
    top: 94px;
    left: 50%;
    z-index: 110;
    padding: 12px 16px;
    border-radius: 16px;
    color: #fff;
    background: rgba(17, 17, 17, 0.94);
    box-shadow: 0 18px 42px rgba(17, 17, 17, 0.2);
    opacity: 0;
    transform: translate(-50%, -12px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.public-profile-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 128px 0 72px;
}

body[data-page="profile"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(241, 247, 243, 0.7)),
        #f7f5ee;
}

.public-profile-hero,
.public-profile-stats,
.public-profile-section {
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 22px 60px rgba(22, 24, 30, 0.08);
}

.public-profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: clamp(22px, 4vw, 42px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 248, 244, 0.9)),
        #fff;
}

.public-profile-avatar {
    width: clamp(86px, 12vw, 132px);
    height: clamp(86px, 12vw, 132px);
    border-radius: 50%;
    object-fit: cover;
    background: #f0f1ed;
    box-shadow: 0 18px 46px rgba(22, 24, 30, 0.14);
}

.public-profile-hero h1 {
    margin: 8px 0 8px;
    color: #171923;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.02;
}

.public-profile-hero p:last-child {
    margin: 0;
    color: #687180;
}

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

.public-profile-stats div {
    display: grid;
    gap: 5px;
    border: 1px solid rgba(22, 24, 30, 0.06);
    border-radius: 18px;
    padding: 16px;
    background: #fbfbf8;
}

.public-profile-stats strong {
    color: #0f766e;
    font-size: 28px;
    line-height: 1;
}

.public-profile-stats span {
    color: #687180;
    font-size: 13px;
    font-weight: 900;
}

.public-profile-section {
    margin-top: 18px;
    padding: clamp(18px, 3vw, 28px);
}

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

.public-profile-section h2 {
    margin: 0;
    color: #171923;
    font-size: clamp(22px, 3vw, 32px);
}

.public-profile-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.public-profile-card,
.public-profile-comment,
.public-profile-empty {
    border: 1px solid rgba(22, 24, 30, 0.08);
    border-radius: 18px;
    background: #fbfbf8;
}

.public-profile-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    color: #171923;
    text-decoration: none;
}

.public-profile-card-media {
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 14px;
    background: #eef1ed;
}

.public-profile-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-profile-card strong {
    display: -webkit-box;
    margin: 6px 0 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.45;
}

.public-profile-card span,
.public-profile-comment p,
.public-profile-empty {
    color: #687180;
}

.public-profile-comments {
    display: grid;
    gap: 12px;
}

.public-profile-comment,
.public-profile-empty {
    padding: 14px;
}

.public-profile-comment strong {
    color: #171923;
}

.public-profile-comment p {
    margin: 8px 0 0;
    line-height: 1.7;
}

@media (max-width: 1180px) {
    .prompt-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .prompt-toolbar,
    .detail-layout,
    .prompt-preview-block {
        grid-template-columns: 1fr;
    }

    .prompt-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .prompt-page-hero {
        grid-template-columns: 1fr;
    }

    .prompt-page-hero-actions {
        justify-content: flex-start;
    }

    .public-profile-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .prompt-page-main {
        width: auto;
        max-width: 1480px;
        margin-left: 10px;
        margin-right: 10px;
        padding-top: 108px;
    }

    .prompt-page-hero {
        padding: 22px;
    }

    .prompt-page-hero h1 {
        font-size: clamp(34px, 12vw, 48px);
    }

    .prompt-page-hero-actions {
        display: flex;
        width: auto;
    }

    .prompt-page-hero-actions .prompt-solid-btn,
    .prompt-page-hero-actions .prompt-ghost-btn {
        width: auto;
    }

    .prompt-window {
        inset: 72px 0 0;
    }

    .prompt-window-panel {
        border-radius: 0;
    }

    .prompt-window-top {
        grid-template-columns: 1fr auto;
    }

    .prompt-shell,
    .prompt-toolbar,
    .prompt-card {
        border-radius: 22px;
    }

    .prompt-shell,
    .prompt-toolbar,
    .prompt-card {
        padding: 16px;
    }

    .prompt-card--expanded {
        padding: 0;
    }

    .prompt-window-actions {
        padding: 12px;
    }

    .prompt-mini-stats {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .prompt-mini-stat {
        width: 100%;
    }

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

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

    .detail-layout,
    .prompt-form-dialog {
        padding: 18px;
        border-radius: 22px;
    }

    .profile-mini-card-grid,
    .public-profile-card-grid,
    .public-profile-stats {
        grid-template-columns: 1fr;
    }

    .public-profile-hero,
    .public-profile-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    #header-actions > #site-auth-container,
    #site-auth-button,
    #site-profile-button {
        display: none !important;
    }

    #header-actions > .site-auth-btn {
        display: inline-flex;
    }

    .site-auth-btn {
        min-height: 36px;
        padding: 7px 12px;
        font-size: 12px;
    }

    .site-account-avatar {
        min-height: 40px;
        padding: 5px 9px 5px 5px;
    }

    .site-account-avatar img {
        width: 30px;
        height: 30px;
    }

    .site-account-avatar span {
        max-width: 72px;
        font-size: 12px;
    }
}

/* 2026-04-27 prompt center layout refresh */
body.detail-dialog-open {
    overflow: hidden;
}

.prompt-page-main {
    width: min(1920px, calc(100vw - 28px));
    padding: 120px 0 88px;
}

.prompt-page-shell {
    border-radius: 32px;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 249, 245, 0.88)),
        #fff;
}

.prompt-toolbar {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 22px;
}

.prompt-grid,
.prompt-page-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    padding: 6px 6px 18px;
}

.prompt-card {
    padding: 16px;
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(22, 24, 30, 0.1);
    contain-intrinsic-size: 450px 360px;
}

.card-media {
    aspect-ratio: 4 / 5.05;
    border-radius: 22px;
}

.card-summary h2,
.prompt-card--preview h2 {
    min-height: 52px;
    margin: 12px 0 10px;
    font-size: 17px;
    line-height: 1.42;
}

.prompt-card-excerpt {
    min-height: 42px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.62;
}

.author-row {
    margin: 14px 0 14px;
}

.card-actions {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 8px;
}

.card-actions button,
.review-actions button {
    min-height: 40px;
    border: 1px solid rgba(23, 25, 35, 0.08);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(22, 24, 30, 0.06);
    font-size: 12px;
}

.card-actions button:hover,
.review-actions button:hover {
    transform: translateY(-1px);
}

.card-actions button.is-accent {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.16);
    background: rgba(15, 118, 110, 0.08);
}

.card-actions button.is-accent:hover {
    color: #fff;
    border-color: #0f766e;
    background: #0f766e;
}

.card-actions button.danger {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.18);
    background: #fff1f2;
}

.card-actions button.danger:hover {
    color: #fff;
    border-color: #dc2626;
    background: #dc2626;
}

.prompt-page-detail {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: block;
    padding: clamp(92px, 6vw, 126px) clamp(18px, 3vw, 40px) clamp(18px, 4vw, 32px);
    background: rgba(247, 247, 244, 0.56);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.prompt-page-detail[hidden] {
    display: none !important;
}

.prompt-page-detail.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.prompt-page-detail .detail-layout {
    width: min(1480px, calc(100vw - 64px));
    min-height: calc(100dvh - 144px);
    max-height: calc(100dvh - 144px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 36px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 244, 0.96));
    box-shadow: 0 32px 90px rgba(22, 24, 30, 0.18);
    margin: 0 auto;
}

.detail-layout {
    grid-template-columns: minmax(420px, 0.98fr) minmax(0, 1.02fr);
    gap: 28px;
    padding: 28px;
    align-items: stretch;
}

.prompt-page-detail-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(22, 24, 30, 0.14);
}

.detail-media,
.detail-copy {
    min-height: 0;
}

.detail-media {
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    padding-right: 4px;
    overflow: hidden;
}

.detail-copy {
    min-height: 0;
    height: calc(100dvh - 200px);
    max-height: calc(100dvh - 200px);
    padding: 10px 12px 10px 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.detail-thumbs {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

#detail-prompt {
    max-height: none;
    margin: 18px 0 16px;
    overflow: visible;
}

.comment-list {
    max-height: 280px;
}

@media (max-width: 1520px) {
    .prompt-grid,
    .prompt-page-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .prompt-grid,
    .prompt-page-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .prompt-page-main {
        width: min(1600px, calc(100vw - 24px));
    }
}

@media (max-width: 900px) {
    .prompt-page-main {
        width: auto;
        margin-left: 10px;
        margin-right: 10px;
    }

    .prompt-grid,
    .prompt-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prompt-page-detail {
        padding: 84px 12px 14px;
    }

    .prompt-page-detail .detail-layout {
        width: 100%;
        border-radius: 26px;
        min-height: auto;
        max-height: none;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
    }

    .detail-media {
        height: auto;
        overflow: visible;
        padding-right: 0;
    }

    .detail-copy {
        height: auto;
        max-height: none;
        padding: 0 2px 2px;
        overflow: visible;
    }

    #detail-main-image {
        height: auto;
        max-height: 38vh;
    }

    .detail-media-stage {
        min-height: auto;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 560px) {
    .prompt-page-main {
        padding-top: 104px;
    }

    .prompt-grid,
    .prompt-page-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prompt-page-detail {
        padding: 78px 8px 8px;
    }

    .prompt-page-detail .detail-layout {
        border-radius: 22px;
    }

    .detail-layout {
        padding: 18px;
    }

    .prompt-page-detail-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

/* 2026-04-27 prompt/mobile polish */
.image-viewer {
    --viewer-padding: clamp(16px, 4vw, 54px);
    box-sizing: border-box;
    padding: var(--viewer-padding);
    overflow: auto;
}

.image-viewer img {
    width: auto;
    height: auto;
    max-width: calc(100vw - (var(--viewer-padding) * 2));
    max-height: calc(100dvh - (var(--viewer-padding) * 2));
}

.detail-thumbs {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 1px 4px;
    scrollbar-width: none;
}

.detail-thumbs::-webkit-scrollbar {
    display: none;
}

.detail-thumbs[hidden] {
    display: none !important;
}

.detail-thumbs button {
    flex: 0 0 74px;
    width: 74px;
}

.prompt-page-detail {
    overflow: auto;
}

@media (max-width: 1024px) {
    .prompt-page-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .prompt-toolbar,
    .prompt-preview-block,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .prompt-page-detail .detail-layout {
        min-height: auto;
        max-height: none;
    }

    .prompt-page-hero-actions {
        width: min(100%, 520px);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 6px;
    }

    .prompt-page-hero-actions > * {
        flex: 1 1 220px;
    }

    .prompt-mini-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .prompt-mini-stat {
        min-height: 78px;
        padding: 14px 16px;
    }
}

@media (max-width: 767px) {
    .prompt-page-main {
        width: auto;
        margin: 0 10px;
        padding: 96px 0 48px;
    }

    .prompt-page-hero {
        margin-bottom: 14px;
        padding: 22px 18px;
    }

    .prompt-page-hero h1 {
        font-size: clamp(2.35rem, 13vw, 3.4rem);
        line-height: 1.02;
    }

    .prompt-page-hero p:last-child {
        font-size: 14px;
        line-height: 1.75;
    }

    .prompt-page-hero-actions {
        width: 100%;
    }

    .prompt-page-shell {
        padding: 14px;
        border-radius: 24px;
    }

    .prompt-window-actions {
        padding: 12px;
    }

    .prompt-toolbar {
        gap: 14px;
        padding: 14px;
    }

    .prompt-channel-filter,
    .tag-filter {
        gap: 8px;
    }

    .tag-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .tag-filter::-webkit-scrollbar {
        display: none;
    }

    .prompt-channel-filter button,
    .tag-filter button,
    .pill {
        padding: 8px 12px;
        font-size: 12px;
    }

    .prompt-grid,
    .prompt-page-grid {
        gap: 14px;
        padding: 0 0 8px;
    }

    .prompt-card {
        padding: 14px;
        border-radius: 24px;
    }

    .card-summary h2,
    .prompt-card--preview h2 {
        min-height: 0;
        font-size: 16px;
    }

    .detail-layout,
    .prompt-form-dialog {
        padding: 18px 16px;
        border-radius: 24px;
    }

    .prompt-page-detail {
        padding: 74px 8px 10px;
    }

    .prompt-page-detail .detail-layout {
        width: calc(100vw - 16px);
        max-height: none;
        min-height: auto;
    }

    .detail-layout {
        gap: 16px;
    }

    .detail-media {
        height: auto;
        overflow: visible;
        padding-right: 0;
    }

    .detail-copy {
        height: auto;
        max-height: none;
        padding: 0;
        overflow: visible;
    }

    .detail-topline {
        margin-right: 34px;
        font-size: 12px;
    }

    .detail-copy h2,
    .prompt-form-dialog h2 {
        margin-top: 0;
        font-size: clamp(22px, 7vw, 30px);
    }

    #detail-main-image {
        height: auto;
        max-height: min(42vh, 480px);
        border-radius: 18px;
    }

    .detail-media-stage {
        min-height: auto;
        max-height: none;
        border-radius: 18px;
        overflow: visible;
    }

    .detail-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .detail-nav-btn--prev {
        left: 10px;
    }

    .detail-nav-btn--next {
        right: 10px;
    }

    .comment-item {
        grid-template-columns: 30px minmax(0, 1fr);
        padding: 10px;
    }

    .comment-item.is-reply {
        margin-left: 0;
    }

    .comments h3 {
        font-size: 18px;
    }

    .prompt-preview-block {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .prompt-card--preview {
        max-width: none;
        width: 100%;
    }

    .announcement-dialog {
        width: min(720px, calc(100vw - 20px));
    }

    .announcement-dialog-shell,
    .site-notice-dialog {
        padding: 20px;
    }

    .announcement-image-wrap img {
        max-height: min(34vh, 300px);
    }

    body.sidebar-open .prompt-page-hero-actions {
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
    }
}

@media (max-width: 560px) {
    .prompt-page-main {
        margin: 0 8px;
        padding-top: 92px;
    }

    .prompt-mini-stats {
        grid-template-columns: 1fr;
    }

    .prompt-page-hero-actions {
        flex-direction: column;
    }

    .prompt-page-hero-actions > * {
        flex: 0 0 auto;
    }

    .prompt-page-shell {
        padding: 12px;
    }

    .prompt-window-actions,
    .prompt-toolbar {
        border-radius: 18px;
    }

    .detail-thumbs button {
        flex-basis: 68px;
        width: 68px;
    }

    .image-viewer {
        --viewer-padding: 12px;
    }
}
