/* HYUNWOO V32.17 — 학습 보관함 전체 폭 + 공통 페이지 스크롤
   별도 스크롤 셸을 없애고 다른 탭과 같은 window 스크롤/하단바 로직을 사용한다. */

html body.storage-library-active {
  width: 100% !important;
  height: auto !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #f6f8fb !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
}

html body.storage-library-active #appRoot#appRoot#appRoot#appRoot {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: max(8px, env(safe-area-inset-top)) 0 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  grid-template-areas: "storage-header" "storage-content" !important;
  align-content: stretch !important;
  gap: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

html body.storage-library-active #appRoot > .topbar,
html body.storage-library-active #appRoot > .footer {
  display: none !important;
}

html body.storage-library-active #appRoot > [data-study-home] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) {
  grid-area: storage-header !important;
  position: relative !important;
  top: 0 !important;
  z-index: 180100 !important;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) 42px !important;
  grid-template-rows: auto !important;
  grid-template-areas: "back title action" !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 56px !important;
  margin: 0 0 10px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  background: rgba(246, 248, 251, .96) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
  box-shadow: 0 1px 0 rgba(223, 230, 239, .82) !important;
}

html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) .study-home-btn {
  grid-area: back !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  background: transparent !important;
  color: #111a2d !important;
}

html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) .player-title-copy {
  grid-area: title !important;
  min-width: 0 !important;
}

html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) .storage-library-edit {
  grid-area: action !important;
  justify-self: end !important;
}

html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) .study-feature-header-spacer {
  display: none !important;
}

html body.storage-library-active #appRoot .storage-library-screen:not(.hidden) {
  grid-area: storage-content !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: calc(100dvh - 74px - env(safe-area-inset-top)) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #f6f8fb !important;
  box-shadow: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}

html body.storage-library-active #appRoot .storage-library-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  height: 64px !important;
  padding: 14px 16px 8px !important;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 36px !important;
  align-items: center !important;
  gap: 7px !important;
  background: rgba(246, 248, 251, .96) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

html body.storage-library-active #appRoot .storage-library-head > div {
  min-width: 0 !important;
}

html body.storage-library-active #appRoot .storage-library-head h2 {
  margin: 0 !important;
  color: #111a2d !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
  letter-spacing: -.04em !important;
}

html body.storage-library-active #appRoot .storage-library-back,
html body.storage-library-active #appRoot .storage-library-edit {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #111a2d !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .storage-library-back {
  display: grid !important;
  place-items: center !important;
}

html body.storage-library-active #appRoot .storage-library-back svg {
  width: 21px !important;
  height: 21px !important;
  display: block !important;
}

html body.storage-library-active #appRoot .storage-library-edit {
  color: #6c7a90 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
}

html body.storage-library-active #appRoot .storage-library-edit[aria-pressed="true"] {
  color: #0f9f92 !important;
}

html body.storage-library-active #appRoot .storage-library-search {
  height: 42px !important;
  margin: 6px 0 9px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid #e0e7ef !important;
  border-radius: 13px !important;
  background: #ffffff !important;
  color: #6c7a90 !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .storage-library-search:focus-within {
  border-color: #ccd6e2 !important;
  box-shadow: 0 0 0 3px rgba(15, 159, 146, .08) !important;
}

html body.storage-library-active #appRoot .storage-library-search svg {
  flex: 0 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

html body.storage-library-active #appRoot .storage-library-search input {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #344158 !important;
  font: inherit !important;
  font-size: 11px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
}

html body.storage-library-active #appRoot .storage-library-search input::placeholder {
  color: #6c7a90 !important;
  opacity: 1 !important;
}

html body.storage-library-active #appRoot .storage-library-search input::-webkit-search-cancel-button {
  opacity: .55 !important;
}

html body.storage-library-active #appRoot .storage-library-tabs {
  height: 37px !important;
  margin: 0 !important;
  padding: 3px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 3px !important;
  border-radius: 12px !important;
  background: #f1f5f9 !important;
}

html body.storage-library-active #appRoot .storage-library-tabs button,
html body.storage-library-active #appRoot .storage-library-tabs .storage-library-worksheet-tab {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #6c7a90 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}


html body.storage-library-active #appRoot .storage-library-tabs .storage-library-worksheet-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

html body.storage-library-active #appRoot .storage-library-tabs button b {
  margin-left: 2px !important;
  font: inherit !important;
}

html body.storage-library-active #appRoot .storage-library-tabs button.active {
  background: #ffffff !important;
  color: #111a2d !important;
  box-shadow: 0 1px 4px rgba(17, 26, 45, .08) !important;
}

