/* privat 전용 덧칠. CASINO IN 디자인(dashboard.css)은 그대로 두고, 로고 이미지
   대신 쓰는 워드마크와 상단 바 로그아웃 버튼만 정의한다. */
.privat-brand {
  font-family: 'Trap', var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--brand-text-primary);
}
.privat-logout-form {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.privat-user {
  color: var(--brand-text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.privat-logout-form .topbar-account-link {
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm);
}
@media (max-width: 480px) {
  .privat-user { display: none; }
}
/* 홈: 다가오는 일정 / 긴급한 일정 / 최근 다이어리 세 칸. */
.mydesk-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
/* 최근 다이어리: 자기 키는 최소 3개 몫만 차지하고, 줄 높이(옆 카드)만큼 남은 자리에 더 보인다.
   넘치는 줄은 js/home-fill.js 가 숨긴다(스크립트가 없으면 잘린 채로 보인다). */
.mydesk-fill { flex: 1 1 0; min-height: 11.5rem; overflow: hidden; }
.mydesk-fill li.is-last-visible { border-bottom: 0; }
/* 홈 '최근 메일' - 뒤에 끼워 넣는 칸도 목록과 같이 남는 높이를 채운다 */
.desk-home-mail-box { display: flex; flex: 1 1 0; flex-direction: column; min-height: 11.5rem; }
.desk-home-mail li.is-unread strong { font-weight: 800; }
.desk-home-mail li.is-unread .mydesk-row-ico { color: var(--text-accent, var(--brand-accent)); }
.mydesk-panel { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--brand-border); border-radius: var(--radius-lg); background: var(--brand-surface); }
/* 홈 아래 세 카드 - pricing-16 모양: 아이콘 + 제목 · 설명, 위아래 선 사이 큰 숫자, 맨 아래 꽉 찬 버튼 */
.desk-hcard-head { display: flex; align-items: flex-start; gap: 12px; }
.desk-hcard-ico { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); }
.desk-hcard-head h2 { margin: 1px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.desk-hcard-head p { margin: 3px 0 0; color: var(--brand-text-muted); font-size: var(--text-xs); }
.desk-hcard-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin: 18px 0 6px; }
.desk-hcard-stat strong { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.desk-hcard-stat span { color: var(--brand-text-muted); font-size: var(--text-sm); }
.desk-today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 26px; }
.desk-today-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--brand-border); border-radius: 14px; background: var(--brand-surface); color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; min-width: 0; }
.desk-today-tile:hover, .desk-today-tile:focus-visible { border-color: var(--brand-accent); transform: translateY(-1px); text-decoration: none; }
.desk-today-ico { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--brand-surface-muted, rgba(127,127,127,.1)); color: var(--brand-text-secondary); }
.desk-today-tile.has-count .desk-today-ico { color: var(--text-accent, var(--brand-accent)); }
.desk-today-text { display: flex; flex-direction: column; min-width: 0; }
.desk-today-text small { color: var(--brand-text-secondary); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-today-text strong { font-size: 22px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.desk-today-tile em { margin-left: auto; color: var(--brand-text-muted); font-size: var(--text-xs); font-style: normal; white-space: nowrap; }
/* 761~960px 에서 네 칸이면 칸이 175~200px 라 오른쪽 보조 글자('지난 마감 4')에 밀려 이름이 '오늘 …' 으로
   잘렸다 - 960px 까지 두 칸으로(전수조사 2026-11-07).  보조 글자는 칸이 더 좁아지는 760px 아래에서만 숨긴다. */
@media (max-width: 960px) { .desk-today { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .desk-today-tile em { display: none; } }
.desk-hcard-num { display: inline-flex; align-items: baseline; gap: 4px 6px; color: inherit; text-decoration: none; border-radius: 8px; transition: color .15s ease; }
.desk-hcard-num:hover, .desk-hcard-num:focus-visible { text-decoration: none; }
.desk-hcard-num:hover strong, .desk-hcard-num:focus-visible strong { color: var(--text-accent, var(--brand-accent)); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.desk-hcard-stat small { margin-left: auto; color: var(--brand-text-secondary); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.mydesk-row-ico { display: inline-grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); }
.mydesk-row-ico.is-overdue { background: color-mix(in srgb, var(--brand-danger) 12%, var(--brand-surface)); color: var(--brand-danger); }
.desk-hcard .mydesk-list a { flex: 1 1 auto; }
.desk-hcard-cta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto; padding: 10px 14px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-surface); color: var(--brand-text-primary); font-size: var(--text-sm); font-weight: 600; text-decoration: none; transition: background-color .15s, border-color .15s; }
.desk-hcard-cta:hover { border-color: var(--card-edge-strong, var(--brand-border)); background: var(--brand-surface-muted); }
.desk-hcard-cta.is-solid { border-color: var(--brand-text-primary); background: var(--brand-text-primary); color: var(--brand-surface); }
.desk-hcard-cta.is-solid:hover { opacity: .88; background: var(--brand-text-primary); }
.desk-hcard .mydesk-list + .desk-hcard-cta, .desk-hcard .mydesk-empty + .desk-hcard-cta { margin-top: auto; }
.desk-hcard > .mydesk-list, .desk-hcard > .mydesk-empty { margin-bottom: 16px; }
.desk-hcard.is-urgent .desk-hcard-ico { border-color: color-mix(in srgb, var(--brand-danger) 30%, var(--brand-border)); background: color-mix(in srgb, var(--brand-danger) 10%, var(--brand-surface)); color: var(--brand-danger); }
.desk-hcard.is-urgent .card-badge { background: var(--brand-danger); color: #fff; }
.mydesk-list { list-style: none; margin: 0; padding: 0; }
.mydesk-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--brand-border); }
.mydesk-list li:last-child { border-bottom: 0; }
.mydesk-list a { display: grid; gap: 3px; min-width: 0; color: inherit; text-decoration: none; }
.mydesk-list a:hover strong { color: var(--text-accent, var(--brand-accent)); }
.mydesk-list strong { overflow: hidden; font-size: var(--text-sm); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mydesk-list small { color: var(--brand-text-muted); font-size: var(--text-xs); }
.mydesk-due { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mydesk-due.is-today { background: color-mix(in srgb, var(--brand-highlight) 14%, var(--brand-surface)); color: var(--text-accent, var(--brand-highlight)); }
.mydesk-due.is-overdue { background: color-mix(in srgb, var(--brand-danger) 12%, var(--brand-surface)); color: var(--brand-danger); }
.mydesk-priority.is-urgent { color: var(--brand-danger); font-weight: 700; }
.mydesk-priority.is-high { color: var(--text-accent, var(--brand-highlight)); font-weight: 700; }
.mydesk-empty { margin: 12px 0; color: var(--brand-text-muted); font-size: var(--text-sm); }
@media (max-width: 980px) { .mydesk-home-grid { grid-template-columns: 1fr; } }

/* ---- MyDesk 색: 파랑 #0033FF (2026-11-12, 예전 인디고 #3d5bc9 · #4c6ef5) - shadcn/ui 팔레트, radius 0.5rem ----
   dashboard.css 의 CASINO IN 토큰을 이 파일에서만 덮는다.  원본 CSS 는 그대로
   두므로 CASINO IN 디자인을 다시 옮겨 와도 색은 여기 한 곳에서 정해진다. */
:root {
  --mydesk-primary: #0033ff;
  --mydesk-primary-hover: #0029cc;
  --mydesk-primary-rgb: 0, 51, 255;
  --mydesk-accent: #e5ebff;
  --mydesk-destructive: #e11d2a;
  /* 강조색(--brand-accent) 바탕 위 글자색 - 라이트 · 다크 모두 #0033FF 라 흰 글자(7:1).  단추마다 다크 덮어쓰기를 두던 것을
     이 하나로(전수조사 2026-11-07).  2026-11-12 사용자 지시로 다크도 같은 #0033FF(예전 #8ea3f0). */
  --brand-on-accent: #ffffff;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.5rem;
  --ui-radius: 0.5rem;
  --ui-option-radius: 0.375rem;
}
html[data-theme="light"] {
  --brand-bg: #fafafa;
  --brand-surface: #ffffff;
  --brand-surface-elevated: #ffffff;
  --brand-surface-muted: #f5f5f5;
  --brand-text-primary: #171717;
  --brand-text-secondary: #525252;
  --brand-text-muted: #737373;
  --brand-border: #e5e5e5;
  --brand-border-strong: #d4d4d4;
  --brand-accent: var(--mydesk-primary);
  --brand-accent-hover: var(--mydesk-primary-hover);
  --brand-highlight: var(--mydesk-primary);
  --brand-highlight-rgb: var(--mydesk-primary-rgb);
  --brand-danger: var(--mydesk-destructive);
  --ui-primary-foreground: #ffffff;
  --ui-accent: var(--mydesk-accent);
  --focus-ring: 0 0 0 3px rgba(var(--mydesk-primary-rgb), 0.25);
}
/* dashboard.css 가 밝은 테마 배경을 !important 흰색으로 박아 두었다. */
html[data-theme="light"],
html[data-theme="light"] body {
  background: #fafafa !important;
  color: #171717 !important;
}
/* 어두운 화면도 강조색은 라이트와 같은 #0033FF(사용자 지시 2026-11-12). */
html[data-theme="dark"] {
  --mydesk-accent: color-mix(in srgb, var(--brand-highlight, #0033ff) 22%, var(--brand-surface, #18181b));   /* 활성 탭이 라이트 하늘색 그대로였다 */
  --brand-accent: #0033ff;
  --brand-accent-hover: #2952ff;
  --brand-on-accent: #ffffff;
  --brand-highlight: #0033ff;
  --brand-highlight-rgb: 0, 51, 255;
  --focus-ring: 0 0 0 3px rgba(0, 51, 255, 0.45);
  /* 어두운 화면의 글자는 모두 흰색(2026-11-17 사용자 '다크모드일 때 글자색 어두운색 말고 다 흰색으로').
     회색 보조 글자(#a1a1aa · #8a8a93)와 파란 강조 글자(#0033FF, 어두운 바탕에서 잘 안 보였다)를 흰색으로.
     강조색을 글자색으로 쓰는 곳은 color: var(--text-accent, var(--brand-accent)) - 밝은 화면에는 이 값이 없어 예전 그대로. */
  --brand-text-primary: #ffffff;
  --brand-text-secondary: #ffffff;
  --brand-text-muted: #ffffff;
  --text-accent: #ffffff;
  --ui-primary-foreground: #ffffff;   /* 파란 단추 위 글자가 검은색(--brand-bg)이었다 */
}
.privat-brand { color: var(--text-accent, var(--brand-accent)); }

/* ---- 상단 메뉴 (포켓몬허브 섬 메뉴 크기) ----
   떠 있는 알약 막대 + 알약형 링크.  메뉴는 늘 보인다.
   카드는 내용(로고 · 메뉴 · 단추)만큼만 넓고 가운데에 뜬다 - 화면을 꽉 채우면 너무 길다.
   내용이 화면보다 길면 화면 폭에서 멈추고 메뉴가 옆으로 밀린다. */
.mydesk-nav-wrap { position: sticky; top: 0; z-index: 45; display: flex; justify-content: center; padding: 12px var(--shell-gutter) 14px; }
/* 잘라내기(overflow) · 흐림(backdrop-filter)을 막대 자신에 걸지 않는다 - 둘 다 안에 든 알림 종의
   숫자 뱃지와 아래로 펼치는 목록(position:fixed)을 막대 안에 가두어 잘리거나 안 보이게 만든다.
   반투명 유리는 뒤에 깐 ::before 가 맡는다. */
.mydesk-nav { position: relative; isolation: isolate; width: auto; min-width: 0; max-width: min(100%, var(--shell-max)); border: 1px solid color-mix(in srgb, var(--brand-border) 70%, transparent); border-radius: 999px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05); }
.mydesk-nav::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: color-mix(in srgb, var(--brand-surface) 92%, transparent); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
html[data-theme="dark"] .mydesk-nav { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); }
html[data-theme="dark"] .mydesk-nav::before { background: color-mix(in srgb, var(--brand-surface) 82%, transparent); }
.mydesk-nav-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; }
/* AllDock 로고(상자 + ALL DOCK 글자, 2026-11-07 사용자가 준 그림).  글자가 로고 안에 있어 따로 쓰지 않는다.
   alldock-mark.svg 를 가면(mask)으로 써서 글자색(currentColor)을 따라간다 -
   라이트 · 다크 그림을 두 벌 두지 않는다.  글자는 로고와 같은 기하 산세리프(Montserrat)에 넓은 자간. */
@font-face { font-family: 'MyDesk Montserrat'; src: url('../fonts/Montserrat-Variable-Latin.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; }
.mydesk-nav-logo { display: inline-flex; flex: none; align-items: center; gap: 10px; color: var(--brand-text-primary); text-decoration: none; }
.mydesk-nav-logo:hover { text-decoration: none; }
.mydesk-mark { display: block; flex: none; width: 46px; height: 38px; background: currentColor; -webkit-mask: url('../img/alldock-mark.svg?v=c8397c15') center / contain no-repeat; mask: url('../img/alldock-mark.svg?v=c8397c15') center / contain no-repeat; }
/* 태블릿 · 휴대폰(☰ 메뉴 폭)에서는 막대가 좁으니 로고를 조금 줄인다. */
@media (max-width: 1023px) { .mydesk-mark { width: 40px; height: 33px; } }
/* 메뉴는 로고 · 단추와 같은 한 줄에 둔다.  다 안 들어가면 줄을 바꾸지 않고 이 칸 안에서
   옆으로 밀어 본다 - 스크롤 막대는 숨기고, 더 있는 쪽 끝을 흐리게 한다(desk-nav.js 가 표시).
   양 끝 auto 여백: 자리가 남으면 가운데, 넘치면 0 이 돼 첫 메뉴까지 밀 수 있다
   (justify-content: center 는 넘칠 때 앞쪽이 잘려 닿지 않는다). */
.mydesk-nav-links { display: flex; flex: 1 1 auto; flex-wrap: nowrap; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scroll-padding-inline: 40px; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mydesk-nav-links::-webkit-scrollbar { display: none; }
/* 초점 고리는 알약 안쪽에 - 옆 스크롤 칸 가장자리에서 잘리지 않게.  scroll-padding(40px)은
   Tab 으로 옮긴 메뉴가 흐린 끝(32px) 밑에 깔리지 않게 한다. */
.mydesk-nav-links a:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -2px; }
.mydesk-nav-links > a { flex: none; }
.mydesk-nav-links > a:first-child { margin-left: auto; }
.mydesk-nav-links > a:last-child { margin-right: auto; }
.mydesk-nav-links.is-fade-start { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px); mask-image: linear-gradient(to right, transparent 0, #000 32px); }
.mydesk-nav-links.is-fade-end { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 32px); mask-image: linear-gradient(to left, transparent 0, #000 32px); }
.mydesk-nav-links.is-fade-start.is-fade-end { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); }
.mydesk-nav-links a { padding: 8px 13px; border-radius: 999px; color: var(--brand-text-secondary); font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; transition: background-color var(--transition-fast), color var(--transition-fast); }
.mydesk-nav-links a:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); text-decoration: none; }
.mydesk-nav-links a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-weight: 600; }
html[data-theme="dark"] .mydesk-nav-links a.is-active { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
.mydesk-nav-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.mydesk-nav-actions form { margin: 0; }
/* 빠른 수집 · 알림 종이 아직 없으면 빈 칸이 줄 간격만 먹는다 */
.mydesk-nav-actions:not(:has(*)) { display: none; }
.mydesk-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-primary); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--transition-fast), border-color var(--transition-fast); }
.mydesk-pill:hover { background: color-mix(in srgb, var(--brand-text-primary) 6%, var(--brand-surface-muted)); text-decoration: none; }
.mydesk-pill.is-primary { border-color: transparent; background: var(--brand-accent); color: var(--brand-on-accent); }
.mydesk-pill.is-primary:hover { background: var(--brand-accent-hover); }
.mydesk-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 좁은 화면: 줄은 그대로 하나 - 넘치는 메뉴는 옆으로 민다. */
@media (max-width: 640px) {
  .mydesk-nav-wrap { padding: 10px 12px; }
  .mydesk-nav-row { gap: 6px; padding: 5px 5px 5px 14px; }
  .mydesk-nav-actions { gap: 6px; }
  .mydesk-nav-actions .mydesk-pill { padding: 8px 10px; }
  .mydesk-pill-label { display: none; }
  .mydesk-nav-links a { padding: 7px 11px; font-size: 13px; }
}


