﻿.schedule-type-tabs {
  margin-bottom: 8px;
  gap: 0;
  justify-content: left;
}
.tab-btn {
  flex: 1 1 0;
  padding: 10px 0;
  border-radius: 10px 0 0 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
  border-right: none;
}
.tab-btn.right {
  border-radius: 0 10px 10px 0;
  border-left: none;
  border-right: 1px solid #e5e7eb;
}
.tab-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.tab-icon {
  font-size: 18px;
  margin-right: 6px;
  vertical-align: middle;
}
/* memo2_style_patch.css */
/* 위젯 스크롤 숨김 + 버튼/팔레트/체크/미니달력 스타일 */

/* 라이트 테마 (기본) */
:root{
  --color-primary:#5C8DFF;
  --color-primary-hover:#4A7AEE;
  --color-primary-light:#EEF2FF;
  --bg:#f6f7fb;
  --card:#ffffff;
  --line:#e9ecf2;
  --text:#111827;
  --text-muted:#8e9bb1;
  --muted:#8e9bb1;
  --primary:var(--color-primary);
  --cal-weekday-font:10px;
  --cal-daynum-font:9px;
  --cal-label-font:10px;
  --shadow:0 6px 18px rgba(17,24,39,.08);
  --card-hover-shadow:0 6px 28px rgba(0,0,0,0.12);
}

/* 레이아웃 최초 페인트 최적화 */
.sidebar,
.right{
  content-visibility:auto;
  contain-intrinsic-size:600px;
}
@media(min-width:1024px){
  .sidebar,
  .right{
    contain-intrinsic-size:780px;
  }
}
.usage-section,
#siteIntro{
  min-height:220px;
}

/* 초기 렌더 비용 감소: 카드를 지연 렌더링하고 예상 크기 확보 */
.main .card,
.right .card{
  content-visibility:auto;
  contain-intrinsic-size:820px 1200px;
}

/* 다크 테마 */
[data-theme="dark"]{
  --bg:#1a1a1a;
  --card:#2a2a2a;
  --line:#3a3a3a;
  --text:#e5e5e5;
  --text-muted:#9ca3af;
  --muted:#9ca3af;
  --primary:#667eea;
  --shadow:0 6px 18px rgba(0,0,0,.4);
  --card-hover-shadow:0 6px 28px rgba(0,0,0,0.6);
}

