.template-library{display:block!important;text-align:left!important;max-width:1200px;margin:auto;padding:24px!important}.template-library[hidden]{display:none!important}.template-library h2{margin:0 0 18px}.template-toolbar,.template-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.template-library button,.template-dialog button{border:1px solid #d9e0e8;border-radius:12px;background:#fff;color:#253044;padding:10px 16px;font:inherit;cursor:pointer}.template-library button:hover,.template-dialog button:hover{background:#f0f5ff}.template-library button:disabled,.template-dialog button:disabled{opacity:.5;cursor:wait}.template-search{display:flex;gap:8px;flex:1}.template-library input,.template-dialog input,.template-dialog textarea{box-sizing:border-box;min-width:0;border:1px solid #d8e0e9;border-radius:10px;background:#fff;color:#263145;padding:11px;font:inherit}.template-search input{width:100%}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:16px;margin:18px 0}.template-grid .template-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:10px;padding:18px;transition:transform .18s,box-shadow .18s}.template-card:hover{transform:translateY(-3px);box-shadow:0 8px 22px #24334d12}.template-card>span:not(.template-card-art){font-size:14px;line-height:1.5}.template-card-art{display:grid;place-items:center;height:80px;border-radius:10px;background:linear-gradient(135deg,#e5eaff,#e4f5ee);color:#6174a4;font-size:42px}.template-state{color:#5d718c;text-transform:capitalize}.template-dialog{width:min(880px,92vw);max-height:88dvh;box-sizing:border-box;border:1px solid #dce3ed;border-radius:22px;padding:24px;box-shadow:0 25px 100px #152a4940;color:#263145;background:#fff;overflow:auto}.template-dialog::backdrop{background:#17253b77;backdrop-filter:blur(4px)}.template-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px}.template-dialog h2{font-size:23px;margin:0}.template-dialog .template-close{font-size:25px;padding:4px 13px}.template-dialog p{line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.template-dialog textarea{min-height:90px;width:100%;resize:vertical}.template-dialog label{display:grid;gap:7px;margin:16px 0}.template-dialog input:not([type=checkbox]){width:100%}.template-dialog .template-confirm{display:flex;align-items:flex-start;line-height:1.5;font-size:14px}.template-confirm input{margin-top:5px;flex:none}.template-preview{position:relative;width:100%;max-height:450px;min-height:180px;margin:20px 0;background:#edf1f7;border:1px solid #dce3ed;border-radius:12px;overflow:hidden}.template-preview-tile{position:absolute;display:flex;flex-direction:column;gap:4px;box-sizing:border-box;background:white;border:1px solid #cad4e1;border-radius:6px;padding:5px;overflow:hidden;font-size:clamp(7px,1vw,12px)}.template-preview-tile strong{font-size:inherit}.template-preview-tile img{object-fit:contain;min-height:0;max-height:90%;max-width:100%}.template-inspect{display:grid;gap:5px;margin:16px 0}.template-inspect details{background:#f5f7fa;border:1px solid #e2e7ee;padding:12px;border-radius:10px}.template-inspect summary{cursor:pointer;text-transform:capitalize}.template-inspect img{max-width:100%;max-height:340px;object-fit:contain;display:block}.template-hint,.template-status{font-size:13px;color:#627087}.template-dialog .template-primary,.template-library .template-primary{background:#416bd6;color:#fff;border-color:#416bd6}.template-dialog .template-approve{background:#198054;color:#fff;border-color:#198054}.template-dialog .template-reject{background:#c73d49;color:#fff;border-color:#c73d49}.template-actions{margin-top:20px}.template-review-check{padding:12px;border-radius:10px;background:#fff4d7;color:#765c1d}@media(max-width:600px){.template-search{flex-basis:100%}.template-library{padding:12px!important}.template-dialog{padding:16px}}

.template-placeholder{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#7892b8}.template-placeholder>span{font-size:clamp(20px,4vw,55px);line-height:1}.template-placeholder>small{font-size:10px}.template-preview-tile>span{white-space:pre-line;line-height:1.5}.template-preview-tile>strong{font-weight:650;margin-bottom:5px}.template-card .template-preview.template-card-art{height:125px;min-height:125px;max-height:125px;margin:0;display:block}.template-card .template-preview-tile{padding:3px;font-size:6px}.template-card .template-placeholder>span{font-size:17px}.template-card .template-placeholder>small{display:none}.template-toolbar button[aria-pressed=true]{background:#e7edfb;border-color:#adc1ee;color:#345397}.template-actions{position:sticky;bottom:-24px;background:#fffffff5;padding:14px 0;border-top:1px solid #e6eaf0;backdrop-filter:blur(8px)}

.template-card-copy{display:flex;flex-direction:column;gap:8px;min-width:0}.template-card-copy>strong{font-size:17px}.template-card-copy>span{font-size:13px;line-height:1.55;color:#68758b;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.template-card-copy>small{font-size:12px;color:#566b8c}.template-board-art{position:relative;min-width:0;overflow:hidden;border-radius:13px;width:100%;aspect-ratio:16/10;background:#edf1f7}.template-board-art>.board-card__preview{width:100%;height:100%;aspect-ratio:auto}.template-board-art>.template-preview{margin:0;min-height:0;height:100%;max-height:none}.template-board-art .module{pointer-events:none}.template-official-logo{position:absolute;right:12px;bottom:12px;width:34px;height:34px;object-fit:contain;border-radius:10px;background:white;padding:5px;box-sizing:border-box;box-shadow:0 2px 8px #18274820;z-index:10}.template-dialog>.template-board-art,.template-upload>.template-board-art{max-height:400px;margin:18px 0}.template-shelf{margin:30px 0}.template-shelf h3{margin:0;font-size:22px;letter-spacing:-.5px;color:#26364c}.template-shelf>.template-hint{margin:7px 0 17px}.template-shelf-row{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(230px,30%);overflow-x:auto;gap:16px;padding:4px 2px 16px;scroll-snap-type:x proximity}.template-shelf-row .template-card{scroll-snap-align:start;display:flex;flex-direction:column;text-align:left;padding:12px;gap:13px}.template-featured .template-feature-slide{display:grid;grid-template-columns:1.5fr 1fr;gap:30px;width:100%;padding:25px;text-align:left;align-items:center;border-radius:22px;background:linear-gradient(120deg,#e8edff,#edf6fa);border:1px solid #dbe3f4;animation:template-feature-in .4s ease}.template-featured .template-feature-slide[hidden]{display:none}.template-feature-slide .template-card-copy>strong{font-size:clamp(22px,2.5vw,34px);letter-spacing:-1px}.template-feature-slide .template-card-copy>span{font-size:15px;-webkit-line-clamp:4}.template-feature-controls{display:flex;gap:7px;align-items:center;justify-content:center;margin:12px 0}.template-feature-controls button{padding:5px 10px;font-size:12px}.template-feature-controls button[aria-pressed=true]{background:#4968c4;color:white}.template-tag-filters,.template-tag-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:15px 0}.template-tag-controls{justify-content:space-between}.template-tag-controls select{border:1px solid #d5dfec;border-radius:10px;padding:9px;background:white;color:#34435b;font:inherit}.template-library .template-tag-filter{border-radius:999px;padding:7px 14px;background:#eef2fc;font-size:13px}.template-tag-editor{border:1px solid #d8e0e9;border-radius:12px;padding:9px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}.template-tags{display:contents}.template-tag{display:inline-flex;align-items:center;gap:6px;background:#e8edfb;color:#405995;border-radius:999px;padding:5px 9px;font-size:13px}.template-dialog .template-tag button{padding:0;border:0;background:transparent;opacity:0;width:16px;font-size:16px;line-height:1}.template-tag:hover button,.template-tag:focus-within button{opacity:1}.template-dialog .template-tag-editor>input{border:0;padding:6px;flex:1;min-width:150px;width:auto;outline-offset:2px}.template-field-label{display:block;margin:14px 0 7px}.template-rating{font-weight:600;color:#5571b8}.template-empty{padding:24px;color:#748299;background:#f2f5fa;border-radius:14px}.template-board-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}.template-board-choice{display:flex;flex-direction:column;gap:13px;text-align:left;padding:12px!important}.template-board-choice:hover{border-color:#6581c9!important}.template-board-choice .template-board-art{pointer-events:none}.template-card .template-placeholder small{display:none}@keyframes template-feature-in{from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(max-width:650px){.template-featured .template-feature-slide{grid-template-columns:1fr;padding:16px;gap:15px}.template-shelf-row{grid-auto-columns:80%}.template-tag button{opacity:1!important}}@media(prefers-reduced-motion:reduce){.template-featured .template-feature-slide{animation:none}}

.template-tag-editor{display:block;border:0;padding:0}.template-dialog .template-tag-editor>input{display:block;box-sizing:border-box;width:100%;border:1px solid #d8e0e9;padding:12px;border-radius:12px}.template-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.template-pending-badge{position:absolute;top:12px;left:12px;z-index:20;background:#f6c54e;color:#674100;padding:9px 15px;border:1px solid #dba829;border-radius:9px;font-size:18px;font-weight:800;letter-spacing:1.2px;box-shadow:0 3px 12px #4931001a}#bug-report-form select{padding:12px;border:1px solid var(--border,#d8e0e9);border-radius:12px;font:inherit;background:var(--surface-solid,#fff);color:var(--text,#263145)}

.boards-view__body{position:relative;isolation:isolate;z-index:0}.boards-view__topbar{z-index:2;background:var(--surface-solid,#fff)}.support-tabs{display:flex;gap:8px;margin:18px 0}.support-tabs button,#support-my-tickets button,#profile-nickname-form button{font:inherit;border:1px solid var(--border,#d8e0e9);border-radius:10px;padding:9px 14px;background:var(--surface-solid,#fff);color:var(--text,#263145)}.support-tabs [aria-pressed=true]{background:#e8edfb;color:#405995}.support-ticket{border:1px solid var(--border,#d8e0e9);padding:16px;border-radius:14px;margin:12px 0}.support-ticket p{white-space:pre-wrap}.support-ticket small{color:#68758b}#profile-nickname-form{display:flex;gap:8px;flex-wrap:wrap;align-items:end;margin:12px 0}#profile-nickname-form label{display:flex;flex-direction:column;gap:5px;font-size:12px}#profile-nickname-form input{min-width:0;width:200px;max-width:100%;border:1px solid var(--border,#d8e0e9);border-radius:10px;padding:9px;font:inherit;background:var(--surface-solid,#fff);color:var(--text,#263145)}#profile-nickname-form small{flex-basis:100%;font-size:12px;color:#68758b}

.profile-name-row{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.profile-name-row h2{margin:0}.profile-name-row #profile-nickname{font-size:13px;color:var(--muted,#68758b)}#profile-nickname-edit{border:0;background:none;color:var(--muted,#68758b);font-size:18px;padding:3px 5px;border-radius:6px;cursor:pointer}#profile-nickname-form[hidden]{display:none!important}

.template-actions button[aria-pressed=true]{background:#ffe4eb;border-color:#eea1b3;color:#b62d51}.template-actions button[aria-pressed=true]:hover{background:#ffd5e0}

.template-dialog.board-access-dialog{box-sizing:border-box;width:min(410px,calc(100vw - 32px));padding:28px;border:1px solid #e5e1d8;border-radius:24px;background:linear-gradient(155deg,#fffaf0,#fff 55%);text-align:center;box-shadow:0 22px 80px #15223830;color:#263145}.board-access-crown{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 16px;background:linear-gradient(140deg,#fff1c8,#f6d785);border:1px solid #e8cd86;border-radius:20px}.board-access-crown svg{width:43px;height:43px}.board-access-dialog h2{font-size:23px;line-height:1.2;letter-spacing:-.5px;margin:0 0 12px}.board-access-dialog p{font-size:14px;line-height:1.65;color:#657084;margin:0 0 22px}.board-access-actions{display:grid;gap:9px}.board-access-dialog .board-access-actions button{margin:0;width:100%;border-radius:12px;padding:12px;font:inherit;font-size:14px;cursor:pointer}.board-access-dialog .board-access-subscribe{background:linear-gradient(135deg,#edd081,#f8e3a7);border:1px solid #d5b65d;color:#4c3912;font-weight:700;box-shadow:0 4px 12px #bd943023}.board-access-dialog .board-access-subscribe:hover{background:#f5d98e;transform:translateY(-1px)}.board-access-dialog .board-access-back{background:transparent;border-color:transparent;color:#738093}.board-access-dialog .board-access-back:hover{background:#edf0f5}.board-access-dialog button:focus-visible{outline:3px solid #587fbd;outline-offset:3px}

.boards-screen-open .shop-modal{z-index:60000}

.boards-capacity{display:inline-flex;align-items:center;white-space:nowrap;padding:8px 13px;border:1px solid #dbe4ef;border-radius:999px;background:#eef3fa;color:#49617f;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.boards-capacity.is-full{background:#fff1dc;border-color:#edd3a5;color:#88611f}

.template-card.template-card--official{position:relative}.template-card--official .template-card-copy{padding-right:46px}.template-card--official>.template-official-logo{right:12px;bottom:12px;pointer-events:none}

.template-popular-tags{position:relative;align-content:start}.template-popular-tags [hidden]{display:none!important}

/* Template loading and compact preview disclosures. */
.template-status.template-loading{min-height: min(52vh,420px);display:flex;align-items:center;justify-content:center;gap:18px;margin:0;text-align:center;font-size:clamp(28px,5vw,44px);font-weight:750;letter-spacing:.06em;color:#3478ce}
.template-loading::before{content:"";width:34px;height:34px;flex:0 0 34px;border:4px solid #dbeafe;border-top-color:#2780e3;border-right-color:#2780e3;border-radius:50%;animation:template-loading-spin .8s linear infinite}
@keyframes template-loading-spin{to{transform:rotate(360deg)}}
.template-inspect-group{margin:16px 0;border:1px solid #dce4ee;border-radius:14px;background:#f7f9fc;overflow:hidden}
.template-inspect-group>summary{padding:15px 18px;font-weight:650;cursor:pointer;color:#344960}
.template-inspect-group>summary:focus-visible{outline:3px solid #78a9ea;outline-offset:-3px;border-radius:14px}
.template-inspect-group[open]>summary{border-bottom:1px solid #dce4ee}
.template-inspect-group>.template-inspect,.template-cosmetics-list{padding:8px 18px;max-height:340px;overflow:auto;overscroll-behavior:contain}
.template-cosmetic-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e4eaf1;font-size:14px}
.template-cosmetic-row span{font-size:12px;color:#67788c;flex-shrink:0}
@media(max-width:480px){.template-cosmetic-row{align-items:flex-start;flex-direction:column;gap:4px}}
@media(prefers-reduced-motion:reduce){.template-loading::before{animation-duration:2s}}

/* Gallery loading replaces its content while keeping Boards navigation available. */
.template-library.is-gallery-loading>:not(.template-gallery-loading){display:none!important}
.template-gallery-loading{box-sizing:border-box;min-height:min(600px,calc(100dvh - 210px));padding:36px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;color:var(--text,#263145);text-align:center}
.template-gallery-loading[hidden]{display:none!important}
.template-gallery-loading__art{display:flex;align-items:center;justify-content:center;gap:13px;width:230px;height:92px;overflow:hidden;mask-image:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent)}
.template-gallery-loading__art>span{box-sizing:border-box;flex:0 0 43px;width:43px;height:43px;border:2px solid color-mix(in srgb,var(--text,#263145) 38%,var(--surface-solid,#fff));border-radius:11px;background:var(--surface-solid,#fff);box-shadow:0 5px 12px #1c30490b;animation:template-gallery-slide 2.1s cubic-bezier(.4,0,.2,1) infinite both}
.template-gallery-loading__art>span:nth-child(2){animation-delay:.16s}
.template-gallery-loading__art>span:nth-child(3){animation-delay:.32s}
.template-gallery-loading .template-gallery-loading__label{margin:0;font-family:var(--site-font-family,Inter,system-ui,sans-serif);font-size:clamp(18px,3vw,24px);font-weight:600;line-height:1.4;letter-spacing:-.025em;color:var(--text,#263145)}
@keyframes template-gallery-slide{0%{opacity:0;transform:translateX(-65px) scale(.8) rotate(-8deg)}25%,60%{opacity:1;transform:translateX(0) scale(1) rotate(0)}85%,100%{opacity:0;transform:translateX(65px) scale(.8) rotate(8deg)}}
@media(prefers-reduced-motion:reduce){.template-gallery-loading__art>span{animation:none;opacity:1;transform:none}}


.template-anonymous{display:flex!important;align-items:center;gap:12px;padding:14px 0;font-weight:650}.template-anonymous input{appearance:none;width:38px;height:23px;border:1px solid #b8c4d4;border-radius:99px;background:#dfe5ed;position:relative;cursor:pointer;flex:none;transition:background .15s}.template-anonymous input::after{content:"";position:absolute;width:17px;height:17px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #20304030;transition:transform .15s}.template-anonymous input:checked{background:#6f92c5;border-color:#6f92c5}.template-anonymous input:checked::after{transform:translateX(15px)}
