/* ============================================================
   read.jsp extracted styles �� do not add JSP conditionals here
   ============================================================ */

/* ���� 援��� 援�湲� ���� �������������������������������������������������������������� */
.nation-flag {
  width: 30px;
  height: auto;
  vertical-align: middle;
}
.nat-flag-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.nat-flag-wrap a {
  display: inline-flex;
  align-items: center;
}
.nat-tooltip { display: none; }
#nat-tt {
  display: none;
  position: fixed;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  z-index: 99999;
  min-width: 80px;
  pointer-events: auto;
}
.nat-tt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.nat-tt-row + .nat-tt-row {
  border-top: 1px solid #f0f0f0;
  margin-top: 3px;
  padding-top: 5px;
}
.nat-tt-img { width: 20px; height: auto; flex-shrink: 0; }
.nat-tt-code {
  display: inline-block;
  width: 20px;
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-align: center;
  flex-shrink: 0;
}
.nat-tt-name { color: #222; font-weight: 600; }
.nat-tt-period { color: #666; }
.nat-tt-note { color: #888; }
.nat-tt-row[data-name] { cursor: pointer; }
.nat-tt-row[data-name]:hover { background: #f7f7f7; border-radius: 4px; }
.nat-flag-text {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.4;
  vertical-align: middle;
}

/* ���� ���� ��援� ���댁� ���� �������������������������������������������������� */
.edu-icon-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.edu-icon-wrap a {
  display: inline-flex;
  align-items: center;
}
.edu-icon-box {
  width: 30px;
  height: 30px;
  overflow: hidden;
  display: inline-flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.edu-icon-box img {
  width: 30px;
  height: auto;
  display: block;
}
.edu-tooltip { display: none; }
#edu-tt {
  display: none;
  position: fixed;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  z-index: 99999;
  min-width: 80px;
  pointer-events: auto;
}
.edu-tt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.edu-tt-row + .edu-tt-row {
  border-top: 1px solid #f0f0f0;
  margin-top: 3px;
  padding-top: 5px;
}
.edu-tt-icon-box {
  width: 20px;
  height: 20px;
  overflow: hidden;
  display: inline-flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.edu-tt-icon-box img {
  width: 20px;
  height: auto;
  display: block;
}
.edu-tt-name { color: #222; font-weight: 600; }
.edu-tt-period { color: #666; }
.edu-tt-status { color: #888; }
.edu-tt-row.clickable { cursor: pointer; }
.edu-tt-row.clickable:hover { background: #f7f7f7; border-radius: 4px; }

/* ���� ���� ���댁� ���� �������������������������������������������������������������� */
.award-icon-wrap {
  display: inline-flex;
  align-items: center;
  cursor: default;
}
.award-icon-wrap a {
  display: inline-flex;
  align-items: center;
}
.award-icon-box {
  width: 30px;
  height: 30px;
  overflow: hidden;
  display: inline-flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.award-icon-box img {
  width: 30px;
  height: auto;
  display: block;
}
.award-tooltip { display: none; }
#award-tt {
  display: none;
  position: fixed;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  z-index: 99999;
  min-width: 80px;
  pointer-events: auto;
}
.award-tt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.award-tt-row + .award-tt-row {
  border-top: 1px solid #f0f0f0;
  margin-top: 3px;
  padding-top: 5px;
}
.award-tt-icon-box {
  width: 20px;
  height: 20px;
  overflow: hidden;
  display: inline-flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.award-tt-icon-box img {
  width: 20px;
  height: auto;
  display: block;
}
.award-tt-name { color: #222; font-weight: 600; }
.award-tt-year { color: #666; }
.award-tt-category { color: #888; }
.award-tt-row.clickable { cursor: pointer; }
.award-tt-row.clickable:hover { background: #f7f7f7; border-radius: 4px; }
.award-icon-wrap { position: relative; cursor: pointer; }
.award-count-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #e05c2a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

/* ���� ���� �����쇱�� 留�而� �������������������������������������������������������������� */
.ye_ar_li .ye_ar { overflow: visible; }
.award-tl-marker {
  position: absolute;
  left: 100%;
  margin-left: 6px;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #d0a820;
  background: #fff8e8;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
  cursor: default;
  z-index: 3;
  box-sizing: border-box;
}
.award-tl-marker img { width: 100%; height: 100%; object-fit: cover; display: block; }
.award-tl-marker.clickable { cursor: pointer; }
#award-tl-tt {
  position: fixed;
  background: #fff;
  border: 1px solid #e0c060;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #333;
  z-index: 99999;
  pointer-events: none;
  display: none;
  max-width: 220px;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.award-tl-tt-name { font-weight: 600; }
.award-tl-tt-year { color: #555; margin-left: 4px; }
.award-tl-tt-cat  { color: #777; font-size: 11px; margin-left: 4px; }
@media (max-width: 768px) {
  .award-tl-marker { transform: translateX(calc(-50% - 5px)); }
}

/* ���� 李몄�ы���� ���댁� ���� �������������������������������������������������������������� */
.participation-icon-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.participation-icon-wrap a {
  display: inline-flex;
  align-items: center;
}
.participation-icon-box {
  width: 30px;
  height: 30px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #bbb;
  background: #f5f5f5;
  font-size: 17px;
  line-height: 1;
}
.participation-icon-box img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.participation-tooltip { display: none; }
#participation-tt {
  display: none;
  position: fixed;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  z-index: 99999;
  min-width: 80px;
  pointer-events: auto;
}
.participation-tt-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}
.participation-tt-row + .participation-tt-row {
  border-top: 1px solid #f0f0f0;
  margin-top: 3px;
  padding-top: 5px;
}
.participation-tt-icon-box {
  width: 20px;
  height: 20px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f0f0f0;
  font-size: 12px;
  line-height: 1;
}
.participation-tt-icon-box img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.participation-tt-name { color: #222; font-weight: 600; }
.participation-tt-year { color: #666; }
.participation-tt-info { color: #888; }
.participation-tt-row.clickable { cursor: pointer; }
.participation-tt-row.clickable:hover { background: #f7f7f7; border-radius: 4px; }

/* ���� Tooltip scrollbar (all four) ������������������������������������������������������������������������������ */
#nat-tt,
#edu-tt,
#award-tt,
#participation-tt {
  max-height: min(360px, calc(100vh - 24px));
  max-width: min(520px, calc(100vw - 24px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.25) transparent;
  box-sizing: border-box;
}
#nat-tt::-webkit-scrollbar,
#edu-tt::-webkit-scrollbar,
#award-tt::-webkit-scrollbar,
#participation-tt::-webkit-scrollbar { width: 6px; }
#nat-tt::-webkit-scrollbar-track,
#edu-tt::-webkit-scrollbar-track,
#award-tt::-webkit-scrollbar-track,
#participation-tt::-webkit-scrollbar-track { background: transparent; }
#nat-tt::-webkit-scrollbar-thumb,
#edu-tt::-webkit-scrollbar-thumb,
#award-tt::-webkit-scrollbar-thumb,
#participation-tt::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.22);
  border-radius: 999px;
}
.participation-count-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #4a90d9;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

/* ���� 李몄�ы���� �����쇱�� 留�而� �������������������������������������������������������������� */
.participation-tl-marker {
  position: absolute;
  left: 100%;
  margin-left: 32px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #4a90d9;
  background: #e8f0fa;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
  cursor: default;
  z-index: 3;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}
.participation-tl-marker img { width: 100%; height: 100%; object-fit: cover; display: block; }
.participation-tl-marker.clickable { cursor: pointer; }
#participation-tl-tt {
  position: fixed;
  background: #fff;
  border: 1px solid #6aaae0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #333;
  z-index: 99999;
  pointer-events: none;
  display: none;
  max-width: 260px;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.participation-tl-tt-name { font-weight: 600; }
.participation-tl-tt-year { color: #555; margin-left: 4px; }
.participation-tl-tt-info { color: #777; font-size: 11px; margin-left: 4px; }
@media (max-width: 768px) {
  .participation-tl-marker { transform: translateX(calc(-50% - 5px)); }
}

/* ���� 李몄�ы���� H1 SVG 留��댄�� ���댁� �������������������������������������������������������������� */
.participation-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
  color: #555;
  flex-shrink: 0;
}
.participation-tt-icon-box .participation-icon-svg {
  width: 14px;
  height: 14px;
  color: #777;
}

/* ���� �곕�� �� 洹몃９ ���댁� (����/李몄�ы����) �������������������������������������������������������������� */
.year-extra-icons {
  position: absolute;
  bottom: calc(100% + 19px);
  right: calc(50% + 44px);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 4;
}
@media (max-width: 1400px) {
  main.keyword .ye_ar_li .ye_ar .year-extra-icons { right: 84px; }
}
.year-extra-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  overflow: visible;
  box-sizing: border-box;
}
.year-award-icon {
  border: 1.5px solid #d0a820;
  background: #fff8e8;
}
.year-participation-icon {
  border: 1.5px solid #4a90d9;
  background: #e8f0fa;
}
.year-extra-icon img {
  width: 16px;
  height: 16px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.year-participation-icon-svg {
  width: 13px;
  height: 13px;
  display: block;
  color: #4a90d9;
  flex-shrink: 0;
}
.year-extra-count {
  position: absolute;
  bottom: -3px;
  right: -5px;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border-radius: 6px;
  background: #e05c2a;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

/* ���� year-icon �댄�� �������������������������������������������������������������� */
#year-icon-tt {
  display: none;
  position: fixed;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #333;
  z-index: 99999;
  pointer-events: auto;
  max-width: 280px;
  white-space: normal;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
#year-icon-tt::before {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  top: -18px;
  bottom: -14px;
  z-index: -1;
}
.year-tt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 2px 0;
}
.year-tt-row + .year-tt-row {
  border-top: 1px solid #f0f0f0;
  margin-top: 3px;
  padding-top: 5px;
}
.year-tt-name { color: #222; font-weight: 600; }
.year-tt-year { color: #666; margin-left: 4px; }
.year-tt-info { color: #888; font-size: 11px; }
.year-tt-row[data-href] { cursor: pointer; }
.year-tt-row[data-href]:hover { background: #f7f7f7; border-radius: 4px; }

@keyframes affair-highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.88);
    background-color: rgba(249, 115, 22, 0.22);
    outline: 2px solid rgba(234, 88, 12, 0.96);
  }
  60% {
    box-shadow: 0 0 0 16px rgba(249, 115, 22, 0);
    background-color: rgba(249, 115, 22, 0.11);
    outline: 2px solid rgba(234, 88, 12, 0.48);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    background-color: transparent;
    outline: 2px solid rgba(234, 88, 12, 0);
  }
}

.affair-target-highlight {
  animation: affair-highlight-pulse 1.4s ease 3;
  border-radius: 6px;
}

.ye_ar_li .in_fo.affair-target-persistent {
  border: 2px solid #ff9b28 !important;
  border-radius: 6px;
}

.info-tit-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.category-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(120,160,255,0.15);
  color: #7faaff;
  border: 1px solid rgba(120,160,255,0.35);
  white-space: nowrap;
}
.open_editCategories:hover .category-pill {
  background: rgba(120,160,255,0.28);
}
.ec-add-hint {
  opacity: 0.6;
  font-style: italic;
}

/* ���� 移댄��怨�由� ���� ���� �대� �������������������������������������� */
.ec-section-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.ec-selected-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  padding: 8px 10px;
  background: #f7f9fc;
  border: 1px solid #e0e6ef;
  border-radius: 6px;
  margin-bottom: 12px;
}
.ec-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(120,160,255,0.18);
  color: #4a7fdd;
  border: 1px solid rgba(120,160,255,0.4);
}
.ec-pill-invalid {
  background: rgba(220,80,60,0.12);
  color: #c0392b;
  border-color: rgba(220,80,60,0.4);
  cursor: default;
}
.ec-pill-x {
  border: none;
  background: none;
  color: #4a7fdd;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0.7;
}
.ec-pill-x:hover { opacity: 1; }
.ec-no-cats {
  font-size: 12px;
  color: #bbb;
  align-self: center;
}
.ec-picker-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ec-select {
  flex: 1;
  min-width: 100px;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.ec-search-wrap {
  position: relative;
  min-width: 140px;
  flex: 1;
}
.ec-search-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
}
.ec-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 9999;
  max-height: 200px;
  overflow-y: auto;
}
.ec-search-item {
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}
.ec-search-item:hover { background: #f0f5ff; }
.ec-no-result { padding: 7px 10px; font-size: 12px; color: #aaa; }
.ec-add-row {
  margin-bottom: 10px;
}

/* ���� 洹몃９ �� 諛� �댄�� ���� */
/* ���� member edit buttons ���� */
.member-edit-buttons {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  margin-right: 8px;
  vertical-align: middle;
}
.member-edit-btn {
  padding: 3px 9px;
  font-size: 11px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f4f4f4;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}
.member-edit-btn:hover { background: #e0e8ff; border-color: #99b; color: #335; }

/* ���� member popup rows ���� */
.me-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
  padding: 7px 8px;
  border-bottom: 1px solid #f0f0f0;
}
.me-row:last-child { border-bottom: none; }
.me-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}
.me-cell-lbl { font-size: 11px; color: #888; white-space: nowrap; }
.me-cell input[type="text"],
.me-cell input[type="number"],
.me-cell select {
  padding: 4px 7px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  box-sizing: border-box;
}
.me-ac-dd {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  max-height: 180px;
  overflow-y: auto;
  display: none;
}
.me-ac-item { padding: 6px 10px; font-size: 12px; cursor: pointer; }
.me-ac-item:hover, .me-ac-item.me-ac-active { background: #f0f5ff; }
.me-primary-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: #777; }
.me-del-btn {
  background: none; border: none; color: #cc4444;
  font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; align-self: center;
}
.me-del-btn:hover { color: #991111; }
.me-add-btn-wrap { padding: 8px 8px 4px; }
.me-add-btn {
  padding: 4px 12px; font-size: 12px;
  border: 1px solid #99c; border-radius: 4px;
  background: #f0f5ff; color: #335; cursor: pointer;
}
.me-add-btn:hover { background: #dde8ff; }
.group-pill {
  display: inline-flex;
  align-items: center;
  padding: 0px 10px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: filter 0.1s;
  vertical-align: middle;
}
.group-pill:hover { filter: brightness(0.88); }
.group-pill.gp-clickable { cursor: pointer; }
.group-pill:not(.gp-clickable) { cursor: default; }
.gp-role { font-weight: 400; font-size: 0.85em; opacity: 0.8; }
/* hidden tooltip data carrier */
.gp-tooltip { display: none; }
/* global fixed tooltip */
#gp-tt {
  display: none;
  position: fixed;
  background: #ffffff;
  border: 2px solid #ddd;
  color: #e8e8e8;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 99999;
  min-width: 100px;
  pointer-events: auto;
  transform: translateX(-50%);
}
.gpt-period {
  font-size: 16px;
  color: #444;
  margin-bottom: 6px;
  text-align: center;
}
.gpt-members {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.gpt-member-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  font-size: 18px;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.1s;
}
.gpt-member-pill:hover { opacity: 0.75; }

/* ���� ���� �ㅽ�щ· ��湲� �������������������������������������������������������������� */
html.bi-kyo-scroll-locked,
body.bi-kyo-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
}
body.overflow {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* ============================================================
   iframe mode �� scoped under body.is-read-iframe
   ============================================================ */

html:has(body.is-read-iframe),
body.is-read-iframe {
  margin: 0 !important;
  padding: 0 !important;
}

body.is-read-iframe {
  overflow-x: hidden;
}

body.is-read-iframe main.keyword,
body.is-read-iframe .keyword-article,
body.is-read-iframe .sub_visual,
body.is-read-iframe .sub_visual .inner,
body.is-read-iframe .sub_visual .sv_cont,
body.is-read-iframe .sub_visual .sv_tit,
body.is-read-iframe .sub_visual .sv_tit.space_between,
body.is-read-iframe .sub_visual .sv_tit .won_su_t,
body.is-read-iframe .sub_visual .sv_tit .won_su_t > h1 {
  margin-top: 0 !important;
  padding-top: 2px !important;
}

body.is-read-iframe .sub_visual .sv_tit {
  padding-bottom: 12px !important;
}

body.is-read-iframe .read_stick_title {
  top: 0 !important;
}

body.is-read-iframe .read-sticky-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

body.is-read-iframe .read-sticky-actions .sv_btn {
  margin: 0;
}

/*
 * Desktop/non-mobile Timeweb iframe:
 * sticky bar keeps only the event-add action.
 */
body.is-read-iframe:not(.is-timeweb-mobile-host)
.read-sticky-actions .bi_kyo_btn01 {
    display: none !important;
}

body.is-read-iframe .iframe-logo-bar {
  padding: 15px 30px;
  border-bottom: 1px solid #ccc;
  line-height: 0;
}
body.is-read-iframe .iframe-logo-img {
  display: inline-block;
  height: 28px;
  width: auto;
}
body.is-read-iframe.is-timeweb-mobile-host .iframe-logo-bar {
    display: none !important;
}
body.is-read-iframe .sub_visual .inner.--w1000 {
  padding-left: 30px !important;
}

body.is-read-iframe .tw-iframe-open-full {
  position: fixed;
  bottom: 34px; /* 58px - 24px */
  right: 12px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.85);
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.12s, border-color 0.12s;
}
body.is-read-iframe .tw-iframe-open-full:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.28);
}
body.is-read-iframe .tw-iframe-open-full svg {
  pointer-events: none;
  display: block;
  filter: invert(1);
}
body.is-read-iframe.is-timeweb-mobile-host .tw-iframe-open-full {
    bottom: 28px; /* 52px - 24px */
    right: 10px;
}
body.is-read-iframe .tw-iframe-scroll-btn-box {
  position: fixed;
  right: 12px;
  bottom: 90px; /* 114px - 24px (버튼 높이 48px의 절반) */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.12s, border-color 0.12s;
}
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.28);
}
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn img {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
  transition: filter 0.16s ease;
}
/* hover 시 흰 배경으로 바뀌므로 아이콘을 검정으로 반전 */
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn:hover img,
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn:focus-visible img,
body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn.is-touch-active img {
  filter: brightness(0);
}
/* 모바일: sticky hover 방지 — touch class로만 강조, :hover 비활성화 */
@media (hover: none) and (pointer: coarse) {
  body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn:hover img {
    filter: none;
  }
  body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn.is-touch-active img {
    filter: brightness(0);
  }
  body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn:hover {
    background: rgba(0,0,0,0.85);
    border-color: rgba(0,0,0,0.16);
  }
  body.is-read-iframe .tw-iframe-scroll-btn-box .scroll_btn.is-touch-active {
    background: #fff;
    border-color: rgba(0,0,0,0.28);
  }
}
body.is-read-iframe.is-timeweb-mobile-host .tw-iframe-scroll-btn-box {
    right: 10px;
    bottom: 84px; /* 108px - 24px */
}

/* ============================================================
   Full-page read mode only
   ============================================================ */

@media (min-width: 769px) {
  body.is-read-full .scroll_btn_box {
    position: fixed;
    right: auto;
  }
}

/* ============================================================
   Timeweb iframe H1 hint (Part F)
   ============================================================ */

body.is-read-iframe #tw-h1-hint {
  position: absolute;
  left: 100%;
  top: 0;
  transform: translate(6px, -35%);
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s;
  animation: twBlink 1s infinite ease-in-out;
}

@keyframes twBlink {
  0%   { opacity: 1; }
  50%  { opacity: 0.2; }
  100% { opacity: 1; }
}

/* ============================================================
   Timeweb year-scroll target highlight (Part G)
   ============================================================ */

.ul_box.ri_val_left .li_box.tw-timebar-scroll-target-box {
  position: relative;
}
.ul_box.ri_val_left .li_box.tw-timebar-scroll-target-box::before {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: -6px;
  bottom: -6px;
  border: 2px solid rgba(96,144,204,0.95);
  background: rgba(96,144,204,0.10);
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
  animation: twTimebarTargetPulse 1.8s ease-out forwards;
}
.ul_box.ri_val_left .li_box.tw-timebar-scroll-target-box .in_fo.tw-timebar-scroll-target,
.ul_box.ri_val_left .li_box.tw-timebar-scroll-target-box .in_fo_box.tw-timebar-scroll-target-box {
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(96,144,204,0.70), 0 0 20px rgba(96,144,204,0.45);
  border-radius: 8px;
  animation: twTimebarTargetGlow 1.8s ease-out forwards;
}
@keyframes twTimebarTargetPulse {
  0%   { opacity: 0; transform: scale(0.985); }
  15%  { opacity: 1; transform: scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes twTimebarTargetGlow {
  0%   { box-shadow: 0 0 0 0 rgba(96,144,204,0); }
  15%  { box-shadow: 0 0 0 3px rgba(96,144,204,0.85), 0 0 24px rgba(96,144,204,0.55); }
  100% { box-shadow: 0 0 0 3px rgba(96,144,204,0), 0 0 0 rgba(96,144,204,0); }
}

/* ============================================================
   Mini Timeweb embedded in read.jsp (Parts B & C)
   ============================================================ */

.read-mini-timeweb-section {
    margin: 32px 0;
    padding: 6px;
    background: rgb(239, 246, 251);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.read-mini-timeweb {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    border-radius: 24px;
    background: #0f1420;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .read-mini-timeweb {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

body.is-read-iframe.is-timeweb-mobile-host #tw-h1-hint {
    display: none !important;
}

body.is-read-iframe.is-timeweb-mobile-host .read_stick_title {
    display: none !important;
}

/*
 * Mobile Timeweb iframe only:
 * representative image on the left, citation count on the right.
 */

/* Part B �� flex row: only when both image and citation exist */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* Part B �� half-width image: applies whenever a representative image exists */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-half-image .img_wa {
    width: calc(50% - 5px);
    max-width: calc(50% - 5px);
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .img_wa {
    flex: 0 0 calc(50% - 5px);
}

body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-half-image .img_wa img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

/* Part C �� citation slot: stays in its row, anchors growth toward the left */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-count-slot {
    position: relative;
    flex: 0 0 calc(50% - 5px);
    width: calc(50% - 5px);
    max-width: calc(50% - 5px);
    min-width: 0;

    height: auto !important;
    min-height: 0;
    margin: 0 !important;
    box-sizing: border-box;

    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    overflow: visible;
}

/* Part C �� closed citation summary: one-line inline-flex, never floats upward */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-count-box {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;

    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: max-content;
    min-width: 100%;
    max-width: calc(100vw - 24px);
    min-height: 32px;
    margin: 0 !important;
    padding: 8px 10px !important;
    box-sizing: border-box;

    border-radius: 14px;
    white-space: nowrap;
    text-align: center;
    overflow: visible;
}

/* Part D �� title and count on one line */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-count-box > span:first-child {
    display: inline-block;
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: center;
}

body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-count-wrap {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto !important;
    width: auto;
    padding-left: 0 !important;
    text-align: center !important;
    white-space: nowrap;
}

/* Part D �� icon inline so it participates in the one-line width */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-count::before {
    position: static !important;
    display: inline-block;
    width: 15px;
    height: 17px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Part E �� expanded list: content-sized, viewport-limited */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-hover-box {
    display: none !important;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;

    width: max-content;
    min-width: 100%;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;

    padding: 8px 4px !important;
    border-radius: 12px;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 60;
    pointer-events: none;
}

body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-hover.is-mobile-ref-open .ref-hover-box {
    display: block !important;
    pointer-events: auto;
}

body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-hover-box ul {
    width: max-content;
    max-width: 100%;
}

body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-hover-box li {
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Part F �� disable CSS-hover opening in mobile iframe (use tap-to-open JS instead) */
body.is-read-iframe.is-timeweb-mobile-host
.img_wa_box.has-mobile-image-ref-row .ref-hover:not(.is-mobile-ref-open):hover .ref-hover-box {
    display: none !important;
    pointer-events: none !important;
}

/* ============================================================
   Mobile standalone read.jsp floating navigation buttons
   ============================================================ */

@media (max-width: 1024px) {
    body.is-read-full .scroll_btn_box {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        position: fixed;
        left: auto !important;
        right: max(12px, env(safe-area-inset-right));
        bottom: calc(16px + env(safe-area-inset-bottom));
        z-index: 9999;
    }

    body.is-read-full .scroll_btn_box .scroll_btn.back_btn,
    body.is-read-full .scroll_btn_box .scroll_btn.forward_btn {
        display: none !important;
    }

    body.is-read-full .scroll_btn_box .scroll_btn {
        flex: 0 0 auto;
    }

    body.is-read-full .scroll_btn_box .scroll_btn + .scroll_btn {
        margin-top: 6px;
    }
}
