/* ==========================================================================
   景点详情页 · 在线购票  ticket.css
   全站景点页共用（由 _build_spots.py 自动注入）。国风圆角按钮 + 居中弹窗二维码。
   要点：不遮挡 720° 全景、AI 语音、洞窟轮播等原有模块；弹窗层级最高（z-index 9600）。
   ========================================================================== */
.ticket-bar{
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: .7rem 1.1rem; margin-top: 1.15rem;
}
.ticket-note{
    flex: 1 1 20rem; min-width: 0;
    font-size: .74rem; line-height: 1.85; color: var(--gray-500);
    text-align: right;
}
.ticket-note b{ color: var(--gray-600); font-weight: 600; }

/* ---------- 国风圆角按钮 ---------- */
.ticket-btn{
    position: relative; flex: 0 0 auto; cursor: pointer; overflow: hidden;
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', STSong, SimSun, serif; font-size: 1rem; letter-spacing: .16em;
    color: #FFF8EC; background: linear-gradient(135deg, #193B38 0%, #122A28 100%);
    border: 1px solid rgba(242, 222, 168, .55); border-radius: .55rem;
    padding: .64rem 1.55rem; box-shadow: 0 6px 18px rgba(181, 43, 67, .26);
    transition: transform .35s var(--ease-smooth, ease), box-shadow .35s var(--ease-smooth, ease),
                filter .35s var(--ease-smooth, ease);
}
.ticket-btn__ico{ font-size: 1.02rem; line-height: 1; }
.ticket-btn__hint{
    display: block; font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    font-size: .68rem; letter-spacing: .1em; opacity: .88; margin-top: .12rem;
}
.ticket-btn__inner{ display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
/* hover：柔和上浮 + 鎏金掠光渐变 */
.ticket-btn::after{
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(242,222,168,0) 28%, rgba(242,222,168,.42) 50%, rgba(242,222,168,0) 72%);
    transform: translateX(-125%);
    transition: transform .75s var(--ease-smooth, ease);
}
.ticket-btn:hover{ transform: translateY(-3px); box-shadow: 0 14px 28px rgba(181, 43, 67, .34); }
.ticket-btn:hover::after{ transform: translateX(125%); }
.ticket-btn:active{ transform: translateY(-1px); }
.ticket-btn:focus-visible{ outline: 2px solid rgba(242, 222, 168, .9); outline-offset: 2px; }

/* 免费 / 无票务：置灰不可点 */
.ticket-btn.is-free{
    background: linear-gradient(135deg, #9AA2AC 0%, #6B7280 100%);
    border-color: rgba(255, 255, 255, .38); cursor: not-allowed;
    box-shadow: none; letter-spacing: .12em;
}
.ticket-btn.is-free::after{ display: none; }
.ticket-btn.is-free:hover{ transform: none; box-shadow: none; }

/* ---------- 弹窗 ---------- */
.tk-mask{
    position: fixed; inset: 0; z-index: 9600; display: none; place-items: center;
    padding: 1.2rem; background: rgba(20, 13, 7, .62);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .3s ease;
}
.tk-mask.is-open{ display: grid; }
.tk-mask.is-on{ opacity: 1; }
.tk-card{
    position: relative; width: min(92vw, 390px); border-radius: 1rem; overflow: hidden;
    background: linear-gradient(180deg, #FBF7EF 0%, #F3EBDD 100%);
    border: 1px solid rgba(201, 161, 90, .6);
    box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .62);
    transform: translateY(16px) scale(.97);
    transition: transform .36s var(--ease-expo, cubic-bezier(.16,1,.3,1));
}
.tk-mask.is-on .tk-card{ transform: none; }
.tk-card__head{ padding: 1rem 2.6rem .75rem; text-align: center; border-bottom: 1px dashed rgba(201, 161, 90, .55); }
.tk-card__title{
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', STSong, SimSun, serif; font-size: 1.06rem; font-weight: 700;
    letter-spacing: .14em; color: #33241A;
}
.tk-card__sub{ margin: .35rem 0 0; font-size: .74rem; letter-spacing: .08em; color: #8A6A2E; }
.tk-card__close{
    position: absolute; right: .55rem; top: .55rem; z-index: 2;
    width: 2.05rem; height: 2.05rem; border-radius: 50%; cursor: pointer;
    display: grid; place-items: center; font-size: .92rem; line-height: 1;
    color: #5B4630; background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(201, 161, 90, .55);
    transition: background .3s, color .3s, transform .3s;
}
.tk-card__close:hover{ background: var(--primary, #193B38); color: #fff; transform: scale(1.06); }
.tk-card__body{ padding: 1.1rem 1.25rem 1.25rem; text-align: center; }
.tk-card__qrwrap{
    display: inline-block; padding: .5rem; border-radius: .6rem;
    background: #fff; border: 1px solid rgba(201, 161, 90, .45);
    box-shadow: 0 8px 22px -12px rgba(60, 40, 15, .5);
}
.tk-card__qr{ display: block; width: min(62vw, 232px); height: auto; border-radius: .3rem; }
.tk-card__ph{
    width: min(62vw, 232px); aspect-ratio: 1 / 1; display: grid; place-items: center;
    gap: .4rem; border-radius: .3rem; text-align: center;
    background: repeating-linear-gradient(45deg, #F6F1E7 0 8px, #EFE8DA 8px 16px);
    color: #8A6A2E; font-size: .76rem; line-height: 1.7;
}
.tk-card__ph span{ font-size: 1.6rem; }
.tk-card__hint{
    margin: .95rem 0 0; font-size: .82rem; line-height: 1.8; color: #4B5563;
}
.tk-card__hint b{ color: var(--primary, #193B38); font-weight: 600; }
.tk-card__tip{
    margin: .8rem 0 0; padding-top: .75rem; border-top: 1px dashed rgba(201, 161, 90, .5);
    font-size: .68rem; line-height: 1.75; color: #9CA3AF; text-align: left;
}
/* 打开弹窗时锁滚动 */
html.tk-lock, html.tk-lock body{ overflow: hidden !important; }

/* 移动端：二维码保证够大，方便长按识别 */
@media (max-width: 640px){
    .ticket-bar{ justify-content: center; }
    .ticket-note{ text-align: center; flex: 1 1 100%; }
    .ticket-btn{ width: 100%; justify-content: center; }
    .tk-card__qr, .tk-card__ph{ width: min(76vw, 300px); }
    .tk-card__body{ padding: 1rem 1rem 1.15rem; }
    .tk-card__hint{ font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce){
    .ticket-btn, .tk-mask, .tk-card{ transition: none !important; }
    .ticket-btn::after{ display: none; }
}