html body.storage-library-active #appRoot .storage-library-filters {
  min-height: 30px !important;
  margin: 10px 0 !important;
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

html body.storage-library-active #appRoot .storage-library-filters::-webkit-scrollbar {
  display: none !important;
}

html body.storage-library-active #appRoot .storage-library-filter {
  flex: 0 0 auto !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  border: 1px solid #e0e7ef !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #6c7a90 !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .storage-library-filter.active {
  border-color: #10192c !important;
  background: #10192c !important;
  color: #ffffff !important;
}

html body.storage-library-active #appRoot .storage-library-content {
  flex: 1 0 auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding-bottom: calc(102px + env(safe-area-inset-bottom)) !important;
  scroll-padding-bottom: calc(102px + env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  overscroll-behavior-y: auto !important;
}

html body.storage-library-active.bottom-tabbar-hidden:not(.bottom-tab-always) #appRoot .storage-library-content {
  padding-bottom: 0 !important;
  scroll-padding-bottom: 0 !important;
}

html body.storage-library-active #appRoot .storage-library-panel {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .storage-library-list {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
  border: 1px solid #e0e7ef !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .storage-library-list > .empty,
html body.storage-library-active #appRoot .storage-library-list > .loading,
html body.storage-library-active #appRoot .resource-library-list > .empty {
  min-height: 112px !important;
  margin: 0 !important;
  padding: 24px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #6c7a90 !important;
  text-align: center !important;
  font-size: 11px !important;
  line-height: 1.55 !important;
}

html body.storage-library-active #appRoot .resource-library-intro {
  min-height: 58px !important;
  margin: 0 0 10px !important;
  padding: 11px 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border: 1px solid #dce8e6 !important;
  border-radius: 16px !important;
  background: #effaf8 !important;
  color: #163e3a !important;
}

html body.storage-library-active #appRoot .resource-library-intro > div {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

html body.storage-library-active #appRoot .resource-library-intro strong {
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
}

html body.storage-library-active #appRoot .resource-library-intro span {
  color: #52736f !important;
  font-size: 9px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

html body.storage-library-active #appRoot .resource-library-intro .resource-library-total {
  flex: 0 0 auto !important;
  min-width: 38px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #0f766e !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  box-shadow: 0 1px 4px rgba(15, 118, 110, .08) !important;
}

html body.storage-library-active #appRoot .resource-library-list {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 0 1px !important;
  display: grid !important;
  gap: 9px !important;
}

html body.storage-library-active #appRoot .resource-file-card {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  border: 1px solid #e0e7ef !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .resource-file-icon {
  width: 44px !important;
  height: 48px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 1px !important;
  border-radius: 12px !important;
  background: #fff1f1 !important;
  color: #b94b4b !important;
}

html body.storage-library-active #appRoot .resource-file-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

html body.storage-library-active #appRoot .resource-file-icon span {
  font-size: 7px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: .05em !important;
}

html body.storage-library-active #appRoot .resource-file-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

html body.storage-library-active #appRoot .resource-file-copy strong {
  min-width: 0 !important;
  color: #111a2d !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
  letter-spacing: -.025em !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

html body.storage-library-active #appRoot .resource-file-copy p {
  margin: 0 !important;
  color: #637087 !important;
  font-size: 9px !important;
  line-height: 1.4 !important;
  font-weight: 650 !important;
  word-break: keep-all !important;
}

html body.storage-library-active #appRoot .resource-file-copy > span {
  color: #8a96a8 !important;
  font-size: 8px !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}

html body.storage-library-active #appRoot .resource-download-btn {
  min-width: 72px !important;
  min-height: 36px !important;
  padding: 0 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border: 1px solid #d5e5e2 !important;
  border-radius: 11px !important;
  background: #f2faf8 !important;
  color: #0f766e !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  -webkit-tap-highlight-color: transparent !important;
}

html body.storage-library-active #appRoot .resource-download-btn:active {
  background: #e4f5f1 !important;
}

html body.storage-library-active #appRoot .resource-download-btn svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
}

html body.storage-library-active #appRoot .storage-question-card {
  position: relative !important;
  content-visibility: auto !important;
  contain-intrinsic-size: 108px !important;
  contain: layout paint style !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px 14px 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #111a2d !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

html body.storage-library-active #appRoot .storage-question-card + .storage-question-card {
  border-top: 1px solid #e0e7ef !important;
}

html body.storage-library-active #appRoot .storage-question-card:active {
  background: #f8fafc !important;
}

html body.storage-library-active #appRoot .storage-question-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: #6c7a90 !important;
  font-size: 9px !important;
  line-height: 1.25 !important;
  font-weight: 650 !important;
}

