.animation-panel table{width:100%;table-layout:fixed}.animation-panel th,.animation-panel td{text-align:center}.animation-panel th:first-child{width:30%}.animation-panel th:last-child{width:60px}.animation-panel .pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:20px}.animation-form fieldset,#animation-details fieldset{margin:0 0 20px;padding:16px}.animation-setting-row{display:flex;align-items:center;gap:16px;padding:10px 0}.animation-setting-row span{flex:1;min-width:0}.animation-form .toggle-control{display:flex;align-items:center;gap:10px;margin:12px 0}.animation-role-list{display:grid;gap:12px}.animation-role-list label{display:flex;align-items:center;gap:10px}.animation-discord{padding:20px;background:#313338;color:#f2f3f5;border-radius:6px}.animation-discord-embed{padding:16px;border-left:4px solid #5865f2;background:#2b2d31;margin-bottom:16px}.animation-discord button,.animation-discord button:disabled{background:#5865f2;color:white;border-color:#5865f2;opacity:1}.animation-panel .text-button{white-space:normal;overflow-wrap:anywhere}#animation-details td{overflow-wrap:anywhere}#animation-details table{width:100%}#animation-editor textarea{min-height:90px}
@media(max-width:700px){.animation-panel table{table-layout:auto}.animation-setting-row{flex-wrap:wrap}.animation-form .form-row{flex-direction:column}}
.animation-workspace{display:grid;grid-template-columns:minmax(0,2fr) minmax(270px,1fr);gap:20px;align-items:start}
.animation-workspace .panel{min-width:0;margin:0;padding:20px}
.animation-workspace .panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
.animation-workspace h2{font-size:17px;margin:0}.animation-workspace .panel-heading button{padding:8px 12px}
.animation-config-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.animation-form{gap:16px}.animation-form fieldset{min-width:0;margin:0;padding:14px;display:flex;flex-direction:column;gap:12px}
.animation-form label{min-width:0}.animation-form textarea{min-height:66px;resize:vertical}
.animation-form .form-row{display:flex;gap:12px}.animation-form .form-row>label{flex:1}
.animation-fields-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.animation-publication{grid-column:1/-1;order:0}.animation-config-grid>fieldset:nth-child(2){order:2}.animation-config-grid>fieldset:nth-child(3){order:1}.animation-config-grid>fieldset:nth-child(4){order:3}
.animation-options{display:flex;flex-direction:column;gap:12px}.animation-form .toggle-line{justify-content:space-between;gap:12px;margin:0}
.animation-reward-box{padding:10px;border:1px solid var(--line);max-height:85px;overflow:auto;overflow-wrap:anywhere;color:var(--muted)}
.animation-form .actions{gap:10px;flex-wrap:wrap}.animation-form .settings-footer{display:flex;justify-content:space-between;gap:12px;margin-top:4px}
.animation-editor-tools{margin-top:16px}.animation-form .settings-footer[hidden]{display:none}
.animation-history-group{margin:0 0 16px;padding:10px 12px;min-width:0}.animation-history-scroll{max-height:245px;overflow:auto;scrollbar-gutter:stable}
.animation-event{padding:12px 0;border-bottom:1px solid var(--line)}.animation-event:last-child{border-bottom:0}.animation-event-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.animation-event-heading .text-button{text-align:left;white-space:normal;overflow-wrap:anywhere;font-weight:600}
.animation-event-meta{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:10px 0;font-size:12px}.animation-event small{color:var(--muted)}
.animation-workspace .pagination{display:flex;justify-content:center;align-items:center;gap:16px;margin-top:16px}
.animation-lottery{grid-template-columns:1fr}.animation-lottery .animation-publication{grid-column:auto}.animation-lottery .animation-config-grid>fieldset:nth-child(2){order:1}.animation-lottery .animation-message{grid-column:1/-1;order:2}.animation-lottery .animation-tier-panel{grid-column:1/-1}
.animation-lottery .animation-follow>[data-follow]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.animation-lottery .animation-history-group{margin:0}
.animation-tiers{max-height:260px;overflow:auto;scrollbar-gutter:stable}.animation-tier-row{display:grid;grid-template-columns:130px minmax(0,1fr);gap:16px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.animation-tier-row button{text-align:left;white-space:normal;overflow-wrap:anywhere}
#animation-options fieldset{padding:16px}.animation-role-list{max-height:210px;overflow:auto}
@media(max-width:1000px){.animation-workspace{grid-template-columns:1fr}.animation-follow>[data-follow]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:650px){.animation-config-grid,.animation-lottery .animation-follow>[data-follow],.animation-follow>[data-follow]{grid-template-columns:1fr}.animation-workspace .panel{padding:14px}.animation-workspace .panel-heading{align-items:flex-start;flex-wrap:wrap}.animation-tier-row{grid-template-columns:100px minmax(0,1fr)}.animation-form .form-row{flex-direction:column}.animation-fields-three{gap:6px}}.animation-workspace .animation-form{max-width:none;width:100%;display:flex;flex-direction:column}
.animation-form label{display:flex;flex-direction:column;margin:0;font-size:12px}
.animation-form label.toggle-line{display:flex;flex-direction:row;align-items:center;justify-content:space-between}
.animation-form button{margin:0}.animation-form .actions{margin:0}
.animation-form textarea{display:block;width:100%;background:var(--bg);color:var(--text);border:1px solid #405158;padding:10px;font:inherit;resize:vertical}
.animation-workspace .text-button{border:0;background:transparent;color:var(--accent);padding:4px 0;line-height:1.5}
.animation-workspace .context-trigger{flex:none;width:18px;height:18px;padding:0;background:transparent;color:var(--accent);border:1px solid var(--accent);line-height:14px}
.animation-history-group p{margin:6px 0;font-size:12px}.animation-event-meta button{font-size:12px}
.animation-form .kali-select,.animation-form input:not([type=checkbox]),.animation-form select{width:100%;min-width:0}
.animation-reward-box{max-height:180px}.animation-reward-facts{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin-top:8px}.animation-reward-facts:empty{display:none}
.animation-tier-row{grid-template-columns:115px minmax(0,1fr) auto}.animation-tier-row>span{font-size:12px}
.animation-reward-box .shop-item-cell,.animation-tiers .shop-item-cell,#animation-pack .shop-item-cell{padding:0;margin:0;cursor:pointer}
.animation-tiers [data-tier-content]{min-width:0;color:var(--muted);font-size:12px}.animation-tiers .reward-item-grid{gap:8px}
@media(max-width:650px){.animation-tier-row{grid-template-columns:1fr auto}.animation-tier-row>[data-tier-content]{grid-column:1/-1;grid-row:2}.animation-tier-row>[data-tier]{grid-column:2;grid-row:1}}.animation-lottery .animation-message,.animation-lottery .animation-tier-panel{grid-column:auto}
.animation-lottery .animation-follow>[data-follow]{grid-template-columns:1fr}
.animation-lottery .animation-message textarea{min-height:160px}.animation-lottery .animation-history-scroll{max-height:200px}
@media(max-width:650px){.animation-lottery .animation-message textarea{min-height:90px}}
.animation-tier-row>[data-tier]{text-align:center;white-space:nowrap;justify-self:end}
#animation-tier-choice .form{display:flex;flex-direction:column;gap:16px}
#animation-tier-choice fieldset{margin:0;padding:14px;min-width:0}
#animation-tier-choice .animation-tier-tools{display:flex;gap:12px}
#animation-tier-choice [data-tier-preview]{max-height:240px;overflow:auto;color:var(--muted)}
#animation-tier-choice .shop-item-cell{padding:0;margin:0}
#animation-tier-choice [data-clear]{align-self:flex-start}

.animation-form .reward-item-grid .shop-item-cell,.animation-reward-box .shop-item-cell{border-color:transparent;background:transparent;box-shadow:none}
.animation-form .form-row input,.animation-form .select-trigger{height:42px;min-height:42px;box-sizing:border-box;padding-top:9px;padding-bottom:9px}
.animation-follow-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.animation-follow-tabs [aria-selected=true]{background:var(--accent);color:var(--bg)}
.animation-follow .animation-history-group{border:0;padding:0;margin:0}.animation-history-group[hidden]{display:none}.animation-history-group>legend{display:none}
.animation-follow .animation-history-scroll{max-height:480px;overflow:auto;overscroll-behavior:contain}.animation-follow .animation-event{padding:8px 0;margin:0;border:0;border-bottom:1px solid var(--line)}
.animation-event-meta{font-size:12px}.animation-role-buttons{display:flex;gap:16px;flex-wrap:wrap}.animation-role-buttons>div{display:flex;gap:10px;align-items:center}
.animation-role-list{max-height:300px;overflow:auto;overscroll-behavior:contain}.animation-role-list .checkbox-row{display:flex;align-items:center;gap:8px;padding:6px 0;margin:0;min-height:0}
.animation-form .kali-clock-field>button[hidden]{display:none}.animation-form .settings-footer{justify-content:flex-start;flex-wrap:wrap;gap:10px}

.animation-detail-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.animation-detail-tabs [aria-selected=true]{background:var(--accent);color:var(--bg)}.animation-detail-scroll{height:360px;overflow:auto;overscroll-behavior:contain}.animation-detail-scroll td{padding:10px}.animation-plan-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:end}.animation-plan-row .toggle-line{gap:12px;justify-content:flex-start;padding-bottom:10px}@media(max-width:650px){.animation-plan-row{grid-template-columns:1fr}}

.animation-follow-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.animation-follow-tabs button{min-width:0;padding:10px 6px}.animation-role-buttons{font-size:12px}.animation-form .settings-footer{justify-content:flex-start;gap:10px}.animation-event-meta{margin:4px 0 0;align-items:center}.animation-event-meta small{margin:0}.animation-history-scroll{overscroll-behavior:contain}
.animation-follow-tabs{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overscroll-behavior:contain;scrollbar-width:thin}.animation-follow-tabs button{flex:1 0 auto;white-space:nowrap;font-size:10px;padding:10px 6px}.animation-role-buttons{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}.animation-role-buttons>div{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;margin:0}.animation-role-buttons .context-trigger{flex:0 0 auto}

.animation-information{display:grid;grid-template-columns:1fr auto;gap:12px;margin:0}.animation-information dd{margin:0}.animation-event-meta{justify-content:flex-start}
.animation-form .settings-footer>[value=save]{order:0}.animation-form .settings-footer>[data-preview]{order:1}.animation-form .settings-footer>[value=publish]{order:3;margin-left:auto}

.animation-follow>[data-follow]{display:block}.animation-detail-tabs{flex-wrap:nowrap;overflow-x:auto}.animation-detail-tabs button{white-space:nowrap;flex:1 0 auto}.animation-form .settings-footer>[value=publish]{margin-left:auto}.animation-form .animation-plan-row .toggle-line{justify-content:flex-start}

.animation-publication>.animation-fields-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.animation-access-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.animation-access-columns .animation-role-buttons,.animation-access-columns .animation-options{margin:0;display:grid;gap:8px}
.animation-access-columns .animation-role-buttons>div,.animation-access-columns .toggle-line{min-height:28px;margin:0;gap:12px}
.animation-access-columns .animation-options .toggle-line{display:flex;justify-content:space-between;align-items:center}
.animation-access>.form-row{margin-top:12px}
#animation-roles .animation-role-list{gap:0}
#animation-roles .animation-role-list .checkbox-row{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:30px;padding:4px 0;margin:0}
#animation-roles .toggle-line{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;margin:16px 0 0}
.animation-reward-box:has(.shop-inclusions){border:0;padding:0;max-height:none;overflow:visible}
.animation-reward-box .shop-inclusion-actions{margin:4px 0;padding-left:20px}
@media(max-width:650px){.animation-publication>.animation-fields-three,.animation-access-columns{grid-template-columns:1fr}}

.animation-reward-box .shop-inclusions{margin-top:0}
.animation-access-columns .animation-role-buttons>div,.animation-access-columns .toggle-line{min-height:34px}

/* Single weekly lottery; scrollbars reserve space away from action buttons. */
.animation-lottery .animation-tiers{padding-right:14px;scrollbar-gutter:stable;overscroll-behavior:contain}
.animation-lottery .animation-message{grid-column:1/-1;order:2}
.animation-lottery .animation-config-grid>fieldset:nth-child(3){order:3}
.animation-lottery .animation-tier-panel{order:4;grid-column:1/-1}
.animation-lottery .animation-message textarea{min-height:125px}
.lottery-current{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;color:var(--muted);font-size:12px}
.lottery-archives-scroll{max-height:360px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:14px}
.lottery-archive{border-bottom:1px solid var(--line);padding:12px 0}
.lottery-archive summary{cursor:pointer;display:grid;grid-template-columns:1fr auto;gap:5px 12px;list-style:none;color:var(--text)}
.lottery-archive summary::-webkit-details-marker{display:none}
.lottery-archive summary>span{font-weight:600}.lottery-archive summary>small{grid-column:1;color:var(--muted)}
.lottery-archive summary::after{content:'+';grid-column:2;grid-row:1/3;align-self:center;color:var(--accent)}
.lottery-archive[open] summary::after{content:'−'}
.lottery-archive [data-archive-body]{padding-top:8px;font-size:13px;overflow-wrap:anywhere}
.lottery-archive p{margin:4px 0 10px}.lottery-archive ul{padding-left:18px;margin:0}.lottery-archive li{padding:3px 0}
.animation-lottery button[hidden]{display:none}

.animation-lottery .animation-message,.animation-lottery .animation-tier-panel{grid-column:auto;order:2}
.animation-lottery .animation-message textarea{flex:1;min-height:180px}
.animation-lottery .animation-message>label{display:flex;flex:1;flex-direction:column}
.animation-lottery .animation-role-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:4px}
.animation-lottery .animation-role-buttons>div{font-size:11px;gap:6px}
@media(max-width:650px){.animation-lottery .animation-role-buttons{grid-template-columns:1fr}.animation-lottery .animation-message textarea{min-height:120px}}

