@import url('/assets/preview-enlarge.css?v=8caf1ef2937e');
.sword-illustration-panel{padding:20px;overflow:visible;max-height:none}
.sword-preview-tools{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 8px}
.sword-outline-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 13px;border:1px solid var(--border);border-radius:8px;background:var(--background);color:var(--foreground);font:inherit;font-size:.875rem;cursor:pointer}
.sword-outline-button:hover,.sword-outline-button[aria-pressed=true]{background:var(--muted);border-color:var(--primary)}
.sword-outline-button:focus-visible,.sword-unit-choice:focus-visible,.sword-preview-viewport:focus-visible{outline:3px solid var(--ring);outline-offset:3px}
.sword-preview-viewport{display:grid;place-items:center;width:100%;padding:24px 8px;box-sizing:border-box;perspective:1300px;overflow:hidden;touch-action:pan-y;cursor:grab;min-width:0;border-radius:12px;background:radial-gradient(ellipse at center,#f1eee9,#dedbd5)}
.sword-preview-viewport:active{cursor:grabbing}
.sword-preview-scene{width:96%;transform-style:preserve-3d;transform-origin:center;filter:drop-shadow(0 9px 4px #25190e65);transition:transform .16s ease-out}
.sword-preview-scene>svg{display:block;width:100%;height:auto;aspect-ratio:38/18;overflow:visible}
.sword-preview-engraving{paint-order:stroke fill;stroke:#e7c29650;stroke-width:.7px}
.sword-preview-description{font-size:.875rem;line-height:1.6;color:var(--muted-foreground);margin:12px 0}
.sword-logo-controls{display:flex;gap:10px;flex-wrap:wrap}
.sword-dialog{position:fixed;inset:0;margin:auto;width:min(94vw,1000px);max-width:94vw;max-height:90dvh;overflow:auto;padding:24px;border:1px solid var(--border);border-radius:14px;background:var(--background);color:var(--foreground)}
.sword-dialog::backdrop{background:#111b}
.sword-dialog-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}
.sword-dialog-header h2{font-size:1.4rem;font-weight:600;line-height:1.3}
.sword-dialog>label{display:block;font-size:1rem}
.sword-dialog input[type=search]{display:block;width:100%;padding:12px;margin:8px 0 16px;border:1px solid var(--border);border-radius:8px;color:var(--foreground);background:var(--background);font:inherit;font-size:16px}
#sword-unit-status{font-size:.875rem;margin-bottom:16px}
#sword-unit-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}
.sword-unit-choice{display:flex;flex-direction:column;align-items:center;gap:12px;border:1px solid var(--border);background:var(--background);color:var(--foreground);border-radius:10px;padding:14px;cursor:pointer;min-width:0}
.sword-unit-choice:hover{border-color:var(--primary)}
.sword-unit-choice img{width:96px;height:96px;object-fit:contain}
.sword-unit-choice span{font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}
.sword-preview-dialog{width:min(96vw,1500px);max-width:96vw}
.sword-preview-dialog .sword-preview-viewport{max-height:75dvh;padding:30px 10px}
.sword-preview-dialog .sword-preview-scene{max-width:calc(70dvh * 38 / 18)}
@media(max-width:950px){.sword-illustration-panel{position:static}.sword-config-layout{display:flex;flex-direction:column}.sword-illustration-panel{order:-1;width:100%;box-sizing:border-box}.sword-options{width:100%}}
@media(max-width:550px){#sword-unit-results{grid-template-columns:repeat(2,minmax(0,1fr))}.sword-dialog{padding:16px}.sword-illustration-panel{padding:14px}.sword-dialog-header{gap:12px}.sword-preview-viewport{padding:18px 3px}.sword-preview-tools{gap:6px}.sword-preview-tools button{flex:1;padding-inline:8px}}
@media(prefers-reduced-motion:reduce){.sword-preview-scene{transition:none}}

/* A front, wood back, and continuous side wall form the swiveling display. */
.sword-preview-viewport{position:relative;display:block;height:clamp(230px,38dvh,460px);padding:0;touch-action:none;user-select:none;perspective:1500px}
.sword-3d-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);transform-style:preserve-3d;-webkit-transform-style:preserve-3d}
.sword-3d-scale,.sword-preview-scene{position:relative;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transform-origin:50% 50%}
.sword-preview-scene{filter:none;transition:none}
.sword-3d-face{position:absolute;inset:0;pointer-events:none;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.sword-3d-face>svg{display:block;width:100%;height:100%;overflow:visible}
.sword-3d-edge{position:absolute;pointer-events:none;backface-visibility:visible;background:#583b24 url('/materials/walnut-grain.webp') center/auto 100%}
.sword-preview-engraving{fill:#000;stroke:none;paint-order:normal}
.sword-sold-separately{font-size:1rem;line-height:1.6;font-weight:600;margin:10px 0}
.sword-preview-tools{justify-content:center}
@media(max-width:550px){.sword-preview-viewport{height:clamp(210px,34dvh,340px);padding:0}}
.sword-solid-part{position:absolute;inset:0;transform-style:preserve-3d;pointer-events:none}
.sword-solid-part[hidden]{display:none}
.sword-mesh-face{position:absolute;left:0;top:0;transform-origin:0 0;pointer-events:none;backface-visibility:visible}
.sword-rack-mount{backface-visibility:hidden;-webkit-backface-visibility:hidden;position:absolute;left:595px;top:32px;width:760px;height:178px;transform:translateZ(45px);pointer-events:none}
.sword-rack-mount[hidden]{display:none}
.sword-rack-content{position:absolute;left:50%;top:50%;transform-origin:center;--preview-inch:100px;--medal-unit:110px;width:700px}
.sword-rack-content .rack-preview-canvas{background:transparent!important;padding:0!important;min-height:0!important;box-shadow:none!important;border:0!important}
.sword-rack-content .rack-side-label{display:none}
.sword-builder-status{font-size:.875rem;margin:10px 0;white-space:pre-wrap}

.sword-preview-viewport{background:radial-gradient(ellipse at 45% 35%,#f7f5f0,#e4e1da)}
.sword-3d-scale{width:1900px;height:900px}

.sword-webgl-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.sword-webgl-ready{perspective:none}
.sword-webgl-ready .sword-3d-face{visibility:hidden}

/* Keep customization first and the approved 3D view in the same compact case dialog. */
.sword-config-layout{display:block;max-width:900px;margin-inline:auto}
.sword-engraving-review h3{font-size:1.3rem;font-weight:600;line-height:1.4;margin-bottom:12px}
#sword-engraving-summary{margin:20px 0}
#sword-engraving-summary>div{display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,2fr);gap:16px;padding:12px 0;border-bottom:1px solid var(--border)}
#sword-engraving-summary dt{font-size:14px;color:var(--muted-foreground)}
#sword-engraving-summary dd{margin:0;font-size:16px;white-space:pre-wrap;overflow-wrap:anywhere}
#sword-engraving-summary img{display:block;width:80px;height:80px;object-fit:contain;margin-bottom:8px}
.sword-options .sword-approval-check{display:flex;align-items:flex-start;gap:10px;line-height:1.6}
.sword-approval-check input{flex-shrink:0;margin-top:4px}
#sword-approval-status:empty{display:none}
#sword-approval-status{margin:18px 0}
.preview-enlarge-dialog.sword-approval-dialog{width:min(640px,94vw)}
.sword-approval-dialog .sword-preview-viewport{height:min(45dvh,420px);min-height:210px}
@media(max-width:440px){#sword-engraving-summary>div{grid-template-columns:1fr;gap:4px}.sword-engraving-review>.desk-continue{width:100%;justify-content:center}.sword-approval-dialog .preview-enlarge-header{align-items:flex-start}.sword-approval-dialog .preview-enlarge-header button{flex-shrink:0}}

.sword-layout-choice h3{font-size:1.5rem;font-weight:700;line-height:1.3;margin:0 0 10px}
.sword-kbar-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}
.sword-options .sword-kbar-choice label{display:flex;align-items:flex-start;gap:10px;margin:0;padding:18px 14px;border:2px solid var(--border);border-radius:10px;cursor:pointer}
.sword-kbar-choice label:has(:checked){border-color:#3f603c;background:#3f603c12}
.sword-kbar-choice label:has(:focus-visible){outline:3px solid var(--ring);outline-offset:3px}
.sword-kbar-choice input{flex-shrink:0;margin-top:3px}
.sword-kbar-choice strong{display:block;font-size:16px;line-height:1.4}
.sword-kbar-choice small{display:block;font-size:14px;line-height:1.5;margin-top:5px;color:var(--muted-foreground)}
.sword-options .sword-top-row{border:2px solid #3f603c;padding:0;overflow:hidden}
.sword-section-heading{display:flex;align-items:center;gap:14px;padding:20px 24px;background:#3f603c;color:#fff}
.sword-section-heading>span{display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border:1px solid #ffffff70;border-radius:50%;font-size:20px;font-weight:700}
.sword-section-heading h3{font-size:1.35rem;font-weight:700;line-height:1.3;margin:0}
.sword-section-heading p{font-size:15px;line-height:1.5;margin:5px 0 0;color:#fff}
.sword-top-fields{padding:4px 24px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
#sword-top-single{grid-template-columns:minmax(0,1fr)}
.sword-top-row>.sword-field-note{padding:0 24px 6px}
@media(max-width:550px){.sword-kbar-choice{gap:10px}.sword-options .sword-kbar-choice label{padding:14px 10px;gap:6px}.sword-kbar-choice input{margin-right:0}.sword-top-fields{grid-template-columns:minmax(0,1fr);gap:0;padding:4px 16px}.sword-section-heading{padding:18px 16px;gap:12px}.sword-top-row>.sword-field-note{padding-inline:16px}}
