.boss-timer-shell {
    --boss-bg: #f3f3f3;
    --boss-panel: #fff;
    --boss-panel-soft: #f8fafc;
    --boss-line: #e2e8f0;
    --boss-line-strong: #cbd5e1;
    --boss-text: #151515;
    --boss-muted: #64748b;
    --boss-accent: #d97706;
    --boss-accent-soft: #fff7ed;
    --boss-danger: #dc2626;
    --boss-shadow: 0 12px 32px rgba(15, 23, 42, .07);
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 42px;
    color: var(--boss-text);
}

.tw-dark .boss-timer-shell {
    --boss-bg: #101010;
    --boss-panel: #171717;
    --boss-panel-soft: #1d1d1d;
    --boss-line: #2a2a2a;
    --boss-line-strong: #3a3a3a;
    --boss-text: #f2f2f2;
    --boss-muted: #a3a3a3;
    --boss-accent: #f59e0b;
    --boss-accent-soft: rgba(245, 158, 11, .11);
    --boss-danger: #fb7185;
    --boss-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

.boss-hero,
.boss-controls,
.boss-custom-panel,
.boss-schedule { border: 1px solid var(--boss-line); background: var(--boss-panel); box-shadow: var(--boss-shadow); }

.boss-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 116px; padding: 22px 24px; border-radius: 6px; overflow: hidden; position: relative; }
.boss-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: 22%; top: -180px; border-radius: 50%; background: rgba(245, 158, 11, .09); pointer-events: none; }
.boss-hero-copy { display: flex; align-items: center; gap: 16px; min-width: 0; }
.boss-hero-mark { display: grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 6px; border: 1px solid #f59e0b; background: #1c1917; color: #fbbf24; font-size: 12px; font-weight: 700; letter-spacing: .08em; box-shadow: inset 0 0 0 4px rgba(251, 191, 36, .08); }
.boss-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.boss-title-line h1 { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 700; }
.boss-title-line > span { border: 1px solid rgba(245, 158, 11, .35); border-radius: 999px; background: var(--boss-accent-soft); color: var(--boss-accent); padding: 3px 9px; font-size: 12px; }
.boss-hero-copy p { margin: 8px 0 0; color: var(--boss-muted); font-size: 14px; line-height: 1.7; }

.boss-region-tabs { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--boss-line); border-radius: 5px; background: var(--boss-panel-soft); position: relative; z-index: 1; }
.boss-region-tabs button { display: flex; align-items: baseline; gap: 6px; min-width: 80px; justify-content: center; border: 1px solid transparent; border-radius: 3px; padding: 9px 12px; color: var(--boss-muted); transition: .18s ease; }
.boss-region-tabs button:hover { color: var(--boss-text); background: var(--boss-panel); }
.boss-region-tabs button[aria-selected="true"] { border-color: rgba(245, 158, 11, .38); background: var(--boss-panel); color: var(--boss-accent); box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.boss-region-tabs strong { font-size: 14px; font-weight: 600; }
.boss-region-tabs small { font-size: 12px; font-weight: 500; }

.boss-live { display: grid; grid-template-columns: minmax(0, .9fr) minmax(300px, 1.2fr) minmax(0, .9fr); gap: 12px; margin-top: 12px; }
.boss-live-card { min-height: 170px; border: 1px solid var(--boss-line); border-radius: 6px; background: var(--boss-panel); padding: 16px 18px; box-shadow: var(--boss-shadow); overflow: hidden; }
.boss-live-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; color: var(--boss-muted); font-size: 13px; }
.boss-live-card header span { font-weight: 500; }
.boss-live-card header time { padding: 3px 8px; border-radius: 3px; background: var(--boss-panel-soft); font-variant-numeric: tabular-nums; font-size: 12px; }
.boss-live-next { border-color: rgba(245, 158, 11, .56); background: linear-gradient(145deg, var(--boss-panel) 45%, var(--boss-accent-soft)); }
.boss-live-next header span { color: var(--boss-accent); font-weight: 600; }
.boss-live-content { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 56px; }
.boss-live-boss { display: flex; align-items: center; gap: 9px; min-width: 0; }
.boss-live-boss img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; background: #111; border: 1px solid var(--boss-line-strong); }
.boss-live-boss span { max-width: 105px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.boss-live-separator { color: var(--boss-muted); font-size: 13px; }
.boss-live-empty { color: var(--boss-muted); font-size: 14px; }
.boss-live-card > p { margin: 13px 0 0; color: var(--boss-muted); font-size: 13px; }
.boss-countdown { display: block; margin-top: 8px; color: var(--boss-accent); font-size: 25px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.boss-progress { height: 4px; margin-top: 13px; border-radius: 999px; background: var(--boss-line); overflow: hidden; }
.boss-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #ef4444); transition: width .8s linear; }

.boss-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 13px 16px; border-radius: 5px; }
.boss-clock { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.boss-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.boss-clock div { display: flex; flex-direction: column; }
.boss-clock strong { font-size: 16px; line-height: 1.3; font-variant-numeric: tabular-nums; font-weight: 600; }
.boss-clock small { color: var(--boss-muted); font-size: 12px; }
.boss-control-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; }
.boss-control-button,
.boss-primary-button,
.boss-select-label { min-height: 38px; border-radius: 4px; font-size: 13px; }
.boss-control-button { border: 1px solid var(--boss-line-strong); padding: 8px 12px; color: var(--boss-muted); background: var(--boss-panel); transition: .15s ease; }
.boss-control-button:hover { border-color: var(--boss-accent); color: var(--boss-text); }
.boss-control-button[aria-pressed="true"] { border-color: rgba(245, 158, 11, .5); color: var(--boss-accent); background: var(--boss-accent-soft); }
.boss-primary-button { border: 1px solid #b45309; padding: 8px 14px; background: #b45309; color: #fff; font-weight: 600; transition: .15s ease; }
.boss-primary-button:hover { background: #92400e; }
.tw-dark .boss-primary-button { border-color: #d97706; background: #b45309; }
.boss-custom-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.boss-expand-icon { display: inline-flex; width: 12px; align-items: center; justify-content: center; margin-left: 1px; font-size: 12px; font-style: normal; line-height: 1; }
.boss-select-label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--boss-line-strong); padding: 0 8px 0 11px; color: var(--boss-muted); }
.boss-select-label select { min-height: 34px; border: 0; background: transparent; color: var(--boss-text); font-size: 13px; outline: none; }
.boss-select-label option { background: var(--boss-panel); color: var(--boss-text); }
.boss-threshold-picker,
.boss-subscription-picker { position: relative; min-height: 38px; }
.boss-threshold-picker summary,
.boss-subscription-picker summary { display: flex; align-items: center; gap: 7px; min-height: 38px; border: 1px solid var(--boss-line-strong); border-radius: 4px; padding: 0 10px; color: var(--boss-muted); background: var(--boss-panel); cursor: pointer; list-style: none; font-size: 13px; white-space: nowrap; }
.boss-threshold-picker summary::-webkit-details-marker,
.boss-subscription-picker summary::-webkit-details-marker { display: none; }
.boss-threshold-picker summary::after,
.boss-subscription-picker summary::after { content: "▾"; color: var(--boss-muted); font-size: 12px; }
.boss-threshold-picker[open] summary,
.boss-subscription-picker[open] summary { border-color: rgba(245, 158, 11, .5); color: var(--boss-text); background: var(--boss-accent-soft); }
.boss-threshold-picker summary strong,
.boss-subscription-picker summary strong { color: var(--boss-text); font-weight: 500; }
.boss-threshold-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 218px; padding: 8px; border: 1px solid var(--boss-line-strong); border-radius: 5px; background: var(--boss-panel); box-shadow: var(--boss-shadow); }
.boss-threshold-menu p { margin: 2px 5px 7px; color: var(--boss-muted); font-size: 12px; }
.boss-threshold-menu label { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 7px; border-radius: 3px; color: var(--boss-text); cursor: pointer; font-size: 13px; }
.boss-threshold-menu label:hover { background: var(--boss-panel-soft); }
.boss-threshold-menu input { width: 16px; height: 16px; accent-color: #d97706; }
.boss-subscription-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 21; width: 430px; padding: 10px; border: 1px solid var(--boss-line-strong); border-radius: 5px; background: var(--boss-panel); box-shadow: var(--boss-shadow); }
.boss-subscription-menu > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 4px 9px; border-bottom: 1px solid var(--boss-line); }
.boss-subscription-menu > header strong { color: var(--boss-text); font-size: 14px; font-weight: 600; }
.boss-subscription-menu > header p { margin: 2px 0 0; color: var(--boss-muted); font-size: 12px; }
.boss-subscription-menu > header > div:last-child { display: flex; gap: 5px; }
.boss-subscription-menu > header button { min-width: 44px; height: 30px; border: 1px solid var(--boss-line-strong); border-radius: 3px; color: var(--boss-muted); font-size: 12px; }
.boss-subscription-menu > header button:hover { border-color: var(--boss-accent); color: var(--boss-accent); }
.boss-subscription-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; max-height: 330px; overflow: auto; }
.boss-subscription-options label { display: grid; grid-template-columns: 17px 34px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 48px; padding: 5px 7px; border: 1px solid transparent; border-radius: 3px; color: var(--boss-text); cursor: pointer; font-size: 13px; }
.boss-subscription-options label:hover { border-color: var(--boss-line); background: var(--boss-panel-soft); }
.boss-subscription-options label:has(input:checked) { border-color: rgba(245, 158, 11, .3); background: var(--boss-accent-soft); }
.boss-subscription-options input { width: 16px; height: 16px; accent-color: #d97706; }
.boss-subscription-options img { width: 34px; height: 34px; object-fit: contain; }
.boss-subscription-options span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.boss-custom-panel { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 24px; margin-top: 12px; padding: 20px; border-radius: 5px; }
.boss-custom-panel[hidden] { display: none; }
.boss-custom-form-wrap > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.boss-custom-form-wrap h2,
.boss-custom-list-wrap h3 { margin: 0; font-size: 17px; font-weight: 600; }
.boss-custom-form-wrap header p { margin: 3px 0 0; color: var(--boss-muted); font-size: 12px; }
.boss-custom-form-wrap header button { color: var(--boss-muted); width: 34px; height: 34px; border-radius: 4px; font-size: 22px; line-height: 1; }
.boss-custom-form-wrap header button:hover { background: var(--boss-panel-soft); color: var(--boss-text); }
.boss-custom-form-wrap form { display: grid; grid-template-columns: 1fr 1fr 150px auto; align-items: end; gap: 10px; margin-top: 16px; }
.boss-custom-form-wrap label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--boss-muted); font-size: 12px; }
.boss-custom-form-wrap input,
.boss-custom-form-wrap select { width: 100%; height: 40px; border: 1px solid var(--boss-line-strong); border-radius: 4px; padding: 0 10px; background: var(--boss-panel); color: var(--boss-text); font-size: 14px; }
.boss-custom-form-wrap input:focus,
.boss-custom-form-wrap select:focus { border-color: var(--boss-accent) !important; background: var(--boss-panel) !important; }
.boss-custom-note { grid-column: 1 / 4; }
.boss-custom-list-wrap { border-left: 1px solid var(--boss-line); padding-left: 22px; }
.boss-custom-list { display: grid; gap: 8px; margin-top: 12px; max-height: 208px; overflow: auto; }
.boss-custom-empty { margin: 0; padding: 20px 12px; border: 1px dashed var(--boss-line-strong); border-radius: 4px; text-align: center; color: var(--boss-muted); font-size: 13px; }
.boss-custom-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 11px; border: 1px solid var(--boss-line); border-radius: 4px; background: var(--boss-panel-soft); }
.boss-custom-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.boss-custom-item p { margin: 3px 0 0; color: var(--boss-muted); font-size: 12px; }
.boss-custom-item-actions { display: flex; gap: 4px; }
.boss-custom-item-actions button { min-width: 34px; height: 32px; border-radius: 3px; border: 1px solid var(--boss-line); color: var(--boss-muted); font-size: 12px; }
.boss-custom-item-actions button:hover { border-color: var(--boss-accent); color: var(--boss-accent); }

