:root {
    /* 塔羅牌主色：星空紫 & 月光金 */
    --p: #b48af7;
    --pd: #7c4dcc;
    --ink: #1e1228;
    --dark: #0d0617;
    --muted: #8b7aa8;
    --card: rgba(255, 255, 255, 0.92);
    --line: rgba(180, 138, 247, 0.28);
    --price-fill: #6a3db8;
    --price-fill-2: #b48af7;
    --price-shadow: rgba(90, 40, 180, 0.22);
    --price-ring: rgba(180, 138, 247, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--ink);
    background: #0d0617;
    overflow-x: hidden;
}

.hero-bg,
.overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

/* 星空粒子背景效果 */
.hero-bg {
    z-index: -3;
    background-size: cover;
    background-position: center top;
    filter: none;
}

/* 深邃神秘暗夜漸層遮罩 */
.overlay {
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(120, 60, 220, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(60, 20, 120, 0.22) 0%, transparent 50%),
        linear-gradient(180deg, rgba(13, 6, 23, 0.12), rgba(13, 6, 23, 0.06) 52%, rgba(13, 6, 23, 0.24));
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 44px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0 22px;
}

.logo,
.admin-link,
.primary-link {
    color: inherit;
    text-decoration: none;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #e8d4ff;
    font-size: clamp(1.15rem, 3vw, 1.7rem);
    font-weight: 900;
    letter-spacing: .04em;
    text-shadow: 0 2px 16px rgba(160, 80, 255, 0.5);
}

.logo-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(200, 160, 255, 0.5);
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #9b5de5, #4a1b8a);
    box-shadow: 0 16px 38px rgba(100, 40, 200, 0.38), 0 0 20px rgba(160, 100, 255, 0.2);
}

.logo-img {
    height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(160, 80, 255, 0.3);
    transition: transform 0.3s ease;
}

.logo-image-link:hover .logo-img {
    transform: scale(1.05);
}

.top-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(180, 138, 247, 0.38);
    border-radius: 999px;
    color: #e0c8ff;
    background: rgba(30, 12, 55, 0.62);
    box-shadow: 0 12px 28px rgba(80, 20, 160, 0.22);
    backdrop-filter: blur(12px);
    font-weight: 900;
}

.brand-hero {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 5vw, 48px) 0 24px;
    color: #f0e8ff;
    text-shadow: 0 2px 18px rgba(80, 20, 160, 0.5);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 14px;
    color: #d4a8ff;
    font-size: .88rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brand-hero h1 {
    max-width: 900px;
    color: #f0e4ff;
    font-size: clamp(2.35rem, 7vw, 5.4rem);
    line-height: 1.05;
    font-weight: 900;
}

.brand-hero p:not(.hero-kicker) {
    max-width: 760px;
    margin-top: 18px;
    color: rgba(230, 210, 255, 0.92);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.85;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(180, 138, 247, 0.38);
    border-radius: 999px;
    color: #dbb8ff;
    background: rgba(20, 6, 45, 0.58);
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.main-card,
.query-section {
    padding: clamp(22px, 5vw, 42px);
    border: 1px solid rgba(180, 138, 247, 0.28);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 26px 80px rgba(80, 20, 160, 0.16), 0 0 60px rgba(140, 80, 255, 0.06);
    backdrop-filter: blur(18px);
}

.wizard-header {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.wizard-header h2,
.query-header h2 {
    color: #200d3a;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 900;
}

.wizard-header p,
.query-header p,
.service-meta,
.summary-box p,
.footer {
    color: var(--muted);
    line-height: 1.8;
}

/* 步驟條 */
.steps-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 34px;
}

.steps-container:before {
    content: '';
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4b4ff, #b48af7, #d4b4ff);
    opacity: 0.35;
}

.step {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #9c84b8;
    font-weight: 800;
}

.step span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd0f0;
    border-radius: 999px;
    background: #f5eeff;
    transition: .22s;
}

