:root {
    --event-bg: #f6f4f0;
    --event-surface: #ffffff;
    --event-surface-soft: #faf8f4;
    --event-line: #e8dfd4;
    --event-text: #103f3a;
    --event-body: #50605c;
    --event-muted: #82776d;
    --event-coral: #f36d5b;
    --event-coral-dark: #d95a49;
    --event-teal: #078a80;
    --event-teal-soft: #eaf7f4;
    --event-shadow: 0 10px 28px rgba(66, 49, 34, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 100% 12%, rgba(204, 234, 227, .22), transparent 24rem),
        linear-gradient(180deg, #fbfaf8 0%, var(--event-bg) 100%);
    color: var(--event-text);
    font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.event-detail-page {
    width: min(100% - 56px, 1480px);
    margin: 0 auto;
    padding: 16px 0 56px;
}

.event-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 40px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.event-breadcrumb {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: var(--event-muted);
    font-size: 13px;
    font-weight: 750;
}
.event-breadcrumb a { color: var(--event-teal); }
.event-breadcrumb strong {
    min-width: 0;
    overflow: hidden;
    color: var(--event-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.back-link {
    flex: 0 0 auto;
    color: var(--event-teal);
    font-size: 13px;
    font-weight: 900;
}
.back-link::before { content: "← "; }

.event-message {
    margin: 0 0 12px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}
.event-message.success { color: #086d65; background: #e9f6f2; border: 1px solid #cce8e1; }
.event-message.danger { color: #b94436; background: #fff0ed; border: 1px solid #f6d2cb; }

.event-hero {
    display: grid;
    grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--event-line);
    border-radius: 16px;
    background: var(--event-surface);
    box-shadow: var(--event-shadow);
}
.event-hero-media {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    background: linear-gradient(135deg, #ead8ca, #dcece8);
}
.event-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    display: block;
    object-fit: cover;
}
.event-hero-media.empty {
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}
.event-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 70%, rgba(13, 48, 43, .25));
}
.event-date-card {
    position: absolute;
    z-index: 2;
    right: 16px;
    bottom: 16px;
    min-width: 76px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    color: var(--event-text);
    text-align: center;
    box-shadow: 0 8px 20px rgba(22, 48, 44, .14);
    backdrop-filter: blur(8px);
}
.event-date-card strong,
.event-date-card small { display: block; }
.event-date-card strong { font-size: 21px; line-height: 1.05; }
.event-date-card small { margin-top: 3px; color: var(--event-teal); font-size: 12px; font-weight: 900; }

.event-hero-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 2.6vw, 34px);
}
.event-title-area { max-width: 780px; }
.event-eyebrow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.event-kicker,
.section-heading > span,
.section-heading > div > span,
.organizer-copy > span {
    margin: 0;
    color: var(--event-coral-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .11em;
}
.registration-availability {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}
.registration-availability.open { color: #08756d; background: var(--event-teal-soft); }
.registration-availability.closed { color: #bd5749; background: #fff0eb; }
.event-title-area h1 {
    margin: 10px 0 0;
    color: var(--event-text);
    font-size: clamp(34px, 3.1vw, 48px);
    line-height: 1.12;
    letter-spacing: -.035em;
}
.event-subtitle {
    margin: 12px 0 0;
    color: var(--event-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.65;
}
.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}
.event-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 9px;
    border: 1px solid #f3d8d0;
    border-radius: 999px;
    background: #fff8f5;
    color: #b95647;
    font-size: 11px;
    font-weight: 850;
}

.event-key-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 20px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--event-line);
    border-bottom: 1px solid var(--event-line);
}
.event-key-facts > div {
    min-width: 0;
    padding: 0 15px;
}
.event-key-facts > div:first-child { padding-left: 0; }
.event-key-facts > div:last-child { padding-right: 0; }
.event-key-facts > div + div { border-left: 1px solid var(--event-line); }
.event-key-facts dt {
    margin-bottom: 5px;
    color: var(--event-muted);
    font-size: 10px;
    font-weight: 900;
}
.event-key-facts dd { margin: 0; }
.event-key-facts strong,
.event-key-facts span { display: block; }
.event-key-facts strong {
    color: var(--event-text);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.event-key-facts span {
    margin-top: 2px;
    color: var(--event-muted);
    font-size: 10px;
    line-height: 1.45;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.member-action-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: 16px;
}
.member-action-label {
    margin: 0;
    color: var(--event-coral-dark);
    font-size: 11px;
    font-weight: 900;
}
.member-action-copy > p:not(.member-action-label) {
    max-width: 660px;
    margin: 5px 0 0;
    color: var(--event-body);
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}
.registration-state {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 7px;
}
.registration-state div { display: flex; align-items: center; gap: 6px; }
.registration-state span { color: var(--event-muted); font-size: 10px; font-weight: 800; }
.registration-state strong {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--event-teal-soft);
    color: var(--event-teal);
    font-size: 11px;
    font-weight: 900;
}
.member-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    max-width: 430px;
}
.save-action-form { margin: 0; }
.event-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--event-line);
    border-radius: 9px;
    background: #fff;
    color: var(--event-text);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}
