/* ========== 용어 세 개 ========== */
.words { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .words { grid-template-columns: 1fr; } }
.word { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.word b { font-size: 18px; }
.word b em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 4px; }
.word p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.word u { text-decoration: none; background: linear-gradient(transparent 60%, #ffe08a 60%); color: var(--ink); font-weight: 600; }
.word.hot { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* ========== 카드 ========== */
.pops { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pop-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; scroll-margin-top: 90px;
  transition: box-shadow .3s, transform .3s var(--ease-out);
}
.pop-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.pop-card.flash { animation: card-flash 1.4s; }
@keyframes card-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } }
.pc-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.pc-body h3 { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.pc-body h3 em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 4px; }
.pc-body p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.pc-actions .tip-host, .pair-btns .tip-host { display: inline-block; }
.pc-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }

/* ========== 작은 화면 그림 ========== */
.mini-scr {
  position: relative; aspect-ratio: 16 / 9; margin: 12px 12px 0; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); overflow: hidden;
}
.mini-scr .bg { position: absolute; inset: 0; padding: 12px 14px; transition: transform .4s var(--ease-out); }
.mini-scr .bg i { display: block; height: 6px; margin-bottom: 7px; border-radius: 3px; background: #e7e5df; }
.mini-scr .bg i:nth-child(1) { width: 40%; height: 9px; background: #d7d4cc; }
.mini-scr .bg i:nth-child(2) { width: 90%; } .mini-scr .bg i:nth-child(3) { width: 75%; } .mini-scr .bg i:nth-child(4) { width: 85%; } .mini-scr .bg i:nth-child(5) { width: 60%; }
.mini-scr .bg i:nth-child(6) { width: 80%; } .mini-scr .bg i:nth-child(7) { width: 50%; }
.mini-scr .md { position: absolute; inset: 0; background: rgba(15,15,20,.5); }
.mini-scr .ov { position: absolute; }
.mini-scr .box { background: #fff; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.mini-scr .btnbar { position: absolute; bottom: 6px; height: 8px; border-radius: 3px; background: var(--ink); }
.mini-scr .line { position: absolute; height: 4px; border-radius: 2px; background: #dcdad3; }
.pop-card:hover .mini-scr .ov { animation: ov-in .55s var(--ease-out) both; }
.pop-card:hover .mini-scr .md { animation: md-in .4s both; }
@keyframes ov-in { from { opacity: 0; transform: scale(.85); } }
@keyframes md-in { from { opacity: 0; } }
.pop-card:hover .mini-scr[data-d="sheet"] .ov { animation-name: ov-up; }
.pop-card:hover .mini-scr[data-d="drawer"] .ov { animation-name: ov-left; }
.pop-card:hover .mini-scr[data-d="toast"] .ov,
.pop-card:hover .mini-scr[data-d="snack"] .ov { animation-name: ov-up-sm; }
.pop-card:hover .mini-scr[data-d="push"] .ov { animation-name: ov-down; }
.pop-card:hover .mini-scr[data-d="banner"] .ov { animation-name: ov-banner; }
.pop-card:hover .mini-scr[data-d="banner"] .bg { animation: bg-push .55s var(--ease-out) both; }
@keyframes ov-up { from { transform: translateY(100%); } }
@keyframes ov-left { from { transform: translateX(-100%); } }
@keyframes ov-up-sm { from { opacity: 0; transform: translateY(20px); } }
@keyframes ov-down { from { opacity: 0; transform: translateY(-30px); } }
@keyframes ov-banner { from { transform: translateY(-100%); } }
@keyframes bg-push { from { transform: translateY(0); } }

/* ========== 다이얼로그(얼럿·컨펌) ========== */
.dialog {
  width: min(340px, 100%); padding: 28px 24px 20px;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-2);
  text-align: center;
}
.dialog h3 { font-size: 19px; font-weight: 750; margin-top: 12px; }
.dialog p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.dlg-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }
.dlg-icon.warn { background: #fff3d6; color: #c47f00; }
.dlg-icon.danger { background: #fde4e5; color: var(--bad); }
.dlg-btns { display: grid; gap: 8px; margin-top: 22px; }
.dlg-btns .btn { height: 46px; }
.dlg-btns.two { grid-template-columns: 1fr 1fr; }
.tag-top { top: -14px; left: 50%; transform: translate(-50%, -100%); }

/* ========== 모달 ========== */
.modal-box { width: min(440px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow-2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 22px; }
.modal-head h3 { font-size: 19px; font-weight: 750; }
.modal-body { display: grid; gap: 12px; padding: 8px 22px; }
.modal-body label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.modal-body input, .modal-body textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #d6d3cb; border-radius: 10px; outline: 0; font-size: 15px; font-weight: 400; resize: none;
}
.modal-body input:focus, .modal-body textarea:focus { border-color: var(--accent); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px 18px; }
.modal-note { padding: 10px 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; background: #faf9f6; border-radius: 0 0 18px 18px; }
.dim-tag { left: 20px; top: 76px; opacity: 0; transition: opacity .3s .3s; }
.layer.is-open .dim-tag { opacity: 1; }
@media (max-width: 560px) { .dim-tag { top: 70px; left: 12px; right: 12px; white-space: normal; } }

/* ========== 바텀시트 ========== */
.sheet-layer { place-items: end center; padding: 0; }
.sheet-layer .sheet {
  width: min(560px, 100%); padding: 0 20px 24px;
  background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-2);
  transform: translateY(100%); opacity: 1;
  transition: transform .4s var(--ease-out);
}
.sheet-layer.is-open .sheet { transform: translateY(var(--drag, 0px)); }
.sheet-layer .sheet.dragging { transition: none; }
.sheet-handle { display: grid; place-items: center; height: 28px; cursor: grab; touch-action: none; }
.sheet-handle i { width: 40px; height: 5px; border-radius: 99px; background: #d6d3cb; }
.sheet h3 { font-size: 17px; margin: 4px 0 16px; }
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sheet-grid button { display: grid; justify-items: center; gap: 6px; padding: 8px 0; border: 0; background: none; font-size: 13px; color: var(--ink-2); border-radius: 12px; }
.sheet-grid button:hover { background: #f4f3ef; }
.sheet-grid span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #f1f0ec; color: var(--ink); }
.sheet-cancel { width: 100%; margin-top: 16px; height: 48px; }
.sheet .tag-top { top: -12px; }

/* ========== 드로어 ========== */
.drawer-layer { place-items: stretch start; padding: 0; }
.drawer-layer .drawer {
  position: relative;
  display: flex; flex-direction: column;
  width: min(300px, 82vw); height: 100%; padding: 12px 20px;
  background: #fff; box-shadow: var(--shadow-2);
  transform: translateX(-100%); opacity: 1;
  transition: transform .4s var(--ease-out);
}
.drawer-layer.is-open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-bottom: 12px; font-size: 13px; letter-spacing: .08em; }
.drawer a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 650; cursor: pointer; }
.drawer a:hover { color: var(--accent); }
.drawer-tag { left: calc(100% + 14px); top: 20px; }

/* ========== 코치마크 ========== */
.coach { position: fixed; inset: 0; z-index: 300; }
.coach-hole {
  position: absolute; border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 0 0 9999px rgba(10,10,14,.68);
  transition: all .45s var(--ease-out);
}
.coach-bubble {
  position: absolute; width: 270px; padding: 16px 16px 12px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-2);
  transition: top .45s var(--ease-out), left .45s var(--ease-out);
}
.coach-bubble .tag-top { left: 16px; transform: translateY(-100%); }
.coach-step { color: var(--accent); font-weight: 700; font-size: 12px; }
.coach-text { margin: 4px 0 12px; font-size: 15px; line-height: 1.5; }
.coach-btns { display: flex; justify-content: flex-end; gap: 6px; }

/* ========== 논모달 ========== */
.nonmodal {
  position: fixed; right: 24px; bottom: 24px; z-index: 150;
  width: 290px; padding: 0 14px 14px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-2), 0 0 0 1px var(--line);
  animation: ov-in .3s var(--ease-out);
}
.nm-head { display: flex; align-items: center; gap: 8px; height: 44px; cursor: move; user-select: none; touch-action: none; }
.nm-head small { color: var(--muted); font-size: 12px; }
.nm-head .icon-btn { margin-left: auto; width: 32px; height: 32px; }
.nonmodal textarea { width: 100%; padding: 10px; border: 1.5px solid #d6d3cb; border-radius: 10px; outline: 0; font-size: 14px; resize: none; }
.nonmodal textarea:focus { border-color: var(--accent); }
.nm-tag { left: 0; top: -10px; transform: translateY(-100%); }
@media (max-width: 560px) { .nonmodal { right: 16px; left: 16px; width: auto; bottom: 16px; } }

/* ========== 레이어 팝업 ========== */
.layerpop {
  position: fixed; top: 90px; left: max(24px, calc(50% - 420px)); z-index: 150;
  width: 320px; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: ov-in .3s var(--ease-out);
}
.layerpop .tag-top { left: 0; transform: translateY(-100%); top: -8px; }
.lp-img { position: relative; aspect-ratio: 4 / 5; }
.lp-img img { width: 100%; height: 100%; object-fit: cover; }
.lp-text { position: absolute; inset: auto 0 0; display: grid; gap: 2px; padding: 60px 22px 22px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.lp-text small { font-size: 11px; letter-spacing: .2em; opacity: .8; }
.lp-text b { font-size: 22px; }
.lp-text span { font-size: 13px; opacity: .9; }
.lp-foot { display: flex; background: #222; }
.lp-foot button { flex: 1; padding: 12px; border: 0; background: none; color: #ddd; font-size: 13px; }
.lp-foot button + button { border-left: 1px solid #444; flex: 0 0 90px; }
.lp-foot button:hover { color: #fff; background: #333; }
@media (max-width: 560px) { .layerpop { left: 16px; right: 16px; width: auto; top: 76px; } .lp-img { aspect-ratio: 1; } }

/* ========== 푸시 ========== */
.push {
  position: fixed; top: 12px; left: 50%; z-index: 500;
  display: flex; gap: 12px; align-items: flex-start;
  width: min(380px, calc(100vw - 24px)); padding: 12px 14px;
  border-radius: 20px; background: rgba(245, 245, 247, .9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transform: translateX(-50%);
  animation: push-in .5s var(--ease-out) both;
  cursor: pointer;
}
.push.out { animation: push-out .35s ease-in both; }
@keyframes push-in { from { transform: translate(-50%, -140%); } }
@keyframes push-out { to { transform: translate(-50%, -140%); } }
.push-app { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.push > div { flex: 1; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
.push b { font-size: 14px; } .push small { color: var(--muted); font-size: 12px; }
.push p { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.push-tag { left: 50%; bottom: -10px; transform: translate(-50%, 100%); }

/* ========== 배너 ========== */
.page-banner {
  position: sticky; top: 60px; z-index: 45;
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-out);
}
.page-banner.show { grid-template-rows: 1fr; }
.page-banner > div { overflow: hidden; }
.pb-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; background: #fff3c4; border-bottom: 1px solid #f0dc8a;
  font-size: 14.5px; color: #5c4600;
}
.pb-inner .ic { color: #b38600; }
.pb-inner b { white-space: nowrap; }
.pb-inner .name-tag { position: static; margin-left: 4px; box-shadow: none; }
.pb-inner .icon-btn { margin-left: auto; width: 34px; height: 34px; color: #5c4600; }
@media (max-width: 560px) { .pb-inner { padding: 10px 16px; font-size: 13px; flex-wrap: wrap; } .pb-inner .name-tag { display: none; } }

/* ========== 비교표 ========== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.compare th { position: sticky; top: 0; padding: 12px 16px; text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; background: #faf9f6; border-bottom: 1px solid var(--line); }
.compare td { padding: 11px 16px; border-bottom: 1px solid #efede8; color: var(--ink-2); }
.compare tr:last-child td { border-bottom: 0; }
.compare tbody tr[data-fire] { cursor: pointer; transition: background .15s; }
.compare tbody tr[data-fire]:hover { background: var(--accent-weak); }
.compare td b { color: var(--ink); }
.blk { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 13px; }
.blk::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #c9c6be; }
.blk.on { color: var(--ink); font-weight: 700; }
.blk.on::before { background: var(--ink); border-color: var(--ink); }
.compare mark { background: #fff3c4; color: inherit; padding: 1px 4px; border-radius: 4px; }

/* ========== 헷갈리는 짝 ========== */
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 420px) { .pairs { grid-template-columns: 1fr; } }
.pair { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pair-head { display: flex; align-items: baseline; gap: 10px; font-size: 19px; }
.pair-head span { font-size: 13px; color: var(--muted); font-weight: 700; }
.pair p { font-size: 14px; color: var(--ink-2); }
.pair-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
