/* 보관함 홈(폰 폭)에서 리딩룸·앨범·분류 파일의 칸 구분(테두리·바탕·머리 막대·그림자)을 없애고 여백만 둔다.
   확보한 자리로 책등·카드·상단 아이콘을 키운다(2026-10-11 사용자). 라이브러리 CSS 들 뒤에 읽는다. 데스크톱은 그대로. */
@media (max-width: 620px) {
  body:has(#dashboardView:not(.hidden)) .shell { padding-left: 8px !important; padding-right: 8px !important; }
  #dashboardView { padding-left: 0 !important; }

  /* 칸 없애기: 리딩룸 · 앨범 · 분류 파일 */
  .library-overview,
  .library-section {
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }
  .library-overview-top { border-bottom: 0 !important; }
  .library-section { margin-top: 22px; }
  .library-section > .section-head,
  .library-section .section-head {
    border-bottom: 0 !important;
    background: none !important;
    padding: 4px 6px !important;
  }
  .library-overview-copy { padding: 6px 6px 2px !important; }
  .library-overview-shelf.shelf-host { padding: 8px 0 10px !important; }
  /* 같은 줄의 라벨 글자 크기 = 아이콘 크기(18px, 2026-10-11 사용자). 길면 말줄임. */
  .library-section .eyebrow, .library-overview-copy .eyebrow {
    margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .library-section > .section-head > div:first-child, .library-overview-copy { min-width: 0; }

  /* 카드: 칸 배경 없이 화면 폭을 다 쓰고, 카드 글자는 키운다 */
  body:has(#dashboardView:not(.hidden)) .library-section .album-grid,
  body:has(#dashboardView:not(.hidden)) .library-section .file-grid,
  .album-grid, .file-grid {
    background: none !important;
    min-height: 0 !important;
    padding: 6px 0 !important;
    gap: 8px !important;
  }
  .album-grid .item-card h3, .file-grid .item-card h3 { font-size: 20px; }
  .library-section .golden-card .golden-info h3 { font-size: 16px !important; }
  .library-section .golden-card .golden-count strong { font-size: 16px; }

  /* 상단 바와 머리 줄 아이콘 */
  .topbar.library-topbar { min-height: 64px; }
  .topbar.library-topbar .sidebar-toggle { width: 48px; height: 52px; }
  .topbar.library-topbar .sidebar-toggle svg { width: 26px; height: 26px; }
  .topbar.library-topbar .home-switch button { width: 42px; height: 42px; }
  .topbar.library-topbar .home-switch button svg { width: 24px; height: 24px; }
  .topbar.library-topbar .account-nav .notification-button,
  .topbar.library-topbar .mobile-photos-btn { width: 44px; min-width: 44px; flex: 0 0 44px; height: 44px; min-height: 44px; }
  .topbar.library-topbar .mobile-account-btn { width: 44px; height: 44px; flex: 0 0 44px; }
  .topbar.library-topbar .account-nav svg,
  .topbar.library-topbar .mobile-photos-btn svg,
  .topbar.library-topbar .mobile-account-btn svg { width: 27px; height: 27px; }
  .library-overview-top .library-lens-button { width: 36px; min-width: 36px; height: 40px; min-height: 40px; }
  .library-overview-top .library-lens-button svg { width: 18px; height: 18px; }
  .library-section > .section-head .section-create-button,
  .library-section > .section-head .sort-menu summary,
  .classification-section > .section-head .classification-nav .section-create-button {
    width: 40px !important; height: 40px !important; min-height: 40px !important;
  }
  .library-section > .section-head .section-create-button svg,
  .library-section > .section-head .sort-menu summary svg { width: 18px; height: 18px; }
}

/* 그림자·테두리 없애기(2026-10-11 사용자): 앨범·날짜 파일·카드·책등·월 파일의 바깥 그림자와 날짜 파일 테두리.
   고른 것을 알리는 파란 고리·윤곽선은 남긴다. 책등·유리의 안쪽 빛(inset)은 모양이라 둔다. */
@media (max-width: 620px) {
  .item-card, .album-card, .file-card,
  .item-card:hover,
  .library-section .golden-card,
  .library-section .file-grid .file-card,
  .library-section .album-grid .album-card,
  [data-theme="dark"] .library-section .file-grid .file-card {
    box-shadow: none !important;
  }
  /* 날짜 파일 테두리(그라데이션 틀)와 안쪽 사진 테두리 */
  .library-section .file-grid .file-card,
  .library-section .golden-card {
    border: 0 !important;
    background: none !important;
  }
  .library-section .file-grid .file-card .item-cover,
  .library-section .golden-card .item-cover { border: 0 !important; box-shadow: none !important; filter: none !important; }
  .library-section .golden-card.selected { box-shadow: none !important; }   /* 고른 표시는 파란 윤곽선(outline)이 맡는다 */

  /* 리딩룸: 책등·월 파일·넘김 시계의 바깥 그림자 */
  .sp-spines, .shelf-row, .lens-row { box-shadow: none !important; }
  .sp-spine { box-shadow: inset 3px 3px 6px #ffffffa0, inset -3px -3px 7px #7aa5bd55, 0 0 0 1px #d8edf58c; }
  .sp-spine.is-selected { box-shadow: inset 3px 3px 6px #ffffffc0, inset -3px -3px 7px #7aa5bd55, 0 0 0 2px var(--info, #60a5fa); }
  [data-theme="dark"] .sp-spine { box-shadow: inset 3px 3px 6px #ffffff70, inset -3px -3px 7px #243a4a8c, 0 0 0 1px #c8e4ef66; }
  [data-theme="dark"] .sp-spine.is-selected { box-shadow: inset 3px 3px 6px #ffffff90, inset -3px -3px 7px #243a4a8c, 0 0 0 2px var(--info, #60a5fa); }
  .sp-card, .shelf-month-face, .sp-flap { box-shadow: none !important; }
  .sp-card.is-focused { box-shadow: 0 0 0 2px var(--info, #60a5fa) !important; }
  .sp-flap { box-shadow: 0 0 0 1px var(--line-strong) !important; }
  button.work-file.is-focused, button.work-file.is-dim.is-focused { box-shadow: 0 0 0 2px var(--info, #60a5fa) !important; }
}

/* 년도 앨범을 눌러 연 뒤의 "접기" 단추와 그 머리 줄은 없앤다(2026-10-11 사용자) */
@media (max-width: 620px) {
  .shelf-fold,
  .library-overview-shelf > .shelf-heading { display: none !important; }
}

/* 상단 바(메뉴·앨범/기록장 전환·로고·친구·회원)는 스크롤을 내려도 화면 맨 위에 남는다(2026-10-11 사용자). */
@media (max-width: 620px) {
  body:has(#dashboardView:not(.hidden)) .topbar.library-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    margin-bottom: 8px;
    background: var(--paper, var(--bg, #f4f4f2)) !important;
  }
}

/* 좌상단 ☰ 자리에 친구(말풍선) 버튼(library-mobile.js가 #notificationBtn 을 맨 앞으로 옮긴다, 2026-10-12 사용자). ☰ 는 숨긴다. */
@media (max-width: 620px) {
  .topbar.library-topbar .sidebar-toggle { display: none !important; }
  .topbar.library-topbar > .notification-button {
    grid-column: 1;
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    min-width: 48px;
    height: 52px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
  }
  .topbar.library-topbar > .notification-button svg { width: 27px; height: 27px; }
  .topbar.library-topbar > .notification-button .header-tool-label { display: none; }
  .topbar.library-topbar > .notification-button .notification-badge {
    top: 4px; right: 1px; min-width: 0; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 999px;
    background: var(--danger, #f87171); font-size: 11px; font-weight: 900; line-height: 1; box-shadow: 0 0 0 2px var(--bg); color: #fff;
  }
}
