:root {
  --navy: #071c33;
  --ink: #172433;
  --muted: #4b6071;
  --line: #cbd5dc;
  --soft: #f2f5f7;
  --white: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body { margin: 0; background: var(--white); color: var(--ink); font: 17px/1.45 "Times New Roman", Times, serif; }
button, input { font: inherit; }
a { color: var(--navy); text-underline-offset: 3px; }
button, a[href] { touch-action: manipulation; }
:is(button, input, a):focus-visible { outline: 3px solid #1763a3; outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; background: white; padding: 10px; }
.skip:focus { top: 10px; z-index: 1; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
header { border-bottom: 1px solid var(--line); }
.nav, nav { display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.nav { min-height: 68px; }
.wordmark { color: var(--navy); text-decoration: none; font-size: 34px; font-weight: 400; line-height: 1; }
nav a { padding: 12px 0; color: var(--muted); }
nav a[aria-current="page"] { font-weight: bold; color: var(--navy); }
.notice { margin: 0; background: var(--soft); border-bottom: 1px solid var(--line); padding: 9px 16px; text-align: center; font-size: 15px; }
.notice strong { margin-right: .55em; }
main { padding: clamp(24px, 4vw, 54px) 0 60px; }
.detail { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: clamp(28px,4.5vw,64px); align-items: start; }
figure { margin: 0; border: 1px solid var(--line); }
.stage { aspect-ratio: 4/3; background: var(--soft); }
.stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
figcaption { min-height: 53px; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
#image-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
#thumbs { margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0,76px)); gap: clamp(5px,1.4vw,10px); }
#thumbs button { width: 100%; min-height: 44px; aspect-ratio: 1.2; min-width: 0; padding: 3px; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; background: white; }
#thumbs button[aria-pressed=true] { border: 2px solid var(--navy); }
#thumbs img { width: 100%; height: 100%; display: block; object-fit: contain; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px,3.2vw,48px); line-height: 1.06; color: var(--navy); }
h1 .brand { font-weight: 400; }
.spec { color: var(--muted); margin: 12px 0 24px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { width: 100%; display: block; padding: 0 0 8px; color: var(--navy); font-weight: bold; }
legend span { float: right; font-weight: normal; color: var(--muted); font-size: 15px; }
.option { display: grid; align-items: center; gap: 10px; grid-template-columns: 18px minmax(0,1fr) auto; border: 1px solid var(--line); border-radius: 2px; padding: 10px 13px; cursor: pointer; }
.option + .option { margin-top: 6px; }
.option:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--soft); }
.option input { width: 16px; height: 16px; accent-color: var(--navy); margin: 0; }
.option b, .option small { display: block; }
.option small, .muted { color: var(--muted); }
.option strong, .line-estimate strong, #cart-total, .line-total { font-variant-numeric: tabular-nums; color: var(--navy); }
.order-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 19px 0 14px; }
.order-row label, .item-controls label { display: block; font-size: 15px; font-weight: bold; }
input[type=number] { display: block; width: 84px; min-height: 44px; margin-top: 4px; padding: 6px 9px; border-radius: 2px; border: 1px solid #82919e; background: var(--white); color: var(--ink); }
input[aria-invalid=true] { border-color: #a33225; }
.line-estimate { text-align: right; }
.line-estimate span { display: block; font-size: 15px; color: var(--muted); }
.line-estimate strong { display: block; font-size: 28px; line-height: 1.25; }
.primary { display: inline-block; background: var(--navy); color: var(--white); text-align: center; text-decoration: none; padding: 11px 18px; font-weight: bold; border: 1px solid var(--navy); border-radius: 2px; cursor: pointer; }
#add-form .primary { width: 100%; }
.feedback { margin-top: 10px; min-height: 25px; font-size: 16px; }
.cart-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.cart-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(235px,1fr); align-items: start; gap: 36px; }
.cart-line { display: grid; grid-template-columns: 75px minmax(0,1fr) 85px auto; align-items: start; gap: 15px; padding: 18px 0; border-top: 1px solid var(--line); }
.cart-photo { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--soft); border: 1px solid var(--line); }
.item-info h2 { margin: 0 0 3px; font-size: 18px; word-break: break-word; }
.item-info p, .item-info span { font-size: 15px; color: var(--muted); }
.text-button { display: block; margin-top: 3px; padding: 4px 0; background: none; border: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-size: 15px; }
.line-total { white-space: nowrap; align-self: center; }
.summary { background: var(--soft); border-top: 2px solid var(--navy); padding: 20px; }
.summary h2 { font-size: 23px; margin: 0 0 16px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.subtotal { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 20px; font-weight: bold; }
.summary p { margin-top: 13px; font-size: 15px; color: var(--muted); }
#empty-cart a { margin-top: 14px; }
#cart-status { margin-top: 12px; }
@media (max-width: 760px) {
  .shell { width: min(580px,calc(100% - 32px)); }
  .nav { min-height: 58px; }
  .wordmark { font-size: 28px; }
  nav { gap: 14px; font-size: 16px; }
  .notice { font-size: 14px; }
  .detail, .cart-layout { grid-template-columns: minmax(0,1fr); gap: 25px; }
  .cart-line { grid-template-columns: 56px minmax(0,1fr) auto; column-gap: 10px; row-gap: 8px; }
  .cart-photo { grid-row: 1 / 3; }
  .item-info { grid-column: 2 / 4; }
  .item-controls { grid-column: 2; }
  .line-total { grid-column: 3; }
}
@media (max-width: 400px) {
  .nav { flex-wrap: wrap; gap: 2px 10px; padding-block: 6px; }
  .wordmark { font-size: 24px; }
  nav { margin-left: auto; gap: 8px; white-space: nowrap; }
}
