/* 마비옛체 — PC에 설치돼 있으면 그걸, 없으면 눈누 웹폰트 */
  @font-face {
    font-family: 'Mabiyet';
    src: local('Mabinogi_Classic'), local('마비옛체'), local('MabinogiClassic'),
         url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2207-01@1.0/MabinogiClassicR.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
  }
  :root {
    --sky: #5cb3f5;
    --sky-l: #9fd4fb;
    --sky-soft: #e7f3fe;
    --sky-rgb: 92,179,245;
    --pink: #ffb3ca;
    --pink-d: #ff96b6;
    --pink-soft: #ffe5ed;
    --win: #ffffff;
    --side: #f7f1f6;
    --line: #f0e6ee;
    --line2: #e6dce6;
    --ink: #4a4651;
    --ink-soft: #948e9d;
    --ink-faint: #bdb8c5;
    --titlebar: #ffeaf3;
    --desktop-bg: #e3f0fd;
    --label-bg: rgba(255,255,255,0.7);
    --note-bg: #fffdf7;
    --taskbar: rgba(255,255,255,0.82);
    --win-border: #d8d4dc;
    --menu-bg: rgba(255,255,255,0.92);
    --shadow: 0 16px 44px rgba(140,130,140,0.22);
    --font: 'Mabiyet', 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  * { scrollbar-width: thin; scrollbar-color: var(--sky-l) transparent; }
  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--pink);
    border-radius: 11px; border: 3px solid transparent;
    background-clip: padding-box;
  }

  html, body { height: 100%; }
  body {
    font-family: var(--font);
    color: var(--ink);
    height: 100%;
    overflow: hidden;
    background: var(--desktop-bg);
  }

  /* 사용자 지정 배경 */
  #bgLayer {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
    background-position: center; background-repeat: no-repeat;
    background-size: cover;
    display: none;
  }
  #bgLayer.on { display: block; }
  #bgDim {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none; background: #000; opacity: 0;
  }
  /* 배경 효과 입자 레이어 */
  #fxLayer {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
    display: none;
  }
  #fxLayer.on { display: block; }

  /* ===== 바탕화면 ===== */
  .desktop {
    position: fixed; left: 0; right: 0; top: 0; bottom: 44px;
    z-index: 1;
    opacity: 0;
    animation: skinReveal 0.01s linear 1.6s forwards;   /* JS가 늦거나 실패해도 1.6s 뒤 표시 */
  }
  .desktop.skin-ready { opacity: 1; animation: none; transition: opacity 0.16s ease; }
  @keyframes skinReveal { to { opacity: 1; } }
  /* 작업표시줄도 데스크톱과 함께 표시 — 하단 깜빡임(네모박스) 방지 */
  .taskbar { opacity: 0; animation: skinReveal 0.01s linear 1.6s forwards; }
  .desktop.skin-ready ~ .taskbar { opacity: 1; animation: none; transition: opacity 0.16s ease; }

  /* 바탕화면 아이콘 */
  .desk-icon {
    position: absolute;
    top: 26px; left: 26px;
    width: 92px;
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    text-align: center;
  }
  .desk-icon:hover { background: rgba(255,255,255,0.35); }
  .desk-icon.sel {
    background: rgba(var(--sky-rgb),0.25);
    border-color: rgba(var(--sky-rgb),0.55);
  }
  .desk-icon .di-art {
    width: 50px; height: 50px;
    margin-bottom: 7px;
    display: flex; align-items: center; justify-content: center;
  }
  .desk-icon .di-art svg {
    width: 48px; height: 48px;
    color: #f6cf86;
    shape-rendering: crispEdges;
    filter: drop-shadow(2px 2px 0 rgba(90,80,100,0.22));
  }
  .desk-icon .di-label {
    font-size: 11.5px;
    color: var(--ink);
    line-height: 1.35;
    background: var(--label-bg);
    border-radius: 4px;
    padding: 1px 5px;
  }
  /* 꾸밈 아이콘 — 살짝 흐리게 */
  .desk-icon.deco-icon .di-art { opacity: 0.92; }

  /* ===== 작업표시줄 ===== */
  .taskbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 44px;
    z-index: 40;
    display: flex; align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: var(--taskbar);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line2);
  }
  .tb-start {
    display: flex; align-items: center; gap: 7px;
    height: 30px; padding: 0 13px 0 11px;
    background: var(--pink-d);
    border-radius: 8px;
    color: #fff;
    font-size: 12.5px; font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.14s ease;
  }
  .tb-start:hover { background: var(--pink); }
  .tb-start .start-ic {
    width: 14px; height: 14px;
    display: inline-block;
    background:
      linear-gradient(#fff 0 0) 0 0/6px 6px no-repeat,
      linear-gradient(#fff 0 0) 8px 0/6px 6px no-repeat,
      linear-gradient(#fff 0 0) 0 8px/6px 6px no-repeat,
      linear-gradient(#fff 0 0) 8px 8px/6px 6px no-repeat;
  }
  .taskbar-apps {
    flex: 1; min-width: 0;
    display: flex; gap: 6px;
    overflow: hidden;
  }
  .task-item {
    display: flex; align-items: center; gap: 7px;
    height: 30px; padding: 0 12px;
    background: rgba(var(--sky-rgb),0.16);
    border: 1px solid rgba(var(--sky-rgb),0.3);
    border-radius: 8px;
    font-size: 12px; color: var(--ink);
    cursor: pointer;
    max-width: 200px;
    transition: background 0.14s ease;
  }
  .task-item:hover { background: rgba(var(--sky-rgb),0.28); }
  .task-item.minimized { opacity: 0.6; }
  .task-item .ti-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--pink-d); flex-shrink: 0;
  }
  .task-item .ti-name {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .taskbar-tray {
    display: flex; align-items: center; gap: 11px;
    padding: 0 8px 0 12px;
    flex-shrink: 0;
    font-size: 12px; color: var(--ink-soft);
    border-left: 1px solid #e0d8e3;
  }
  .taskbar-tray .tray-item {
    color: var(--pink-d); cursor: pointer;
    display: inline-block;
  }
  .taskbar-tray .tray-clock { font-variant-numeric: tabular-nums; }
  .taskbar-tray .tray-mode { background: none; border: none; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; color: inherit; transition: transform .12s ease; }
  .taskbar-tray .tray-mode:hover { transform: scale(1.18); }
  .taskbar-tray .tray-weather {
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 13px;
  }
  .taskbar-tray .tray-weather .tw-temp {
    font-size: 11px; color: var(--ink-soft);
  }
  .taskbar-tray .tray-weather:empty { display: none; }
  @keyframes heartPop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.5) rotate(-12deg); }
    65%  { transform: scale(0.9) rotate(8deg); }
    100% { transform: scale(1) rotate(0deg); }
  }

  /* ===== 탐색기 창 ===== */
  .explorer {
    position: fixed;
    z-index: 10;
    width: min(880px, calc(100vw - 44px));
    height: min(620px, calc(100vh - 110px));
    /* 초기 위치는 JS가 가운데로 잡아줌 (left/top 픽셀값) */
    left: 50%; top: 50%;
    background: var(--win);
    border: 1px solid var(--win-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: winIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
  }
  @keyframes winIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
  }
  /* 닫힘 */
  .explorer.closed { display: none; }
  /* 접힘 — 타이틀바만 */
  .explorer.collapsed { height: auto !important; }
  .explorer.collapsed .toolbar,
  .explorer.collapsed .body,
  .explorer.collapsed .app-body,
  .explorer.collapsed .deco-tabs,
  .explorer.collapsed .content,
  .explorer.collapsed .statusbar { display: none !important; }
  /* 최대화 */
  .explorer.maximized {
    left: 12px !important; top: 12px !important;
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 68px) !important;
    border-radius: 12px;
  }
  .explorer.maximized .titlebar { cursor: default; }

  /* 오른쪽 아래 모서리 — 크기 조절 핸들 */
  .resize-handle {
    position: absolute;
    right: 0; bottom: 0;
    width: 20px; height: 20px;
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding: 3px;
    cursor: nwse-resize;
    color: var(--ink-faint);
    z-index: 5;
  }
  .resize-handle svg { width: 12px; height: 12px; }
  .explorer.collapsed .resize-handle,
  .explorer.maximized .resize-handle { display: none; }

  /* ===== 앱 창 (메모장 · 사진첩) ===== */
  .app-win {
    width: min(440px, calc(100vw - 44px));
    height: min(440px, calc(100vh - 110px));
    z-index: 15;
  }
  .app-body {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  /* 메모장 */
  /* 메모장 탭 */
  .note-tabs {
    display: flex; align-items: center;
    gap: 3px;
    padding: 7px 8px 0;
    background: var(--side);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    flex-shrink: 0;
  }
  .note-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 9px 7px 11px;
    border-radius: 9px 9px 0 0;
    background: transparent;
    border: 0;
    font-family: var(--font);
    font-size: 11.5px; color: var(--ink-soft);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .note-tab.on {
    background: var(--note-bg);
    color: var(--ink);
  }
  .note-tab.dragging { opacity: 0.4; }
  .note-tab.drag-over {
    box-shadow: inset 2px 0 0 var(--pink-d);
  }
  .note-tab .nt-label {
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
  }
  .note-tab .nt-rename {
    font-family: var(--font);
    font-size: 11.5px;
    color: var(--ink);
    background: var(--win);
    border: 1px solid var(--sky);
    border-radius: 5px;
    padding: 1px 5px;
    width: 80px;
    outline: none;
  }
  .note-tab .nt-x {
    width: 15px; height: 15px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    color: var(--ink-faint);
  }
  .note-tab .nt-x:hover { background: var(--pink-soft); color: var(--pink-d); }
  .note-tab-add {
    width: 26px; height: 26px;
    border: 0; border-radius: 7px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 15px; cursor: pointer;
    flex-shrink: 0;
  }
  .note-tab-add:hover { background: var(--sky-soft); color: var(--sky); }

  .note-area {
    flex: 1;
    width: 100%;
    border: 0; outline: none; resize: none;
    padding: 16px 18px;
    font-family: var(--font);
    font-size: 14px; line-height: 1.7;
    color: var(--ink);
    background: var(--note-bg);
  }
  .note-area::placeholder { color: var(--ink-faint); }
  /* 사진첩 */
  .photo-body { padding: 0; min-height: 0; }
  .photo-toolbar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .photo-count { font-size: 11.5px; color: var(--ink-soft); }
  .photo-grid {
    flex: 1 1 0; min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-content: start;
  }
  .photo-cell {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;   /* 패딩트릭으로 정사각형 — 행 높이가 정확해짐 */
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--line2);
    cursor: pointer;
    background: var(--side);
  }
  .photo-cell img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .photo-cell .pc-del {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px;
    border: 0; border-radius: 50%;
    background: rgba(40,30,40,0.6);
    color: #fff; font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.14s ease;
  }
  .photo-cell:hover .pc-del { opacity: 1; }
  .photo-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 44px 16px;
    color: var(--ink-faint);
    font-size: 12.5px; line-height: 1.7;
  }
  .photo-empty .pe-ic { font-size: 30px; margin-bottom: 8px; }
  /* 사진 크게 보기 */
  .pv-box {
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
  }
  #photoView img {
    max-width: 86vw; max-height: 74vh;
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
  }
  .pv-actions { display: flex; gap: 9px; }
  .pv-actions .btn { padding: 9px 16px; }

  /* 타이틀바 — 잡고 드래그 */
  .titlebar {
    height: 42px; flex-shrink: 0;
    display: flex; align-items: center;
    padding: 0 14px;
    background: var(--titlebar);
    border-bottom: 1px solid var(--line2);
    cursor: grab;
    user-select: none;
  }
  .titlebar:active { cursor: grabbing; }
  .titlebar .traffic, .titlebar .tb-spacer { cursor: default; }
  /* 신호등 버튼 — 호버 시 색만 살짝 진해짐 */
  .traffic { display: flex; gap: 8px; }
  .traffic i {
    width: 12px; height: 12px;
    border-radius: 50%; display: block;
    cursor: pointer;
    transition: background 0.13s ease;
  }
  .traffic .r { background: #ff6b81; }
  .traffic .y { background: #f6cf86; }
  .traffic .g { background: #a4d7a8; }
  .traffic .r:hover { background: #ff7e95; }
  .traffic .y:hover { background: #f0b94e; }
  .traffic .g:hover { background: #82c889; }
  .tb-title {
    flex: 1; text-align: center;
    font-size: 13px; color: var(--ink);
    display: flex; align-items: center; justify-content: center; gap: 7px;
  }
  .tb-title .fi {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .tb-title .fi svg { width: 17px; height: 17px; }
  .tb-spacer { width: 52px; }

  /* 툴바 (뒤로/앞으로 + 주소창) */
  .toolbar {
    height: 46px;
    display: flex; align-items: center;
    gap: 8px; padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: var(--win);
  }
  .nav-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--ink-faint);
    background: transparent;
    border: 0; cursor: default;
    flex-shrink: 0;
  }
  .nav-btn.active { color: var(--ink-soft); cursor: pointer; }
  .nav-btn.active:hover { background: var(--sky-soft); color: var(--sky); }
  .nav-btn svg { width: 16px; height: 16px; }
  .addressbar {
    flex: 1; min-width: 0;
    height: 30px;
    display: flex; align-items: center; gap: 5px;
    padding: 0 11px;
    background: var(--side);
    border: 1px solid var(--line2);
    border-radius: 8px;
    font-size: 12px; color: var(--ink-soft);
  }
  .addressbar .crumb { color: var(--ink); }
  .addressbar .sep { color: var(--ink-faint); font-size: 11px; flex: 0 0 auto; }
  .addressbar .here { color: var(--pink-d); }
  /* 좁아져서 넘치면 ... 로 생략 */
  .addressbar { white-space: nowrap; overflow: hidden; }
  .addressbar .crumb, .addressbar .here { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .addressbar .crumb.hideable { flex: 0 0 auto; }
  .addressbar #crumbMid { flex: 0 1 auto; min-width: 0; }
  .addressbar #crumbHere { flex: 1 1 auto; min-width: 0; }
  .searchbox {
    width: 150px; height: 30px;
    display: flex; align-items: center; gap: 6px;
    padding: 0 10px;
    background: var(--side);
    border: 1px solid var(--line2);
    border-radius: 8px;
    flex-shrink: 0;
  }
  .searchbox svg { width: 13px; height: 13px; color: var(--ink-faint); flex-shrink: 0; }
  .searchbox input {
    width: 100%; border: 0; background: transparent; outline: none;
    font-family: var(--font); font-size: 12px; color: var(--ink);
  }
  .searchbox input::placeholder { color: var(--ink-faint); }

  /* ===== 본체: 사이드바 + 콘텐츠 ===== */
  .body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
  .side-toggle { display: none; align-items: center; justify-content: center;
    width: 28px; height: 24px; margin-right: 8px; flex: 0 0 auto;
    border: 1px solid var(--line2); border-radius: 8px; background: var(--win);
    color: var(--ink-soft); font-size: 14px; line-height: 1; cursor: pointer; }
  .side-toggle:hover { color: var(--pink-d); border-color: var(--pink); }
  .side-backdrop { display: none; }

  /* 사이드바 */
  .sidebar {
    width: 184px; flex-shrink: 0;
    background: var(--side);
    border-right: 1px solid var(--line);
    padding: 14px 9px;
    overflow-y: auto;
  }
  .side-group { margin-bottom: 16px; }
  .side-group-label {
    font-size: 10.5px; font-weight: 700;
    color: var(--ink-faint);
    letter-spacing: 0.04em;
    padding: 0 9px;
    margin-bottom: 5px;
  }
  .side-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 9px;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--ink-soft);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.13s ease, color 0.13s ease;
  }
  .side-item svg { width: 16px; height: 16px; flex-shrink: 0; }
  .side-item .side-ic-px {
    width: 16px; height: 16px; flex-shrink: 0;
    display: inline-flex; image-rendering: pixelated;
  }
  .side-item .side-ic-px svg { width: 16px; height: 16px; }
  .side-item:hover { background: var(--win); color: var(--ink); }
  .side-item.active {
    background: var(--pink-soft);
    color: var(--ink); font-weight: 700;
  }
  .side-item.active svg { color: var(--pink-d); }
  .side-count {
    margin-left: auto;
    font-size: 10px; color: var(--ink-faint);
    font-weight: 400;
  }

  /* 콘텐츠 영역 */
  .content {
    flex: 1; min-width: 0;
    padding: 16px 18px;
    display: flex; flex-direction: column;
    overflow-y: auto;
  }
  .content-head {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .content-head h2 {
    font-size: 15px; color: var(--ink);
  }
  .content-head .sub {
    font-size: 11px; color: var(--ink-faint);
  }

  /* 아이콘 그리드 */
  .icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    align-content: start;
  }
  .file {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none;
    padding: 14px 6px 11px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.13s ease, border-color 0.13s ease;
    animation: fileIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
  }
  @keyframes fileIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .icon-grid .file:nth-child(1) { animation-delay: 0.08s; }
  .icon-grid .file:nth-child(2) { animation-delay: 0.13s; }
  .icon-grid .file:nth-child(3) { animation-delay: 0.18s; }
  .icon-grid .file:nth-child(4) { animation-delay: 0.23s; }
  .icon-grid .file:nth-child(5) { animation-delay: 0.28s; }
  .file:hover {
    background: var(--sky-soft);
    border-color: var(--sky-l);
  }
  .file:active { background: var(--sky-soft); }

  /* 파일 아이콘 — 픽셀 스타일, 박스 없음 */
  .file-ic {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 9px;
    transition: transform 0.1s steps(2);
  }
  .file:hover .file-ic { transform: translateY(-3px); }
  .file-ic svg {
    width: 48px; height: 48px;
    shape-rendering: crispEdges;
    filter: drop-shadow(1.5px 2px 0 rgba(90,80,100,0.16));
  }

  .file-name {
    font-size: 12px; color: var(--ink);
    text-align: center; line-height: 1.4;
    word-break: keep-all;
  }
  .file-ext {
    font-size: 9.5px; color: var(--ink-faint);
    margin-top: 3px;
  }
  .file.soon { cursor: default; }
  .file.soon:hover { background: transparent; border-color: transparent; }
  .file.soon:hover .file-ic { transform: none; }
  .file.soon .file-ic, .file.soon .file-name { opacity: 0.5; }

  .empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: var(--ink-faint);
    font-size: 12.5px;
  }
  .empty .ee { font-size: 32px; margin-bottom: 8px; }

  /* 상태바 */
  .statusbar {
    height: 30px;
    display: flex; align-items: center;
    padding: 0 14px; gap: 12px;
    border-top: 1px solid var(--line);
    background: var(--side);
    font-size: 11px; color: var(--ink-soft);
  }
  .statusbar .sb-end {
    margin-left: auto;
    cursor: pointer; user-select: none;
    transition: color 0.14s ease;
  }
  .statusbar .sb-end:hover { color: var(--pink-d); }
  /* 상태바 우측 버튼 묶음 */
  .statusbar .sb-end-group {
    margin-left: auto;
    display: flex; gap: 14px;
  }
  .statusbar .sb-act {
    cursor: pointer; user-select: none;
    transition: color 0.14s ease;
  }
  .statusbar .sb-act:hover { color: var(--pink-d); }

  /* ===== 비밀번호 모달 ===== */
  .overlay {
    position: fixed; inset: 0;
    background: rgba(80,80,110,0.32);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: none; align-items: center; justify-content: center;
    z-index: 80; padding: 22px;
  }
  .overlay.show { display: flex; }
  .modal {
    width: 320px; max-width: 100%;
    background: var(--win);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: winIn 0.28s cubic-bezier(0.22,1,0.36,1) both;
  }
  .modal-bar {
    height: 38px;
    display: flex; align-items: center; padding: 0 13px;
    background: var(--titlebar);
    border-bottom: 1px solid var(--line2);
  }
  .modal-bar .traffic i { width: 11px; height: 11px; }
  .modal-bar .mb-t {
    flex: 1; text-align: center;
    font-size: 12px; color: var(--ink);
  }
  .modal-bar .mb-sp { width: 41px; }
  .pw-top { text-align: center; padding: 22px 22px 4px; }
  .pw-lock {
    width: 50px; height: 50px; margin: 0 auto 12px;
    border-radius: 14px;
    background: var(--pink-d);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 7px 17px rgba(150,140,200,0.34);
  }
  .pw-lock svg { width: 23px; height: 23px; stroke: #fff; }
  .pw-title { font-size: 14px; color: var(--ink); }
  .pw-desc { font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
  .pw-form { padding: 14px 22px 20px; }
  .pw-input {
    width: 100%;
    font-family: var(--font);
    font-size: 17px; text-align: center;
    letter-spacing: 0.3em;
    color: var(--ink);
    background: var(--side);
    border: 1.5px solid var(--line2);
    border-radius: 11px;
    padding: 11px;
    outline: none;
    transition: border-color 0.14s ease;
  }
  .pw-input:focus { border-color: var(--sky); }
  .pw-hint {
    font-size: 11px; color: var(--pink-d);
    text-align: center; min-height: 14px; margin-top: 8px;
  }
  .pw-tip {
    font-size: 10.5px; color: var(--ink-soft);
    text-align: center; margin-top: 9px;
    background: var(--side);
    border-radius: 8px; padding: 6px 10px;
  }
  .pw-row { display: flex; gap: 9px; margin-top: 12px; }

  /* 관리자 — 데이터 백업/복원 모달 */
  .adm-data { padding: 20px 22px 22px; }
  .adm-data-head { text-align: center; margin-bottom: 16px; }
  .adm-data-title { font-size: 14px; font-weight: 700; color: var(--ink); }
  .adm-data-sub {
    font-size: 11px; color: var(--ink-soft);
    margin-top: 5px; line-height: 1.5;
  }
  .adm-data-btn {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    text-align: left;
    background: var(--side);
    border: 1.5px solid var(--line2);
    border-radius: 12px;
    padding: 13px 14px;
    cursor: pointer;
    margin-bottom: 9px;
    transition: border-color 0.13s ease, background 0.13s ease;
  }
  .adm-data-btn:last-child { margin-bottom: 0; }
  .adm-data-btn:hover { border-color: var(--sky); background: var(--sky-soft); }
  .adm-data-btn .adb-ic {
    font-size: 21px; flex-shrink: 0;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
  }
  .adm-data-btn .adb-txt { display: flex; flex-direction: column; gap: 2px; }
  .adm-data-btn .adb-t { font-size: 13px; font-weight: 700; color: var(--ink); }
  .adm-data-btn .adb-d { font-size: 10.5px; color: var(--ink-soft); }

  /* 관리자 — 섹션 라벨 */
  .adm-section-label {
    font-size: 10.5px; font-weight: 700;
    color: var(--ink-faint);
    margin: 4px 0 8px;
  }
  /* 관리자 — 프로필 편집 */
  .adm-profile {
    background: var(--side);
    border: 1px solid var(--line2);
    border-radius: 11px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex; flex-direction: column; gap: 9px;
  }
  .adm-profile-row { display: flex; align-items: center; gap: 9px; }
  .adm-pf-key {
    font-size: 11px; color: var(--ink-soft);
    width: 42px; flex-shrink: 0;
  }
  .adm-pf-avatar { display: flex; align-items: center; gap: 7px; flex: 1; }
  .adm-pf-preview {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--pink-d);
    color: #fff; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background-size: cover; background-position: center;
  }
  .adm-pf-icon-input {
    width: 52px; text-align: center;
    font-family: var(--font); font-size: 14px;
    color: var(--ink); background: var(--win);
    border: 1px solid var(--line2); border-radius: 8px;
    padding: 7px 4px; outline: none;
  }
  .adm-pf-icon-input:focus { border-color: var(--sky); }
  .adm-pf-img-btn {
    font-size: 14px;
    background: var(--win);
    border: 1px solid var(--line2); border-radius: 8px;
    padding: 6px 9px; cursor: pointer;
  }
  .adm-pf-img-btn:hover { border-color: var(--sky); }
  .adm-pf-text-input {
    flex: 1;
    font-family: var(--font); font-size: 12px;
    color: var(--ink); background: var(--win);
    border: 1px solid var(--line2); border-radius: 8px;
    padding: 8px 10px; outline: none;
  }
  .adm-pf-text-input:focus { border-color: var(--sky); }
  .adm-pf-save {
    font-family: var(--font);
    font-size: 11px; font-weight: 600;
    color: #fff; background: var(--pink-d);
    border: 0; border-radius: 8px;
    padding: 8px; cursor: pointer; margin-top: 2px;
    transition: opacity 0.13s ease;
  }
  .adm-pf-save:hover { opacity: 0.88; }

  .btn {
    flex: 1;
    font-family: var(--font);
    font-size: 13px;
    padding: 10px;
    border-radius: 11px;
    border: 1px solid var(--line2);
    background: var(--win);
    color: var(--ink-soft);
    cursor: pointer;
    transition: transform 0.12s ease;
  }
  .btn:active { transform: scale(0.97); }
  .btn.primary {
    border: 0;
    background: var(--pink-d);
    color: #fff;
    box-shadow: 0 5px 13px rgba(150,140,200,0.3);
  }

  /* ===== 관리자 화면 ===== */
  /* 관리자 화면 — 데스크톱 위에 뜨는 창 (오버레이 아님) */
  .admin {
    display: none;
  }
  .admin.show { display: block; }
  #adminWin {
    z-index: 20;          /* 메인 창보다 위 */
    width: min(560px, calc(100vw - 44px));
    height: min(560px, calc(100vh - 110px));
  }
  #adminWin .content { overflow-y: auto; }

  .admin-card {
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 15px;
    margin-bottom: 12px;
  }
  .ac-title {
    font-size: 13px; color: var(--ink);
    margin-bottom: 7px;
    display: flex; align-items: center; gap: 6px;
  }
  .ac-text { font-size: 11.5px; line-height: 1.7; color: var(--ink-soft); }

  .bg-preview {
    position: relative;
    height: 112px;
    border-radius: 10px;
    border: 1px solid var(--line2);
    background: #e3f0fd;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 11px;
    overflow: hidden;
  }
  .bg-preview span {
    position: relative; z-index: 2;
    font-size: 11px; color: var(--ink);
    background: rgba(255,255,255,0.85);
    padding: 3px 10px; border-radius: 999px;
  }
  /* 미리보기 박스 안 그림 레이어 (색·패턴 위에 얹힘) */
  .prev-img {
    position: absolute; inset: 0;
    z-index: 1;
    background-repeat: no-repeat;
  }
  .bg-controls { display: flex; gap: 8px; margin-bottom: 13px; }
  .bg-opt { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
  .bg-opt-label {
    font-size: 11px; color: var(--ink);
    width: 72px; flex-shrink: 0;
  }
  .seg {
    display: flex; gap: 4px; flex: 1;
    background: var(--win);
    border: 1px solid var(--line2);
    padding: 3px; border-radius: 9px;
  }
  .seg button {
    flex: 1;
    font-family: var(--font);
    font-size: 10.5px;
    color: var(--ink-soft);
    background: transparent; border: 0;
    border-radius: 6px; padding: 6px 2px;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
  }
  .seg button.on {
    background: var(--pink-soft);
    color: var(--ink);
  }
  .seg.seg-sm button { font-size: 10px; padding: 5px 2px; }

  /* 직접 만들기 — 색 + 패턴 */
  .bg-custom { flex: 1; display: flex; flex-direction: column; gap: 7px; }
  .bg-custom-row { display: flex; }
  .bg-custom-color {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer;
  }
  .bg-custom-colors { gap: 14px; }
  .bg-custom-color .bg-cc-name {
    font-size: 10.5px; color: var(--ink-soft);
  }
  /* 컬러피커 — 브라우저 기본 검은 테두리 제거 */
  input[type="color"] {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
  }
  input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
  input[type="color"]::-webkit-color-swatch {
    border: none; border-radius: 5px;
  }
  input[type="color"]::-moz-color-swatch {
    border: none; border-radius: 5px;
  }
  .bg-custom-color input[type="color"] {
    width: 40px; height: 28px;
    border: 1px solid var(--line2);
    border-radius: 8px;
    background: var(--win);
    cursor: pointer; padding: 3px;
  }
  .bg-custom-apply {
    font-family: var(--font);
    font-size: 11px; font-weight: 600;
    color: #fff; background: var(--pink-d);
    border: 0; border-radius: 8px;
    padding: 8px; cursor: pointer;
    transition: opacity 0.13s ease;
  }
  .bg-custom-apply:hover { opacity: 0.88; }

  /* 시간대별 배경 저장 */
  .bg-time-wrap { flex: 1; }
  .bg-time-hint {
    font-size: 10px; color: var(--ink-soft);
    line-height: 1.5; margin-bottom: 8px;
  }
  .bg-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .bg-time-slot {
    background: var(--win);
    border: 1px solid var(--line2);
    border-radius: 10px;
    padding: 8px;
    display: flex; flex-direction: column;
    gap: 6px;
  }
  .bg-time-slot .bts-prev {
    position: relative;
    width: 100%; height: 38px;
    border-radius: 7px;
    background: #e3f0fd;
    background-size: cover; background-position: center;
    border: 1px solid var(--line2);
    overflow: hidden;
  }
  .bg-time-slot .bts-info {
    display: flex; align-items: center;
    justify-content: space-between; gap: 6px;
  }
  .bg-time-slot .bts-label { font-size: 11px; color: var(--ink); }
  .bg-time-slot .bts-state {
    font-size: 9.5px; color: var(--ink-soft);
    background: var(--side);
    border-radius: 6px; padding: 1px 6px;
    max-width: 60px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
  }
  .bg-time-slot .bts-save {
    font-family: var(--font);
    font-size: 10px; font-weight: 600;
    color: var(--pink-d);
    background: var(--pink-soft);
    border: 0; border-radius: 7px;
    padding: 6px; cursor: pointer;
    transition: opacity 0.13s ease;
  }
  .bg-time-slot .bts-save:hover { opacity: 0.82; }
  .range {
    flex: 1;
    -webkit-appearance: none; appearance: none;
    height: 7px; border-radius: 999px;
    background: var(--sky-l);
    outline: none; cursor: pointer;
  }
  .range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(120,140,190,0.4);
    cursor: pointer;
  }
  .range::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 0;
    box-shadow: 0 2px 7px rgba(120,140,190,0.4);
    cursor: pointer;
  }
  .bg-note {
    font-size: 10px; line-height: 1.6;
    color: var(--ink-soft);
    background: var(--sky-soft);
    padding: 8px 11px; border-radius: 9px;
    margin-top: 3px;
  }
  .bg-note b { color: var(--pink-d); }
  .admin-warn {
    font-size: 10px; line-height: 1.6;
    color: var(--ink-faint);
    text-align: center; margin-top: 4px;
  }

  /* 토스트 */
  .toast {
    position: fixed; bottom: 26px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--win);
    border: 1px solid var(--line2);
    box-shadow: var(--shadow);
    font-size: 12px; color: var(--ink);
    padding: 10px 17px; border-radius: 999px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
    z-index: 90;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .toast .th { color: var(--pink-d); }

  /* 창 스냅 미리보기 */
  #snapHint {
    position: fixed;
    z-index: 9;
    background: rgba(var(--sky-rgb),0.22);
    border: 2px solid var(--sky);
    border-radius: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
  }
  #snapHint.show { opacity: 1; }

  /* ===== 바탕화면 위젯 ===== */
  .widget {
    position: absolute;
    width: 200px;
    background: var(--menu-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--win-border);
    border-radius: 14px;
    padding: 13px 14px;
    box-shadow: var(--shadow);
  }
  .widget.dragging { opacity: 0.85; }
  .widget-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; font-weight: 700;
    color: var(--pink-d);
    margin-bottom: 9px;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
  }
  .widget-head:active { cursor: grabbing; }
  .widget-refresh {
    width: 22px; height: 22px;
    border: 0; border-radius: 6px;
    background: transparent;
    color: var(--ink-faint);
    font-size: 12px; cursor: pointer;
    transition: background 0.13s ease, color 0.13s ease;
  }
  .widget-refresh:hover { background: var(--pink-soft); color: var(--pink-d); }
  .widget-head-btns { display: flex; gap: 2px; }
  /* 위젯 접기 */
  .widget-fold svg, .widget-fold { transition: transform 0.18s ease; }
  .widget.folded .widget-body { display: none; }
  .widget.folded .widget-head { margin-bottom: 0; }
  .widget.folded .widget-fold { transform: rotate(-90deg); }
  .widget-quote {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--ink);
    word-break: keep-all;
  }

  /* 달력 위젯 */
  .cw-nav { display: flex; gap: 2px; }
  .cw-title {
    font-size: 12px; font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-bottom: 7px;
  }
  .cw-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
  }
  .cw-dow span {
    text-align: center;
    font-size: 9px; font-weight: 700;
    color: var(--ink-faint);
    padding: 2px 0;
  }
  .cw-dow span:first-child { color: var(--pink-d); }
  .cw-dow span:last-child { color: var(--sky); }
  .cw-day {
    text-align: center;
    font-size: 10px;
    color: var(--ink);
    padding: 3px 0;
    border-radius: 6px;
  }
  .cw-day.empty { visibility: hidden; }
  .cw-day.sun { color: var(--pink-d); }
  .cw-day.sat { color: var(--sky); }
  .cw-day.today {
    background: var(--pink-d);
    color: #fff; font-weight: 700;
  }
  .widget-dday {
    font-size: 26px; font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  .widget-dday-label {
    font-size: 10.5px;
    color: var(--ink-soft);
    margin-top: 3px;
  }

  /* 디데이 위젯 — 여러 개 목록 */
  .dday-list { display: flex; flex-direction: column; gap: 8px; }

  /* 할 일 위젯 */
  #todoWidget { width: 200px; }
  .todo-input-row { margin-bottom: 8px; }
  .todo-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--pink-soft);
    padding: 7px 10px;
    font-size: 12px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
  }
  .todo-input::placeholder { color: var(--ink-faint); }
  .todo-input:focus { border-color: var(--pink-d); }
  .todo-list {
    display: flex; flex-direction: column; gap: 5px;
    max-height: 220px; overflow-y: auto;
  }
  .todo-item {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 7px;
    border-radius: 8px;
    background: var(--pink-soft);
    font-size: 12px;
  }
  .todo-check {
    flex-shrink: 0;
    width: 16px; height: 16px;
    border-radius: 5px;
    border: 1.6px solid var(--pink-d);
    background: var(--win);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #fff;
  }
  .todo-item.done .todo-check {
    background: var(--pink-d);
  }
  .todo-text {
    flex: 1; min-width: 0;
    word-break: break-word;
    cursor: pointer;
    color: var(--ink);
  }
  .todo-item.done .todo-text {
    text-decoration: line-through;
    color: var(--ink-faint);
  }
  .todo-del {
    flex-shrink: 0;
    width: 17px; height: 17px;
    border: 0; border-radius: 50%;
    background: transparent;
    color: var(--ink-faint);
    font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .todo-del:hover { background: var(--pink-d); color: #fff; }
  .todo-empty {
    font-size: 11px; color: var(--ink-faint);
    text-align: center; padding: 10px 0;
  }

  /* 타이머 / 뽀모도로 위젯 */
  #timerWidget { width: 200px; }
  .timer-tabs {
    display: flex; gap: 4px;
    margin-bottom: 10px;
  }
  .timer-tab {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--pink-soft);
    color: var(--ink-soft);
    font-size: 11px; font-weight: 600;
    padding: 5px 0; cursor: pointer;
    font-family: inherit;
  }
  .timer-tab.active {
    background: var(--pink-d);
    border-color: var(--pink-d);
    color: #fff;
  }
  .timer-display {
    font-size: 38px; font-weight: 700;
    text-align: center;
    color: var(--ink);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
  }
  .timer-phase {
    text-align: center;
    font-size: 11px; font-weight: 600;
    color: var(--pink-d);
    margin-top: 2px;
    min-height: 15px;
  }
  .timer-presets {
    display: flex; gap: 4px; flex-wrap: wrap;
    justify-content: center;
    margin: 9px 0;
  }
  .timer-preset {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--win);
    color: var(--ink-soft);
    font-size: 11px; cursor: pointer;
    padding: 4px 8px;
    font-family: inherit;
  }
  .timer-preset:hover { border-color: var(--pink-d); color: var(--pink-d); }
  .timer-preset.active {
    background: var(--pink-soft);
    border-color: var(--pink-d);
    color: var(--pink-d);
  }
  .timer-controls { display: flex; gap: 5px; }
  .timer-btn {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--pink-soft);
    color: var(--ink);
    font-size: 12px; font-weight: 600;
    padding: 7px 0; cursor: pointer;
    font-family: inherit;
  }
  .timer-btn:hover { border-color: var(--pink-d); }
  .timer-btn.timer-main {
    background: var(--pink-d);
    border-color: var(--pink-d);
    color: #fff;
  }
  .timer-btn.timer-main.running {
    background: var(--ink-soft);
    border-color: var(--ink-soft);
  }

  /* 음악 플레이어 위젯 */
  /* 음악 위젯 — 유튜브 들어가니 살짝 넓게 */
  #musicWidget { width: 230px; }
  /* 유튜브 프레임 */
  .yt-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 9px;
    overflow: hidden;
    background: #000;
    margin-bottom: 8px;
  }
  .yt-frame iframe,
  .yt-frame #ytPlayer {
    width: 100%; height: 100%;
    border: 0;
  }
  .yt-frame .yt-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
  .music-now {
    font-size: 11.5px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    font-weight: 600;
  }
  .music-bar {
    height: 5px;
    background: var(--pink-soft);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
  }
  .music-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--pink-d);
    border-radius: 3px;
  }
  .music-time {
    display: flex; justify-content: space-between;
    font-size: 9px;
    color: var(--ink-faint);
    margin-top: 3px;
  }
  .music-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    margin-top: 7px;
  }
  .music-btn {
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13px;
    cursor: pointer;
    padding: 3px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.13s ease, transform 0.1s ease;
  }
  .music-btn svg { width: 19px; height: 19px; }
  .music-btn:hover { color: var(--pink-d); }
  .music-btn:active { transform: scale(0.9); }
  .music-play {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--pink-d);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
  }
  .music-play svg { width: 14px; height: 14px; }
  .music-play:hover { color: #fff; opacity: 0.88; }

  /* 반복 버튼 */
  .music-loop { position: relative; }
  .music-loop.active { color: var(--pink-d); }
  .music-loop .loop-one {
    position: absolute;
    right: -1px; top: -1px;
    font-size: 7px; font-weight: 800;
    background: var(--pink-d);
    color: #fff;
    width: 11px; height: 11px;
    border-radius: 50%;
    display: none;
    align-items: center; justify-content: center;
    line-height: 1;
  }
  .music-loop.one .loop-one { display: flex; }

  /* 재생목록 */
  .music-playlist {
    margin-top: 9px;
    max-height: 116px;
    overflow-y: auto;
    display: flex; flex-direction: column;
    gap: 3px;
  }
  .pl-item {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 10.5px;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.12s ease;
  }
  .pl-item:hover { background: var(--pink-soft); }
  .pl-item.on { background: var(--pink-soft); color: var(--pink-d); font-weight: 700; }
  .pl-item.pl-dragging { opacity: 0.4; }
  .pl-item.pl-drag-over { box-shadow: inset 0 2px 0 var(--pink-d); }
  .pl-item .pl-name {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pl-item .pl-del {
    flex-shrink: 0;
    border: 0; background: transparent;
    color: var(--ink-faint);
    font-size: 12px; cursor: pointer;
    padding: 0 2px;
  }
  .pl-item .pl-del:hover { color: var(--pink-d); }
  .pl-empty {
    font-size: 10px; color: var(--ink-faint);
    text-align: center; padding: 8px 0;
  }
  .dday-empty {
    font-size: 11px; color: var(--ink-faint);
    text-align: center; padding: 12px 0;
  }
  .dday-card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 11px 13px;
    border-radius: 13px;
    cursor: pointer;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(120,110,120,0.2);
    transition: transform 0.14s cubic-bezier(0.22,1.3,0.5,1);
  }
  .dday-card:hover { transform: translateY(-2px) scale(1.02); }
  .dday-card::after {
    content: '♥';
    position: absolute;
    right: 11px; bottom: 7px;
    font-size: 30px;
    color: rgba(255,255,255,0.22);
    line-height: 1;
  }
  .dday-card .dc-name {
    position: relative;
    font-size: 11px; font-weight: 700;
    opacity: 0.95;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 1px;
  }
  .dday-card .dc-big {
    position: relative;
    font-size: 25px; font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }
  .dday-card .dc-date {
    position: relative;
    font-size: 9.5px; opacity: 0.82;
    margin-top: 1px;
  }

  /* 디데이 편집 팝업 */
  .dday-modal {
    width: 320px; max-width: 100%;
    background: var(--win);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: smPop 0.2s cubic-bezier(0.22,1,0.36,1);
  }

  /* 유튜브 입력 모달 */
  .yt-modal {
    width: 330px; max-width: 100%;
    background: var(--win);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: smPop 0.2s cubic-bezier(0.22,1,0.36,1);
  }
  .yt-modal-body { padding: 20px 20px 18px; text-align: center; }
  .yt-modal-ic {
    width: 52px; height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--pink-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
  }
  .yt-modal-title {
    font-size: 14px; font-weight: 700;
    color: var(--ink);
  }
  .yt-modal-desc {
    font-size: 11.5px; color: var(--ink-soft);
    margin: 3px 0 14px;
  }
  .yt-input {
    width: 100%;
    font-size: 12.5px;
    letter-spacing: normal;
    text-align: left;
    padding: 10px 12px;
  }
  .yt-modal-hint {
    font-size: 11px;
    color: var(--pink-d);
    min-height: 14px;
    margin-top: 6px;
  }

  .dday-modal-body { padding: 16px 18px 18px; }
  .dm-preview {
    border-radius: 13px;
    padding: 16px;
    text-align: center;
    color: #fff;
    margin-bottom: 14px;
    background: var(--pink-d);
  }
  .dm-prev-big { font-size: 30px; font-weight: 800; }
  .dm-prev-label { font-size: 11px; opacity: 0.9; margin-top: 2px; }
  .dm-label {
    display: block;
    font-size: 11px; font-weight: 700;
    color: var(--ink-soft);
    margin: 11px 2px 5px;
  }
  .dm-input {
    font-size: 14px; letter-spacing: normal;
    text-align: left;
    padding: 9px 11px;
  }
  .dm-colors { display: flex; gap: 6px; }
  .dm-color {
    flex: 1;
    aspect-ratio: 1 / 1;
    min-width: 0;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line2);
    cursor: pointer;
    transition: transform 0.12s ease;
  }
  .dm-color:hover { transform: scale(1.13); }
  .dm-color.on { box-shadow: 0 0 0 2px var(--ink); }
  /* 직접 색 고르기 스와치 */
  .dm-color-custom {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    background: conic-gradient(#ff96b6, #ffd34d, #43c79b, #5cb3f5, #9a82dd, #ff96b6);
    font-size: 14px;
    overflow: hidden;
  }
  .dm-color-custom span {
    position: relative; z-index: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
    font-weight: 700;
    pointer-events: none;
  }
  .dm-color-custom input[type=color] {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer; border: none; padding: 0;
  }
  .dm-row { display: flex; gap: 8px; margin-top: 15px; }

  /* 휴지통 앱 */
  .trash-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .trash-info {
    font-size: 12px; color: var(--ink-soft);
    flex: 1; min-width: 0;
  }
  .trash-toolbar .btn {
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 7px 13px;
  }
  .trash-list {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 7px;
  }
  .trash-row {
    border: 1px solid var(--line2);
    border-radius: 10px;
    padding: 10px 11px;
    background: var(--side);
  }
  .trash-row-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 5px;
  }
  .trash-row-title { font-size: 12px; font-weight: 700; color: var(--ink); }
  .trash-row-acts { display: flex; gap: 5px; flex-shrink: 0; }
  .trash-mini {
    font-size: 10.5px;
    padding: 3px 8px;
    border: 0; border-radius: 7px;
    cursor: pointer;
    font-family: var(--font);
  }
  .trash-mini.restore { background: var(--sky-soft); color: var(--sky-d); }
  .trash-mini.purge { background: var(--pink-soft); color: var(--pink-d); }
  .trash-row-preview {
    font-size: 11px; color: var(--ink-soft);
    line-height: 1.5;
    max-height: 42px; overflow: hidden;
    white-space: pre-wrap;
  }
  .trash-thumb {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 7px;
    display: block;
  }
  .trash-empty {
    text-align: center;
    padding: 44px 16px;
    color: var(--ink-faint);
    font-size: 12.5px; line-height: 1.7;
  }
  .trash-empty .te-ic { font-size: 30px; margin-bottom: 8px; }

  /* ===== 시작 메뉴 ===== */
  .start-menu {
    position: fixed;
    left: 10px; bottom: 52px;
    width: 290px;
    background: var(--menu-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--win-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px;
    z-index: 60;
    display: none;
    animation: smPop 0.18s cubic-bezier(0.22,1,0.36,1);
  }
  .start-menu.show { display: block; }
  @keyframes smPop {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  .sm-head {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 6px 12px;
  }
  .sm-head > div {
    min-width: 0;
  }
  .sm-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--pink-d);
    color: #fff; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .sm-hello {
    font-size: 12px; font-weight: 700; color: var(--ink);
    line-height: 1.35;
    white-space: nowrap;
  }
  .sm-sub {
    font-size: 10.5px; color: var(--ink-soft);
    line-height: 1.35; margin-top: 1px;
    white-space: nowrap;
  }
  .sm-admin-btn {
    margin-left: auto;
    width: 30px; height: 30px;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--ink-faint);
    cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.13s ease, color 0.13s ease;
  }
  .sm-admin-btn:hover { background: var(--pink-soft); color: var(--pink-d); }
  .sm-admin-btn svg { width: 17px; height: 17px; }
  .sm-section {
    font-size: 10.5px; font-weight: 700;
    color: var(--ink-faint);
    padding: 8px 6px 5px;
  }
  .sm-list { display: flex; flex-direction: column; gap: 2px; }
  .sm-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 8px;
    border-radius: 9px;
    font-size: 12.5px; color: var(--ink);
    cursor: pointer;
    transition: background 0.13s ease;
  }
  .sm-item:hover { background: var(--sky-soft); }
  .sm-ic {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .sm-ic svg { width: 22px; height: 22px; shape-rendering: crispEdges; }
  .sm-ic-gear {
    background: var(--pink-soft); border-radius: 6px;
    font-size: 12px;
  }

  /* ===== 시계 달력 ===== */
  .calendar-pop {
    position: fixed;
    right: 10px; bottom: 52px;
    width: 248px;
    background: var(--menu-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--win-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 14px;
    z-index: 60;
    display: none;
    animation: smPop 0.18s cubic-bezier(0.22,1,0.36,1);
  }
  .calendar-pop.show { display: block; }
  .cal-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
  }
  .cal-head #calTitle { font-size: 13px; font-weight: 700; color: var(--ink); }
  .cal-nav {
    width: 26px; height: 26px;
    border: 0; border-radius: 8px;
    background: var(--side);
    color: var(--ink-soft);
    font-size: 15px; cursor: pointer;
    transition: background 0.13s ease;
  }
  .cal-nav:hover { background: var(--sky-soft); color: var(--sky); }
  .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .cal-dow span {
    text-align: center;
    font-size: 10px; font-weight: 700;
    color: var(--ink-faint);
    padding: 3px 0;
  }
  .cal-dow span:first-child { color: var(--pink-d); }
  .cal-dow span:last-child { color: var(--sky); }
  .cal-day {
    text-align: center;
    font-size: 11.5px;
    color: var(--ink);
    padding: 5px 0;
    border-radius: 7px;
    cursor: default;
  }
  .cal-day.empty { visibility: hidden; }
  .cal-day.sun { color: var(--pink-d); }
  .cal-day.sat { color: var(--sky); }
  .cal-day.today {
    background: var(--pink-d);
    color: #fff; font-weight: 700;
  }
  .cal-foot {
    margin-top: 10px;
    text-align: center;
    font-size: 11px; color: var(--ink-soft);
  }

  /* ===== 바탕화면 우클릭 메뉴 ===== */
  .ctx-menu {
    position: fixed;
    width: 178px;
    background: var(--menu-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--win-border);
    border-radius: 11px;
    box-shadow: var(--shadow);
    padding: 6px;
    z-index: 75;
    display: none;
  }
  .ctx-menu.show { display: block; }
  .ctx-item {
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px; color: var(--ink);
    cursor: pointer;
    transition: background 0.12s ease;
  }
  .ctx-item:hover { background: var(--sky-soft); }
  .ctx-sep {
    height: 1px;
    background: var(--line);
    margin: 4px 6px;
  }
  /* 하위 메뉴 화살표가 있는 항목 */
  .ctx-has-sub {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
  }
  .ctx-arrow { color: var(--ink-faint); font-size: 10px; }
  /* 체크 항목 (위젯 켜기/끄기) */
  .ctx-check {
    display: flex; align-items: center; gap: 8px;
  }
  .ctx-check .ctx-cbox {
    flex-shrink: 0;
    width: 16px; height: 16px;
    border-radius: 5px;
    border: 1.6px solid var(--pink-d);
    background: var(--win);
    color: #fff; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
  }
  .ctx-check.on .ctx-cbox {
    background: var(--pink-d);
  }
  .ctx-check:not(.on) .ctx-cbox { color: transparent; }
  /* 위젯 서브메뉴는 본 메뉴보다 위 */
  #widgetMenu { z-index: 76; }

  /* ===== 배경·꾸미기 탭 ===== */
  .deco-tabs {
    display: flex; gap: 4px;
    padding: 8px 14px 0;
    border-bottom: 1px solid var(--line);
    background: var(--side);
    flex-shrink: 0;
  }
  .deco-tab {
    border: none; background: transparent;
    font-family: inherit; font-size: 12.5px;
    color: var(--ink-soft); cursor: pointer;
    padding: 8px 14px;
    border-radius: 9px 9px 0 0;
    border-bottom: 2px solid transparent;
    transition: color 0.13s, border-color 0.13s, background 0.13s;
  }
  .deco-tab:hover { color: var(--pink-d); }
  .deco-tab.on {
    color: var(--pink-d); font-weight: 700;
    border-bottom-color: var(--pink-d);
    background: var(--win);
  }

  /* ===== 테마 탭 ===== */
  .theme-swatch-name {
    font-size: 11px; color: var(--ink-soft);
  }
  .theme-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
  }
  .theme-preset {
    border: 1.5px solid var(--line2);
    border-radius: 12px;
    background: var(--win);
    padding: 9px 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.13s, transform 0.1s;
  }
  .theme-preset:hover { transform: translateY(-2px); border-color: var(--pink); }
  .theme-preset.on { border-color: var(--pink-d); background: var(--pink-soft); }
  .theme-preset-dots {
    display: flex; justify-content: center; gap: 5px;
    margin-bottom: 6px;
  }
  .theme-preset-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid var(--win);
    box-shadow: 0 0 0 1px var(--line2);
  }
  .theme-preset-name {
    font-size: 11px; color: var(--ink);
  }
  .theme-preset.on .theme-preset-name { color: var(--pink-d); font-weight: 700; }
  .theme-reset-row {
    margin: 4px 0 14px;
  }

  /* ===== 꾸미기 ===== */
  .deco-body {
    padding: 16px 18px;
    overflow-y: auto;
  }
  .deco-sec { margin-bottom: 20px; }
  .deco-sec-title {
    font-size: 14px; font-weight: 700;
    color: var(--ink, #4a4453);
    margin-bottom: 3px;
  }
  .deco-sec-desc {
    font-size: 11px; color: var(--ink-soft);
    margin-bottom: 10px;
  }
  .deco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
  }
  .deco-item {
    border: 1.5px solid var(--line2);
    border-radius: 12px;
    background: var(--win);
    padding: 10px 4px 7px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.13s, transform 0.1s, background 0.13s;
  }
  .deco-item:hover { transform: translateY(-2px); border-color: var(--pink); }
  .deco-item.on {
    border-color: var(--pink-d);
    background: var(--pink-soft);
  }
  /* 텍스트형 아이템 (효과·트레일) */
  .deco-item-text {
    display: flex; align-items: center; justify-content: center;
    min-height: 38px;
    padding: 8px 6px;
  }
  .deco-item .di-name {
    font-size: 11.5px; color: var(--ink);
  }
  .deco-item.on .di-name { color: var(--pink-d); font-weight: 700; }
  /* 커서 아이템 — 작은 미리보기 + 이름 */
  .deco-item-cursor {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 56px;
  }
  .deco-item .di-cursor-img {
    width: 24px; height: 24px;
    object-fit: contain;
    display: block; margin: 0 auto 5px;
  }
  .deco-cursor-custom {
    margin-top: 10px;
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
  }
  .deco-custom-hint {
    font-size: 10.5px; color: var(--ink-soft);
  }
  /* 옵션 박스 — 효과/커서/트레일 설정을 옅은 카드로 묶음 */
  .deco-opts {
    margin-top: 10px;
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px 12px;
  }
  /* 옵션 한 줄 — 라벨 | 컨트롤 */
  .deco-opt-row, .deco-input-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .deco-opt-row:last-child, .deco-input-row:last-child { border-bottom: none; }
  .deco-opt-label {
    font-size: 11.5px; color: var(--ink); font-weight: 600;
    width: 64px; flex-shrink: 0;
  }
  .deco-opt-row .range, .deco-input-row .range { flex: 1; }
  .deco-range-val {
    font-size: 11.5px; color: var(--pink-d); font-weight: 700;
    min-width: 32px; text-align: right;
  }
  .deco-text-input {
    flex: 1; max-width: 130px;
    border: 1.5px solid var(--line2);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 13px; font-family: inherit;
    color: var(--ink);
    background: var(--win);
  }
  .deco-text-input:focus { outline: none; border-color: var(--pink-d); }
  .deco-color {
    width: 44px; height: 26px;
    border: 1.5px solid var(--line2);
    border-radius: 8px;
    background: var(--win); cursor: pointer;
    padding: 2px;
  }
  .deco-opt-row .seg-sm { flex: 1; }

  /* ===== 바탕화면 스티커 ===== */
  .sticker {
    position: absolute;
    width: 64px; height: 64px;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    z-index: 4;
    --rot: 0deg;
    --scale: 1;
    transform: rotate(var(--rot)) scale(var(--scale));
    transition: transform 0.12s ease;
  }
  /* 더블클릭으로 도구가 열린 스티커만 잡아서 이동 가능 */
  .sticker.tools-open { cursor: grab; }
  .sticker.tools-open:active { cursor: grabbing; }
  /* 섀도우 켜짐 (기본) */
  .sticker.shadow .stk-content {
    filter: drop-shadow(0 3px 5px rgba(90,80,90,0.3));
  }
  /* 외곽선 — drop-shadow 를 여러 겹 쌓아 윤곽선 효과 */
  .sticker.outline-white .stk-content {
    filter:
      drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
      drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
      drop-shadow(1.4px 1.4px 0 #fff) drop-shadow(-1.4px -1.4px 0 #fff)
      drop-shadow(1.4px -1.4px 0 #fff) drop-shadow(-1.4px 1.4px 0 #fff);
  }
  .sticker.outline-black .stk-content {
    filter:
      drop-shadow(2px 0 0 #000) drop-shadow(-2px 0 0 #000)
      drop-shadow(0 2px 0 #000) drop-shadow(0 -2px 0 #000)
      drop-shadow(1.4px 1.4px 0 #000) drop-shadow(-1.4px -1.4px 0 #000)
      drop-shadow(1.4px -1.4px 0 #000) drop-shadow(-1.4px 1.4px 0 #000);
  }
  /* 외곽선 + 그림자 동시 */
  .sticker.outline-white.shadow .stk-content {
    filter:
      drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
      drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
      drop-shadow(1.4px 1.4px 0 #fff) drop-shadow(-1.4px -1.4px 0 #fff)
      drop-shadow(1.4px -1.4px 0 #fff) drop-shadow(-1.4px 1.4px 0 #fff)
      drop-shadow(0 4px 5px rgba(90,80,90,0.35));
  }
  .sticker.outline-black.shadow .stk-content {
    filter:
      drop-shadow(2px 0 0 #000) drop-shadow(-2px 0 0 #000)
      drop-shadow(0 2px 0 #000) drop-shadow(0 -2px 0 #000)
      drop-shadow(1.4px 1.4px 0 #000) drop-shadow(-1.4px -1.4px 0 #000)
      drop-shadow(1.4px -1.4px 0 #000) drop-shadow(-1.4px 1.4px 0 #000)
      drop-shadow(0 4px 5px rgba(90,80,90,0.35));
  }
  .sticker:hover { --scale: 1.08; }
  .sticker.dragging { --scale: 1.1; }
  /* 스티커 내용 (이모지 또는 이미지) */
  .sticker .stk-content {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    pointer-events: none;
  }
  .sticker .stk-content.emoji {
    font-size: 52px;
  }
  .sticker .stk-content img {
    width: 100%; height: 100%;
    object-fit: contain;
  }
  /* 스티커 도구 버튼 (삭제·섀도우) */
  .sticker .stk-tools {
    position: absolute;
    top: -10px; right: -10px;
    display: none;
    gap: 3px;
  }
  .sticker.tools-open .stk-tools { display: flex; }
  .sticker .stk-btn {
    width: 20px; height: 20px;
    border: 0; border-radius: 50%;
    color: #fff; font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .sticker .stk-del-btn { background: var(--pink-d); }
  .sticker .stk-shadow-btn { background: var(--sky); }
  .sticker .stk-shadow-btn.off { background: var(--ink-faint); }
  .sticker .stk-outline-btn { background: var(--ink-faint); font-size: 9px; }
  .sticker .stk-outline-btn.on-white { background: #fff; color: #555; border: 1px solid #ccc; }
  .sticker .stk-outline-btn.on-black { background: #222; color: #fff; }
  /* 순서 버튼 (왼쪽 아래) */
  .sticker .stk-order {
    position: absolute;
    left: -10px; bottom: -10px;
    display: none;
    flex-direction: column;
    gap: 3px;
  }
  .sticker.tools-open .stk-order { display: flex; }
  .sticker .stk-order-btn { background: var(--ink-soft); font-size: 11px; }
  /* 회전 핸들 (왼쪽 위) */
  .sticker .stk-rotate {
    position: absolute;
    left: -8px; top: -8px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--win);
    border: 1.5px solid var(--sky);
    color: var(--sky);
    font-size: 10px;
    cursor: grab;
    display: none;
    align-items: center; justify-content: center;
  }
  .sticker.tools-open .stk-rotate { display: flex; }
  /* 크기 조절 핸들 (오른쪽 아래) */
  .sticker .stk-resize {
    position: absolute;
    right: -8px; bottom: -8px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--win);
    border: 1.5px solid var(--pink-d);
    cursor: nwse-resize;
    display: none;
  }
  .sticker.tools-open .stk-resize { display: block; }

  /* 스티커 고르기 팝업 */
  .sticker-box {
    width: 320px; max-width: 100%;
    background: var(--win);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: smPop 0.2s cubic-bezier(0.22,1,0.36,1);
  }
  .sticker-pick-body { padding: 14px 16px 18px; }
  .sticker-hint {
    font-size: 11.5px; color: var(--ink-soft);
    margin-bottom: 10px; text-align: center;
  }
  .sticker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
  }
  .sticker-upload-btn {
    width: 100%;
    margin-top: 12px;
  }
  /* 스티커 사용법 안내 박스 */
  .sticker-guide {
    margin-top: 14px;
    padding: 11px 13px;
    background: var(--pink-soft);
    border-radius: 11px;
  }
  .sg-title {
    font-size: 11.5px; font-weight: 700;
    color: var(--pink-d);
    margin-bottom: 7px;
  }
  .sg-list {
    margin: 0; padding-left: 16px;
    display: flex; flex-direction: column; gap: 5px;
  }
  .sg-list li {
    font-size: 11px; line-height: 1.5;
    color: var(--ink-soft);
  }
  .sg-list li b { color: var(--ink); font-weight: 700; }
  .sticker-opt {
    font-size: 26px;
    text-align: center;
    padding: 6px 0;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
  }
  .sticker-opt:hover {
    background: var(--pink-soft);
    transform: scale(1.15);
  }

  /* 배경 프리셋 스와치 */
  .bg-presets {
    display: flex; flex-wrap: wrap; gap: 7px;
    margin-bottom: 13px;
  }
  .bg-swatch {
    width: 34px; height: 34px;
    border-radius: 9px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line2);
    cursor: pointer;
    transition: transform 0.13s ease;
  }
  .bg-swatch:hover { transform: scale(1.12); }
  .bg-swatch.on {
    box-shadow: 0 0 0 2px var(--pink-d);
  }

  @media (max-width: 680px) {
    .body { position: relative; }
    .sidebar {
      position: absolute; left: 0; top: 0; bottom: 0; z-index: 40;
      width: min(82%, 282px); transform: translateX(-100%);
      transition: transform .26s ease; box-shadow: 6px 0 24px rgba(120,100,120,.28);
    }
    .sidebar.open { transform: translateX(0); }
    .side-backdrop { display: block; position: absolute; inset: 0; z-index: 39;
      background: rgba(0,0,0,.34); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .side-backdrop.show { opacity: 1; pointer-events: auto; }
    .side-toggle { display: inline-flex; }
    .icon-grid { grid-template-columns: repeat(3, 1fr); }
    .searchbox { width: 110px; }
    body { padding: 14px 12px 50px; }
    .widget { display: none; }
  }
  @media (max-width: 420px) {
    .icon-grid { grid-template-columns: repeat(2, 1fr); }
    .addressbar .crumb.hideable { display: none; }
    .addressbar .sep.hideable { display: none; }
  }

/* =========================================================
   ▒▒ 티스토리 블로그 콘텐츠 스타일 (스킨 변환 추가분) ▒▒
   원본 데스크톱 디자인 토큰(--ink, --pink-d, --sky-soft …)을 그대로 사용
   ========================================================= */

/* 홈(인덱스) 전용 머리말 — 다른 페이지에선 숨김 */
.idx-head { display: none; }
/* 전체글 목록 중복 방지: 홈/글에선 리스트 숨김, 카테고리/태그/검색/보관에선 인덱스 그리드 숨김 */
body#tt-body-index .list-wrap,
body#tt-body-page  .list-wrap { display: none !important; }
body#tt-body-category .idx-grid,
body#tt-body-tag      .idx-grid,
body#tt-body-search   .idx-grid,
body#tt-body-archive  .idx-grid { display: none !important; }
/* 사진첩: 방문자 추가 버튼 숨김 (관리자 옵션으로만 사진 등록) */
#photoAdd { display: none !important; }
/* 홈 커버 (티스토리 정식 커버) — 폴더 안에 표시 */
.cover-area { display: flex; flex-direction: column; gap: 16px; }
/* 커버 블록 사이 구분선 제거 — 간격(gap)만 유지 */
/* 홈 커버 즐겨찾기 아이콘은 조금 더 크게 */
.content .cover-area .icon-grid { grid-template-columns: repeat(var(--cover-cols, 3), 1fr); gap: 8px; }
.content .cover-area .file-ic { width: 72px; height: 72px; }
.content .cover-area .file-doc { font-size: 42px; }
.content .cover-area .file-name { font-size: 13px; }

/* ===== 커버: 슬라이드 배너 ===== */
.cover-slide { position: relative; aspect-ratio: 5 / 2; overflow: hidden; background: var(--side);
  margin-left: -18px; margin-right: -18px; }
.cover-area > .cover-slide:first-child { margin-top: -16px; }   /* 맨 위면 위쪽도 꽉 차게 */
.cover-slide::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent 45%, var(--win)); }   /* 아래로 배경색 페이드(라이트=흰/다크=어둠) */
.cslide-track { position: absolute; inset: 0; }
.cslide { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity .6s ease; text-decoration: none; }
.cslide-track .cslide:first-child { opacity: 1; }
.cslide-bg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--pink-soft), var(--sky-soft)); }
.cslide .file-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cslide-cap { display: none; }
.cslide-date { font-size: 11.5px; opacity: .92; }
.cslide-ttl { font-size: 18px; font-weight: 800; line-height: 1.35; text-shadow: 0 1px 6px rgba(0,0,0,.35);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cslide-dots { position: absolute; left: 0; right: 0; bottom: 11px; z-index: 3; display: flex; justify-content: center; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.cover-slide:hover .cslide-dots { opacity: 1; pointer-events: auto; }
.cslide-dots .cdot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; cursor: pointer; background: var(--ink-faint); opacity: .55; transition: width .2s, opacity .2s; }
.cslide-dots .cdot.on { background: var(--pink-d); opacity: 1; width: 18px; }

/* ===== 커버: 가로 스크롤 카드 ===== */
.chscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.chscroll::-webkit-scrollbar { height: 7px; }
.chscroll::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 999px; }
.chscroll::-webkit-scrollbar-track { background: transparent; }
.chscroll .chcard { flex: 0 0 150px; scroll-snap-align: start; flex-direction: column; align-items: stretch; padding: 0; border: none; background: transparent; }
.chscroll .chcard:hover { background: transparent; }
.chscroll .chcard .file-ic { width: 100%; height: 116px; border-radius: 12px; margin: 0; }
.chscroll .chcard .file-name { text-align: left; margin-top: 7px; font-size: 12.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 커버: 프로필·환영 카드 (이미지 + 설명) ===== */
.cover-profile { padding: clamp(20px, 4vw, 30px) 22px; border-radius: 18px;
  border: none; background: linear-gradient(135deg, var(--pink-soft), var(--sky-soft));
  display: flex; flex-direction: column; gap: 22px; }
.cprof-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 11px; }
.cprof-photo { display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  width: clamp(80px, 18vw, 112px); aspect-ratio: 1 / 1; border-radius: 999px;
  background: var(--win); color: var(--pink-d); font-size: 34px;
  box-shadow: 0 3px 12px rgba(120,100,120,.22); }
.cprof-photo img { width: 100%; height: 100%; object-fit: cover; }
.cprof-card:has(.cprof-ph-img) .cprof-ph-fallback { display: none; }
.cprof-name { font-size: clamp(17px, 3.4vw, 20px); font-weight: 800; color: var(--ink); text-decoration: none; }
.cprof-name:hover { color: var(--pink-d); }
.cprof-bio { margin: 0 auto; max-width: 480px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.65; white-space: pre-line; }
.cprof-bio:empty { display: none; }
/* 티스토리 자동 네임카드(블로그명 박스) 숨김 (JS와 이중 차단) */
[data-tistory-react-app="Namecard"],
.tt_box_namecard { display: none !important; }
/* '기타'의 바탕화면 설정 메뉴 숨김 (관리자는 좌측 하단 ♥ 버튼/시작메뉴로 접근) */
#sideAdmin { display: none !important; }

/* ===== 목록 보기 방식 (갤러리 / 텍스트 / 가로리스트) ===== */
.file-body { width: 100%; }
.file-cat, .file-sum { display: none; }
.file-cat { font-size: 11px; color: var(--pink, #e98cb5); margin-top: 2px; }
.file-sum { font-size: 12px; color: var(--ink-faint); margin-top: 3px; line-height: 1.45;
  -webkit-box-orient: vertical; overflow: hidden; }
/* 구성요소 토글 */
.postlist.show-sum .file-sum { display: -webkit-box; -webkit-line-clamp: 2; }
.postlist.show-cat .file-cat { display: block; }
.postlist.hide-date .fx-date { display: none; }
.postlist.hide-cmt .fx-cmt { display: none; }
.postlist.hide-thumb .file-thumb { display: none; }
.postlist.view-text .file-sum, .postlist.view-text .file-cat { display: none; }
/* 새 글 배지 — 테마색 (튀지 않는 작은 알약) */
.file-name .new-pill {
  display: inline-block; vertical-align: middle;
  margin-right: 5px; padding: 1px 6px;
  font-size: 9px; font-weight: 800; line-height: 1.55;
  color: #fff; background: var(--pink, #e98cb5);
  border-radius: 999px; letter-spacing: 0.3px;
}

/* 갤러리형 — 큰 썸네일 카드 격자 */
.postlist.view-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.postlist.view-gallery .file { flex-direction: column; align-items: stretch; padding: 0;
  border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--win); }
.postlist.view-gallery .file:hover { border-color: var(--sky-l); background: var(--win); }
.postlist.view-gallery .file-ic { width: 100%; height: 116px; border-radius: 0; margin: 0; border: none; }
.postlist.view-gallery .file-doc { font-size: 38px; }
.postlist.view-gallery .file-body { padding: 8px 11px 11px; text-align: left; }
.postlist.view-gallery .file-name { text-align: left; font-size: 13px; }

/* 텍스트형 — 썸네일 없이 한 줄씩 */
.postlist.view-text { display: flex; flex-direction: column; gap: 0; }
.postlist.view-text .file { flex-direction: row; align-items: baseline; gap: 10px;
  padding: 8px 6px; border-radius: 0; border: none; border-bottom: 1px solid var(--line); }
.postlist.view-text .file:hover { background: var(--sky-soft); }
.postlist.view-text .file-ic { display: none; }
.postlist.view-text .file-body { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.postlist.view-text .file-name { text-align: left; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.postlist.view-text .file-ext { white-space: nowrap; flex: 0 0 auto; font-size: 10.5px; }

/* 가로리스트형 — 썸네일 왼쪽 + 본문 오른쪽 */
.postlist.view-list { display: flex; flex-direction: column; gap: 8px; }
.postlist.view-list .file { flex-direction: row; align-items: stretch; gap: 12px; padding: 10px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--win); }
.postlist.view-list .file:hover { border-color: var(--sky-l); background: var(--win); }
.postlist.view-list .file-ic { width: 88px; height: 88px; flex: 0 0 88px; margin: 0; }
.postlist.view-list .file-doc { font-size: 34px; }
.postlist.view-list .file-body { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.postlist.view-list .file-name { text-align: left; font-size: 14px; }

/* 카드형 — 큰 카드 2열 (썸네일 크게 + 요약) */
.postlist.view-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.postlist.view-card .file { flex-direction: column; align-items: stretch; padding: 0;
  border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--win); }
.postlist.view-card .file:hover { border-color: var(--sky-l); background: var(--win); }
.postlist.view-card .file-ic { width: 100%; height: 168px; border-radius: 0; margin: 0; border: none; }
.postlist.view-card .file-doc { font-size: 46px; }
.postlist.view-card .file-body { padding: 12px 14px 15px; text-align: left; display: flex; flex-direction: column; gap: 5px; }
.postlist.view-card .file-name { text-align: left; font-size: 15px; font-weight: 700; }
.postlist.view-card .file-sum { display: -webkit-box; -webkit-line-clamp: 2; }

/* 매거진형 — 가로 와이드 1열 (큰 썸네일 + 넉넉한 요약) */
.postlist.view-magazine { display: flex; flex-direction: column; gap: 14px; }
.postlist.view-magazine .file { flex-direction: row; align-items: stretch; gap: 0;
  padding: 0; overflow: hidden; min-height: 132px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--win); }
.postlist.view-magazine .file:hover { border-color: var(--sky-l); }
.postlist.view-magazine .file-ic { width: 210px; flex: 0 0 210px; height: auto; min-height: 132px; border-radius: 0; margin: 0; border: none; }
.postlist.view-magazine .file-doc { font-size: 44px; }
.postlist.view-magazine .file-body { flex: 1; min-width: 0; padding: 16px 18px; text-align: left;
  display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.postlist.view-magazine .file-name { text-align: left; font-size: 16px; font-weight: 700; }
.postlist.view-magazine .file-sum { display: -webkit-box; -webkit-line-clamp: 3; }

/* 컴팩트형 — 작은 썸네일 + 한 줄 (촘촘) */
.postlist.view-compact { display: flex; flex-direction: column; gap: 1px; }
.postlist.view-compact .file { flex-direction: row; align-items: center; gap: 13px;
  padding: 6px 9px; border: none; border-radius: 8px; background: transparent; }
.postlist.view-compact .file:hover { background: var(--sky-soft); }
.postlist.view-compact .file-ic { width: 30px; height: 30px; flex: 0 0 30px; margin: 0; border-radius: 7px; }
.postlist.view-compact .file-doc { font-size: 15px; }
.postlist.view-compact .file-body { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px;
  justify-content: space-between; text-align: left; }
.postlist.view-compact .file-name { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.postlist.view-compact .file-sum, .postlist.view-compact .file-cat { display: none; }
.postlist.view-compact .file-ext { flex: 0 0 auto; font-size: 10px; white-space: nowrap; }

/* 썸네일형 — 이미지만 (정사각 그리드, 마우스 올리면 제목 살짝) */
.postlist.view-photo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.postlist.view-photo .file { position: relative; flex-direction: column; align-items: stretch; padding: 0; border: none; background: transparent; border-radius: 0; }
.postlist.view-photo .file:hover { background: transparent; }
.postlist.view-photo .file-ic { width: 100%; aspect-ratio: 1 / 1; height: auto; border-radius: 8px; margin: 0; }
.postlist.view-photo .file:hover .file-ic { transform: none; }
.postlist.view-photo .file-doc { font-size: 30px; }
.postlist.view-photo .file-body {
  position: absolute; inset: 0; z-index: 2; border-radius: 8px;
  display: flex; align-items: flex-end; padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0) 62%);
  opacity: 0; transition: opacity .18s ease; pointer-events: none;
}
.postlist.view-photo .file:hover .file-body { opacity: 1; }
.postlist.view-photo .file-name {
  margin: 0; color: #fff; font-size: 12px; font-weight: 600; text-align: left; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,.55);
}
.postlist.view-photo .file-cat, .postlist.view-photo .file-sum, .postlist.view-photo .file-ext { display: none !important; }

/* 보기 전환 버튼 */
.view-switch { margin-left: auto; display: flex; gap: 2px; }
.view-switch .vsw { width: 24px; height: 22px; border: 1px solid var(--line2); background: var(--win);
  border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; padding: 0; }
.view-switch .vsw:hover { background: var(--sky-soft); }
.view-switch .vsw.on { background: var(--sky-soft); color: var(--ink); border-color: var(--sky-l); }

@media (max-width: 560px) {
  .postlist.view-gallery { grid-template-columns: repeat(2, 1fr); }
  .postlist.view-card { grid-template-columns: 1fr; }
  .postlist.view-magazine .file-ic { width: 120px; flex-basis: 120px; min-height: 100px; }
  .postlist.view-magazine .file { min-height: 100px; }
  .view-switch .vsw { width: 22px; height: 20px; font-size: 11px; }
  .content .cover-area .icon-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 방명록 / 태그 페이지 ===== */
.gb-wrap, .tag-wrap { max-width: 820px; margin: 0 auto; }
.gb-body { margin-top: 12px; }

/* ===== 방명록(티스토리 기본 댓글 앱) — 스킨 파스텔 톤으로 ===== */
.gb-body .tt-comment-cont { font-family: var(--font) !important; color: var(--ink); display:flex !important; flex-direction:column !important; }
.gb-body .tt-comment-cont, .gb-body .tt-comment-cont * { font-family: var(--font) !important; }   /* 방명록 전체 마비옛체 */
.gb-body .tt-comment-cont > form { order:-1 !important; }   /* 글쓰기 폼을 맨 위로 */
.gb-body input, .gb-body textarea, .gb-body .tt-cmt { color: var(--ink) !important; -webkit-text-fill-color: var(--ink) !important; caret-color: var(--pink-d) !important; }
.gb-body input::placeholder, .gb-body textarea::placeholder { color: var(--ink-faint) !important; -webkit-text-fill-color: var(--ink-faint) !important; }
/* 입력칸이 contenteditable div(.tt-cmt)인 경우 */
.gb-body .tt-cmt {
  font-size:13.5px !important; line-height:1.6 !important;
  padding:11px 13px !important; min-height:74px !important;
  border:1.5px solid var(--line) !important; border-radius:12px !important;
  background: var(--win) !important; outline:none !important;
}
.gb-body .tt-cmt:focus { border-color: var(--pink-d) !important; }
.gb-body .tt-cmt:empty::before { content: attr(data-placeholder); color: var(--ink-faint) !important; -webkit-text-fill-color: var(--ink-faint) !important; pointer-events:none; }
.gb-body .tt_txt_user { display:block !important; font-size:12px !important; font-weight:800 !important; color: var(--ink-soft) !important; margin-bottom:6px !important; }
.gb-body .tt-box-total { display:none !important; }   /* 스킨 머리말과 중복되는 "방명록 N" 숨김 */
.gb-body .tt-box-total .tt_txt_g { font-weight:800; color: var(--ink); }
.gb-body .tt-box-total .tt_num_g { font-weight:800; color: var(--pink-d); }

/* 작성 폼 카드 */
.gb-body form { margin:0 !important; }
.gb-body .tt-area-write {
  display:flex !important; gap:12px; align-items:flex-start;
  background: var(--side) !important;
  border:none !important;
  border-radius:16px !important;
  padding:15px !important; margin:0 0 4px !important;
}
.gb-body .tt-box-thumb { flex:0 0 auto !important; padding:0 !important; margin:0 !important; }
.gb-body .tt-thumbnail {
  display:block !important; width:42px !important; height:42px !important;
  border-radius:50% !important; background-size:cover !important; background-position:center !important;
  border:1.5px solid var(--line) !important;
}
.gb-body .tt_wrap_write { flex:1 1 auto !important; min-width:0; display:flex; flex-direction:column; gap:9px; }
.gb-body .tt-box-account { display:flex !important; gap:8px; }
.gb-body .tt-box-account input {
  flex:1 1 0; min-width:0; width:auto !important; height:auto !important;
  font-family: var(--font) !important; font-size:13px !important;
  padding:9px 12px !important; margin:0 !important;
  border:1.5px solid var(--line) !important; border-radius:10px !important;
  background: var(--win) !important; color: var(--ink) !important;
  outline:none !important; box-shadow:none !important;
}
.gb-body .tt-box-account input:focus { border-color: var(--pink-d) !important; }
.gb-body .tt-box-account input::placeholder { color: var(--ink-faint) !important; }
.gb-body .tt-box-textarea, .gb-body .tt-box-textarea .tt-inner-g { border:none !important; background:transparent !important; padding:0 !important; margin:0 !important; }
.gb-body .tt-box-textarea textarea {
  width:100% !important; box-sizing:border-box !important; display:block !important;
  font-family: var(--font) !important; font-size:13.5px !important; line-height:1.6 !important;
  padding:11px 13px !important; margin:0 !important;
  border:1.5px solid var(--line) !important; border-radius:12px !important;
  background: var(--win) !important; color: var(--ink) !important;
  min-height:76px !important; resize:vertical !important; outline:none !important; box-shadow:none !important;
}
.gb-body .tt-box-textarea textarea:focus { border-color: var(--pink-d) !important; }
.gb-body .tt-box-textarea textarea::placeholder { color: var(--ink-faint) !important; }
.gb-body .tt-box-write { display:flex !important; align-items:center !important; justify-content:space-between !important; gap:10px; margin-top:2px; padding:0 !important; }
.gb-body .tt-xe-label { display:inline-flex !important; align-items:center; gap:6px; cursor:pointer; font-size:12.5px; color: var(--ink-soft); }
.gb-body .tt-xe-input-helper { display:none !important; }
.gb-body .tt-xe-label input {
  position:static !important; opacity:1 !important; width:15px !important; height:15px !important; margin:0 !important;
  clip:auto !important; clip-path:none !important; overflow:visible !important; pointer-events:auto !important;
  -webkit-appearance:auto !important; appearance:auto !important; accent-color: var(--pink-d);
}
.gb-body .tt-xe-label-text { color: var(--ink-soft); }
.gb-body .tt-btn_register {
  font-family: var(--font) !important; font-weight:800 !important; font-size:13px !important;
  color:#fff !important; background: var(--pink-d) !important;
  border:none !important; border-radius:999px !important;
  padding:9px 22px !important; margin:0 !important; cursor:pointer !important;
  min-width:auto !important; width:auto !important; height:auto !important;
  transition: background .13s ease, opacity .13s ease;
}
.gb-body .tt-btn_register:hover:not(:disabled) { background: var(--pink) !important; }
.gb-body .tt-btn_register:disabled { opacity:.45 !important; cursor:default !important; }
.gb-body .tt-area-reply { margin:4px 0 0 !important; }

/* ----- 방명록 목록(달린 글) ----- */
.gb-body .tt-list-reply, .gb-body .tt-list-reply-comment { list-style:none !important; margin:0 !important; padding:0 !important; }
.gb-body .tt-list-reply { margin-top:6px !important; display:flex !important; flex-direction:column; gap:12px; }
.gb-body .tt-item-reply { list-style:none !important; }
.gb-body .tt-wrap-cmt {
  display:flex !important; gap:11px; align-items:flex-start;
  background: var(--side) !important; border:none !important;
  border-radius:14px !important; padding:12px 14px !important; position:relative;
}
.gb-body .tt-item-reply .tt-box-thumb { flex:0 0 auto !important; padding:0 !important; margin:0 !important; }
.gb-body .tt-item-reply .tt-thumbnail { display:block !important; width:36px !important; height:36px !important; border-radius:50% !important; background-size:cover !important; background-position:center !important; border:1.5px solid var(--line) !important; }
.gb-body .tt-box-content { flex:1 1 auto !important; min-width:0; }
.gb-body .tt-box-meta { display:flex !important; align-items:center; gap:6px; margin-bottom:3px; flex-wrap:wrap; padding-right:24px; }
.gb-body .tt-link-user { font-weight:800 !important; font-size:13px !important; color: var(--ink) !important; text-decoration:none !important; }
.gb-body .tt-link-user:hover { color: var(--pink-d) !important; }
.gb-body .tt_ico_lock {
  display:inline-block !important; font-size:10px !important; line-height:1.6 !important; font-weight:700 !important;
  color: var(--pink-d) !important; background: var(--pink-soft) !important;
  padding:0 7px !important; border-radius:999px !important;
  text-indent:0 !important; width:auto !important; height:auto !important; overflow:visible !important; background-image:none !important; text-decoration:none !important;
}
.gb-body .tt-wrap-desc { margin:0 !important; }
.gb-body .tt_desc { font-size:13.5px !important; line-height:1.6 !important; color: var(--ink) !important; margin:0 !important; word-break:break-word; white-space:pre-wrap; }
.gb-body .tt-wrap-info { display:flex !important; align-items:center; gap:10px; margin-top:7px !important; }
.gb-body .tt_date { font-size:11.5px !important; color: var(--ink-faint) !important; }
.gb-body .tt-link-comment { text-decoration:none !important; }
.gb-body .tt-link-comment .tt_txt_g { font-size:11.5px !important; font-weight:700 !important; color: var(--ink-soft) !important; }
.gb-body .tt-link-comment:hover .tt_txt_g { color: var(--pink-d) !important; }
.gb-body .tt-box-modify { position:absolute !important; top:10px; right:12px; }
.gb-body .tt-button-modify { font-size:0 !important; background:none !important; border:none !important; cursor:pointer !important; padding:2px 4px !important; width:auto !important; height:auto !important; background-image:none !important; text-indent:0 !important; line-height:1 !important; }
.gb-body .tt-button-modify::before { content:'\22EF'; font-size:17px; color: var(--ink-faint); }
.gb-body .tt-button-modify:hover::before { color: var(--pink-d); }
.gb-body .tt-list-modify {
  list-style:none !important; margin:4px 0 0 !important; padding:5px !important;
  background: var(--win) !important; border:1.5px solid var(--line) !important; border-radius:10px !important;
  box-shadow:0 6px 18px rgba(0,0,0,.16) !important; min-width:96px;
}
.gb-body .tt-list-modify li { list-style:none !important; }
.gb-body .tt-list-modify a { display:block !important; padding:6px 10px !important; font-size:12px !important; color: var(--ink) !important; text-decoration:none !important; border-radius:7px !important; }
.gb-body .tt-list-modify a:hover { background: var(--pink-soft) !important; color: var(--pink-d) !important; }
.gb-body .tt-list-reply-comment { margin-top:10px !important; padding-left:20px !important; display:flex !important; flex-direction:column; gap:10px; }
.gb-body .tt-list-reply-comment > .tt-item-reply > .tt-wrap-cmt { background: var(--win) !important; }
/* 답글 영역의 티스토리 기본 라인(border-top 등) 제거 */
.gb-body .tt-list-reply, .gb-body .tt-list-reply-comment,
.gb-body .tt-list-reply > .tt-item-reply, .gb-body .tt-list-reply-comment > .tt-item-reply,
.gb-body .tt-item-reply, .gb-body .tt-box-content, .gb-body .tt-box-meta,
.gb-body .tt-wrap-desc, .gb-body .tt-wrap-info { border:none !important; }
.gb-body .tt_box_pwd { margin-top:9px !important; }
.gb-body .tt_form_pwd fieldset { border:none !important; margin:0 !important; padding:0 !important; display:flex !important; gap:7px; }
.gb-body .tt_inp_g {
  flex:1 1 auto; font-family: var(--font) !important; font-size:12.5px !important;
  padding:8px 11px !important; border:1.5px solid var(--line) !important; border-radius:9px !important;
  background: var(--win) !important; color: var(--ink) !important; outline:none !important;
}
.gb-body .tt_inp_g:focus { border-color: var(--pink-d) !important; }
.gb-body .tt_btn_submit { background: var(--pink-d) !important; border:none !important; border-radius:999px !important; padding:0 16px !important; cursor:pointer !important; }
.gb-body .tt_btn_submit:disabled { opacity:.45 !important; }
.gb-body .tt_ico_check { color:#fff !important; font-size:12px !important; font-weight:800 !important; text-indent:0 !important; width:auto !important; height:auto !important; background-image:none !important; overflow:visible !important; line-height:34px !important; }
.taglog { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; padding: 4px; align-items: baseline; }
.taglog .tag-item {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  background: var(--pink-soft, #ffe2ef); color: var(--pink-d, #e06699);
  text-decoration: none; font-weight: 600; line-height: 1.2;
  border: 1.5px solid transparent;
  transition: background .13s ease, border-color .13s ease, transform .1s ease;
}
.taglog .tag-item:hover { background: var(--win); border-color: var(--pink); transform: translateY(-2px); }
.taglog .tag-item.cloud1 { font-size: 19px; background: var(--pink, #e98cb5); color: #fff; }
.taglog .tag-item.cloud2 { font-size: 16px; }
.taglog .tag-item.cloud3 { font-size: 14px; }
.taglog .tag-item.cloud4 { font-size: 12.5px; background: var(--sky-soft); color: var(--sky); }
.taglog .tag-item.cloud5 { font-size: 11px; background: var(--sky-soft); color: var(--sky); opacity: 0.92; }

/* ----- 글 카드(목록) : 파일 아이콘을 썸네일 타일로 ----- */
.content .file-ic {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--sky-soft);
  border: 1.5px solid var(--line);
}
.content .file:hover .file-ic { border-color: var(--sky-l); }
.content .file-doc {
  font-size: 30px; line-height: 1;
  filter: drop-shadow(1.5px 2px 0 rgba(90,80,100,0.10));
}
.content .file-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* 썸네일(바로가기·글 이미지)이 있으면 폴더/문서 아이콘을 숨겨 뒤 비침 방지 */
.file-ic:has(.file-thumb) .file-doc { display: none; }
.content .file-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----- 퍼머링크(글 본문) ----- */
/* 본문일 땐 그리드를 풀어 한 편을 넓게 */
body#tt-body-page .idx-grid { display: block; }

.post {
  max-width: 760px;
  margin: 4px auto 0;
  animation: fileIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
.post-head {
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1.5px dashed var(--line2);
}
.post-cat {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  color: #fff; background: var(--pink-d);
  padding: 3px 11px; border-radius: 999px;
  text-decoration: none; margin-bottom: 12px;
}
.post-cat:hover { background: var(--pink); }
.post-title {
  font-size: 25px; line-height: 1.35;
  color: var(--ink); word-break: keep-all;
}
.post-meta {
  margin-top: 9px;
  font-size: 12px; color: var(--ink-faint);
}

/* 본문 타이포 */
.post-body {
  max-width: 760px;
  margin: 0 auto;
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 14.5px; line-height: 1.8;
  color: var(--ink); word-break: keep-all;
}
.post-body > * { margin-bottom: 1.05em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  color: var(--ink); line-height: 1.4;
  margin: 1.5em 0 0.6em; word-break: keep-all;
}
.post-body h1 { font-size: 22px; }
.post-body h2 {
  font-size: 19px;
  padding-bottom: 6px; border-bottom: 2px solid var(--pink-soft);
}
.post-body h3 { font-size: 17px; }
.post-body h3::before { content: "♥ "; color: var(--pink-d); }
.post-body a { color: var(--sky); text-decoration: none; border-bottom: 1px solid var(--sky-l); }
.post-body a:hover { color: var(--pink-d); border-bottom-color: var(--pink); }
.post-body img, .post-body video, .post-body iframe {
  max-width: 100%; height: auto; border-radius: 12px;
}
.post-body figure { margin: 1.2em 0; text-align: center; }
.post-body figure figcaption { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.post-body blockquote {
  margin: 1.2em 0; padding: 12px 18px;
  background: var(--pink-soft);
  border-left: 4px solid var(--pink-d);
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
}
.post-body pre {
  background: #2f2b35; color: #f4eef6;
  padding: 16px 18px; border-radius: 12px;
  overflow-x: auto; font-size: 13px; line-height: 1.6;
}
.post-body code {
  font-family: 'Consolas','Menlo',monospace; font-size: 0.92em;
  background: var(--sky-soft); color: var(--ink);
  padding: 2px 6px; border-radius: 6px;
}
.post-body pre code { background: none; color: inherit; padding: 0; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li { margin-bottom: 0.4em; }
.post-body hr { border: none; border-top: 1.5px dashed var(--line2); margin: 1.8em 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.post-body th, .post-body td { border: 1px solid var(--line2); padding: 8px 10px; }
.post-body th { background: var(--pink-soft); }

/* 보호글 비밀번호 입력 카드 */
.post-body:empty { display: none; }
.post-protected { max-width: 440px; margin: 30px auto; padding: 32px 26px; text-align: center;
  background: var(--win); border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 18px rgba(150,120,140,.12); }
.post-protected .pp-lock { font-size: 38px; margin-bottom: 6px; }
.post-protected .pp-msg { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }
.post-protected .pp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 0; }
.post-protected .pp-input { flex: 1 1 160px; min-width: 0; padding: 9px 13px; font-size: 14px;
  border: 1.5px solid var(--line2); border-radius: 10px; background: var(--side); color: var(--ink); }
.post-protected .pp-input:focus { outline: none; border-color: var(--pink); }
.post-protected .pp-btn { flex: 0 0 auto; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 10px; background: var(--pink); color: #fff; }
.post-protected .pp-btn:hover { background: var(--pink-d); }

/* 태그 */
.post-tags {
  max-width: 760px; margin: 26px auto 0;
  font-size: 0;            /* 티스토리가 핀 사이에 넣는 콤마/공백 텍스트 숨김 */
  color: var(--ink-soft);
}
.post-tags .pt-label {
  font-size: 12.5px; font-weight: 700; color: var(--pink-d);
  vertical-align: middle; margin-right: 8px;
}
.post-tags a {
  display: inline-block; vertical-align: middle;
  font-size: 12px;
  background: var(--side); color: var(--ink-soft);
  padding: 4px 10px; border-radius: 999px;
  text-decoration: none; border: 1px solid var(--line);
  margin: 0 6px 6px 0;     /* 핀 간격(콤마 대신) */
}
.post-tags a:hover { background: var(--pink-soft); color: var(--ink); }

.post-admin {
  max-width: 760px; margin: 16px auto 0;
  display: flex; gap: 8px; justify-content: flex-end;
}
.post-admin a {
  font-size: 11.5px; padding: 5px 13px; border-radius: 999px;
  background: var(--side); border: 1px solid var(--line2);
  color: var(--ink-soft); text-decoration: none; transition: background .14s, border-color .14s;
}
.post-admin a:hover { background: var(--sky-soft); color: var(--ink); border-color: var(--sky-l); }
.post-admin a.pa-del:hover { background: var(--pink-soft); color: var(--pink-d); }

/* 이전·다음 글 */
.post-nav {
  max-width: 760px; margin: 30px auto 0;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.pn-item {
  flex: 1; min-width: 200px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 15px;
  background: var(--win); border: 1.5px solid var(--line);
  border-radius: 12px; text-decoration: none;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.pn-item:hover { border-color: var(--sky-l); background: var(--sky-soft); }
.pn-next { text-align: right; }
.pn-dir { font-size: 11px; font-weight: 700; color: var(--pink-d); }
.pn-title {
  font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 카테고리의 다른 글 */
.post-related { max-width: 760px; margin: 36px auto 0; }
.post-related .pr-head {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 12px;
}
/* 카테고리 다른 글 — 카드 안쪽 상하좌우 여백 */
.content .post-related .icon-grid { gap: 14px; }
.content .post-related .file {
  padding: 0; border-radius: 14px; overflow: hidden;   /* 썸네일은 카드 끝까지 꽉 차게 */
  align-items: stretch; text-align: left;
  border: 1.5px solid var(--line); background: var(--win);
  transition: border-color .13s ease, background .13s ease;
}
.content .post-related .file:hover { border-color: var(--pink); }
.content .post-related .file-ic {
  width: 100%; aspect-ratio: 1 / 1; height: auto; position: relative;
  margin: 0; border-radius: 0;                          /* 썸네일 풀 블리드 */
  background: var(--pink-soft);
  display: flex; align-items: center; justify-content: center;
}
.content .post-related .file-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.content .post-related .file-doc { font-size: 30px; }
/* ↓ 글자(제목·날짜) 부분만 상하좌우 여백 */
.content .post-related .file-name {
  text-align: left; line-height: 1.45;
  padding: 11px 11px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.content .post-related .file-ext { text-align: left; padding: 5px 11px 13px; margin-top: 0; }

/* ===== 글 하단: 티스토리 기본 요소 정리 ===== */
/* 자동 '다른 글' 표 + 저작자표시(CCL) + 후원 버튼 숨김 */
.another_category, .postbtn_ccl, [data-tistory-react-app="SupportButton"] { display: none !important; }
.btn_subscription, .btn_menu_toolbar.btn_subscription { display: none !important; }
/* 버튼 묶음: 가운데 정렬, 티스토리 기본 테두리/여백 제거 */
.container_postbtn { display: flex !important; justify-content: center !important;
  border: none !important; padding: 0 !important; margin: 26px auto 6px !important; max-width: 760px; }
/* 공감 버튼만 남기고 공유·통계·관리 숨김 */
.postbtn_like { display: flex !important; justify-content: center !important; gap: 0 !important;
  margin: 0 !important; padding: 0 !important; border: none !important; background: none !important; }
.postbtn_like .wrap_btn { display: none !important; }
.postbtn_like .wrap_btn[id^="reaction-"] { display: block !important; margin: 0 !important; }
/* 공감 버튼 — 분홍 알약 + 하트만 (글씨 숨김) */
.container_postbtn .postbtn_like .btn_post.uoc-icon,
.postbtn_like .btn_post.uoc-icon {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  gap: 0 !important; width: auto !important; height: auto !important;
  padding: 8px 22px !important; border-radius: 999px !important; cursor: pointer;
  background: var(--pink-soft) !important; border: 0 !important;
  box-shadow: 0 2px 0 rgba(150,120,140,0.10) !important;
  transition: background .14s ease, transform .1s ease;
}
.postbtn_like .btn_post.uoc-icon:hover { background: var(--pink) !important; }
.postbtn_like .btn_post.uoc-icon:active { transform: scale(0.95); }
.postbtn_like .uoc-icon { display: inline-flex !important; align-items: center !important; gap: 0 !important; }
.postbtn_like .ico_like {
  background: none !important; width: auto !important; height: auto !important; min-width: 0 !important;
  margin: 0 !important; padding: 0 !important; text-indent: 0 !important; font-size: 0 !important; overflow: visible !important;
}
.postbtn_like .ico_like::before { content: "♥"; font-size: 17px !important; line-height: 1; color: var(--pink-d, #e06699) !important; }
.postbtn_like .txt_like { display: none !important; }
/* 공감 버튼을 제목 영역으로 옮겼을 때 — 작게, 오른쪽 위(제목·날짜 옆) */
.post-head { position: relative; }
.post-head .container_postbtn.in-head {
  position: absolute; top: 0; right: 0; margin: 0 !important; padding: 0 !important;
  min-height: 0 !important; width: auto !important; display: flex !important; justify-content: flex-end !important;
}
.post-head .container_postbtn.in-head .btn_post.uoc-icon { padding: 3px 11px !important; border: 0 !important; box-shadow: none !important; }
.post-head .container_postbtn.in-head .ico_like::before { font-size: 13px !important; }

/* ----- 페이징 ----- */
.paging {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 30px 0 12px; flex-wrap: wrap;
}
.paging a { text-decoration: none; }
.pg-num, .pg-arrow {
  min-width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 12.5px; color: var(--ink-soft);
  background: var(--win); border: 1.5px solid var(--line);
  transition: all 0.13s ease;
}
.pg-num:hover, .pg-arrow:hover { background: var(--sky-soft); border-color: var(--sky-l); color: var(--ink); }
.pg-num.selected, .pg-num[class*="current"], .paging .pg-num.pg-on {
  background: var(--pink-d); border-color: var(--pink-d); color: #fff; font-weight: 700;
}
.pg-arrow.no_more_prev, .pg-arrow.no_more_next { opacity: 0.35; pointer-events: none; }

/* ----- 댓글 ----- */
.post-comments {
  max-width: 760px; margin: 40px auto 10px;
  padding-top: 22px;
  border-top: 1.5px dashed var(--line2);
}

/* ----- 사이드바 카테고리 목록 ----- */
.cat-box { font-size: 12.5px; }
.cat-box ul { list-style: none; margin: 0; padding: 0; }
.cat-box li { margin: 0; }
.cat-box a {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 9px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none;
  transition: background 0.13s ease, color 0.13s ease;
}
.cat-box a::before { content: "🍓"; font-size: 11px; opacity: 0.8; }
.cat-box a:hover { background: var(--win); color: var(--ink); }
.cat-box .c_cnt, .cat-box .cnt { display: none; }
/* 새 글 'N' 배지 — 티스토리 기본 주황 → 테마색 */
.cat-box .cat-new {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 15px; height: 15px; padding: 0 3px; margin-left: 4px;
  font-size: 9px; font-weight: 800; line-height: 1; vertical-align: middle;
  color: #fff !important; background: var(--pink, #e98cb5) !important;
  border-radius: 999px !important; border: 0 !important;
}
/* 하위 카테고리(2·3단) — 부드러운 들여쓰기 + 파스텔 가이드 */
.cat-box ul ul {
  margin: 1px 0 4px 8px; padding-left: 12px;
  border-left: 1.5px solid var(--pink-soft, #ffe2ef);
}
.cat-box ul ul a { padding-left: 7px; font-size: 12px; }
.cat-box ul ul a::before { content: "♡"; font-size: 10px; color: var(--pink-d, #e06699); opacity: 0.85; }
.cat-box ul ul ul { border-left-color: var(--sky-l); }
.cat-box ul ul ul a::before { content: "·"; font-size: 13px; opacity: 0.6; }
/* 하위 카테고리 접기/펼치기 토글 */
.cat-box li.has-sub { position: relative; }
.cat-box li.has-sub > a { padding-right: 26px; }
.cat-box .cat-toggle {
  position: absolute; top: 5px; right: 4px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  color: var(--ink-faint); border-radius: 6px; z-index: 2;
  transition: background .12s ease, color .12s ease;
}
.cat-box .cat-toggle:hover { background: var(--pink-soft, #ffe2ef); color: var(--pink-d, #e06699); }
.cat-box .cat-toggle .ct-ic { font-size: 9px; line-height: 1; display: inline-block; transition: transform .18s ease; }
.cat-box li.has-sub:not(.collapsed) > .cat-toggle .ct-ic { transform: rotate(90deg); }
.cat-box li.has-sub.collapsed > ul { display: none; }
/* 현재 보고 있는 카테고리 강조 */
.cat-box a.cat-active { background: var(--pink-soft, #ffe2ef); color: var(--ink); font-weight: 700; }

/* ----- 모바일 ----- */
@media (max-width: 760px) {
  .post-title { font-size: 21px; }
  .post-body { font-size: 15px; }
  .post-nav { flex-direction: column; }
  /* 모바일에선 사이드바가 숨겨지므로(원본 규칙) 카테고리는 본문 위 안내로 대체 안 함 */
}
