/* 버튼 편집: 미리 보기 · … 메뉴 · 하단 저장/적용. PC에서는 숨김 */
.mo-compose,
.mo-compose-dock { display: none; }
.mo-compose__menu[hidden] { display: none !important; }

@media (max-width: 768px) {
  #screenRight.mo-compose-on {
    flex-direction: column !important;
    overflow: hidden !important;
  }
  #screenRight.mo-compose-on #mobileComposeBtnGrid { display: none !important; }
  #screenRight.mo-compose-on .mo-compose { display: block; flex-shrink: 0; }
  #screenRight.mo-compose-on .mo-compose-dock {
    display: flex;
    position: static;
    flex-shrink: 0;
  }
  #screenRight,
  #screenRight .screen-preview-body,
  #screenRight .widget-preview-wrap,
  #screenRight .widget-preview-inner,
  #screenRight .widget-preview-preview-cluster {
    background: #fff;
    background-image: none;
    box-shadow: none;
  }
  #screenRight .phone-frame {
    box-shadow:
      0 0 0 1px #3d3d3f,
      0 0 0 5px #2c2c2e;
  }
  #screenRight .phone-frame-col {
    position: relative;
    width: fit-content;
    max-width: 100%;
    overflow: visible;
    background: #fff;
  }
  #screenRight .widget-preview-wrap,
  #screenRight .widget-preview-inner,
  #screenRight .widget-preview-preview-cluster { overflow: visible; }
  #screenRight .phone-frame-col > .screen-vertical-btn-mobile {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    z-index: 5;
    margin: 0;
  }
  #screenRight .phone-frame-col > .screen-vertical-btn-mobile .btn-info-icon { display: none !important; }
  #screenRight #btnScreenVerticalMobile {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 44px;
    padding: 0 !important;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  #screenRight #btnScreenVerticalMobile span { display: none !important; }

  #screenRight .phone-frame-col > .screen-reset-side {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%);
    z-index: 5;
    margin: 0;
  }
  #screenRight .phone-frame-col > .screen-reset-side .btn-info-icon { display: none !important; }
  #screenRight .phone-frame-col > .screen-reset-side #btnResetWidget {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 44px;
    padding: 0 !important;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  #screenRight .phone-frame-col > .screen-reset-side #btnResetWidget span { display: none !important; }

  #screenRight.mo-compose-on .screen-preview-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 12px;
  }

  .mo-compose { padding: 14px 16px 0; background: #fff; }
  .mo-compose__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .mo-compose__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.02em;
  }
  .mo-compose__tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
  }
  .mo-compose__hint {
    margin: 0;
    font-size: 13px;
    color: #64748b;
  }
  .mo-compose__tool-btns {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .mo-compose__preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 10px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .mo-compose__more {
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: #334155;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0 0 6px;
  }
  .mo-compose__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    min-width: 180px;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }
  .mo-compose__menu button[hidden] { display: none !important; }
  .mo-compose__menu button {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 12px 16px;
    font-size: 15px;
    color: #000;
    cursor: pointer;
  }
  .mo-compose__menu button:active { background: #f1f5f9; }

  .mo-compose-dock {
    position: sticky;
    bottom: 0;
    z-index: 30;
    gap: 10px;
    padding: 12px 16px 18px;
    background: #fff;
    border-top: 1px solid #e6ebf2;
    box-sizing: border-box;
  }
  .mo-compose-dock__save,
  .mo-compose-dock__apply {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
  }
  .mo-compose-dock__save {
    background: #fff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
  }
  .mo-compose-dock__apply {
    background: #2563eb;
    color: #fff;
    border: none;
  }
}

/* 일정 알림: 화면을 덮고 일정 관리 버튼만 표시 */
.mo-schedule-cover[hidden] { display: none !important; }
.mo-schedule-cover {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  box-sizing: border-box;
}
.mo-schedule-cover.is-open { display: flex !important; }
.mo-schedule-cover__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mo-schedule-cover__title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.mo-schedule-cover__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  min-height: 64px;
  padding: 16px 28px;
  border: none;
  border-radius: 16px;
  background: #16a34a;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* 모바일 화면 설정: PC에서는 숨김 */
.mo-screen-bar,
.mo-pick-title,
.mo-schedule-mo,
.mo-schedule-sub { display: none; }
.mo-count[hidden] { display: none !important; }

