:root{color-scheme:dark;--bg:#141411;--panel:#1c1b17;--paper:#f2ede2;--muted:#beb7a8;--gold:#d2a666;--line:#484238;font-family:Arial,sans-serif;color:var(--paper);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible,input:focus-visible+span{outline:2px solid var(--gold);outline-offset:4px}html{scroll-behavior:smooth}.header,footer{padding:1.1rem clamp(1.2rem,5vw,5rem);display:flex;align-items:center;justify-content:space-between;gap:1rem;border-bottom:1px solid var(--line)}.logo{font-weight:950;font-size:1.45rem;letter-spacing:-.1em;white-space:nowrap}.logo span{font-weight:750}.logo b,em{color:var(--gold)}nav,.order-actions{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.button,.outline{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:.75rem 1.2rem;font-weight:750;font-size:.9rem;border:1px solid var(--line);background:transparent;color:var(--paper)}.button{background:var(--gold);color:#19140e;border-color:var(--gold)}.button:hover,.outline:hover{border-color:var(--paper)}.hero,.design{display:grid;grid-template-columns:1fr 1fr;max-width:1600px;margin:auto}.hero-copy,.design-copy{padding:clamp(2.5rem,6vw,7rem) clamp(1.2rem,5vw,5rem);align-self:center}.hero{min-height:calc(100svh - 84px)}.hero-stage,.design-stage,.ritual-stage{position:relative;background:radial-gradient(ellipse at 53% 42%,#303236 0%,#202123 43%,#141516 76%);min-height:360px;overflow:hidden}.hero-stage canvas,.design-stage canvas,.ritual-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.image-caption{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;gap:1rem;margin:0;padding:1.15rem clamp(1rem,3vw,2.2rem);font:700 .75rem/1.3 monospace;letter-spacing:.12em;color:var(--muted);border-top:1px solid #ffffff28;background:#141411a0}.kicker{font:700 .875rem/1.3 monospace;letter-spacing:.16em;color:var(--gold);margin:0 0 1.2rem}h1,h2{font-family:Georgia,serif;font-weight:500;letter-spacing:-.075em;line-height:.91;margin:0}h1{font-size:clamp(4.1rem,9.5vw,10rem)}h2{font-size:clamp(3rem,6.5vw,6.8rem)}p{line-height:1.55}.intro,.steps article>p:last-child,.design-copy>p{color:var(--muted);max-width:34ch}.intro{margin:1.65rem 0}.ritual{border-block:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;max-width:1600px;margin:auto}.ritual-stage{grid-area:1/2;position:sticky;top:0;height:100svh;align-self:start}.steps{grid-area:1/1}.steps article{min-height:75svh;display:flex;flex-direction:column;justify-content:center;padding:2rem clamp(1.2rem,5vw,5rem)}.design{background:var(--panel)}.design-copy{padding-top:3.5rem;padding-bottom:2.5rem}.design-copy>.kicker{color:var(--gold)}fieldset{border:0;margin:1.2rem 0;padding:0}legend,.engraving{font-weight:700;margin-bottom:.55rem;display:block}.choices{display:flex;flex-wrap:wrap;gap:.45rem}.choices label{position:relative;cursor:pointer}.choices input{position:absolute;width:1px;height:1px;opacity:0}.choices span{display:flex;align-items:center;gap:.55rem;padding:.65rem .8rem;border:1px solid var(--line);min-height:44px}.choices input:checked+span{border-color:var(--gold);color:var(--gold);background:#d2a66610}.choices i{width:1rem;height:1rem;border:1px solid #9e8971;border-radius:50%}.brown{background:#6b412b}.black{background:#171513}#engraving{width:100%;padding:.75rem;border:1px solid var(--line);background:var(--bg);color:var(--paper);border-radius:0}.design-copy>.order-note{max-width:48ch}#copy-status{min-height:1.55em;font-size:.9rem}footer{border-top:1px solid var(--line);border-bottom:0}footer>a:last-child{color:var(--muted)}
@media(max-width:720px){.nav-ritual{display:none}.hero,.design{grid-template-columns:1fr}.hero-copy{padding-top:3.4rem;padding-bottom:2rem}.hero-stage,.design-stage{min-height:400px;min-height:min(105vw,480px)}.ritual{display:block}.ritual-stage{height:46svh;min-height:0;z-index:1}.steps article{min-height:56svh;justify-content:flex-start;padding-top:1.5rem}.steps article:last-child{min-height:54svh}.design-copy{padding-top:2.3rem}.image-caption{font-size:.7rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

#engraving-editor{min-width:0;margin-bottom:.8rem}
#engraving-editor [hidden],#engraving-editor[hidden]{display:none}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.slot-heading,.editor-head,.kind-switch,.upload-action,#adjustments label{display:flex;align-items:center}
.slot-heading,.editor-head{justify-content:space-between;gap:.6rem}
.slot-heading,.proof-note,#file-hint,#engraving-note{font-size:.82rem;color:var(--muted)}
#slot-count{color:var(--gold);font-family:monospace}
#positions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.33rem;margin:.65rem 0}
.position-choice,.kind-switch button,.text-action,.upload-action{color:var(--paper);background:transparent;border:1px solid var(--line)}
.position-choice{min-width:0;min-height:60px;padding:.45rem .28rem;display:grid;align-content:center;justify-items:center;gap:.25rem}
.position-choice strong{font:600 clamp(.65rem,1vw,.78rem)/1.3 monospace;white-space:nowrap}
.position-choice small{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.74rem;color:var(--muted)}
.position-choice canvas{width:28px;height:21px;background:#c9c7be;border-radius:2px}
.position-choice[aria-pressed="true"]{border-color:var(--gold);background:#d2a66610;color:var(--gold)}
.position-editor{border:1px solid var(--line);padding:.75rem .85rem;background:var(--bg)}
.editor-head{min-height:28px}
.editor-head strong{font-size:.85rem}
.text-action{border:none;padding:.3rem;color:var(--muted);font-size:.8rem;text-decoration:underline;text-underline-offset:3px}
.kind-switch{gap:.4rem;margin:.35rem 0 .6rem}
.kind-switch button{font-size:.83rem;min-height:36px;padding:.35rem 1rem}
.kind-switch button[aria-pressed="true"]{color:var(--gold);border-color:var(--gold)}
#file-hint{max-width:100%;overflow-wrap:anywhere}
#image-tools{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap}
.upload-action{position:relative;min-height:42px;padding:.5rem .8rem;cursor:pointer;font-size:.86rem}
.upload-action input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}
.upload-action:focus-within{outline:2px solid var(--gold);outline-offset:2px}
#adjustments{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem;margin-top:.8rem}
#adjustments label{flex-wrap:wrap;justify-content:space-between;gap:.15rem;font-size:.8rem}
#adjustments output{color:var(--muted);font-family:monospace}
#adjustments input{width:100%;height:25px;margin:0;accent-color:var(--gold)}
.proof-note{margin:.55rem 0 0}
#upload-feedback{color:var(--gold);font-size:.83rem;margin:.4rem 0 0;overflow-wrap:anywhere}
#copy-status{white-space:pre-line;overflow-wrap:anywhere}
@media(min-width:721px){.design-stage{position:sticky;top:0;align-self:start;height:min(100svh,940px)}}
@media(max-width:720px){.kind-switch button,.text-action{min-height:44px}#adjustments input{height:36px}}
.design-stage{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.design-stage .image-caption{position:static}
.view-modes{display:flex;justify-self:center;margin:12px 0 0;padding:3px;border:1px solid var(--line);border-radius:3px;background:var(--bg)}
.view-modes button{min-height:44px;padding:0 15px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:.86rem}
.view-modes button[aria-pressed="true"]{background:#34312a;color:#edddc0;box-shadow:inset 0 -2px var(--gold)}
.view-modes button:disabled{opacity:.43;cursor:default}
.studio-viewport{position:relative;min-height:0}
#design-art,#rim-guides{touch-action:pan-y pinch-zoom}
.design-stage[data-view="product"] canvas{cursor:grab}
.design-stage[data-view="product"] canvas:active{cursor:grabbing}
#rim-guides{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;overflow:visible}
#rim-guides[hidden]{display:none}
#rim-guides g[role="button"]{pointer-events:all;cursor:pointer}
#rim-guides .sector-mark{fill:#eee8dc06;stroke:#4b463e99;stroke-width:1;stroke-dasharray:3 4;vector-effect:non-scaling-stroke}
#rim-guides .badge-face{fill:#24231f;stroke:#aaa496;stroke-width:1;vector-effect:non-scaling-stroke}
#rim-guides text{font:600 6.7px monospace;fill:#f2ede2}
#rim-guides [aria-pressed="true"] .sector-mark,#rim-guides g[role]:focus-visible .sector-mark{stroke:var(--gold);fill:#c59d5418;stroke-dasharray:none;stroke-width:1.5}
#rim-guides [aria-pressed="true"] .badge-face{fill:var(--gold);stroke:#211f1a}
#rim-guides [aria-pressed="true"] text{fill:#171612}
@media(max-width:720px){.design-stage{height:clamp(398px,111vw,490px)}}

#paper-option:not([hidden]){display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--muted)}
#keep-paper{accent-color:var(--gold)}
#rim-guides g[role="button"]:focus{outline:none}
#rim-guides g[role="button"]:focus-visible .badge-face{stroke:var(--paper);stroke-width:2}

/* Let the editor respond to its column width on both phones and tablets. */
#engraving-editor{container-type:inline-size}
@container (max-width:20rem){
  #positions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
#rim-guides .badge-hit{display:none}
@media(pointer:coarse){
  #rim-guides .badge-hit{display:block;fill:transparent;stroke:transparent;stroke-width:36px;vector-effect:non-scaling-stroke;pointer-events:all}
  .upload-action,.text-action,.kind-switch button,#paper-option:not([hidden]),#adjustments input{min-height:44px}
}
@media(max-width:720px){
  .hero-stage{display:flex;flex-direction:column}
  .hero-stage canvas{position:relative;flex:1 1 0;height:0;min-height:0}
  .hero-stage .image-caption{position:static}
  .ritual-stage{height:min(46svh,calc(50svh - 3rem))}
}
@media(min-width:721px){
  .hero-stage,.ritual-stage{container-type:inline-size}
  .hero-stage canvas,.ritual-stage canvas{height:min(100%,150cqw);top:50%;transform:translateY(-50%)}
}