html body.storage-library-active #appRoot .storage-question-meta span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.storage-library-active #appRoot .storage-question-meta time {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

html body.storage-library-active #appRoot .storage-question-copy {
  margin: 7px 0 6px !important;
  color: #344158 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: 750 !important;
  letter-spacing: -.025em !important;
  white-space: pre-wrap !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

html body.storage-library-active #appRoot .storage-question-bottom {
  min-height: 25px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

html body.storage-library-active #appRoot .storage-answer-tag {
  min-height: 25px !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 8px !important;
  background: #fff0f0 !important;
  color: #b94b4b !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
}

html body.storage-library-active #appRoot .storage-answer-tag.bookmark {
  background: #eaf8f1 !important;
  color: #167b52 !important;
}

html body.storage-library-active #appRoot .storage-answer-tag.confused {
  background: #fff7e7 !important;
  color: #a46d16 !important;
}

html body.storage-library-active #appRoot .storage-question-chevron {
  flex: 0 0 auto !important;
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  color: #9aa7b8 !important;
}

html body.storage-library-active #appRoot .storage-card-delete {
  display: none !important;
  flex: 0 0 auto !important;
  min-width: 48px !important;
  height: 27px !important;
  min-height: 27px !important;
  padding: 0 10px !important;
  border: 1px solid #f1caca !important;
  border-radius: 9px !important;
  background: #fff7f7 !important;
  color: #b94b4b !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

html body.storage-library-active #appRoot .storage-library-screen.is-editing .storage-card-delete {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html body.storage-library-active #appRoot .storage-library-screen.is-editing .storage-question-chevron {
  display: none !important;
}

html body.storage-library-active #appRoot .bookmark-folder-tools {
  display: none !important;
  margin: 0 0 10px !important;
  padding: 10px !important;
  border: 1px solid #e0e7ef !important;
  border-radius: 14px !important;
  background: #ffffff !important;
}

html body.storage-library-active #appRoot .storage-library-screen.is-editing [data-storage-panel="bookmark"]:not(.hidden) .bookmark-folder-tools {
  display: block !important;
}

html body.storage-library-active #appRoot .bookmark-folder-tabs {
  margin: 0 !important;
}

html body.storage-library-active #appRoot .bottom-tabbar {
  display: grid !important;
  visibility: visible !important;
}

html body.storage-library-active #toast.storage-toast {
  width: calc(100% - 32px) !important;
  max-width: 728px !important;
  min-height: 48px !important;
  bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(215, 223, 233, .98) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .98) !important;
  color: #344158 !important;
  box-shadow: 0 12px 34px rgba(17, 26, 45, .14) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

html body.storage-library-active.bottom-tabbar-hidden #toast.storage-toast {
  bottom: calc(16px + env(safe-area-inset-bottom)) !important;
}

html body.storage-library-active #toast.storage-toast .toast-status-icon {
  flex: 0 0 auto !important;
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  background: #e7f8f5 !important;
  color: #0f9f92 !important;
}

html body.storage-library-active #toast.storage-toast .toast-status-icon svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
}

html body.storage-library-active #toast.storage-toast .toast-message {
  flex: 1 1 auto !important;
  color: #344158 !important;
}

html body.storage-library-active #toast.storage-toast .toast-undo-btn {
  flex: 0 0 auto !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #0f9f92 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}


html body.study-home-active #appRoot .storage-hub-link {
  text-decoration: none !important;
}

html body.study-home-active #appRoot .storage-hub-pdf-label {
  min-width: 36px !important;
  padding-inline: 8px !important;
  border-radius: 999px !important;
  font-size: 9px !important;
  letter-spacing: .04em !important;
}

@media (max-width: 520px) {
  html body.storage-library-active #appRoot#appRoot#appRoot#appRoot {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) {
    grid-template-columns: 36px minmax(0, 1fr) 40px !important;
    gap: 6px !important;
    min-height: 52px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) .study-home-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  html body.storage-library-active #appRoot > .study-feature-nav:not(.hidden) .storage-library-edit {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 360px) {
  html body.storage-library-active #appRoot .resource-file-card {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html body.storage-library-active #appRoot .resource-file-icon {
    width: 40px !important;
    height: 44px !important;
  }

  html body.storage-library-active #appRoot .resource-download-btn {
    grid-column: 2 !important;
    justify-self: start !important;
  }
}

/* V32.05 — DOM 순서와 무관하게 상단 배너/본문 행을 고정한다. */
@media (max-width: 520px) {
  html body.storage-library-active #appRoot#appRoot#appRoot#appRoot {
    padding-top: max(6px, env(safe-area-inset-top)) !important;
    padding-bottom: 0 !important;
  }
}