.boss-schedule { margin-top: 12px; border-radius: 6px; overflow: hidden; }
.boss-section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--boss-line); }
.boss-section-head h2 { margin: 0; font-size: 19px; font-weight: 600; }
.boss-section-head p { margin: 3px 0 0; color: var(--boss-muted); font-size: 12px; }
.boss-table-scroll { overflow-x: auto; scrollbar-color: var(--boss-line-strong) transparent; }
.boss-schedule table { width: 100%; min-width: 1040px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.boss-schedule caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.boss-schedule th,
.boss-schedule td { border-right: 1px solid var(--boss-line); border-bottom: 1px solid var(--boss-line); }
.boss-schedule tr > :last-child { border-right: 0; }
.boss-schedule tbody tr:last-child > * { border-bottom: 0; }
.boss-schedule thead th { height: 46px; background: var(--boss-panel-soft); color: var(--boss-muted); font-size: 13px; font-weight: 500; text-align: center; }
.boss-schedule thead th:first-child { width: 82px; position: sticky; left: 0; z-index: 3; background: var(--boss-panel-soft); }
.boss-schedule tbody th { width: 82px; position: sticky; left: 0; z-index: 2; padding: 10px 8px; background: var(--boss-panel); text-align: center; }
.boss-schedule tbody th time { display: inline-flex; justify-content: center; min-width: 52px; border-radius: 3px; padding: 5px 6px; background: var(--boss-panel-soft); color: var(--boss-text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.boss-schedule td { height: 72px; padding: 7px; vertical-align: middle; background: var(--boss-panel); }
.boss-schedule .is-today { background: rgba(245, 158, 11, .055); }
.boss-schedule thead .is-today { color: var(--boss-accent); background: var(--boss-accent-soft); font-weight: 600; }
.boss-schedule tr.is-next-row > th,
.boss-schedule td.is-next-event { box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .68); }
.boss-schedule td.is-next-event { background: rgba(245, 158, 11, .1); }
.boss-schedule tr.is-next-row > th time { background: #b45309; color: #fff; }
.boss-cell-list { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; }
.boss-cell-chip { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; padding: 3px 7px 3px 3px; border: 1px solid var(--boss-line); border-radius: 4px; background: var(--boss-panel-soft); color: var(--boss-text); font-size: 12px; line-height: 1.25; white-space: nowrap; }
.boss-cell-chip img { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 3px; object-fit: cover; background: #111; }
.boss-cell-empty { display: block; text-align: center; color: var(--boss-line-strong); font-size: 14px; }
.boss-schedule-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--boss-line); color: var(--boss-muted); background: var(--boss-panel-soft); font-size: 12px; }
.boss-schedule.is-today-only [data-day-column]:not(.is-today) { display: none; }
.boss-schedule.is-today-only table { min-width: 430px; table-layout: auto; }

.boss-toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; max-width: min(420px, calc(100% - 32px)); transform: translate(-50%, 24px); padding: 10px 14px; border: 1px solid rgba(245, 158, 11, .45); border-radius: 4px; background: #1c1917; color: #fff7ed; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); font-size: 13px; opacity: 0; pointer-events: none; transition: .2s ease; }
.boss-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
    .boss-hero { align-items: flex-start; flex-direction: column; }
    .boss-region-tabs { width: 100%; }
    .boss-region-tabs button { flex: 1; }
    .boss-live { grid-template-columns: 1fr 1fr; }
    .boss-live-next { grid-row: 1; grid-column: 1 / -1; }
    .boss-controls { align-items: flex-start; flex-direction: column; }
    .boss-control-actions { width: 100%; justify-content: flex-start; }
    .boss-custom-panel { grid-template-columns: 1fr; }
    .boss-custom-list-wrap { border-left: 0; border-top: 1px solid var(--boss-line); padding: 18px 0 0; }
    .boss-custom-form-wrap form { grid-template-columns: 1fr 1fr; }
    .boss-custom-note { grid-column: auto; }
}

@media (max-width: 640px) {
    .boss-timer-shell { width: min(100% - 20px, 1380px); padding-top: 10px; }
    .boss-hero { min-height: 0; padding: 16px; gap: 16px; }
    .boss-hero-copy { align-items: flex-start; }
    .boss-hero-mark { width: 48px; height: 48px; border-radius: 5px; }
    .boss-title-line h1 { font-size: 21px; }
    .boss-title-line > span { display: none; }
    .boss-hero-copy p { font-size: 13px; line-height: 1.6; }
    .boss-region-tabs button { min-width: 0; padding: 8px 6px; }
    .boss-live { grid-template-columns: 1fr; }
    .boss-live-next { grid-column: auto; }
    .boss-live-card { min-height: 150px; padding: 14px; }
    .boss-live-boss img { width: 42px; height: 42px; }
    .boss-live-boss span { font-size: 14px; }
    .boss-controls { padding: 13px; }
    .boss-control-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .boss-select-label,
    .boss-threshold-picker,
    .boss-subscription-picker,
    .boss-control-button,
    .boss-primary-button { justify-content: center; width: 100%; }
    .boss-threshold-picker summary { justify-content: center; }
    .boss-threshold-menu { left: 0; right: auto; width: min(250px, calc(100vw - 32px)); }
    .boss-subscription-picker summary { justify-content: center; }
    .boss-subscription-menu { left: auto; right: 0; width: min(430px, calc(100vw - 48px)); }
    .boss-subscription-options { grid-template-columns: 1fr; }
    .boss-custom-panel { padding: 15px; }
    .boss-custom-form-wrap form { grid-template-columns: 1fr; }
    .boss-section-head { padding: 14px; }
    .boss-section-head h2 { font-size: 17px; }
    .boss-schedule-foot { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .boss-timer-shell *, .boss-timer-shell *::before, .boss-timer-shell *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
