
html { scrollbar-gutter: stable; }
html.sheet-open { overflow: hidden; }

html.sheet-open .reticle { opacity: 0; }

.ico-close { -webkit-mask: url("../icons/close.svg") center / contain no-repeat; mask: url("../icons/close.svg") center / contain no-repeat; }

.sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--i0); overflow: hidden; }
.sheet:not([open]) { display: none; }
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet::backdrop { background: rgba(0, 0, 0, .66); opacity: 0; transition: opacity 260ms ease; }
.sheet.is-in::backdrop { opacity: 1; }

.sheet-panel {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 92dvh; overflow: hidden; will-change: transform; contain: layout paint;
  background: var(--p0); color: var(--i0); border: var(--bw) solid var(--i0); border-bottom: 0; box-shadow: 0 -6px 0 var(--i0);
  transform: translate3d(0, 104%, 0); transition: transform 300ms cubic-bezier(.4, 0, 1, 1);
}
.sheet.is-in .sheet-panel { transform: translate3d(0, var(--drag, 0px), 0); transition: transform 480ms cubic-bezier(.22, 1, .36, 1); }
.sheet.is-dragging .sheet-panel { transition: none; }

.sheet-grip { position: absolute; inset: 0 0 auto 0; height: 40px; z-index: 3; display: flex; justify-content: center; padding-top: 10px; touch-action: none; cursor: grab; }
.sheet-grip::before { content: ""; width: 48px; height: 9px; background: var(--p0); border: var(--bw) solid var(--i0); }
.sheet-close { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 4; }
.sheet-close .ico { width: 18px; height: 18px; }

.sheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-media { position: relative; overflow: hidden; background: var(--tint); }
.sheet-media .cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: var(--bw) solid var(--i0); }
.sheet-media .art { border-bottom: var(--bw) solid var(--i0); }
.sheet-media .art::before { width: 96px; height: 96px; }
.sheet-media .art::after { width: 56px; height: 56px; }
.sheet-thumbs { display: flex; gap: 10px; padding: 12px 14px; border-bottom: var(--bw) solid var(--i0); background: var(--p0); overflow-x: auto; }
.sheet-thumbs button { flex: none; width: 56px; height: 56px; padding: 0; border: var(--bw) solid var(--i0); background: var(--tint); cursor: pointer; transition: box-shadow 300ms var(--ease-out), transform 300ms var(--ease-out); }
.sheet-thumbs button[aria-current="true"] { box-shadow: 4px 4px 0 var(--i0); transform: translate(-2px, -2px); }
.sheet-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.sheet-body { padding: var(--space-5) var(--gutter) var(--space-6); max-width: 720px; }
.sheet-body > * + * { margin-top: var(--space-4); }
.sheet-title { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.5; text-wrap: balance; }
.sheet-short { color: var(--muted); font-size: 18px; margin: 0; }
.sheet-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.sheet-price strong { font-size: clamp(36px, 6vw, 52px); font-weight: 900; line-height: 1.3; }
.sheet-price del { color: var(--muted); font-size: 20px; text-decoration-thickness: 2px; }
.sheet-price .unit { font-size: 16px; font-weight: 700; color: var(--muted); }
.sheet-note { margin: 0; color: var(--muted); }
.sheet-desc p { font-size: 17px; line-height: 2.05; }
.sheet-desc p:last-child { margin-bottom: 0; }
.sheet-wait { display: grid; gap: 12px; }
.sheet-wait .skeleton { min-height: 18px; }
.sheet-wait .skeleton:nth-child(2) { width: 82%; }
.sheet-wait .skeleton:nth-child(3) { width: 64%; }
.sheet-fields { margin: 0; border: var(--bw) solid var(--i0); }
.sheet-fields > div { display: grid; grid-template-columns: minmax(96px, 1fr) 2fr; }
.sheet-fields > div + div { border-top: var(--bw) solid var(--i0); }
.sheet-fields dt, .sheet-fields dd { margin: 0; padding: 8px 14px; }
.sheet-fields dt { color: var(--muted); border-inline-end: var(--bw) solid var(--i0); }
.sheet-fields dd { font-weight: 700; }
.sheet-error { padding: var(--space-5); border: var(--bw) dashed var(--i0); text-align: center; }

