body.ui { min-height: 100dvh; }
.auth { min-height: 100dvh; }
.m-sheet { max-height:min(84dvh,calc(var(--visible-height,100dvh) - 16px)); bottom:var(--keyboard-inset,0px); }
.m-sheet-body, .m-sheet-list, .drawer-body, dialog { overscroll-behavior:contain; }
.dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.dashboard-grid .card { display:flex; flex-direction:column; gap:8px; }

.announcement { border-inline-start:4px solid var(--brand); margin-bottom:12px; }
.announcement p { white-space:pre-wrap; overflow-wrap:anywhere; }
.product-dialog { border:1px solid var(--hairline); border-radius:var(--r-xl); padding:24px; background:var(--surface); color:var(--ink); width:min(92vw,520px); max-height:calc(100dvh - 32px); overflow:auto; box-shadow:var(--shadow-pop); }
dialog::backdrop { background:rgba(16,24,40,.5); }
.product-dialog form { display:flex; flex-direction:column; gap:16px; }
.preview-panel { padding:12px; margin-block:16px; }
.preview-panel iframe { width:100%; height:75dvh; border:0; border-radius:12px; }
.preview-panel .m-assign-btn { cursor:default; }
.preview-controls { max-width:640px; margin-bottom:var(--sp-3); }
.announcement-manager { display:flex; flex-direction:column; gap:16px; }
.announcement-manager .row { flex-wrap:wrap; }
.announcement-manager .card { overflow-wrap:anywhere; }
@media(max-width:767px) {
  body.ui input, body.ui textarea, body.ui select { font-size:16px!important; }
  .auth-panel { padding:24px 16px; }
  .dashboard-grid { grid-template-columns:1fr; }
  #tag-editor-presets .btn { min-width:44px; min-height:44px; }
  .btn { touch-action:manipulation; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none!important; transition:none!important; } }
.dashboard-grid, .announcement, .preview-panel { min-width:0; }
.settings-trigger { flex-shrink:0; min-width:44px; min-height:44px; }
.settings-dialog { width:min(92vw,640px); font-family:var(--font); }
.settings-account { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:20px; border-bottom:1px solid var(--hairline); margin-bottom:20px; }
.settings-dialog .announcement-manager { gap:12px; }
.settings-dialog .announcement-manager form { padding:0; border:0; box-shadow:none; background:transparent; }
.settings-dialog .announcement-manager .field { display:flex; flex-direction:column; gap:6px; }
.settings-dialog .announcement-manager .input, .settings-dialog .announcement-manager .select { width:100%; box-sizing:border-box; }
.settings-dialog .announcement-manager .card { padding:16px; }
@media(max-width:767px) {
 .settings-dialog { width:calc(100% - 24px); padding:16px; max-height:calc(var(--visible-height,100dvh) - 24px); }
 .settings-account { align-items:flex-start; flex-direction:column; }
 .keyboard-open .m-savebar { visibility:hidden; }
}

body.settings-open { overflow:hidden; }

@media(max-width:767px) { .keyboard-open .settings-dialog { margin:auto auto var(--keyboard-inset,0px); } }

.dashboard-grid .analyst-duty-card { flex-direction:row; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:14px 16px; gap:8px; align-self:start; }
.analyst-duty-card p { margin:0; }

#tag-editor-backdrop .modal { max-height:calc(100dvh - 32px); overflow:auto; }

.tag-selection-actions { margin-bottom:12px; flex-wrap:wrap; }
.tag-day-select { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; cursor:pointer; }
.tag-day-select input { accent-color:var(--brand); width:18px; height:18px; }
.is-tag-selected { outline:2px solid var(--brand); background:var(--brand-soft)!important; }
.preview-controls { display:flex; background:transparent; padding:0; }

.flatpickr-calendar { max-width:calc(100vw - 16px); }
.flatpickr-days,.flatpickr-calendar .dayContainer { width:100%; min-width:0; max-width:none; }
