.wt-expand-field { position: relative; display: block; min-width: 0; width: 100%; flex: 1 1 auto; }
.wt-expand-field > :is(input,textarea) { box-sizing: border-box; width: 100%; padding-right: max(3.2rem, 54px) !important; }
.wt-expand-trigger { position: absolute; top: 7px; right: 7px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 36px; margin: 0; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #d5c59f; font: inherit; cursor: pointer; }
.wt-expand-trigger:hover, .wt-expand-trigger:focus-visible { background: rgba(227,202,152,.10); outline: 1px solid rgba(227,202,152,.45); }
.wt-expand-trigger [aria-hidden] { font-size: 1.25em; line-height: 1; }
.wt-expand-field:has(> [hidden]) { display: none; }
.wt-expanded-editor[hidden] { display: none !important; }
.wt-expanded-editor { position: fixed; inset: 0; z-index: 200000; display: grid; place-items: center; padding: max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom)); background: rgba(2,11,14,.8); }
.wt-expanded-card { display: flex; flex-direction: column; width: min(820px,100%); max-height: min(90dvh,900px); padding: 18px; overflow-y: auto; border: 1px solid rgba(220,190,130,.5); border-radius: 16px; background: #102020; box-shadow: 0 24px 60px rgba(0,0,0,.4); color: #e6e5dc; }
.wt-expanded-header, .wt-expanded-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wt-expanded-header h2 { font-size: 1.12rem; line-height: 1.4; }
.wt-expanded-header button { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 1.5rem; }
#wtExpandedText { flex: 1 1 auto; width: 100%; min-height: min(42dvh,330px); margin: 12px 0; padding: 14px; resize: vertical; border: 1px solid rgba(209,189,145,.45); border-radius: 12px; background: #091717; color: #f1eee3; font: inherit; font-size: max(1rem,var(--wt-control-size,1rem)); line-height: 1.7; overflow: auto; }
.wt-expanded-actions { justify-content: flex-end; flex-wrap: wrap; }
.wt-expanded-actions button { min-height: 44px; padding: 8px 14px; border: 1px solid rgba(213,189,143,.4); border-radius: 10px; background: #17292a; color: #e7dfcb; font: inherit; }
#wtExpandedSave { background: linear-gradient(135deg,#e6d19d,#cea968); color: #231d10; }
@media (max-width:600px) { .wt-expanded-card { max-height: calc(100dvh - 20px); padding: 12px; } .wt-expanded-actions button { flex: 1 1 46%; } }
@media (max-height:450px) { .wt-expanded-card { padding: 8px 12px; } #wtExpandedText { min-height: 48px; margin: 6px 0; } .wt-expanded-actions { flex: 0 0 auto; } }
