/* 米米小作坊 — 黄绿蓝渐变主题 */
.ws-page {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

.ws-page::before {
    content: "";
    position: absolute;
    inset: -20px -10px auto;
    height: 280px;
    background:
        radial-gradient(ellipse 60% 80% at 10% 0%, rgba(255, 213, 79, 0.35), transparent),
        radial-gradient(ellipse 50% 70% at 90% 20%, rgba(100, 181, 246, 0.3), transparent);
    pointer-events: none;
    z-index: 0;
}

.ws-page > * {
    position: relative;
    z-index: 1;
}

/* 精品推荐区 */
.ws-featured-section {
    margin-bottom: 24px;
}

.ws-featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 2px;
    position: relative;
    z-index: 10;
}

.ws-page-top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    position: relative;
    z-index: 20;
}

.ws-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 21;
    pointer-events: auto;
}

.ws-page-actions button {
    pointer-events: auto;
    position: relative;
    z-index: 22;
}

.ws-featured-header-left {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.ws-featured-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.03em;
}

.ws-featured-hint {
    font-size: 12px;
    color: #5a7a8a;
    font-weight: 500;
}


.ws-toolbar-btn {
    padding: 7px 16px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
}

.ws-notice-wrap {
    width: 100%;
    margin: 0 auto 6px;
}

.ws-notice-card {
    display: block;
    position: relative;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 26px;
    overflow: hidden;
    cursor: pointer;
    min-height: 200px;
    background: linear-gradient(145deg, #fff8e1, #e8f5e9, #e3f2fd);
    box-shadow:
        0 16px 48px rgba(66, 165, 245, 0.14),
        0 4px 16px rgba(255, 213, 79, 0.12);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.ws-notice-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 24px 56px rgba(66, 165, 245, 0.2),
        0 8px 24px rgba(255, 213, 79, 0.15);
}

.ws-notice-card.ws-notice-has-img {
    min-height: 0;
    aspect-ratio: 21 / 9;
    max-height: 320px;
}

.ws-notice-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: linear-gradient(145deg, #fff8e1, #e3f2fd);
}

.ws-notice-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(to top, rgba(20, 35, 50, 0.78) 0%, rgba(20, 35, 50, 0.35) 55%, transparent 100%);
    z-index: 2;
}

.ws-notice-card:not(.ws-notice-has-img) .ws-notice-overlay {
    position: relative;
    background: transparent;
    color: #1a3a4a;
    min-height: 160px;
    justify-content: center;
}

.ws-notice-card:not(.ws-notice-has-img) .ws-notice-name,
.ws-notice-card:not(.ws-notice-has-img) .ws-notice-desc {
    color: #1a3a4a;
}

