* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #dfe7f3;
}

.h5-page {
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    background: #f7f9fc;
}

.event-hero {
    position: relative;
    height: auto;
    aspect-ratio: 750 / 420;
    overflow: hidden;
    color: #fff;
    background: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.hero-carousel,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity .5s ease;
}

.hero-slide.active,
.hero-slide:first-child {
    opacity: 1;
}

.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 58%, rgba(15, 23, 42, .16) 100%);
}

.hero-fallback {
    position: relative;
    height: 100%;
    padding-top: 58px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 78% 24%, rgba(45, 212, 191, .36), transparent 28%),
        linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
}

.hero-fallback::before {
    position: absolute;
    right: -70px;
    bottom: 34px;
    left: -70px;
    height: 108px;
    content: "";
    border-top: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    transform: rotate(-4deg);
}

.hero-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0;
}

.hero-subtitle {
    margin-top: 8px;
    font-size: 15px;
    opacity: .9;
}

.hero-rings {
    position: absolute;
    right: 58px;
    bottom: 48px;
    left: 58px;
    height: 72px;
}

.hero-rings span {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
}

.hero-rings span:nth-child(2) {
    inset: 22px 56px;
}

.hero-rings span:nth-child(3) {
    inset: 31px 98px;
    background: rgba(255, 255, 255, .12);
}

.hero-overlay {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 2;
}

.hero-overlay.image-only {
    right: auto;
    bottom: 12px;
    left: 16px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    color: #1d4ed8;
    background: rgba(255, 255, 255, .9);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-overlay h1 {
    margin: 12px 0 0;
    font-size: 27px;
    line-height: 1.22;
}

.hero-overlay p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .88);
    line-height: 1.55;
}

.signup-countdown {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    margin: -22px -16px 16px;
    color: #fff;
    background: #2497dc;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .18);
}

.signup-countdown > div {
    padding: 13px 14px;
}

.signup-countdown > div + div {
    text-align: right;
    background: #1d8bd2;
}

.signup-countdown strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    opacity: .95;
}

.signup-countdown span {
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

.carousel-dots {
    position: absolute;
    right: 18px;
    bottom: 16px;
    z-index: 3;
    display: flex;
    gap: 6px;
}

.carousel-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    background: rgba(255, 255, 255, .55);
    border: 0;
    border-radius: 999px;
}

.carousel-dots button.active {
    width: 18px;
    background: #fff;
}

.h5-panel {
    position: relative;
    margin-top: -8px;
    padding: 22px 16px 104px;
    background: #f7f9fc;
    border-radius: 18px 18px 0 0;
}

.event-title-card {
    margin-bottom: 14px;
    padding: 18px 0 12px;
    background: transparent;
    border-bottom: 1px solid #e8edf4;
}

.section-title {
    position: relative;
    margin: 0 0 10px;
    padding-left: 10px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.4;
}

.section-title::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 4px;
    content: "";
    background: #2563eb;
    border-radius: 999px;
}

.event-title-card h1 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.35;
}

.event-title-card p {
    margin: 8px 0 0;
    color: #64748b;
    line-height: 1.55;
}

.form-page .h5-panel {
    padding-bottom: 32px;
}

.h5-panel h1 {
    margin: 0 0 20px;
    font-size: 22px;
    line-height: 1.35;
}

.h5-panel h1 small {
    margin-left: 6px;
    color: #e11d48;
    font-size: 12px;
    font-weight: 500;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.event-meta .meta-card {
    min-height: 86px;
    padding: 13px 0;
    background: #fff;
    border-bottom: 1px solid #e8edf4;
    border-radius: 0;
    box-shadow: none;
}

.event-meta .meta-card.wide {
    grid-column: 1 / -1;
    min-height: 76px;
}

.event-meta strong {
    display: block;
    margin-bottom: 6px;
    color: #58708f;
    font-size: 13px;
    font-weight: 700;
}

.event-meta span {
    color: #111827;
    line-height: 1.5;
    word-break: break-word;
}

.content-section {
    margin-top: 14px;
}

.rich-content {
    padding: 0;
    color: #334155;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
    line-height: 1.8;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.rich-content p:first-child {
    margin-top: 0;
}

.rich-content p:last-child {
    margin-bottom: 0;
}

.notice-box {
    margin: 18px 0 0;
    padding: 0;
    color: #334155;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.7;
}

.notice-content {
    padding: 0;
}

.notice-content p {
    margin: 0 0 8px;
}

.notice-content p:last-child {
    margin-bottom: 0;
}

.notice-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 0;
}

.notice-content table {
    width: 100%;
    border-collapse: collapse;
}

.notice-content ul,
.notice-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.field {
    display: block;
    margin-bottom: 15px;
    padding: 13px;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.field span {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
}

.field b {
    margin-right: 4px;
    color: #e11d48;
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    color: #111827;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    outline: 0;
    font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.field textarea {
    min-height: 92px;
    padding: 11px 12px;
    resize: vertical;
}

.error-box,
.success-box,
.closed-box {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    line-height: 1.55;
}

.error-box {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.success-box {
    color: #166534;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.closed-box {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.action-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.action-row.single {
    grid-template-columns: 1fr;
}

.primary-action,
.secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
}

.primary-action {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .24);
}

.secondary-action {
    color: #334155;
    background: #e2e8f0;
}

.primary-action.disabled {
    color: #f8fafc;
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.fixed-action-bar {
    position: fixed;
    right: max(16px, calc((100vw - 430px) / 2 + 16px));
    bottom: 0;
    left: max(16px, calc((100vw - 430px) / 2 + 16px));
    z-index: 10;
    padding: 12px 0 max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(247, 249, 252, 0) 0%, rgba(247, 249, 252, .96) 34%, #f7f9fc 100%);
}