.animation-lottery .animation-config-grid>fieldset.animation-message{order:2}
.animation-lottery .animation-config-grid>fieldset.animation-tier-panel{order:3}

/* Compact lottery editor: shared rewards, three tickets per desktop row. */
.animation-lottery .animation-config-grid{align-items:start;gap:14px}
.animation-lottery .animation-config-grid>fieldset{grid-column:1/-1;align-self:start}
.animation-lottery .animation-config-grid>fieldset.lottery-schedule{display:grid;grid-template-columns:3fr 2fr;gap:12px;align-items:start}
.animation-lottery .lottery-schedule .form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.animation-lottery .lottery-schedule input,.animation-lottery .lottery-schedule .select-trigger{height:42px;min-height:42px;box-sizing:border-box}
.animation-lottery .lottery-schedule .kali-clock-field{display:block;margin:8px 0 0}
.animation-lottery .lottery-schedule .kali-clock-field input{margin:0}
.animation-lottery .animation-message textarea{height:90px;min-height:90px;flex:none}
.animation-lottery .animation-tiers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:250px;padding:2px 12px 2px 0;align-content:start}
.lottery-tier-card{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:72px;min-width:0;padding:10px;border:1px solid var(--line);background:var(--bg);cursor:pointer;flex-wrap:wrap}
.lottery-tier-card:focus-within,.lottery-tier-card:hover{border-color:var(--accent)}
.animation-lottery .lottery-tier-choice{display:flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--text);padding:0;min-width:0;font-size:12px;text-align:left;white-space:nowrap}
.lottery-tier-choice .kali-icon{width:26px;height:26px;flex:none;color:var(--accent)}
.lottery-tier-card [data-tier-content]{min-width:0;color:var(--muted);font-size:11px}
.lottery-tier-card .shop-inclusions{margin:0}.animation-lottery .lottery-tier-card .shop-inclusion-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:10px;list-style:none;padding:0;margin:0}
.lottery-tier-card .shop-inclusion-actions li{margin:0;padding:0}.lottery-tier-card .shop-inclusion-actions button{padding:0;line-height:1.5}
@media(max-width:1100px){.animation-lottery .animation-tiers{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.animation-lottery .animation-config-grid>fieldset.lottery-schedule{grid-template-columns:1fr}.animation-lottery .animation-tiers{grid-template-columns:1fr}}

/* Lottery controls remain attached to their labels; archives use the shared dialog. */
#animation-tier-choice .animation-tier-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px}
#animation-tier-choice fieldset{min-width:0;margin:0;padding:14px}
#animation-tier-choice .shop-inclusions{margin:0}
#animation-tier-choice .shop-inclusion-actions{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:16px;list-style:none;margin:0;padding:0}
#animation-tier-choice .shop-inclusion-actions li{margin:0;padding:0}
#animation-tier-choice .shop-inclusion-actions button{padding:0;min-height:0}
#animation-tier-choice [data-tier-preview]{font-size:12px;color:var(--muted)}
#animation-tier-choice .actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.lottery-archive-table-scroll{max-height:420px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:12px}
.lottery-archive-table-scroll table{width:100%;border-collapse:collapse;table-layout:fixed}
.lottery-archive-table-scroll th,.lottery-archive-table-scroll td{text-align:left;padding:10px 8px}
.lottery-archive-table-scroll th:last-child,.lottery-archive-table-scroll td:last-child{width:90px;text-align:right}
#lottery-archive-detail .lottery-archive{border:0;padding:0}
#lottery-archive-detail summary{display:none}
#lottery-archive-detail [data-archive-body]{padding:0}

.animation-lottery .animation-publication>.animation-fields-three{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(140px,180px);align-items:end}
.animation-lottery .lottery-cumulative-footer{display:flex;justify-content:flex-end;margin-top:14px}
.animation-lottery .lottery-cumulative-footer .toggle-line{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;width:auto;margin:0;padding:0}
.animation-lottery .lottery-cumulative-footer .toggle-line>span{flex:0 0 auto}
#animation-tier-choice button{margin:0}
#animation-tier-choice .form{gap:0}
#animation-tier-choice .dialog-scroll{display:grid;gap:14px}
#animation-tier-choice .animation-tier-tools{margin:0}
@media(max-width:1000px){.animation-lottery .animation-publication>.animation-fields-three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.animation-lottery .animation-publication>.animation-fields-three{grid-template-columns:1fr}}

.animation-lottery .settings-footer>[value=publish]{order:0;margin-left:0}
.animation-lottery .settings-footer>[data-preview]{order:1;margin-left:auto}

#lottery-discord-preview .lottery-message-preview{margin:0;align-items:flex-start;font-family:"Segoe UI",Arial,sans-serif}
#lottery-discord-preview .discord-embed{width:fit-content;max-width:100%;box-sizing:border-box;border-left-color:#5865f2;border-radius:4px;padding:12px 14px}
#lottery-discord-preview .discord-message{color:#dbdee1;font-size:14px;line-height:1.4;text-align:left}
#lottery-discord-preview .discord-message :is(h2,h3,h4){margin:0;color:#f2f3f5;line-height:1.3}
#lottery-discord-preview .discord-message h2{font-size:1.4em}
#lottery-discord-preview .discord-message h3{font-size:1.2em}
#lottery-discord-preview .discord-message h4{font-size:1em}
#lottery-discord-preview .discord-message ul{list-style:disc;margin:0;padding-inline-start:1.5em}
#lottery-discord-preview .discord-message a{color:#6eb8ff;text-decoration:none}
#lottery-discord-preview .discord-message a:hover{text-decoration:underline}
#lottery-discord-preview .discord-message :is(code,pre){background:#1e1f22;border-radius:3px;padding:1px 4px;white-space:pre-wrap}
#lottery-discord-preview .discord-message pre{margin:3px 0;padding:8px}
#lottery-discord-preview .discord-message blockquote{margin:0;border-left:3px solid #4e5058;padding-left:8px}
#lottery-discord-preview .lottery-mention{color:#c9cdfb;background:#3b4063;border-radius:3px;padding:0 2px}
#lottery-discord-preview .lottery-spoiler{color:transparent;background:#1e1f22;border:0;border-radius:3px;padding:0 2px;margin:0;min-height:0;font:inherit;display:inline;cursor:pointer}
#lottery-discord-preview .lottery-spoiler>*{visibility:hidden}
#lottery-discord-preview .discord-preview-button{display:inline-flex;min-height:32px;margin:4px 0 0;padding:4px 14px;border:0;border-radius:4px;background:#5865f2;color:#fff;opacity:1;font-weight:600;font-size:14px}
