.ticket-cabinet {
  --cabinet-ink: #353831;
  --cabinet-gold: #657768;
  --cabinet-paper: #f7f5f0;
  width: min(1080px, calc(100vw - 40px));
  max-width: 1080px;
  max-height: calc(100svh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #ccd2c5;
  border-radius: 4px;
  color: var(--cabinet-ink);
  background: #f7f5f0;
  box-shadow: 0 30px 120px #53614f26, 0 2px 5px #53614f0c;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a2ab97 #f7f5f0;
}
.ticket-cabinet::backdrop { background: #efede6cc; backdrop-filter: blur(15px); }
.ticket-cabinet[open] { animation: cabinet-open .58s cubic-bezier(.16,1,.3,1) both; }
.cabinet-shell { padding: 34px 42px 23px; overflow: hidden; }
.cabinet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cabinet-eyebrow { margin: 0 0 12px; font: 10px/1.5 ui-monospace, monospace; letter-spacing: .22em; color: #62695e; }
.cabinet-heading h2 { margin: 0; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: clamp(25px, 3.4vw, 38px); font-weight: 500; line-height: 1.45; letter-spacing: .04em; }
.cabinet-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #ccd2c5; border-radius: 50%; background: transparent; color: #353831; font-size: 27px; font-weight: 200; transition: background .2s, transform .25s; }
.cabinet-close:hover { background: #e4e9e0; transform: rotate(90deg); }
.cabinet-summary { margin: 15px 0 20px; font-size: 11px; line-height: 1.8; letter-spacing: .06em; color: #62695e; }
.cabinet-scene { position: relative; isolation: isolate; margin: 0 -42px; padding: 33px 24px 24px; overflow: hidden; color: #353831; background: radial-gradient(ellipse at 51% -10%, #f4f5ef 0%, #ecefe7 44%, #e4e9df 100%); border-block: 1px solid #ccd2c5; }
.cabinet-scene::before { content: ""; position: absolute; inset: 13px; z-index: -1; border: 1px solid #ccd2c580; pointer-events: none; }
.cabinet-scene::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .2; background-image: repeating-linear-gradient(0deg, transparent 0 2px, #65776816 2px 3px); pointer-events: none; }
.cabinet-grain { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 55%, transparent 8%, #65776806 85%); }
.cabinet-edition { position: relative; text-align: center; margin-bottom: 14px; font: 8px/1.5 ui-monospace, monospace; letter-spacing: .24em; color: #62695e; }
.cabinet-stage { --drag-x: 0px; position: relative; height: 438px; margin: 0 auto; width: min(750px, 100%); perspective: 1400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cabinet-card {
  --shine-x: 52%; --shine-y: 28%; --tilt-x: 0deg; --tilt-y: 0deg;
  position: absolute; left: 50%; top: 16px; display: block;
  width: 276px; height: 383px; margin-left: -138px; padding: 0;
  border: 0; background: transparent; text-align: left; color: #353831; cursor: pointer;
  transform: translateX(calc(var(--card-offset) * 74px)) translateY(calc(var(--card-distance) * 18px)) rotate(calc(var(--card-offset) * 11deg)) scale(calc(1 - var(--card-distance) * .043));
  transition: transform .55s cubic-bezier(.2,.75,.15,1), filter .3s, opacity .3s;
  filter: none;
  -webkit-tap-highlight-color: transparent;
}
.cabinet-card.is-selected { transform: translateX(var(--drag-x)) translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); filter: none; }
.cabinet-card:not(.is-selected):hover { filter: none; }
.cabinet-card:focus-visible { outline: 2px solid #657768; outline-offset: 8px; border-radius: 2px; }
.cabinet-paper { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2,.68,.15,1); }
.cabinet-card.is-flipped .cabinet-paper { transform: rotateY(180deg); }
.cabinet-face { position: absolute; display: flex; flex-direction: column; inset: 0; overflow: hidden; padding: 19px 19px 0; border-radius: 2px; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: linear-gradient(115deg, #fffdf7 0%, #f3eddd 78%); box-shadow: 0 24px 29px -13px #53614f36, 0 2px 5px #53614f1a, inset 0 0 0 1px #fffef888; }
.cabinet-face::before { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 4; opacity: .36; background-image: repeating-linear-gradient(91deg, #796c4c08 0 1px, transparent 1px 4px), repeating-linear-gradient(0deg, #9c825008 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.cabinet-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background: radial-gradient(ellipse at var(--shine-x) var(--shine-y), #ffffff61, #ffffff00 53%); opacity: .4; }
.cabinet-ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 22px; margin-bottom: 15px; }
.cabinet-ticket-top > span { font: 600 11px/1.4 "Songti SC", SimSun, serif; letter-spacing: .14em; }
.cabinet-ticket-top small { max-width: 124px; font: 6px/1.7 ui-monospace, monospace; letter-spacing: .12em; color: #62695e; text-align: right; }
.cabinet-image { position: relative; display: grid; place-items: center; width: 100%; height: 165px; flex-shrink: 0; overflow: hidden; background: #e3dfd0; box-shadow: inset 0 0 0 1px #233e3022; }
.cabinet-image img { display: block; width: 100%; height: 100%; object-fit: cover; filter: none; }
.cabinet-no-image { font: 14px/1.5 "Songti SC", SimSun, serif; letter-spacing: .3em; color: #62695e; }
.cabinet-photo-title { position: relative; display: block; margin-top: 17px; padding-right: 29px; font: 600 19px/1.4 "Songti SC", SimSun, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-photo-place { display: block; margin-top: 6px; padding-right: 35px; font-size: 9px; color: #62695e; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: .08em; }
.cabinet-foil-seal { position: absolute; right: 13px; top: 233px; display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid #9e9b8580; border-radius: 50%; color: transparent; background: linear-gradient(125deg, #7e8578 5%, #d9dbcf 23%, #fffdeb 38%, #899283 49%, #dfdfcf 58%, #879080 75%, #efead6 93%); background-size: 210% 210%; background-position: var(--shine-x) var(--shine-y); background-clip: text; -webkit-background-clip: text; font: 700 10px ui-monospace, monospace; letter-spacing: .16em; transform: rotate(-21deg); box-shadow: 0 0 0 3px #bfbc9924, inset 0 0 0 3px #8a917512; text-shadow: 0 1px 0 #faffec18; }
.cabinet-card-stub { position: absolute; bottom: 0; left: 0; right: 0; height: 62px; display: flex; align-items: center; gap: 8px; padding: 0 18px; border-top: 1px dashed #918c7373; color: #62695e; background: #e6e6d642; }
.cabinet-card-stub::before, .cabinet-card-stub::after { content: ""; position: absolute; top: -7px; width: 13px; height: 13px; border-radius: 50%; background: #ecefe7; box-shadow: inset 0 1px 2px #53614f12; }
.cabinet-card-stub::before { left: -7px; }.cabinet-card-stub::after { right: -7px; }
.cabinet-card-stub small { font: 7px/1.4 ui-monospace, monospace; letter-spacing: .06em; }
.cabinet-card-stub > span { font: 8px/1.4 ui-monospace, monospace; margin-left: auto; }
.cabinet-barcode { width: 26px; height: 20px; margin-left: 5px; background: repeating-linear-gradient(90deg, #415a4199 0 1px, transparent 1px 3px, #415a4199 3px 5px, transparent 5px 6px, #415a4199 6px 7px, transparent 7px 10px); }
.cabinet-back { transform: rotateY(180deg); background: linear-gradient(135deg, #efebdc, #f9f5e9 50%, #eae5d5); }
.cabinet-back-mark { position: absolute; right: 17px; top: 57px; width: 39px; padding: 9px 0; border: 1px solid #a7785559; color: #966e4f80; font: 12px/1.25 "Songti SC", SimSun, serif; text-align: center; letter-spacing: .15em; transform: rotate(8deg); }
.cabinet-back-label { font-size: 8px; letter-spacing: .17em; color: #62695e; margin: 7px 0 12px; }
.cabinet-note { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; min-height: 144px; max-height: 144px; padding-right: 22px; font: 13px/24px "Songti SC", SimSun, serif; letter-spacing: .035em; background: repeating-linear-gradient(transparent 0 23px, #a69e8524 23px 24px); color: #56634e; }
.cabinet-dates { display: grid; gap: 7px; margin-top: 19px; font: 8px/1.5 ui-monospace, monospace; color: #62695e; }
.cabinet-navigation { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: -11px; position: relative; z-index: 12; }
.cabinet-navigation button { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid #bcc7b4; border-radius: 50%; color: #535d50; font-size: 18px; background: #f7f5f0a6; transition: background .2s; }
.cabinet-navigation button:hover:not(:disabled) { background: #dce5d6; }
.cabinet-navigation button:disabled { opacity: .3; cursor: default; }
.cabinet-index { min-width: 70px; text-align: center; font: 10px/1.4 ui-monospace, monospace; letter-spacing: .15em; color: #62695e; }
.cabinet-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 17px; }
.cabinet-actions button { min-height: 44px; padding: 9px 17px; border: 1px solid #bcc7b4; color: #535d50; background: transparent; border-radius: 2px; font-size: 10px; letter-spacing: .08em; }
.cabinet-actions .cabinet-open-photo { background: #dce5d6; color: #353831; border-color: #b5c2ac; }
.cabinet-actions button:disabled { opacity: .55; cursor: default; }
.cabinet-instruction { margin: 17px 0 2px; text-align: center; font-size: 8px; line-height: 1.7; letter-spacing: .09em; color: #62695e; }
.cabinet-empty { min-height: 386px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 14px 0 21px; text-align: center; }
.cabinet-empty-book { position: relative; display: grid; place-content: center; gap: 12px; width: 138px; height: 180px; margin: 0 0 25px; color: #586b5b; background: linear-gradient(90deg, #d2dccc 0 10px, #edf1e8 11px 12px, #b6c6ac 13px 22px, #dfe6d9 23px 100%); border: 1px solid #9eaf92; border-radius: 2px 5px 5px 2px; transform: rotate(-8deg); box-shadow: 10px 13px 0 -6px #ded7bd, 12px 15px 0 -6px #8e957e, 17px 27px 30px #53614f24; }
.cabinet-empty-book::after { content: ""; position: absolute; inset: 15px 13px 15px 25px; border: 1px solid #9faf9570; }
.cabinet-empty-book span { font: 18px/1.5 "Songti SC", SimSun, serif; letter-spacing: .15em; }
.cabinet-empty-book small { font: 6px/1.5 ui-monospace, monospace; letter-spacing: .13em; }
.cabinet-empty h3 { margin: 0 0 10px; font: 23px/1.5 "Songti SC", SimSun, serif; font-weight: 400; color: #353831; }
.cabinet-empty p { max-width: 320px; margin: 0; font-size: 11px; line-height: 2; color: #62695e; }
.cabinet-login { min-height: 44px; margin-top: 21px; padding: 12px 19px; border: 1px solid #bcc7b4; color: #535d50; background: transparent; font-size: 10px; letter-spacing: .08em; }
.cabinet-feedback { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; min-height: 60px; padding-top: 8px; }
.cabinet-status { margin: 0; color: #62695e; font-size: 10px; line-height: 1.8; }
.cabinet-retry, .cabinet-more { min-height: 44px; padding: 9px 13px; border: 0; color: #535d50; background: transparent; font-size: 10px; text-decoration: underline; text-underline-offset: 4px; }
.cabinet-list { margin-top: 2px; border-top: 1px solid #50674120; border-bottom: 1px solid #50674120; }
.cabinet-list summary { min-height: 44px; padding: 14px 0; color: #535d50; font-size: 10px; cursor: pointer; }
.cabinet-list ol { list-style: none; padding: 0 0 10px; margin: 0; }
.cabinet-list-item { display: flex; gap: 13px; align-items: center; width: 100%; min-height: 44px; padding: 9px; text-align: left; background: transparent; color: #353831; border: 0; font-size: 11px; }
.cabinet-list-item[aria-current="true"] { background: #dfe4d4; }
.cabinet-list-item small { color: #62695e; font: 9px ui-monospace, monospace; }
.cabinet-list-item > span { flex: 1; }.cabinet-list-item time { color: #62695e; font: 9px ui-monospace, monospace; }.cabinet-list-item em { color: #586b5b; font-style: normal; font-size: 9px; }
.cabinet-footnote { margin: 14px 0 0; color: #62695e; font-size: 9px; line-height: 1.8; text-align: center; }
.ticket-cabinet button:focus-visible, .cabinet-list summary:focus-visible { outline: 2px solid #657768; outline-offset: 4px; }
.ticket-cabinet [hidden], .cabinet-kept-toast[hidden] { display: none !important; }
.cabinet-kept-toast { position: fixed; z-index: 999; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 13px 19px 13px 14px; border: 1px solid #ccd2c5; border-radius: 3px; background: #f7f5f0f5; color: #353831; box-shadow: 0 10px 35px #53614f20; font: 11px/1.6 system-ui, sans-serif; white-space: nowrap; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: transform .45s, opacity .45s; }
.cabinet-kept-toast.is-kept { transform: translate(-50%, 0); opacity: 1; }
.cabinet-toast-book { display: block; position: relative; width: 28px; height: 32px; background: #d2dccc; border: 1px solid #9eaf92; border-left: 4px solid #b6c6ac; border-radius: 1px 3px 3px 1px; box-shadow: 3px 2px 0 -1px #eadfc5; perspective: 100px; }
.cabinet-toast-book::after { content: ""; position: absolute; inset: 3px 3px 3px 1px; border: 1px solid #9faf9570; background: #dfe6d9; transform-origin: left; }
.cabinet-kept-toast.is-kept .cabinet-toast-book::after { animation: cabinet-book-close .85s ease both; }
.cabinet-flying-ticket { position: fixed; pointer-events: none; z-index: 998; display: grid; place-items: center; height: 61px; border-bottom: 1px dashed #a79f81; background: #f3ecd9; color: #62695e; font: 8px/1.4 ui-monospace, monospace; letter-spacing: .1em; box-shadow: 0 6px 14px #132b2633; }
@keyframes cabinet-open { from { opacity: 0; transform: translateY(20px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes cabinet-book-close { 0% { transform: rotateY(-100deg); } 70% { transform: rotateY(8deg); } 100% { transform: rotateY(0); } }
@media (max-width: 640px) {
  .ticket-cabinet { width: calc(100vw - 16px); max-height: calc(100svh - 16px); }
  .cabinet-shell { padding: 24px 20px 18px; }.cabinet-scene { margin-inline: -20px; padding: 26px 12px 21px; }
  .cabinet-heading h2 { font-size: 24px; }.cabinet-eyebrow { font-size: 8px; margin-bottom: 9px; }
  .cabinet-summary { font-size: 10px; margin-block: 12px 17px; }.cabinet-close { width: 42px; height: 42px; }
  .cabinet-card { width: 250px; height: 365px; margin-left: -125px; transform: translateX(calc(var(--card-offset) * 33px)) translateY(calc(var(--card-distance) * 16px)) rotate(calc(var(--card-offset) * 8deg)) scale(calc(1 - var(--card-distance) * .055)); }
  .cabinet-face { padding-inline: 17px; }.cabinet-image { height: 152px; }.cabinet-photo-title { font-size: 18px; }.cabinet-foil-seal { top: 221px; right: 9px; }
  .cabinet-stage { height: 414px; }.cabinet-edition { font-size: 6px; letter-spacing: .16em; }.cabinet-note { min-height: 132px; max-height: 132px; line-height: 22px; background-size: auto; background-image: repeating-linear-gradient(transparent 0 21px, #a69e8524 21px 22px); }
  .cabinet-actions { gap: 8px; }.cabinet-actions button { font-size: 9px; padding-inline: 12px; }
  .cabinet-footnote { font-size: 8px; }.cabinet-kept-toast { font-size: 10px; padding-inline: 12px; }.cabinet-empty { min-height: 366px; }.cabinet-empty p { max-width: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket-cabinet[open], .cabinet-kept-toast.is-kept .cabinet-toast-book::after { animation: none; }
  .ticket-cabinet *, .cabinet-kept-toast { transition: none !important; }.cabinet-card.is-selected { transform: translateY(0); }
}
