.template-choice{max-width:1080px;margin:auto;padding:32px 24px 80px;color:#eee;line-height:1.6}.template-choice>img{display:block;width:100px;height:88px;object-fit:contain;background:transparent}.template-choice h1{font-size:clamp(28px,4vw,42px);line-height:1.2;font-weight:500;margin-top:32px}.template-choice>p,.choice-sample,.choice-dialog p{color:#aaa}.choice-categories{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:36px 0}.choice-category{font:inherit;font-size:22px;background:#141414;border:1px solid #363636;color:#eee;border-radius:18px;min-height:170px;padding:24px;cursor:pointer}.choice-grid{display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-x:contain;padding:24px 2px;scrollbar-width:thin}.choice-card{flex:0 0 calc(50% - 14px);min-width:0;scroll-snap-align:start;background:#141414;border:1px solid #363636;border-radius:18px;padding:16px;box-sizing:border-box}.choice-card h2{font-size:22px;font-weight:500}.choice-shot{height:350px;overflow:hidden;border-radius:12px;position:relative;background:#0b0b0b;pointer-events:none}.choice-shot iframe{display:block;border:0;width:400px;height:700px;transform:scale(.5);transform-origin:top left;position:absolute;left:50%;margin-left:-100px}.choice-open,.choice-back{font:inherit;min-height:44px;background:transparent;color:#eee;border:1px solid #555;border-radius:100px;padding:10px 20px;cursor:pointer}.choice-back{margin-top:16px}.choice-review{margin-top:26px}.choice-review h2{font-weight:500}.choice-review>iframe{display:block;width:100%;height: min(780px,85dvh);min-height:500px;margin:24px auto;border:1px solid #444;border-radius:16px;background:#080808;box-sizing:border-box}.choice-confirm{display:block;font:inherit;min-height:48px;border:0;border-radius:100px;padding:14px 28px;background:#e6e6e6;color:#111;cursor:pointer;margin:24px auto}.choice-confirm:disabled,.choice-back:disabled{opacity:.6}.choice-dialog{background:#151515;color:#eee;border:1px solid #555;border-radius:20px;padding:28px;width:min(520px,calc(100% - 64px));max-height:80dvh;overflow:auto}.choice-dialog::backdrop{background:#000b}.choice-dialog .choice-back{display:block;margin:12px auto}.choice-error{color:#ffb4ab!important}.template-choice button:focus-visible{outline:2px solid #eee;outline-offset:5px}@media(max-width:640px){.template-choice{padding:24px 16px 60px}.choice-categories{grid-template-columns:1fr;gap:12px}.choice-category{min-height:100px}.choice-grid{gap:16px;margin-inline:-16px;padding-inline:16px}.choice-card{flex-basis:85%;min-width:260px}.choice-shot{height:320px}.choice-review>iframe{height:78dvh;min-height:480px}.choice-dialog{padding:22px}.choice-confirm{width:100%}}

.choice-card{font:inherit;color:inherit;text-align:start;cursor:pointer}.choice-shot{height:auto;aspect-ratio:4/5}.choice-shot iframe{left:0;margin-left:0;transform:scale(var(--choice-scale,1))}.choice-open{display:inline-block}.choice-card:focus-visible{outline:2px solid #eee;outline-offset:4px}@media(max-width:640px){.choice-shot{height:auto}}

/* Center the template card caption and action while retaining automatic sample fitting. */
.choice-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:16px 16px 24px;transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease}
.choice-card .choice-shot{width:100%;flex-shrink:0}
.choice-card h2{width:100%;margin:24px 0 16px;line-height:1.3;text-align:center}
.choice-card .choice-open{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:180px;max-width:100%;min-height:44px;margin:0 auto;background:#e6e6e6;color:#111;border-color:#e6e6e6;text-align:center;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
.choice-card:focus-visible{border-color:#fff;background:#1b1b1b;box-shadow:0 0 0 1px #ffffff24}
.choice-card:focus-visible .choice-open{background:#fff;border-color:#fff;box-shadow:0 0 18px #ffffff14}
.choice-category{transition:border-color .18s ease,background-color .18s ease}
.choice-category:focus-visible{border-color:#fff;background:#1b1b1b}
@media(hover:hover){.choice-card:hover{border-color:#fff;background:#1b1b1b;box-shadow:0 0 0 1px #ffffff24}.choice-card:hover .choice-open{background:#fff;border-color:#fff;box-shadow:0 0 18px #ffffff14}.choice-category:hover{border-color:#fff;background:#1b1b1b}}
@media(prefers-reduced-motion:reduce){.choice-card,.choice-card .choice-open,.choice-category{transition:none}}

/* The sample owns the viewport between a compact Back bar and the Choose action. */
body.dar-template-preview-open{overflow:hidden}
.template-choice.choice-preview-open>img,.template-choice.choice-preview-open>h1,.template-choice.choice-preview-open>p{display:none}
.choice-preview-open>.choice-review{position:fixed;inset:0;z-index:100;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:#080808}
.choice-preview-toolbar{display:flex;align-items:center;gap:20px;padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));border-bottom:1px solid #ffffff1c;background:#101010}
.choice-preview-toolbar .choice-back{flex-shrink:0;margin:0}
.choice-preview-label{min-width:0;text-align:start}
.choice-preview-label h2{font-size:17px;line-height:1.3;margin:0;font-weight:500}
.choice-preview-label .choice-sample{font-size:12px;line-height:1.4;margin:4px 0 0}
.choice-preview-open>.choice-review>iframe{display:block;width:100%;height:100%;min-height:0;margin:0;border:0;border-radius:0;box-sizing:border-box;background:#080808}
.choice-preview-footer{display:flex;justify-content:center;align-items:center;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid #ffffff1c;background:#101010}
.choice-preview-footer .choice-confirm{width:auto;min-width:220px;max-width:100%;margin:0}
@media(max-width:640px){.choice-preview-toolbar{gap:12px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:8px}.choice-preview-toolbar .choice-back{font-size:13px;padding:8px 14px}.choice-preview-label h2{font-size:15px}.choice-preview-label .choice-sample{font-size:11px}.choice-preview-footer{padding-top:10px}.choice-preview-footer .choice-confirm{min-width:min(250px,100%);padding:12px 24px}}

/* Match the approved homepage's transparent glass Back control. */
.choice-preview-toolbar .choice-back{appearance:none;background:transparent!important;color:#fff;border:1px solid #ffffffa6;border-radius:999px;padding:10px 16px;min-height:44px;font:500 12px/1.2 Arial,sans-serif;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);text-shadow:0 1px 5px #000}
.choice-preview-toolbar .choice-back:hover,.choice-preview-toolbar .choice-back:focus-visible{border-color:#fff}

/* The chooser uses the same homepage canvas, automatic fit and transparent controls. */
#dar-choice-home-preview{display:block;overflow:hidden}
#dar-choice-home-preview>.choice-preview-footer{position:absolute;inset:auto 0 0;z-index:40}
#dar-choice-home-preview [data-acquisition-theme]{display:none!important}

/* 2026-10-25: static template cards (no sideways swiping) and Back inside the preview footer. */
.choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));overflow-x:visible;scroll-snap-type:none;overscroll-behavior-x:auto}
.choice-card{flex:none;min-width:0;scroll-snap-align:none}
@media(max-width:640px){.choice-grid{grid-template-columns:1fr;margin-inline:0;padding-inline:0}.choice-card{width:100%;min-width:0}}
.choice-preview-footer{gap:12px}
.choice-preview-footer .choice-preview-back{margin:0;min-height:44px;flex:0 0 auto}
@media(max-width:640px){.choice-preview-footer .choice-confirm{min-width:0;flex:1 1 auto}}
