body.ge-app #app .template-library-controls{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:16px;align-items:end;margin-bottom:24px}
body.ge-app #app .template-library-controls label{min-width:0;margin:0;display:grid;gap:8px}
body.ge-app #app .template-library-controls select{background-position:right 18px center!important;padding-right:48px!important;width:100%;min-height:46px}
body.ge-app #app .template-library-search{position:relative;display:block}
body.ge-app #app .template-library-search input{width:100%;padding-right:44px}
body.ge-app #app .template-library-search button{position:absolute;right:4px;top:2px;min-height:40px;min-width:40px;padding:4px}
body.ge-app #app .template-library-heading{display:flex;gap:12px;align-items:baseline;justify-content:space-between}
body.ge-app #app .template-library-heading h2{font-size:20px;margin:0}
body.ge-app #app .template-library-description{margin:8px 0 20px;color:var(--muted);max-width:80ch}
body.ge-app #app .template-results{display:grid;gap:14px;padding-bottom:16px}
body.ge-app #app .template-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0;padding:20px;min-width:0;overflow:visible}
body.ge-app #app .template-entry>div:first-child{min-width:0}
body.ge-app #app .template-entry h3,body.ge-app #app .template-entry h4{font-size:17px;margin:0 0 6px;overflow-wrap:anywhere}
body.ge-app #app .template-entry p{margin:6px 0;color:var(--muted);max-width:75ch;overflow-wrap:anywhere}
body.ge-app #app .template-entry .badge{display:inline-flex;width:auto;max-width:100%;font-size:12px;margin:2px 0}
body.ge-app #app .template-entry-snippet{white-space:pre-line;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
body.ge-app #app .template-entry-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex-shrink:0}
body.ge-app #app .template-entry-menu{position:relative}
body.ge-app #app .template-entry-menu summary{list-style:none;cursor:pointer;display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:10px;font-weight:700}
body.ge-app #app .template-entry-menu summary::-webkit-details-marker{display:none}
body.ge-app #app .template-entry-menu>div{position:absolute;right:0;top:calc(100% + 6px);background:var(--paper);padding:8px;border:1px solid var(--line);border-radius:12px;z-index:5;min-width:160px;box-shadow:0 8px 24px #0002}
body.ge-app #app .template-entry-menu>div button{width:100%;text-align:left}
body.ge-app #app .template-text-group{display:grid;gap:12px}
body.ge-app #app .template-text-group>h3{font-size:15px;margin:4px 0;color:var(--muted)}
body.ge-app #editor:has(#editor-form[data-ticket-mail-key]){width:min(1120px,calc(100vw - 32px));max-width:none}
body.ge-app #editor .ticket-mail-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
body.ge-app #editor .ticket-mail-form label{display:grid;gap:8px;margin-bottom:16px;min-width:0}
body.ge-app #editor .ticket-mail-form textarea{min-height:320px;width:100%;line-height:1.6;resize:vertical}
body.ge-app #editor .ticket-mail-form input{width:100%}
body.ge-app #editor .ticket-mail-variables{margin:0 0 16px;padding:12px;border:1px solid var(--line);border-radius:12px}
body.ge-app #editor .ticket-mail-variables summary{cursor:pointer;font-weight:600;min-height:32px}
body.ge-app #editor .ticket-mail-variables>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.ge-app #editor .ticket-mail-variables button{display:grid;text-align:left;gap:4px;min-width:0;padding:12px;white-space:normal}
body.ge-app #editor .ticket-mail-variables code{font-size:12px;overflow-wrap:anywhere}
body.ge-app #editor .ticket-mail-variables span{font-size:12px;color:var(--muted)}
body.ge-app #editor .ticket-mail-preview{border:1px solid var(--line);border-radius:12px;padding:20px;background:var(--ge-field);min-width:0}
body.ge-app #editor .ticket-mail-preview h3{margin:0 0 8px;font-size:17px}
body.ge-app #editor .ticket-mail-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.65;margin:16px 0}
body.ge-app #editor .ticket-mail-preview strong{display:block;overflow-wrap:anywhere}
body.ge-app #editor .ticket-mail-preview-error{color:var(--danger,#b14f3b);margin:8px 0}
@media(max-width:760px){body.ge-app #app .template-library-controls{grid-template-columns:minmax(0,1fr);gap:14px;margin-bottom:20px}body.ge-app #app .template-entry{align-items:stretch;flex-direction:column;gap:12px;padding:18px}body.ge-app #app .template-entry-actions{justify-content:flex-end}body.ge-app #app .template-mail-entry>button{align-self:flex-end}body.ge-app #editor:has(#editor-form[data-ticket-mail-key]){width:100%;max-width:100%}body.ge-app #editor .ticket-mail-form{grid-template-columns:minmax(0,1fr);gap:20px}body.ge-app #editor .ticket-mail-preview{padding:16px}}

body.ge-app #editor .ticket-mail-design{border:1px solid var(--line);padding:16px;border-radius:12px;margin-bottom:16px}
body.ge-app #editor .ticket-mail-design summary{cursor:pointer;font-weight:700;min-height:32px}
body.ge-app #editor .ticket-mail-design-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body.ge-app #editor .ticket-mail-design select{width:100%;background-position:right 18px center!important;padding-right:48px!important}
body.ge-app #editor .ticket-mail-design input[type=color]{height:46px;padding:4px;min-width:0}
body.ge-app #editor .ticket-mail-design input[type=file]{white-space:normal;max-width:100%;font-size:13px}
body.ge-app #editor .ticket-mail-form .ticket-mail-check{display:flex;gap:12px;align-items:center}
body.ge-app #editor .ticket-mail-check input{width:22px;height:22px;flex:0 0 22px}
body.ge-app #editor .ticket-mail-preview iframe{display:block;width:100%;height:760px;border:0;margin:16px 0;background:#f1f5f4;border-radius:8px}
body.ge-app #editor .ticket-mail-preview{position:sticky;top:0;padding:14px}
body.ge-app #editor .ticket-mail-image-error{color:var(--danger,#b14f3b)}
@media(max-width:760px){body.ge-app #editor .ticket-mail-design-grid{grid-template-columns:minmax(0,1fr)}body.ge-app #editor .ticket-mail-preview{position:static}}

body.ge-app #editor .ticket-mail-form .ticket-mail-check{flex-direction:row!important;justify-content:flex-start;text-align:left;align-items:center;gap:12px}

body.ge-app #editor:has(#editor-form[data-ticket-layout-id]){width:min(1120px,calc(100vw - 32px));max-width:none}body.ge-app #editor [data-layout-preview]{width:100%;height:740px;border:0}body.ge-app #editor:has([data-ticket-layout-id]) select{background-position:right 18px center!important;padding-right:48px!important}body.ge-app #editor:has([data-ticket-layout-id]) input[type=color]{height:46px;padding:4px}body.ge-app #editor:has([data-ticket-layout-id]) input[type=file]{max-width:100%;font-size:13px}@media(max-width:760px){body.ge-app #editor:has(#editor-form[data-ticket-layout-id]){width:100%;max-width:100%}}

.template-entry-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}.template-entry-title h3{min-width:0;overflow-wrap:anywhere;margin:0}.template-entry-title .badge{flex:none;margin:0}body.ge-app #app .template-entry.template-layout-entry{display:grid;grid-template-columns:minmax(0,1fr);align-items:start}body.ge-app #app .template-layout-entry .template-entry-actions{justify-self:end}.template-layout-entry>div:first-child{width:100%;min-width:0}

.ticket-mail-type-choices,.ticket-mail-choices{display:grid;gap:16px}.ticket-mail-type-choices button{justify-content:flex-start;white-space:normal;text-align:left}.ticket-mail-choices label{display:grid;gap:8px}.ticket-mail-choices select{width:100%;min-width:0;padding-right:44px!important;background-position:right 18px center!important}.template-mail-entry .template-entry-actions{flex-wrap:wrap}.template-mail-entry .template-entry-title .badge{white-space:nowrap}