/* '개인' 펼침 메뉴: 줄 메뉴의 단추는 링크와 같은 알약 모양, 목록은 헤더 아래 떠 있는 판(위치는 desk-nav.js) */
.mydesk-nav-links > .mydesk-nav-group { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 8px 11px 8px 13px; border: 0; border-radius: 999px; background: none; color: var(--brand-text-secondary); font: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast); }
.mydesk-nav-links > .mydesk-nav-group:hover, .mydesk-nav-links > .mydesk-nav-group[aria-expanded="true"] { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
.mydesk-nav-links > .mydesk-nav-group.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); }
html[data-theme="dark"] .mydesk-nav-links > .mydesk-nav-group.is-active { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
.mydesk-nav-links > .mydesk-nav-group:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -2px; }
.mydesk-nav-group .mydesk-nav-ico { opacity: .78; }
.mydesk-nav-group.is-active .mydesk-nav-ico, .mydesk-nav-group:hover .mydesk-nav-ico { opacity: 1; }
.mydesk-nav-chev { flex: none; width: 14px; height: 14px; opacity: .6; transition: transform .2s ease; }
.mydesk-nav-group[aria-expanded="true"] .mydesk-nav-chev { transform: rotate(180deg); }
.mydesk-nav-menu:not([hidden]) { position: absolute; z-index: 60; display: grid; gap: 2px; min-width: 190px; padding: 6px; border: 1px solid color-mix(in srgb, var(--brand-border) 70%, transparent); border-radius: 18px; background: var(--brand-surface); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.18); animation: mydesk-nav-panel-in .16s ease-out; }
html[data-theme="dark"] .mydesk-nav-menu:not([hidden]) { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6); }
.mydesk-nav-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--brand-text-secondary); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mydesk-nav-menu a:hover, .mydesk-nav-menu a:focus-visible { background: var(--brand-surface-muted); color: var(--brand-text-primary); text-decoration: none; outline: none; }
.mydesk-nav-menu a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); }
html[data-theme="dark"] .mydesk-nav-menu a.is-active { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
.mydesk-nav-menu .mydesk-nav-ico { width: 16px; height: 16px; opacity: .8; }
@media (max-width: 1023px) { .mydesk-nav-menu { display: none !important; } }
/* ☰ 목록 안의 '개인' 묶음 */
.mydesk-nav-panel-group { display: flex; align-items: center; gap: 8px; margin: 8px 14px 2px; color: var(--brand-text-muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.mydesk-nav-panel-group svg { width: 14px; height: 14px; }
.mydesk-nav-panel a.is-sub { padding-left: 28px; }

/* 휴대폰 · 태블릿 ☰ 메뉴: 줄 메뉴 대신 단추를 누르면 막대 아래로 세로 목록이 펼쳐진다.
   1023px 까지 쓴다 - 줄 메뉴는 약 920px(메일 있는 관리자)이 필요해서 641~1023 에서는 숨은 옆 스크롤에
   '업무 연락망' · '개인' · '링크' 가 잘려 안 보였다(PC 프로그램 최소 창 900px 도 여기, 전수조사 2026-11-07). */
.mydesk-nav-toggle { display: none; }
.mydesk-nav-panel { display: none; }
@media (max-width: 1023px) {
  .mydesk-nav { width: 100%; }
  .mydesk-nav-row { justify-content: space-between; }
  .mydesk-nav-row > .mydesk-nav-links { display: none; }
  .mydesk-nav-toggle { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid color-mix(in srgb, var(--brand-border) 80%, transparent); border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-primary); cursor: pointer; }
  .mydesk-nav-toggle:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
  .mydesk-nav-toggle .mydesk-nav-toggle-close, .mydesk-nav-toggle[aria-expanded="true"] .mydesk-nav-toggle-open { display: none; }
  .mydesk-nav-toggle[aria-expanded="true"] .mydesk-nav-toggle-close { display: block; }
  .mydesk-nav-panel:not([hidden]) { position: absolute; top: calc(100% - 6px); left: 12px; right: 12px; display: grid; gap: 2px; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 8px; border: 1px solid color-mix(in srgb, var(--brand-border) 70%, transparent); border-radius: 22px; background: var(--brand-surface); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.18); animation: mydesk-nav-panel-in .18s ease-out; }
  html[data-theme="dark"] .mydesk-nav-panel:not([hidden]) { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6); }
  .mydesk-nav-panel a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--brand-text-secondary); font-size: 15px; font-weight: 600; text-decoration: none; }
  .mydesk-nav-panel a:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); text-decoration: none; }
  .mydesk-nav-panel a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); }
  html[data-theme="dark"] .mydesk-nav-panel a.is-active { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
  .mydesk-nav-panel a:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -2px; }
  .mydesk-nav-panel .mydesk-nav-ico { width: 18px; height: 18px; }
}
/* 태블릿 폭(641~1023)에서는 목록을 화면 폭 전체로 펴지 않고 ☰ 아래 오른쪽에 메뉴 판 크기로 띄운다 */
@media (min-width: 641px) and (max-width: 1023px) {
  .mydesk-nav-panel:not([hidden]) { left: auto; right: var(--shell-gutter); width: min(340px, calc(100% - 2 * var(--shell-gutter))); }
}
@keyframes mydesk-nav-panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }


/* ---- 로그인 화면 (modern-login-signup 모양) ----
   테마와 관계없이 검은 화면이다. */