.ws-notice-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffe082, #ffcc80);
    color: #bf360c;
    width: fit-content;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ws-notice-name {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ws-notice-desc {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ws-notice-cta {
    display: inline-block;
    width: fit-content;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #1a5270;
    background: var(--gradient-brand);
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ws-notice-card:not(.ws-notice-has-img) .ws-notice-cta {
    color: #1a5270;
}

.ws-notice-card.ws-notice-empty .ws-notice-cta {
    display: none;
}

.ws-carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.ws-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(90, 122, 138, 0.35);
    transition: transform 0.2s, background 0.2s, width 0.2s;
}

.ws-carousel-dot.active {
    width: 22px;
    border-radius: 999px;
    background: var(--gradient-brand);
    transform: none;
}

/* 分类与商品 */
.ws-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.ws-cat-side {
    background: var(--glass);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 10px 32px rgba(66, 165, 245, 0.1);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 72px;
}

.ws-cat-side-title {
    display: block;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
    border-image: var(--gradient-brand) 1;
}

.ws-cat-tree { font-size: 13px; }

.ws-cat-item {
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.15s, color 0.15s;
}

.ws-cat-item:hover { background: rgba(227, 242, 253, 0.6); }

.ws-cat-item.active {
    background: var(--gradient-brand-soft);
    color: #1a5270;
    font-weight: bold;
}

.ws-cat-major {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 2px;
    user-select: none;
    transition: background 0.15s;
}

.ws-cat-major:hover { background: rgba(255, 248, 225, 0.7); }

.ws-cat-major.active {
    background: var(--gradient-brand-soft);
    font-weight: bold;
    color: #1a5270;
}

.ws-cat-arrow {
    font-size: 10px;
    color: #7a9aab;
    transition: transform 0.2s;
    margin-left: 6px;
}

.ws-cat-arrow.open { transform: rotate(180deg); }

.ws-cat-subs {
    margin: 0 0 6px 8px;
    padding-left: 10px;
    border-left: 2px solid;
    border-image: linear-gradient(180deg, var(--yellow), var(--green), var(--blue)) 1;
}

.ws-cat-sub {
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.15s;
}

.ws-cat-sub:hover { background: rgba(232, 245, 233, 0.8); }

.ws-cat-sub.active {
    background: var(--gradient-brand-soft);
    color: #1a5270;
    font-weight: bold;
}

.ws-main-col { min-width: 0; }

.ws-group-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.ws-group-tab {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.85);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    color: #4a5f6a;
}

.ws-group-tab:hover {
    border-color: rgba(100, 181, 246, 0.5);
    box-shadow: 0 4px 14px rgba(100, 181, 246, 0.12);
}

.ws-group-tab.active {
    background: var(--gradient-brand);
    border-color: transparent;
    color: #1a3a4a;
    font-weight: bold;
    box-shadow: 0 6px 18px rgba(66, 165, 245, 0.22);
}

.ws-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 18px;
    padding-bottom: 40px;
}

.ws-product-card {
    background: var(--glass);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(66, 165, 245, 0.1);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
    position: relative;
}

.ws-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(100, 181, 246, 0.2);
}

.ws-product-card.grayed {
    opacity: 0.45;
    filter: grayscale(0.8);
}

.ws-product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(145deg, #fff8e1, #e8f5e9, #e3f2fd);
}

.ws-product-body { padding: 12px; }

.ws-product-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a3a4a;
}

.ws-product-meta { font-size: 12px; color: #6a8a9a; }

.ws-want-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
    backdrop-filter: blur(6px);
}

.ws-disclaimer-body {
    max-height: 50vh;
    overflow-y: auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.7;
    margin: 12px 0;
}