.step.active span,
.step.completed span {
    border-color: var(--p);
    background: linear-gradient(135deg, #c49bff, #7c4dcc);
    color: #fff;
    box-shadow: 0 12px 26px rgba(120, 60, 200, 0.32);
}

.step.active label { color: #7c4dcc; }

/* 服務卡片 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(180, 138, 247, 0.28);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(80, 20, 160, 0.08);
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 138, 247, 0.56);
    box-shadow: 0 20px 44px rgba(80, 20, 160, 0.14);
}

.service-card.selected {
    border-color: var(--p);
    background: #faf6ff;
    box-shadow: 0 0 0 3px var(--price-ring), 0 20px 44px rgba(80, 20, 160, 0.14);
}

.service-image-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #1a0e2e;
    cursor: zoom-in;
    overflow: hidden;
}

.service-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
}

.service-zoom-hint {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(30, 10, 60, 0.82);
    color: #e0c8ff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    transition: .22s;
}

.service-image-button:hover .service-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

.service-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.service-name {
    color: #200d3a;
    font-size: 1.03rem;
    line-height: 1.55;
    font-weight: 900;
}

.service-meta {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    align-items: stretch;
    margin-top: auto;
    font-weight: 800;
}

.service-meta .price {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--price-fill), var(--price-fill-2));
    color: #fff;
    font-weight: 900;
    letter-spacing: .02em;
    text-shadow: 0 1px 2px rgba(60, 10, 120, 0.28);
    box-shadow: 0 10px 20px var(--price-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transform: translateY(0);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.service-card:hover .service-meta .price {
    filter: brightness(1.06) saturate(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px var(--price-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.service-card:active .service-meta .price {
    transform: translateY(1px);
    box-shadow: 0 7px 14px var(--price-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.service-card.selected .service-meta .price {
    box-shadow: 0 0 0 3px var(--price-ring), 0 12px 24px var(--price-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 工具類別 */
.d-none { display: none !important; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.py-5 { padding: 40px 0; }
.text-accent { color: #7c4dcc; }
.small { font-size: .9rem; }
.fw-bold { font-weight: 900; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 18px; }
.mt-2 { margin-top: 8px; }
.d-block { display: block; }
.cursor-pointer { cursor: pointer; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.custom-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d4b4f5;
    border-radius: 12px;
    background: #fff;
    color: #1e1228;
    font-family: inherit;
    font-size: 1rem;
}

.custom-input:focus {
    border-color: var(--p);
    box-shadow: 0 0 0 4px rgba(180, 138, 247, 0.18);
    outline: none;
}

/* 日曆 - 神秘紫調 */
.panther-calendar {
    padding: 20px;
    border: 1px solid #d4b4f5;
    border-radius: 22px;
    background: #fdf8ff;
    box-shadow: 0 18px 50px rgba(80, 20, 160, 0.1);
}

.cal-header,
.time-title-row,
.wizard-footer,
.query-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cal-header {
    margin-bottom: 14px;
    color: #3d1870;
    font-size: 1.2rem;
    font-weight: 900;
}

.cal-header button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f0e4ff;
    color: #7c4dcc;
    cursor: pointer;
}

.cal-days,
.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.cal-days {
    margin-bottom: 8px;
    color: #9b5de5;
    font-weight: 900;
}

.cal-body {
    gap: 2px;
}

.cal-body .day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f5edff;
    color: #3d1870;
    cursor: pointer;
    font-weight: 800;
}

.cal-body .day:hover,
.cal-body .day.selected {
    background: linear-gradient(135deg, #7c4dcc, #b48af7);
    color: #fff;
}

.cal-body .day.disabled {
    opacity: .35;
    cursor: not-allowed;
    filter: grayscale(1);
}

.time-title-row {
    margin: 20px 0 14px;
}

.time-slots-section:focus {
    outline: 0;
}

.time-title-row h4,
.time-group h4 {
    color: #200d3a;
    font-weight: 900;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 10px;
    margin: 10px 0 18px;
}

.time-btn {
    min-height: 42px;
    border: 1px solid #d4b4f5;
    border-radius: 10px;
    background: #fff;
    color: #2e1650;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.time-btn small {
    display: block;
    margin-top: 2px;
    font-size: .72rem;
    font-weight: 700;
    opacity: .78;
}

.time-btn:hover,
.time-btn.selected {
    border-color: #7c4dcc;
    background: linear-gradient(135deg, #7c4dcc, #b48af7);
    color: #fff;
}

.time-btn:disabled {
    opacity: .32;
    cursor: not-allowed;
}

.time-btn.selected:disabled {
    opacity: 1;
    cursor: default;
}

.wizard-footer {
    margin-top: 22px;
}

.btn-primary,
.btn-secondary,
.btn-outline,
.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #5c2ea8, #b48af7);
    box-shadow: 0 12px 24px rgba(90, 40, 180, 0.24);
}

.btn-secondary,
.btn-outline {
    border: 1px solid #cdb4f0;
    color: #7c4dcc;
    background: #faf6ff;
}

.btn-line {
    width: 100%;
    margin: 16px 0 10px;
    color: #fff;
    background: #06c755;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-grid label {
    color: #2e1650;
    font-weight: 900;
}

/* 摘要卡片 */
.summary-box {
    margin: 20px 0;
    padding: 18px;
    border: 1px dashed #c4a4e8;
    border-radius: 16px;
    background: linear-gradient(135deg, #fdf8ff, #f5eeff);
}

.summary-box h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #2e1650;
}

.summary-box p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.total-price-text {
    color: #7c4dcc !important;
    font-size: 1.15rem;
    font-weight: 900;
}

/* 成功訊息 */
.success-message {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.check-icon {
    color: #9b5de5;
    font-size: 4rem;
    filter: drop-shadow(0 0 16px rgba(155, 93, 229, 0.5));
}

/* 查詢區 */
.query-section {
    margin-top: 26px;
}

.query-header {
    margin-bottom: 18px;
    text-align: center;
}

.query-box {
    max-width: 560px;
    margin: 0 auto;
    align-items: stretch;
}

.booking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dcc8f5;
    border-radius: 12px;
    background: #fff;
}

.footer {
    padding: 36px 0 0;
    color: #8b7aa8;
    text-align: center;
    font-size: .86rem;
}

/* 圖片瀏覽器 */
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(13, 6, 35, 0.86);
    backdrop-filter: blur(12px);
}

.image-viewer.is-open { display: flex; }

.image-viewer-panel {
    width: min(96vw, 980px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.image-viewer-panel img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 70px);
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(80, 20, 160, 0.48), 0 0 40px rgba(160, 100, 255, 0.18);
    background: #fff;
}

.image-viewer-title {
    max-width: 920px;
    color: #e0c8ff;
    text-align: center;
    font-weight: 900;
}

.image-viewer-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #3d1870;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
}

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

@media (max-width: 760px) {
    .container { width: min(100% - 24px, 1120px); padding-top: 12px; }
    .header { align-items: stretch; flex-direction: column; }
    .logo-img { height: 75px; margin: 0 auto; }
    .top-nav, .admin-link { width: 100%; }
    .brand-hero { min-height: auto; padding-top: 20px; padding-bottom: 20px; }
    .brand-hero h1 { font-size: clamp(2.05rem, 12vw, 3.6rem); }
    .hero-badges span { width: 100%; }
    .main-card, .query-section { padding: 22px 16px; border-radius: 20px; }
    .steps-container { margin-bottom: 26px; }
    .step label { font-size: .78rem; }
    .services-grid, .form-grid { grid-template-columns: 1fr; }
    .service-meta .price { min-height: 44px; font-size: 1rem; }
    .time-title-row, .wizard-footer, .query-box { align-items: stretch; flex-direction: column; }
    .btn-primary, .btn-secondary, .btn-outline { width: 100%; }
}
