:root {
  --paper: #f3ede5;
  --ink: #49453e;
  --soft: #716757;
  --rule: #d6cdc1;
  --focus: #60523e;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body:after { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .12; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.94' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%237e7667' opacity='.22' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
/* Content determines the page height at narrow widths and increased text sizes. */
main { position: relative; min-height: max(42.5rem, 100svh); padding-top: 2.5rem; display: grid; grid-template-rows: minmax(19rem, 1fr) auto auto; gap: 1.25rem; background: radial-gradient(ellipse at 50% 41%, #faf7f080 0%, transparent 58%); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; border-radius: 3px; background: none; min-width: 2.5rem; min-height: 2.5rem; -webkit-tap-highlight-color: transparent; }
/* Every button uses the same ring, including material and icon buttons. */
button:focus-visible, canvas:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
button:disabled { opacity: .6; cursor: default; }
.sculpture { position: relative; width: min(840px, 88%); justify-self: center; }
#canvas-wrap { position: absolute; inset: 0; cursor: grab; }
#canvas-wrap:active { cursor: grabbing; }
canvas { display: block; width: 100%; height: 100%; }
#annotations { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
[hidden] { display: none !important; }
.annotation { position: absolute; display: flex; align-items: center; min-height: 1.375rem; white-space: nowrap; }
.annotation i { height: 3px; width: 3px; background: var(--soft); border-radius: 50%; }
/* Opaque paper behind the labels keeps contrast independent of the 3D material. */
.annotation > span { position: relative; font: italic 1rem var(--serif); letter-spacing: .3px; margin-left: var(--leader, 57px); color: var(--soft); background: var(--paper); padding: 2px 4px; border-radius: 2px; }
.annotation > span:before { content: ''; position: absolute; top: 54%; right: calc(100% + 9px); height: 1px; width: calc(var(--leader, 57px) - 15px); background: #a99d8980; }
.annotation sup { font-size: .5625rem; font-style: normal; vertical-align: top; position: relative; top: 3px; margin-right: 5px; }
.annotation.left { flex-direction: row-reverse; transform: translateX(calc(-100% + 3px)); }
.annotation.left > span { margin-left: 0; margin-right: var(--leader, 57px); }
.annotation.left > span:before { left: calc(100% + 9px); right: auto; }
#load-state { position: absolute; left: 0; right: 0; top: 44%; text-align: center; font: italic 1.1875rem var(--serif); color: var(--soft); }
.caption { text-align: center; padding: 0 1rem .5rem; }
.caption p { font: italic 400 1.6875rem/1.3 var(--caption-font, var(--serif)); font-optical-sizing: auto; letter-spacing: -.35px; margin: 0 0 .875rem; color: var(--soft); }
.caption h1 { font: 400 .625rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 3.1px; margin: 0; color: var(--soft); }
footer { margin: 0 2.8125rem; min-height: 4.8125rem; padding: .75rem 0; border-top: 1px solid #d6cdc180; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; font-size: .75rem; letter-spacing: .15px; }
.materials, .controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; }
.controls { gap: .75rem; }
.materials button { padding: .4375rem .25rem; display: flex; gap: .5rem; align-items: center; color: var(--soft); transition: color .2s; }
.materials button[aria-pressed=true] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sample { width: 13px; height: 13px; flex: none; border-radius: 2px; box-shadow: inset 0 0 0 1px #00000010; }
.sample.marble { background: linear-gradient(117deg, #d9d6cd 19%, #a6a69c 20%, #e9e6db 23%, #eeeae0 62%, #b1b2a8 64%, #e3dfd5 68%); }
.sample.limestone { background: radial-gradient(at 70% 20%, #aaa08c, #c6baa3 65%, #b2a58b); }
.sample.bronze { background: linear-gradient(115deg, #3e4438, #8a7953, #525441); }
.controls button { padding: .375rem .3125rem; color: var(--soft); display: flex; align-items: center; justify-content: center; gap: .4375rem; font-size: .75rem; line-height: 1.4; transition: color .2s, background-color .2s; }
button:not(:disabled):hover { color: #3e3931; background: #fffaf255; }
.controls #rotate { min-width: 5.3125rem; }
.control-icon { display: block; width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.controls #rotate[data-rotating=true] .icon-play, .controls #rotate[data-rotating=false] .icon-pause { display: none; }
.controls #labels[aria-pressed=true] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-js { position: absolute; left: 1rem; right: 1rem; top: 40%; text-align: center; font: italic 1.25rem var(--serif); }
@media (min-height: 1100px) { main { padding-top: 3.5625rem; gap: 2rem; } footer { min-height: 5.625rem; } }
@media (max-width: 760px) {
  main { min-height: max(38.75rem, 100svh); padding-top: 1.75rem; }
  .sculpture { width: calc(100% - 1rem); }
  .caption p { font-size: clamp(1.3125rem, 5.8vw, 1.5625rem); margin-bottom: .75rem; }
  .caption h1 { letter-spacing: 2.7px; }
  footer { margin: 0 1.5625rem; justify-content: center; }
  .materials { gap: 1rem; }
  .controls { gap: .5rem; }
  .controls #rotate { min-width: 4.75rem; }
  .control-icon { width: 14px; height: 14px; }
  .annotation > span { font-size: .875rem; margin-left: var(--leader, 32px); }
  .annotation > span:before { width: calc(var(--leader, 32px) - 12px); right: calc(100% + 6px); }
  .annotation.left > span { margin-right: var(--leader, 32px); }
  .annotation.left > span:before { left: calc(100% + 6px); }
  .annotation sup { font-size: .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (forced-colors: active) {
  button:focus-visible, canvas:focus-visible { outline-color: Highlight; }
  button[aria-pressed=true] { color: Highlight; }
  .sample { border: 1px solid ButtonText; }
  .annotation > span { background: Canvas; color: CanvasText; }
}