/* 다크 테마 추가 스타일 */
[data-theme="dark"]{
  color:#ffffff !important;
}
[data-theme="dark"] body{
  background:#1a1a1a !important;
  color:#ffffff !important;
}
[data-theme="dark"] .sidebar{
  background:#1f1f1f !important;
}
[data-theme="dark"] .sidebar__title,
[data-theme="dark"] .sidebar__hint{
  color:#ffffff !important;
}
[data-theme="dark"] .menu-btn{
  background:#2a2a2a !important;
  color:#ffffff !important;
  border-color:#3a3a3a !important;
  font-size:14px !important;
  font-weight:600 !important;
}
[data-theme="dark"] .menu-btn:hover{
  background:#3a3a3a !important;
}
[data-theme="dark"] .card{
  background:#2a2a2a !important;
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .card__title,
[data-theme="dark"] .card__header{
  color:#ffffff !important;
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .day{
  background:#2a2a2a !important;
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .day__num{
  color:#ffffff !important;
}
[data-theme="dark"] .calendar__weekdays span{
  color:#9ca3af !important;
}
[data-theme="dark"] .calendar__weekdays{
  background:#2a2a2a !important;
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .calendar__weekdays span{
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .datebox{
  background:#2a2a2a !important;
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .datebox__date{
  color:#ffffff !important;
}
[data-theme="dark"] .emoji-btn,
[data-theme="dark"] .del-btn{
  background:#1a1a1a !important;
  border-color:#3a3a3a !important;
  color:#ffffff !important;
}
[data-theme="dark"] .color-btn{
  background:#1a1a1a !important;
  background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cdefs%3E%3ClinearGradient id="a" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:rgb(255,0,0)"/%3E%3Cstop offset="16.67%25" style="stop-color:rgb(255,255,0)"/%3E%3Cstop offset="33.33%25" style="stop-color:rgb(0,255,0)"/%3E%3Cstop offset="50%25" style="stop-color:rgb(0,255,255)"/%3E%3Cstop offset="66.67%25" style="stop-color:rgb(0,0,255)"/%3E%3Cstop offset="83.33%25" style="stop-color:rgb(255,0,255)"/%3E%3Cstop offset="100%25" style="stop-color:rgb(255,0,0)"/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx="12" cy="12" r="10" fill="none" stroke="url(%23a)" stroke-width="4"/%3E%3C/svg%3E') !important;
  background-size:20px 20px !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
  border-color:#3a3a3a !important;
}
[data-theme="dark"] .event-menu-btn{
  background:#1a1a1a !important;
  border-color:#3a3a3a !important;
  color:#9ca3af !important;
}
[data-theme="dark"] .event-menu-btn:hover{
  background:#2a2a2a !important;
  color:#60a5fa !important;
}
[data-theme="dark"] .event-menu-popup{
  background:#1a1a1a !important;
  border-color:#3a3a3a !important;
  box-shadow:0 4px 12px rgba(0,0,0,0.5) !important;
}
[data-theme="dark"] .event-menu-popup .menu-item{
  color:#e5e7eb !important;
}
[data-theme="dark"] .event-menu-popup .menu-item:hover{
  background:#2a2a2a !important;
  color:#60a5fa !important;
}
[data-theme="dark"] .event-menu-popup .menu-item.del{
  color:#f87171 !important;
}
[data-theme="dark"] .event-menu-popup .menu-item.del:hover{
  background:#3a1a1a !important;
  color:#fca5a5 !important;
}
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] textarea{
  background:#1a1a1a !important;
  border-color:#3a3a3a !important;
  color:#ffffff !important;
}
[data-theme="dark"] .event-title-input{
  background:#1a1a1a !important;
  border-color:#3a3a3a !important;
  color:#ffffff !important;
}
[data-theme="dark"] .event-title-input:focus{
  border-color:#60a5fa !important;
  box-shadow:0 0 0 2px rgba(96,165,250,0.2) !important;
}
[data-theme="dark"] .event-date-group label,
[data-theme="dark"] .event-time-group label,
[data-theme="dark"] .event-option{
  color:#9ca3af !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder{
  color:#6b7280 !important;
}
[data-theme="dark"] .btn{
  background:#2a2a2a !important;
  border-color:#3a3a3a !important;
  color:#ffffff !important;
}
[data-theme="dark"] .btn:hover{
  background:#3a3a3a !important;
}
[data-theme="dark"] .icon-btn{
  background:#2a2a2a !important;
  border-color:#3a3a3a !important;
  color:#ffffff !important;
}
[data-theme="dark"] .icon-btn:hover{
  background:#3a3a3a !important;
}
[data-theme="dark"] .event__label,
[data-theme="dark"] .todo__dates label{
  color:#9ca3af !important;
}
[data-theme="dark"] .event-text,
[data-theme="dark"] .todo-item .text,
[data-theme="dark"] .reminder-text,
[data-theme="dark"] .memo-text,
[data-theme="dark"] .label-text{
  color:#ffffff !important;
}
[data-theme="dark"] .btn-toggle{
  background:#1a1a1a;
  color:#9ca3af;
  border-color:#3a3a3a;
}
[data-theme="dark"] .btn-toggle:hover{
  background:#2a2a2a;
}
[data-theme="dark"] .color-pop-advanced,
[data-theme="dark"] .emoji-picker{
  background:#2a2a2a;
  border-color:#3a3a3a;
}
[data-theme="dark"] .color-section-title,
[data-theme="dark"] .emoji-category-title{
  color:#9ca3af;
}
[data-theme="dark"] .usage-section{
  background:#2a2a2a;
  border-color:#3a3a3a;
}
[data-theme="dark"] .usage-title{
  color:#ffffff;
}
[data-theme="dark"] .sidebar__title{
  font-size:14px !important;
}
[data-theme="dark"] .sidebar__hint{
  font-size:11px !important;
}
[data-theme="dark"] .footer{
  background:#2a2a2a;
  border-color:#3a3a3a;
}
[data-theme="dark"] .footer-link{
  color:#9ca3af;
}
[data-theme="dark"] .footer-link:hover{
  color:var(--primary);
}
[data-theme="dark"] .modal-content{
  background:#2a2a2a;
}
[data-theme="dark"] .modal-header{
  border-color:#3a3a3a;
}
[data-theme="dark"] .modal-title{
  color:#ffffff;
}
[data-theme="dark"] .modal-close:hover{
  background:#3a3a3a;
}
[data-theme="dark"] .modal-body{
  color:#9ca3af;
}
[data-theme="dark"] .modal-body h3{
  color:#ffffff;
}
[data-theme="dark"] .usage-text{
  color:#9ca3af;
}
[data-theme="dark"] .ym{
  color:#ffffff;
}

.datebox{
  padding:10px;
  border-radius:12px;
  background:#ffffff;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
  border:1px solid #f0f0f0;
  transition:all 0.3s ease;
}
.datebox:hover{
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

/* ...existing code... */
.hidden{display:none !important;}
.icon-btn-ghost{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  min-width:40px;
}
.home-hero{
  padding:40px 24px;
  line-height:1.7;
  max-width:1200px;
  margin:0 auto;
}
.home-hero h1{
  font-size:26px;
  margin-bottom:12px;
}
.home-header{
  text-align:center;
  margin-bottom:60px;
}
.home-section{
  display:flex;
  gap:40px;
  align-items:center;
  margin-bottom:60px;
}
.home-section-reverse{
  flex-direction:row-reverse;
}
.home-section-content{
  flex:1;
}
.home-section-image{
  flex:1;
  min-width:300px;
}
.home-section-icon{
  font-size:48px;
  margin-bottom:16px;
}
.home-section h2{
  font-size:24px;
  margin-bottom:12px;
  font-weight:700;
}
.home-section p{
  font-size:16px;
  line-height:1.8;
  color:var(--text-secondary);
}
@media (max-width:768px){
  .home-section,
  .home-section-reverse{
    flex-direction:column;
  }
  .home-section-image{
    min-width:100%;
  }
}
.home-hero .hero-actions{
  margin-top:18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.home-hero .btn-primary{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:12px 16px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
}
.home-hero .btn-ghost{
  background:#fff;
  border:1px solid var(--line);
  padding:12px 16px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
}
/* ...existing code... */

/* 이벤트 입력 - 구글 캘린더 스타일 */
.event-input-wrapper{
  display:flex;
  gap:8px;
  margin-bottom:12px;
}
.event-title-input{
  flex:1;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  transition:all 0.2s ease;
  font-size:14px;
}
.event-title-input:focus{
  outline:none;
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.1);
}
.event-datetime-row{
  display:flex;
  gap:8px;
  margin-bottom:8px;
}
.event-date-group{
  flex:1;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.event-date-group label{
  font-size:12px;
  color:#64748b;
  min-width:36px;
  flex-shrink:0;
}
.event-date-group input[type="date"]{
  flex:1;
  min-width:110px;
  padding:6px 8px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  font-size:12px;
  background:#f8fafc;
}
.event-date-group input[type="date"]:focus{
  outline:none;
  border-color:#5C8DFF;
  background:#fff;
}
.event-time-row{
  display:flex;
  gap:8px;
  margin-bottom:8px;
  align-items:center;
}
.event-time-group{
  display:flex;
  align-items:center;
  gap:6px;
}
.event-time-group label{
  font-size:12px;
  color:#64748b;
  min-width:36px;
}
.event-time-group input[type="time"]{
  padding:6px 8px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  font-size:12px;
  background:#f8fafc;
}
.event-time-group input[type="time"]:focus{
  outline:none;
  border-color:#5C8DFF;
  background:#fff;
}
.event-options{
  display:flex;
  gap:16px;
  align-items:center;
}
.event-option{
  font-size:13px;
  color:#64748b;
  display:flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
}
.event-option input[type="checkbox"]{
  width:16px;
  height:16px;
  cursor:pointer;
}
.repeat-btn{
  padding:8px 12px;
  border:1px solid #e5e7eb;
  border-radius:6px;
  background:#fff;
  font-size:13px;
  color:#64748b;
  cursor:pointer;
  transition:all 0.2s;
}
.repeat-btn:hover{
  background:#f8fafc;
  border-color:#5C8DFF;
  color:#5C8DFF;
}
.repeat-btn.active{
  background:#eff6ff;
  border-color:#5C8DFF;
  color:#5C8DFF;
}
.emoji-btn{width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer;font-size:18px}
.btn.full-width{
  width:100%;
  margin-bottom:10px;
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#ffffff;
  border:none;
  padding:12px 20px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.3s ease;
  box-shadow:0 4px 15px rgba(102,126,234,0.3);
}
.btn.full-width:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(102,126,234,0.4);
}
.btn-toggle{
  width:100%;padding:8px;margin:8px 0;border:1px solid var(--line);border-radius:8px;
  background:#f8f9fb;color:#64748b;font-size:12px;cursor:pointer;transition:all 0.2s;
}
.btn-toggle:hover{background:#e2e8f0}
.event__list{list-style:none;margin:0;padding:10px 0 0;display:flex;flex-direction:column;gap:8px}
.event-item{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:8px}
.event-label-wrapper{
  display:flex;
  align-items:center;
  gap:4px;
  padding:6px 12px;
  border-radius:8px;
  cursor:pointer;
}
.event-emoji{font-size:16px}
.event-text{
  flex:1;
}
.event-text.done{text-decoration:line-through;color:#9aa5b1 !important;}

/* TODO 입력 */
.todo__input-group{display:grid;grid-template-columns:1fr auto auto auto auto;gap:2px;margin-bottom:8px;align-items:center}
.todo__input-group input[type="text"]{flex:1;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.todo__input-group .icon-btn{border:none;background:transparent;font-size:14px;padding:4px;width:24px;height:24px;cursor:pointer;transition:transform 0.2s;display:flex;align-items:center;justify-content:center}
.todo__input-group .icon-btn svg{width:18px;height:18px;fill:currentColor}
.todo__input-group .color-indicator{background:#e5e7eb;border-radius:50%;border:1px solid #d1d5db;position:relative;width:18px;height:18px;padding:0}
.todo__input-group .color-indicator.has-color{border-color:currentColor}
.todo__input-group .emoji-gray{filter:grayscale(100%);opacity:0.5}
.todo__input-group .icon-btn:hover{transform:scale(1.15);background:transparent}
.todo__input-group #todoEmojiBtn{filter:grayscale(1);opacity:0.6}
.todo-options-panel{margin-top:8px;padding:12px;background:#f8f9fb;border-radius:8px;border:1px solid var(--line)}
.todo-section-title{font-size:13px;font-weight:700;margin:16px 0 8px;color:var(--text);padding-left:4px}
.todo__dates{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px;font-size:12px}
.todo__dates label{display:flex;align-items:center;gap:4px}
.todo__dates input[type="date"]{flex:1;padding:6px 8px;border:1px solid var(--line);border-radius:8px;font-size:11px}

/* REMINDER */
.reminder__input-group{display:grid;grid-template-columns:1fr auto auto;gap:8px;margin-bottom:10px}
.reminder__input-group input[type="text"]{flex:1;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.reminder__list{list-style:none;margin:0;padding:10px 0;display:flex;flex-direction:column;gap:8px}
.reminder-item{display:grid;grid-template-columns:20px 1fr auto auto;align-items:center;gap:8px}
.reminder-check{width:16px;height:16px;cursor:pointer}
.reminder-check:checked{filter:grayscale(1) opacity(0.6)}
.reminder-label-wrapper{display:flex;align-items:center;gap:4px;padding:6px 12px;border-radius:8px;cursor:pointer}
.reminder-emoji{font-size:14px}
.reminder-text{flex:1}
.reminder-text.done{text-decoration:line-through;color:#9aa5b1 !important}

/* 메모 헤더 */
.memo__header{
  margin-bottom:8px;
  display:flex;
  align-items:center;
  gap:8px;
}
.memo__datepick{
  font-size:12px;
  color:#64748b;
  display:flex;
  align-items:center;
  gap:6px;
}
.memo__datepick input[type="date"]{
  padding:6px 10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  font-size:12px;
  background:#f8fafc;
  min-width:130px;
  position:relative;
  z-index:1;
}
.memo__datepick input[type="date"]:focus{
  outline:none;
  border-color:#5C8DFF;
  background:#fff;
}

/* 메모 입력 */
.memo__add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:8px}
.memo__add textarea{
  width:100%;
  padding:7px 10px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#f8fafc;
  font-size:13px;
  font-family:"Noto Sans","Noto Sans KR",sans-serif;
  resize:vertical;
  transition:all 0.2s;
}
.memo__add textarea:focus{
  outline:none;
  border-color:#5C8DFF;
  background:#fff;
  box-shadow:0 0 0 2px rgba(92,141,255,0.1);
}
.memo__add .btn{
  padding:7px 12px;
  border:1px solid #5C8DFF;
  border-radius:8px;
  background:#5C8DFF;
  color:#fff;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:all 0.2s;
}
.memo__add .btn:hover{
  background:#4A7AEE;
  transform:translateY(-1px);
  box-shadow:0 2px 8px rgba(92,141,255,0.25);
}
/* 메모 아이템 */
#memoList .memo-item{
  display:grid !important;
  grid-template-columns:1fr auto !important;
  align-items:center;
  gap:8px;
  padding:6px 8px;
  border-radius:6px;
  background:#f8fafc;
  transition:all 0.2s;
  border:1px solid transparent;
}
#memoList .memo-item:hover{
  background:#ffffff;
  border-color:#e5e7eb;
}
#memoList .memo-text{
  flex:1;
  font-size:13px !important;
  font-family:"Noto Sans","Noto Sans KR",sans-serif !important;
  line-height:1.5 !important;
  color:#1f2937;
  cursor:pointer;
  padding:2px 4px;
}
#memoList .memo-menu-btn{
  width:28px;
  height:28px;
  padding:0;
  border:none;
  background:transparent;
  color:#94a3b8;
  font-size:16px;
  cursor:pointer;
  border-radius:6px;
  transition:all 0.2s;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
#memoList .memo-menu-btn:hover{
  background:#e2e8f0;
  color:#64748b;
}

/* 리스트 */
.todo__list,.memo__list{list-style:none;margin:0;padding:5px 0;display:flex;flex-direction:column;gap:3px}
aside.right .todo-item{display:flex;align-items:center;gap:2px}
.todo-checkbox{width:16px;height:16px;cursor:pointer;flex-shrink:0;margin-right:2px}
.todo-emoji{font-size:16px}
.todo-item .text{
  flex:1;
  padding:6px 12px;
  border-radius:8px;
  cursor:pointer;
}
.todo-item .event-menu-btn{
  margin-left:auto;
}
.todo-item .text.done,.label-text.done{ text-decoration:line-through; color:#9aa5b1 !important; background-color:transparent !important; }

.color-btn{
  width:28px;height:28px;padding:4px;border:1px solid var(--line);border-radius:8px;
  background:#fff;display:inline-grid;place-items:center;cursor:pointer;
  background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cdefs%3E%3ClinearGradient id="a" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:rgb(255,0,0)"/%3E%3Cstop offset="16.67%25" style="stop-color:rgb(255,255,0)"/%3E%3Cstop offset="33.33%25" style="stop-color:rgb(0,255,0)"/%3E%3Cstop offset="50%25" style="stop-color:rgb(0,255,255)"/%3E%3Cstop offset="66.67%25" style="stop-color:rgb(0,0,255)"/%3E%3Cstop offset="83.33%25" style="stop-color:rgb(255,0,255)"/%3E%3Cstop offset="100%25" style="stop-color:rgb(255,0,0)"/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx="12" cy="12" r="10" fill="none" stroke="url(%23a)" stroke-width="4"/%3E%3C/svg%3E');
  background-size:20px 20px;
  background-position:center;
  background-repeat:no-repeat;
  font-size:0;
}
.del-btn{
  width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:8px;
  background:#fff;display:inline-grid;place-items:center;cursor:pointer;
}
.event-menu-btn{
  width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:8px;
  background:#fff;display:inline-grid;place-items:center;cursor:pointer;
  font-size:18px;
  font-weight:700;
  color:#64748b;
  transition:all 0.2s;
}
.event-menu-btn:hover{
  background:#f1f5f9;
  color:#5C8DFF;
  transform:scale(1.05);
}
.event-menu-popup{
  position:fixed;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
  padding:8px;
  z-index:9999;
  min-width:160px;
  max-height:400px;
  overflow-y:auto;
}
.event-menu-popup .menu-item{
  width:100%;
  padding:10px 12px;
  border:none;
  background:transparent;
  text-align:left;
  cursor:pointer;
  border-radius:8px;
  font-size:14px;
  transition:all 0.15s;
  display:block;
  margin:2px 0;
}
.event-menu-popup .menu-item:hover{
  background:#f1f5f9;
  color:#5C8DFF;
}
.event-menu-popup .menu-item.del{
  color:#ef4444;
}
.event-menu-popup .menu-item.del:hover{
  background:#fee2e2;
  color:#dc2626;
}

/* 반복 설정 모달 */
.repeat-modal{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  background:#fff;
  border-radius:16px;
  box-shadow:0 8px 32px rgba(0,0,0,0.2);
  padding:24px;
  z-index:10000;
  min-width:320px;
  max-width:400px;
}
.repeat-modal-overlay{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:rgba(0,0,0,0.4);
  z-index:9999;
}
.repeat-modal-header{
  font-size:18px;
  font-weight:700;
  margin-bottom:20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.repeat-modal-close{
  border:none;
  background:transparent;
  font-size:24px;
  color:#94a3b8;
  cursor:pointer;
  padding:0;
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  transition:all 0.2s;
}
.repeat-modal-close:hover{
  background:#f1f5f9;
  color:#64748b;
}
.repeat-option{
  padding:12px 16px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  margin-bottom:8px;
  cursor:pointer;
  transition:all 0.2s;
  display:flex;
  align-items:center;
  gap:12px;
}
.repeat-option:hover{
  background:#f8fafc;
  border-color:#5C8DFF;
}
.repeat-option input[type="radio"]{
  width:18px;
  height:18px;
  cursor:pointer;
}
.repeat-option label{
  flex:1;
  cursor:pointer;
  font-size:14px;
}
.repeat-modal-footer{
  display:flex;
  gap:8px;
  margin-top:20px;
}
.repeat-modal-footer button{
  flex:1;
  padding:10px;
  border:none;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
}
.repeat-modal-footer .btn-cancel{
  background:#f1f5f9;
  color:#64748b;
}
.repeat-modal-footer .btn-cancel:hover{
  background:#e2e8f0;
}
.repeat-modal-footer .btn-confirm{
  background:#5C8DFF;
  color:#fff;
}
.repeat-modal-footer .btn-confirm:hover{
  background:#4A7AEE;
}

/* 일정 상세 편집 모달 */
.event-detail-modal{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#fff;
  border-radius:20px 20px 0 0;
  max-height:90vh;
  overflow-y:auto;
  z-index:10001;
  animation:slideUp 0.3s ease-out;
  box-shadow:0 -4px 20px rgba(0,0,0,0.15);
}
@keyframes slideUp{
  from{transform:translateY(100%);}
  to{transform:translateY(0);}
}
.event-detail-title{
  width:100%;
  border:none;
  padding:20px 20px 12px;
  font-size:18px;
  font-weight:600;
  outline:none;
  background:transparent;
}
.event-detail-tools{
  display:flex;
  gap:8px;
  padding:0 20px 16px;
  border-bottom:1px solid #f1f5f9;
}
.tool-btn{
  width:40px;
  height:40px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  transition:all 0.2s;
}
.tool-btn:hover{
  background:#f8fafc;
  border-color:#5C8DFF;
}
.event-detail-row{
  display:flex;
  align-items:center;
  padding:16px 20px;
  border-bottom:1px solid #f1f5f9;
  gap:12px;
}
.event-detail-row.delete-row{
  color:#ef4444;
  cursor:pointer;
}
.event-detail-row.delete-row:hover{
  background:#fef2f2;
}
.row-icon{
  font-size:20px;
  width:24px;
  text-align:center;
}
.row-label{
  flex:1;
  font-size:14px;
  font-weight:500;
}
.row-value{
  font-size:14px;
  color:#64748b;
}
.toggle-switch{
  width:44px;
  height:24px;
  appearance:none;
  background:#cbd5e1;
  border-radius:12px;
  position:relative;
  cursor:pointer;
  transition:all 0.3s;
  outline:none;
}
.toggle-switch:checked{
  background:#5C8DFF;
}
.toggle-switch::before{
  content:'';
  position:absolute;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  top:2px;
  left:2px;
  transition:all 0.3s;
}
.toggle-switch:checked::before{
  left:22px;
}
.date-inputs{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
}
.date-inputs input{
  flex:1;
  padding:8px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  font-size:14px;
  outline:none;
}
.date-inputs input:focus{
  border-color:#5C8DFF;
}
.event-detail-row input[type="time"]{
  flex:1;
  padding:8px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  font-size:14px;
  outline:none;
}
.event-detail-row input[type="time"]:focus{
  border-color:#5C8DFF;
}
.event-detail-row input[type="time"]:disabled{
  background:#f8fafc;
  color:#94a3b8;
}

/* 팔레트 */
.color-pop-advanced{
  position:absolute;z-index:9999;background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:16px;box-shadow:var(--shadow);max-width:400px;
}
.color-row{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.color-swatch{
  width:32px;height:32px;border-radius:50%;border:2px solid transparent;cursor:pointer;
  transition:all 0.2s;box-shadow:0 2px 6px rgba(0,0,0,0.1);flex-shrink:0;
}
.color-swatch.no-color{display:grid;place-items:center;text-align:center;}
.color-btn:hover{
  transform:scale(1.05);
  box-shadow:0 2px 8px rgba(0,0,0,0.15);
}
.color-swatch:hover{border-color:#5C8DFF;transform:scale(1.15);box-shadow:0 4px 10px rgba(0,0,0,0.2)}
.color-swatch.rainbow{border:none}
.color-grid{
  display:grid;grid-template-columns:repeat(12,1fr);gap:4px;margin-bottom:12px;
  max-height:200px;overflow-y:auto;
}
.color-swatch-small{
  width:24px;height:24px;border-radius:4px;cursor:pointer;transition:transform 0.15s;
}
.color-swatch-small:hover{transform:scale(1.2);box-shadow:0 2px 6px rgba(0,0,0,0.2)}
.color-section-title{
  font-size:11px;color:#64748b;margin-bottom:8px;font-weight:600;
}

/* 이모티콘 선택기 */
.emoji-picker{
  position:absolute;z-index:9999;background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:16px;box-shadow:var(--shadow);max-width:320px;max-height:400px;overflow-y:auto;
}
.emoji-category-title{
  font-size:12px;color:#64748b;font-weight:600;margin:8px 0 8px 0;
}
.emoji-category-title:first-child{margin-top:0}
.emoji-grid{
  display:grid;grid-template-columns:repeat(8,1fr);gap:4px;margin-bottom:12px;
}
.emoji-item{
  width:32px;height:32px;border:none;background:transparent;
  font-size:20px;cursor:pointer;border-radius:8px;
  transition:background 0.15s;padding:0;
}
.emoji-item:hover{background:#f1f5f9;transform:scale(1.1)}

/* 날짜 선택기 */
.date-picker{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  z-index:9999;background:#fff;border-radius:16px;box-shadow:0 8px 28px rgba(0,0,0,0.16);
  width:260px;max-height:340px;overflow:hidden;
}
.date-picker-header{
  padding:10px;text-align:center;background:#f8f9fb;
}
.date-picker-title{
  font-size:14px;font-weight:700;color:#334155;
}
.date-picker-body{
  display:grid;grid-template-columns:1fr 1fr;height:220px;overflow:hidden;
}
.date-picker-col{
  overflow-y:auto;padding:6px;border-right:1px solid #e2e8f0;
}
.date-picker-col:last-child{border-right:none}
.date-picker-item{
  padding:6px 4px;text-align:center;font-size:13px;color:#475569;
  cursor:pointer;border-radius:8px;transition:all 0.12s;
}
.date-picker-item:hover{background:#f1f5f9}
.date-picker-item.selected{
  background:#5C8DFF;color:#fff;font-weight:700;
}
.date-picker-close{
  padding:15px;text-align:center;border-top:1px solid #e2e8f0;
}
.date-picker-col::-webkit-scrollbar{width:4px}
.date-picker-col::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}

/* 달력 라벨/점 */
.calendar__weekdays span{font-size:var(--cal-weekday-font)}
.calendar__weekdays span{
  padding:6px 0;
  font-weight:600;
  color:#475569;
  text-align:center;
  border-right:1px solid var(--line);
}
.calendar__weekdays span:last-child{border-right:none}
/* === [달력 날짜 숫자 폰트사이즈: .day__num] === */
.day__num{font-size:var(--cal-daynum-font)}
.labels{position:absolute;left:0;right:0;top:18px;display:flex;flex-direction:column;gap:0}
.label{display:flex;align-items:center;gap:0px;min-width:0}
.label-checkbox{width:10px;height:10px;appearance:auto;cursor:pointer;flex-shrink:0;margin:0 1px}
.label-checkbox:checked{filter:grayscale(1) opacity(0.6)}
.label-content{display:flex;align-items:center;gap:1px;flex:1;min-width:0;padding-left: 4px !important;border-radius:0}
.label-emoji{font-size:10px;flex-shrink:0;margin-right:1px}
.label-text{
  font-size:12px;
  color:#000;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  flex:1;
  line-height:1.25;
  font-weight:400;
}
.label-more{
  font-size:9px;
  color:#9ca3af;
  font-weight:600;
  padding:0;
  background:transparent;
  border-radius:0;
  line-height:1.2;
}
.dots{position:absolute;left:8px;bottom:8px;display:flex;gap:4px}
.dot{display:none}

/* 달력 상단바 */
.calendar__topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 20px;
  margin-bottom:12px;
}

/* 이달의 목표 (1줄) */
/* 통합 헤더: 이달의 목표 + 날짜 네비게이션 */
.card__header-unified{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  border-bottom:1px solid var(--line);
}
.monthly-goal-input-unified{
  flex:1 1 auto;
  width:100%;
  max-width:none;
  padding:6px 10px;
  border:1px solid #e5e7eb;
  background:#f8f9fb;
  color:#1f2937;
  font-size:14px;
  font-weight:600;
  outline:none;
  border-radius:8px;
  transition:all 0.2s;
  min-width:0;
}
.goal-bar{
  position:relative;
  display:flex !important;
  align-items:center;
  gap:8px;
  width:100% !important;
  max-width:none !important;
  min-width:0;
  flex:1 1 auto;
  align-self:stretch;
}
.goal-style-btn{
  width:34px;
  height:32px;
  border:1px solid #d5d9e2;
  border-radius:8px;
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  display:grid;
  place-items:center;
  color:#111827;
  transition:background .15s ease, box-shadow .15s ease;
  flex:0 0 auto;
  min-width:34px;
}
.goal-style-btn:hover{background:#f4f6fb; box-shadow:0 4px 12px rgba(0,0,0,0.08);}
.goal-style-btn:active{transform:translateY(1px);}
.goal-emoji{
  position:absolute;
  left:8px;
  font-size:16px;
  line-height:1;
  pointer-events:none;
}
.goal-bar .monthly-goal-input-unified{
  padding-left:28px;
}
.card__header-unified .goal-bar{
  width:100%;
  max-width:none;
  min-width:0;
}
.goal-style-menu{
  position:absolute;
  right:0;
  top:40px;
  background:#fff;
  border:1px solid #e5e7eb;
  box-shadow:0 12px 30px rgba(0,0,0,0.14);
  border-radius:12px;
  padding:10px;
  display:grid;
  gap:8px;
  min-width:160px;
  max-width:180px;
  z-index:6000;
}
.goal-style-menu .row{display:flex;align-items:center;gap:8px;font-size:13px;color:#374151;}
.goal-style-menu .row .label{min-width:48px;}
.goal-style-menu .swatch-btn,
.goal-style-menu .emoji-btn-small{
  padding:6px 10px;
  border:1px solid #d5d9e2;
  border-radius:8px;
  background:#f8fafc;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.goal-style-menu .swatch{width:18px;height:18px;border-radius:6px;border:1px solid #cbd5e1;display:inline-block;}
.goal-style-menu select{flex:1;padding:6px 8px;border:1px solid #e5e7eb;border-radius:8px;}
.goal-style-menu .menu-actions{display:flex;justify-content:flex-end;gap:6px;}
.goal-style-menu .menu-btn{padding:6px 10px;border:1px solid #d5d9e2;border-radius:8px;background:#f8fafc;cursor:pointer;}
.goal-style-menu .menu-btn.primary{background:#4A7AEE;color:#fff;border-color:#4A7AEE;}
.monthly-goal-input-unified::placeholder{
  color:#9ca3af;
  font-weight:400;
}
.monthly-goal-input-unified:focus{
  background:#ffffff;
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.1);
}
.nav-controls{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.header-ym-compact{
  font-size:15px;
  font-weight:700;
  color:var(--text);
  white-space:nowrap;
}
.btn-today{
  padding:6px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#f6f8ff;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  transition:all 0.2s;
  white-space:nowrap;
}
.btn-today:hover{
  background:#e0e7ff;
}

.goal-container{
  margin:2px 0 4px;
}
.monthly-goal-single{
  display:flex;
  align-items:center;
  gap:8px;
  background:#f8f9fb;
  padding:4px 8px;
  border-radius:6px;
  position:relative;
}
.monthly-goal-input-single{
  flex:1;
  padding:4px 8px;
  border:1px solid transparent;
  background:transparent;
  color:#1f2937;
  font-size:13px;
  font-weight:700;
  outline:none;
  border-radius:4px;
  transition:all 0.2s;
}
.goal-menu-btn{
  width:24px;
  height:24px;
  padding:0;
  border:none;
  background:transparent;
  color:#94a3b8;
  font-size:18px;
  cursor:pointer;
  border-radius:4px;
  transition:all 0.2s;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.goal-menu-btn:hover{
  background:#e2e8f0;
  color:#64748b;
}
.monthly-goal-input-single::placeholder{
  color:#9ca3af;
}
.monthly-goal-input-single:focus{
  background:#ffffff;
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.1);
}
.home-reminder-input-wrapper{
  display:none;
  align-items:center;
  gap:6px;
  margin-top:4px;
}
.home-reminder-input-wrapper.active{
  display:flex;
}
.home-reminder-input{
  flex:1;
  padding:6px 8px;
  border:1px solid #e5e7eb;
  background:#ffffff;
  color:#1f2937;
  font-size:13px;
  outline:none;
  line-height:1.5;
  border-radius:4px;
  transition:all 0.2s;
}
.home-reminder-input::placeholder{
  color:#9ca3af;
}
.home-reminder-input:focus{
  background:#f9fafb;
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.1);
}

/* 다크모드일 때만 블랙 배경 적용 */
[data-theme="dark"] .monthly-goal{
  background:#2d2d2d !important;
  box-shadow:0 2px 8px rgba(0,0,0,0.15) !important;
}
[data-theme="dark"] .monthly-goal__header{
  color:#9ca3af !important;
}
[data-theme="dark"] .monthly-goal-item:hover{
  background:rgba(255,255,255,0.03) !important;
}
[data-theme="dark"] .monthly-goal-text{
  color:#9ca3af !important;
}
[data-theme="dark"] .monthly-goal-input{
  color:#e5e7eb !important;
  background:#1f2937 !important;
  border-color:#374151 !important;
}
[data-theme="dark"] .monthly-goal-input::placeholder{
  color:#6b7280 !important;
}
[data-theme="dark"] .monthly-goal-input:focus{
  background:#111827 !important;
  border-color:#5C8DFF !important;
  box-shadow:0 0 0 2px rgba(92,141,255,0.2) !important;
}

[data-theme="dark"] .home-reminder{
  background:#2d2d2d !important;
  box-shadow:0 2px 8px rgba(0,0,0,0.15) !important;
}
[data-theme="dark"] .home-reminder__header{
  color:#9ca3af !important;
}
[data-theme="dark"] .home-reminder-item:hover{
  background:rgba(255,255,255,0.03) !important;
}
[data-theme="dark"] .home-reminder-check:checked{
  filter:grayscale(1) opacity(0.5) !important;
}
[data-theme="dark"] .home-reminder-text{
  color:#9ca3af !important;
}
[data-theme="dark"] .home-reminder-text.done{
  color:#6b7280 !important;
}
[data-theme="dark"] .del-btn{
  color:#6b7280 !important;
}
[data-theme="dark"] .del-btn:hover{
  color:#ef4444 !important;
}
[data-theme="dark"] .home-reminder-input{
  color:#e5e7eb !important;
  background:#1f2937 !important;
  border-color:#374151 !important;
}
[data-theme="dark"] .home-reminder-input::placeholder{
  color:#6b7280 !important;
}
[data-theme="dark"] .home-reminder-input:focus{
  background:#111827 !important;
  border-color:#5C8DFF !important;
  box-shadow:0 0 0 2px rgba(92,141,255,0.2) !important;
}

/* 달력 크기 조절 */
.calendar-wrapper{
  position:relative;
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
}
.calendar{display:flex;flex-direction:column;height:100%;overflow:visible}
.calendar__weekdays{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:0;
  flex-shrink:0;
  margin:0;
  padding:0;
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:12px 12px 0 0;
  background:#fff;
  overflow:hidden;
}
.sidebar__top{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:12px}
.sidebar__top .menu-btn{width:100%;margin:0;flex:1;padding:10px 12px;border-radius:12px}
.menu-btn--pill{flex:1;margin:0;padding:10px 12px;border-radius:12px}
.calendar__grid{
  flex:1;
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  grid-auto-rows:1fr;
  gap:0;
  border:1px solid var(--line);
  border-top:none;
  border-radius:0 0 12px 12px;
  overflow:visible;
  background:#fff;
}
.calendar__grid .day{
  transition:background-color .15s ease,color .15s ease,border-color .15s ease;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  border-radius:0;
  margin:0;
  box-sizing:border-box;
  padding:2px;
  overflow:hidden;
  position:relative;
}
.calendar__grid .day:nth-child(7n){border-right:none}
.calendar__grid .day:nth-last-child(-n+7){border-bottom:none}
.calendar__grid .day.day--selected{border:0 !important;border-right:1px solid var(--line);border-bottom:1px solid var(--line);box-shadow:inset 0 0 0 2px #5C8DFF;background:#EEF2FF}
.calendar__grid .day.day--selected:nth-child(7n){border-right:none}
.calendar__grid .day.day--selected:nth-last-child(-n+7){border-bottom:none}
.day--outside{background:#fff;}
.day--outside .day__num{color:#9aa3b8 !important}


.memo-flag{
  position:absolute;
  top:6px;
  right:6px;
  width:20px;
  height:20px;
  border-radius:6px;
  background:transparent;
  color:inherit;
  font-size:15px;
  font-weight:normal;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:none;
}
.day--selected .memo-flag{box-shadow:none;}
[data-theme="dark"] .memo-flag{background:transparent;color:inherit;box-shadow:none;}
[data-theme="dark"] .day--selected .memo-flag{box-shadow:none;}

/* 주말 색 */
.calendar__weekdays span:nth-child(1), .calendar__grid .day:nth-child(7n+1) .day__num{color:#ef4444}
.calendar__weekdays span:nth-child(7), .calendar__grid .day:nth-child(7n) .day__num{color:#5C8DFF}

/* 타이머 */
.timer__ring{position:relative;width:220px;height:220px;margin:4px auto 8px;display:flex;align-items:center;justify-content:center}
.timer__display{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800}

/* 사용법 섹션 */
.usage-section{
  margin-top:16px;
  padding:16px;
  background:#f8f9fb;
  border-radius:12px;
  border:1px solid var(--line);
}
.usage-title{
  font-size:18px;
  font-weight:700;
  color:var(--text);
  margin:0 0 16px 0;
  text-align:center;
  padding-bottom:12px;
  border-bottom:2px solid var(--line);
}
.usage-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}
.usage-column{
  background:#ffffff;
  padding:16px;
  border-radius:8px;
  border:1px solid var(--line);
}
.usage-subtitle{
  font-size:15px;
  font-weight:700;
  color:var(--primary);
  margin:0 0 12px 0;
  padding-bottom:8px;
  border-bottom:1px solid #e5e7eb;
}
.usage-text{
  font-size:13px;
  line-height:1.7;
  color:#475569;
}

/* 플로팅 추가 버튼 */
.fab-add{
  position:absolute;
  right:16px;
  bottom:16px;
  width:58px;
  height:58px;
  border-radius:50%;
  border:2px solid #1f2933;
  background:#ffffff;
  color:#1f2933;
  font-size:30px;
  font-weight:800;
  box-shadow:0 10px 24px rgba(0,0,0,0.16);
  cursor:pointer;
  z-index:5000;
  display:grid;
  place-items:center;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.fab-add:hover{background:#f7f9fb; box-shadow:0 14px 30px rgba(0,0,0,0.22); transform:translateY(-1px);}
.fab-add:active{transform:translateY(1px);}
.fab-menu{
  position:absolute;
  right:16px;
  bottom:84px;
  display:none;
  flex-direction:column;
  gap:8px;
  z-index:4999;
}
.fab-menu.fab-menu--open{display:flex;}
.fab-action{
  border:none;
  border-radius:12px;
  background:#fff;
  color:#111827;
  font-weight:700;
  padding:12px 16px;
  box-shadow:0 10px 30px rgba(0,0,0,0.16);
  cursor:pointer;
  min-width:140px;
  text-align:right;
}
.fab-action:hover{background:#f2f6ff; color:#5C8DFF;}

.usage-text p{
  margin:0 0 12px 0;
}
.usage-text ul{
  margin:8px 0;
  padding-left:20px;
}
.usage-text li{
  margin:6px 0;
}
.usage-text strong{
  color:var(--primary);
  font-weight:600;
}
.timer__eta{display:block;text-align:center;font-size:12px;color:#6b7280;background:#eef2ff;border-radius:999px;width:max-content;margin:0 auto 8px;padding:4px 10px}
.timer__inputs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:4px 0 8px}
.timer__inputs input{width:100%;box-sizing:border-box}

/* 위젯: 스크롤 제거 */
.widget__body{overflow:auto}
.widget__body::-webkit-scrollbar{width:0;height:0}
.widget__body{scrollbar-width:none;-ms-overflow-style:none}

/* 위젯 버튼 공통 (색상/삭제) */
.widget .color-btn,.widget .del-btn{
  width:32px;height:28px;padding:0;border:1px solid #d9e0eb;border-radius:10px;background:#f7f9fc;display:inline-grid;place-items:center;cursor:pointer;font-size:15px;line-height:1;color:#475569;
}
.widget .color-btn:hover,.widget .del-btn:hover{background:#eef2f8;border-color:#cdd5e2}

/* 미니 달력(메인 문서용) */
.widget--calendar .mini-cal__head{display:flex;gap:8px;align-items:center;margin-bottom:6px;font-size:12px}
.widget--calendar .mini-cal__days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:2px}
.widget--calendar .mini-cal__days span{font-size:11px;font-weight:600;color:#475569;text-align:center}
.widget--calendar .mini-cal__grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;width:100%;min-width:0}
.widget--calendar .mini-day{position:relative;display:flex;flex-direction:column;gap:3px;padding:4px 2px 2px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;min-height:0;min-width:0;box-sizing:border-box}
.widget--calendar .mini-day:nth-child(7n){border-right:none}
.widget--calendar .mini-day:nth-last-child(-n+7){border-bottom:none}
.widget--calendar .mini-day__num{font-size:11px;font-weight:700;color:#1f2937}
.widget--calendar .mini-day--out .mini-day__num{color:#cbd5e1}
.widget--calendar .mini-day--sel{outline:2px solid #EEF2FF}
.widget--calendar .mini-labels{display:flex;flex-direction:column;gap:2px;overflow:hidden;flex:1}
.widget--calendar .mini-label{display:flex;align-items:center;gap:3px;font-size:13px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#1f2937;padding:0;border-radius:0;background:transparent}
.widget--calendar .mini-label.done{color:#94a3b8;text-decoration:line-through;background:transparent}
.widget--calendar .mini-more{margin-left:auto;font-size:10px;color:#4A7AEE;font-weight:600}
.widget--calendar .mini-dots{display:none}
.widget--calendar .mini-checkbox{width:12px;height:12px;appearance:auto;cursor:pointer;flex-shrink:0}
.widget--calendar .dot{width:6px;height:6px;border-radius:50%}

/* 푸터 */
.footer{
  background:#ffffff;
  border-top:1px solid var(--line);
  padding:20px 0;
  margin-top:auto;
  grid-column:1/-1;
}
.footer-content{
  max-width:1200px;
  margin:0 auto;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.footer-links{
  margin-bottom:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.footer-link{
  color:#64748b;
  text-decoration:none;
  font-size:13px;
  transition:color 0.2s;
}
.footer-link:hover{
  color:var(--primary);
}
.footer-divider{
  margin:0 12px;
  color:#cbd5e1;
}
.footer-copyright{
  color:#94a3b8;
  font-size:12px;
  margin:0;
}

/* 모달 팝업 */
.modal-overlay{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:rgba(0,0,0,0.5);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10000;
  padding:20px;
}
.modal-content{
  background:#ffffff;
  border-radius:16px;
  max-width:800px;
  width:100%;
  max-height:80vh;
  overflow-y:auto;
  box-shadow:0 20px 60px rgba(0,0,0,0.3);
  position:relative;
}
.modal-header{
  padding:20px 24px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.modal-title{
  font-size:20px;
  font-weight:700;
  color:var(--text);
  margin:0;
}
.modal-close{
  background:transparent;
  border:none;
  font-size:24px;
  color:#94a3b8;
  cursor:pointer;
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  transition:all 0.2s;
}
.modal-close:hover{
  background:#f1f5f9;
  color:#64748b;
}
.modal-body{
  padding:24px;
  line-height:1.7;
  color:#475569;
}
.modal-body h3{
  font-size:18px;
  font-weight:700;
  color:var(--text);
  margin:24px 0 12px 0;
}
.modal-body h3:first-child{
  margin-top:0;
}
.modal-body p{
  margin:12px 0;
}
.modal-body ul{
  margin:12px 0;
  padding-left:24px;
}
.modal-body li{
  margin:8px 0;
}
.modal-body strong{
  color:var(--primary);
  font-weight:600;
}

/* 모바일 반응형 */
@media (max-width: 1024px) {
  .app{
    grid-template-columns:1fr;
    padding:4px;
    gap:8px;
  }
  .sidebar{
    display:none;
  }
  .main{
    grid-column:1;
  }
  .right{
    grid-column:1;
  }
  .card__header-unified{
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:8px;
    padding:8px;
  }
  .monthly-goal-input-unified{
    flex:1 1 auto !important;
    width:100% !important;
    max-width:none !important;
    min-width:0;
    font-size:13px;
    padding:6px 8px;
  }
  .nav-controls{
    width:100%;
    justify-content:center;
  }
  .usage-grid{
    grid-template-columns:1fr;
    gap:12px;
  }
  .footer{
    padding:16px 8px;
  }
  .modal-content{
    margin:20px;
    max-width:calc(100% - 40px);
  }
}

@media (max-width: 768px) {
  .calendar__grid{
    gap:0;
  }
  .day{
    min-height:100px;
  }
  .day__num{
    font-size:9px;
    top:4px;
    left:4px;
  }
  .label-text{
    font-size:10px;
  }
  .label-emoji{
    font-size:10px;
  }
  .labels{
    top:20px;
  }
  .datebox{
    padding:8px;
  }
  .event-datetime-row{
    flex-direction:column;
    gap:6px;
  }
  .fab-add{right:12px; bottom:16px; width:58px; height:58px; font-size:30px;}
  .fab-menu{right:12px; bottom:84px;}
  .event-date-group{
    width:100%;
  }
  .usage-section{
    padding:12px;
  }
  .usage-title{
    font-size:16px;
  }
  .usage-subtitle{
    font-size:14px;
  }
  .usage-text{
    font-size:12px;
  }
  
}

@media (max-width: 480px) {
  .app{
    padding:2px;
    gap:4px;
  }
  .card{
    border-radius:12px;
  }
  .card__header-unified{
    padding:6px;
  }
  .monthly-goal-input-unified{
    font-size:12px;
    padding:5px 8px;
  }
  .btn-today{
    padding:5px 10px;
    font-size:12px;
  }
  .icon-btn{
    width:28px;
    height:28px;
    font-size:14px;
  }
  .header-ym-compact{
    font-size:14px;
  }
  .calendar__weekdays span{
    font-size:10px;
  }
  .day{
    min-height:80px;
  }
  .day__num{
    font-size:8px;
  }
  .label-text{
    font-size:9px;
  }
  .usage-grid{
    gap:8px;
  }
  .usage-column{
    padding:12px;
  }
  .usage-title{
    font-size:15px;
    margin-bottom:12px;
  }
  .usage-subtitle{
    font-size:13px;
  }
  .usage-text{
    font-size:11px;
  }
  .footer-content{
    padding:0 12px;
  }
  .footer-link{
    font-size:11px;
  }
  .footer-copyright{
    font-size:10px;
  }
}

/* 소개 섹션 제목(h2) 가운데정렬 방지 */
#siteIntro .usage-title {
  text-align: left !important;
}

/* memo2_style_patch.css */

/* 모바일/태블릿에서 사이드바(메뉴) 숨김 해제 + 상단 가로 메뉴로 전환 */
@media (max-width: 1024px) {
  /* 기존에 display:none 걸려있어도 무조건 보이게 */
  aside.sidebar {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 8px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    position: sticky;
    top: 0;
    z-index: 50;

    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  /* 앱 레이아웃을 1열로 */
  .app {
    grid-template-columns: 1fr !important;
  }

  /* 메뉴 버튼들이 가로로 넘치면 스크롤되도록 */
  aside.sidebar .menu-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 110px;
  }

  /* 사이드바 아래 안내문(있다면)이 너무 커서 레이아웃을 망치면 숨김 */
  .sidebar .hint,
  .sidebar .help,
  .sidebar .desc {
    display: none !important;
  }
}

/* memo2_style_patch.css */

/* 모바일: 왼쪽 사이드바를 상단 가로 메뉴로 */
@media (max-width: 1024px) {
  /* 전체 레이아웃을 1열로 강제 */
  .app {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* 사이드바를 상단 가로 스크롤 메뉴로 */
  aside.sidebar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;

    width: 100% !important;

    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;

    padding: 10px !important;
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;

    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 메뉴 버튼들이 가로로 나열되게 */
  aside.sidebar .menu-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-width: 96px !important;
  }

  /* 본문도 100% */
  main, .main, .content {
    width: 100% !important;
  }
}

/* === MOBILE NAV + SCROLL FIX (2026-01-04) === */
@media (max-width: 1024px){

  /* 모바일에서 아래 내용이 안 보이는(스크롤 막힘) 현상 방지 */
  html, body { height: auto !important; }
  body { overflow-y: auto !important; }

  /* grid 깨짐/클리핑 방지: 앱 전체를 세로 흐름으로 */
  .app{
    height: auto !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* 모바일에서 메뉴 숨김 해제 + 상단 메뉴바로 */
  aside.sidebar{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;  /* 가로 스크롤 대신 2줄로 자동 줄바꿈 */
    gap: 8px !important;

    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;

    padding: 10px !important;
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
  }

  aside.sidebar .menu-btn{
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-width: 92px !important;
  }

  /* 본문이 숨겨지는 브라우저(웨일) 대비 */
  main, .main, .content{
    width: 100% !important;
    overflow: visible !important;
  }
}

/* /var/www/html/memo2_style_patch.css */
/* === MOBILE MENU FORCE SHOW (2026-01-04) === */
@media (max-width: 1024px){
  /* 스크롤 막힘 방지 */
  html, body { height: auto !important; }
  body { overflow-y: auto !important; }

  /* 앱 레이아웃을 세로 흐름으로 고정 */
  .app{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  /* 어떤 CSS가 있어도 메뉴는 무조건 보이게 */
  html body .app aside.sidebar,
  html body aside.sidebar,
  html body .sidebar{
    display: flex !important;
    flex-direction: row !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding: 8px !important;
    -webkit-overflow-scrolling: touch !important;
    background: var(--bg) !important;
    border-bottom: 1px solid var(--line) !important;
    overflow-x: hidden !important;
  }

  /* 메뉴가 “고정(sticky/fixed)”되어 본문을 덮지 않게 */
  html body .app aside.sidebar{
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    width: 100% !important;
    overflow-x: auto !important;
  }

  /* 메뉴 버튼들을 가로로 배치 */
  html body .sidebar .menu-btn,
  html body .sidebar button,
  html body aside.sidebar .menu-btn,
  html body aside.sidebar button {
    flex: 1 1 auto !important;
    white-space: nowrap !important;
    min-width: 60px !important;
    max-width: 120px !important;
    padding: 8px 6px !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  /* 사이드바 상단 그룹도 가로로 */
  html body .sidebar__top {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
  }

  html body .sidebar__top .menu-btn {
    flex: 0 0 auto !important;
    min-width: 40px !important;
    padding: 6px 8px !important;
  }

  /* 힌트 텍스트 숨김 */
  html body .sidebar__hint,
  html body .sidebar p.sidebar__hint {
    display: none !important;
  }

  /* 본문도 숨겨지지 않게 */
  main, .main, .content{
    width: 100% !important;
    overflow: visible !important;
  }
}

/* 타이머 그리드 스타일 */
.timer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.timer-box {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timer-box__header {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 4px;
}

.timer-box__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.timer-box__btn:hover {
  background: var(--line);
}

.timer__ring {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 4px auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer__display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
}

.timer__eta {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  background: #eef2ff;
  border-radius: 999px;
  width: max-content;
  margin: 0 auto 6px;
  padding: 4px 10px;
}

.timer__inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 auto 6px;
  max-width: 180px;
  width: 100%;
}

.timer__inputs input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  font-size: 14px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timer__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto 6px;
}

.timer__footer .timer__controls {
  margin: 0;
}

.timer-label-btn {
  display: inline-block;
  padding: 5px 16px;
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary);
  border: 1.5px solid color-mix(in srgb, var(--primary) 30%, white);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer-label-btn:hover {
  background: color-mix(in srgb, var(--primary) 20%, white);
}

[data-theme="dark"] .timer-label-btn {
  background: color-mix(in srgb, var(--primary) 18%, var(--card));
  border-color: color-mix(in srgb, var(--primary) 40%, var(--card));
}

[data-theme="dark"] .timer-label-btn:hover {
  background: color-mix(in srgb, var(--primary) 28%, var(--card));
}

.timer-setting-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.timer-setting-modal.is-open {
  display: flex;
}

.timer-setting-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.timer-setting-modal__card {
  position: relative;
  z-index: 1;
  background: var(--card);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-width: 360px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.timer-setting-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.timer-setting-modal__title {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}

.timer-setting-modal__close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
}

.timer-setting-modal__close:hover {
  background: color-mix(in srgb, var(--line) 50%, transparent);
}

.timer-setting-modal__field {
  margin-bottom: 12px;
}

.timer-setting-modal__field > label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timer-setting-modal__field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

.timer-setting-modal__time-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.timer-setting-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.timer-setting-modal__btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.timer-setting-modal__btn--cancel {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
}

.timer-setting-modal__btn--save {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

.timer__controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 8px auto 0;
}

/* 타이머 원형 버튼 스타일 */
.timer-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(92, 141, 255, 0.3);
}

.timer-btn:hover {
  background: #4a7de8;
  box-shadow: 0 4px 12px rgba(92, 141, 255, 0.5);
  transform: translateY(-1px);
}

.timer-btn:active {
  transform: translateY(0);
}

.timer-btn svg {
  display: block;
}

/* 기존 .btn 스타일 제거 */
.timer__controls .btn {
  display: none;
}

/* ── 스탑워치 (브라우저 본체 · 플로팅 위젯) ── */
.widget--stopwatch .stopwatch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.stopwatch__ring {
  position: relative;
  margin: 4px auto 8px;
}

.stopwatch-time.timer__display,
.widget--stopwatch .stopwatch-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.widget--stopwatch .stopwatch-status {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  background: color-mix(in srgb, var(--primary) 10%, white);
  border-radius: 999px;
  padding: 3px 12px;
  display: inline-block;
  margin-bottom: 16px;
}

[data-theme="dark"] .widget--stopwatch .stopwatch-status {
  background: color-mix(in srgb, var(--primary) 18%, var(--card));
}

.widget--stopwatch .stopwatch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.widget--stopwatch .stopwatch-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}

.widget--stopwatch .stopwatch-btn:hover {
  opacity: 0.92;
}

.widget--stopwatch .stopwatch-btn--reset {
  background: var(--card);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

[data-theme="dark"] .widget--stopwatch .stopwatch-btn--reset {
  background: var(--card);
}

@media (max-width: 1200px) {
  .timer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .timer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
}
/* 메모 페이지 스타일 */
.memo-page-content {
  padding: 20px;
}

.memo-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.memo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: all 0.2s;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.memo-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

.memo-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.memo-card__title {
  font-weight: 600;
  font-size: 16px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memo-card__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #64748b;
  transition: background 0.2s;
}

.memo-card__btn:hover {
  background: rgba(0,0,0,.05);
}

.memo-card__content {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.memo-card__content:hover {
  background: rgba(0,0,0,.02);
}

.memo-card__menu {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #64748b;
  transition: background 0.2s;
}

.memo-card__menu:hover {
  background: rgba(0,0,0,.05);
}

.memo-card__text {
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.memo-card__emoji {
  font-size: 20px;
  margin-right: 4px;
}

.memo-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  font-size: 15px;
}

/* 모달 스타일 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-box {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.modal-form {
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-danger {
  padding: 10px 16px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #ef4444;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-confirm {
  padding: 10px 16px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-confirm:hover {
  background: #4a7de8;
  border-color: #4a7de8;
}

@media (max-width: 768px) {
  .memo-page-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-box {
    padding: 20px;
  }
}

/* 루틴 페이지 스타일 */
.routine-week-calendar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.routine-year-month {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
}

.routine-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.routine-day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.routine-day-cell:hover {
  background: var(--line);
}

.routine-day-cell.today {
  background: #e0ecff;
  color: var(--primary);
}

.routine-day-cell.selected {
  background: var(--primary);
  color: white;
}

.routine-day-name {
  font-size: 11px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.routine-day-num {
  font-size: 16px;
  font-weight: 600;
}

.routine-content {
  padding: 20px;
}

.routine-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.routine-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  transition: all 0.2s;
}

.routine-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.routine-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.routine-label {
  flex: 1;
  font-size: 15px;
  cursor: pointer;
}

.routine-edit-input {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.routine-del-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.routine-del-btn:hover {
  background: #fee;
  color: #ef4444;
}

.menu-btn {
  position: relative;
}

.menu-btn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  background: var(--text);
  color: var(--card);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
}

.insight-tab-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.insight-tab {
  border-radius: 8px;
  padding: 6px 20px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.insight-tab--active {
  background: var(--primary);
  color: #fff;
  border: none;
}

.insight-tab--inactive {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}

.insight-lang-toggle {
  display: flex;
  gap: 8px;
}

.insight-lang-btn {
  border-radius: 8px;
  padding: 6px 20px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.insight-lang-btn--active {
  background: var(--primary);
  color: #fff;
  border: none;
}

.insight-lang-btn--inactive {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}

.insight-page-content {
  padding: 0 16px 16px;
}

.insight-write-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insight-write-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  background: var(--card);
  color: var(--text);
}

.insight-write-input--title {
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.insight-write-textarea {
  width: 100%;
  min-height: 400px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  background: var(--card);
  color: var(--text);
}

/* Daily 주간 카드 내부 task list 스크롤바 슬림화 */
.weekly-day-card-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.06) transparent;
}
.weekly-day-card-scroll::-webkit-scrollbar {
  width: 1px;
}
.weekly-day-card-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.weekly-day-card-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
}
.weekly-day-card-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.14);
}

/* Daily 월간 기록 카드 뷰 */
#dailyMonthCalendar{
  overflow:auto;
}
.daily-month-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 4px 10px;
}
.daily-month-title{
  font-weight:600;
  font-size:14px;
  color:#1f2937;
}
.daily-month-nav{
  display:flex;
  gap:6px;
}
.daily-month-nav-btn{
  width:28px;
  height:28px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:var(--card);
  color:#64748b;
  cursor:pointer;
}
.daily-month-record-view{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  max-width:100%;
  overflow-y:auto;
  padding-bottom:16px;
}
.daily-month-week-row{
  display:grid;
  grid-template-columns:repeat(7,minmax(120px,1fr));
  gap:6px;
  width:100%;
  min-width:840px;
}
.daily-month-day-card{
  min-height:150px;
  border:1px solid #dce5f2;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.daily-month-day-card.is-outside-month{
  opacity:0.45;
}
.daily-month-day-card.is-selected{
  border-color:#5C8DFF;
}
.daily-month-day-card.is-today .daily-month-day-card-header{
  background:#EEF2FF;
}
.daily-month-day-card-header{
  height:44px;
  background:#f8fafc;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid #e5e7eb;
}
.daily-month-day-name{
  font-size:11px;
  color:#64748b;
}
.daily-month-day-num{
  font-size:14px;
  font-weight:700;
  color:#111827;
}
.daily-month-day-card-body{
  padding:8px;
  max-height:180px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.daily-month-task-item{
  display:flex;
  align-items:flex-start;
  gap:6px;
}
.daily-month-task-item input[type="checkbox"]{
  width:13px;
  height:13px;
  margin-top:2px;
  flex-shrink:0;
  accent-color:#5C8DFF;
}
.daily-month-task-text{
  font-size:11px;
  line-height:1.35;
  color:#374151;
  word-break:break-all;
}
.daily-month-task-text.is-done{
  text-decoration:line-through;
  color:#9aa5b1;
}
.daily-month-empty{
  font-size:11px;
  color:#9ca3af;
}
@media (max-width:768px){
  .daily-month-record-view{
    overflow-x:auto;
  }
  .daily-month-week-row{
    min-width:840px;
  }
}

/* Unified view tab bar (Daily, Timer, calendar panel, …) */
.view-segment,
.daily-view-segment,
.timer-view-segment{
  display:flex;
  align-items:center;
  flex:0 1 auto;
  min-width:0;
  max-width:100%;
  gap:2px;
  background:#f3f4f6;
  border-radius:8px;
  padding:2px;
}
.view-tab-btn,
.daily-view-btn{
  flex:1 1 0;
  min-width:0;
  padding:5px 14px;
  font-size:13px;
  font-weight:400;
  border:none;
  border-radius:6px;
  background:transparent;
  color:var(--text,#111827);
  font-family:inherit;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background 0.15s ease, color 0.15s ease;
}
.view-tab-btn:hover:not(.is-active),
.daily-view-btn:hover:not(.is-active){
  background:#EEF2FF;
  color:#5C8DFF;
}
.view-tab-btn.is-active,
.daily-view-btn.is-active{
  padding:5px 14px;
  font-size:13px;
  font-weight:500;
  border-radius:6px;
  background:#5C8DFF;
  color:#ffffff;
  border:none;
}
#dailyPage .daily-page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-shrink:0;
  gap:12px;
}
@media (max-width:640px){
  #dailyPage .daily-page-header{
    flex-wrap:wrap;
    align-items:flex-start;
  }
  .view-segment,
  .daily-view-segment,
  .timer-view-segment{
    width:100%;
    flex:1 1 100%;
  }
  .view-tab-btn,
  .daily-view-btn{
    padding:5px 10px;
    font-size:12px;
  }
}

/* Timer page — Timer / Stopwatch tabs (Daily tab style) */
#timerPage{
  display:flex;
  flex-direction:column;
  height:100%;
}
#timerPage #timerPanel{
  flex:1;
  min-height:0;
  overflow:auto;
}
#timerPage .timer-page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-shrink:0;
  gap:12px;
  flex-wrap:wrap;
}
#timerPage #timerPanel{
  display:block;
}
#timerPage #stopwatchPanel,
#timerPage .stopwatch-page-content-wrap{
  flex:1;
  min-height:0;
  display:none;
  flex-direction:column;
}
#timerPage.timer-page--stopwatch #timerPanel{
  display:none !important;
}
#timerPage.timer-page--stopwatch #stopwatchPanel,
#timerPage.timer-page--stopwatch .stopwatch-page-content-wrap{
  display:flex !important;
}
#timerPage:not(.timer-page--stopwatch) #stopwatchPanel,
#timerPage:not(.timer-page--stopwatch) .stopwatch-page-content-wrap{
  display:none !important;
}

/* Stopwatch — browser page (match widget) */
#stopwatchPageContent .stopwatch-card,
#stopwatchPageContent .stopwatch-card--inline{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  width:100%;
  max-width:360px;
  margin:0 auto;
  padding:28px 16px 32px;
  box-sizing:border-box;
}
#stopwatchPageContent .timer__ring{
  position:relative;
  width:180px;
  height:180px;
  margin:8px auto 12px;
  display:flex;
  align-items:center;
  justify-content:center;
}
#stopwatchPageContent .stopwatch-time.timer__display{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  font-weight:800;
  color:var(--text,#111827);
  letter-spacing:1px;
  font-variant-numeric:tabular-nums;
}
#stopwatchPageContent .stopwatch-status{
  font-size:13px;
  color:#5C8DFF;
  background:#EEF2FF;
  border-radius:999px;
  padding:4px 14px;
  display:inline-block;
  margin-bottom:20px;
  font-weight:600;
}
#stopwatchPageContent .stopwatch-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:8px;
  width:100%;
}
#stopwatchPageContent .stopwatch-btn{
  border-radius:24px;
  padding:10px 28px;
  font-size:14px;
  font-weight:600;
  border:none;
  cursor:pointer;
  font-family:inherit;
  transition:background 0.15s ease, color 0.15s ease;
}
#stopwatchPageContent .stopwatch-btn--primary{
  background:#5C8DFF;
  color:#fff;
}
#stopwatchPageContent .stopwatch-btn--primary:hover{
  background:#4A7AEE;
}
#stopwatchPageContent .stopwatch-btn--reset{
  background:transparent;
  border:1.5px solid #5C8DFF;
  color:#5C8DFF;
}
#stopwatchPageContent .stopwatch-btn--reset:hover{
  background:#EEF2FF;
}

@media (max-width:640px){
  #timerPage .timer-page-header{
    flex-wrap:wrap;
    align-items:flex-start;
  }
}

/* Daily 일간 워크스페이스 */
.daily-workspace{
  flex:1;
  min-height:0;
  overflow:auto;
}
.daily-day-quick-input{
  padding:10px 16px 0 !important;
}
.daily-day-quick-input.is-day-mode{
  padding-bottom:4px !important;
}
.daily-day-quick-input-inner{
  display:flex;
  gap:8px;
  align-items:center;
}
.daily-day-quick-input-inner input{
  flex:1;
  padding:11px 14px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  font-size:14px;
  font-family:inherit;
  outline:none;
  background:#fff;
  box-sizing:border-box;
}
.daily-day-quick-input-inner input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(92,141,255,0.12);
}
.daily-day-quick-input-inner button{
  width:42px;
  height:42px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  font-size:20px;
  cursor:pointer;
  flex-shrink:0;
}
.daily-day-layout{
  display:grid;
  grid-template-columns:minmax(0,7fr) minmax(260px,3fr);
  gap:12px;
  padding:12px;
  align-items:start;
}
.daily-day-sections{
  min-width:0;
  border:1px solid #e6ebf3;
  border-radius:10px;
  background:var(--card);
  padding:10px;
}
.daily-day-sections-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:12px;
}
.daily-day-head-title{
  font-size:15px;
  font-weight:700;
  color:#0f172a;
}
.daily-day-add-section-btn{
  border:1px dashed #cbd5e1;
  background:#fff;
  color:#475569;
  border-radius:10px;
  padding:7px 12px;
  cursor:pointer;
  font-size:12px;
  font-weight:600;
}
.daily-day-add-section-btn:hover{
  background:#f8fafc;
  border-color:#94a3b8;
}
.daily-day-sections-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.daily-day-section-card,
.daily-section-card{
  border:1px solid #e5eaf2;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
}
.daily-day-section-head,
.daily-section-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,0.06);
  background:#ffffff;
}
.daily-section-header--colored{
  border-bottom-color:rgba(0,0,0,0.08);
}
.daily-section-header--colored .daily-day-section-title,
.daily-section-header--colored .daily-day-section-emoji{
  color:inherit;
}
.daily-section-header--colored .daily-day-section-menu-btn{
  color:inherit;
  border-color:transparent;
}
.daily-section-header--colored .daily-day-section-menu-btn:hover{
  background:rgba(0,0,0,0.08);
}
.daily-section-header--colored .daily-day-add-task-btn{
  background:rgba(0,0,0,0.08);
  color:var(--daily-section-text,inherit);
  border-color:rgba(0,0,0,0.1);
  box-shadow:none;
}
.daily-section-header--colored .daily-day-add-task-btn:hover{
  background:rgba(0,0,0,0.12);
}
.section-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
  flex-shrink:0;
}
.daily-day-section-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.daily-day-section-emoji{
  font-size:18px;
  line-height:1;
}
.daily-day-section-title{
  font-size:14px;
  font-weight:700;
  color:#111827;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.daily-day-section-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}
.daily-day-section-menu-btn{
  width:30px;
  height:30px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#64748b;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  padding:0;
}
.daily-day-section-menu-btn:hover{
  background:rgba(255,255,255,0.7);
  border-color:rgba(15,23,42,0.08);
}
.daily-day-section-btn{
  border:1px solid #dbe4f0;
  background:#fff;
  color:#475569;
  border-radius:8px;
  padding:5px 10px;
  cursor:pointer;
  font-size:12px;
  font-weight:600;
}
.daily-day-add-task-btn{
  background:rgba(255,255,255,0.85);
  border-color:#cbd5e1;
  color:#5C8DFF;
}
.daily-day-add-task-btn:hover{
  background:#fff;
  border-color:#93c5fd;
}
.daily-day-section-body{
  display:flex;
  flex-direction:column;
  gap:0;
  padding:4px 0 8px;
  background:#fff;
}
.daily-task-row{
  border-bottom:1px solid #f1f5f9;
}
.daily-task-row:last-child{
  border-bottom:none;
}
.daily-day-task-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:8px 12px;
  background:#fff;
}
.daily-day-task-item input[type="checkbox"]{
  width:16px;
  height:16px;
  margin-top:2px;
  accent-color:#5C8DFF;
  flex-shrink:0;
}
.daily-day-task-text{
  flex:1;
  min-width:0;
  font-size:13px;
  line-height:1.45;
  color:#334155;
  word-break:break-word;
}
.daily-day-task-text.is-done{
  text-decoration:line-through;
  color:#94a3b8;
}
.daily-day-empty{
  font-size:12px;
  color:#94a3b8;
  padding:10px 12px 12px;
}
.daily-section-task-input{
  width:100%;
  height:36px;
  padding:0 10px;
  border:1px solid #dce5f2;
  border-radius:8px;
  font-size:13px;
  outline:none;
  background:#fff;
  box-sizing:border-box;
  font-family:inherit;
}
.daily-section-task-input:focus{
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.12);
}
.daily-section-title-input{
  width:100%;
  height:36px;
  padding:0 10px;
  border:1px solid #dce5f2;
  border-radius:8px;
  font-size:13px;
  outline:none;
  background:#fff;
  box-sizing:border-box;
  font-family:inherit;
}
.daily-section-title-input:focus{
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.12);
}
.daily-section-add-wrap{
  margin:0 0 10px;
}
.daily-day-section-left .daily-section-title-input{
  flex:1;
  min-width:0;
  height:32px;
}
.daily-day-task-actions{
  display:flex;
  align-items:center;
  gap:2px;
  margin-left:auto;
  flex-shrink:0;
  opacity:0.35;
  transition:opacity 0.15s ease;
}
.daily-task-row:hover .daily-day-task-actions,
.daily-day-task-item:focus-within .daily-day-task-actions{
  opacity:1;
}
.daily-day-task-icon-btn{
  background:none;
  border:none;
  cursor:pointer;
  padding:3px;
  display:flex;
  align-items:center;
  opacity:0.7;
  line-height:1;
}
.daily-day-task-icon-btn:hover{
  opacity:1;
}
.daily-day-task-delete{
  color:#cbd5e1;
  font-size:14px;
}
.daily-day-memo-panel{
  min-width:0;
  border:1px solid #e6ebf3;
  border-radius:10px;
  background:var(--card);
  padding:10px;
  position:sticky;
  top:8px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
/* Daily right panel — mini calendar */
.mini-cal-panel{
  background:var(--card,#fff);
  border:0.5px solid var(--line,#e9ecf2);
  border-radius:12px;
  padding:10px 12px;
  flex-shrink:0;
}
.mini-cal-header{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:8px;
}
.mini-cal-header span{
  flex:1;
  font-size:13px;
  font-weight:500;
  color:var(--text,#111827);
  text-align:center;
}
.mini-cal-header button{
  background:none;
  border:none;
  font-size:11px;
  color:var(--text-muted,#64748b);
  cursor:pointer;
  padding:2px 4px;
  font-family:inherit;
}
.mini-cal-header button:hover{
  color:#5C8DFF;
}
#mini-cal-today-btn{
  font-size:11px;
  color:#5C8DFF;
  font-weight:500;
  flex-shrink:0;
}
.mini-cal-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:1px;
}
.mini-cal-dow{
  font-size:10px;
  color:var(--text-muted,#9aa5b1);
  text-align:center;
  padding:3px 0;
  font-weight:500;
}
.mini-cal-cell{
  font-size:11px;
  text-align:center;
  padding:4px 2px;
  border-radius:4px;
  cursor:pointer;
  color:var(--text,#111827);
  line-height:1.2;
}
.mini-cal-cell:hover:not(.empty){
  background:#EEF2FF;
  color:#5C8DFF;
}
.mini-cal-cell.empty{
  cursor:default;
  visibility:hidden;
}
.mini-cal-cell.mini-cal-today{
  background:#5C8DFF;
  color:#fff;
  font-weight:500;
}
.mini-cal-cell.mini-cal-selected:not(.mini-cal-today){
  background:#EEF2FF;
  color:#5C8DFF;
  font-weight:500;
}
.mini-cal-cell.mini-cal-today.mini-cal-selected{
  background:#5C8DFF;
  color:#fff;
}
.daily-panel-widget-row{
  margin-top:4px;
  padding-top:8px;
  border-top:1px solid #eef2f7;
}
.daily-panel-widget-btn{
  width:100%;
  justify-content:center;
}
.daily-day-memo-panel.is-expanded{
  grid-column:1 / -1;
}
.daily-memo-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
}
.daily-memo-head-title{
  font-size:14px;
  font-weight:700;
  color:#0f172a;
}
.daily-memo-head-actions{
  display:flex;
  align-items:center;
  gap:4px;
}
.daily-memo-icon-btn{
  width:28px;
  height:28px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  color:#64748b;
  font-size:13px;
  cursor:pointer;
  padding:0;
  line-height:1;
}
.daily-memo-icon-btn:hover{
  background:#f1f5f9;
}
.daily-memo-textarea{
  width:100%;
  min-height:140px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:12px;
  box-sizing:border-box;
  font-size:13px;
  font-family:inherit;
  outline:none;
  resize:vertical;
  background:#fff;
  line-height:1.55;
}
.daily-memo-textarea:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(92,141,255,0.1);
}
.daily-memo-saved-at{
  margin-top:8px;
  font-size:11px;
  color:#94a3b8;
}
.daily-memo-actions{
  display:flex;
  gap:8px;
  margin:10px 0 8px;
}
.daily-memo-save-btn{
  background:#5C8DFF;
  color:#fff;
  border-color:#5C8DFF;
  flex:1;
}
.daily-memo-all-btn{
  flex:1;
  background:#fff;
}
.daily-memo-linked-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:220px;
  overflow-y:auto;
  padding-top:4px;
  border-top:1px solid #eef2f7;
}
.daily-memo-item{
  border:1px solid #e8edf4;
  border-radius:10px;
  background:#fff;
  padding:10px;
}
.daily-memo-item-title{
  font-size:12px;
  font-weight:700;
  color:#1f2937;
  margin-bottom:4px;
}
.daily-memo-item-content{
  font-size:12px;
  color:#64748b;
  line-height:1.4;
  word-break:break-word;
}
.daily-section-menu-popup{
  min-width:120px;
}
.daily-section-edit-popup{
  width:min(280px,calc(100vw - 24px));
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,0.12);
  box-sizing:border-box;
}
.daily-section-edit-label{
  font-size:12px;
  font-weight:700;
  color:#475569;
  margin:10px 0 6px;
}
.daily-section-edit-label:first-child{
  margin-top:0;
}
.daily-section-edit-title{
  width:100%;
  height:36px;
  padding:0 10px;
  border:1px solid #dce5f2;
  border-radius:8px;
  font-size:13px;
  outline:none;
  box-sizing:border-box;
  font-family:inherit;
}
.daily-section-edit-title:focus{
  border-color:#5C8DFF;
  box-shadow:0 0 0 2px rgba(92,141,255,0.12);
}
.daily-section-edit-emoji-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:6px;
}
.daily-section-edit-emoji-btn{
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  padding:0;
}
.daily-section-edit-emoji-btn.is-selected{
  border-color:#5C8DFF;
  background:#eff6ff;
  box-shadow:0 0 0 2px rgba(92,141,255,0.15);
}
.daily-section-edit-color-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.daily-section-edit-color-btn{
  width:22px;
  height:22px;
  border:2px solid transparent;
  border-radius:50%;
  cursor:pointer;
  padding:0;
  flex-shrink:0;
}
.daily-section-edit-color-btn.is-selected{
  border-color:#111827;
  box-shadow:0 0 0 2px rgba(17,24,39,0.15);
}
.daily-section-edit-actions{
  display:flex;
  gap:8px;
  margin-top:14px;
}
.daily-section-edit-cancel,
.daily-section-edit-save{
  flex:1;
  height:34px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
}
.daily-section-edit-cancel{
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
}
.daily-section-edit-save{
  border:1px solid #5C8DFF;
  background:#5C8DFF;
  color:#fff;
}
@media (max-width:1024px){
  .daily-day-layout{
    grid-template-columns:1fr;
  }
  .daily-day-memo-panel{
    position:static;
  }
}

/* 메모 리치 에디터 */
.memo-editor-wrap{
  border:1px solid #e9ecf2;
  border-radius:12px;
  background:var(--card);
  overflow:hidden;
}
.memo-mini-toolbar{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  padding:8px;
  border-bottom:1px solid #e9ecf2;
  background:#f8fafc;
}
.memo-mini-toolbar button,
.memo-mini-toolbar select,
.memo-mini-toolbar input[type="color"]{
  height:30px;
  border:1px solid #dbe3ef;
  border-radius:8px;
  background:#fff;
  font-size:12px;
  cursor:pointer;
}
.memo-mini-toolbar button{
  padding:0 9px;
}
.memo-rich-editor{
  min-height:400px;
  padding:16px;
  outline:none;
  font-size:15px;
  line-height:1.65;
  font-family:inherit;
  word-break:break-word;
}
.memo-rich-editor:empty::before{
  content:attr(data-placeholder);
  color:#94a3b8;
  pointer-events:none;
}
.memo-rich-editor ul{
  padding-left:22px;
}
.memo-check-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin:4px 0;
}
.memo-check-row input[type="checkbox"]{
  width:16px;
  height:16px;
}
.memo-pasted-image,
.memo-rich-editor img,
.memo-card img{
  max-width:100%;
  height:auto;
  border-radius:10px;
  display:block;
  margin:10px 0;
}
.memo-card__html{
  word-break:break-word;
}
.memo-card img,
.memo-widget img,
.memo-popup-content img,
.daily-memo-panel img,
.daily-memo-item-content img{
  max-width:100%;
  height:auto;
  display:block;
  margin:10px 0;
  border-radius:10px;
}
.memo-card ul,
.memo-widget ul,
.memo-popup-content ul,
.daily-memo-panel ul,
.daily-memo-item-content ul{
  padding-left:22px;
}
.daily-memo-item-content{
  max-height:120px;
  overflow:hidden;
}
.memo-image-block{
  position:relative;
  display:block;
  width:fit-content;
  max-width:100%;
  margin:12px 0;
  padding:4px;
  border:1px solid transparent;
  border-radius:12px;
  cursor:move;
}
.memo-image-block.is-selected{
  border-color:#4A7AEE;
  background:rgba(37,99,235,0.04);
}
.memo-image-block.is-dragging{
  opacity:0.55;
}
.memo-image-block img{
  display:block;
  max-width:100%;
  height:auto;
  border-radius:10px;
  user-select:none;
  pointer-events:none;
}
.memo-image-resize-handle{
  display:none;
  position:absolute;
  right:-6px;
  bottom:-6px;
  width:14px;
  height:14px;
  border:2px solid #4A7AEE;
  border-radius:50%;
  background:#fff;
  cursor:nwse-resize;
}
.memo-image-block.is-selected .memo-image-resize-handle{
  display:block;
}
.memo-image-resizing,
.memo-image-resizing *{
  cursor:nwse-resize !important;
  user-select:none !important;
}
.memo-card .memo-image-resize-handle,
.memo-widget .memo-image-resize-handle,
.memo-popup-content .memo-image-resize-handle,
.daily-memo-item-content .memo-image-resize-handle{
  display:none !important;
}
@media (max-width:768px){
  .memo-mini-toolbar{
    gap:5px;
    padding:7px;
  }
  .memo-mini-toolbar button,
  .memo-mini-toolbar select,
  .memo-mini-toolbar input[type="color"]{
    height:28px;
    font-size:11px;
  }
  .memo-rich-editor{
    min-height:320px;
    padding:14px;
  }
}

/* Daily day restore 2026-05-29 */
#dailyDayWorkspace.daily-workspace {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

#dailyPage .daily-day-quick-input {
  padding: 12px 16px 8px !important;
}

#dailyPage .daily-day-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
  gap: 18px !important;
  padding: 14px 16px 20px !important;
  align-items: start !important;
}

#dailyPage .daily-day-sections {
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

#dailyPage .daily-day-sections-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 0 12px !important;
}