@media (max-width: 768px) {
  body > .screen-fab-bar { display: none !important; }

  .screen-body { background: #f4f6f9; }
  .screen-left { background: #f4f6f9 !important; border-right: none; }
  .screen-panel-body { padding: 18px 16px 32px !important; }

  .mo-screen-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    height: 52px;
    padding: 0 8px 0 4px;
    background: #fff;
  }
  .mo-screen-bar h1 {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.02em;
  }
  .mo-screen-back,
  .mo-screen-help {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #111;
    text-decoration: none;
  }
  .mo-screen-help {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border: 1.5px solid #93c5fd;
    border-radius: 50%;
    color: #2563eb;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  .screen-mobile-tab-bar {
    background: #fff;
    border-bottom: none;
  }
  .screen-mobile-tab {
    height: 46px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: #fff !important;
    color: #9aa3b2 !important;
    border: none !important;
    border-bottom: 2px solid #e5e7eb !important;
    border-radius: 0 !important;
  }
  .screen-mobile-tab--active {
    background: #fff !important;
    color: #2563eb !important;
    border-bottom: 2px solid #2563eb !important;
    font-size: 16px !important;
  }

  #themeSelectNotice,
  #themeSelectedControlNotice { display: none !important; }

  .mo-pick-title {
    display: block;
    margin: 4px 0 14px;
    font-size: 18px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.02em;
  }

  .theme-side-list { gap: 0 !important; padding: 0 !important; }

  #themeSideListGroup {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    overflow: hidden;
  }
  #themeSideListGroup .theme-row {
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0;
  }
  #themeSideListGroup .theme-row + .theme-row { border-top: 1px solid #eef2f6; }
  #themeSideListGroup .theme-side-btn,
  #themeSideListGroup .theme-row[data-theme="camera"] .theme-side-btn,
  #themeSideListGroup .theme-row[data-theme="camera"] .theme-side-btn:hover {
    width: 100%;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 14px;
    box-shadow: none;
  }
  #themeSideListGroup .theme-side-btn.selected,
  #themeSideListGroup .theme-row[data-theme="camera"] .theme-side-btn.selected,
  #themeSideListGroup .theme-row[data-theme="camera"] .theme-side-btn.selected:hover {
    background: #e8f1ff !important;
    color: #000 !important;
    border: none !important;
  }
  #themeSideListGroup .theme-side-btn i,
  #themeSideListGroup .theme-side-btn.selected i {
    color: #3b82f6 !important;
    font-size: 18px;
  }
  #themeSideListGroup .theme-side-btn::after {
    content: '';
    margin-left: auto;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 1.5px solid #d0d5dd;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
  }
  #themeSideListGroup .theme-side-btn.selected::after {
    border-color: #2563eb;
    background: #2563eb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
  }

  .theme-row[data-theme="phone"] .theme-row__count-area,
  .theme-row[data-theme="media"] .theme-row__count-area,
  .theme-row[data-theme="sms"] .theme-row__count-area,
  .theme-row[data-theme="weather"] .theme-row__count-area {
    display: none !important;
  }

  .mo-count {
    display: block;
    margin-top: 22px;
  }
  .mo-count__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #000;
  }
  .mo-count__hint {
    margin: 6px 0 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #8b95a5;
  }
  .mo-count__nums {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .mo-count__num {
    height: 64px;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    background: #fff;
    color: #000;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
  }
  .mo-count__num.is-selected {
    border: 2px solid #2563eb;
    background: #fff;
  }

  .theme-row[data-theme="schedule"] {
    margin-top: 18px;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    overflow: hidden;
  }
  .theme-row[data-theme="schedule"] .theme-side-btn {
    width: 100%;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    padding: 16px 14px;
    align-items: center;
  }
  .theme-row[data-theme="schedule"] .theme-side-btn i { color: #3b82f6 !important; }
  .mo-schedule-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: left;
  }
  .mo-schedule-pc { display: none !important; }
  .mo-schedule-mo {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #000;
  }
  .mo-schedule-sub {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 400;
    color: #8b95a5;
    line-height: 1.35;
  }
  .theme-row[data-theme="schedule"] .theme-schedule-hint { display: none !important; }
  .theme-row[data-theme="schedule"] .theme-side-btn::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-right: 2px solid #c5ced9;
    border-top: 2px solid #c5ced9;
    transform: rotate(45deg);
    flex-shrink: 0;
  }
}