.ws-disclaimer-hint { font-size: 12px; color: #6a8a9a; text-align: center; }
.ws-disclaimer-hint.ready { color: #1a5270; font-weight: bold; }

.ws-form-step { display: none; }
.ws-form-step.active { display: block; }
.ws-field-error { border-color: var(--danger) !important; background: #fff5f5 !important; }
.ws-error-msg { color: var(--danger); font-size: 11px; margin-top: 2px; }

.ws-expire-hint {
    background: linear-gradient(90deg, #e3f2fd, #e8f5e9);
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    margin: 8px 0;
}

.ws-qa-block {
    background: var(--gradient-brand-soft);
    padding: 12px;
    border-radius: 12px;
    margin-top: 10px;
}

.ws-qa-hint { font-size: 11px; color: #5a7a8a; margin-bottom: 6px; }

.ws-detail-img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 12px;
    background: linear-gradient(145deg, #fff8e1, #e3f2fd);
}

.ws-related-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 6px;
}

.ws-related-item {
    flex: 0 0 72px;
    text-align: center;
    cursor: pointer;
    font-size: 10px;
}

.ws-related-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.ws-admin-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(100, 181, 246, 0.3);
}

.ws-admin-hint {
    font-size: 12px;
    color: #5a7a8a;
    line-height: 1.5;
    margin: 4px 0 10px;
}

.ws-carousel-split-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--gradient-brand-soft);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.ws-carousel-split-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1a5270;
}

.ws-carousel-split-label select {
    width: auto;
    min-width: 64px;
    margin: 0;
    padding: 8px 12px;
}

.ws-carousel-split-want {
    font-size: 13px;
    color: #5a7a8a;
    font-weight: 600;
}

.ws-admin-carousel-subtitle {
    display: block;
    font-size: 12px;
    color: #1a5270;
    margin-bottom: 8px;
}

.ws-admin-carousel-panel {
    margin-top: 8px;
}

.ws-admin-carousel-add {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: stretch;
}

.ws-admin-carousel-add input[type="text"] {
    flex: 1;
    margin: 0;
    min-width: 0;
}

.ws-admin-carousel-add select {
    flex: 1;
    margin: 0;
}

.ws-product-code {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(26, 58, 74, 0.82);
    color: #ffe082;
    letter-spacing: 0.04em;
    font-family: ui-monospace, monospace;
}

.ws-leader-apply-status {
    margin-bottom: 12px;
}

.ws-apply-status {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    background: var(--gradient-brand-soft);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.ws-apply-status--pending {
    background: rgba(255, 248, 225, 0.5);
    border-color: rgba(255, 204, 128, 0.5);
}

.ws-apply-status--ok {
    background: rgba(232, 245, 233, 0.5);
    border-color: #a5d6a7;
}

.ws-admin-demo-bar {
    background: rgba(227, 242, 253, 0.5);
    border-radius: 14px;
    padding: 12px !important;
}

.ws-admin-carousel-add button {
    flex-shrink: 0;
    margin: 0;
    padding: 10px 16px !important;
}

.ws-admin-carousel-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(227, 242, 253, 0.9);
    font-size: 12px;
}

.ws-admin-carousel-idx {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #1a3a4a;
    font-weight: bold;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ws-admin-carousel-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-admin-carousel-want {
    flex-shrink: 0;
    color: #e65100;
    font-weight: 600;
}

.ws-admin-carousel-slot-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ws-admin-carousel-slot-actions button {
    padding: 4px 8px !important;
    font-size: 11px !important;
    margin: 0 !important;
}

.ws-admin-carousel-empty {
    font-size: 12px;
    color: #8a9aa8;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.ws-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(227, 242, 253, 0.8);
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.workshop-page { display: none; min-height: 100vh; }
.workshop-page.active { display: block; }

@media (max-width: 768px) {
    .ws-layout { grid-template-columns: 1fr; }
    .ws-cat-side { position: static; }
    .ws-featured-header { align-items: flex-start; }
    .ws-page-actions { width: 100%; }
    .ws-notice-card.ws-notice-has-img {
        aspect-ratio: 16 / 10;
        max-height: 220px;
    }
    .ws-notice-overlay { padding: 14px 16px; }
    .ws-notice-name { font-size: 18px; }
    .ws-notice-desc { font-size: 13px; }
    .ws-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.modal-dialog-wrap {
    position: relative;
    width: 95%;
    max-width: 560px;
    max-height: 90vh;
    margin: 0 auto;
}

.modal-close-fab {
    position: fixed;
    top: max(16px, env(safe-area-inset-top, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    z-index: 10002;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: var(--glass);
    color: #333;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(66, 165, 245, 0.2);
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(10px);
}

.modal-close-fab:hover {
    background: rgba(255, 245, 245, 0.6);
    color: var(--danger);
    border-color: rgba(255, 201, 201, 0.5);
}

.modal-admin-scroll {
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
}

/* ── 免责声明排版 ── */
.disclaimer-doc {
    font-size: 13.5px;
    line-height: 1.8;
    color: #333;
}
.disclaimer-doc h3 {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.disclaimer-basis {
    text-indent: 2em;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0e0e0;
    color: #555;
}
.disclaimer-section {
    margin: 14px 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    border-left: 3px solid #64b5f6;
}
.disclaimer-section h4 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1565c0;
}
.disclaimer-section ol {
    margin: 0;
    padding-left: 20px;
}
.disclaimer-section ol li {
    margin-bottom: 6px;
    color: #444;
}
.disclaimer-section ol li strong {
    color: #c62828;
}
.disclaimer-notice {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(255, 248, 225, 0.45);
    border-radius: 8px;
    border: 1px solid rgba(255, 224, 130, 0.4);
}
.disclaimer-notice p {
    margin: 0;
    color: #e65100;
    font-size: 13px;
}