#dailyPage .daily-day-head-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #111827 !important;
}

#dailyPage .daily-day-add-section-btn {
  border: 1px dashed var(--color-primary, #5C8DFF) !important;
  background: #ffffff !important;
  color: var(--color-primary, #5C8DFF) !important;
  border-radius: 10px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

#dailyPage .daily-day-sections-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}

#dailyPage .daily-day-section-card {
  border: 1px solid #e5eaf2 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
}

#dailyPage .daily-day-section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 54px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
}

#dailyPage .daily-day-section-head:not(.daily-section-header--colored),
#dailyPage .daily-section-header:not(.daily-section-header--colored) {
  background: #ffffff !important;
}

#dailyPage .daily-section-header--colored .daily-day-section-title,
#dailyPage .daily-section-header--colored .daily-day-section-emoji {
  color: inherit !important;
}

#dailyPage .daily-section-header--colored .daily-day-section-menu-btn {
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
}

#dailyPage .daily-section-header--colored .daily-day-section-menu-btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
}

#dailyPage .daily-section-header--colored .daily-day-add-task-btn {
  background: rgba(0, 0, 0, 0.08) !important;
  color: var(--daily-section-text, inherit) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: none !important;
}

#dailyPage .daily-day-section-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
}

#dailyPage .daily-day-section-emoji {
  font-size: 18px !important;
  line-height: 1 !important;
}

