/* =====================================================================
 * tickets.css —— 门票详情 TICKETS（对应「泰拉万象」板块）
 * 横向手风琴：鼠标悬停 / 点击 / 键盘聚焦时展开对应票种
 * 移动端：全部展开、纵向排列
 * ===================================================================== */
.tickets__body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: clamp(14px, 2.2vh, 26px);
  padding-top: clamp(14px, 2.4vh, 30px);
}
.tdeck { flex: 1 1 auto; min-height: 300px; max-height: 560px; display: flex; gap: clamp(8px, .8vw, 14px); }

/* ---------------------------------------------------------------------
 * 票卡
 * ------------------------------------------------------------------- */
.tcard {
  --cut: 18px;
  position: relative; isolation: isolate; overflow: hidden;
  flex: 1 1 0; min-width: 0;
  background-color: var(--c-line-2);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: flex-grow .75s var(--ease-out), background-color .4s;
}
.tcard::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 34, 36, .95) 0%, rgba(3, 14, 16, .97) 66%);
  clip-path: polygon(0 0, calc(100% - var(--cut) + .6px) 0, 100% calc(var(--cut) - .6px), 100% 100%, calc(var(--cut) - .6px) 100%, 0 calc(100% - var(--cut) + .6px));
}
.tcard::after {
  content: ""; position: absolute; left: 1px; top: 1px; height: 3px; width: 0; z-index: 3;
  background: var(--c-primary); box-shadow: 0 0 12px var(--c-primary);
  transition: width .7s var(--ease-out);
}
.tcard:hover { background-color: var(--c-line-3); }
.tcard.is-active { flex-grow: 2.8; background-color: rgba(var(--c-primary-rgb), .72); }
.tcard.is-active::before {
  background:
    radial-gradient(ellipse 70% 60% at 82% 28%, rgba(var(--c-primary-rgb), .15), transparent 70%),
    linear-gradient(180deg, rgba(10, 40, 42, .96) 0%, rgba(3, 14, 16, .97) 70%);
}
.tcard.is-active::after { width: calc(100% - var(--cut) - 2px); }
.tcard:has(.tcard__toggle:focus-visible) { background-color: var(--c-rim); }
.tcard:has(.tcard__toggle:focus-visible)::before { inset: 2px; }

/* 覆盖整张卡片的切换按钮（屏幕阅读器可读，键盘可聚焦） */
.tcard__toggle { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.tcard__toggle:focus-visible { outline: none; }
.tcard.is-active .tcard__toggle { cursor: default; }

/* 背景大字：收起时位于卡片中部留白处，展开后移到右下角 */
.tcard__glyph {
  position: absolute; z-index: 0; right: -.04em; top: 44%;
  font-family: var(--f-cal); font-size: clamp(150px, min(13vw, 28vh), 280px); line-height: 1;
  color: rgba(var(--c-primary-rgb), .045);
  -webkit-text-stroke: 1px rgba(95, 242, 223, .2);
  transform: translateY(-50%);
  pointer-events: none; user-select: none;
  transition: color .6s, top .8s var(--ease-out), transform .8s var(--ease-out), -webkit-text-stroke-color .6s;
}
.tcard:hover .tcard__glyph { color: rgba(var(--c-primary-rgb), .08); }
.tcard.is-active .tcard__glyph {
  top: 100%; transform: translate(-4%, -94%) scale(1.12); transform-origin: 100% 100%;
  color: rgba(var(--c-primary-rgb), .1); -webkit-text-stroke-color: rgba(95, 242, 223, .38);
}

/* 内容层：默认不接收点击（让点击落到切换按钮上） */
.tcard__inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(16px, 1.6vw, 26px) clamp(16px, 1.6vw, 28px);
  pointer-events: none;
}
.tcard__top { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.tcard__no { flex: none; font-family: var(--f-en); font-weight: 700; font-size: clamp(30px, 2.4vw, 42px); line-height: .9; color: var(--c-text); }
.tcard__no small { display: block; margin-top: 7px; font-size: 10px; letter-spacing: .34em; color: var(--c-rim); }
.tcard__en {
  flex: 1; min-width: 0; padding-top: 3px;
  font-family: var(--f-en); font-weight: 700; font-size: 12px; letter-spacing: .26em; color: var(--c-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .4s;
}
.tcard.is-active .tcard__en { color: var(--c-rim); }

.tcard__id { max-width: 100%; transition: max-width .6s var(--ease-out); }
.tcard.is-active .tcard__id { max-width: 40%; }
.tcard__type { display: flex; flex-wrap: wrap; gap: 6px; }
.tcard__name {
  margin-top: 10px;
  font-family: var(--f-serif); font-weight: 900; font-size: clamp(26px, 2.3vw, 42px); line-height: 1.15; letter-spacing: .14em;
  white-space: nowrap;
}
.tcard__price { display: flex; align-items: baseline; gap: 2px; margin-top: 10px; font-family: var(--f-en); font-weight: 700; font-size: clamp(30px, 2.6vw, 48px); line-height: 1; color: var(--c-glow); white-space: nowrap; }
.tcard__price small { font-size: .46em; color: var(--c-rim); margin-right: 2px; }
.tcard__price em { margin-left: 8px; font-family: var(--f-body); font-size: 13px; font-weight: 400; letter-spacing: .1em; color: var(--c-muted); }
.tcard.is-soldout .tcard__price { color: var(--c-dim); text-decoration: line-through; text-decoration-thickness: 2px; }

/* 展开后的详情 */
.tcard__detail {
  position: absolute; z-index: 2;
  top: calc(clamp(16px, 1.6vw, 26px) + 64px); bottom: clamp(16px, 1.6vw, 26px); right: clamp(16px, 1.6vw, 28px);
  width: 55%;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity .25s, transform .4s var(--ease-out), visibility .25s;
}
.tcard.is-active .tcard__detail {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity .5s var(--ease-out) .35s, transform .7s var(--ease-out) .35s, visibility 0s .35s;
}
.tcard__status { display: flex; align-items: center; gap: 10px; flex: none; font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--c-pale); }
.tcard__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-rim); box-shadow: 0 0 8px var(--c-rim); }
.tcard__status.is-onsale { color: var(--c-primary); }
.tcard__status.is-onsale i { background: var(--c-primary); animation: statusPulse 1.6s ease-in-out infinite; }
.tcard__status.is-soldout { color: var(--c-dim); }
.tcard__status.is-soldout i { background: var(--c-dim); box-shadow: none; }
@keyframes statusPulse { 50% { box-shadow: 0 0 0 6px rgba(var(--c-primary-rgb), 0), 0 0 14px var(--c-primary); opacity: .6; } }
.tcard__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 12px; padding-right: 8px; }
.tcard__perks { display: grid; gap: 6px; }
.tcard__perks li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.65; letter-spacing: .04em; }
.tcard__perks li::before { content: ""; position: absolute; left: 1px; top: .64em; width: 6px; height: 6px; background: var(--c-primary); transform: rotate(45deg); }
.tcard__note { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--c-line-2); font-size: 12.5px; line-height: 1.75; color: var(--c-muted); }
.tcard__buy { flex: none; align-self: flex-start; margin-top: 14px; min-height: 46px; font-size: 15px; }
.tcard__buy[aria-disabled="true"] { background: var(--c-bg-3); color: var(--c-dim); pointer-events: none; }

