/* 연 공용 사전 부품 — 모든 교과서 공통. 호버=말풍선(전문용어는 그림 포함 상세), 더블클릭=우측 상세창. */
.ydict-tip{
  position:fixed; z-index:2147483000; max-width:340px; min-width:150px;
  background:#fffdf8; color:#1f2a2a; border:1px solid #e6ddcd; border-left:4px solid #c38d56;
  border-radius:12px; box-shadow:0 10px 30px rgba(31,42,42,.22); padding:12px 14px;
  font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
  font-size:14px; line-height:1.6; pointer-events:none;
}
.ydict-tip .yt-word{font-family:"Noto Serif KR",serif; font-weight:800; font-size:15.5px; color:#1f2a2a}
.ydict-tip .yt-tag{display:inline-block; font-size:11px; font-weight:800; border-radius:999px; padding:2px 8px; margin-left:6px; vertical-align:middle}
.ydict-tip .yt-tag.subj{background:#e9f3ec; color:#2f7a52}
.ydict-tip .yt-tag.dict{background:#f3e7dd; color:#a96f36}
.ydict-tip .yt-body{margin-top:6px; color:#3a423f}
.ydict-tip .yt-img{display:block; width:100%; max-height:170px; object-fit:contain; margin:8px 0 4px; border-radius:9px; background:#f4f1eb; border:1px solid #eee}
.ydict-tip .yt-svg{display:block; margin:8px auto 4px; max-width:100%}
.ydict-tip .yt-more{margin-top:7px; font-size:11.5px; color:#8a8170; border-top:1px dashed #e6ddcd; padding-top:5px}
.ydict-tip.loading .yt-body{color:#8a8170}

/* 우측 상세 드로어 */
.ydict-ov{position:fixed; inset:0; background:rgba(31,42,42,.42); z-index:2147483100; opacity:0; visibility:hidden; transition:opacity .25s}
.ydict-ov.open{opacity:1; visibility:visible}
.ydict-drawer{
  position:fixed; top:0; right:0; height:100%; width:min(420px,92vw); z-index:2147483200;
  background:#fffdf8; box-shadow:-14px 0 40px rgba(31,42,42,.28);
  transform:translateX(100%); transition:transform .28s cubic-bezier(.22,.61,.36,1);
  display:flex; flex-direction:column; font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
}
.ydict-drawer.open{transform:translateX(0)}
.ydict-drawer .yd-head{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:18px 20px 14px; border-bottom:1px solid #eee6d6;
  background:linear-gradient(150deg,#23413e,#2f5d62); color:#f4f1eb}
.ydict-drawer .yd-word{font-family:"Noto Serif KR",serif; font-weight:900; font-size:1.5rem; line-height:1.2}
.ydict-drawer .yd-sub{font-size:12px; color:#e7d9bf; margin-top:2px}
.ydict-drawer .yd-close{flex:0 0 auto; background:rgba(255,255,255,.15); border:none; color:#fff; width:34px; height:34px; border-radius:9px; font-size:18px; cursor:pointer}
.ydict-drawer .yd-close:hover{background:rgba(255,255,255,.28)}
.ydict-drawer .yd-body{padding:18px 20px 40px; overflow-y:auto; -webkit-overflow-scrolling:touch}
.ydict-drawer .yd-box{background:#fbf8f1; border:1px solid #e6ddcd; border-radius:12px; padding:14px 16px; margin-bottom:14px}
.ydict-drawer .yd-lab{display:block; font-weight:800; font-size:.82rem; color:#a96f36; margin-bottom:6px}
.ydict-drawer .yd-lab.easy{color:#2f7a52}
.ydict-drawer .yd-box p{font-size:.98rem; line-height:1.8; color:#2c332f; margin:0}
.ydict-drawer .yd-img{display:block; width:100%; max-height:230px; object-fit:contain; border-radius:10px; margin:10px 0 2px; background:#f4f1eb; border:1px solid #eee}
.ydict-drawer .yd-svg{display:block; margin:10px auto 2px; max-width:100%}
.ydict-drawer .yd-sense{padding:9px 0; border-bottom:1px dashed #e6ddcd; font-size:.95rem; line-height:1.7}
.ydict-drawer .yd-sense:last-child{border-bottom:none}
.ydict-drawer .yd-sense .pos{display:inline-block; font-size:11px; font-weight:800; color:#427a71; background:#eef3ef; border-radius:6px; padding:1px 7px; margin-right:6px}
.ydict-drawer .yd-sense .ex{display:block; color:#6b7370; font-size:.9rem; margin-top:3px}
.ydict-drawer .yd-link{display:inline-block; margin-top:4px; font-size:.9rem; color:#2f5d62; font-weight:700; text-decoration:none; border-bottom:1px dotted #c38d56}
.ydict-drawer .yd-src{font-size:12px; color:#8a8170; margin-top:10px}
.ydict-drawer .yd-hint{font-size:12px; color:#a99; margin-top:8px}

/* 어휘집 담기 버튼 + 내 어휘집 목록 */
.ydict-drawer .yd-vocab{ margin-top:2px; background:#eef3ef; color:#2f5d62; border:1.5px solid #2f5d62; border-radius:999px;
  padding:9px 16px; font-size:.86rem; font-weight:800; cursor:pointer; font-family:inherit; }
.ydict-drawer .yd-vocab.on{ background:#2f5d62; color:#fff; }
.ydict-drawer .yd-vocab:hover{ filter:brightness(1.05); }

.yvocab-ov{position:fixed; inset:0; background:rgba(31,42,42,.42); z-index:2147483300; opacity:0; visibility:hidden; transition:opacity .25s; display:flex; align-items:center; justify-content:center; padding:16px}
.yvocab-ov.open{opacity:1; visibility:visible}
.yvocab-modal{background:#fffdf8; border-radius:16px; max-width:420px; width:100%; max-height:78vh; display:flex; flex-direction:column;
  box-shadow:0 16px 48px rgba(0,0,0,.3); font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR",sans-serif;}
.yvocab-modal .yv-head{display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid #eee6d6;
  background:linear-gradient(150deg,#23413e,#2f5d62); color:#f4f1eb; border-radius:16px 16px 0 0;}
.yvocab-modal .yv-head .yv-title{font-family:"Noto Serif KR",serif; font-weight:800; font-size:1.05rem;}
.yvocab-modal .yv-close{background:rgba(255,255,255,.15); border:none; color:#fff; width:30px; height:30px; border-radius:8px; font-size:16px; cursor:pointer;}
.yvocab-modal .yv-list{overflow-y:auto; padding:12px 16px 18px;}
.yvocab-modal .yv-item{background:#fbf8f1; border:1px solid #e6ddcd; border-radius:10px; padding:10px 13px; margin-bottom:8px; cursor:pointer;}
.yvocab-modal .yv-item:hover{background:#f3ede1;}
.yvocab-modal .yv-item .yv-word{font-weight:800; color:#1f2a2a; font-family:"Noto Serif KR",serif;}
.yvocab-modal .yv-item .yv-def{font-size:12.5px; color:#5a4a2a; margin-top:3px; line-height:1.5;}
.yvocab-modal .yv-item .yv-del{float:right; background:none; border:none; color:#b98; cursor:pointer; font-size:15px;}
.yvocab-modal .yv-empty{color:#8a8170; font-size:13.5px; text-align:center; padding:26px 10px;}
.yvocab-modal .yv-foot{font-size:12px; color:#8a8170; text-align:center; padding:10px 6px 2px; border-top:1px dashed #e6ddcd; margin-top:4px;}
.yvocab-modal .yv-login{background:#2D5A68; color:#fff; border:none; border-radius:999px; padding:5px 12px; font-size:11.5px; font-weight:800; cursor:pointer; font-family:inherit; margin-left:4px;}

@media print{ .ydict-tip,.ydict-ov,.ydict-drawer,.yvocab-ov{display:none!important} }
