/* 碧云北外滩尊邸 · 第二期交房预约 —— 深红鎏金视觉（对齐原项目） */
:root {
    --red: #8e1b23;
    --red-deep: #6d1018;
    --red-card: rgba(125, 36, 40, .62);
    --red-light: rgba(190, 92, 82, .42);
    --gold: #d9b884;
    --gold-dim: #b9935c;
    --gold-line: rgba(233, 202, 148, .42);
    --paper: #fff8ed;
    --ink: #fff6ea;
    --muted: rgba(255, 236, 210, .72);
    --shadow: 0 12px 34px rgba(35, 5, 8, .38);
    --gap: 16px;      /* 区块之间统一间距 */
    --gap-sm: 10px;   /* 同组元素之间统一间距 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0; padding: 0; min-height: 100%;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px; line-height: 1.65;
}

body {
    background: var(--red-deep) url('../img/bg.png') center top / cover fixed no-repeat;
}

.app {
    position: relative;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    overflow: visible;
    background: linear-gradient(180deg, rgba(142, 27, 35, .18), rgba(80, 8, 16, .55));
}

.topbar { display: none; }

/* 动画 */
@keyframes fadeUp {
    from { opacity: 0; transform: translate3d(0, 26px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes softZoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}
@keyframes goldShine {
    0%   { background-position: -140% 0; }
    100% { background-position: 240% 0; }
}
@keyframes breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 184, 132, .42); }
    50%      { box-shadow: 0 0 0 8px rgba(217, 184, 132, 0); }
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

.anim-up { animation: fadeUp .7s cubic-bezier(.2,.75,.3,1) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .32s; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 24px;
    border: 1px solid var(--gold-line); border-radius: 5px;
    font-size: 16px; font-weight: 600; letter-spacing: 3px;
    text-decoration: none; cursor: pointer;
    transition: transform .18s, filter .18s;
}
.btn:active { transform: scale(.98); filter: brightness(1.08); }
.btn-block { display: flex; width: 100%; }
.btn-gold {
    color: #6b2c1e; border-color: transparent;
    background: linear-gradient(110deg, #c69a5e 0%, #e8cd9b 42%, #c69a5e 60%, #d9b884 100%);
    background-size: 220% 100%;
    animation: goldShine 5s linear infinite;
    box-shadow: 0 6px 20px rgba(45, 8, 12, .45);
}
.btn-outline { background: rgba(120, 30, 35, .3); color: var(--gold); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.fixed-action {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    max-width: 480px; margin: 0 auto;
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(75, 8, 15, .95) 30%);
}
.action-note { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* 封面 / 阅读页 */
.page-home .app { background: linear-gradient(160deg, #a3232b, #74111a 55%, #4d0810); }
.cover { position: relative; padding: 20px 16px 110px; }
.cover-image { display: none; }
.read-card {
    position: relative;
    padding: 26px 22px 24px;
    background: var(--red-card);
    border: 1px solid var(--gold-line);
    border-radius: 4px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(2px);
}
.read-card::before, .read-card::after {
    content: ''; position: absolute; width: 26px; height: 26px; pointer-events: none;
}
.read-card::before { top: 8px; left: 8px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.read-card::after { bottom: 8px; right: 8px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.read-logo { width: 110px; display: block; margin: 0 auto var(--gap); animation: floatSlow 5s ease-in-out infinite; }
.read-title { margin: 0 0 var(--gap); color: var(--gold); font-family: "Songti SC", "SimSun", serif; font-size: 21px; text-align: center; letter-spacing: 2px; }
.read-body { max-height: 62vh; overflow-y: auto; padding-right: 6px; color: #fff5e8; font-size: 15px; line-height: 1.95; }
.read-body::-webkit-scrollbar { width: 3px; }
.read-body::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
.read-body p { margin: 0 0 var(--gap); text-indent: 2em; }
.read-body strong { color: var(--gold); }
.cover-bottom { margin-top: 18px; text-align: center; }
.cover-date { margin: 0 0 12px; color: var(--gold); letter-spacing: 4px; font-size: 12px; }
.cover-tip { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

/* 授权页 */
.page-auth .app { background: #8c1b22; }
.auth-page { position: relative; width: 100%; min-height: 100vh; }
.auth-bg {
    position: absolute; inset: 0;
    background: url('../img/cover.png') center center / cover no-repeat;
    animation: fadeIn .8s ease both;
}
.auth-bar {
    position: absolute; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 5% calc(12px + env(safe-area-inset-bottom));
    min-height: 70px; background: rgba(0, 0, 0, .9);
    /* 授权按钮是关键操作，不做入场动画，保证首屏立即可见 */
}
.auth-bar p { flex: 1; margin: 0; color: #a6adad; font-size: 12px; line-height: 1.5; }
.auth-bar p span { color: #e74c3c; }
.auth-bar a { flex: 0 0 auto; color: #fff; font-size: 14px; text-decoration: none; }

/* 邀请函 / 通用内容 */
.invite { padding: 20px 16px 110px; }
.invite-hero { text-align: center; margin-bottom: var(--gap); animation: fadeUp .7s both; }
.invite-hero img { width: 78%; max-width: 320px; display: block; margin: 0 auto; animation: floatSlow 6s ease-in-out infinite; }
.hero-sub { margin: 6px 0 0; color: var(--gold); font-size: 12px; letter-spacing: 5px; }

.letter {
    position: relative;
    padding: 22px 20px 26px;
    background: var(--red-card); border: 1px solid var(--gold-line);
    border-radius: 4px; box-shadow: var(--shadow); backdrop-filter: blur(2px);
    animation: fadeUp .7s .1s both;
}
.letter-title { margin: 0 0 16px; color: var(--gold); font-family: "Songti SC", "SimSun", serif; font-size: 24px; text-align: center; letter-spacing: 6px; }
.letter-salutation { margin: 0 0 6px; font-weight: 600; }
.letter-intro { margin: 0 0 18px; color: var(--muted); }
.letter h2 { margin: var(--gap) 0 var(--gap-sm); padding-left: 10px; border-left: 3px solid var(--gold); color: var(--gold); font-size: 17px; letter-spacing: 1px; }
.letter p { margin: var(--gap-sm) 0; }
.letter strong { color: var(--gold); }
.highlight { padding: 10px 12px; background: rgba(217,184,132,.14); border-radius: 4px; color: var(--gold); font-weight: 600; text-align: center; }
.tips { padding: 10px 12px; background: rgba(255,255,255,.06); color: var(--muted); font-size: 14px; border-radius: 4px; }
.doc-list { margin: 8px 0; padding-left: 22px; }
.doc-list li { margin: 7px 0; }
.sign-table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 13px; text-align: center; }
.sign-table th, .sign-table td { border: 1px solid var(--gold-line); padding: 8px 4px; }
.sign-table th { background: rgba(217,184,132,.22); color: var(--gold); font-weight: 500; }
.sign-table td:first-child { background: rgba(217,184,132,.1); color: var(--gold); }

/* 面板 */
.panel { padding: 22px 16px 110px; }
.panel-title { margin: 8px 0 4px; color: var(--gold); font-family: "Songti SC", "SimSun", serif; font-size: 24px; text-align: center; letter-spacing: 4px; animation: fadeUp .6s both; }
.panel-desc { margin: 0 0 var(--gap); color: var(--muted); font-size: 13px; text-align: center; }

.form-card {
    position: relative;
    padding: 24px 18px 22px;
    background: var(--red-card); border: 1px solid var(--gold-line);
    border-radius: 4px; box-shadow: var(--shadow); backdrop-filter: blur(2px);
    animation: fadeUp .7s .1s both;
}
.form-card::before, .form-card::after {
    content: ''; position: absolute; width: 30px; height: 30px; pointer-events: none; opacity: .85;
}
.form-card::before { top: 8px; left: 8px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.form-card::after { bottom: 8px; right: 8px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.field { display: block; margin-bottom: var(--gap); }
.field > span { display: none; }
.field input {
    width: 100%; height: 48px; padding: 0 14px;
    border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
    background: rgba(201, 139, 115, .72); color: #fff;
    font-size: 16px; font-weight: 700; outline: none;
    transition: background .2s, box-shadow .2s;
}
.field input::placeholder { color: #fff5e8; font-weight: 700; }
.field input:focus { background: rgba(201, 139, 115, .86); box-shadow: 0 0 0 3px rgba(217,184,132,.25); }
.room-inputs { display: flex; align-items: center; gap: 10px; }
.room-inputs input { flex: 1; min-width: 0; }
.room-inputs em { font-style: normal; color: var(--gold); font-size: 20px; }
.code-inputs { position: relative; }
.code-inputs input { padding-right: 104px; }
.btn-code {
    position: absolute; top: 6px; right: 6px;
    height: 36px; padding: 0 10px; border: none; border-radius: 5px;
    background: rgba(90, 50, 45, .65); color: #fff; font-size: 13px; cursor: pointer;
}
.btn-code:disabled { opacity: .6; cursor: not-allowed; }
.form-note { margin: var(--gap) 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.form-card .btn-gold { margin-top: var(--gap); }

.notice { margin: var(--gap) 0; padding: 10px 12px; background: rgba(217,184,132,.16); border-left: 3px solid var(--gold); border-radius: 3px; font-size: 13px; }
.notice-warn { background: rgba(255,180,120,.14); border-color: #e8b57b; }
.loading-text { color: var(--muted); font-size: 13px; }

/* 预约选择页 */
.banner { width: 100%; height: 172px; object-fit: cover; border-radius: 8px; display: block; box-shadow: var(--shadow); margin-bottom: var(--gap); animation: fadeUp .7s both; }
.section { margin-top: var(--gap); animation: fadeUp .7s .1s both; }
.section-title { display: flex; align-items: center; gap: var(--gap-sm); margin: 0 0 var(--gap-sm); color: var(--gold); font-size: 16px; }
.section-title::before { content: '◗'; font-size: 16px; line-height: 1; }
.section-title span { display: none; }

.info-card {
    padding: 16px; background: var(--red-card); border: 1px solid var(--gold-line);
    border-radius: 6px; box-shadow: var(--shadow); backdrop-filter: blur(2px);
}
.info-card p { margin: 5px 0; font-size: 13px; }
.info-card strong { color: var(--gold); }

.date-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-sm); }
.date-tab {
    padding: 10px 4px; text-align: center; cursor: pointer;
    border: 1px solid var(--gold-line); border-radius: 6px;
    background: rgba(120, 35, 38, .4); color: #f6e7d2; font-size: 13px;
    transition: transform .18s, background .18s;
}
.date-tab span { display: block; font-size: 12px; color: var(--muted); }
.date-tab.active { background: linear-gradient(140deg, #dfbd89, #c69a5e); color: #6b2c1e; border-color: transparent; box-shadow: 0 4px 14px rgba(40,8,10,.4); }
.date-tab.active span { color: #6b2c1e; }
.date-tab b { display: none; margin-left: 4px; font-size: 10px; font-weight: 500; }
.date-tab.active b { display: inline-block; }

.slot-grid { display: flex; flex-direction: column; gap: var(--gap-sm); }
.slot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; cursor: pointer;
    border: 1px solid var(--gold-line); border-radius: 7px;
    background: rgba(120, 35, 38, .34); color: #fff4e4; font-size: 15px;
    transition: transform .18s, background .18s, border-color .18s;
}
.slot .signin { font-size: 11px; color: var(--muted); }
.slot .status { color: var(--gold); font-size: 13px; }
.slot.active { background: rgba(217,184,132,.24); border-color: var(--gold); transform: translateX(4px); animation: breathe 2.2s infinite; }
.slot.active .status { color: #fff; font-weight: 700; }
.slot.disabled { opacity: .5; cursor: not-allowed; }

.companion-card { padding: 12px; margin-bottom: var(--gap-sm); background: var(--red-card); border: 1px solid var(--gold-line); border-radius: 6px; animation: fadeUp .4s both; }
.companion-card .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.companion-card h3 { margin: 0; font-size: 14px; color: var(--gold); }
.companion-card .remove { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.companion-card input { width: 100%; height: 40px; margin-bottom: 8px; padding: 0 10px; border: 1px solid var(--gold-line); border-radius: 6px; background: rgba(201,139,115,.55); color: #fff; font-size: 14px; outline: none; }
.companion-card input::placeholder { color: #fff2e0; }
.btn-outline.btn-block { margin-top: 10px; }

/* 预约凭证 */
.ticket { margin: var(--gap) 0; background: var(--red-card); border: 1px solid var(--gold-line); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; animation: fadeUp .7s both; }
.ticket-head { padding: 12px; background: rgba(217,184,132,.2); color: var(--gold); text-align: center; font-size: 14px; letter-spacing: 2px; }
.ticket-body { padding: 22px 18px; text-align: center; }
.ticket-date { color: var(--gold); font-size: 20px; font-weight: 700; }
.ticket-time { margin: 4px 0; font-size: 26px; letter-spacing: 2px; }
.ticket-signin { font-size: 12px; color: var(--muted); }
.ticket-divider { margin: 18px 0; border-top: 1px dashed var(--gold-line); }
.ticket-info { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; margin: 0; text-align: left; font-size: 14px; }
.ticket-info dt { color: var(--muted); }
.ticket-info dd { margin: 0; }
.ticket-info .code { font-size: 18px; font-weight: 700; letter-spacing: 4px; color: var(--gold); }
.ticket-info .small { font-size: 12px; color: var(--muted); }
.ticket-companions { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--gold-line); font-size: 13px; text-align: left; }
.ticket-foot { padding: 10px; background: rgba(217,184,132,.14); font-size: 11px; text-align: center; color: var(--muted); }
.action-row { display: flex; gap: var(--gap-sm); margin-top: var(--gap); }
.action-row .btn { flex: 1; padding: 0 8px; font-size: 14px; letter-spacing: 1px; }
.empty-state { padding: 60px 0; text-align: center; color: var(--muted); }
.success-page { text-align: center; }
.success-icon { width: 64px; height: 64px; margin: 20px auto 10px; border-radius: 50%; background: var(--gold); color: var(--red-deep); font-size: 34px; line-height: 64px; animation: breathe 2s infinite; }

.site-footer { padding: 18px 12px 26px; text-align: center; color: var(--muted); font-size: 11px; }
.site-footer p { margin: 2px 0; }
.site-footer a { color: var(--gold); text-decoration: none; }

@media (min-width: 520px) {
    body { padding: 16px 0; }
    .app { min-height: calc(100vh - 32px); border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
