.template-carousel{position:relative;margin-top:52px}.template-track{display:flex;gap:20px;overflow-x:auto;padding:2px 2px 18px;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;cursor:grab}.template-track.is-dragging{scroll-snap-type:none;scroll-behavior:auto;cursor:grabbing}.template-track.is-dragging *{user-select:none}.template-track::-webkit-scrollbar{display:none}.template-slide{flex:0 0 calc((100% - 40px)/3);min-width:330px;overflow:hidden;background:#fff;color:var(--ink);border:1px solid rgba(216,183,115,.26);border-radius:12px;scroll-snap-align:start;box-shadow:0 20px 45px rgba(0,0,0,.12)}.template-preview-button{display:block;width:100%;padding:0;border:0;background:#fff;color:inherit;text-align:left;cursor:inherit}.browser-bar{display:flex;align-items:center;gap:6px;height:34px;padding:0 13px;background:#ece9e2;border-bottom:1px solid #ddd8ce}.browser-bar i{width:7px;height:7px;border-radius:50%;background:#b8b4ac}.browser-bar i:first-child{background:#c68c73}.browser-bar i:nth-child(2){background:#d5b567}.browser-bar i:nth-child(3){background:#7fa590}.browser-address{width:54%;height:13px;margin-left:8px;background:rgba(255,255,255,.68);border-radius:3px}.template-page-shot{display:grid;height:490px;padding:14px;background:#e5e1d9;place-items:center;overflow:hidden}.template-page-shot img{width:100%;height:100%;object-fit:contain;object-position:center;pointer-events:none;-webkit-user-drag:none;transition:.3s}.template-preview-button:hover .template-page-shot img{transform:translateY(-3px)}.template-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 21px}.template-meta small{display:block;color:#947044;font-size:9px;font-weight:700;letter-spacing:.13em}.template-meta strong{display:block;margin-top:4px;font-family:"Noto Serif Thai",serif;font-size:21px;font-weight:500}.template-view{display:inline-flex;align-items:center;gap:7px;color:#76501e;font-size:10px;font-weight:700;white-space:nowrap}.template-controls{position:relative;display:flex;align-items:center;justify-content:center;margin-top:18px}.template-dots{display:flex;gap:8px}.template-dot{width:7px;height:7px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.28);cursor:pointer}.template-dot.active{width:24px;border-radius:999px;background:#d8b773}.template-count{position:absolute;right:0;color:rgba(255,255,255,.48);font-size:10px;letter-spacing:.08em}.template-dialog{width:min(1180px,calc(100% - 40px));max-height:92vh;padding:0;border:1px solid rgba(216,183,115,.5);border-radius:12px;background:#151d1a;color:#fff;box-shadow:0 35px 100px rgba(0,0,0,.55)}.template-dialog::backdrop{background:rgba(1,10,8,.84);backdrop-filter:blur(6px)}.template-dialog-head{position:sticky;z-index:2;top:0;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#0b211c;border-bottom:1px solid rgba(255,255,255,.12)}.template-dialog-head strong{font-family:"Noto Serif Thai",serif;font-weight:500}.template-dialog-close{width:38px;height:38px;border:1px solid rgba(255,255,255,.25);border-radius:6px;background:transparent;color:#fff;font-size:20px;cursor:pointer}.template-dialog-body{max-height:calc(92vh - 67px);overflow:auto;padding:22px;background:#ddd8ce}.template-dialog-body img{width:min(900px,100%);height:auto;margin:auto;box-shadow:0 15px 50px rgba(0,0,0,.28)}
@media(max-width:960px){.template-slide{flex-basis:calc((100% - 20px)/2)}.template-page-shot{height:460px}}
@media(max-width:640px){.template-carousel{margin-top:34px}.template-slide{flex-basis:88%;min-width:280px}.template-page-shot{height:420px}.template-controls{align-items:flex-end}.template-dots{gap:6px}.template-dialog{width:calc(100% - 18px)}.template-dialog-body{padding:10px}}
.template-dialog-body img{width:min(1100px,100%)}
.template-dialog{overflow:hidden}
.template-dialog[open]{display:flex;height:92vh;flex-direction:column}
.template-dialog-head{position:relative;flex:0 0 auto}
.template-dialog-body{min-height:0;max-height:none;flex:1 1 auto;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#888d89 #d5d1c8}
.template-dialog-body::-webkit-scrollbar{width:10px}
.template-dialog-body::-webkit-scrollbar-track{background:#d5d1c8}
.template-dialog-body::-webkit-scrollbar-thumb{background:#888d89;border:2px solid #d5d1c8;border-radius:999px}