#dailyPage .daily-day-section-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #111827 !important;
}

#dailyPage .daily-day-section-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#dailyPage .daily-day-section-menu-btn {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 8px !important;
  color: #475569 !important;
  font-size: 18px !important;
  cursor: pointer !important;
}

#dailyPage .daily-day-section-menu-btn:hover {
  background: rgba(255, 255, 255, 0.65) !important;
}

#dailyPage .daily-day-add-task-btn {
  height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

#dailyPage .daily-day-section-body {
  background: #ffffff !important;
}

#dailyPage .daily-day-task-row {
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 14px !important;
  border-bottom: 1px solid #eef2f7 !important;
}

#dailyPage .daily-day-task-row:last-child {
  border-bottom: 0 !important;
}

#dailyPage .daily-day-task-row input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
}

#dailyPage .daily-day-task-text {
  font-size: 14px !important;
  color: #111827 !important;
  line-height: 1.45 !important;
}

#dailyPage .daily-day-empty {
  padding: 16px !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
}

#dailyPage .daily-day-memo-panel {
  position: sticky !important;
  top: 12px !important;
  border: 1px solid #f1dca8 !important;
  border-radius: 14px !important;
  background: #fffaf0 !important;
  overflow: hidden !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
}

#dailyPage .daily-memo-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 52px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid #f1dca8 !important;
}