html:has(body.mydesk-login-body), body.mydesk-login-body { overflow: hidden; background: #000 !important; color: #fff !important; }
body.mydesk-login-body .scroll-edge-button { display: none !important; }
.mydesk-login { position: fixed; inset: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; overflow: hidden; background: #000; color: #fff; }
.mydesk-login-dots { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.mydesk-login-vignette { position: fixed; inset: 0; z-index: 1; background: radial-gradient(circle at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%); pointer-events: none; }
/* 로그인 · 가입 화면 왼쪽 위 '← AllDock 소개'(www.alldock.kr 첫 화면으로, 2026-11-07) */
/* fixed 였을 때는 카드(안쪽 .mydesk-login 이 굴러간다)를 내리면 알약이 제자리에 떠서 가입 '아이디' 칸 · 로그인
   로고를 덮었다 - absolute 면 스크롤 상자 기준이라 내용과 같이 올라간다(전수조사 2026-11-07). */
.mydesk-login-back { position: absolute; z-index: 3; top: 18px; left: 18px; padding: 8px 14px; border: 1px solid #2a2a2a; border-radius: 999px; background: rgba(18, 18, 18, 0.8); color: #ddd !important; font-size: 13px; font-weight: 600; text-decoration: none; }
.mydesk-login-back:hover { color: #fff !important; border-color: #555; }
html[data-theme="light"] .mydesk-login-back { background: rgba(255, 255, 255, 0.85); color: #333 !important; border-color: #ddd; }
/* 가입 · 첫 설정처럼 긴 카드는 화면보다 길다 - 가운데 맞춤이 위를 잘라 먹지 않게, 그리고 굴러가게 */
.mydesk-login:has(.mydesk-login-card.is-wide) { overflow-y: auto; align-items: flex-start; }
.mydesk-login-card.is-wide { margin: auto 0; }
@media (max-width: 760px) { .mydesk-login { padding-top: 64px; } }
/* 휴대폰: 오른쪽 아래 설정 단추(40px) 몫만큼 아래 여백 - 맨 아래 '둘러보기' · '로그인' 링크를 끝까지 내리면 단추 위로 나온다 */
@media (max-width: 640px) { .mydesk-login { padding-bottom: 72px; } }
.mydesk-login-card { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: 0.65rem; width: 100%; max-width: 400px; padding: 2rem; border: 1px solid #222; border-radius: 12px; background: #121212; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); text-align: center; }
/* 로그인 로고 = AllDock 로고 통째(글자가 들어 있어 제목은 '로그인' 만 - 이름이 겹치지 않게, 2026-11-07).
   흰색이고, 라이트 테마에서는 아래 invert 로 검게. */
.mydesk-login-logo { display: block; align-self: center; width: 132px; height: 108px; margin: 0.25rem 0 0.9rem; background: #fff; -webkit-mask: url('../img/alldock-mark.svg?v=c8397c15') center / contain no-repeat; mask: url('../img/alldock-mark.svg?v=c8397c15') center / contain no-repeat; }
.mydesk-login-card h1 { margin: 0; color: #fff; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.025em; }
.mydesk-login-lead { margin: 0 0 0.35rem; color: #888; font-size: 0.85rem; line-height: 1.5; }
body.mydesk-login-body .mydesk-login-input { background: #000 !important; border-color: #333 !important; color: #fff !important; box-shadow: none !important; -webkit-text-fill-color: #fff; }
body.mydesk-login-body .mydesk-login-input:focus { border-color: #666 !important; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important; }
body.mydesk-login-body .mydesk-login-input:focus-visible { outline: none !important; }
body.mydesk-login-body .mydesk-login-input::placeholder { color: #666 !important; -webkit-text-fill-color: #666; }
body.mydesk-login-body .mydesk-login-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #000 inset !important; }
.mydesk-login-input { width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #333; border-radius: 6px; background: #000; color: #fff; font: inherit; font-size: 0.875rem; outline: none; transition: border-color 120ms ease, box-shadow 120ms ease; }
.mydesk-login-input::placeholder { color: #666; }
.mydesk-login-input:focus { border-color: #666; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
.mydesk-login-submit { width: 100%; padding: 0.65rem; border: 0; border-radius: 6px; background: #ededed; color: #000; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background-color 120ms ease; }
.mydesk-login-submit:hover { background: #fff; }
.mydesk-login-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mydesk-login-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.6rem; border: 1px solid #333; border-radius: 6px; background: transparent; color: #ededed; font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease; }
.mydesk-login-passkey:hover { border-color: #666; background: #1a1a1a; }
.mydesk-login-passkey:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mydesk-login-passkey:disabled { opacity: 0.6; cursor: progress; }
.mydesk-login-passkey-message { margin: 0; color: #888; font-size: 0.78rem; line-height: 1.5; }
.mydesk-login-passkey-message:empty { display: none; }
.mydesk-login-passkey-message.is-error { color: #ff8a80; }
.mydesk-login-rule { height: 1px; margin: 0.35rem 0; background: #222; }
.mydesk-login-foot { margin: 0; color: #8a8a8a; font-size: 0.75rem; line-height: 1.6; }   /* #666 은 다크 카드(#121212) 위 3.26:1(전수조사 2026-11-07) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.mydesk-pill.is-danger { border-color: transparent; background: color-mix(in srgb, var(--brand-danger) 10%, var(--brand-surface)); color: var(--brand-danger); }
.mydesk-pill.is-danger:hover { background: color-mix(in srgb, var(--brand-danger) 18%, var(--brand-surface)); }

/* ---- 보관함 (포켓몬허브 개인보관함 모양을 Indigo Mono 에 맞췄다) ---- */
.vault-page { padding-bottom: 48px; }
.vault-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vault-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.vault-view-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); }
.vault-view-switch a { padding: 6px 14px; border-radius: 999px; color: var(--brand-text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; }
.vault-view-switch a:hover { color: var(--brand-text-primary); text-decoration: none; }
.vault-view-switch a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-weight: 600; }
.vault-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vault-filter input[type="search"], .vault-filter select { height: 38px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: var(--radius-md); background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; font-size: 14px; }
.vault-filter input[type="search"] { width: min(320px, 70vw); }
.vault-reset { color: var(--brand-text-muted); font-size: 13px; }
.vault-count { margin: 0 0 12px; color: var(--brand-text-muted); font-size: var(--text-xs); }
.vault-memo { --memo-bg: #fff8d6; --memo-line: #f2dd85; --memo-tint: #f2dd85; }
.vault-memo.is-blue, .vault-gallery-card.is-blue, .vault-detail.is-blue, .vault-list .is-blue { --memo-bg: #e3ecfb; --memo-line: #b6c9f0; --memo-tint: #b6c9f0; }
.vault-memo.is-green, .vault-gallery-card.is-green, .vault-detail.is-green, .vault-list .is-green { --memo-bg: #e2f5e8; --memo-line: #a9dcb9; --memo-tint: #a9dcb9; }
.vault-memo.is-pink, .vault-gallery-card.is-pink, .vault-detail.is-pink, .vault-list .is-pink { --memo-bg: #fde7ef; --memo-line: #f3b8cc; --memo-tint: #f3b8cc; }
.vault-memo.is-purple, .vault-gallery-card.is-purple, .vault-detail.is-purple, .vault-list .is-purple { --memo-bg: #eee7fb; --memo-line: #cdbcf0; --memo-tint: #cdbcf0; }
.vault-memo.is-gray, .vault-gallery-card.is-gray, .vault-detail.is-gray, .vault-list .is-gray { --memo-bg: #f1f1f1; --memo-line: #d6d6d6; --memo-tint: #d6d6d6; }
.vault-gallery-card.is-yellow, .vault-detail.is-yellow, .vault-list .is-yellow { --memo-bg: #fff8d6; --memo-line: #f2dd85; --memo-tint: #f2dd85; }
/* 다크: 원본 색(--memo-tint)에서 계산한다 - 예전엔 --memo-line 이 자기 자신을 참조해 둘 다 무효가 돼 메모 카드의 배경 · 테두리 · 상세의 색 띠가 통째로 사라졌다(전수조사 2026-11-07) */
html[data-theme="dark"] .vault-memo, html[data-theme="dark"] .vault-gallery-card, html[data-theme="dark"] .vault-detail, html[data-theme="dark"] .vault-list li { --memo-bg: color-mix(in srgb, var(--memo-tint, #d6d6d6) 14%, var(--brand-surface)); --memo-line: color-mix(in srgb, var(--memo-tint, #d6d6d6) 45%, var(--brand-border)); }
.vault-memo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.vault-memo { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-height: 360px; padding: 16px; border: 1px solid var(--memo-line); border-radius: var(--radius-lg); background: var(--memo-bg); color: #262626; overflow: hidden; }
html[data-theme="dark"] .vault-memo { color: var(--brand-text-primary); }
.vault-memo.is-pinned { box-shadow: 0 0 0 2px var(--brand-accent); }
.vault-memo header { display: flex; justify-content: space-between; gap: 8px; color: color-mix(in srgb, currentColor 60%, transparent); font-size: 12px; font-weight: 600; }
.vault-memo h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.vault-memo h2 a { color: inherit; text-decoration: none; }
.vault-memo h2 a:hover { text-decoration: underline; }
.vault-memo-body { min-height: 0; overflow: hidden; font-size: 13px; line-height: 1.6; mask-image: linear-gradient(to bottom, #000 70%, transparent); }
.vault-memo-body img { max-width: 100%; height: auto; border-radius: 6px; }
.vault-memo-body > :first-child { margin-top: 0; }
.vault-memo footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.vault-memo footer form { margin: 0 0 0 auto; }
.vault-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vault-tags a { color: var(--text-accent, var(--brand-accent)); font-size: 12px; font-weight: 600; text-decoration: none; }
.vault-tags a:hover { text-decoration: underline; }
.vault-link-btn { padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: color-mix(in srgb, currentColor 65%, transparent); font: inherit; font-size: 12px; cursor: pointer; }
.vault-link-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.vault-pin { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--brand-accent); vertical-align: middle; }
.vault-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.vault-gallery-card { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--brand-border); border-radius: var(--radius-lg); background: var(--brand-surface); color: inherit; text-decoration: none; }
.vault-gallery-card:hover { border-color: var(--brand-accent); text-decoration: none; }
.vault-gallery-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--memo-bg, var(--brand-surface-muted)); }
.vault-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vault-gallery-thumb b { color: color-mix(in srgb, var(--brand-text-primary) 45%, transparent); font-size: 12px; letter-spacing: 0.2em; }
.vault-gallery-card strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.vault-gallery-card small, .vault-list time { color: var(--brand-text-muted); font-size: 12px; }
.vault-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--brand-border); border-radius: var(--radius-lg); background: var(--brand-surface); }
.vault-list li + li { border-top: 1px solid var(--brand-border); }
.vault-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; }
.vault-list a:hover { background: var(--brand-surface-muted); text-decoration: none; }
.vault-dot { flex: none; width: 10px; height: 10px; border: 1px solid var(--memo-line); border-radius: 50%; background: var(--memo-bg); }
.vault-list-main { display: grid; flex: 1; gap: 2px; min-width: 0; }
.vault-list-main strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.vault-list-main small { overflow: hidden; color: var(--brand-text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vault-list-side { display: flex; flex: none; align-items: center; gap: 6px; }
.vault-pill { padding: 2px 8px; border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); font-size: 11px; }
.vault-pager { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.vault-pager a { min-width: 34px; padding: 6px 10px; border-radius: 999px; color: var(--brand-text-secondary); text-align: center; text-decoration: none; }
.vault-pager a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-weight: 700; }
.vault-empty { padding: 56px 20px; border: 1px dashed var(--brand-border-strong); border-radius: var(--radius-lg); text-align: center; }
.vault-empty h2 { margin: 0 0 6px; font-size: var(--text-xl); }
.vault-empty p { margin: 0 0 18px; color: var(--brand-text-muted); }
.vault-crumbs { margin: 8px 0 16px; color: var(--brand-text-muted); font-size: 13px; }
.vault-crumbs a { color: var(--brand-text-secondary); }
.vault-form, .vault-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 880px; padding: 24px; border: 1px solid var(--brand-border); border-radius: var(--radius-lg); background: var(--brand-surface); }
.vault-detail { border-top: 6px solid var(--memo-line); }
.vault-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.vault-field > span, .vault-field > legend { font-size: 14px; font-weight: 600; }
.vault-field em { color: var(--brand-text-muted); font-size: 12px; font-style: normal; font-weight: 400; }
.vault-field input[type="text"], .vault-field input[type="url"] { height: 40px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: var(--radius-md); background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; }
.vault-field small { color: var(--brand-text-muted); font-size: 12px; }
.vault-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.vault-colors legend { margin-bottom: 6px; }
.vault-color { position: relative; cursor: pointer; }
.vault-color input { position: absolute; opacity: 0; }
.vault-color span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--memo-line); border-radius: 999px; background: var(--memo-bg); color: #262626; font-size: 13px; }
.vault-color.is-yellow { --memo-bg: #fff8d6; --memo-line: #f2dd85; }
.vault-color.is-blue { --memo-bg: #e3ecfb; --memo-line: #b6c9f0; }
.vault-color.is-green { --memo-bg: #e2f5e8; --memo-line: #a9dcb9; }
.vault-color.is-pink { --memo-bg: #fde7ef; --memo-line: #f3b8cc; }
.vault-color.is-purple { --memo-bg: #eee7fb; --memo-line: #cdbcf0; }
.vault-color.is-gray { --memo-bg: #f1f1f1; --memo-line: #d6d6d6; }
.vault-color input:checked + span { box-shadow: 0 0 0 2px var(--brand-accent); font-weight: 700; }
.vault-color input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.vault-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.vault-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vault-actions form { margin: 0; }
.vault-detail-head h1 { margin: 0 0 6px; font-size: var(--text-2xl); }
.vault-meta { margin: 0; color: var(--brand-text-muted); font-size: 13px; }
.vault-url { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 14px; }
.vault-detail-head .vault-tags { margin-top: 8px; }
.vault-detail-body img { max-width: 100%; height: auto; border-radius: 8px; }
@media (max-width: 640px) {
  .vault-list-side .vault-pill { display: none; }
  .vault-form, .vault-detail { padding: 18px; }
}

/* 화면 머리 설명 · 로그인 카드 안내 글은 한글 낱말 단위로 줄을 바꾼다 - '정리합니|다', '유지해|요' 처럼 낱말 가운데서
   갈렸다.  anywhere 를 같이 둬 띄어쓰기 없는 긴 낱말 · 주소는 그래도 끊기고 칸 최소 폭도 그대로다(전수조사 2026-11-07). */
.page-description, .page-subtitle, .mydesk-login-card { word-break: keep-all; overflow-wrap: anywhere; }
/* ---- 로그인 계열: 계정 만들기·2단계 인증·백업 코드 ---- */
.mydesk-login-card.is-wide { max-width: 460px; text-align: left; }
.mydesk-login-card.is-wide h1, .mydesk-login-card.is-wide .mydesk-login-lead { text-align: center; }
.mydesk-login-label { margin-top: 0.2rem; color: #bbb; font-size: 0.8rem; font-weight: 600; }
.mydesk-login-label small { color: #777; font-weight: 400; }
.mydesk-login-step { margin: 0; color: #fff; font-size: 1.05rem; text-align: center; }
.mydesk-login-foot a { color: #aaa; }
.mydesk-login-foot a:hover { color: #fff; }
body.mydesk-login-body .mydesk-otp-input { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: 0.3em; text-align: center; }
.mydesk-otp-input::placeholder { letter-spacing: 0.05em; }
.mydesk-totp { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid #333; border-radius: 10px; background: #0b0b0b; }
.mydesk-totp-qr { flex: none; width: 140px; height: 140px; border-radius: 6px; background: #fff; }
.mydesk-totp-key { display: grid; gap: 6px; min-width: 0; color: #888; font-size: 0.75rem; }
.mydesk-totp-key code { color: #fff; font-size: 0.85rem; letter-spacing: 0.05em; overflow-wrap: anywhere; user-select: all; }
.mydesk-backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0.25rem 0; padding: 0; list-style: none; counter-reset: code; }
.mydesk-backup-codes li { padding: 10px; border: 1px solid #333; border-radius: 8px; background: #0b0b0b; text-align: center; }
.mydesk-backup-codes code { color: #fff; font-size: 0.95rem; letter-spacing: 0.08em; user-select: all; }
a.mydesk-login-submit { display: block; text-align: center; text-decoration: none; }
@media (max-width: 420px) { .mydesk-totp { flex-direction: column; } }

/* ---- 계정 보안 화면 ---- */
.mydesk-pill.is-current { border-color: var(--brand-accent); color: var(--text-accent, var(--brand-accent)); }
.desk-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.desk-card { display: grid; gap: 12px; min-width: 0; padding: 22px; border: 1px solid var(--brand-border); border-radius: var(--radius-lg); background: var(--brand-surface); }
/* 패스키 목록 (계정 보안, 2026-11-06) */
.desk-passkey-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.desk-passkey-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--brand-border); border-radius: var(--radius-md, 10px); background: var(--brand-bg); }
.desk-passkey-list li > div { display: grid; gap: 3px; min-width: 0; }
.desk-passkey-list strong { overflow-wrap: anywhere; }
.desk-passkey-list small, .desk-muted { color: var(--brand-text-muted, #888); font-size: 0.8rem; }
.desk-muted { margin: 0; }
.desk-passkey-message { margin: 0; color: var(--brand-text-secondary, #666); font-size: 0.85rem; }
.desk-passkey-message:empty { display: none; }
.desk-passkey-message.is-error { color: var(--brand-danger); }
.desk-card h1, .desk-card h2 { margin: 0; font-size: var(--text-xl); }
.desk-card > p { margin: 0; color: var(--brand-text-muted); font-size: 14px; }
.desk-facts { display: grid; gap: 10px; margin: 0; }
.desk-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 14px; }
.desk-facts dt { color: var(--brand-text-muted); }
.desk-facts dd { margin: 0; }
.desk-on { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand-success) 14%, var(--brand-surface)); color: #15803d; font-size: 12px; font-weight: 700; }
html[data-theme="dark"] .desk-on { color: #ffffff; }
.desk-warn { color: var(--brand-danger); font-size: 12px; font-weight: 600; }
.desk-form { display: grid; gap: 10px; }
.desk-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.desk-form label small { color: var(--brand-text-muted); font-weight: 400; }
.desk-form input { height: 40px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: var(--radius-md); background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; }
.desk-form label.desk-check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 600; }
.desk-form label.desk-check-row input { width: 18px; height: 18px; padding: 0; }
.desk-form label.desk-check-row small { flex-basis: 100%; padding-left: 26px; }
.desk-form .mydesk-pill { justify-self: start; }
.desk-rotate { max-width: 560px; }
.desk-rotate .mydesk-totp { border-color: var(--brand-border); background: var(--brand-surface-muted); }
.desk-rotate .mydesk-totp-key { color: var(--brand-text-muted); }
.desk-rotate .mydesk-totp-key code { color: var(--brand-text-primary); }
.desk-rotate .mydesk-otp-input { height: 44px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: var(--radius-md); background: var(--brand-surface); color: var(--brand-text-primary); font-family: var(--font-mono); font-size: 1.1rem; letter-spacing: 0.3em; text-align: center; }
/* 한 줄(휴대폰 · 좁은 창): 1fr 는 최소가 내용 폭이라, 안에 줄바꿈 안 되는 단추 줄(관리자의 PC 프로그램 · Store · APK 받기)이
   있으면 칸째로 화면보다 넓어졌다 - 휴대폰 앱에서 왼쪽이 잘리고, 오른쪽 아래 설정 톱니(위젯 테마)가 화면 밖으로 밀려
   안 보였다(2026-11-08 사용자).  minmax(0, 1fr) 로 화면 폭에 묶고, 단추 줄은 아래로 내린다. */
@media (max-width: 860px) { .desk-account-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- 홈 히어로 달력 (ReUI Event Calendar 모양) ----
   카드 하나에 툴바 · 범례 · 보기, 오른쪽 당일 목록.  칸은 1px 선으로 나눈 격자,
   주말은 옅은 바탕(off day), 오늘은 숫자에 채운 원, 시각 있는 일정은 점 + 제목 + 시각,
   하루 종일 · 자동 일정은 옅은 색 띠, 여러 날 일정은 주를 가로지르는 막대. */
.desk-cal { --cal-billing: #d97706; --cal-work: var(--brand-accent); --cal-deadline: var(--brand-danger); --cal-recontact: #059669; --cal-diary: #8b5cf6;
  --ec-line: var(--brand-border); --ec-off: color-mix(in srgb, var(--brand-text-primary) 2.5%, transparent);
  display: grid; gap: 12px; margin: 8px 0 24px; padding: 16px; border: 1px solid var(--brand-border); border-radius: 16px; background: var(--brand-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
html[data-theme="dark"] .desk-cal { --cal-billing: #f5a524; --cal-recontact: #34d399; --cal-diary: #a78bfa; --ec-off: rgba(255, 255, 255, .025); }
.desk-cal .is-billing { --kind: var(--cal-billing); }
.desk-cal .is-work { --kind: var(--cal-work); }
.desk-cal .is-deadline { --kind: var(--cal-deadline); }
.desk-cal .is-recontact { --kind: var(--cal-recontact); }
.desk-cal .is-diary { --kind: var(--cal-diary); }
.desk-cal .is-c-blue { --kind: #3b82f6; }
.desk-cal .is-c-indigo { --kind: #6366f1; }
.desk-cal .is-c-violet { --kind: #8b5cf6; }
.desk-cal .is-c-pink { --kind: #ec4899; }
.desk-cal .is-c-rose { --kind: #ef4444; }
.desk-cal .is-c-amber { --kind: #f59e0b; }
.desk-cal .is-c-lime { --kind: #65a30d; }
.desk-cal .is-c-emerald { --kind: #10b981; }
.desk-cal .is-c-cyan { --kind: #06b6d4; }
.desk-cal .is-c-gray { --kind: #6b7280; }
html[data-theme="dark"] .desk-cal .is-c-lime { --kind: #a3e635; }
html[data-theme="dark"] .desk-cal .is-c-gray { --kind: #9ca3af; }
.ec svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 툴바 */
.ec-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ec-nav-main, .ec-toolbar { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ec-title { margin: 0 0 0 6px; overflow: hidden; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }
/* 제목 = 연 · 월 고르기 단추 */
.ec-nav-main { position: relative; }
.ec-title-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 0; padding: 3px 6px; border: 0; border-radius: 7px; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.ec-title-btn:hover, .ec-title-btn[aria-expanded="true"] { background: var(--brand-surface-muted); }
.ec-title-btn svg { flex: none; width: 14px; height: 14px; color: var(--brand-text-muted); transition: transform var(--transition-fast); }
.ec-title-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.ec-mp { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 248px; padding: 10px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.ec-mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ec-mp-head strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ec-mp-step { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--brand-text-primary); cursor: pointer; }
.ec-mp-step:hover { background: var(--brand-surface-muted); }
.ec-mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ec-mp-month { height: 36px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--brand-text-primary); font: inherit; font-size: 13px; cursor: pointer; }
.ec-mp-month:hover { background: var(--brand-surface-muted); }
.ec-mp-month.is-today { border-color: var(--brand-accent); }
.ec-mp-month.is-shown { background: var(--brand-accent); color: var(--brand-on-accent); font-weight: 600; }
.ec-mp-today { width: 100%; height: 32px; margin-top: 8px; border: 1px solid var(--brand-border); border-radius: 8px; background: none; color: var(--brand-text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.ec-mp-today:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
/* 새로고침 없이 달을 넘기는 동안 */
.desk-cal.is-loading .ec-body { opacity: .55; transition: opacity .15s; }
.ec-btn, .ec-icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 1px solid var(--brand-border); border-radius: 8px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color var(--transition-fast); }
.ec-btn { padding: 0 12px; }
.ec-icon-btn { width: 32px; border-color: transparent; }
.ec-btn:hover, .ec-icon-btn:hover { background: var(--brand-surface-muted); text-decoration: none; }
.ec-btn.is-static { color: var(--brand-text-muted); cursor: default; }
.ec-btn.is-static:hover { background: var(--brand-surface); }
.ec-btn.is-primary { border-color: transparent; background: var(--brand-accent); color: var(--brand-on-accent); font-weight: 600; }
.ec-btn.is-primary:hover { background: var(--brand-accent-hover); }
.ec-views { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--brand-surface-muted); }
.ec-view { padding: 4px 12px; border-radius: 6px; color: var(--brand-text-secondary); font-size: 13px; font-weight: 500; text-decoration: none; }
.ec-view:hover { color: var(--brand-text-primary); text-decoration: none; }
.ec-view.is-active { background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.ec-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; padding: 0; list-style: none; color: var(--brand-text-secondary); font-size: 12px; }
.ec-legend li { display: inline-flex; align-items: center; gap: 5px; }
.ec-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--kind); }
.ec-legend b { color: var(--brand-text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.ec-legend-gap { width: 1px; height: 12px; background: var(--brand-border); }
.ec-link { padding: 0; border: 0; background: none; color: var(--text-accent, var(--brand-accent)); font: inherit; font-weight: 600; cursor: pointer; }
.ec-link:hover { text-decoration: underline; }
.ec-warn { margin: 0; color: var(--brand-danger); font-size: 13px; }
.ec-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.ec-content { min-width: 0; overflow: hidden; border: 1px solid var(--ec-line); border-radius: 10px; }

/* 월 보기 */
.ec-month-head, .ec-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ec-month-head { border-bottom: 1px solid var(--ec-line); }
.ec-month-head span { padding: 8px; color: var(--brand-text-muted); font-size: 12px; font-weight: 500; text-align: center; }
.ec-month-head .is-sun { color: var(--brand-danger); }
.ec-month-head .is-sat { color: var(--text-accent, var(--brand-accent)); }
.ec-week { position: relative; }
.ec-week + .ec-week { border-top: 1px solid var(--ec-line); }
.ec-cell { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 104px; padding: 4px 4px 6px; color: inherit; text-decoration: none; transition: background-color var(--transition-fast); }
.ec-cell + .ec-cell { border-left: 1px solid var(--ec-line); }
.ec-cell.is-off { background: var(--ec-off); }
/* 강조 카테고리(긴급 등) 일정이 있는 날 - 칸 전체를 옅은 붉은색으로 */
.ec-cell.is-urgent { background: color-mix(in srgb, var(--brand-danger) 9%, var(--brand-surface)); }
a.ec-cell.is-urgent:hover { background: color-mix(in srgb, var(--brand-danger) 14%, var(--brand-surface)); }
.ec-cell.is-urgent .ec-num { color: var(--brand-danger); font-weight: 700; }
.ec-cell.is-out { opacity: .4; }
a.ec-cell:hover { background: color-mix(in srgb, var(--brand-accent) 4%, transparent); text-decoration: none; }
.ec-cell.is-selected { background: color-mix(in srgb, var(--brand-accent) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--brand-accent); }
.ec-cell.is-today { box-shadow: inset 0 2px 0 var(--brand-accent); }
.ec-cell.is-today.is-selected { box-shadow: inset 0 0 0 1.5px var(--brand-accent), inset 0 3px 0 var(--brand-accent); }
.ec-num { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
/* 그날 가계부 손익 - 넓은 화면에서만(좁으면 칸이 좁아 숫자가 일정을 가린다) */
.ec-dayhead { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.ec-money { overflow: hidden; padding: 0 4px; color: var(--brand-text-muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.ec-money.is-plus { color: #1c5cab; }
.ec-money.is-minus { color: #b4461a; }
html[data-theme="dark"] .ec-money.is-plus { color: #86b6ef; }
html[data-theme="dark"] .ec-money.is-minus { color: #f29a6b; }
/* 큰 금액은 칸이 좁으면 '−12.3억' 처럼 줄인 단위로 - 말줄임은 숫자 뒤를 잘라 뜻이 바뀌었다('-1,234,567,…',
   전수조사 2026-11-07).  둘을 한 자리에 겹쳐 두고, 칸 폭(100%)이 전체 글자 폭(--money-len × 1ch - 숫자 · 부호는 1ch, 쉼표는
   0.5ch 로 센다(Pretendard 실측))보다 넓으면 전체를, 좁으면 줄인 것을 보인다 - 999 배 곱해 0 아니면 아주 큰 값이 되는 max-width 스위치. */
.ec-money:has(.ec-money-short) { display: grid; flex: 1 1 0; grid-template-columns: minmax(0, 1fr); justify-items: end; }
.ec-money-full, .ec-money-short { grid-area: 1 / 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-money-full { max-width: max(0px, calc((100% - var(--money-len) * 1ch - 2px) * 999)); }
.ec-money-short { max-width: max(0px, calc((var(--money-len) * 1ch + 2px - 100%) * 999)); }
@media (max-width: 1100px) { .ec-money, .ec-money:has(.ec-money-short) { display: none; } }
.ec-cell.is-sun .ec-num { color: var(--brand-danger); }
/* 공휴일 - 일요일처럼 빨간 숫자 + 숫자 옆 이름(2026-11-14 사용자 '달력에 공휴일') */
.ec-tg-day.is-sun b { color: var(--brand-danger); }
.ec-tg-day.is-sat b { color: var(--text-accent, var(--brand-accent)); }
.ec-holiday { flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--brand-danger); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ec-dayhead .ec-holiday + .ec-money { flex: none; }
.ec-tg-day .ec-holiday { flex: none; max-width: 100%; text-align: center; }
.ec-agenda-holiday { display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: var(--brand-danger); }
.ec-agenda-holiday .ec-dot { background: var(--brand-danger); }
.ec-agenda-holiday .ec-agenda-time { color: var(--brand-danger); }
.desk-cal-holiday { color: var(--brand-danger); font-weight: 600; }
.ec-cell.is-sat .ec-num { color: var(--text-accent, var(--brand-accent)); }
/* 토요일과 겹친 공휴일도 빨강 - 토요일 파랑보다 뒤에 둔다 */
.ec-cell.is-holiday .ec-num, .ec-tg-day.is-holiday b, .ec-tg-day.is-holiday small, .ec-agenda-date.is-holiday b, .ec-agenda-date.is-holiday small { color: var(--brand-danger); }
.ec-cell.is-today .ec-num { background: var(--brand-accent); color: var(--brand-on-accent) !important; font-weight: 700; }
.ec-chips { display: grid; gap: 2px; min-width: 0; margin-top: calc(var(--lanes, 0) * 22px); }
.ec-chip { display: flex; align-items: center; gap: 5px; min-width: 0; height: 20px; padding: 0 6px; border-radius: 4px; background: color-mix(in srgb, var(--kind) 14%, transparent); color: var(--brand-text-primary); font-size: 11.5px; line-height: 20px; }
.ec-chip .ec-dot { display: none; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--kind); }
.ec-chip.is-timed { padding-left: 4px; background: transparent; }
.ec-chip.is-timed .ec-dot { display: block; }
a.ec-cell:hover .ec-chip.is-timed { background: color-mix(in srgb, var(--kind) 10%, transparent); }
.ec-chip-title { flex: 1; min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.ec-chip time { flex: none; color: var(--brand-text-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.ec-chip.is-done .ec-chip-title { color: var(--brand-text-muted); text-decoration: line-through; }
.ec-more { padding: 0 6px; color: var(--brand-text-muted); font-size: 11px; font-weight: 600; }
.ec-dots { display: none; flex-wrap: wrap; gap: 3px; }
.ec-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--kind); }
.ec-bars { position: absolute; top: 30px; right: 0; left: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 20px; row-gap: 2px; pointer-events: none; }
.ec-bar { display: flex; align-items: center; min-width: 0; margin: 0 1px; padding: 0 8px; border: 0; border-radius: 0; background: color-mix(in srgb, var(--kind) 22%, var(--brand-surface)); color: var(--brand-text-primary); font: inherit; font-size: 11.5px; text-align: left; text-decoration: none; cursor: pointer; pointer-events: auto; }
.ec-bar.is-start { margin-left: 4px; border-left: 3px solid var(--kind); border-radius: 4px 0 0 4px; }
.ec-bar.is-end { margin-right: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.ec-bar:hover { background: color-mix(in srgb, var(--kind) 32%, var(--brand-surface)); text-decoration: none; }

/* 주 · 일 보기 (시간 격자) */
.ec-tg { --gutter: 52px; }
.ec-tg-head, .ec-tg-allday, .ec-tg-grid { display: grid; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)); }
.ec-tg-head { border-bottom: 1px solid var(--ec-line); }
.ec-tg-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-left: 1px solid var(--ec-line); color: inherit; text-decoration: none; }
.ec-tg-day small { color: var(--brand-text-muted); font-size: 11.5px; }
.ec-tg-day b { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 999px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ec-tg-day:hover { background: var(--brand-surface-muted); text-decoration: none; }
.ec-tg-day.is-today b { background: var(--brand-accent); color: var(--brand-on-accent); }
.ec-tg-day.is-selected { box-shadow: inset 0 -2px 0 var(--brand-accent); }
.ec-tg-gutter { display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: var(--brand-text-muted); font-size: 11px; }
.ec-tg-allday { border-bottom: 1px solid var(--ec-line); }
.ec-tg-allday-cell { display: grid; gap: 2px; align-content: start; min-width: 0; min-height: 30px; padding: 4px; border-left: 1px solid var(--ec-line); }
.ec-tg-allday-cell.is-off { background: var(--ec-off); }
.ec-allday-item { display: block; min-width: 0; padding: 0; border: 0; background: none; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.ec-allday-item:hover .ec-chip { filter: brightness(.97); }
/* 스크롤 막대는 숨긴다 - 막대가 보이면 아래 시간 칸만 그 폭만큼 좁아져
   위 요일 · 종일 줄과 세로선이 어긋난다(휠 · 손가락 스크롤은 그대로). */
.ec-tg-scroll { height: 560px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.ec-tg-scroll::-webkit-scrollbar { display: none; }
.ec-tg-grid { position: relative; height: calc(var(--hour) * 24); }
.ec-tg-hours { position: relative; display: block; padding: 0; }
.ec-tg-hours span { display: block; height: var(--hour); padding-right: 8px; transform: translateY(-7px); text-align: right; font-variant-numeric: tabular-nums; }
.ec-tg-col { position: relative; border-left: 1px solid var(--ec-line); background-image: linear-gradient(to bottom, var(--ec-line) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in srgb, var(--ec-line) 50%, transparent) 1px, transparent 1px); background-size: 100% var(--hour), 100% calc(var(--hour) / 2); background-position: 0 0, 0 calc(var(--hour) / 2); cursor: copy; }
.ec-tg-col.is-off { background-color: var(--ec-off); }
.ec-tg-col.is-today { background-color: color-mix(in srgb, var(--brand-accent) 4%, transparent); }
.ec-tg-event { position: absolute; display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; padding: 3px 6px; border: 0; border-left: 3px solid var(--kind); border-radius: 6px; background: color-mix(in srgb, var(--kind) 18%, var(--brand-surface)); color: var(--brand-text-primary); font: inherit; text-align: left; text-decoration: none; cursor: pointer; box-shadow: 0 0 0 1px var(--brand-surface); }
.ec-tg-event:hover { background: color-mix(in srgb, var(--kind) 28%, var(--brand-surface)); text-decoration: none; z-index: 2; }
.ec-tg-event strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ec-tg-event small { color: var(--brand-text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.ec-tg-event.is-compact { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ec-tg-event.is-compact small { flex: none; }
.ec-now { position: absolute; right: 0; left: 0; z-index: 3; height: 2px; background: var(--brand-danger); pointer-events: none; }
.ec-now::before { position: absolute; top: -4px; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-danger); content: ""; }

/* 목록(agenda) 보기 */
.ec-agenda { display: grid; }
.ec-agenda-day { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
.ec-agenda-day + .ec-agenda-day { border-top: 1px solid var(--ec-line); }
.ec-agenda-date { display: flex; flex-direction: column; align-items: center; align-self: start; gap: 2px; padding: 6px 4px; border-radius: 10px; color: inherit; text-decoration: none; }
.ec-agenda-date:hover, .ec-agenda-date.is-selected { background: var(--brand-surface-muted); text-decoration: none; }
.ec-agenda-date b { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ec-agenda-date small { color: var(--brand-text-muted); font-size: 12px; }
.ec-agenda-day.is-today .ec-agenda-date b { color: var(--text-accent, var(--brand-accent)); }
.ec-agenda-day ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ec-agenda-item { display: grid; grid-template-columns: 8px 92px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
.ec-agenda-item:hover { background: color-mix(in srgb, var(--kind) 9%, transparent); text-decoration: none; }
.ec-agenda-item .ec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--kind); }
.ec-agenda-time { color: var(--brand-text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.ec-agenda-item strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ec-agenda-item small { color: var(--brand-text-muted); font-size: 12px; }
.ec-agenda-item.is-done strong { color: var(--brand-text-muted); text-decoration: line-through; }
.ec-empty { margin: 0; padding: 40px 16px; color: var(--brand-text-muted); text-align: center; }

/* 오른쪽 당일 목록 - 항목마다 카드 + label-badges(색 점 뱃지) */
.desk-cal-day { position: sticky; top: 112px; min-width: 0; padding: 14px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-bg); }
.desk-cal-list h2 { margin: 0; font-size: 1.05rem; }
.desk-cal-list h2 small { color: var(--brand-text-muted); font-size: 13px; font-weight: 500; }
.desk-cal-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.desk-cal-list-add { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-primary); cursor: pointer; }
.desk-cal-list-add:hover { border-color: var(--brand-accent); color: var(--text-accent, var(--brand-accent)); }
.desk-cal-list ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.desk-cal-item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; padding: 11px 12px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast); }
.desk-cal-item:hover { border-color: var(--brand-border-strong); background: color-mix(in srgb, var(--brand-text-primary) 2%, var(--brand-surface)); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); color: var(--brand-text-primary); text-decoration: none; }
.desk-cal-item:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.desk-cal-item-title { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: keep-all; font-size: 14px; font-weight: 600; line-height: 1.4; }
.desk-cal-badges { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.desk-cal-badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 10px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-bg); color: var(--brand-text-primary); font-size: 12px; font-weight: 600; line-height: 18px; overflow-wrap: anywhere; word-break: keep-all; font-variant-numeric: tabular-nums; }
.desk-cal-badge-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--kind); }
.desk-cal-badge.is-muted { color: var(--brand-text-muted); font-weight: 500; }
.desk-cal-item-memo { display: block; max-width: 100%; color: var(--brand-text-muted); font-size: 12px; font-style: normal; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.desk-cal-item.is-done .desk-cal-item-title { color: var(--brand-text-muted); text-decoration: line-through; }
.desk-cal-empty { margin: 0; color: var(--brand-text-muted); font-size: 14px; }
.desk-cal-list-add svg, .desk-sched-x svg, .desk-mini-step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1100px) { .ec-body { grid-template-columns: minmax(0, 1fr) 250px; } }
@media (max-width: 900px) {
  .ec-body { grid-template-columns: 1fr; }
  .desk-cal-day { position: static; }
  .ec-cell { min-height: 58px; }
  .ec-chips, .ec-bars { display: none; }
  .ec-dots { display: flex; }
  .ec-tg-scroll { height: 480px; }
}
/* 휴대폰 폭 - 칸이 좁아 이름이 옆 칸으로 넘친다.  빨간 숫자만 두고 이름은 아래 당일 목록 머리에서 */
@media (max-width: 560px) { .ec-cell .ec-holiday, .ec-tg-day .ec-holiday { display: none; } }
@media (max-width: 560px) {
  .desk-cal { padding: 10px; border-radius: 14px; }
  .ec-nav { gap: 8px; }
  .ec-toolbar { width: 100%; justify-content: space-between; }
  .ec-title { font-size: 1rem; }
  .ec-cell { min-height: 50px; padding: 3px; align-items: center; }
  .ec-num { align-self: center; }
  .ec-dots { justify-content: center; }
  .ec-tg { --gutter: 40px; }
  .ec-tg-day small { font-size: 10.5px; }
  .ec-tg-event { padding: 2px 4px; }
  .ec-tg-event small { display: none; }
  .ec-agenda-day { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 10px 8px; }
  .ec-agenda-item { grid-template-columns: 8px 70px minmax(0, 1fr); }
  .ec-agenda-item small { display: none; }
}

/* 일정 넣기 창 · 카테고리 관리 */
.desk-sched { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--brand-border); border-radius: 18px; background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.desk-sched:not([open]), .desk-sched [hidden] { display: none !important; }
.desk-sched::backdrop { background: rgba(10, 12, 20, .5); }
.desk-sched form, .desk-cats { display: grid; gap: 14px; }
.desk-sched > form { padding: 20px; }
.desk-cats { padding: 20px; width: min(520px, calc(100vw - 24px)); }
.desk-sched-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.desk-sched-head h2 { margin: 0; font-size: 1.1rem; }
.desk-sched-x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--brand-text-muted); cursor: pointer; }
.desk-sched-x:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
.desk-sched-field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.desk-sched-field > span, .desk-sched-field > legend { padding: 0; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; }
.desk-sched-field em { color: var(--brand-text-muted); font-size: 12px; font-style: normal; font-weight: 400; }
.desk-sched input[type="text"], .desk-sched input[type="time"], .desk-sched input[type="date"], .desk-sched textarea, .desk-sched select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-bg); color: var(--brand-text-primary); font: inherit; font-size: 14px; }
.desk-sched textarea { resize: vertical; }
.desk-sched input:focus-visible, .desk-sched textarea:focus-visible, .desk-sched select:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.desk-sched input:disabled { opacity: .45; }
.desk-sched-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.desk-sched-cats legend { margin-bottom: 6px; }
.desk-sched-cat { position: relative; cursor: pointer; }
.desk-sched-cat input { position: absolute; opacity: 0; pointer-events: none; }
.desk-sched-cat span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); font-size: 13px; font-weight: 600; }
.desk-sched-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--kind); }
.desk-sched-cat input:checked + span { border-color: var(--kind); background: color-mix(in srgb, var(--kind) 14%, var(--brand-surface)); box-shadow: 0 0 0 1px var(--kind) inset; }
.desk-sched-cat input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 2px; }

/* 왼쪽 작은 달력 + 오른쪽 시간 단추 (calendar-scheduler 모양) */
.desk-sched-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.desk-sched-box { min-width: 0; padding: 10px; border: 1px solid var(--brand-border); border-radius: 12px; }
.desk-mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.desk-mini-head strong { font-size: 14px; }
.desk-mini-step { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--brand-border); border-radius: 8px; background: transparent; color: var(--brand-text-secondary); cursor: pointer; }
.desk-mini-step:hover { color: var(--brand-text-primary); background: var(--brand-surface-muted); }
.desk-mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.desk-mini-wd { padding: 4px 0; color: var(--brand-text-muted); font-size: 11.5px; text-align: center; }
.desk-mini-wd.is-sun { color: var(--brand-danger); }
.desk-mini-wd.is-sat { color: var(--text-accent, var(--brand-accent)); }
.desk-mini-day { aspect-ratio: 1; min-height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--brand-text-primary); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.desk-mini-day:hover { background: var(--brand-surface-muted); }
.desk-mini-day.is-sun { color: var(--brand-danger); }
.desk-mini-day.is-sat { color: var(--text-accent, var(--brand-accent)); }
.desk-mini-day.is-out { opacity: .35; }
.desk-mini-day.is-today { background: var(--brand-surface-muted); font-weight: 700; }
.desk-mini-day.is-range { background: color-mix(in srgb, var(--brand-accent) 14%, transparent); }
.desk-mini-day.is-selected { background: var(--brand-accent); color: var(--brand-on-accent); font-weight: 700; }
.desk-sched-times { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.desk-sched-times-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.desk-sched-times-head p { margin: 0; color: var(--brand-text-muted); font-size: 13px; font-weight: 600; }
.desk-sched-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.desk-sched-switch input { width: 16px; height: 16px; accent-color: var(--brand-accent); }
.desk-cats-import { display: grid; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--brand-border); }
.desk-cats-import-title { margin: 0; font-size: 13px; font-weight: 700; }
.desk-cats-import-title small { margin-left: 4px; color: var(--brand-text-muted); font-size: 12px; font-weight: 500; }
.desk-cats-import .desk-cats-row { grid-template-columns: minmax(0, 1fr) 110px auto; }
.desk-cats-import input[type=file] { min-width: 0; font-size: 13px; }
@media (max-width: 640px) { .desk-cats-import .desk-cats-row { grid-template-columns: minmax(0, 1fr) auto; } .desk-cats-import input[type=file] { grid-column: 1 / -1; } }
.desk-repeat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.desk-sched .desk-repeat-row select { width: auto; min-width: 170px; }
.desk-repeat-row [hidden] { display: none !important; }
.desk-repeat-n, .desk-repeat-until { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; }
.desk-sched .desk-repeat-n input { width: 72px; min-height: 40px; padding: 8px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-bg); color: var(--brand-text-primary); font: inherit; font-size: 14px; text-align: center; }
.desk-sched .desk-repeat-until input { width: auto; }
.desk-repeat-until em { color: var(--brand-text-muted); font-size: 12px; font-style: normal; font-weight: 400; white-space: nowrap; }
.desk-sched-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 268px; overflow-y: auto; padding-right: 2px; align-content: start; }
.desk-sched-slot { height: 34px; border: 1px solid var(--brand-border); border-radius: 8px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.desk-sched-slot:hover { border-color: var(--brand-border-strong); background: var(--brand-surface-muted); }
.desk-sched-slot.is-selected { border-color: transparent; background: var(--brand-accent); color: var(--brand-on-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-accent) 35%, transparent); }
.desk-sched-slots.is-disabled { opacity: .4; }
.desk-sched-slot:disabled { cursor: not-allowed; }
.desk-sched-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.desk-sched-row.is-all-day .desk-sched-field:not(:last-child) { opacity: .5; }
.desk-sched-summary { margin: 0; min-height: 1.2em; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; }
.desk-sched-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.desk-sched-spacer { flex: 1; }
.desk-sched-foot .mydesk-pill:disabled { opacity: .45; cursor: not-allowed; }
/* 저장된 일정 보기(2026-11-16) - 누르면 먼저 보고, 수정을 눌러야 고치기 창 */
.desk-view { width: min(560px, calc(100vw - 24px)); }
.desk-view-inner { display: grid; gap: 12px; padding: 20px; }
.desk-view-head { display: flex; align-items: flex-start; gap: 10px; }
.desk-view-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.2rem; line-height: 1.4; overflow-wrap: anywhere; }
.desk-view-ico { display: inline-flex; flex: none; margin-top: 3px; color: var(--text-accent, var(--brand-accent)); }
.desk-view-ico svg { width: 20px; height: 20px; }
.desk-view-x { display: grid; flex: none; place-items: center; width: 32px; height: 32px; margin: -4px -6px 0 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--brand-text-muted); cursor: pointer; }
.desk-view-x:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
.desk-view-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; color: var(--brand-text-secondary); font-size: 14px; }
.desk-view-memo { max-height: min(50vh, 420px); overflow: auto; padding: 12px 14px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface-muted); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.desk-view-memo > :first-child { margin-top: 0; }
.desk-view-memo > :last-child { margin-bottom: 0; }
.desk-view-memo img { max-width: 100%; height: auto; border-radius: 8px; }
.desk-view-check { display: inline-grid; place-items: center; min-width: 1.4em; margin: 0 2px 0 0; padding: 0; border: 0; background: none; color: var(--text-accent, var(--brand-accent)); font: inherit; font-size: 1.15em; line-height: 1; cursor: pointer; vertical-align: -1px; }
.desk-view-check:hover { transform: scale(1.12); }
.desk-view-check:disabled { opacity: .6; cursor: progress; }
.desk-view-files { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.desk-view .desk-sched-foot form { display: contents; }
.desk-view .desk-sched-foot form .mydesk-pill { margin-right: auto; }
.mydesk-pill.is-ghost { border-color: transparent; background: transparent; }
.mydesk-pill.is-ghost:hover { background: var(--brand-surface-muted); }
.desk-cats-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.desk-cats-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px 14px auto auto auto; align-items: center; gap: 8px; margin: 0; }
/* 순서 바꾸기(2026-11-16) - 마크업은 맨 뒤(Enter = 저장), 보이는 자리는 맨 앞 */
.desk-cats-list .desk-cats-row { grid-template-columns: auto minmax(0, 1fr) 92px 14px auto auto auto; }
.desk-cats-move { order: -1; display: inline-flex; flex-direction: column; gap: 2px; }
.desk-cats-arrow { display: grid; place-items: center; width: 24px; height: 17px; padding: 0; border: 1px solid var(--brand-border); border-radius: 6px; background: var(--brand-surface); color: var(--brand-text-secondary); cursor: pointer; }
.desk-cats-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.desk-cats-arrow:hover:not(:disabled) { border-color: var(--brand-border-strong); color: var(--brand-text-primary); }
.desk-cats-arrow:disabled { opacity: .35; cursor: default; }
.desk-cats-note { margin: -4px 0 0; color: var(--brand-text-muted); font-size: 12.5px; }
.desk-cats-row.is-new { grid-template-columns: minmax(0, 1fr) 92px 14px auto auto; padding-top: 12px; border-top: 1px solid var(--brand-border); }
.desk-cats-hl { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text-secondary); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.desk-cats-hl input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand-danger); }
.desk-cats-row .mydesk-pill { padding: 8px 12px; font-size: 13px; }
.desk-cats-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--kind); }
@media (max-width: 640px) {
  .desk-cal-head { flex-wrap: wrap; align-items: center; }
  .desk-sched > form, .desk-cats { padding: 16px; }
  .desk-sched-pick { grid-template-columns: 1fr; }
  .desk-sched-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 160px; }
  .desk-sched-row { grid-template-columns: 1fr 1fr; }
  .desk-sched-row .desk-sched-field:last-child { grid-column: 1 / -1; }
  .desk-cats-row { grid-template-columns: minmax(0, 1fr) 80px 14px; }
  .desk-cats-list .desk-cats-row { grid-template-columns: auto minmax(0, 1fr) minmax(80px, auto) auto; }
  .desk-cats-list .desk-cats-swatch { justify-self: start; }
  .desk-cats-move { grid-row: 1 / span 2; }
  .desk-cats-row .mydesk-pill, .desk-cats-row .desk-cats-hl { grid-row: 2; }
}

/* ---- 로그인 계열 라이트 모드: 오른쪽 아래 테마 단추로 바꾼다(사이트와 같은 저장값) ---- */
.mydesk-login-dots { color: #fff; }
html[data-theme="light"]:has(body.mydesk-login-body), html[data-theme="light"] body.mydesk-login-body { background: #f6f6f7 !important; color: #0a0a0a !important; }
html[data-theme="light"] .mydesk-login { background: #f6f6f7; color: #0a0a0a; }
html[data-theme="light"] .mydesk-login-dots { color: #1f2937; opacity: .55; }
html[data-theme="light"] .mydesk-login-vignette { background: radial-gradient(circle at center, rgba(246, 246, 247, 0.85) 0%, rgba(246, 246, 247, 0) 100%); }
html[data-theme="light"] .mydesk-login-card { border-color: #e4e4e7; background: #fff; box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .mydesk-login-logo { filter: invert(1); }
html[data-theme="light"] .mydesk-login-card h1, html[data-theme="light"] .mydesk-login-step { color: #0a0a0a; }
html[data-theme="light"] .mydesk-login-lead, html[data-theme="light"] .mydesk-login-foot { color: #71717a; }
html[data-theme="light"] .mydesk-login-label { color: #3f3f46; }
html[data-theme="light"] .mydesk-login-label small { color: #a1a1aa; }
html[data-theme="light"] .mydesk-login-foot a { color: #52525b; }
html[data-theme="light"] .mydesk-login-foot a:hover { color: #0a0a0a; }
html[data-theme="light"] body.mydesk-login-body .mydesk-login-input { background: #fff !important; border-color: #d4d4d8 !important; color: #0a0a0a !important; -webkit-text-fill-color: #0a0a0a; }
html[data-theme="light"] body.mydesk-login-body .mydesk-login-input:focus { border-color: #71717a !important; box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08) !important; }
html[data-theme="light"] body.mydesk-login-body .mydesk-login-input::placeholder { color: #a1a1aa !important; -webkit-text-fill-color: #a1a1aa; }
html[data-theme="light"] body.mydesk-login-body .mydesk-login-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset !important; }
html[data-theme="light"] .mydesk-login-submit { background: #18181b; color: #fff; }
html[data-theme="light"] .mydesk-login-submit:hover { background: #000; }
html[data-theme="light"] .mydesk-login-submit:focus-visible { outline-color: #18181b; }
html[data-theme="light"] .mydesk-login-passkey { border-color: #d4d4d8; color: #18181b; }
html[data-theme="light"] .mydesk-login-passkey:hover { border-color: #71717a; background: #f4f4f5; }
html[data-theme="light"] .mydesk-login-passkey:focus-visible { outline-color: #18181b; }
html[data-theme="light"] .mydesk-login-passkey-message { color: #71717a; }
html[data-theme="light"] .mydesk-login-passkey-message.is-error { color: #dc2626; }
html[data-theme="light"] .mydesk-login-rule { background: #e4e4e7; }
html[data-theme="light"] .mydesk-totp, html[data-theme="light"] .mydesk-backup-codes li { border-color: #e4e4e7; background: #fafafa; }
html[data-theme="light"] .mydesk-totp-qr { box-shadow: 0 0 0 1px #e4e4e7; }
html[data-theme="light"] .mydesk-totp-key { color: #71717a; }
html[data-theme="light"] .mydesk-totp-key code, html[data-theme="light"] .mydesk-backup-codes code { color: #0a0a0a; }
body.mydesk-login-body .desk-settings { z-index: 5; }

/* 자동 로그인 체크 */
.mydesk-login-remember { display: flex; align-items: center; gap: 8px; margin: 0.1rem 0 0.2rem; color: #bbb; font-size: 0.82rem; text-align: left; cursor: pointer; }
.mydesk-login-remember input { width: 16px; height: 16px; margin: 0; accent-color: #ededed; }
.mydesk-login-remember small { color: #777; font-size: 0.75rem; }
html[data-theme="light"] .mydesk-login-remember { color: #3f3f46; }
html[data-theme="light"] .mydesk-login-remember small { color: #a1a1aa; }
html[data-theme="light"] .mydesk-login-remember input { accent-color: #18181b; }

/* ---- 다이어리 리스트 보기 ---- */
.diary-list { display: grid; margin: 0; padding: 0; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface); list-style: none; overflow: hidden; }
.diary-list-head, .diary-list-row { display: grid; grid-template-columns: 104px 140px minmax(0, 1fr) 96px; align-items: center; gap: 12px; padding: 11px 16px; }
.diary-list-head { border-bottom: 1px solid var(--brand-border); background: var(--brand-surface-muted); color: var(--brand-text-muted); font-size: 12px; font-weight: 600; }
.diary-list li + li .diary-list-row { border-top: 1px solid var(--brand-border); }
.diary-list-row { color: inherit; text-decoration: none; transition: background-color var(--transition-fast); }
.diary-list-row:hover { background: color-mix(in srgb, var(--brand-accent) 5%, transparent); text-decoration: none; }
.diary-list-row time { color: var(--brand-text-secondary); font-size: 13px; font-variant-numeric: tabular-nums; }
.diary-list-cat { overflow: hidden; color: var(--brand-text-secondary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.diary-list-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.diary-list-title strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.diary-list-tags { display: inline-flex; flex: none; gap: 6px; color: var(--brand-text-muted); font-size: 12px; }
.diary-list-meta { display: flex; justify-content: flex-end; gap: 10px; color: var(--brand-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .diary-list-head { display: none; }
  .diary-list-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title meta" "date cat"; gap: 4px 10px; padding: 12px 14px; }
  .diary-list-title { grid-area: title; }
  .diary-list-meta { grid-area: meta; }
  .diary-list-row time { grid-area: date; font-size: 12px; }
  .diary-list-cat { grid-area: cat; justify-self: end; font-size: 12px; }
  .diary-list-tags { display: none; }
}

/* ---- 경고 · 확인 창 (shadcn AlertDialog 모양, desk-dialog.js) ---- */
.desk-alert { width: min(512px, calc(100vw - 32px)); max-width: none; padding: 0; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .35); animation: desk-alert-in .2s cubic-bezier(.16, 1, .3, 1); }
.desk-alert::backdrop { background: rgba(0, 0, 0, .6); animation: desk-alert-fade .2s ease; }
.desk-alert.is-leaving { animation: desk-alert-out .15s ease forwards; }
.desk-alert-body { display: grid; gap: 16px; margin: 0; padding: 24px; }
.desk-alert-header { display: grid; gap: 8px; }
.desk-alert-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.desk-alert-description { margin: 0; color: var(--brand-text-muted); font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.desk-alert.is-error .desk-alert-title { display: flex; align-items: center; gap: 10px; }
.desk-alert.is-error .desk-alert-title::before { flex: none; width: 22px; height: 22px; background: var(--brand-danger); content: ""; -webkit-mask: var(--x-octagon) center / contain no-repeat; mask: var(--x-octagon) center / contain no-repeat;
  --x-octagon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
.desk-alert-input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: 8px; background: var(--brand-bg); color: var(--brand-text-primary); font: inherit; font-size: 14px; }
.desk-alert-input:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.desk-alert-footer { display: flex; justify-content: flex-end; gap: 8px; }
.desk-alert-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 1px solid var(--brand-border); border-radius: 8px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color var(--transition-fast); }
.desk-alert-btn:hover { background: var(--brand-surface-muted); }
.desk-alert-btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.desk-alert-btn.is-action { border-color: transparent; background: var(--brand-text-primary); color: var(--brand-surface); }
.desk-alert-btn.is-action:hover { background: color-mix(in srgb, var(--brand-text-primary) 88%, transparent); }
.desk-alert-btn.is-danger { background: var(--brand-danger); color: #fff; }
.desk-alert-btn.is-danger:hover { background: color-mix(in srgb, var(--brand-danger) 88%, #000); }
@keyframes desk-alert-in { from { opacity: 0; transform: scale(.95); } }
@keyframes desk-alert-fade { from { opacity: 0; } }
@keyframes desk-alert-out { to { opacity: 0; transform: scale(.95); } }
@media (max-width: 520px) {
  .desk-alert-footer { flex-direction: column-reverse; }
  .desk-alert-btn { width: 100%; }
}

/* ---- 알림 토스트 (alert-toast 모양): 상태 아이콘 + 제목 + 설명 + 닫기 ---- */
/* 위 가운데, 상단 메뉴 바로 아래에 내려온다(사용자 요청 - 아래에만 나와 눈에 안 띄었다).
   오른쪽 아래는 설정 · 스크롤 단추 자리다. */
.toast-stack { top: 84px; right: 0; bottom: auto; left: 0; width: min(384px, calc(100vw - 32px)); margin-inline: auto; transform: none; gap: 12px; }
.toast { gap: 2px 16px; padding: 16px; border-radius: 10px; animation: desk-toast-in .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.toast.is-leaving { animation: desk-toast-out .2s ease forwards; }
@keyframes desk-toast-in { 0% { opacity: 0; transform: translateY(-40px) scale(.6); } 40% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes desk-toast-out { to { opacity: 0; transform: translateY(-16px) scale(.8); } }
.toast::before { width: 24px; height: 24px; margin-top: 0; color: #3b82f6;
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.toast.info, .toast:not(.success):not(.warning):not(.error) { border-color: #bfdbfe; }
.toast.success { border-color: #bbf7d0; }
.toast.success::before { color: #22c55e;
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.toast.warning { border-color: #fef08a; }
.toast.warning::before { color: #eab308; }
.toast.error { border-color: #fecaca; }
.toast.error::before { color: #ef4444;
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
html[data-theme="dark"] .toast.info, html[data-theme="dark"] .toast:not(.success):not(.warning):not(.error) { border-color: #1d4ed8; }
html[data-theme="dark"] .toast.success { border-color: #15803d; }
html[data-theme="dark"] .toast.warning { border-color: #a16207; }
html[data-theme="dark"] .toast.error { border-color: #b91c1c; }
.toast-title { font-size: 14px; font-weight: 600; }
.toast-description { color: var(--brand-text-primary); font-size: 14px; opacity: .8; }
.toast-close { width: 28px; height: 28px; border-radius: 999px; opacity: .8; }
.toast-close:hover { opacity: 1; }
.toast-close svg { width: 18px; height: 18px; }
/* 모달 안에서는 popover 로 뜬다 - 브라우저 기본 popover 상자(가운데 · 테두리 · 바탕)를 지운다 */
.toast-stack[popover] { inset: 84px 0 auto; height: auto; margin: 0 auto; padding: 0; border: 0; background: none; color: inherit; overflow: visible; }
@media (max-width: 640px) {
  .toast-stack { top: 72px; right: 12px; bottom: auto; left: 12px; width: auto; }
  .toast-stack[popover] { inset: 72px 12px auto; margin: 0; }
}

/* ---- 설정 단추 + 팝오버 (shadcn Popover 모양, js/desk-settings.js) ----
   예전 DARK/WHITE 토글 자리(오른쪽 아래).  스크롤 단추는 이 위(72px · 124px)에 있고
   z-index 가 같다 - 마크업이 단추들 뒤에 있어 열린 팝오버가 위에 그려진다(사진 보기는 그보다 위). */
.desk-settings { position: fixed; right: 18px; bottom: 18px; z-index: 1200; }
.desk-settings-trigger { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px 0 14px; border: 1px solid var(--brand-border-strong); border-radius: 999px; background: color-mix(in srgb, var(--brand-surface) 92%, transparent); color: var(--brand-text-secondary); font: inherit; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast); }
.desk-settings-trigger svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.desk-settings-trigger:hover, .desk-settings.is-open .desk-settings-trigger { border-color: var(--brand-text-primary); color: var(--brand-text-primary); }
.desk-settings.is-open .desk-settings-trigger svg { transform: rotate(60deg); }
.desk-settings-trigger:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
/* 휴대폰: 글자 든 알약(81×44)이 오른쪽 아래 내용(홈 일정 판 단추 · 가계부 연필 · 로그인 '둘러보기')을 늘 덮었다.
   톱니만 남긴 40px 동그라미로 줄이고 스크롤 단추도 같이 줄여 붙인다.  '설정' 글자는 화면에서만 숨긴다(읽기 프로그램은
   그대로 읽는다).  본문 아래에는 단추 몫의 여백을 둬 맨 아래까지 내리면 가려진 것이 단추 위로 나온다(전수조사 2026-11-07). */
@media (max-width: 640px) {
  .desk-settings { right: 12px; bottom: 12px; }
  .desk-settings-trigger { justify-content: center; width: 40px; min-height: 40px; height: 40px; padding: 0; }
  .desk-settings-trigger span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .desk-settings-trigger svg { width: 18px; height: 18px; }
  .desk-settings-panel { max-width: calc(100vw - 24px); }
  .scroll-edge-button { width: 40px; height: 40px; }
  .back-to-bottom { right: 12px; bottom: 60px; }
  .back-to-top { right: 12px; bottom: 108px; }
  main.page-container { padding-bottom: 72px; }
}
.desk-settings-panel { position: absolute; right: 0; bottom: calc(100% + 8px); width: 300px; max-width: calc(100vw - 36px); max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; padding: 6px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface); color: var(--brand-text-primary); font-size: 14px; text-align: left; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 12px 28px -6px rgba(0, 0, 0, 0.16); transform-origin: bottom right; }
.desk-settings-panel[hidden] { display: none; }
.desk-settings-panel[data-state="open"] { animation: desk-pop-in .16s cubic-bezier(.16, 1, .3, 1); }
.desk-settings-panel[data-state="closed"] { animation: desk-pop-out .12s ease forwards; }
html[data-theme="dark"] .desk-settings-panel { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 16px 36px -8px rgba(0, 0, 0, 0.7); }
@keyframes desk-pop-in { from { opacity: 0; transform: translateY(4px) scale(.95); } }
@keyframes desk-pop-out { to { opacity: 0; transform: translateY(4px) scale(.95); } }
/* 테마 줄: 이름 | 라이트 · 다크 · 시스템 세그먼트 - 글자는 늘 한 줄 */
.desk-settings-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px 4px 10px; }
.desk-settings-label { flex: none; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; white-space: nowrap; }
.desk-settings-seg { display: inline-flex; flex: none; gap: 2px; padding: 3px; border: 1px solid var(--brand-border); border-radius: 9px; background: var(--brand-surface-muted); }
.desk-settings-seg-btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; white-space: nowrap; border: 0; border-radius: 6px; background: transparent; color: var(--brand-text-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast); }
.desk-settings-seg-btn svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.desk-settings-seg-btn:hover { color: var(--brand-text-primary); }
.desk-settings-seg-btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.desk-settings-seg-btn.is-active { background: var(--brand-surface); color: var(--brand-text-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--brand-border); }
html[data-theme="dark"] .desk-settings-seg { background: var(--brand-bg); }
html[data-theme="dark"] .desk-settings-seg-btn.is-active { background: var(--brand-border); box-shadow: none; }
.desk-settings-sep { height: 1px; margin: 6px -6px; background: var(--brand-border); }
/* PC 위젯 색 (PC 프로그램 안에서만, js/widget-colors.js) */
.desk-settings-colors { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px 10px; }
.desk-settings-color { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-text-secondary); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.desk-settings-color input[type="color"] { flex: none; width: 28px; height: 28px; padding: 2px; border: 1px solid var(--brand-border); border-radius: 7px; background: var(--brand-surface); cursor: pointer; }
.desk-settings-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.desk-settings-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.desk-settings-color input[type="color"]:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.desk-settings-reset { margin-left: auto; height: 28px; padding: 0 10px; border: 1px solid var(--brand-border); border-radius: 7px; background: transparent; color: var(--brand-text-secondary); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.desk-settings-reset:hover { border-color: var(--brand-text-primary); color: var(--brand-text-primary); }
.desk-settings-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 4px 4px 10px; }
.desk-settings-swatch { width: 20px; height: 20px; padding: 0; border: 1px solid var(--brand-border-strong); border-radius: 50%; background: var(--sw); cursor: pointer; transition: transform var(--transition-fast); }
.desk-settings-swatch:hover { transform: scale(1.12); }
.desk-settings-swatch:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
/* 메뉴 항목: 아이콘 + 글자 한 줄 */
.desk-settings-menu { display: grid; gap: 2px; }
.desk-settings-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--brand-text-primary); font: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; text-align: left; text-decoration: none; cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast); }
.desk-settings-item svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--brand-text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.desk-settings-item:hover, .desk-settings-item:focus-visible { background: var(--brand-surface-muted); color: var(--brand-text-primary); text-decoration: none; outline: none; }
.desk-settings-item:focus-visible { box-shadow: 0 0 0 2px var(--brand-accent) inset; }
.desk-settings-item[aria-current="page"] { font-weight: 600; }
.desk-settings-item[aria-current="page"] svg { stroke: var(--brand-accent); }
/* 설정 › 증명서 인쇄 하위 메뉴(재직증명서 · 급여명세서 · 설정) - 아이콘 자리만큼 들여 쓴다 */
.desk-settings-sub { display: grid; gap: 1px; margin: -2px 0 2px 18px; padding-left: 8px; border-left: 1px solid var(--brand-border); }
.desk-settings-item.is-sub { min-height: 30px; padding: 0 10px; color: var(--brand-text-secondary); font-size: 13px; }
.desk-settings-item.is-sub[aria-current="page"] { color: var(--text-accent, var(--brand-accent)); }
.desk-settings-logout { margin: 0; }
.desk-settings-item.is-danger { color: var(--brand-danger); }
.desk-settings-item.is-danger svg { stroke: currentColor; }
.desk-settings-item.is-danger:hover, .desk-settings-item.is-danger:focus-visible { background: color-mix(in srgb, var(--brand-danger) 10%, var(--brand-surface)); color: var(--brand-danger); }
html[data-theme="dark"] .desk-settings-item.is-danger { color: color-mix(in srgb, var(--brand-danger) 72%, var(--brand-text-primary)); }

/* 일정 창 아래 단추: 휴대폰 폭에서는 두 칸씩 */
@media (max-width: 480px) {
  .desk-sched-foot { display: grid; grid-template-columns: 1fr 1fr; }
  .desk-sched-spacer { display: none; }
  .desk-sched-foot .mydesk-pill { width: 100%; padding-inline: 10px; }
}

/* ---- Lucide 아이콘: 메뉴 · 일정 ---- */
.mydesk-nav-links a { display: inline-flex; align-items: center; gap: 5px; }
.mydesk-nav-ico { flex: none; width: 15px; height: 15px; opacity: .78; }
.mydesk-nav-links a.is-active .mydesk-nav-ico, .mydesk-nav-links a:hover .mydesk-nav-ico { opacity: 1; }
@media (max-width: 560px) { .mydesk-nav-ico { width: 14px; height: 14px; } .mydesk-nav-links a { gap: 4px; } }
.desk-cal .ec-ico { flex: none; width: 12px; height: 12px; color: var(--kind); stroke-width: 2.4; }
.ec-chip.has-icon { padding-left: 4px; }
.ec-bar .ec-ico { margin-right: 5px; }
.ec-tg-event strong { display: flex; align-items: center; gap: 4px; }
.ec-tg-event .ec-ico { color: color-mix(in srgb, var(--kind) 85%, var(--brand-text-primary)); }
.ec-agenda-item .ec-agenda-ico { width: 14px; height: 14px; justify-self: center; }
.ec-agenda-item { grid-template-columns: 14px 92px minmax(0, 1fr) auto; }
@media (max-width: 560px) { .ec-agenda-item { grid-template-columns: 14px 70px minmax(0, 1fr); } }
.desk-cal-item-title { display: flex; align-items: flex-start; gap: 7px; }
.desk-cal-item-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: -2px; border-radius: 7px; background: color-mix(in srgb, var(--kind) 14%, var(--brand-surface)); color: var(--kind); }
.desk-cal-item-ico svg { width: 15px; height: 15px; }

/* 일정 창 아이콘 고르기 */
.desk-sched-titlerow { position: relative; display: flex; align-items: stretch; gap: 8px; }
.desk-sched-titlerow > input { flex: 1; }
.desk-icon-pick { position: static; }
.desk-icon-current { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px dashed var(--brand-border-strong); border-radius: 10px; background: var(--brand-bg); color: var(--brand-text-muted); cursor: pointer; list-style: none; transition: border-color var(--transition-fast), background-color var(--transition-fast); }
.desk-icon-current::-webkit-details-marker { display: none; }
.desk-icon-current:hover, .desk-icon-pick[open] .desk-icon-current { border-color: var(--brand-accent); color: var(--text-accent, var(--brand-accent)); }
.desk-icon-pick.has-icon .desk-icon-current { border-style: solid; border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--brand-border)); background: color-mix(in srgb, var(--brand-accent) 10%, var(--brand-surface)); color: var(--text-accent, var(--brand-accent)); }
.desk-icon-preview, .desk-icon-empty { display: inline-flex; }
.desk-icon-pick .desk-icon-preview { display: none; }
.desk-icon-pick.has-icon .desk-icon-preview { display: inline-flex; }
.desk-icon-pick.has-icon .desk-icon-empty { display: none; }
.desk-icon-panel { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 6; max-height: min(420px, 60dvh); overflow-y: auto; padding: 12px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface); box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.desk-icon-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.desk-icon-head strong { font-size: 13px; }
.desk-icon-none { position: relative; cursor: pointer; }
.desk-icon-none input, .desk-icon-opt input { position: absolute; opacity: 0; pointer-events: none; }
.desk-icon-none span { display: inline-flex; padding: 3px 10px; border: 1px solid var(--brand-border); border-radius: 999px; color: var(--brand-text-secondary); font-size: 12px; font-weight: 600; }
.desk-icon-none input:checked + span { border-color: var(--brand-accent); color: var(--text-accent, var(--brand-accent)); }
.desk-icon-group { margin: 10px 0 6px; color: var(--brand-text-muted); font-size: 11.5px; font-weight: 600; }
.desk-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; }
.desk-icon-opt { position: relative; cursor: pointer; }
.desk-icon-opt span { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 9px; color: var(--brand-text-secondary); transition: background-color var(--transition-fast), color var(--transition-fast); }
.desk-icon-opt:hover span { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
.desk-icon-opt input:checked + span { background: var(--brand-accent); color: var(--brand-on-accent); }
.desk-icon-opt input:focus-visible + span, .desk-icon-none input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 1px; }

/* ---- 토글(접고 펴기) 공용: shadcn Accordion 모양 ----
   <details class="desk-acc"> 하나 = 아코디언 한 칸.  제목 줄 왼쪽 글자 · 오른쪽 아래 화살표(펴면 뒤집힘),
   마우스를 올리면 밑줄, 칸 아래 가는 줄.  여닫을 때 높이가 부드럽게 바뀐다(desk-accordion.js). */
details.desk-acc { border-bottom: 1px solid var(--brand-border); }
details.desk-acc > summary { display: flex; align-items: center; gap: 10px; padding: 16px 0; list-style: none; cursor: pointer; color: var(--brand-text-primary); font-size: 15px; font-weight: 500; text-align: left; text-underline-offset: 4px; transition: color var(--transition-fast); }
details.desk-acc > summary::-webkit-details-marker { display: none; }
details.desk-acc > summary::marker { content: ""; }
details.desk-acc > summary:hover { text-decoration: underline; }
details.desk-acc > summary:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; border-radius: 6px; }
details.desk-acc > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: -4px 4px 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .7; transform: rotate(45deg); transition: transform .2s ease, margin .2s ease; }
details.desk-acc[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
details.desk-acc.is-closing > summary::after { margin-top: -4px; transform: rotate(45deg); }
details.desk-acc > :not(summary) { font-size: 14px; }
details.desk-acc[open] > summary + * { margin-top: 0; }
details.desk-acc[open] { padding-bottom: 16px; }
details.desk-acc.is-animating { overflow: hidden; }
/* 각 기능이 따로 그리던 왼쪽 화살표는 숨긴다(오른쪽 공용 화살표 하나만) */
details.desk-acc > summary .td-done-chevron, details.desk-acc > summary .lk-group-chevron { display: none; }
/* 카드(panel) 안에 든 토글: 카드는 그대로, 제목 줄만 아코디언 모양 */
details.desk-acc.panel { border-bottom: 1px solid var(--brand-border); padding-top: 4px; padding-bottom: 4px; }
details.desk-acc.panel[open] { padding-bottom: 20px; }
details.desk-acc.panel > summary { margin: 0; }
/* 테두리 상자인 필터 칸: 제목 줄을 상자 안쪽으로 띄우고, 펼친 아래 여백은 안의 폼이 맡는다 */
details.desk-acc.wc-filter-shell > summary, details.desk-acc.subscriptions-filter-shell > summary { padding-inline: 16px; }
details.desk-acc.wc-filter-shell[open], details.desk-acc.subscriptions-filter-shell[open] { padding-bottom: 0; }

/* ---- 홈 달력 위 바로가기 줄 (logo-cloud-10 모양) ----
   테두리 상자 하나를 칸으로 나누고(칸 사이 세로줄, 홀수 칸은 옅은 바탕), 상자의 네 모서리에서
   점선이 바깥으로 뻗어 흐려진다.  상자는 내용만큼 넓고 가운데 - 넘치면 상자 안에서 옆으로 민다. */
.desk-shortcuts { margin: 14px 0 34px; }
.desk-sc-frame { position: relative; width: fit-content; max-width: calc(100% - 96px); margin: 0 auto; }
.desk-sc-row { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; border: 1px solid var(--brand-border); background: var(--brand-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.desk-sc-row::-webkit-scrollbar { display: none; }
.desk-sc { position: relative; flex: none; border-right: 1px solid var(--brand-border); }
.desk-sc:last-child { border-right: 0; }
.desk-sc:nth-child(odd) { background: color-mix(in srgb, var(--brand-surface-muted) 60%, transparent); }
.desk-sc.is-dragging { opacity: .35; }
.desk-sc-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; width: 116px; height: 96px; padding: 12px 10px; border: 0; border-radius: 0; background: none; color: color-mix(in srgb, var(--brand-text-primary) 80%, transparent); font: inherit; text-decoration: none; cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast); }
.desk-sc-link:hover { background: color-mix(in srgb, var(--brand-text-primary) 5%, transparent); color: var(--brand-text-primary); text-decoration: none; }
.desk-sc-link:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -2px; }
.desk-sc-icon { position: relative; display: grid; place-items: center; height: 30px; min-width: 30px; font-size: 20px; font-weight: 700; line-height: 1; transition: transform .18s var(--ease-bounce, ease); }
.desk-sc-link:hover .desk-sc-icon { transform: translateY(-2px); }
.desk-sc-letter { grid-area: 1 / 1; }
.desk-sc-favicon { grid-area: 1 / 1; width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.desk-sc-favicon[hidden] { display: none; }
.desk-sc-icon.has-favicon .desk-sc-letter { visibility: hidden; }
.desk-sc-icon.is-lucide svg { width: 28px; height: 28px; stroke-width: 1.75; }
.desk-sc-name { max-width: 100%; overflow: hidden; color: var(--brand-text-secondary); font-size: 12px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.desk-sc-add .desk-sc-icon { color: var(--brand-text-muted); font-size: 26px; font-weight: 300; }
.desk-sc-add:hover .desk-sc-icon { color: var(--text-accent, var(--brand-accent)); }
.desk-sc-more { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-muted); cursor: pointer; opacity: 0; transition: opacity var(--transition-fast); }
.desk-sc-more svg { width: 12px; height: 12px; }
/* 터치는 누른 뒤 :hover 가 남으므로 마우스 화면에서만 올리면 연필 */
@media (hover: hover) { .desk-sc:hover .desk-sc-more { opacity: 1; } }
.desk-sc-more:focus-visible { opacity: 1; }
.desk-sc-more:hover { color: var(--brand-text-primary); }
/* 연필은 마우스면 올렸을 때, 아니면 '편집' 칸을 눌렀을 때(is-editing).  편집 중에는
   칸을 눌러도 사이트로 가지 않고 고치기 창이 열린다(js/desk-shortcuts.js). */
.desk-shortcuts.is-editing .desk-sc-more { opacity: 1; }
.desk-shortcuts.is-editing .desk-sc[data-sc-id] .desk-sc-icon { animation: desk-sc-wiggle .32s ease-in-out infinite alternate; }
.desk-sc-icon.is-tool { color: var(--brand-text-muted); }
.desk-sc-icon.is-tool svg { width: 22px; height: 22px; stroke-width: 1.9; }
.desk-shortcuts.is-editing .desk-sc-edit .desk-sc-icon { color: var(--text-accent, var(--brand-accent)); }
@keyframes desk-sc-wiggle { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
/* ◀ ▶ 순서 옮기기: 편집 중에만.  맨 앞 칸의 ◀ 와 맨 뒤 칸의 ▶ 는 자리만 지킨다 */
.desk-sc-move { position: absolute; right: 0; bottom: 4px; left: 0; display: none; justify-content: space-between; padding: 0 4px; pointer-events: none; }
.desk-shortcuts.is-editing .desk-sc-move { display: flex; }
.desk-shortcuts.is-editing .desk-sc[data-sc-id] .desk-sc-link { padding-bottom: 22px; }
.desk-sc-move button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 20px; padding: 0; border: 1px solid var(--brand-border); border-radius: 6px; background: var(--brand-surface); color: var(--brand-text-secondary); cursor: pointer; pointer-events: auto; }
.desk-sc-move button:hover { border-color: var(--brand-accent); color: var(--text-accent, var(--brand-accent)); }
.desk-sc-move svg { width: 14px; height: 14px; }
.desk-sc[data-sc-id]:first-child [data-sc-move="-1"], .desk-sc[data-sc-id]:has(+ .is-add) [data-sc-move="1"] { visibility: hidden; }
/* 모서리 점선: 가로 넷(위·아래 × 좌·우) · 세로 넷, 상자에서 멀어질수록 흐려진다 */
.desk-sc-guide { position: absolute; pointer-events: none; border-color: var(--brand-border-strong, var(--brand-border)); border-style: dashed; border-width: 0; }
.desk-sc-guide.is-h { width: 48px; height: 0; border-bottom-width: 1px; }
.desk-sc-guide.is-v { width: 0; height: 48px; border-left-width: 1px; }
.desk-sc-guide.is-tl-h { top: 0; left: 0; transform: translateX(-100%); -webkit-mask-image: linear-gradient(to left, #000, transparent); mask-image: linear-gradient(to left, #000, transparent); }
.desk-sc-guide.is-tr-h { top: 0; right: 0; transform: translateX(100%); -webkit-mask-image: linear-gradient(to right, #000, transparent); mask-image: linear-gradient(to right, #000, transparent); }
.desk-sc-guide.is-bl-h { bottom: 0; left: 0; transform: translate(-100%, 1px); -webkit-mask-image: linear-gradient(to left, #000, transparent); mask-image: linear-gradient(to left, #000, transparent); }
.desk-sc-guide.is-br-h { bottom: 0; right: 0; transform: translate(100%, 1px); -webkit-mask-image: linear-gradient(to right, #000, transparent); mask-image: linear-gradient(to right, #000, transparent); }
.desk-sc-guide.is-tl-v { top: 0; left: 0; transform: translateY(-100%); -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
.desk-sc-guide.is-tr-v { top: 0; right: 0; transform: translate(1px, -100%); -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
.desk-sc-guide.is-bl-v { bottom: 0; left: 0; transform: translateY(100%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
.desk-sc-guide.is-br-v { bottom: 0; right: 0; transform: translate(1px, 100%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }
@media (max-width: 640px) {
  .desk-shortcuts { margin: 8px 0 24px; }
  .desk-sc-frame { max-width: calc(100% - 48px); }
  .desk-sc-link { width: 84px; height: 82px; gap: 7px; padding: 10px 6px; }
  .desk-sc-icon { height: 26px; min-width: 26px; }
  .desk-sc-favicon, .desk-sc-icon.is-lucide svg { width: 24px; height: 24px; }
  .desk-sc-guide.is-h { width: 24px; }
  .desk-sc-guide.is-v { height: 24px; }
}
/* 추가 · 고치기 창 */
.desk-sc-dialog { width: min(420px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--brand-border); border-radius: 18px; background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.desk-sc-dialog:not([open]), .desk-sc-dialog [hidden] { display: none !important; }
.desk-sc-dialog::backdrop { background: rgba(10, 12, 20, .5); }
.desk-sc-dialog form { display: grid; gap: 14px; padding: 20px; }
.desk-sc-dialog h2 { margin: 0; font-size: 1.1rem; }
.desk-sc-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-text-secondary); }
.desk-sc-field small { font-weight: 400; color: var(--brand-text-muted); }
.desk-sc-field input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-bg); color: var(--brand-text-primary); font: inherit; font-size: 14px; }
.desk-sc-field input:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.desk-sc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.desk-sc-foot { display: flex; align-items: center; gap: 8px; }
.desk-sc-spacer { flex: 1; }
.desk-sc-dialog .desk-icon-panel { max-height: min(360px, 50dvh); }

/* ---- 상단 검색 (포켓몬허브 섬 메뉴 돋보기 모양) ----
   단추는 종 · 빠른 수집과 같은 동그라미, 입력 칸은 막대 아래에 뜨는 알약. */
.desk-topsearch { position: static; flex: none; }
/* 말 고르기 국기(2026-11-16) - 검색 단추와 같은 동그라미, 누르면 아래로 작은 목록 */
.desk-lang { position: relative; flex: none; }
.desk-lang-btn { padding: 0; overflow: hidden; }
.desk-lang-btn .desk-lang-flag { width: 24px; height: 24px; }
.desk-lang-flag { display: block; flex: none; border-radius: 50%; }
.desk-lang-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; display: grid; gap: 2px; width: 240px; padding: 6px; border: 1px solid var(--brand-border); border-radius: 14px; background: var(--brand-surface); box-shadow: 0 16px 40px rgba(0, 0, 0, .14); animation: mydesk-nav-panel-in .16s ease-out; }
html[data-theme="dark"] .desk-lang-menu { box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.desk-lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--brand-text-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.desk-lang-menu a:hover { background: var(--brand-surface-muted); text-decoration: none; }
.desk-lang-menu a[aria-current="true"] { background: color-mix(in srgb, var(--brand-accent) 10%, transparent); color: var(--text-accent, var(--brand-accent)); }
/* 좁은 화면 - 단추 아래로 펼치면 왼쪽으로 넘친다.  검색 칸처럼 메뉴 막대의 오른쪽 끝에 맞춘다 */
@media (max-width: 720px) { .desk-lang { position: static; } .desk-lang-menu { right: 0; max-width: calc(100vw - 32px); } }
.desk-topsearch-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); list-style: none; cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
.desk-topsearch-btn::-webkit-details-marker { display: none; }
.desk-topsearch-btn:hover, .desk-topsearch[open] .desk-topsearch-btn { border-color: var(--brand-border-strong, var(--brand-border)); background: color-mix(in srgb, var(--brand-text-primary) 6%, var(--brand-surface-muted)); color: var(--brand-text-primary); }
.desk-topsearch-btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.desk-topsearch-panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; display: flex; align-items: center; gap: 6px; width: min(480px, 100%); margin: 0; padding: 6px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); box-shadow: 0 16px 40px rgba(0, 0, 0, .14); animation: mydesk-nav-panel-in .16s ease-out; }
html[data-theme="dark"] .desk-topsearch-panel { box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.desk-topsearch-panel:focus-within { border-color: var(--brand-accent); }
.desk-topsearch-panel input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; background: none; color: var(--brand-text-primary); font: inherit; font-size: 14px; font-weight: 600; outline: none; box-shadow: none; -webkit-appearance: none; appearance: none; }
.desk-topsearch-panel input::placeholder { color: var(--brand-text-muted); font-weight: 500; }
.desk-topsearch-panel button { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: var(--brand-accent); color: var(--brand-on-accent); cursor: pointer; }
@media (max-width: 640px) {
  .desk-topsearch-btn { width: 38px; height: 38px; }
  .desk-topsearch-panel { right: 0; left: 0; width: auto; }
}

/* ---- 검색 화면 ---- */
.desk-search-page { max-width: 960px; }
.desk-search-box { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; padding: 6px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.desk-search-box:focus-within { border-color: var(--brand-accent); }
/* 검색 칸 왼쪽 '어디서 찾기': 올독 · 파일 · 구글 · 네이버 (알약 안의 작은 알약 고르기, Tab 으로 넘긴다) */
.desk-engine { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 999px; background: var(--brand-surface-muted); }
.desk-engine label { position: relative; cursor: pointer; }
.desk-engine input { position: absolute; opacity: 0; pointer-events: none; }
.desk-engine span { display: block; padding: 5px 10px; border-radius: 999px; color: var(--brand-text-muted); font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: background-color var(--transition-fast), color var(--transition-fast); }
.desk-engine label:hover span { color: var(--brand-text-primary); }
.desk-engine input:checked + span { background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.desk-engine .is-naver input:checked + span { background: #03c75a; color: #fff; }
.desk-engine .is-google input:checked + span { background: #4285f4; color: #fff; }
.desk-engine input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.desk-topsearch-panel input[type=search] { padding-left: 4px !important; }
@media (max-width: 420px) { .desk-engine span { padding: 5px 7px; font-size: 11.5px; } }
.desk-search-box input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; background: none; color: var(--brand-text-primary); font: inherit; font-size: 15px; outline: none; box-shadow: none; }
.desk-search-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.desk-search-mail { margin: -6px 0 14px; font-size: var(--text-sm); }
.desk-search-mail a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-text-secondary); text-decoration: none; }
.desk-search-mail a:hover { color: var(--text-accent, var(--brand-accent)); }
.desk-search-kinds a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; text-decoration: none; }
.desk-search-kinds a b { color: var(--brand-text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.desk-search-kinds a:hover { color: var(--brand-text-primary); text-decoration: none; }
.desk-search-kinds a.is-active { border-color: transparent; background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); }
.desk-search-kinds a.is-active b { color: inherit; }
.desk-search-kinds svg { width: 14px; height: 14px; }
.desk-search-group { margin: 0 0 16px; padding: 14px 16px 10px; border: 1px solid var(--brand-border); border-radius: 16px; background: var(--brand-surface); }
.desk-search-group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; }
.desk-search-group h2 svg { width: 16px; height: 16px; color: var(--text-accent, var(--brand-accent)); }
.desk-search-group h2 small { color: var(--brand-text-muted); font-size: 12px; font-weight: 600; }
.desk-search-group ul { margin: 0; padding: 0; list-style: none; }
.desk-search-group li { position: relative; display: flex; align-items: stretch; border-top: 1px solid color-mix(in srgb, var(--brand-border) 70%, transparent); }
.desk-search-group li:first-child { border-top: 0; }
.desk-search-hit { display: grid; flex: 1; gap: 3px; min-width: 0; padding: 10px 6px; border-radius: 10px; color: var(--brand-text-primary); text-decoration: none; }
.desk-search-hit:hover { background: var(--brand-surface-muted); text-decoration: none; }
.desk-search-hit strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.desk-search-snippet { display: -webkit-box; overflow: hidden; color: var(--brand-text-secondary); font-size: 13px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.desk-search-hit small { color: var(--brand-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.desk-search-hit mark { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, #facc15 45%, transparent); color: inherit; }
.desk-search-out { display: grid; place-items: center; flex: none; width: 36px; color: var(--brand-text-muted); }
.desk-search-out:hover { color: var(--text-accent, var(--brand-accent)); }
.desk-search-more { display: inline-block; margin: 6px 6px 4px; color: var(--text-accent, var(--brand-accent)); font-size: 13px; font-weight: 600; text-decoration: none; }
.desk-search-empty kbd { padding: 1px 6px; border: 1px solid var(--brand-border); border-bottom-width: 2px; border-radius: 5px; font-size: 12px; }
/* 공용 입력칸 테두리 · 초점 고리는 알약 바깥(focus-within)에만 - 안쪽 칸은 맨몸 */
.desk-topsearch-panel input[type=search], .desk-search-box input[type=search] { min-height: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; outline: none !important; padding: 0 !important; }
.desk-topsearch-panel input[type=search]::-webkit-search-cancel-button, .desk-search-box input[type=search]::-webkit-search-cancel-button { cursor: pointer; }

/* 업무노트 상세 첨부 - 드라이브 사본 링크 */
/* 업무노트 우선순위 '높음' 배지: 라이트에서 경고 주황(#f59e0b)이 연한 바탕 위 1.88:1 - 진한 호박색으로(전수조사 2026-11-07).
   dashboard.css 가 !important 로 박아 두어 같이 올린다. */
html[data-theme="light"] .work-note-priority.priority-high { color: #92400e !important; }
.work-note-download-row { display: flex; gap: 8px; min-width: 0; }
.work-note-download-row > a:first-child { flex: 1; min-width: 0; }
.work-note-downloads a.work-note-drive { flex: none; font-size: 12px; font-weight: 700; }

/* 관련 항목(_related.html) - 업무노트 · 회의록 상세에서 이 기록으로 만든 할 일 · 일정 */
.desk-related { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface-muted, rgba(127,127,127,.06)); }
.desk-related h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--text-sm); font-weight: 700; }
.desk-related h2 small { color: var(--brand-text-muted); font-weight: 600; }
.desk-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.desk-related li { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: var(--text-sm); }
.desk-related li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font-weight: 600; text-decoration: none; }
.desk-related li a:hover { color: var(--text-accent, var(--brand-accent)); text-decoration: underline; }
.desk-related li small { flex: none; color: var(--brand-text-muted); font-size: var(--text-xs); }
.desk-related-kind { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--brand-surface); border: 1px solid var(--brand-border); color: var(--brand-text-secondary); font-size: var(--text-xs); font-weight: 700; }
/* 다른 기능으로 넘기는 단추 줄(업무노트 상세 '할 일로 · 일정으로 · 회의록으로') */
.desk-handoff { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.desk-handoff form { display: contents; }
.desk-handoff .mydesk-pill svg { margin-right: 4px; vertical-align: -2px; }
/* 보관함 스크랩 주소 옆 '링크로 저장 · 링크에 있음' */
.vault-url-pill { margin-left: 8px; padding: 2px 10px; font-size: 12px; vertical-align: 2px; }
.vault-url-pill svg { margin-right: 4px; vertical-align: -2px; }
/* 다이어리 상세 날짜 옆 '이 날 일정' · 홈 달력 당일 목록의 '다이어리 쓰기' */
.diary-day-link { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--brand-text-secondary); font-size: 12px; font-weight: 600; text-decoration: none; }
.diary-day-link:hover { color: var(--text-accent, var(--brand-accent)); text-decoration: underline; }
.desk-cal-list-head h2 { margin-right: auto; }
.desk-cal-list-diary { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-secondary); text-decoration: none; }
.desk-cal-list-diary:hover { border-color: var(--brand-accent); color: var(--text-accent, var(--brand-accent)); }

/* 계정 보안 › 연결된 PC 프로그램 */
.desk-pc-app { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 12px; margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--brand-border); border-radius: 12px; }
.desk-pc-app > div { display: grid; flex: 1 1 220px; gap: 2px; min-width: 0; }
.desk-pc-app small { color: var(--brand-text-muted); }
/* 설정 › 다운로드 - 카드 하나라 두 칸 배치 대신 한 칸 */
/* 설정 › 다운로드 - 제목과 카드를 한 폭(820px)으로 묶어 가운데에(2026-11-10 사용자) */
.desk-downloads-page { max-width: calc(820px + 2 * var(--shell-gutter, 24px)); }
.desk-downloads-grid { grid-template-columns: minmax(0, 1fr); }
.desk-store-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; padding: 10px 14px; border: 1px dashed var(--brand-border); border-radius: 12px; }
.desk-store-files small { flex-basis: 100%; color: var(--brand-text-muted); }
/* 휴대폰 폭에서 화면이 옆으로 삐져나오던 것(2026-11-14 사용자, 앱 다운로드 탭) - 끊을 곳 없는 지문(sha256) 한 줄이
   칸 전체를 그 길이로 늘렸다.  지문은 아무 데서나 줄을 바꾸고, 칸 · 줄은 화면보다 넓어지지 않게. */
.desk-downloads-grid > *, .desk-pc-app, .desk-store-files { min-width: 0; max-width: 100%; }
.desk-store-sha { flex-basis: 100%; min-width: 0; }
.desk-store-sha code { overflow-wrap: anywhere; word-break: break-all; }
.desk-device-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.desk-device-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--brand-border); border-radius: 10px; }
.desk-device-list li > div { display: grid; gap: 2px; min-width: 0; }
.desk-device-list strong { overflow-wrap: anywhere; }
.desk-device-list small { color: var(--brand-text-secondary); }
.desk-device-list li.is-revoked > div { opacity: 0.55; }
.desk-device-clear { display: flex; justify-content: flex-end; margin: 0; }
.desk-device-manual { display: grid; gap: 10px; }
.desk-device-manual > summary { cursor: pointer; color: var(--brand-text-secondary); font-size: 14px; font-weight: 600; }
.desk-device-manual > p { margin: 0; }
.mydesk-device-token code { display: block; padding: 12px; border: 1px solid #333; border-radius: 8px; background: #0b0b0b; color: #fff; font-size: 0.9rem; overflow-wrap: anywhere; user-select: all; }

/* 어두운 화면 - 붙여 넣은 글의 검은 글자 · 흰 바탕(js/desk-contrast.js 가 data-contrast 로 표시) */
html[data-theme="dark"] [data-contrast~="fg"] { color: var(--brand-text-primary) !important; }
html[data-theme="dark"] [data-contrast~="bg"] { background-color: transparent !important; }

/* 쓰던 내용 지키기(desk-keep.js) - 되살렸을 때 아래 가운데 한 줄 */
.desk-keep-bar { position: fixed; left: 50%; bottom: 22px; z-index: 1300; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 9px 10px 9px 16px; transform: translateX(-50%); border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 10px 30px rgba(0, 0, 0, .14); font-size: 13px; font-weight: 600; transition: opacity .3s; }
.desk-keep-bar button { min-height: 0; margin: 0; padding: 5px 11px; border: 1px solid var(--brand-border); border-radius: 999px; background: transparent; color: var(--brand-text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.desk-keep-bar button:hover { color: var(--brand-text-primary); }
.desk-keep-bar .desk-keep-close { padding: 2px 8px; border: 0; font-size: 16px; line-height: 1; }
.desk-keep-bar.is-quiet { opacity: .55; }
.desk-keep-bar.is-quiet:hover { opacity: 1; }

/* ---- 설정 › 회원 관리 · 설치 통계(admin_members.py, 2026-11-07) ---- */
.am-page { display: grid; gap: 18px; }
.am-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.am-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--brand-border); border-radius: 999px; color: var(--brand-text-secondary); font-size: 14px; font-weight: 600; text-decoration: none; }
.am-tabs a[aria-current="page"] { border-color: transparent; background: var(--brand-text-primary); color: var(--brand-surface); }
.am-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.am-kpis-inline { margin: 12px 0 14px; }
.am-kpi { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--brand-border); border-radius: var(--radius-lg); background: var(--brand-surface); }
.am-kpi p { margin: 0; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; }
.am-kpi strong { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.am-kpi small, .am-kpi a { color: var(--brand-text-secondary); font-size: 12px; }
.am-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.am-filter label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--brand-text-secondary); }
.am-filter input, .am-filter select { min-width: 180px; padding: 9px 12px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; }
.am-table-wrap { overflow-x: auto; }
.am-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.am-table th { padding: 8px 10px; border-bottom: 1px solid var(--brand-border); color: var(--brand-text-secondary); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.am-table td { padding: 10px; border-bottom: 1px solid var(--brand-border); vertical-align: middle; white-space: nowrap; }
.am-table tr.is-muted td { color: var(--brand-text-secondary); }
.am-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.am-actions form { margin: 0; }
.am-actions .mydesk-pill { padding: 6px 12px; font-size: 13px; }
.am-badge { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand-accent) 14%, var(--brand-surface)); color: var(--text-accent, var(--brand-accent)); font-size: 12px; font-weight: 700; }
.am-badge.is-off { background: color-mix(in srgb, var(--brand-danger) 12%, var(--brand-surface)); color: var(--brand-danger); }
.am-pager { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.am-pager a { min-width: 34px; padding: 6px 10px; border: 1px solid var(--brand-border); border-radius: 10px; text-align: center; text-decoration: none; }
.am-pager a[aria-current="page"] { background: var(--brand-text-primary); color: var(--brand-surface); }
.am-temp { max-width: 640px; }
.am-temp-code { display: block; padding: 16px; border-radius: 12px; background: var(--brand-surface-muted); font-size: 24px; font-weight: 800; letter-spacing: 0.06em; text-align: center; user-select: all; }
.am-legend { display: flex; gap: 14px; font-size: 13px; color: var(--brand-text-secondary); }
.am-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.am-legend .is-windows::before, .am-bar.is-windows { background: var(--brand-accent); }
.am-legend .is-android::before, .am-bar.is-android { background: #34a853; }
.am-bars { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.am-bars li { display: grid; grid-template-columns: 52px 1fr 36px; align-items: center; gap: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.am-bar-day { color: var(--brand-text-secondary); }
.am-bar-track { display: flex; height: 12px; border-radius: 6px; background: var(--brand-surface-muted); overflow: hidden; }
.am-bar { display: block; height: 100%; }
.am-bar-num { text-align: right; font-weight: 700; }
/* 회원 관리 고도화(2026-11-08) - 30일 세로 막대 · 회원 상세 */
.am-badge.is-gone { background: var(--brand-surface-muted); color: var(--brand-text-secondary); }
.am-sub { display: block; margin-top: 2px; color: var(--brand-text-secondary); font-size: 11px; }
.am-filter-count { align-self: flex-end; padding-bottom: 10px; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; }
.am-danger-zone code { padding: 1px 6px; border-radius: 6px; background: var(--brand-surface); font-weight: 800; }
.am-note { margin: 0; color: var(--brand-text-secondary); font-size: 12.5px; line-height: 1.6; }
.am-member-link { color: inherit; text-decoration: none; }
.am-member-link:hover strong { text-decoration: underline; }
.am-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.am-tag { display: inline-flex; padding: 1px 7px; border-radius: 6px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); font-size: 11px; font-weight: 700; }
.am-tag.is-google { background: color-mix(in srgb, #4285f4 14%, var(--brand-surface)); color: #2a6ad8; }
.am-tag.is-naver { background: color-mix(in srgb, #03c75a 14%, var(--brand-surface)); color: #029e48; }
.am-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.am-chart-head h2 { margin: 0; }
.am-legend .is-visit::before, .am-col.is-visit { background: var(--brand-accent); }
.am-legend .is-signup::before, .am-col.is-signup { background: #34a853; }
.am-legend .is-leave::before { background: var(--brand-danger); border-radius: 50%; }
.am-cols { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; margin: 14px 0 0; padding: 0; list-style: none; }
.am-cols li { display: grid; grid-template-rows: 120px auto; gap: 4px; min-width: 0; }
.am-col-bars { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 1px; border-bottom: 1px solid var(--brand-border); }
.am-col { display: block; width: 45%; max-width: 10px; min-height: 0; border-radius: 3px 3px 0 0; }
.am-col-dot { position: absolute; top: 0; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--brand-danger); }
.am-col-day { overflow: visible; color: var(--brand-text-secondary); font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.am-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.am-detail-grid .desk-card h2, .am-page > .desk-card h2 { margin-top: 0; }
.am-dl { display: grid; gap: 10px; margin: 0; }
.am-dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; }
.am-dl dt { color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; }
.am-dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.am-device { display: block; }
.am-device.is-off { color: var(--brand-text-secondary); text-decoration: line-through; }
.am-device small { color: var(--brand-text-secondary); text-decoration: none; }
.am-usage { display: block; height: 8px; margin-bottom: 4px; border-radius: 4px; background: var(--brand-surface-muted); overflow: hidden; }
.am-usage span { display: block; height: 100%; background: var(--brand-accent); }
.am-visit-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.am-visit-strip li { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.am-visit-strip li.is-on { background: color-mix(in srgb, var(--brand-accent) 35%, var(--brand-surface)); color: var(--brand-text-primary); font-weight: 700; }
.am-visit-strip li.is-busy { background: var(--brand-accent); color: var(--brand-on-accent); }
.am-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.am-counts li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--brand-surface-muted); font-size: 13px; }
.am-counts strong { font-variant-numeric: tabular-nums; }
.am-alert { padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--brand-danger) 35%, var(--brand-border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--brand-danger) 7%, var(--brand-surface)); font-size: 14px; line-height: 1.6; }
.am-withdraw-form, .am-danger-zone { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--brand-border); }
.am-withdraw-form label, .am-danger-zone label { display: grid; flex: 1 1 280px; gap: 4px; font-size: 13px; font-weight: 600; }
.am-withdraw-form small { color: var(--brand-text-secondary); font-weight: 500; }
.am-withdraw-form input, .am-danger-zone input { padding: 9px 12px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; }
.am-danger-zone { padding: 16px; border: 1px solid color-mix(in srgb, var(--brand-danger) 40%, var(--brand-border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--brand-danger) 5%, var(--brand-surface)); }
.am-danger-zone p { flex: 1 1 100%; margin: 0; font-size: 13.5px; line-height: 1.6; }
@media (max-width: 640px) {
  .am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .am-kpi { padding: 14px; }
  .am-kpi strong { font-size: 22px; }
  .am-cols li { grid-template-rows: 80px auto; }
  .am-col-day { font-size: 9px; }
  .am-dl > div { grid-template-columns: 82px 1fr; }
}
/* 계정 보안 › 탈퇴 */
.desk-withdraw { border-color: color-mix(in srgb, var(--brand-danger) 30%, var(--brand-border)); }
.desk-withdraw details summary { cursor: pointer; color: var(--brand-danger); font-weight: 700; }
.desk-withdraw .desk-form { margin-top: 12px; }

/* ---- 로그인 · 가입 개편(2026-11-07): 빛줄기 바탕 · 포켓몬허브식 카드 ---- */
.mydesk-login-beams { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; filter: blur(15px); pointer-events: none; }
.mydesk-login-beams-veil { position: fixed; inset: 0; z-index: 1; background: rgba(10, 10, 10, 0.05); -webkit-backdrop-filter: blur(50px); backdrop-filter: blur(50px); pointer-events: none; animation: mydesk-beams-veil 10s ease-in-out infinite; }
@keyframes mydesk-beams-veil { 0%, 100% { opacity: 0.05; } 50% { opacity: 0.15; } }
.mydesk-login, html[data-theme="light"] .mydesk-login { background: #0a0a0a; }
html[data-theme="light"]:has(body.mydesk-login-body), html[data-theme="light"] body.mydesk-login-body { background: #0a0a0a !important; }
.mydesk-login-stack { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 400px; }
.mydesk-login-stack .mydesk-login-card { max-width: none; }
.mydesk-login-eyebrow { margin: 0 0 0.35rem; color: #9db5ff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em; text-align: center; }
/* 라이트 카드는 흰색이라 밝은 하늘색이 2.0:1 - 인디고로(전수조사 2026-11-07) */
html[data-theme="light"] .mydesk-login-eyebrow { color: var(--text-accent, var(--mydesk-primary)); }
.mydesk-social-btn { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; padding: 0.62rem; border: 1px solid #333; border-radius: 6px; background: #fff; color: #111 !important; font-size: 0.875rem; font-weight: 600; text-decoration: none !important; }
.mydesk-social-btn:hover { filter: brightness(0.95); }
.mydesk-social-btn.is-naver { border-color: #03c75a; background: #03c75a; color: #fff !important; }
.mydesk-login-divider { display: flex; align-items: center; gap: 0.7rem; margin: 0.25rem 0; color: #777; font-size: 0.75rem; }
.mydesk-login-divider::before, .mydesk-login-divider::after { content: ""; flex: 1; height: 1px; background: #2a2a2a; }
.mydesk-login-label small { margin-left: 4px; color: #777; font-weight: 500; }
.mydesk-login-card .mydesk-login-label { text-align: left; }
.mydesk-login-pw { position: relative; }
.mydesk-login-pw .mydesk-login-input { padding-right: 4.2rem; }
.mydesk-login-peek { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); padding: 0.3rem 0.65rem; border: 0; border-radius: 4px; background: #222; color: #ccc; font: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer; }
.mydesk-login-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0.65rem 0.8rem; border: 1px solid #2a2a2a; border-radius: 8px; text-align: left; cursor: pointer; }
.mydesk-login-switch strong { display: block; color: #eee; font-size: 0.84rem; }
.mydesk-login-switch small { display: block; margin-top: 2px; color: #888; font-size: 0.74rem; line-height: 1.45; }
.mydesk-switch-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mydesk-switch { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: #333; transition: background-color 160ms ease; }
.mydesk-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 160ms ease; }
.mydesk-switch-input:checked + .mydesk-switch { background: #4d7dff; }
.mydesk-switch-input:checked + .mydesk-switch::after { transform: translateX(18px); }
.mydesk-switch-input:focus-visible + .mydesk-switch { outline: 2px solid #9db5ff; outline-offset: 2px; }
.mydesk-login-warn { margin: -0.2rem 0 0.15rem; color: #888; font-size: 0.72rem; line-height: 1.5; text-align: left; }
.mydesk-login-links { margin: 0.15rem 0 0; font-size: 0.82rem; }
.mydesk-login-links a { color: #ddd; font-weight: 600; }
.mydesk-login-guest { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 0.85rem; border: 1px dashed #333; border-radius: 12px; background: rgba(18, 18, 18, 0.65); color: #ddd !important; font-size: 0.85rem; text-decoration: none !important; }
.mydesk-login-guest span { color: #888; font-size: 0.75rem; }
.mydesk-login-guest:hover { border-color: #555; }
.mydesk-avatar-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mydesk-avatar-preview { display: inline-block; flex: none; width: 56px; height: 56px; overflow: hidden; border: 1px solid #333; border-radius: 50%; background: #1b1b1b center / cover no-repeat; }
.mydesk-avatar-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 사진이 없을 때는 사람 모양을 흐리게 - 라이트 흰 카드 위에 아이콘 없는 새까만 원이 깨진 그림처럼 보였다(전수조사 2026-11-07) */
.mydesk-avatar-preview { position: relative; }
.mydesk-avatar-preview:not(.has-photo)::before { content: ""; position: absolute; inset: 24%; background: #6b6b6b; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / contain no-repeat; }
html[data-theme="light"] .mydesk-avatar-preview { border-color: #e4e4e7; background-color: #f4f4f5; }
html[data-theme="light"] .mydesk-avatar-preview:not(.has-photo)::before { background: #a1a1aa; }
.mydesk-avatar-button { cursor: pointer; }
.mydesk-two-factor-panel[hidden] { display: none; }
form:has([data-two-factor-toggle]:not(:checked)) .mydesk-two-factor-panel { display: none; }
.desk-subhead { margin: 1rem 0 0.3rem; font-size: 0.95rem; }
html[data-theme="light"] .mydesk-login-switch strong { color: #18181b; }
html[data-theme="light"] .mydesk-login-switch, html[data-theme="light"] .mydesk-login-divider::before, html[data-theme="light"] .mydesk-login-divider::after { border-color: #e4e4e7; }
html[data-theme="light"] .mydesk-login-peek { background: #f4f4f5; color: #3f3f46; }
html[data-theme="light"] .mydesk-login-links a { color: #18181b; }
/* 카드가 화면보다 길면(휴대폰 · 소셜 단추가 붙은 로그인) 위가 잘리지 않게 - 남으면 가운데, 모자라면 위에서부터 스크롤 */
.mydesk-login:has(.mydesk-login-stack) { overflow-y: auto; align-items: flex-start; }
.mydesk-login-stack { margin: auto 0; }
@media (max-width: 640px) {
  .mydesk-login-logo { width: 96px; height: 78px; margin-bottom: 0.5rem; }
  .mydesk-login-card { padding: 1.5rem 1.25rem; }
}
/* 아직 회원에게 열지 않은 것(안드로이드 앱, 2026-11-07) - 보이되 누를 수 없게 */
.desk-pc-app.is-off { opacity: 0.6; }
.mydesk-pill.is-disabled { cursor: not-allowed; opacity: 0.6; pointer-events: none; }

/* 오류 화면(404 등) 큰 숫자: 테두리색(라이트 1.26:1 · 다크 1.19:1)으로 제목 뒤에 깔려 거의 안 보였고, 휴대폰에서는
   '페이지를 찾을 수 없' 글자 위에 겹쳤다.  제목 위 한 줄로 내리고 큰 글자 기준(3:1)을 넘는 흐린 색으로.
   제목도 낱말 단위로 줄을 바꾼다('없/습니다', 전수조사 2026-11-07). */
.error-hero .error-code { position: static; display: block; color: color-mix(in srgb, var(--brand-text-muted) 80%, var(--brand-surface)); font-size: clamp(64px, 11vw, 120px); line-height: .9; }
.error-hero h1 { word-break: keep-all; overflow-wrap: anywhere; }

/* 임시저장 불러오기 띠(js/form-draft.js) - 폼 맨 위 */
.form-draft-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--brand-accent);
  border-radius: 10px;
  background: var(--brand-surface-muted);
  color: var(--brand-text-primary);
  font-size: 0.92rem;
}
.form-draft-bar > span { flex: 1 1 180px; min-width: 0; }

/* ---- PC 프로그램 큰 창: 제목 표시줄 없이 메뉴바가 맨 위에(2026-11-13 사용자, 시안 B) ----
   PC 창(data-desk-frameless)에서만.  가운데 뜬 알약 대신 창 맨 위에 꽉 붙은 납작한 막대 - 빈 곳을 잡고 끌면 창이
   옮겨진다(WebView2 app-region).  처음부터 페이지에 그려야 화면을 옮길 때 알약이 잠깐 보였다 바뀌지 않는다. */
html[data-desk-frameless] .desk-drag { app-region: drag; -webkit-app-region: drag; }
html[data-desk-frameless] .desk-drag :is(a, button, input, select, textarea, summary, details, label, iframe, video,
  [role=button], [role=menu], [contenteditable], [data-no-drag], .desk-winctl, .mydesk-nav-panel, .mydesk-nav-menu) {
  app-region: no-drag; -webkit-app-region: no-drag; }
html[data-desk-frameless] .mydesk-nav-wrap { padding: 0 !important; display: block; background: var(--brand-surface);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-border) 85%, transparent); }
html[data-desk-frameless] .mydesk-nav { width: 100%; max-width: none; border: 0; border-radius: 0; box-shadow: none !important; }
html[data-desk-frameless] .mydesk-nav::before { border-radius: 0; background: var(--brand-surface) !important;
  backdrop-filter: none; -webkit-backdrop-filter: none; }
/* 둥근 단추(40px) 위아래가 막대에 딱 붙어 답답했다 - 위아래 9px 씩(2026-11-13 사용자) */
html[data-desk-frameless] .mydesk-nav-row { padding: 9px 148px 9px 14px; min-height: 58px; gap: 6px; }
html[data-desk-frameless] .mydesk-mark { width: 38px; height: 30px; }
html[data-desk-frameless] .mydesk-nav-links { margin-left: 6px; }
html[data-desk-frameless] .mydesk-nav-links a, html[data-desk-frameless] .mydesk-nav-links > .mydesk-nav-group {
  padding-top: 7px; padding-bottom: 7px; }
html[data-desk-frameless] .mydesk-nav-actions { margin-left: auto; }
.desk-winctl { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.desk-winctl.is-floating { position: absolute; top: 50%; right: 6px; z-index: 2; transform: translateY(-50%); }
.desk-winctl button { all: unset; box-sizing: border-box; width: 42px; height: 34px; display: grid; place-items: center;
  border-radius: 6px; color: var(--brand-text-primary, inherit); opacity: .8; cursor: default; }
.desk-winctl button:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.desk-winctl button.is-close:hover { background: #e81123; color: #fff; }
.desk-winctl .is-restore { display: none; }
html[data-desk-max] .desk-winctl .is-restore { display: grid; }
html[data-desk-max] .desk-winctl .is-maximize { display: none; }
html:not([data-desk-frameless]) .desk-winctl { display: none; }
/* 메뉴바가 없거나 숨긴 화면(로그인 · 문서 · 회의록 전체 화면) - 얇은 줄에 창 단추만 */
.desk-chromebar { position: sticky; top: 0; z-index: 2147483000; display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 4px 0 14px; background: var(--brand-surface, #fff); color: var(--brand-text-primary, inherit);
  font: 600 12px/1 var(--font-sans, "Pretendard Variable", "Pretendard", system-ui, sans-serif);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-border, #ccc) 85%, transparent); }
.desk-chromebar-title { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .75; }
.desk-chromebar .desk-winctl button { height: 30px; }
/* X 단추 옆 여백 - 페이지 오른쪽에 늘 비워 두던 스크롤 막대 자리 때문에 메뉴바가 창 끝까지 닿지 않았다(2026-11-13 사용자).
   큰 창에서는 그 자리를 없애고, 스크롤할 때 · 오른쪽 끝에 마우스를 댈 때만 얇은 막대를 위에 띄운다(desk-window.js). */
html[data-desk-frameless] { scrollbar-gutter: auto; scrollbar-width: none; }
html[data-desk-frameless]::-webkit-scrollbar { display: none; }
.desk-scroll { position: fixed; top: 0; right: 0; width: 12px; height: 100vh; z-index: 2147482000; pointer-events: none;
  opacity: 0; transition: opacity .25s; }
.desk-scroll.is-on { opacity: 1; }
.desk-scroll[hidden] { display: none; }
.desk-scroll-thumb { position: absolute; top: 0; right: 2px; width: 7px; min-height: 32px; border-radius: 99px;
  background: color-mix(in srgb, var(--brand-text-primary, #888) 38%, transparent); pointer-events: auto; cursor: default; }
.desk-scroll-thumb:hover, .desk-scroll.is-drag .desk-scroll-thumb { width: 9px; right: 1px;
  background: color-mix(in srgb, var(--brand-text-primary, #888) 55%, transparent); }

/* 로그인 계열 화면(로그인 · 가입 · 2단계 · 백업 코드 · PC 연결)은 검은 바탕 - 흐린 회색 글자를 모두 흰색으로
   (2026-11-17 사용자 '흐리멍텅한 회색 말고 흰색으로').  밝은 테마의 흰 카드 · 흰 로그인 단추 · 오류 빨강은 그대로. */
html:not([data-theme="light"]) .mydesk-login :is(p, span, small, strong, b, em, label, legend, li, dt, dd, h1, h2, h3, a, button, kbd, code):not(.is-error):not([class*="error"]):not(.mydesk-login-submit):not(.mydesk-login-submit *) { color: #fff !important; }

/* 홈 달력 끌어서 날짜 옮기기(desk-schedule.js, 2026-11-17) */
.ec-month .is-draggable { cursor: grab; }
.ec-month .is-draggable:active { cursor: grabbing; }
.ec-month .is-dragging { opacity: .45; }
.ec-month .ec-cell.is-drop { outline: 2px dashed var(--brand-highlight, #0033ff); outline-offset: -3px; background: color-mix(in srgb, var(--brand-highlight, #0033ff) 10%, transparent); }
