/* Production personal app chrome, matching the baseline Worknote header (title left, round icon buttons + profile circle right). */
.wn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 32px; }
.wn-title-box { min-width: 0; }
.wn-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 24px; font-weight: 700; color: #0f172a; letter-spacing: -0.01em; white-space: nowrap; }
.wn-title .wn-title-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06); }
#moreModal .wn-more-brand { display: flex; align-items: center; gap: 10px; font-size: 18px !important; letter-spacing: -0.01em; }
#moreModal .wn-more-brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06); }
.wn-gate-icon { display: block; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 18px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06); }
.wn-sub { margin: 2px 0 0; font-size: 14px; font-weight: 500; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.wn-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #94a3b8; cursor: pointer; transition: background .15s, color .15s; }
.wn-icon:hover:not(:disabled) { background: #f1f5f9; color: #2563eb; }
.wn-icon:disabled { cursor: default; }
.wn-icon svg { width: 20px; height: 20px; }
.wn-icon[data-tone="ok"] { color: #10b981; }
.wn-icon[data-tone="warn"] { color: #f59e0b; }
.wn-glyph { display: inline-flex; } .wn-glyph[hidden] { display: none; }
.wn-profile { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; max-width: 260px; }
.wn-profile:hover { background: #f8fafc; }
.wn-profile-name { font-size: 12px; font-weight: 700; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.wn-profile-name:empty { display: none; }
.wn-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 999px; background: #dbeafe; color: #2563eb; font-size: 14px; font-weight: 700; }
.wn-pill { min-height: 32px; padding: 4px 14px; border: 1px solid #fdba74; border-radius: 999px; background: #fff7ed; color: #c2410c; font-size: 13px; font-weight: 700; cursor: pointer; }
.wn-pill[hidden] { display: none; }
.wn-notice { margin: -20px 0 16px; font-size: 13px; font-weight: 700; }
.wn-notice:empty { display: none; }
.wn-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wn-actions:focus-within .wn-icon:focus-visible, .wn-profile:focus-visible, .wn-pill:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
/* "내 Drive" panel: dropdown card on PC */
.wn-panel { top: calc(100% + 8px); right: 0; width: min(400px, calc(100vw - 32px)); border: 1px solid #e2e8f0; border-radius: 24px; box-shadow: 0 20px 40px rgba(15, 23, 42, .15); padding: 16px 18px; text-align: left; }
.wn-panel .drive-sec h3 { font-size: 13px; font-weight: 700; color: #0f172a; margin: 6px 0 6px; }
.wn-panel .drive-btn { min-height: 36px; padding: 4px 14px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; color: #334155; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.wn-panel .drive-btn:hover:not(:disabled) { background: #f8fafc; }
.wn-panel #driveNickname { border: 1px solid #e2e8f0; border-radius: 12px; padding: 6px 10px; }
/* bottom-nav 더보기 dot */
.wn-dot { position: absolute; top: 2px; left: calc(50% + 8px); width: 9px; height: 9px; border: 2px solid #fff; border-radius: 999px; background: #ef4444; }
.wn-dot[hidden] { display: none; }
/* 더보기 modal: action row at the top (narrow screens) */
.wn-more-row:empty { display: none; }
.wn-more-row { margin-bottom: 24px; padding: 12px 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.wn-more-row .wn-actions { flex-wrap: wrap; }
.wn-more-row .wn-panel { position: static; width: 100%; margin-top: 12px; box-shadow: none; }
@media (max-width: 1023px) {
  .wn-head { margin: 4px 0 20px; }
  .wn-title { font-size: 20px; }
  .wn-sub { font-size: 12px; }
  .wn-notice { margin: -8px 0 12px; }
}

/* ---- Narrow screens: original Worknote mobile layout (compact-layout.mjs toggles body.wn-compact at <1024px) ---- */
#dateNav > .wn-c { display: none; }
body.wn-compact #appHeader, body.wn-compact .wn-toolbar-row { display: none !important; }
/* the app sets an inline display:flex on every render (and display:none in the memo view): keep the stacked card unless hidden */
body.wn-compact #dateNav:not([style*="none"]) { display: block !important; }
body.wn-compact #dateNav { margin-bottom: 12px; padding: 4px 12px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: none; text-align: left; }
body.wn-compact #dateNav > :not(.wn-c) { display: none; }
body.wn-compact #dateNav > .wn-date-top, body.wn-compact #dateNav > .wn-date-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
body.wn-compact #dateNav > .wn-date-top { border-bottom: 1px solid #e2e8f0; }
body.wn-compact #currentDateLabel { min-height: 44px; min-width: 0; padding: 6px 0; text-align: left; line-height: 1.35; font-size: 18px; font-weight: 600; color: #1e293b; }
.wn-date-arrows { display: flex; flex-shrink: 0; }
.wn-date-arrows button { display: flex !important; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0 !important; border-radius: 10px !important; }
.wn-date-arrows button:hover { background: #f1f5f9; }
.wn-date-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; padding: 6px 0; }
body.wn-compact #statNavContainer { min-height: 44px; padding: 6px 2px 6px 8px; gap: 4px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
body.wn-compact #statNavContainer svg { display: none; }
.wn-quick-btn { position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; min-height: 44px; margin-left: auto; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #64748b; cursor: pointer; }
.wn-quick-btn:hover, .wn-quick-btn[aria-expanded="true"] { background: #f1f5f9; color: #2563eb; }
.wn-quick-btn svg { width: 20px; height: 20px; }
.wn-quick-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; }
.wn-quick-dot[hidden] { display: none; }
body.wn-compact #dateNav > .wn-quick-panel { display: block; width: 100%; padding: 8px 0 6px; border-top: 1px solid #e2e8f0; }
body.wn-compact #dateNav > .wn-quick-panel[hidden] { display: none; }
.wn-quick-row { display: flex; align-items: center; gap: 8px; }
.wn-quick-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.wn-quick-panel #searchInput, .wn-quick-panel #statusFilter { min-height: 44px; border-radius: 12px; box-shadow: none; padding-top: 10px; padding-bottom: 10px; }
.wn-quick-panel #statusFilterContainer { width: auto; min-width: 112px; max-width: 50%; }
.wn-quick-btn:focus-visible, .wn-date-arrows button:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
#dateSwipeHint { margin: -4px 4px 12px; color: #64748b; font-size: 12px; line-height: 1.6; }
#dateSwipeHint[hidden] { display: none; }
body.wn-compact .wn-notice { margin: 0 0 8px; }

/* ---- Screen style + color tone (더보기). Set before first paint from localStorage:
   html[data-ui-style]  card (default) | minimal      -> shapes only
   html[data-ui-tone]   vivid (default) | calm        -> colors only
   card+vivid = the original colors with calmer shapes; card+calm and minimal+calm are the two neutral designs.
   Colors use the --app-* variables, so light and dark themes both work. ---- */

/* shapes: card (default) */
html:not([data-ui-style="minimal"]) #listView > .task-card { border-radius: 14px !important; box-shadow: none !important; }
html:not([data-ui-style="minimal"]) #listView .task-card h4 { font-weight: 600 !important; }
html:not([data-ui-style="minimal"]) #listView .task-card .animate-pulse { animation: none !important; }
html:not([data-ui-style="minimal"]) #listView .task-card > div.mt-2 { font-size: calc(11px * var(--app-font-scale, 1)) !important; font-weight: 600 !important; text-transform: none !important; }
html:not([data-ui-style="minimal"]) #dateNav { border-radius: 14px !important; box-shadow: none !important; }
html:not([data-ui-style="minimal"]) #calendarGrid { --calendar-corner-radius: 13px; border-radius: 14px !important; box-shadow: none !important; }
html:not([data-ui-style="minimal"]) #memoViewContainer > * { border-radius: 14px !important; box-shadow: none !important; }
html:not([data-ui-style="minimal"]) #app #searchInput, html:not([data-ui-style="minimal"]) #app #statusFilter, html:not([data-ui-style="minimal"]) #app #statNavContainer { border-radius: 12px !important; box-shadow: none !important; }
html:not([data-ui-style="minimal"]) #fab { border-radius: 16px !important; box-shadow: 0 4px 12px rgba(37, 99, 235, .25) !important; }
html:not([data-ui-style="minimal"]) #moreModal [class*="rounded-[1.5rem]"] { border-radius: 14px !important; box-shadow: none !important; }
html:not([data-ui-style="minimal"]) nav { box-shadow: none !important; }

/* shapes: minimal list */
html[data-ui-style="minimal"] body, html[data-ui-style="minimal"] #app { background: var(--app-surface) !important; }
html[data-ui-style="minimal"] #app .font-black { font-weight: 600 !important; }
html[data-ui-style="minimal"] #dateNav { background: transparent !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; border-radius: 0 !important; }
html[data-ui-style="minimal"] #dateNav .worknote-date-top, html[data-ui-style="minimal"] #dateNav .wn-date-top { border-bottom: 0 !important; }
html[data-ui-style="minimal"] #currentDateLabel { font-size: calc(22px * var(--app-font-scale, 1)) !important; font-weight: 600 !important; letter-spacing: -0.02em; color: var(--app-text-strong) !important; }
html[data-ui-style="minimal"] #app #statNavContainer { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html[data-ui-style="minimal"] #app #searchInput, html[data-ui-style="minimal"] #app #statusFilter { background: var(--app-surface-muted) !important; border: 0 !important; border-radius: 10px !important; box-shadow: none !important; }
html[data-ui-style="minimal"] #listView { border-top: 1px solid var(--app-border); }
html[data-ui-style="minimal"] #listView > .task-card { border: 0 !important; border-bottom: 1px solid var(--app-border) !important; border-radius: 0 !important; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; --tw-ring-color: transparent !important; padding: 14px 2px !important; margin: 0 !important; }
html[data-ui-style="minimal"] #listView > .task-card:is(.bg-white, .bg-slate-50) { background: transparent !important; }
html[data-ui-style="minimal"] #listView > .task-card + .task-card { margin-top: 0 !important; }
html[data-ui-style="minimal"] #listView .task-card h4 { font-weight: 500 !important; font-size: calc(15px * var(--app-font-scale, 1)) !important; color: var(--app-text-strong) !important; }
html[data-ui-style="minimal"] #listView .task-card .animate-pulse { animation: none !important; }
html[data-ui-style="minimal"] #listView .task-card > div.mt-2 { font-size: calc(12px * var(--app-font-scale, 1)) !important; font-weight: 400 !important; text-transform: none !important; gap: 10px !important; }
html[data-ui-style="minimal"] #calendarGrid { --calendar-corner-radius: 0px; border-radius: 0 !important; box-shadow: none !important; border: 0 !important; border-top: 1px solid var(--app-border) !important; border-bottom: 1px solid var(--app-border) !important; background: var(--app-border) !important; }
html[data-ui-style="minimal"] #calendarGrid > div { border-color: transparent !important; }
html[data-ui-style="minimal"] #memoViewContainer { gap: 0 !important; }
html[data-ui-style="minimal"] #memoViewContainer > * { border-radius: 0 !important; box-shadow: none !important; border: 0 !important; border-bottom: 1px solid var(--app-border) !important; background: transparent !important; }
html[data-ui-style="minimal"] #fab { box-shadow: none !important; width: 52px !important; height: 52px !important; }
html[data-ui-style="minimal"] nav { box-shadow: none !important; }
html[data-ui-style="minimal"] #moreModal [class*="rounded-[1.5rem]"] { border-radius: 0 !important; border: 0 !important; border-bottom: 1px solid var(--app-border) !important; box-shadow: none !important; margin-bottom: 0 !important; padding-left: 4px !important; padding-right: 4px !important; background: transparent !important; }

/* colors: calm (neutral) */
html[data-ui-tone="calm"] #listView .task-card [class*="from-amber-500"] { background: none !important; color: #b45309 !important; box-shadow: none !important; animation: none !important; padding: 0 !important; font-size: 11px !important; letter-spacing: 0 !important; text-transform: none !important; }
html[data-ui-tone="calm"] #listView .task-card [class*="from-amber-500"] svg { display: none; }
html[data-ui-tone="calm"] #listView .task-card > div.mt-2 { font-weight: 400 !important; color: var(--app-text-muted); gap: 10px !important; }
html[data-ui-tone="calm"] #listView .task-card > div.mt-2 > span.bg-slate-100 { background: none !important; padding: 0 !important; color: var(--app-text-soft) !important; }
html[data-ui-tone="calm"] #listView .task-card > div.mt-2 > span.text-yellow-500 { color: var(--app-border-strong) !important; letter-spacing: -1px; }
html[data-ui-tone="calm"] #listView .task-card > div.mt-2 > span.text-slate-400 { color: var(--app-text-muted) !important; }
html[data-ui-tone="calm"] #listView > .task-card[class*="border-amber"] { --tw-ring-color: transparent !important; }
html[data-ui-tone="calm"] #listView .task-card .shrink-0.self-start > span { border: 0 !important; }
html[data-ui-tone="calm"] #listView .task-card .done-stamp { display: none !important; }
html[data-ui-tone="calm"] #listView > .task-card[class*="bg-slate-300"] { background: var(--app-surface) !important; border-color: var(--app-border) !important; }
html[data-ui-tone="calm"][data-ui-style="minimal"] #listView > .task-card[class*="bg-slate-300"] { background: transparent !important; }
html[data-ui-tone="calm"] #listView .task-card[class*="bg-slate-300"] h4 { color: var(--app-text-soft) !important; text-decoration: line-through; }
html[data-ui-tone="calm"] #listView .task-card > div:first-child > button.rounded-full.bg-green-500:not(.worknote-completion) { background: var(--app-text-muted) !important; border-color: var(--app-text-muted) !important; }
html[data-ui-tone="calm"] #listView .task-card .worknote-completion[aria-pressed="true"]::before { background: var(--app-text-muted) !important; border-color: var(--app-text-muted) !important; }
@media (min-width: 1024px) { html[data-ui-tone="calm"] #listView .worknote-completion.bg-green-500 { background: var(--app-text-muted) !important; border-color: var(--app-text-muted) !important; } }
html[data-ui-tone="calm"] #todayBadge { background: transparent !important; border: 0 !important; padding: 0 !important; }
html[data-ui-tone="calm"] #app #statNavContainer { color: var(--app-text-muted) !important; background: transparent !important; border-color: transparent !important; }
html[data-ui-tone="calm"] #calendarGrid .today-cell { background: var(--app-surface-soft) !important; border: 0 !important; box-shadow: inset 0 0 0 1.5px var(--app-border-strong) !important; }
html[data-ui-tone="calm"][data-ui-style="minimal"] #calendarGrid .today-cell { box-shadow: inset 0 2px 0 var(--app-text-strong) !important; }
html[data-ui-tone="calm"] #calendarGrid .cal-item { border-color: var(--app-border) !important; }
html[data-ui-tone="calm"][data-ui-style="minimal"] #calendarGrid .cal-item { border: 0 !important; background: var(--app-surface-muted) !important; color: var(--app-text) !important; border-radius: 3px !important; }
html[data-ui-tone="calm"] #moreModal .rounded-full[class*="bg-"][class*="-50"] { background: var(--app-surface-muted) !important; color: var(--app-text-muted) !important; }
html[data-ui-tone="calm"][data-ui-style="minimal"] #moreModal .rounded-full[class*="bg-"][class*="-50"] { background: transparent !important; }
html[data-ui-tone="calm"][data-ui-style="minimal"] #fab { background: var(--app-text-strong) !important; color: var(--app-surface) !important; }
html[data-ui-tone="calm"][data-ui-style="minimal"] nav .mobile-nav-btn.text-blue-600 { color: var(--app-text-strong) !important; }

/* ---- Footer just above the bottom tab bar; 더보기 > 백업·복구 buttons ---- */
body { padding-bottom: var(--wn-nav-h, 96px) !important; }
#app { min-height: calc(100vh - var(--wn-nav-h, 96px)); min-height: calc(100dvh - var(--wn-nav-h, 96px)); padding-bottom: 92px !important; }
/* phones: left-aligned, clear of the + button on the right; wider screens: centered */
#appFooter.wn-footer { position: absolute; left: 0; right: 0; bottom: 12px; padding: 0 96px 0 16px; text-align: left; display: grid; gap: 2px; line-height: 1.45; letter-spacing: -0.01em; }
#appFooter.wn-footer p:first-child { font-size: 10.5px !important; }
#appFooter.wn-footer p:last-child { font-size: 11.5px !important; }
@media (min-width: 768px) { #appFooter.wn-footer { text-align: center; padding: 0 104px; letter-spacing: 0; } #appFooter.wn-footer p:first-child { font-size: 11px !important; } #appFooter.wn-footer p:last-child { font-size: 13px !important; } }
#appFooter.wn-footer p { text-wrap: balance; }
#appFooter.wn-footer p { margin: 0; }
.wn-data-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wn-data-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--app-border, #e2e8f0); background: var(--app-surface-muted, #f8fafc); color: var(--app-text, #334155); font-size: 13px; font-weight: 700; }
.wn-data-btn:hover { background: var(--app-surface-soft, #f1f5f9); }
.wn-data-btn:active { transform: scale(.97); }
#calendarSourcesLink { display: flex; width: fit-content; }

/* ---- 일정 등록 (task form): plainer and denser. Same markup and handlers; only shapes, sizes and the hint box change.
   Colors come from the --app-* theme variables, so light and dark both work. ---- */
#taskModal > div { border-radius: 20px !important; box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .25) !important; }
#taskModal > div > .overflow-y-auto { padding: 20px 20px 12px !important; }
#taskModal > div > .overflow-y-auto > * + * { margin-top: 14px !important; }
#taskModal > div > .overflow-y-auto > :first-child { padding-bottom: 0 !important; align-items: center !important; }
#taskModal #modalTitle { font-size: 18px !important; font-weight: 700 !important; letter-spacing: -0.01em; }
#taskModal #modalTitle + p { display: none !important; }   /* the shield explains itself on tap */
#taskModal > div > .overflow-y-auto > :first-child > button { padding: 6px !important; }
/* type switch (업무 / 행사) + shield + 저장 위치 on one row */
#taskTypeControlRow { flex-wrap: wrap; gap: 8px !important; }
#taskTypeControlRow > div:first-child { padding: 3px !important; gap: 2px !important; border-radius: 10px !important; background: var(--app-surface-muted, #f1f5f9) !important; }
#taskTypeControlRow label > div { padding: 6px 16px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 600 !important; box-shadow: none !important; }
#taskTypeControlRow input:checked + div { box-shadow: 0 1px 2px rgba(15, 23, 42, .12) !important; }
#taskEncryptionToggleBtn { height: 36px !important; width: 36px !important; border-radius: 10px !important; box-shadow: none !important; }
#taskEncryptionToggleBtn svg { width: 18px !important; height: 18px !important; }
#taskScopePanel { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
#taskScopePanel select { height: 36px; max-width: 150px; padding: 0 28px 0 10px !important; border-radius: 10px !important; font-size: 13px !important; font-weight: 600 !important; }
/* the long blue hint box becomes one quiet line */
#taskTypeHint { background: transparent !important; border: 0 !important; padding: 0 2px !important; margin-top: 8px !important; font-size: 12px !important; font-weight: 500 !important; line-height: 1.5 !important; color: var(--app-text-muted, #64748b) !important; }
/* labels and fields */
#taskModal label[class*="text-[10px]"] { font-size: 12px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--app-text-muted, #64748b) !important; margin: 0 0 4px 2px !important; }
#taskModal :is(input[type="date"], input[type="time"], input[type="text"], select, textarea):not(.sr-only) {
  border-radius: 10px !important; border: 1px solid var(--app-border, #e2e8f0) !important; background: var(--app-surface, #fff) !important;
  font-size: 14px !important; font-weight: 500 !important; box-shadow: none !important; }
#taskModal :is(input[type="date"], input[type="time"], select) { min-height: 42px; padding: 0 10px !important; }
#taskModal #titleInput { font-size: 16px !important; padding: 11px 14px !important; }
#taskModal #memoInput, #taskModal #tagsInput { display: block; padding: 10px 14px !important; }
#taskModal #memoInput { min-height: 72px; }
#taskModal :is(input, select, textarea):focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15) !important; outline: none !important; }
#taskModal #dDayContainer p { font-size: 11px !important; margin-top: 4px !important; }
#taskModal .ai-draft-button { border-radius: 10px !important; box-shadow: none !important; min-width: 0 !important; padding: 0 14px !important; font-weight: 600 !important; }
#taskModal #repeatContainer { margin-top: 14px !important; gap: 8px !important; }
#taskModal .grid.grid-cols-3 { gap: 8px !important; }
#taskModal .color-btn { width: 28px !important; height: 28px !important; }
#taskModal .custom-day-cb + div { border-radius: 8px !important; }
/* footer */
#taskModal > div > div.shrink-0 { padding: 12px 20px 16px !important; gap: 8px !important; background: var(--app-surface, #fff) !important; border-top: 1px solid var(--app-border, #e2e8f0); }
#taskModal > div > div.shrink-0 > button { padding: 12px 0 !important; border-radius: 12px !important; font-size: 15px !important; font-weight: 600 !important; box-shadow: none !important; }
