/* V15.24 — Trang Thêm truyện độc lập, CSS scoped để không ảnh hưởng editor cũ. */
.admin-panel:has(.tg24-new-story){max-width:1120px}
.tg24-new-story{max-width:980px;margin:12px auto 0;color:var(--white)}
.tg24-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:8px 0 24px;border-bottom:1px solid color-mix(in srgb,var(--gold) 25%,transparent)}
.tg24-kicker{font-size:10px;letter-spacing:.16em;font-weight:800;color:var(--gold)}
.tg24-heading h2{margin:7px 0;font-size:clamp(23px,3vw,34px);line-height:1.2}
.tg24-heading p{margin:0;max-width:620px;color:var(--muted);font-size:13px;line-height:1.65}
.tg24-heading>button{flex-shrink:0}
.tg24-new-story .tg24-form{max-width:none;margin:20px 0 0}
.tg24-pane{margin:0 0 14px;padding:22px;border:1px solid color-mix(in srgb,var(--gold) 19%,var(--line));background:color-mix(in srgb,var(--surface2) 55%,var(--surface));border-radius:16px}
.tg24-pane-head{display:flex;align-items:flex-start;gap:13px;margin:0 0 19px}
.tg24-pane-head h3{font-size:18px;color:var(--white);margin:1px 0 5px}
.tg24-pane-head p{color:var(--muted);font-size:12px;margin:0}
.tg24-step{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;background:color-mix(in srgb,var(--gold) 14%,var(--surface));border:1px solid color-mix(in srgb,var(--gold) 42%,transparent);color:var(--gold);border-radius:12px;font-weight:800;font-size:13px}
.tg24-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.tg24-fields>label{min-width:0;display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--white);font-weight:650}
.tg24-fields .tg24-wide{grid-column:1/-1}
.tg24-required{display:inline;color:var(--gold)}
.tg24-new-story :is(.tg24-fields input,.tg24-fields select,.tg24-fields textarea){min-width:0;width:100%;border:1px solid #475363;border-radius:10px;background:var(--surface);color:var(--white);padding:12px 13px;line-height:1.5;font:inherit;font-size:14px;outline:none;box-shadow:none}
.tg24-new-story :is(.tg24-fields input,.tg24-fields select,.tg24-fields textarea):focus{border-color:var(--gold);box-shadow:0 0 0 2px color-mix(in srgb,var(--gold) 18%,transparent)}
.tg24-new-story small{font-weight:400;color:var(--muted);line-height:1.5}
.tg24-genre .tg-genre-picker{width:100%;min-width:0;max-width:none;margin:0}
.tg24-genre .tg-genre-picker legend{font-size:14px}
.tg24-cover-area{display:flex;align-items:flex-start;gap:25px}
.tg24-cover-preview{width:138px;aspect-ratio:3/4;flex:0 0 138px;overflow:hidden;border-radius:11px;border:1px solid color-mix(in srgb,var(--gold) 30%,transparent);background:#121b28}
.tg24-cover-preview img{display:block;width:100%;height:100%;object-fit:cover}
.tg24-cover-controls{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:10px}
.tg24-cover-controls>label{font-weight:750;font-size:13px;color:var(--white)}
.tg24-cover-controls input{max-width:100%;font-size:12px;color:var(--muted)}
.tg24-advanced{margin:4px 0 18px;border:1px solid color-mix(in srgb,var(--gold) 20%,transparent);border-radius:13px;background:var(--surface2)}
.tg24-advanced>summary{cursor:pointer;list-style:none;display:flex;gap:8px 18px;align-items:center;justify-content:space-between;padding:18px 20px;color:var(--gold)}
.tg24-advanced>summary::-webkit-details-marker{display:none}
.tg24-advanced>summary span{font-size:11px;color:var(--muted);font-weight:400}
.tg24-advanced>.tg24-fields{padding:0 20px 19px}
.tg24-actions{position:relative;display:flex;align-items:center;gap:12px 22px;justify-content:space-between;flex-wrap:wrap;padding:22px;background:var(--surface2);border:1px solid color-mix(in srgb,var(--gold) 30%,transparent);border-radius:14px}
.tg24-actions-copy{display:flex;flex-direction:column;gap:5px;flex:1;min-width:170px}
.tg24-actions-copy strong{color:var(--white);font-size:15px}
.tg24-actions-copy span{font-size:12px;color:var(--muted)}
.tg24-buttons{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.tg24-buttons button{min-height:44px;margin:0!important;padding-inline:16px}
.tg24-actions #story-status{flex-basis:100%;margin:0;color:var(--gold)}
.tg24-dialog{border:1px solid color-mix(in srgb,var(--gold) 40%,transparent);background:#111b29;color:#f1e9d8;border-radius:15px;max-width:min(680px,calc(100vw - 24px));width:100%;padding:0;box-shadow:0 24px 65px rgba(0,0,0,.65)}
.tg24-dialog::backdrop{background:rgba(0,0,0,.8)}
.tg24-dialog-body{padding:22px}
.tg24-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px}
.tg24-dialog-header h3{color:var(--gold);font-size:20px;margin:0}
.tg24-dialog-content{display:flex;align-items:flex-start;gap:20px}
.tg24-dialog-content img{width:145px;aspect-ratio:3/4;object-fit:cover;flex-shrink:0;border-radius:10px}
.tg24-dialog-content h3{font-size:21px;margin:0 0 10px}
.tg24-dialog-content p{font-size:13px;color:#d7dce4;white-space:pre-line;overflow-wrap:anywhere}
.tg24-success{text-align:center;padding:60px 20px}
.tg24-success-icon{border-radius:50%;width:60px;height:60px;display:grid;place-items:center;margin:0 auto 15px;color:#1b3428;background:#b4dfaa;font-size:30px}
.tg24-success h3{font-size:24px;color:var(--gold)}
.tg24-success p{color:var(--muted)}
.tg24-success-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:9px;margin-top:22px}
@media(max-width:690px){.tg24-heading{flex-direction:column;align-items:stretch}.tg24-pane{padding:15px}.tg24-fields{grid-template-columns:1fr}.tg24-cover-area{gap:14px}.tg24-cover-preview{width:105px;flex-basis:105px}.tg24-advanced>summary{flex-direction:column;align-items:flex-start}.tg24-advanced>.tg24-fields{padding:0 14px 15px}.tg24-actions{padding:15px}.tg24-actions-copy{flex-basis:100%}.tg24-buttons{width:100%}.tg24-buttons button{flex:1;white-space:nowrap}.tg24-dialog-content img{width:100px}.tg24-dialog-body{padding:13px}}
@media(max-width:390px){.tg24-cover-area{flex-direction:column}.tg24-dialog-content{flex-direction:column}}
/* Thể loại trong màn hình độc lập: thống nhất với bộ lựa chọn cũ. */
.tg24-genre .tg-genre-checkbox-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tg24-genre .tg-genre-choice{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid #394a5e;border-radius:9px;background:#111b28;color:#e9e0d3;cursor:pointer;font-size:12px}
.tg24-genre .tg-genre-choice:has(input:checked){border-color:var(--gold);background:color-mix(in srgb,var(--gold) 12%,var(--surface))}
.tg24-genre .tg-genre-choice input{accent-color:var(--gold);width:16px;height:16px;flex-shrink:0}
.tg24-genre .tg-genre-choice[hidden],.tg24-cover-controls [hidden]{display:none!important}
.tg24-genre .tg-genre-picker-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}
.tg24-genre .tg-genre-picker-actions input{flex:1;min-width:170px;padding:10px 11px;border-radius:9px;background:var(--surface);border:1px solid #445568;color:var(--white)}
.tg24-genre :is(.tg-genre-help,.tg-genre-preview){font-size:11px;color:var(--muted);line-height:1.6}
@media(max-width:690px){.tg24-genre .tg-genre-checkbox-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
