
@charset "utf-8";
/* CSS Document */

/*
First Write : 2021-08-17
Last Update : 2021-12-30
Author: Jcode
*/


/* 기사상세 ----------------------------------------------------- */
/* 기사상세 : 헤드영역 */
.bodynews {padding: 0 49px 0 50px; border-right: 1px solid #ddd;}
.bodynews .header {position: relative; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid #ddd; }
.bodynews h1 {margin-bottom: 15px; font-size: 2.2rem; letter-spacing: -2px; line-height: 1.2;}
.bodynews .sub-title {margin-bottom: 20px; color: #666; font-size: 1.1rem; font-weight: 600; border-left: solid 3px #888; padding-left: 10px;}
.bodynews .writetime {display: flex; margin-bottom: 20px; font-size: 0.9rem; color: #999;}
.bodynews .writetime p:nth-child(1) {
  padding-right: 30px;
  background-color: transparent;
  background-image: url(/images/bullet.png);
  background-repeat: no-repeat;
  background-position: right -65px top -1435px;
}
.bodynews .fncbtnbox {display: flex; justify-content: space-between; align-items: center;  justify-content: space-between;
  align-items: center;
  margin-top: 8px;}
.bodynews .fncbtnbox .tools { display: flex; align-items: center; gap:8px; }
.bodynews .fncbtnbox .viewtools, .extratools { display: flex; gap: 8px;}
.fncbtnbox button, .fncbtnbox a.btn { min-width: 60px; height: 36px; border: 1px solid #ccc; border-radius: 8px; background: #f8f8f8; font-size: 0.8rem; color: #333;  display: inline-flex; align-items: center; justify-content: center; gap: 4px;}
.fncbtnbox .viewtools button{ width: 36px; min-width: auto;  padding: 0; color: #666; }
.fncbtnbox .viewtools button .icon{ width: 24px; height: 24px;}

.bodynews .fncbtnbox button:hover, .bodynews .fncbtnbox a.btn:hover { background-color: #eee; border-color: #bbb;} 
.bodynews .fncbtnbox .icon { width: 16px; height: 16px; display: inline-block; }

.bodynews .fncbtnbox .viewtools button:nth-child(1) {font-size: 1.2rem;}
.bodynews .fncbtnbox .viewtools button:nth-child(2) {font-size: 0.8rem;}


.bodynews .fncbtnbox ul {display: flex;}
.bodynews .fncbtnbox ul li {margin-left: 5px;}
.bodynews .fncbtnbox ul li a {
  display: inline-block;
  width: 26px;
  height: 26px;
  text-indent: -9999px;
  background-image: url(/images/icon.png?20240430v1);
  background-repeat: no-repeat;
}
.bodynews .fncbtnbox ul li:nth-child(1) a {
  background-image: url(/images/common/sns_kakaotalk_ov.png);
}
.bodynews .fncbtnbox ul li:nth-child(2) a {background-position: left -40px top -80px;}
.bodynews .fncbtnbox ul li:nth-child(3) a {background-position: left -40px top -160px;}
/* .bodynews .fncbtnbox ul li:nth-child(4) a {background-position: left -120px top -160px;} */
.bodynews .fncbtnbox ul li:nth-child(4) a {background-position: left -200px top -160px;}

/* 구글 선호 출처 추가 버튼 */
.fncbtnbox .viewtools .google_preferred_source_btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 18px;
  background: #fff;
  font-size: 0.8rem;
  color: #333;
  white-space: nowrap;
}
.fncbtnbox .viewtools .google_preferred_source_btn:hover {
  background-color: #f8f8f8;
  border-color: #bbb;
}
.fncbtnbox .viewtools .google_preferred_source_btn svg {
  flex-shrink: 0;
}

.tools .viewtools .btn_font{
  position: relative;
}
.tools .viewtools .btn_font span {
  position: absolute;
  text-indent: 0px;
  font-weight: normal;
}
.tools .viewtools .btn_font span:nth-child(1) {
  left: 7px;
  bottom: 5px;
  font-size: 0.7rem;
}
.tools .viewtools .btn_font span:nth-child(2) {
  right: 5px;
  top: 2px;
  font-size: 1rem;
}


/* 기사상세 : 본문내용 */
.bodynews .contents {padding-bottom: 20px; padding-left: 10px; padding-right: 10px; font-weight: 400;  font-size: 17px; line-height: 1.6; color: #222; letter-spacing: -0.3px;}
.bodynews .contents p {margin-bottom: 18px; margin-top: 18px;}
.bodynews .contents figure {display: table; margin: 40px auto; text-align: center;}
.bodynews .contents figure img {width: 100%; height: auto; display: block;}
.bodynews .contents figcaption {display: table-caption;caption-side: bottom; padding-top: 5px; color: #666; font-size: 0.9rem; text-align: left;}
.bodynews .contents table { border-collapse: unset; }
.bodynews .contents .news_img_caption {padding-top: 10px; padding-bottom: 10px; color: #666; font-size: 0.9rem; line-height: 1.4;}

/*S: 인물디비 정치기사 하이라이트*/
.person-highlight {
  background-color: antiquewhite;
  cursor: default;
}
#profile {
  position:absolute;
  z-index: 5;
  overflow: hidden;
  width: 300px;
  background: #fff;
  border: 2px solid #a9a9a9;
  padding: 10px 10px;
  border-radius: 0.5rem;
  opacity: 0;
  display: none;
}
#profile .thumb {
  width: 120px;
  height: 150px;
  overflow: hidden;
  float: left;
  border-radius: 0.5rem;
  position: relative;
}
#profile .thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
#profile .txt li::before {
  float: left;
  margin-right: 4px;
  content: "•";
  color: #666666;
}
#profile .label {
  padding: 2px 4px !important;
  font-size: 0.75rem !important;
  color: #fff !important;
  display: inline;
}
.profile .txt {
  width: calc(100% - 140px);
  margin-left: 20px;
  float: left;
  font-size: 0.85rem;
}
.profile p { margin-bottom: 2px; }
.profile .name { margin-bottom: 15px; font-size: 1.4rem; font-weight: bold; }
.profile .history span { display: block; margin-bottom: 2px; }

/* 당컬러 */
.c_01 {background-color: #12298c;} /* 01 더불어민주당 */
.c_02 {background-color: #e60024;} /* 02 국민의힘*/
.c_03 {background-color: #ffed00;} /* 03 정의당 */
.c_04 {background-color: #ed6d00;} /* 04 개혁신당 */
.c_05 {background-color: gray;} /* 05 기본소득당 */
.c_06 {background-color: gray;} /* 06 무소속 */
.c_07 {background-color: #0073cf;} /* 07 조국혁신당 */
.c_08 {background-color: gray;} /* 08 자유통일당 */
.c_09 {background-color: #9d3fbc;} /* 09 진보당 */
.c_10 {background-color: #36babe;} /* 10 새로운미래 */
.c_11 {background-color: #F58400;} /* 11 사회민주당 */

/*E: 인물디비 정치기사 하이라이트*/

/* 종목 하이라이트 */
.symbol-highlight {
  border-radius: 3px;
  border: solid 1px #CFD8DC;
  background-color: #ECEFF1;
}
#symbolHighlight-tooltip {
  position:absolute;
  z-index: 5;
  overflow: hidden;
  width: 280px;
  background: #fff;
  border: 2px solid #a9a9a9;
  padding: 10px 10px;
  border-radius: 0.5rem;
  opacity: 0;
  display: none;
  font-weight: 700;
}

/* 기사상세 : 디지털뉴스콘텐츠 이용규칙 보기 */
.bodynews .newsrule {
  margin: 20px 0;
  padding: 5px 22px;
  background-image: url(/images/bullet.png);
  background-repeat: no-repeat;
  background-position: left 10px top -1028px;
}
.bodynews .newsrule a {text-decoration: underline;}


/* 기사상세 : 베스트기사 + 관련기사 + 주요포토 */
.bodynews .inbox {margin-bottom: 40px; padding: 20px 30px; background-color: #e4ebf2;}
.bodynews .inbox > div {padding-bottom: 30px; margin-bottom: 10px;}
.bodynews .inbox > div:last-child {padding-bottom: 0;}
.bodynews .inbox > div .sectit {padding: 12px 0 2px 0;}
.bodynews .inbox > div h3 {margin-bottom: 10px; font-size:  1.1rem; border: none; padding-left: 0px;}
.bodynews .inbox > div:nth-child(1), .bodynews .inbox > div:nth-child(2) {border-bottom: 1px dashed #ccc;}
.bodynews .inbox > div:nth-child(1) article .summary {color: #888;}
.bodynews .inbox > div:nth-child(1) h3 {color: #ff0000; margin-bottom: 0;}
.bodynews .inbox > div:nth-child(2) h3 {color: #0841c3;}
.bodynews .inbox .hotphoto > div:nth-child(2) {display: flex; flex-wrap: wrap;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(1) {flex-basis: 260px; margin-right: 20px; margin-bottom: 0;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) {display: flex; flex-wrap: wrap; flex: 1;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) article {width: 120px;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) {display: flex; justify-content: space-between;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) article {position: relative; width: 32%; margin-bottom: 10px;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) article:nth-child(4),
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) article:nth-child(5),
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) article:nth-child(6) {margin-bottom: 0;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) .thumb {height: 85px;}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) .subject {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: center;
}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) .subject a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  padding: 10px;
  color: #fff;
  font-size: 0.9rem;
  background-color: rgba(0,0,0,.8);
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
  opacity: 1;
}
.bodynews .inbox .hotphoto > div:nth-child(2) > div:nth-child(2) .subject a:hover {text-decoration: none; opacity: 0;}



/* 기사상세 : 푸터영역 */
.bodynews .footer {display: block; margin-bottom: 30px;}
.bodynews .footer .fncbtnbox {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f2f2f2;
  background-image: url(/images/divline.png);
  background-repeat: repeat-x;
  background-position: left 0 bottom -11px;
}
.bodynews .footer p {font-size: 0.9rem; margin-bottom: 40px; text-align: center;}
.bodynews .footer .footbtnbox {display: flex; justify-content: space-between; align-items: center;}
.bodynews .footer .footbtnbox button {
  display: inline-block;
  margin-left: 5px;
  padding: 0 30px 0 20px;
  height: 36px;
  border-radius: 5px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  background-color: #eee;
  background-image: url(/images/bullet.png?20250408v1);
  background-repeat: no-repeat;
}
.bodynews .footer .footbtnbox button:nth-child(1) {background-position: left 15px top -1718px; padding: 0 20px 0 30px;}
.bodynews .footer .footbtnbox button:nth-child(2) {background-position: right 10px top -947px;}



/* 상세 : GAM  기사추가 */
.gamrassiro {display: flex; margin: 30px 0; padding: 25px 10px 15px; background-color: #eee;    flex-direction: column;}
.gamrassiro h3 {
	margin-bottom: 10px;
	font-weight: bold;
  border: none;
  padding-left: 5px;
	color: #333;
}
.gamrassiro h3 span {display: inline-block;}
.gamrassiro .inbox { display: grid; grid-template-columns: 1fr 1fr; background-color: #fff; padding: 0; margin-bottom: 0px;}
.gamrassiro .inbox > article:nth-child(odd) {  border-right: 1px dashed #ccc;}
.gamrassiro .inbox > article:nth-child(-n+2) {  border-bottom: 1px dashed #ccc;}
.gamrassiro .thumb_h {display: flex; align-items: center; padding: 15px; margin-bottom: 0px;}
.gamrassiro .thumb_h .thumb {position: relative; flex-basis: 90px; height: 74px; background-color: #eee; margin-right: 0px;}
.gamrassiro .thumb_h .subject {font-size: 1rem; flex: 1; letter-spacing: -1px ;}
.gamrassiro article:nth-child(odd) .thumb {margin-right: 10px;}
.gamrassiro article:nth-child(even) .thumb {margin-left: 10px;}
.gamrassiro .thumb_h .thumb img {width: 100%; height: 100%; object-fit: cover;}
.gamrassiro .thumb_h .subject a {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

/* 2025 대선 */
.vote2025 {
  position: relative; display: flex; justify-content: space-between; margin-bottom: 40px; height: 85px;
  background: #fff url(https://img.newspim.com/web/images/2025/vote2025_bg_view.jpg) no-repeat 0 0;
}
.vote2025 .vote2025_logo {display: flex;}
.vote2025 h1 a  {
  display: inline-block; margin: 16px 30px 0 150px; padding: 0; width: 98px; height: 19px; text-indent: -9999px;
  background: transparent url(https://img.newspim.com/web/images/2025/vote2025_logo.png?20250421v1) no-repeat 0 0;
}
.vote2025 .vote2025_nav  {display: flex; flex-direction: column;}
.vote2025 .vote2025_nav h2  {margin: 0;}
.vote2025 .vote2025_nav h2 a  {
  display: block; margin: 16px 0 8px 0; padding: 0; width: 240px; height: 28px; text-indent: -9999px;
  background: transparent url(https://img.newspim.com/web/images/2025/vote2025_logo1.png?20250421v1) no-repeat 0 0;
}
.vote2025 .vote2025_nav nav ul {display: flex;}
.vote2025 .vote2025_nav nav ul li a {display: flex; margin-right: 5px; padding: 2px 6px; font-size: 0.9rem;}
.vote2025 nav ul li a:link, .vote2025 nav ul li a:visited, .vote2025 nav ul li a:hover, .vote2025 nav ul li a:active, .vote2025 nav ul li a:focus {color: #fff;}
.vote2025 .dday {margin: 17px 30px 0 0; text-align: center; color: #333;}
.vote2025 .dday p:nth-child(1) {font-size: 0.9rem; font-weight: 600;}
.vote2025 .dday p:nth-child(1) span{font-size: 1.3rem;}
.vote2025 .dday p:nth-child(2) span {margin: 0 4px; font-weight: bold; vertical-align: middle;}
.vote2025 .dday p:nth-child(2) span:nth-child(1), .vote2025 .dday p:nth-child(2) span:nth-child(3) {font-size: 1.6rem;}

.vote2025::before{ content: ''; position: absolute; bottom: -6px; right: 20px; width: 214px; height: 112px; background-image: url(https://img.newspim.com/web/images/2025/vote2025_win.png);}

/* 글자크기 조정 팝업 */
.pop_txtsize ul li button {
  border: 1px solid #9faab7;
}
.pop_txtsize ul li button.on {
  border: 1px solid #5a636d;
  background-color: #5a636d;
  color: #fff;
}
.pop_txtsize ul li:nth-child(1) button {
  font-size: 0.7rem;
}
.pop_txtsize ul li:nth-child(2) button {
  font-size: 0.9rem;
}
.pop_txtsize ul li:nth-child(3) button {
  font-size: 1rem;
}
.pop_txtsize ul li:nth-child(4) button {
  font-size: 1.2rem;
}
.pop_txtsize ul li:nth-child(5) button {
  font-size: 1.4rem;
}
.pop_txtsize ul li span {
  font-size: 0.85rem;
  margin-top: 4px;
  text-align: center;
}
/* 기사 번역 팝업 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999999;
  background: rgba(0, 0, 0, 0.5);
  
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.hide {
  visibility: hidden;
  opacity: 0;
}
.pop_language {
  position: fixed;
  bottom: 0;
  width:100%;
  max-width: 880px;
  height: 75%;
  max-height: 90%;
  z-index: 9999999999;
  background: #ffffff;
  white-space: normal;
  box-shadow: 0 3px 37px 5px rgb(0 0 0 / 0.2);
  border-radius: 16px 16px 0 0;
  transform: translate(0, 0);
  transition: transform 0.05s ease-in-out;
}
.pop_language.hide  {
  transform: translate(0, 100%);
}
.pop_language .layer_head {
  position: relative;
  padding: 20px 20px 0 20px;
  border-radius: 16px 16px 0 0;
}
.pop_language .layer_head .tit{
  display: block;
  padding-right: 40px;
  margin-bottom: 16px;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -1px;
}
.pop_language .layer_head .txt{
  margin: 0 0 15px; font-size: 15px; color: #767678; padding:0px;
  letter-spacing: -0.74px;
}
.pop_language .layer_head > button {
  position: absolute;
  padding: 12px;
  top: 14px;
  right: 20px;
  background-color: transparent;
}
.pop_language .layer_head > button span{
  width: 20px;
  height: 20px;
  text-indent: -9999px;
  display: block;
  background: url(../images/ico_close1.png) no-repeat center;
  background-size: 100%;
  content: '';
}
.pop_language .layer_head::after {
  display: block;
  width: 100%;
  border-bottom: 1px solid #eee;
  content: '';
}
.pop_language .layer_body {
  display: flex;
  flex-direction: column;
  padding: 20px;
  height: calc(100% - 150px);
  font-size: 1rem;
  letter-spacing: -0.3px;
  overflow-y: auto;
}
.pop_language .layer_body .title{
  padding-bottom: 20px;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -1px;
}
.pop_language .layer_body .body{
  padding-bottom: 40px;
}
.pop_language .layer_body p {
  margin-bottom: 20px;
  line-height: 28px;
  padding: 0;
}
select.languageDropdown {  
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid #E7E7E7;
  box-sizing: border-box; 
  -moz-appearance: none; /* Firefox */
  -webkit-appearance: none; /* Safari and Chrome */
  appearance: none;
  background-image: url(/images/ico_down.png);
  background-repeat: no-repeat;
  background-position: 97% center;
  background-size: 1rem;
}

/* 종복 추적기 팝업 */
.stockicon .tit::before {
    background: url(../images/ico_stock.svg) no-repeat center center;
    background-size: 24px;
    width: 24px;
    height: 24px;
    display: inline-block;
    margin: 0 8px 0 0;
    vertical-align: top;
    content: '';
}
.stock-section {
  margin-bottom: 20px;
  border-radius: 14px;
  font-weight: 600;
  overflow: hidden;
}
.stock-section:last-child {
  margin-bottom: 0;
}
.stock-section.positive{  
  border: 1px solid rgba(230,0,0,0.05);
}
.stock-section.negative{
  border: 1px solid rgba(28,100,242,0.1);
}
.section-title {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
}
.stock-section.positive .section-title {
  color: #FF5722;
  background: rgba(230,0,0,0.05);
}
.stock-section.negative .section-title {  
  color: #1976D2;
  background: rgba(28,100,242,0.1);
}
.stock-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 25px 0;
  padding: 15px 0;
  margin: 0 16px;
}
.stock-item:not(:last-child) {
  border-bottom: 1px solid #f3f3f3;
}
.category-tag {  
  font-size: 13px;
  color: #ff5722;
  font-weight: 500;
  background: #fef2f2;
  padding: 2px 6px;
  border-radius: 20px;    
}
.stock-section.negative .category-tag {
  background: #e8effe;
  color: #1976D2;
}
.stock-section .stock-item .stock-con{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.company-name {
  font-size: 15.2px;
  font-weight: 700;
}
.company-desc {
  padding: 0 10px;
  line-height: 1.56;
  font-size: 14px;
  font-weight: 400;
}



/* 글자크기 조정 + 공유 팝업 (공통) */
.fncpop{
  position: fixed;
  z-index: 999999;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 3px 37px 5px rgb(0 0 0 / 0.2);
  background:#fff;
}
.fncpop h1 {
  margin-bottom: 20px;
  padding: 0;
  font-size: 1rem;
  font-weight: normal;
}
.fncpop ul {
  display: flex;     margin-bottom: 10px;
}
.fncpop ul li {
  display: flex;
  flex-direction: column;
  margin: 0 8px;
}
.fncpop ul li:first-child {
  margin-left: 0;
}
.fncpop ul li:last-child {
  margin-right: 0;
}
.fncpop ul li a,
.fncpop ul li button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 17px;
  color: #666;
}
.fncpop > button {
  position: absolute;
  right: 15px;
  top: 10px;
  padding: 8px;
  background-color: transparent;
}
.fncpop > button span {
  display: inline-block;
  width: 20px;
  height: 20px;
  text-indent: -9999px;
  background-image: url(../images/ico_close1.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}
#font_popup_btn { anchor-name: --font-anchor; }
.extratools > button:first-child { anchor-name: --lang-anchor; }

/* 기존 고정 위치 클래스 무력화 */
.font_box_position,
.translation_box_position { right:auto !important; }
#font_popup{
  position-anchor: --font-anchor;
  top:  anchor(bottom);
  left: anchor(center);
  transform: translate(-50%, 8px);
  max-inline-size: min(90vw, 340px);
}
#languageSelectBox{
  position: fixed;
  position-anchor: --lang-anchor;
  top:  anchor(bottom);
  left: anchor(center);
  transform: translate(-50%, 8px);
  width: 265px;
  max-inline-size: min(90vw, 320px);
}
#languageSelectBox { position-try-options: --below, --above; }
@supports not (position-anchor: --x) {
  #font_popup, #languageSelectBox{
    position: fixed;
    right: 8px; top: 64px;
    left: auto; transform:none;
  }
}

/* 스피너 */
.loading-spinner {
  width: 120px;
  height: 120px;
  background-image: url(/images/loading.svg);
}
.spinnerContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  height: calc(100% - 150px);
}
.loading-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.spinner-hide {
  display: none;
} 
.loading_message {
  
  font-size: 16px;
  color: #6196ff;
}

/* 데일리 브랜드 평가 */
.brand-rank{
  --pos:#2a72e5;       /* 상승=빨강 */
  --neg:#ef5350;       /* 하락=파랑 */
}
.brand-rank{margin-bottom:20px; border:1px solid #e6ecf5;border-radius:12px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
.brand-rank .hd{padding:20px 28px 10px; }
.brand-rank .hd .tit{font-size:20px; font-weight:700; color: #1c2638; }
.brand-rank .hd .sub{font-size:14px; color: #72879b}

.brand-rank .list{margin:0 24px;     padding: 24px; border:1px solid #eef2f8;   box-shadow: 0px 4px 20px 0px #0000000f; border-radius:10px; overflow:visible;}
.brand-rank .list .item .row{ display:grid; grid-template-columns:22px 140px 1fr 52px; gap:8px; align-items:center; }
.brand-rank .list .item .row .rank{font-weight:700;font-size:17px;text-align:center;color:#1c2738}
.brand-rank .list .item .row .name{font-weight:500;font-size:13.5px}

.brand-rank .list .item .row .barwrap{ position:relative; width:100%; display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center;  padding: 10px 0;; z-index:1; }
.brand-rank .list .item .row .barwrap .label{ font-size:12px; color:#7a8594; }
.brand-rank .list .item .row .barwrap .bar{ position:relative; width:100%; height:8px; border-radius:999px; overflow:visible; background: linear-gradient( 270deg, #2a72e5 0%, #90c2ff 20%, #feafb4 80%, #ef5350 100%);    z-index:1; }
.brand-rank .list .item .row .barwrap .bar .tick{ position:absolute; left:50%; top:-6px; bottom:-6px; width:1px; background: rgba(0,0,0,.12); }
.brand-rank .list .item .row .barwrap .bar .fill{ position:relative; height:100%; z-index:1; }
.brand-rank .list .item .row .barwrap .bar .fill .dot{ position:absolute; left:100%; top:50%; transform:translate(-50%,-52%); width:8px; height:8px; border-radius:50%; background:transparent; border:3px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.5); z-index:3; }
.brand-rank .list .item .row .score{ text-align:center; font-weight:700; font-size:16px;}
.brand-rank .list .item .row .score.is-pos { color:var(--pos); }
.brand-rank .list .item .row .score.is-neg { color:var(--neg) }

.brand-rank .list .item .desc{ display: block ; margin: 5px 0px 12px; padding: 12px 12px; background:#f7f9fc; border-radius:8px; color:#4b5563; line-height:1.5; font-size:15px; }
.brand-rank .list .item .desc.hide{ display: none; } 
.brand-rank .list .item .desc p {margin: 5px 0 0; padding-left: 1.2em; text-indent: -0.8em; }
.brand-rank .list .item .desc p::before { content: "•"; margin-right: 6px; }
.positive_factors p::before { color:var(--pos);}
.risk_factors p::before {color:var(--neg) }


.brand-rank .more-text{padding:8px 24px 14px; text-align:right;  opacity:.7;}
.brand-rank .more-text:hover{opacity:1;}
.brand-rank .more-text .more{border:0; background:none;font-weight:600;font-size:13.5px;color:#3b5670;  cursor:pointer}
.brand-rank .more-text .more::after{ content:""; display:inline-block; margin-left:6px; width: 0; height: 0; border-left:6px solid transparent; border-right:6px solid transparent; border-top:7px solid currentColor; transform: translateY(-1px);}
.brand-rank .more-text .more.open::after{ transform: translateY(-2px) rotate(-180deg);}


/* AI 핵심 요약 */
.ai-summary {
    width: 100%;
    margin: 24px 0 32px;
    font-family: 'Pretendard', -apple-system, sans-serif;
}
.ai-summary .box {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 28px;
    background: #f8fbff;
    border: 1px solid #e2eefc;
    border-radius: 12px;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    animation: aiFadeUp .38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.ai-summary .box::after {
    content: "";
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(
        120deg,
        rgba(59, 130, 246, 0) 30%,
        rgba(59, 130, 246, 0.06) 50%,
        rgba(59, 130, 246, 0) 70%
    );
    transform: translateX(-40%);
    opacity: 0;
    pointer-events: none;
}
.ai-summary .box.shimmer-on::after {
    animation: aiShimmer 1.45s ease-in-out 1;
}
.ai-summary .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px; 
}
.ai-summary .title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-summary .icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}
.ai-summary .title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.5px;
}
.ai-summary .beta {
    font-size: 10px;
    font-weight: 700;
    color: #3b82f6;
    background: #fff;
    border: 1px solid #dbeafe;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}
.status-text {
    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
    background: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #dbeafe;
}
.ai-summary .list {
    margin: 0;
    padding: 16px 0 0;
    list-style: none;
    border-top: 1px solid #eef2f6; 
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ai-summary .list li {
    position: relative;
    padding-left: 18px;
    font-size: 16.5px;
    line-height: 1.6;
    color: #334155;
    letter-spacing: -0.3px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .28s ease, transform .28s ease;
}
.ai-summary .list li.visible {
    opacity: 1;
    transform: translateY(0);
}
.ai-summary .list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 11px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3b82f6;
}
.ai-summary p.note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 18px 0 0;
    padding: 14px 0 0;
    border-top: 1px dashed #e2e8f0;
    font-size: 12.5px;
    color: #94a3b8;
}
.ai-summary .note-ic,
.inline-related-box .note-ic {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    font-size: 10px;
    font-weight: 700;
    color: #cbd5e1;
}
/* 애니메이션 */
@keyframes aiFadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes aiShimmer {
    0% { opacity: 0; transform: translateX(-40%); }
    30%, 70% { opacity: 1; }
    100% { opacity: 0; transform: translateX(40%); }
}
.box.scanning::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.08), transparent);
    animation: scanLoop 2.5s infinite linear;
    z-index: 1;
}

.box.scanning .icon {
  animation: iconSpin 1.5s linear infinite;  /* ← 회전 */
}
@keyframes scanLoop { 0% { top: -100px; } 100% { top: 100%; } }
@keyframes iconSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 기사상세 : 종목 박스 (목표주가 / 종목관련기사) ----------------------------- */
/*
  - 마크업 : app/Views/News/target_price_v.php, stock_news_v.php
  - 스크립트 : public/js/view_stock_box.js (탭 전환, 더보기 팝업)
  - 레이아웃 : 종목 1~4개 = 타이틀 옆 탭 (1개는 클릭 없는 라벨 .is-static) / 5개 이상 = 좌측 세로 탭(.is-side)
*/

/* 종목 박스 : 색상 변수 */
.inline-related-box,
.stock-news-popup {
  --ir-ink: #191f28;          /* 기본 글자 */
  --ir-sub: #596575;          /* 보조 글자 */
  --ir-meta: #8b95a1;         /* 메타(날짜·건수) */
  --ir-accent: #3182f6;       /* 포커스 */
  --ir-border: #e2e5e8;       /* 박스 테두리 */
  --ir-line: #eef0f2;         /* 행 구분선 */
  --ir-head-line: #e2e2e2;    /* 표 헤더 구분선 */
  --ir-up: #c81e1e;           /* 목표가 상향 */
  --ir-down: #1f5fd6;         /* 목표가 하향 */
  --ir-top: #fdf3f3;          /* 최고 목표가 행 배경 */
  --ir-blue: #1f5f9f;         /* 선택 탭·링크 hover */
  --ir-tab-bg: #fff;          /* 박스 배경과 구분되게 흰색 */
  --ir-tab-border: #ececec;
  --ir-tab-hover-bg: #eceff3;
  --ir-tab-hover-border: #d9dfe6;
  --ir-tab-on-bg: #e6f1fd;
  --ir-tab-on-border: #6ea6e6;
}

/* 종목 박스 : 버튼 폰트 (button은 사이트 폰트를 상속하지 않아 기본 Arial로 나옴) */
.inline-related-box button,
.stock-news-popup button { font-family: inherit; }

/* 종목 박스 : 틀 */
.inline-related-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "body";
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--ir-border);
  border-radius: 8px;
  background: #f8f9fb;
}
.inline-related-box + section.contents { margin-top: 30px; }
/* 본문 안(종목관련기사) : 문단 사이 여백 */
.bodynews .contents .inline-related-box { margin: 30px 0; line-height: normal; }
.bodynews .contents .inline-related-box .inline-related-list li + li { margin-top: 7px; }

.inline-related-box.is-side {
  grid-template-columns: 175px minmax(0, 1fr);
  grid-template-areas:
    "side-label title"
    "nav body";
}

/* 종목 박스 : 타이틀 */
.inline-related-box .inline-related-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--ir-ink);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.inline-related-box .ir-title { grid-area: title; }
.inline-related-box .ir-titlebar {
  grid-area: title;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 6px;
  margin-bottom: 10px;
}
.inline-related-box .ir-titlebar .inline-related-label { padding-bottom: 0; }
.inline-related-box .ir-titlebar .stock-tabs-nav { margin-bottom: 0; }
.inline-related-box .ir-side-label { grid-area: side-label; padding-right: 16px; }

/* 종목 박스 : 종목 탭 */
.inline-related-box .stock-tabs-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  margin-bottom: 10px;
}
/* 세로 탭 : 패널 높이에 맞춰 스크롤, 하단 페이드 */
.inline-related-box.is-side .stock-tabs-nav {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 5px;
  min-height: 96px;
  margin-bottom: 0;
  padding: 0 16px 20px 0;
  contain: size;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9d0d8 transparent;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
}
.inline-related-box .stock-tab-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 11px;
  height: 28px;
  border: 1px solid var(--ir-tab-border);
  border-radius: 999px;
  background: var(--ir-tab-bg);
  color: var(--ir-sub);
  font-size: 13px;
  line-height: 26px;
  font-weight: 500;
  letter-spacing: -0.3px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.inline-related-box .stock-tab-btn:hover {
  border-color: var(--ir-tab-hover-border);
  background: var(--ir-tab-hover-bg);
  color: var(--ir-ink);
}
.inline-related-box .stock-tab-btn.is-active {
  border-color: var(--ir-tab-on-border);
  background: var(--ir-tab-on-bg);
  color: var(--ir-blue);
  font-weight: 600;
}
.inline-related-box .stock-tab-btn:focus-visible { outline: 2px solid var(--ir-accent); outline-offset: 2px; }
/* 종목 1개 : 선택 탭과 같은 모양의 라벨 (전환 대상이 없어 클릭·hover 없음) */
.inline-related-box .stock-tab-btn.is-static { display: inline-block; cursor: default; }
.inline-related-box .stock-tab-btn.is-static:hover {
  border-color: var(--ir-tab-on-border);
  background: var(--ir-tab-on-bg);
  color: var(--ir-blue);
}
.inline-related-box.is-side .stock-tab-btn {
  width: 100%;
  max-width: 100%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 종목 박스 : 탭 패널 */
.inline-related-box .ir-body {
  grid-area: body;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.inline-related-box.is-side .ir-title,
.inline-related-box.is-side .ir-body {
  padding-left: 18px;
  border-left: 1px solid var(--ir-line);
}
.inline-related-box.is-side .ir-body { align-self: start; }
/* 세로 탭형 : 패널을 겹쳐 가장 긴 패널 높이로 고정 (탭 전환 시 높이 흔들림 방지) */
.inline-related-box .stock-tab-panel { grid-area: 1 / 1; visibility: hidden; }
.inline-related-box .stock-tab-panel.is-active { visibility: visible; }
/* 상단 탭형 : 활성 패널 높이만큼 가변 */
.inline-related-box:not(.is-side) .stock-tab-panel { grid-area: auto; display: none; visibility: visible; }
.inline-related-box:not(.is-side) .stock-tab-panel.is-active { display: block; }

/* 목표주가 : 증권사별 목표가 표 */
.inline-related-box .tp-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
.inline-related-box .tp-table th,
.inline-related-box .tp-table td {
  padding: 5px 0 5px 12px;
  border-bottom: 1px solid var(--ir-line);
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}
.inline-related-box .tp-table th:first-child { padding-left: 0; text-align: left; }
.inline-related-box .tp-table thead th:nth-child(1) { width: 36%; }
.inline-related-box .tp-table thead th:nth-child(2) { width: 23%; }
.inline-related-box .tp-table thead th:nth-child(3) { width: 25%; }
.inline-related-box .tp-table thead th:nth-child(4) { width: 16%; }
.inline-related-box .tp-table thead th {
  padding-top: 0;
  padding-bottom: 6px;
  border-bottom-color: var(--ir-head-line);
  color: var(--ir-sub);
  font-size: 12px;
  font-weight: 500;
}
.inline-related-box .tp-table tbody tr:last-child > * { border-bottom: 0; }
.inline-related-box .tp-table tbody th { color: var(--ir-ink); font-weight: 500; font-size: 12px; }
.inline-related-box .tp-price { color: #1a202c; font-weight: 600; font-size: 13.5px; letter-spacing: -0.2px; }
.inline-related-box .tp-delta { color: var(--ir-meta); font-size: 12px; font-weight: 500; }
.inline-related-box .tp-delta.is-up { color: var(--ir-up); font-weight: 600; }
.inline-related-box .tp-delta.is-down { color: var(--ir-down); font-weight: 600; }
.inline-related-box .tp-date { color: var(--ir-meta); font-size: 11.5px; font-weight: 400; }
/* 최고 목표가 행 강조 (좌우로 배경 확장) */
.inline-related-box .tp-table tr.is-top > * { background: var(--ir-top); }
.inline-related-box .tp-table tr.is-top > :first-child { box-shadow: -8px 0 0 var(--ir-top); }
.inline-related-box .tp-table tr.is-top > :last-child { box-shadow: 8px 0 0 var(--ir-top); }
/* 목표주가 : 하단 안내문 */
.inline-related-box .tp-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--ir-line);
  color: var(--ir-meta);
  font-size: 11.5px;
  line-height: 16px;
  letter-spacing: -0.3px;
}

/* 종목관련기사 : 기사 목록 */
.inline-related-box .inline-related-list { margin: 0; padding: 0; list-style: none; }
.inline-related-box .inline-related-list li + li { margin-top: 4px; }
/* 제목(말줄임) + 오른쪽 송고일시 */
.inline-related-box .inline-related-list li { display: flex; align-items: baseline; gap: 12px; }
.inline-related-box .inline-related-list .ir-news-date {
  flex-shrink: 0;
  color: var(--ir-meta);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.inline-related-box .inline-related-list a {
  flex: 1;
  min-width: 0;
  display: block;
  padding: 1px 0;
  color: var(--ir-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-related-box .inline-related-list a:hover { text-decoration: underline; text-underline-offset: 2px; }
.inline-related-box .inline-related-list a:focus-visible { outline: 2px solid var(--ir-accent); outline-offset: 2px; }

/* 종목관련기사 : 더보기 버튼 */
.inline-related-box .related-more {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 6px 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ir-sub);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: color .15s ease;
}
.inline-related-box .related-more::after {
  content: '\203A'; /* › */
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}
.inline-related-box .related-more:hover { color: var(--ir-blue); }

/* 종목관련기사 : 더보기 팝업 (<dialog>) */
.stock-news-popup {
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: min(640px, calc(100vh - 64px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
  color: var(--ir-ink);
  overflow: hidden;
}
.stock-news-popup[open] { display: flex; flex-direction: column; }
.stock-news-popup::backdrop { background: rgba(0, 0, 0, .45); }
.stock-news-popup .snp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--ir-border);
}
.stock-news-popup .snp-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.4px; }
/* 팝업 제목 종목명 : 박스의 선택 탭과 같은 칩 모양으로 강조 */
.stock-news-popup .snp-stock {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 12px;
  border: 1px solid var(--ir-tab-on-border);
  border-radius: 999px;
  background: var(--ir-tab-on-bg);
  color: var(--ir-blue);
  font-size: 17px;
  line-height: 24px;
}
.stock-news-popup .snp-meta { color: var(--ir-meta); font-size: 12px; }
.stock-news-popup .snp-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  color: var(--ir-sub);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.stock-news-popup .snp-close:hover { color: var(--ir-ink); }
.stock-news-popup .snp-body { padding: 6px 20px 16px; overflow-y: auto; overscroll-behavior: contain; }
.stock-news-popup .snp-list { margin: 0; padding: 0; list-style: none; }
.stock-news-popup .snp-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ir-line);
}
.stock-news-popup .snp-list li:last-child { border-bottom: 0; }
.stock-news-popup .snp-list a {
  flex: 1;
  min-width: 0;
  color: var(--ir-ink);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stock-news-popup .snp-list a:hover { color: var(--ir-blue); text-decoration: underline; text-underline-offset: 2px; }
.stock-news-popup .snp-date { flex-shrink: 0; color: var(--ir-meta); font-size: 12px; font-variant-numeric: tabular-nums; }
.stock-news-popup .snp-status { margin: 0; padding: 24px 0; color: var(--ir-sub); font-size: 14px; text-align: center; }
.stock-news-popup .snp-status:empty { display: none; }

/* AI 주가 전망 챗봇 (목표주가 박스 아래) - 기능 확인용 기본 스타일, UI 확정 후 정리 */
.ai-stock-chat {
  --asc-ink: #191f28;
  --asc-sub: #596575;
  --asc-meta: #8b95a1;
  --asc-accent: #3182f6;
  --asc-border: #e2e5e8;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--asc-border);
  border-radius: 8px;
  background: #f8f9fb;
  color: var(--asc-ink);
}
.ai-stock-chat button,
.ai-stock-chat input { font-family: inherit; }
.ai-stock-chat + section.contents { margin-top: 30px; }
.ai-stock-chat .asc-title { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 700; }
.ai-stock-chat .asc-title-ic { flex-shrink: 0; width: 16px; height: 16px; color: var(--asc-accent); }
.ai-stock-chat .asc-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ai-stock-chat .asc-title .chatbot-quota { margin: 0 0 0 auto; font-weight: 400; }
/* 사전 질문 칩: 연한 파랑(펼쳐보기 버튼과 같은 계열)으로 흰 입력창과 구분 */
.ai-stock-chat .asc-preset {
  padding: 5px 10px;
  border: 1px solid #d4e4f8;
  border-radius: 14px;
  background: #eef5fe;
  color: #1f5f9f;
  font-size: 13px;
  cursor: pointer;
}
.ai-stock-chat .asc-preset:hover { border-color: #b9d3f3; background: #e0ecfc; }
.ai-stock-chat .asc-answer {
  max-height: 220px;
  padding: 10px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}
/* 미리보기가 넘치면 답변 박스 우측 상단에 펼쳐보기 버튼(스크롤해도 고정) → 모달 */
.ai-stock-chat .asc-answer-wrap { position: relative; margin-top: 10px; }
.ai-stock-chat .asc-answer.is-overflow .asc-question { padding-right: 76px; }
.ai-stock-chat .asc-more {
  position: absolute;
  top: 7px;
  right: 18px; /* 스크롤바 피함 */
  padding: 3px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  border: 1px solid #d4e4f8;
  border-radius: 14px;
  background: #eef5fe; /* 연한 파랑 (목표주가 선택 탭 계열) */
  color: #1f5f9f;
  font-size: 13px;
  cursor: pointer;
}
.ai-stock-chat .asc-more[hidden] { display: none; }
.ai-stock-chat .asc-more:hover { border-color: #b9d3f3; background: #e0ecfc; }
.ai-stock-chat .asc-question { margin-bottom: 6px; color: var(--asc-sub); font-weight: 700; }
.ai-stock-chat .asc-answer-text { white-space: pre-line; }
.ai-stock-chat .asc-status { display: flex; align-items: center; gap: 8px; color: var(--asc-sub); }
.ai-stock-chat .asc-status[hidden] { display: none; }
.ai-stock-chat .asc-spinner {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 2px solid #d9dfe6;
  border-top-color: var(--asc-accent);
  border-radius: 50%;
  animation: asc-spin .8s linear infinite;
}
@keyframes asc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ai-stock-chat .asc-spinner { animation: none; }
}
.ai-stock-chat .asc-citations { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eef0f2; font-size: 13px; }
.ai-stock-chat .asc-citations-title { margin-bottom: 4px; color: var(--asc-sub); font-weight: 700; }
.ai-stock-chat .asc-citations-list { margin: 0; padding: 0; list-style: none; }
.ai-stock-chat .asc-citations-list li { display: flex; gap: 6px; align-items: baseline; }
.ai-stock-chat .asc-citations-list li + li { margin-top: 3px; }
.ai-stock-chat .asc-cite-num { flex-shrink: 0; color: var(--asc-accent); }
.ai-stock-chat .asc-citations-list a { min-width: 0; overflow: hidden; color: var(--asc-ink); text-overflow: ellipsis; white-space: nowrap; }
.ai-stock-chat .asc-citations-list a:hover { color: #1f5f9f; text-decoration: underline; text-underline-offset: 2px; }
.ai-stock-chat .asc-cite-date { flex-shrink: 0; margin-left: auto; color: var(--asc-meta); font-size: 12px; font-variant-numeric: tabular-nums; }
.ai-stock-chat .asc-form { display: flex; gap: 6px; margin-top: 10px; }
.ai-stock-chat .asc-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--asc-border);
  border-radius: 6px;
  font-size: 14px;
}
.ai-stock-chat .asc-input:focus { outline: none; border-color: var(--asc-accent); }
.ai-stock-chat .asc-submit {
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--asc-accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.ai-stock-chat.is-loading .asc-preset,
.ai-stock-chat.is-loading .asc-submit { opacity: .5; cursor: wait; }
.ai-stock-chat .asc-note { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; color: var(--asc-meta); font-size: 12px; }
.ai-stock-chat .asc-note-ic { flex-shrink: 0; width: 13px; height: 13px; }

/* 답변 전체 보기 모달 (틀은 .stock-news-popup 공유) */
.stock-news-popup.asc-popup { width: 680px; max-height: min(80vh, 760px); }
.asc-popup .asc-popup-title { display: flex; align-items: center; gap: 6px; }
.asc-popup .asc-title-ic { width: 18px; height: 18px; }
.asc-popup .asc-popup-body { padding: 16px 20px 18px; font-size: 15px; line-height: 1.75; }
.asc-popup .asc-question { margin-bottom: 10px; font-size: 16px; line-height: 1.5; color: var(--asc-ink); }
.asc-popup .asc-citations { margin-top: 16px; padding-top: 12px; font-size: 14px; }
.asc-popup .asc-citations-list li + li { margin-top: 5px; }
.asc-popup .asc-note { margin-top: 14px; }

/* AI비서 플로팅 배너 (목표주가 박스가 없는 기사)
   레이아웃(1200px = 기사 860 + 간격 40 + 우측 300) 기준, 기사 본문 글 끝(50%+211)과 우측 영역 시작(50%+300) 사이 빈칸 하단에 고정
   패널은 버튼 위로 열리고 오른쪽 끝을 우측 영역 끝(50%+600)에 맞춰 기사 본문 대신 우측 영역을 덮음 */
.ai-assistant {
  --aia-ink: #191f28;
  --aia-sub: #596575;
  --aia-meta: #8b95a1;
  --aia-accent: #3182f6;
  --aia-border: #e2e5e8;
  color: var(--aia-ink);
}
.ai-assistant button,
.ai-assistant input { font-family: inherit; }
.ai-assistant .aia-fab {
  position: fixed;
  left: calc(50% + 224px); /* 빈칸(89px) 가운데, 기사 구분선 위 */
  bottom: 100px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--aia-accent);
  box-shadow: 0 4px 14px rgba(49, 130, 246, .35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  animation: aia-glow 2.4s ease-in-out infinite;
}
.ai-assistant .aia-fab:hover { background: #1b6fe0; }
.ai-assistant.is-open .aia-fab { background: #1b64da; animation: none; }
.ai-assistant .aia-fab-ic { width: 22px; height: 22px; overflow: visible; }

/* 안내 문구 띠: 버튼 오른쪽(우측 영역 쪽)에 같은 색으로 붙어 버튼이 길어진 것처럼 보임
   z-index -1 → 버튼 배경 위·아이콘 아래에 그려져 겹친 부분(16px)이 이어져 보임 */
.ai-assistant .aia-fab-label {
  position: absolute;
  top: 12px;
  left: calc(100% - 16px);
  z-index: -1;
  max-width: 0;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border-radius: 0 20px 20px 0;
  background: inherit;
  font-size: 14px;
  line-height: 40px;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .4s ease, padding .4s ease, opacity .25s ease;
}
.ai-assistant.is-intro .aia-fab-label,
.ai-assistant:not(.is-open) .aia-fab:hover .aia-fab-label,
.ai-assistant:not(.is-open) .aia-fab:focus-visible .aia-fab-label {
  max-width: 200px;
  padding: 0 18px 0 24px;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .ai-assistant .aia-fab-label { transition: none; }
}

/* 아이콘 반짝임: 큰 별 커졌다 작아짐 + 작은 별 2개 엇갈려 깜빡임, 버튼 그림자 은은하게 번짐 (2.4s 주기) */
.ai-assistant .aia-spark { transform-box: fill-box; transform-origin: center; }
.ai-assistant .aia-spark-main { animation: aia-twinkle-main 2.4s ease-in-out infinite; }
.ai-assistant .aia-spark-sub { animation: aia-twinkle 2.4s ease-in-out infinite; }
.ai-assistant .aia-spark-dot { animation: aia-twinkle 2.4s ease-in-out 1.2s infinite; }
@keyframes aia-twinkle-main {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.15) rotate(15deg); }
}
@keyframes aia-twinkle {
  0%, 100% { opacity: .25; transform: scale(.6); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes aia-glow {
  0%, 100% { box-shadow: 0 4px 14px rgba(49, 130, 246, .35); }
  50% { box-shadow: 0 4px 22px rgba(49, 130, 246, .6), 0 0 0 4px rgba(49, 130, 246, .12); }
}
@media (prefers-reduced-motion: reduce) {
  .ai-assistant .aia-fab,
  .ai-assistant .aia-spark { animation: none; }
}

.ai-assistant .aia-panel {
  --aia-panel-w: 340px;
  position: fixed;
  right: calc(50% - 600px);
  bottom: 176px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  width: var(--aia-panel-w);
  height: min(560px, calc(100vh - 200px));
  overflow: hidden;
  border: 1px solid var(--aia-border);
  border-radius: 12px;
  background: #f8f9fb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}
.ai-assistant .aia-panel[hidden] { display: none; }
.ai-assistant.is-expanded .aia-panel { --aia-panel-w: 520px; height: min(820px, calc(100vh - 200px)); }
.ai-assistant .aia-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--aia-border); background: #fff; }
.ai-assistant .aia-title { display: flex; flex: 1; align-items: center; gap: 6px; margin: 0; font-size: 15px; font-weight: 700; }
.ai-assistant .aia-title-ic { width: 18px; height: 18px; color: var(--aia-accent); }
.ai-assistant .aia-head-btn { padding: 3px 10px; border: 1px solid #d4e4f8; border-radius: 14px; background: #eef5fe; color: #1f5f9f; font-size: 13px; cursor: pointer; }
.ai-assistant .aia-head-btn:hover { border-color: #b9d3f3; background: #e0ecfc; }
.ai-assistant .aia-close { width: 28px; padding: 0; border: 0; background: none; color: var(--aia-sub); font-size: 22px; line-height: 28px; }
.ai-assistant .aia-close:hover { background: #eceff3; }

.ai-assistant .aia-body { position: relative; flex: 1; padding: 12px 14px; overflow-y: auto; overscroll-behavior: contain; }

/* 사전 질문 (기사 분야) */
.ai-assistant .aia-questions { margin: 0; padding: 4px 12px; border: 1px solid var(--aia-border); border-radius: 8px; background: #fff; list-style: none; }
.ai-assistant .aia-questions li + li { border-top: 1px solid #f0f2f4; }
.ai-assistant .aia-question { display: block; width: 100%; padding: 9px 2px; border: 0; background: none; color: var(--aia-ink); font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer; }
.ai-assistant .aia-question:hover { color: #1f5f9f; }

/* 대화 말풍선 */
.ai-assistant .aia-log { display: flex; flex-direction: column; gap: 10px; }
.ai-assistant .aia-log:not(:empty) { margin-top: 12px; }
.ai-assistant .aia-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.ai-assistant .aia-msg-user { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--aia-accent); color: #fff; }
.ai-assistant .aia-msg-bot { align-self: flex-start; border: 1px solid var(--aia-border); border-bottom-left-radius: 4px; background: #fff; }
.ai-assistant .aia-answer-text { white-space: pre-line; }
.ai-assistant .aia-status { display: flex; align-items: center; gap: 8px; color: var(--aia-sub); }
.ai-assistant .aia-spinner { flex-shrink: 0; width: 14px; height: 14px; border: 2px solid #d9dfe6; border-top-color: var(--aia-accent); border-radius: 50%; animation: asc-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .ai-assistant .aia-spinner { animation: none; }
}
.ai-assistant .aia-citations { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eef0f2; font-size: 13px; }
.ai-assistant .aia-citations-title { margin-bottom: 4px; color: var(--aia-sub); font-weight: 700; }
.ai-assistant .aia-citations-list { margin: 0; padding: 0; list-style: none; }
.ai-assistant .aia-citations-list li { display: flex; gap: 6px; align-items: baseline; }
.ai-assistant .aia-citations-list li + li { margin-top: 3px; }
.ai-assistant .aia-cite-num { flex-shrink: 0; color: var(--aia-accent); }
.ai-assistant .aia-citations-list a { min-width: 0; overflow: hidden; color: var(--aia-ink); text-overflow: ellipsis; white-space: nowrap; }
.ai-assistant .aia-citations-list a:hover { color: #1f5f9f; text-decoration: underline; text-underline-offset: 2px; }
.ai-assistant .aia-cite-date { flex-shrink: 0; margin-left: auto; color: var(--aia-meta); font-size: 12px; font-variant-numeric: tabular-nums; }

/* 입력 + 면책 문구 */
.ai-assistant .aia-foot { padding: 10px 14px 10px; border-top: 1px solid var(--aia-border); background: #fff; }
.ai-assistant .aia-form { display: flex; gap: 6px; }
.ai-assistant .aia-input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--aia-border); border-radius: 6px; font-size: 14px; }
.ai-assistant .aia-input:focus { outline: none; border-color: var(--aia-accent); }
.ai-assistant .aia-submit { padding: 0 14px; border: 0; border-radius: 6px; background: var(--aia-accent); color: #fff; font-size: 14px; cursor: pointer; }
.ai-assistant.is-loading .aia-question,
.ai-assistant.is-loading .aia-submit { opacity: .5; cursor: wait; }
.ai-assistant .aia-note { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; color: var(--aia-meta); font-size: 12px; }
.ai-assistant .aia-note-ic { flex-shrink: 0; width: 13px; height: 13px; }

/* AI 챗봇 오늘 남은 질문 횟수 + 로그인 안내 (주가 전망 박스 / AI비서 공용) */
.chatbot-quota { margin: 6px 0 0; color: #8b95a1; font-size: 12px; }
.chatbot-quota-count { color: #3182f6; font-weight: 700; }
.chatbot-quota a { color: #1f5f9f; text-decoration: underline; text-underline-offset: 2px; }
.chatbot-login { display: inline-block; margin-top: 8px; padding: 5px 14px; border-radius: 14px; background: #3182f6; color: #fff !important; font-size: 13px; font-weight: 700; }
.chatbot-login:hover { background: #1b6fe0; }