.sheet-detail { min-height: 120px; }
.sheet-detail > * + * { margin-top: var(--space-4); }
.sheet-stat { display: flex; align-items: baseline; gap: 10px; }
.sheet-stat strong { font-variant-numeric: tabular-nums; min-width: 3ch; font-size: clamp(32px, 6vw, 48px); font-weight: 900; line-height: 1.3; }
.sheet-stat span { color: var(--muted); font-weight: 700; }
.sheet-req { padding: var(--space-3) var(--space-4); border: var(--bw) solid var(--i0); }
.sheet-req h3, .sheet-sub { font-size: 17px; margin: 0 0 var(--space-2); }
.sheet-req p { margin: 0; white-space: pre-line; font-size: 16px; line-height: 1.95; }
.sheet-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.sheet-links .btn { width: 100%; justify-content: space-between; }

.card .price { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-weight: 900; color: var(--ink); }
.card .price del { color: var(--muted); font-weight: 400; font-size: 14px; }

.sheet-bar { flex: none; display: flex; align-items: center; gap: var(--space-4); padding: 16px var(--gutter) calc(20px + env(safe-area-inset-bottom)); border-top: var(--bw) solid var(--i0); background: var(--p0); }
.sheet-sum { display: none; line-height: 1.5; }
.sheet-sum small { display: block; color: var(--muted); font-size: 13px; }
.sheet-sum strong { font-size: 18px; font-weight: 900; white-space: nowrap; }
.sheet-sum { flex: none; }
.sheet-buy { min-width: 0; }
.sheet-buy { flex: 1; min-height: 56px; font-size: 18px; font-weight: 900; box-shadow: 6px 6px 0 var(--paper), 6px 6px 0 var(--bw) var(--ink); }
.sheet-buy:active { transform: translate(5px, 5px); box-shadow: none; }
.sheet-buy[aria-disabled="true"] { background: var(--paper); color: var(--muted); border-style: dashed; box-shadow: none; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .sheet-buy:not([aria-disabled="true"]):hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--paper), 9px 9px 0 var(--bw) var(--ink); }
  .sheet-buy:not([aria-disabled="true"]):hover:active { transform: translate(5px, 5px); box-shadow: none; }
}

.sheet.is-ready .sheet-body > * { animation: sheet-rise 420ms cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--i, 0) * 40ms + 120ms); }
.sheet.is-ready .sheet-media .cover { animation: sheet-settle 700ms cubic-bezier(.22, 1, .36, 1) backwards; }
.sheet.is-ready .sheet-bar { animation: sheet-bar 380ms cubic-bezier(.22, 1, .36, 1) 260ms backwards; }
.sheet.is-ready .sheet-buy:not([aria-disabled="true"]) { animation: sheet-buy 400ms cubic-bezier(.22, 1, .36, 1) 420ms backwards; }
.sheet-detail-in { animation: sheet-fade 260ms ease backwards; }
@keyframes sheet-fade { from { opacity: 0; } }
@keyframes sheet-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
@keyframes sheet-settle { from { transform: scale(1.06); } }
@keyframes sheet-bar { from { opacity: 0; transform: translate3d(0, 100%, 0); } }
@keyframes sheet-buy { from { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--paper), 0 0 0 0 var(--ink); } }

@media (max-width: 899px) {
  .sheet-sum { display: block; }
  .sheet-buy { flex: 1 1 auto; }
}
@media (min-width: 900px) {
  .sheet-grip { display: none; }
  .sheet-panel { width: min(1060px, calc(100% - 64px)); height: 90dvh; }
  .sheet-scroll { display: grid; grid-template-columns: 5fr 6fr; align-items: start; }
  .sheet-media { position: sticky; top: 0; border-inline-end: var(--bw) solid var(--i0); }
  .sheet-media .cover { aspect-ratio: 4 / 5; border-bottom: 0; }
  .sheet-media .art { border-bottom: 0; }
  .sheet-body { padding: var(--space-7) var(--space-7) var(--space-7); max-width: none; }
  .sheet-bar { justify-content: flex-end; }
  .sheet-buy { flex: 0 1 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet.is-ready .sheet-body > *, .sheet.is-ready .sheet-media .cover, .sheet.is-ready .sheet-bar, .sheet.is-ready .sheet-buy, .sheet-detail-in { animation: none; }
}
