.vault-scene { position:relative; }
.artifact { position:absolute; border:0; background:transparent; padding:0; cursor:pointer; touch-action:manipulation; }
.artifact:hover { backdrop-filter:brightness(1.07); }
.artifact:focus-visible { outline:2px solid #f5d28c; outline-offset:-2px; }
.register { left:48.5%; top:77%; width:29%; height:22%; }
@media(max-width:700px) {
  .register { left:36%; top:75%; width:38%; height:19%; }
}
.artifact[data-game="0"] { left:39.062%; top:21.065%; width:16.081%; height:18.981%; }
.artifact[data-game="1"] { left:57.682%; top:21.065%; width:16.341%; height:18.981%; }
.artifact[data-game="2"] { left:76.823%; top:19.676%; width:15.430%; height:20.486%; }
.artifact[data-game="3"] { left:38.932%; top:42.014%; width:16.341%; height:16.782%; }
.artifact[data-game="4"] { left:57.617%; top:42.014%; width:16.406%; height:16.782%; }
.artifact[data-game="5"] { left:76.497%; top:42.014%; width:15.885%; height:16.782%; }
.artifact[data-game="6"] { left:38.932%; top:60.532%; width:16.341%; height:16.898%; }
.artifact[data-game="7"] { left:57.682%; top:60.532%; width:16.341%; height:16.898%; }
.artifact[data-game="8"] { left:76.693%; top:60.532%; width:15.625%; height:16.898%; }
@media(max-width:700px) {
  .artifact[data-game="0"] { left:31.2500%; top:19.4010%; width:21.0938%; height:12.7604%; }
  .artifact[data-game="1"] { left:53.1250%; top:18.6198%; width:20.6055%; height:13.5417%; }
  .artifact[data-game="2"] { left:74.1211%; top:18.2292%; width:22.0703%; height:13.9323%; }
  .artifact[data-game="3"] { left:30.7617%; top:33.9844%; width:20.8008%; height:13.2812%; }
  .artifact[data-game="4"] { left:52.0508%; top:33.9844%; width:21.3867%; height:13.2812%; }
  .artifact[data-game="5"] { left:74.1211%; top:34.0495%; width:21.6797%; height:13.2161%; }
  .artifact[data-game="6"] { left:30.8594%; top:49.0234%; width:20.7031%; height:13.7370%; }
  .artifact[data-game="7"] { left:51.8555%; top:49.0234%; width:21.7773%; height:13.7370%; }
  .artifact[data-game="8"] { left:74.0234%; top:48.9583%; width:21.8750%; height:13.8021%; }
}

/* Vault Register */
.interior dialog {
  width: min(1040px,calc(100% - 24px)); max-width: none; max-height: 92dvh;
  padding: 0; border: 1px solid #79512a; border-radius: 3px; background: #382417;
  color: #312014; box-shadow: 0 18px 80px #000d; font: 16px/1.55 Arial,sans-serif;
  overflow: auto; overscroll-behavior: contain;
}
.interior dialog::backdrop { background: #100a06c2; }
.archive-top {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center;
  justify-content: space-between; padding: 10px 20px; color: #e7c38a;
  background: #382417 url('/assets/archive-wood.webp') center/cover;
  letter-spacing: .08em; font-weight: bold; text-transform: uppercase; gap: 8px;
}
.interior dialog .close {
  flex: none; width: 44px; height: 44px; border: 1px solid #80592e; border-radius: 50%;
  background: linear-gradient(#d2ab6d,#8c5b2e); color: #25160c; font-size: 28px; line-height: 1; padding: 0;
}
.archive-paper { background: #ddbd86 url('/assets/archive-paper.webp'); margin: 12px; padding: 20px; }
.archive-paper > h2 { color: #39200e; margin: 0 0 12px; font-size: clamp(20px,3vw,30px); }
.interior dialog h3 { font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: #664021; margin: 18px 0 6px; }
.interior dialog p { margin: 5px 0 12px; }
.record-list { list-style: none; padding: 0; }
.record-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.record-list small { color: #654625; }
.interior progress { width: 100%; accent-color: #795024; }
.reset-record { border: 1px solid #8d6338; background: #5d3b20; color: #fff0d4; padding: 10px 14px; min-height: 44px; }

/* Examination records */
.interior dialog.game-record {
  width: min(1067px,calc(100vw - 24px)); max-width: calc(100vw - 24px); min-width: 0; max-height: 94dvh;
  margin: auto; overflow-x: hidden; border: 0; border-radius: 0;
  background: #382319 url('/assets/archive-wood.webp'); scrollbar-width: thin;
  scrollbar-color: #92613a #342017; font: 16px/1.4 Arial,sans-serif; box-shadow: 0 15px 70px #000c;
}
.game-record .archive-top { aspect-ratio: 1067/72; padding: 0; background: url('/assets/record-top.webp') center/100% 100% no-repeat; z-index: 5; }
.game-record .archive-top span, .game-record .archive-paper > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.game-record .archive-paper > h2 { color: #ecd4a6; }
.interior .game-record .close { position: absolute; right: 0; top: 0; width: 6%; height: 100%; min-width: 32px; background: transparent; border: 0; color: transparent; border-radius: 0; }
.game-record .archive-paper { margin: 0; padding: 0 3.4%; background: url('/assets/record-left.webp') left top/3.4% 100% no-repeat, url('/assets/record-right.webp') right top/3.4% 100% no-repeat; }
.game-record .archive-paper::after { content: ''; display: block; height: 28px; margin: 0 -3.65%; background: url('/assets/record-bottom.webp') center/100% 100% no-repeat; }
.folder-stack { display: grid; grid-template-columns: minmax(0,1fr); }
.file-tabs { display: flex; align-items: end; isolation: isolate; margin: 0 5% -2px; grid-column: 1/-1; }
.file-tabs button {
  flex: 1; position: relative; min-width: 0; min-height: 44px; height: 46px; border: 0; padding: 0;
  font: bold 13px/1.15 Arial,sans-serif; color: #3b2515; background: center bottom/100% 100% no-repeat; filter: brightness(.83);
}
.file-tabs button[aria-selected=true] { height: 52px; min-height: 0; filter: none; z-index: 2; }
.file-tabs button:nth-child(1) { background-image: url('/assets/record-tab-0.webp'); }
.file-tabs button:nth-child(2) { background-image: url('/assets/record-tab-1.webp'); }
.file-tabs button:nth-child(3) { background-image: url('/assets/record-tab-2.webp'); }
.file-tabs button:nth-child(4) { background-image: url('/assets/record-tab-3.webp'); }
.file-tabs button:focus-visible { outline: 2px solid #573214; outline-offset: -5px; }
.archive-game { display: grid; grid-template-columns: 38% minmax(0,1fr); align-items: stretch; position: relative; }
.archive-exhibit {
  min-width: 0; margin: 0; padding: 20px 14px; text-align: center; display: flex; flex-direction: column;
  justify-content: center; background: #50191b url('/assets/record-velvet.webp') center/100% 100% no-repeat;
  border: 14px solid transparent; border-image: url('/assets/record-exhibit.webp') 27 stretch; box-shadow: inset 0 0 28px #21080c;
}
.original-exhibit { border: 0; box-shadow: none; padding: 0; background: #35180d url('/assets/record-velvet.webp') center/cover; }
.velvet-display { display: flex; align-items: center; justify-content: center; padding: 12px 0; }
.game-cover { width: auto; max-width: 100%; max-height: 270px; height: auto; margin: auto; object-fit: contain; filter: drop-shadow(3px 7px 6px #0008); }
.archive-exhibit figcaption { background: linear-gradient(#e5bd77,#ad7739); color: #241307; font: bold 12px Arial; letter-spacing: .04em; border: 1px solid #795025; border-radius: 4px; box-shadow: 0 2px 3px #0009,inset 0 1px #fbdca0; padding: 5px 12px; margin: 10px auto 0; }
.archive-file { min-width: 0; background: var(--parchment) center/100% 100% no-repeat; padding: clamp(22px,2.4vw,36px) clamp(20px,2.6vw,38px); color: #29160a; overflow-wrap: anywhere; }
.archive-file h2 { text-align: center; font: bold italic clamp(24px,3vw,39px)/1.1 Georgia,serif; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #95602f60; color: #211408; }
.archive-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; margin: 3px 0 12px; font-size: 14px; }
.archive-facts dt, .archive-facts dd { display: inline; }
.archive-facts dt { font-weight: bold; }
.archive-facts dd { margin: 0 0 0 5px; }
.game-record .archive-file p { margin: 3px 0 9px; }
.game-record .archive-file h3 {
  display: table; max-width: 100%; padding: 4px 18px; position: relative;
  background: linear-gradient(180deg,#a06b32 0%,#edc27d 18%,#c28b44 55%,#8b5525 94%);
  border: 1px solid #70401c; border-radius: 5px; box-shadow: inset 0 1px 1px #ffe1a0,0 2px 3px #42240a66;
  color: #2b1709; font: bold 12px/1.2 Arial,sans-serif; letter-spacing: .025em; margin: 12px 0 6px;
  clip-path: polygon(5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px),0 5px);
}
.archive-file h3::before, .archive-file h3::after { content: ''; position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: radial-gradient(circle at 30% 25%,#f5d18a,#77451c 65%,#2e160b); transform: translateY(-50%); }
.archive-file h3::before { left: 5px; }
.archive-file h3::after { right: 5px; }
.sealed-note { position: relative; background: var(--parchment) center/100% 100% no-repeat; padding: 20px 20px 20px 85px; margin: 12px -8px 0; filter: drop-shadow(0 3px 3px #5b32176b); }
.sealed-note::before { content: ''; position: absolute; background: url('/assets/seal-v14.webp') center/contain no-repeat; left: 15px; top: 18px; width: 62px; height: 79px; }
.game-record .sealed-note h3 { margin-top: 0; }
.game-record .sealed-note p { font-style: italic; margin-bottom: 0; }
@media (max-width: 760px) {
  .interior dialog.game-record { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  .archive-game { display: flex; flex-direction: column; }
  .archive-file { padding: 24px 19px 30px; }
  .archive-exhibit:not(.original-exhibit) { padding: 10px; }
  .game-cover { max-height: 200px; }
  .sealed-note { padding: 17px 17px 22px 61px; }
  .sealed-note::before { left: 10px; top: 15px; width: 45px; height: 58px; }
  .file-tabs { position: sticky; top: calc((100vw - 16px)*116/680); z-index: 3; background: #392318; }
  .game-record .archive-file h3 { font-size: 11px; }
}
@media (max-width: 700px) {
  .interior dialog:not(.game-record) { width: calc(100% - 16px); }
  .archive-top { padding: 6px 10px; font-size: 12px; }
  .interior dialog.game-record { font-size: 15px; }
  .game-record .archive-top { aspect-ratio: 680/116; background-image: url('/assets/record-mobile-top.webp'); }
  .game-record .archive-paper { background-image: url('/assets/record-mobile-left.webp'),url('/assets/record-mobile-right.webp'); }
  .game-record .archive-paper::after { height: 18px; background-image: url('/assets/record-mobile-bottom.webp'); }
  .file-tabs { margin: 0 1% -1px; }
  .file-tabs button { height: 36px; min-height: 36px; font-size: 10px; }
  .file-tabs button[aria-selected=true] { height: 40px; min-height: 40px; }
  .file-tabs button:nth-child(1) { background-image: url('/assets/record-mobile-tab-0.webp'); }
  .file-tabs button:nth-child(2) { background-image: url('/assets/record-mobile-tab-1.webp'); }
  .file-tabs button:nth-child(3) { background-image: url('/assets/record-mobile-tab-2.webp'); }
  .file-tabs button:nth-child(4) { background-image: url('/assets/record-mobile-tab-3.webp'); }
  .archive-file, .archive-exhibit { width: 100%; }
  .archive-file h2 { font-size: 26px; }
  .archive-facts { font-size: 13px; gap: 4px 6px; }
  .interior .game-record .close { width: 12%; height: 80%; }
}