#dailyPage .daily-memo-head-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #111827 !important;
}

#dailyPage .daily-memo-textarea {
  width: calc(100% - 20px) !important;
  min-height: 170px !important;
  margin: 10px !important;
  padding: 12px !important;
  border: 1px solid #e6eaf0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  resize: vertical !important;
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

#dailyPage .daily-memo-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 10px 10px !important;
}

#dailyPage .daily-memo-actions button,
#dailyPage .daily-memo-save-btn {
  height: 34px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

@media (max-width: 1024px) {
  #dailyPage .daily-day-layout {
    grid-template-columns: 1fr !important;
  }

  #dailyPage .daily-day-memo-panel {
    position: static !important;
  }
}

/* 브랜드 블루 통일 — 액센트/버튼 */
aside.sidebar .menu-btn.is-active,
html body .sidebar .menu-btn.is-active{
  background:var(--color-primary-light) !important;
  color:var(--color-primary) !important;
  border-color:var(--color-primary) !important;
  font-weight:700;
}
.memo__add .btn,
.daily-memo-save-btn,
.goal-style-menu .menu-btn.primary,
.repeat-modal-footer .btn-confirm,
.btn-primary-accent{
  background:var(--color-primary) !important;
  border-color:var(--color-primary) !important;
  color:#fff !important;
  transition:background 0.15s ease;
}
.memo__add .btn:hover,
.daily-memo-save-btn:hover,
.goal-style-menu .menu-btn.primary:hover,
.repeat-modal-footer .btn-confirm:hover,
.btn-primary-accent:hover{
  background:var(--color-primary-hover) !important;
  border-color:var(--color-primary-hover) !important;
}
input[type="checkbox"],
.daily-day-task-row input[type="checkbox"],
.daily-day-task-item input[type="checkbox"]{
  accent-color:var(--color-primary);
}
.calendar__grid .day.day--today .day__num,
.day--today .day__num{
  background:var(--color-primary);
  color:#fff;
  border-radius:50%;
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
#login-btn:hover,
#login-btn-mobile:hover{
  border-color:var(--color-primary) !important;
  color:var(--color-primary) !important;
}

