
/* Publish Index styling (partitioned sections and tips) */
.publish-species-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px 16px 8px;
}
.publish-species-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 24px;
    background: var(--weui-BG-2);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    text-decoration: none;
    transition: transform 300ms cubic-bezier(.25,.46,.45,.94),
                box-shadow 300ms cubic-bezier(.25,.46,.45,.94);
    overflow: hidden;
}
.publish-species-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--weui-BRAND);
    opacity: 0;
    transition: opacity 300ms ease;
}
.publish-species-card:active {
    transform: scale(.97);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
}
.publish-species-card:active::before { opacity: 1; }
.publish-species-card__emoji {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
    transition: transform 300ms cubic-bezier(.25,.46,.45,.94);
}
.publish-species-card:active .publish-species-card__emoji { transform: scale(1.1); }
.publish-species-card__label { font-size: 16px; font-weight: 500; color: var(--weui-FG-0); margin: 0; }

/* Tips section */
.publish-tips-panel { margin: 8px 16px 0; background: var(--weui-BG-2); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.publish-tips-panel .weui-cells__title { padding: 20px 20px 0; margin: 0; font-size: 14px; font-weight: 600; color: var(--weui-FG-1); letter-spacing: .3px; }
.publish-tips-list { padding: 12px 20px 20px; }
.publish-tip-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.publish-tip-item + .publish-tip-item { border-top: 1px solid var(--weui-FG-3); }
.publish-tip-num { flex-shrink: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 9999px; background: var(--weui-BRAND); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.publish-tip-text { font-size: 15px; color: var(--weui-FG-0); line-height: 1.6; margin: 0; padding-top: 1px; }

/* Bottom CTA area */
.publish-bottom-cta { padding: 32px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.publish-bottom-cta .weui-btn.weui-btn_default { border-radius: 12px; font-size: 16px; font-weight: 500; letter-spacing: .3px; padding: 12px 0; transition: opacity 150ms ease; }
.publish-bottom-cta .weui-btn.weui-btn_default:active { opacity: .7; }

/* Entrance animation */
@keyframes publishFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.publish-species-grid, .publish-tips-panel, .publish-bottom-cta { animation: publishFadeUp 500ms cubic-bezier(.25,.46,.45,.94) both; }
.publish-tips-panel { animation-delay: 80ms; }
.publish-bottom-cta { animation-delay: 160ms; }

/* Publish Form styling (partitioned sections, step indicators, uploader visuals) */
.publish-form-page { padding-bottom: 40px; }
.publish-form-page .wxc-page-main { padding: 0 var(--weui-spacing-md) var(--weui-spacing-xl); }
.publish-progress { display: flex; align-items: center; justify-content: center; gap: 0; padding: var(--weui-spacing-lg) var(--weui-spacing-md) var(--weui-spacing-sm); }
.publish-progress__step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.publish-progress__dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--weui-FG-3); transition: background var(--wxc-duration-normal) var(--wxc-ease-out), transform var(--wxc-duration-normal) var(--wxc-ease-spring); }
.publish-progress__step.is-active .publish-progress__dot { background: var(--weui-BRAND); transform: scale(1.35); box-shadow: 0 0 0 4px rgba(7, 193, 96, 0.12); }
.wxc-page.dog .publish-progress__step.is-active .publish-progress__dot { background: var(--weui-ORANGE); box-shadow: 0 0 0 4px rgba(230, 138, 0, 0.12); }
.publish-progress__step.is-done .publish-progress__dot { background: var(--weui-BRAND); opacity: 0.45; }
.wxc-page.dog .publish-progress__step.is-done .publish-progress__dot { background: var(--weui-ORANGE); }
.publish-progress__label { font-size: 11px; color: var(--weui-FG-2); margin-top: 6px; letter-spacing: 0.01em; white-space: normal; transition: color var(--wxc-duration-normal) var(--wxc-ease-out); }
.publish-progress__step.is-active .publish-progress__label { color: var(--weui-FG-0); font-weight: 500; }
.publish-progress__line { flex: 1; height: 1.5px; background: var(--weui-FG-3); margin: 0 -4px; margin-bottom: 20px; opacity: 0.5; }
.wxc-page.dog .publish-progress__step.is-active .publish-progress__line { background: var(--weui-ORANGE); }
.publish-form-page .form-section { background: var(--weui-BG-2); border-radius: var(--wxc-radius-lg); margin-bottom: var(--weui-spacing-md); padding: var(--weui-spacing-sm) 0 0; box-shadow: var(--wxc-shadow-sm); overflow: hidden; opacity: 0; transform: translateY(12px); animation: publishSectionIn var(--wxc-duration-slow) var(--wxc-ease-out) forwards; }
.publish-form-page .form-section:nth-child(1) { animation-delay: 0ms; }
.publish-form-page .form-section:nth-child(2) { animation-delay: 80ms; }
.publish-form-page .form-section:nth-child(3) { animation-delay: 160ms; }
.publish-form-page .form-section:nth-child(4) { animation-delay: 240ms; }
@keyframes publishSectionIn { to { opacity: 1; transform: translateY(0); } }
.publish-form-page .form-section .weui-cells { margin-top: 0; background: transparent; }
.publish-form-page .form-section .weui-cells::before, .publish-form-page .form-section .weui-cells::after { display: none; }
.publish-form-page .weui-input:focus { border-bottom: 1.5px solid var(--weui-BRAND); transition: border-color var(--wxc-duration-fast) var(--wxc-ease-out); }
.wxc-page.dog .publish-form-page .weui-input:focus { border-bottom-color: var(--weui-ORANGE); }
.publish-form-page .weui-textarea:focus { outline: none; box-shadow: inset 0 -1.5px 0 var(--weui-BRAND); }
.wxc-page.dog .publish-form-page .weui-textarea:focus { box-shadow: inset 0 -1.5px 0 var(--weui-ORANGE); }
.publish-form-page .weui-btn-area { padding: var(--weui-spacing-xl) 0 var(--weui-spacing-lg); text-align: center; }
.publish-form-page .weui-btn.weui-btn_primary { border-radius: var(--wxc-radius-lg); font-size: 17px; font-weight: 600; letter-spacing: 0.04em; padding: 14px 0; box-shadow: var(--wxc-shadow-brand); transition: transform var(--wxc-duration-fast) var(--wxc-ease-spring),
                box-shadow var(--wxc-duration-normal) var(--wxc-ease-out); }
.publish-form-page .weui-btn.weui-btn_primary:active { transform: scale(0.97); }
.publish-form-page .submit-hint { font-size: 13px; color: var(--weui-FG-2); margin-top: var(--weui-spacing-sm); letter-spacing: 0.01em; }
.publish-form-page .submit-boundary { font-size: 12px; color: var(--weui-FG-2); margin-top: 6px; line-height: 1.6; }
.publish-safe-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--weui-FG-2); margin-top: var(--weui-spacing-xs); }
.publish-safe-badge svg { width: 14px; height: 14px; fill: var(--weui-BRAND); opacity: 0.7; }
.wxc-page.dog .publish-safe-badge svg { fill: var(--weui-ORANGE); }
.publish-form-page .faq-section { border-radius: var(--wxc-radius-lg); box-shadow: var(--wxc-shadow-sm); margin-bottom: var(--weui-spacing-md); animation-delay: 320ms; }
.publish-form-page .photo-add-box { border-radius: var(--wxc-radius-md); border-color: var(--weui-FG-3); transition: border-color var(--wxc-duration-normal) var(--wxc-ease-out), background var(--wxc-duration-normal) var(--wxc-ease-out), transform var(--wxc-duration-fast) var(--wxc-ease-spring); }
.publish-form-page .photo-add-box:active { transform: scale(0.96); }
.publish-form-page .photo-item { position: relative; width: calc(33.333% - 8px); min-width: 88px; }
.publish-form-page .photo-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: var(--weui-BG-1); }
.publish-form-page .photo-delete { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.publish-form-page .photo-delete svg { width: 14px; height: 14px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .publish-form-page .form-section { animation: none; opacity: 1; transform: none; } .publish-form-page .weui-btn.weui-btn_primary:active { transform: none; } }
/* Publish Form Header · Jony Ive Aesthetic (moved from PHP inline) */
.form-header.wxc-page-header {
    position: relative;
    padding: 48px 24px 40px;
    text-align: center;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(160deg,
        var(--weui-BRAND) 0%,
        color-mix(in srgb, var(--weui-BRAND) 78%, #000) 100%);
}

/* Ambient glow — soft depth cue */
.form-header.wxc-page-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Override bg-shapes for subtler geometry */
.form-header .wxc-page-header__bg-shapes {
    opacity: 0.06;
}

.form-header .wxc-page-header__shape--1 {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -40px;
    background: var(--weui-WHITE);
    filter: blur(2px);
}

.form-header .wxc-page-header__shape--2 {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: -20px;
    background: var(--weui-WHITE);
    filter: blur(1px);
}

/* Icon — frosted glass pill */
.form-header .wxc-page-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 32px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0,0,0,.06),
                inset 0 1px 0 rgba(255,255,255,.2);
    animation: formHeaderIconIn 500ms cubic-bezier(.22,1,.36,1) both;
}

/* Title — clean, confident */
.form-header.wxc-page-header__title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    animation: formHeaderFadeUp 500ms 80ms cubic-bezier(.22,1,.36,1) both;
}

/* Subtitle — whisper-light */
.form-header.wxc-page-header__desc {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,.72);
    margin: 0;
    letter-spacing: 0.01em;
    animation: formHeaderFadeUp 500ms 160ms cubic-bezier(.22,1,.36,1) both;
}

/* Dog species override — warm amber gradient */
.wxc-page.dog .form-header.wxc-page-header {
    background: linear-gradient(160deg,
        var(--weui-ORANGE) 0%,
        color-mix(in srgb, var(--weui-ORANGE) 75%, #5a3000) 100%);
}

/* Entrance animations */
@keyframes formHeaderIconIn {
    from { opacity: 0; transform: scale(.7) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes formHeaderFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