.event-action.primary { border-color: var(--event-coral); background: var(--event-coral); color: #fff; }
.event-action.primary:hover { background: var(--event-coral-dark); }
.event-action.secondary { border-color: #cce2dd; background: #f4faf8; color: var(--event-teal); }
.event-action.text { border-color: transparent; background: transparent; color: var(--event-teal); padding-inline: 5px; }
.event-action.disabled { color: #a19991; background: #f0ece7; cursor: not-allowed; }

.event-information,
.event-flow-section,
.public-review-section,
.similar-event-section {
    margin-top: 16px;
    border: 1px solid var(--event-line);
    border-radius: 14px;
    background: var(--event-surface);
    box-shadow: 0 8px 24px rgba(73, 54, 37, .04);
}
.event-information { overflow: hidden; }
.event-information-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr);
}
.event-intro,
.audience-panel { padding: 24px 26px; }
.audience-panel {
    border-left: 1px solid var(--event-line);
    background: #fbfcfa;
}
.section-heading { margin-bottom: 11px; }
.section-heading h2,
.organizer-copy h2 {
    margin: 5px 0 0;
    color: var(--event-text);
    font-size: 24px;
    line-height: 1.25;
}
.event-description,
.audience-panel p {
    margin: 0;
    color: var(--event-body);
    font-size: 14px;
    line-height: 1.8;
    font-weight: 650;
    white-space: pre-line;
}
.organizer-strip {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px 26px;
    border-top: 1px solid var(--event-line);
    background: var(--event-surface-soft);
}
.host-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--event-coral), #e9a33d);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}
.organizer-copy h2 { font-size: 20px; }
.organizer-copy p {
    margin: 5px 0 0;
    color: var(--event-body);
    font-size: 12px;
    line-height: 1.55;
    font-weight: 650;
}
.host-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.host-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff0ea;
    color: #bd5949;
    font-size: 10px;
    font-weight: 900;
}

.event-flow-section { padding: 22px 26px 24px; }
.flow-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}
.flow-heading p {
    margin: 0 0 2px;
    color: var(--event-muted);
    font-size: 11px;
    font-weight: 700;
}
.event-flow-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.event-flow-list::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 7%;
    right: 7%;
    height: 1px;
    background: var(--event-line);
}
.event-flow-list li {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 0 16px;
}
.event-flow-list li:first-child { padding-left: 0; }
.event-flow-list li:last-child { padding-right: 0; }
.event-flow-list b {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 4px solid var(--event-surface);
    border-radius: 50%;
    background: #fff0eb;
    color: var(--event-coral-dark);
    font-size: 11px;
    box-shadow: 0 0 0 1px #f2d7ce;
}
.event-flow-list strong,
.event-flow-list span { display: block; }
.event-flow-list strong { color: var(--event-text); font-size: 14px; }
.event-flow-list span { margin-top: 3px; color: var(--event-muted); font-size: 11px; line-height: 1.5; font-weight: 650; }

