/* The card's square portrait and compact caption share a 4:5 collectible frame. */
.bar-experience .opening-dialog.is-showcase{width:740px;max-width:calc(100vw - 24px);padding:24px 32px 18px;overflow-x:clip;background:radial-gradient(ellipse at 50% 42%,color-mix(in srgb,var(--pack-accent),#151019 94%),#100e14 75%)}
.bar-experience .is-showcase h2{margin:16px 0 6px;font-size:clamp(24px,3.5vw,34px);line-height:1.1}
.bar-experience .is-showcase #opening-hint{min-height:16px;font-size:11px}
.bar-experience .is-showcase .reveal-stage{--stage-height:min(552px,max(210px,calc(94dvh - 340px)));--pack-height:min(380px,calc(var(--stage-height) - 70px),calc((100vw - 80px) / 1.2));--card-width:min(400px,82vw,calc(var(--stage-height) * 5 / 7));height:var(--stage-height);min-height:0;overflow:visible;margin:18px 0 16px}
.bar-experience .opening-dialog.is-showcase .sealed-pack{height:var(--pack-height);width:calc(var(--pack-height) * .62);overflow:visible}
.bar-experience .is-showcase .reveal-card{width:var(--card-width);height:auto;aspect-ratio:4 / 5;container-type:inline-size;perspective:1400px;cursor:pointer;outline-offset:5px;border-radius:12px}
.card-tilt{display:block;width:100%;height:100%;user-select:none;transform-style:preserve-3d;transform:rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));transition:transform .35s ease-out}
.is-inspecting .card-tilt{transition:transform .12s ease-out}
.is-showcase .card-front,.is-showcase .card-back{border-radius:15px;box-shadow:0 20px 50px #0009,0 0 0 1px #f2dfbe77}
.is-showcase .card-front{display:grid;grid-template-rows:80% 20%;padding:0;background:linear-gradient(135deg,#fff7e5,#ede4d6);border:1px solid #fff9;isolation:isolate}
.is-showcase .card-front>img{width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;border-radius:0;object-fit:cover;background:#151317}
.is-showcase .card-caption{padding:clamp(8px,3.5cqi,14px);gap:clamp(4px,1.8cqi,7px);min-height:0;margin:0;flex-direction:column;align-items:stretch;justify-content:center;border-top:3px solid var(--pack-accent)}
.is-showcase .card-caption b{font-size:clamp(11px,4.6cqi,18px);line-height:1.1;letter-spacing:-.3px;overflow-wrap:anywhere}
.is-showcase .card-caption .card-meta{display:flex;justify-content:space-between;align-items:center;gap:6px;font:clamp(6px,2.2cqi,9px)/1.2 var(--mono);color:#625849;letter-spacing:.03em}
.is-showcase .card-treatment{white-space:nowrap}
.is-showcase .card-back b{font-size:clamp(75px,11vw,125px);letter-spacing:-9px}
.is-showcase .card-back em{font-size:28px}.is-showcase .card-back>span{font-size:9px}.is-showcase .card-back small{font-size:9px}
.is-showcase .card-front::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:3;opacity:0;background:radial-gradient(ellipse at var(--glare-x,50%) var(--glare-y,30%),#fff9,transparent 62%);mix-blend-mode:soft-light;transition:opacity .3s}
.is-showcase .revealed.is-inspecting .card-front::after{opacity:.65}
.discovery-badge{position:absolute;right:22px;top:22px;z-index:4;background:#f6d889;color:#2d210e;border:1px solid #fff4c8;border-radius:20px;padding:7px 12px;font:700 10px 'Courier New',monospace;letter-spacing:1.5px;box-shadow:0 3px 15px #0005}
.bar-experience .is-showcase .burst{width:115%;height:115%;opacity:.12;transition:opacity 1s,transform 1.2s}
.bar-experience .is-showcase.is-discovery .burst{opacity:.35;transform:scale(1.08);animation:discovery-light 1.6s ease-out both}
.is-discovery .card-front{box-shadow:0 24px 65px #0009,0 0 0 1px #ffe5a8,0 0 36px color-mix(in srgb,var(--pack-accent),transparent 77%)}
.is-discovery .discovery-badge{animation:discovery-badge .6s cubic-bezier(.2,.8,.2,1) both}
.bar-experience .is-showcase .result-actions{max-width:480px;margin:auto;grid-template-columns:1fr 1fr;gap:8px}
.bar-experience .is-showcase .result-actions .text-button{padding:5px 0}
.opening-controls{display:grid;min-height:88px;align-items:start}
.opening-controls>.opening-actions,.opening-controls>.result-actions{grid-area:1/1;width:100%;align-self:start}
.bar-experience .is-showcase .bar-modal-tools{max-width:550px;margin:14px auto 0;padding-top:12px}
.bar-experience .is-showcase .opening-note{margin-top:10px!important}
@keyframes discovery-light{0%{opacity:.12;transform:scale(.85)}30%{opacity:.45}100%{opacity:.35;transform:scale(1.08)}}
@keyframes discovery-badge{from{opacity:0;transform:translateY(5px) scale(.9)}to{opacity:1;transform:none}}
@media(max-width:600px){.bar-experience .opening-dialog.is-showcase{padding:22px 16px 16px}.bar-experience .is-showcase h2{font-size:26px;max-width:100%;overflow-wrap:anywhere}.discovery-badge{top:12px;right:12px;padding:5px 8px}.bar-experience .is-showcase .bar-modal-tools{gap:10px 13px}}
@media(max-width:360px){.bar-experience .opening-dialog.is-showcase h2{font-size:22px}.bar-experience .is-showcase .reveal-stage{--stage-height:min(552px,max(180px,calc(94dvh - 340px)))}}
@media(prefers-reduced-motion:reduce){.card-tilt{transform:none!important;transition:none!important}.discovery-badge,.bar-experience .is-showcase.is-discovery .burst{animation:none}}
.is-quick .card-tilt{transform:none!important}

@media (max-width:600px) {
  .bar-experience #opening-dialog.is-showcase {
    width: min(100%, 460px);
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
    padding: 16px 12px 14px;
    overflow: clip;
  }
  .bar-experience .is-showcase h2 { margin: 10px 0 4px; font-size: clamp(21px, 6vw, 26px); }
  .bar-experience .is-showcase .reveal-stage {
    --stage-height: clamp(180px, calc(100dvh - 332px), 380px);
    --pack-height: min(300px, calc(var(--stage-height) - 44px), calc((100vw - 52px) / 1.2));
    margin: 9px auto 12px;
  }
  .bar-experience #opening-dialog .close-dialog { width:44px; height:44px; top:6px; right:6px; }
  .bar-experience #opening-dialog .opening-top { min-height:24px; padding-right:44px; }
  .bar-experience .is-showcase .opening-controls { min-height: 0; }
  .bar-experience .is-showcase #tear-button { min-height: 48px; }
  .bar-experience .is-showcase .bar-modal-tools {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 8px;
    margin-top:8px;
    padding-top:4px;
    font-size:10px;
  }
  .bar-experience .is-showcase .bar-modal-tools > :is(button,label) {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
  }
  .bar-experience :is(.browse-packs,.sound-toggle) { min-height:44px; }
  .bar-experience .pack-choice img { height: clamp(110px, 24dvh, 170px); }
  .bar-experience .is-showcase .result-actions .text-button { min-height:44px; }
}

/* The stage takes the space left by real content, rather than a guessed vh budget.
   Container units keep the pack and both card faces inside that same stable stage. */
.bar-experience #opening-dialog.is-showcase {
  width:min(1020px,calc(100vw - 24px));
  height:min(900px,calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding:20px 28px 14px;
  overflow:clip;
  grid-template-rows:auto auto auto minmax(0,1fr) auto auto auto;
}
.bar-experience #opening-dialog.is-showcase[open] { display:grid; }
.bar-experience #opening-dialog .opening-top { min-height:24px;align-items:center;padding-right:44px; }
.bar-experience #opening-dialog .close-dialog { width:44px;height:44px;top:8px;right:8px; }
.bar-experience #opening-dialog #opening-title { margin:6px 0 4px;font-size:clamp(21px,3vw,30px);line-height:1.12; }
.bar-experience #opening-dialog #opening-hint { min-height:16px;line-height:1.35; }
.bar-experience #opening-dialog .reveal-stage {
  container-type:size;
  width:100%;max-width:610px;height:auto;min-height:0;overflow:clip;
  margin:12px auto;
  --pack-height:min(380px,calc(100cqh - 72px),calc((100cqw - 24px) / 1.3));
  --card-width:min(400px,calc((100cqh - 12px) * .8),calc(100cqw - 24px));
}
.bar-experience #opening-dialog .reveal-card { min-width:0;min-height:0; }
.bar-experience #opening-dialog .opening-controls { min-height:112px; }
.bar-experience #opening-dialog .bar-modal-tools {
  display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;
  width:100%;max-width:560px;gap:4px 18px;
  margin:8px auto 0;padding:4px 0 0;
}
.bar-experience #opening-dialog .bar-modal-tools > :is(button,label) {
  display:flex;align-items:center;justify-content:center;min-height:44px;
}
.bar-experience #opening-dialog .opening-note { margin-top:4px!important;line-height:1.35; }
.bar-experience #opening-dialog .pack-view-controls { bottom:0; }
.bar-experience #opening-dialog .pack-view-controls button { min-height:44px; }

@media(max-width:600px) {
  .bar-experience #opening-dialog.is-showcase {
    width:calc(100vw - 12px);max-width:460px;
    height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding:10px 12px;
  }
  .bar-experience #opening-dialog #opening-title { font-size:clamp(21px,6vw,26px); }
  .bar-experience #opening-dialog .reveal-stage { margin:8px auto; }
  .bar-experience #opening-dialog .opening-controls { min-height:100px; }
  .bar-experience #opening-dialog #tear-button { min-height:48px; }
  .bar-experience #opening-dialog .bar-modal-tools { gap:4px;font-size:8px;margin-top:4px; }
  .bar-experience #opening-dialog .bar-modal-tools > :is(button,label) { flex:1;gap:3px; }
  .bar-experience #opening-dialog .opening-note { font-size:7px!important; }
}

/* Short landscape screens use the width available, keeping every action reachable. */
@media(min-width:601px) and (max-height:580px) {
  .bar-experience #opening-dialog.is-showcase {
    padding:10px 18px;
    grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);
    grid-template-rows:auto auto auto minmax(4px,1fr) auto auto auto;
    column-gap:20px;
  }
  .bar-experience #opening-dialog.is-showcase > :is(.opening-top,h2,#opening-hint,.opening-controls,.bar-modal-tools,.opening-note) { grid-column:2; }
  .bar-experience #opening-dialog .opening-top { grid-row:1; }
  .bar-experience #opening-dialog #opening-step { display:none; }
  .bar-experience #opening-dialog #opening-title { grid-row:2;font-size:23px; }
  .bar-experience #opening-dialog #opening-hint { grid-row:3; }
  .bar-experience #opening-dialog .reveal-stage { grid-column:1;grid-row:1 / -1;margin:8px 0; }
  .bar-experience #opening-dialog .opening-controls { grid-row:5;min-height:100px; }
  .bar-experience #opening-dialog #tear-button { min-height:48px; }
  .bar-experience #opening-dialog .bar-modal-tools { grid-row:6;gap:4px;font-size:8px;margin-top:4px; }
  .bar-experience #opening-dialog .opening-note { grid-row:7;font-size:7px!important; }
}

/* Quiet controls: one filled action, a secondary outline, and text-level utilities. */
.bar-experience #opening-dialog { --control-radius:8px; }
[data-edition="og"] .bar-experience #opening-dialog { --control-radius:3px; }
.bar-experience #opening-dialog :is(.button,#tear-button) {
  min-height:48px;padding:12px 16px;border-radius:var(--control-radius);
  font:600 13px/1.2 Arial,Helvetica,sans-serif;letter-spacing:0;
  box-shadow:none;text-shadow:none;gap:12px;
  transition:background .15s,border-color .15s;
}
.bar-experience #opening-dialog :is(.primary,#tear-button) {
  background:var(--pack-accent);color:#181719;border:1px solid var(--pack-accent);
}
.bar-experience #opening-dialog .outline {
  background:#111018bb;border:1px solid #f2e8d75c;color:#f5eee2;
}
.bar-experience #opening-dialog #tear-button { overflow:hidden;transform:none;filter:none; }
.bar-experience #opening-dialog #tear-button::before,
.bar-experience #opening-dialog #tear-button::after { content:none; }
.bar-experience #opening-dialog #tear-button > span {
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;width:18px;height:18px;background:none;border:0;
  border-radius:0;box-shadow:none;font-size:18px;transform:none;
}
.bar-experience #opening-dialog .button:disabled { opacity:.65; }
.bar-experience #opening-dialog .button:enabled:hover,
.bar-experience #opening-dialog a.button:hover { filter:brightness(1.08); }
.bar-experience #opening-dialog :is(button,a,summary):focus-visible {
  outline:2px solid #f5eee2;outline-offset:3px;
}
.bar-experience #opening-dialog .opening-controls { min-height:100px; }
.bar-experience #opening-dialog .bar-modal-tools {
  display:grid;grid-template-columns:1fr 1fr 1fr;
  gap:8px;max-width:480px;font:12px/1.3 Arial,Helvetica,sans-serif;
  color:#eee8df;text-shadow:none;margin-top:4px;z-index:6;
}
.bar-experience #opening-dialog .bar-modal-tools > button {
  padding:6px 2px;min-height:44px;gap:5px;white-space:nowrap;
}
.bar-experience #opening-dialog .opening-note { font-size:10px!important; }
.opening-options { position:relative;min-width:0; }
.opening-options summary {
  display:flex;align-items:center;justify-content:center;gap:7px;
  min-height:44px;padding:6px 2px;cursor:pointer;list-style:none;
}
.opening-options summary::-webkit-details-marker { display:none; }
.opening-options[open] summary .action-icon { transform:rotate(180deg); }
.options-panel {
  position:absolute;right:0;bottom:calc(100% + 8px);z-index:8;
  width:240px;max-width:calc(100vw - 44px);padding:8px 14px;
  color:#f1ecdf;background:#19171f;border:1px solid #ffffff3d;
  border-radius:8px;box-shadow:0 8px 28px #0008;
}
.bar-experience #opening-dialog .options-panel :is(label,button) {
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  width:100%;min-height:48px;background:none;border:0;padding:8px 0;
  color:inherit;font:13px/1.3 Arial,Helvetica,sans-serif;cursor:pointer;
}
.options-panel label { border-bottom:1px solid #ffffff20!important; }
.options-panel input { width:20px;height:20px;accent-color:var(--pack-accent); }
.options-panel [data-sound-label] { font-size:12px;color:var(--pack-accent); }
[data-edition="og"] .options-panel { background:#19221b;border-radius:3px; }
@media(max-width:360px) {
  .bar-experience #opening-dialog :is(.button,#tear-button) { padding-inline:12px;font-size:12px;gap:8px; }
  .bar-experience #opening-dialog .bar-modal-tools { gap:3px;font-size:11px; }
  .bar-experience #opening-dialog .opening-note { font-size:9px!important; }
}