/* ---------------------------------------------------------------------
 * 购票须知 + 总按钮
 * ------------------------------------------------------------------- */
.tickets__foot { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px 48px; }
.tnotes__title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.tnotes__title b { font-family: var(--f-serif); font-weight: 900; font-size: 16px; letter-spacing: .16em; }
.tnotes__title i { font-family: var(--f-en); font-weight: 700; font-size: 12px; letter-spacing: .3em; color: var(--c-rim); }
.tnotes__title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--c-line-2), transparent); transform: translateY(-4px); }
.tnotes ol { columns: 2; column-gap: 40px; counter-reset: tn; }
.tnotes li {
  position: relative; break-inside: avoid; margin-bottom: 4px; padding-left: 30px;
  font-size: 13px; line-height: 1.75; letter-spacing: .04em; color: var(--c-muted);
  counter-increment: tn;
}
.tnotes li::before { content: counter(tn, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: var(--f-en); font-weight: 700; font-size: 13px; letter-spacing: .06em; color: var(--c-rim); }
.tickets__cta { min-height: 58px; padding: 0 32px 0 28px; font-size: 17px; }
.tnotes__more { display: none; }

/* 高度较小时收起票卡里的备注 */
@media (min-width: 1024px) and (max-height: 820px) {
  .tcard__note { display: none; }
  .tcard__perks li { font-size: 13px; line-height: 1.55; }
}
/* 更矮的屏幕：「购票须知」收成一个按钮（点击弹窗查看），把高度留给票卡 */
@media (min-width: 1024px) and (max-height: 760px) {
  .tickets .sec-head__sub { display: none; }
  .tdeck { min-height: 240px; }
  .tickets__foot { align-items: center; }
  .tnotes__title, .tnotes ol { display: none; }
  .tnotes__more { display: inline-flex; }
  .tickets__cta { min-height: 52px; }
}

/* ---------------------------------------------------------------------
 * 移动端：全部展开
 * ------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .tdeck { flex-direction: column; min-height: 0; max-height: none; gap: 12px; }
  .tcard { --cut: 12px; flex: none; }
  .tcard.is-active { flex-grow: 0; }
  .tcard::after { width: calc(100% - var(--cut) - 2px); opacity: .5; }
  .tcard.is-active::after { opacity: 1; }
  .tcard__toggle { display: none; }
  .tcard__inner { pointer-events: auto; padding: 16px 18px 18px; }
  .tcard__id, .tcard.is-active .tcard__id { max-width: none; margin-top: 18px; }
  .tcard__name { font-size: 30px; }
  .tcard__price { font-size: 34px; }
  .tcard__glyph, .tcard.is-active .tcard__glyph { font-size: 170px; top: 20px; transform: none; }
  .tcard__detail, .tcard.is-active .tcard__detail {
    position: static; width: auto; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--c-line);
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .tcard__scroll { overflow: visible; padding-right: 0; }
  .tcard__note { display: block; }
  .tcard__buy { align-self: stretch; justify-content: center; }
  .tickets__foot { grid-template-columns: 1fr; }
  .tnotes ol { columns: 1; }
  .tickets__cta { justify-content: center; }
}