.public-review-section,
.similar-event-section { padding: 22px 26px; }
.review-grid,
.similar-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.review-card {
    padding: 15px;
    border: 1px solid #eee3d7;
    border-radius: 11px;
    background: var(--event-surface-soft);
}
.review-score-row { display: flex; flex-wrap: wrap; gap: 5px; }
.review-score-row span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff0eb;
    color: #c55a49;
    font-size: 10px;
    font-weight: 900;
}
.review-card p { margin: 10px 0 8px; color: var(--event-body); line-height: 1.65; font-size: 12px; font-weight: 650; }
.review-card time { color: var(--event-muted); font-size: 10px; font-weight: 700; }
.section-heading.with-link { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.section-heading.with-link > a { color: var(--event-teal); font-size: 12px; font-weight: 900; }
.similar-event-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 132px;
    overflow: hidden;
    border: 1px solid #eee3d7;
    border-radius: 11px;
    background: var(--event-surface-soft);
}
.similar-cover img { width: 100%; height: 100%; min-height: 132px; display: block; object-fit: cover; }
.similar-copy { min-width: 0; padding: 12px; }
.similar-copy > span { color: var(--event-coral-dark); font-size: 9px; font-weight: 900; }
.similar-copy h3 { margin: 5px 0 0; font-size: 16px; line-height: 1.35; }
.similar-copy h3 a { color: var(--event-text); }
.similar-copy p { margin: 6px 0 0; color: var(--event-muted); font-size: 10px; line-height: 1.5; font-weight: 700; }
.similar-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.similar-copy strong { color: var(--event-coral-dark); }
.similar-copy > div a { color: var(--event-teal); font-size: 10px; font-weight: 900; }

@media (max-width: 1180px) {
    .event-detail-page { width: min(100% - 40px, 1480px); }
    .event-hero { grid-template-columns: minmax(330px, 38%) minmax(0, 1fr); }
    .event-key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-key-facts > div { padding: 11px 14px; }
    .event-key-facts > div:first-child { padding-left: 0; }
    .event-key-facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .event-key-facts > div:nth-child(n+3) { border-top: 1px solid var(--event-line); }
    .member-action-panel { grid-template-columns: 1fr; }
    .member-action-buttons { justify-content: flex-start; max-width: none; }
    .review-grid,
    .similar-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .event-detail-page { width: min(100% - 28px, 1480px); padding-top: 12px; }
    .event-hero { grid-template-columns: 1fr; }
    .event-hero-media,
    .event-hero-media img { min-height: 300px; max-height: 350px; }
    .event-information-grid { grid-template-columns: 1fr; }
    .audience-panel { border-top: 1px solid var(--event-line); border-left: 0; }
    .organizer-strip { grid-template-columns: 48px minmax(0, 1fr); }
    .host-meta { grid-column: 1 / -1; justify-content: flex-start; padding-left: 62px; }
    .event-flow-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
    .event-flow-list::before { display: none; }
    .event-flow-list li:nth-child(odd) { padding-left: 0; }
    .event-flow-list li:nth-child(even) { padding-right: 0; }
}

@media (max-width: 640px) {
    .event-detail-page { width: min(100% - 18px, 1480px); padding-bottom: 38px; }
    .event-context-bar { align-items: flex-start; min-height: 36px; margin-bottom: 9px; }
    .back-link { display: none; }
    .event-hero { border-radius: 13px; }
    .event-hero-media,
    .event-hero-media img { min-height: 230px; max-height: 270px; }
    .event-date-card { right: 12px; bottom: 12px; }
    .event-hero-content { padding: 20px 17px; }
    .event-eyebrow-row { align-items: flex-start; }
    .event-title-area h1 { font-size: clamp(29px, 9vw, 38px); }
    .event-subtitle { font-size: 14px; }
    .event-key-facts { grid-template-columns: 1fr; }
    .event-key-facts > div,
    .event-key-facts > div:first-child,
    .event-key-facts > div:nth-child(3) { padding: 10px 0; border-left: 0; }
    .event-key-facts > div + div { border-top: 1px solid var(--event-line); }
    .member-action-buttons { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .member-action-buttons .primary,
    .member-action-buttons .disabled { grid-column: 1 / -1; }
    .save-action-form { width: 100%; }
    .save-action-form button { width: 100%; }
    .event-intro,
    .audience-panel,
    .event-flow-section,
    .public-review-section,
    .similar-event-section { padding: 19px 17px; }
    .organizer-strip { grid-template-columns: 44px minmax(0, 1fr); padding: 17px; }
    .host-mark { width: 44px; height: 44px; border-radius: 11px; }
    .host-meta { padding-left: 58px; }
    .flow-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .event-flow-list { grid-template-columns: 1fr; gap: 14px; }
    .event-flow-list li,
    .event-flow-list li:nth-child(odd),
    .event-flow-list li:nth-child(even) { padding: 0; }
    .review-grid,
    .similar-event-grid { grid-template-columns: 1fr; }
    .section-heading.with-link { align-items: flex-start; }
    .similar-event-card { grid-template-columns: 102px minmax(0, 1fr); }
}