/* Logs page */
#logsPage.logs-page{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}
#logsPage .logs-page-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:16px 20px 24px;
  box-sizing:border-box;
}
.logs-header{
  padding:20px 0 8px;
}
.logs-header h2{
  font-size:22px;
  font-weight:500;
  margin:0;
  color:var(--text,#111827);
}
.logs-sub{
  font-size:13px;
  color:var(--text-muted,#9aa5b1);
  margin:4px 0 0;
}
.logs-filter{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:16px;
}
.logs-filter.view-segment{
  margin-bottom:16px;
}
.logs-filter .filter-btn{
  padding:5px 14px;
  font-size:13px;
  font-weight:400;
  border:none;
  border-radius:6px;
  background:transparent;
  color:var(--text,#111827);
  cursor:pointer;
  font-family:inherit;
}
.logs-filter .filter-btn:hover:not(.active){
  background:#EEF2FF;
  color:#5C8DFF;
}
.logs-filter .filter-btn.active{
  padding:5px 14px;
  font-size:13px;
  font-weight:500;
  background:#5C8DFF;
  color:#fff;
  border:none;
}
.logs-list{
  display:block;
}
.log-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  border-bottom:0.5px solid var(--line,#e9ecf2);
  cursor:pointer;
}
.log-item:hover .log-title{
  color:#5C8DFF;
}
.log-title{
  font-size:14px;
  color:var(--text,#111827);
}
.log-date{
  font-size:12px;
  color:var(--text-muted,#9aa5b1);
  flex-shrink:0;
  margin-left:16px;
}
.logs-empty{
  font-size:14px;
  color:var(--text-muted,#9aa5b1);
  padding:24px 0;
}
.log-back-btn{
  font-size:13px;
  color:#5C8DFF;
  background:none;
  border:none;
  cursor:pointer;
  padding:0 0 16px;
  display:block;
  font-family:inherit;
}
.log-detail-title{
  font-size:20px;
  font-weight:500;
  margin:0 0 4px;
}
.log-detail-meta{
  font-size:12px;
  color:var(--text-muted,#9aa5b1);
  margin:0 0 20px;
}
.log-content{
  font-size:14px;
  line-height:1.8;
  color:var(--text,#111827);
}
.log-content h1,
.log-content h2,
.log-content h3{
  font-weight:500;
  margin:1.5rem 0 0.5rem;
}
.log-content p{
  margin:0 0 1em;
}
