/* ECM 공통 테마 — 클린 노랑 (2026-09-29 개편).
   바탕은 흰색, 노랑은 로고·주요 버튼·강조 표시에만 쓴다. 헤더를 노랑으로 칠하지 않는다.
   assets/styles.css 는 미리 빌드된 Tailwind 라 새 유틸리티 클래스를 써도 CSS 가 안 나온다.
   그래서 새 화면 요소는 전부 여기 ecm- 접두사 클래스로 직접 정의한다. 메인과 블로그가 같이 쓴다. */

:root {
  --y: #FFE14D;        /* 병아리 노랑: 헤더, 강조 */
  --y-deep: #F7C600;   /* 테두리·호버 */
  --y-soft: #FFF3B0;   /* 연한 배지 */
  --y-pale: #FFFBE6;   /* 아이콘 상자, 행 호버 */
  --ink: #17160F;      /* 본문 글자 (따뜻한 검정) */
  --ink-2: #55534A;
  --ink-3: #6B685F;    /* 작은 글자·날짜: 흰 바탕 대비 5:1 이상 (예전 #8C897F 는 3.4:1) */
  --brown: #7A5C00;    /* 노랑 위에 얹는 강조 글자색 */
  --line: #EBEAE4;
  --sf: #F6F6F3;       /* 입력칸·칩·옅은 면 */
  --bg: #FFFFFF;
  --hot: #E5484D;
  --hot-soft: #FDECEC;
  --new: #0E9F4F;
  --new-soft: #E6F6EC;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  word-break: keep-all; overflow-wrap: break-word;
}
.ecm-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; width: 100%; }
@media (min-width: 640px) { .ecm-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .ecm-wrap { padding: 0 2rem; } }
body.ecm-lock { overflow: hidden; }
/* 안전장치: 어떤 요소가 넘쳐도 모바일에서 화면이 옆으로 밀리지 않게 (clip 은 sticky 헤더를 깨지 않는다) */
body { overflow-x: clip; }

/* ───────── 헤더 ───────── */
.ecm-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.ecm-header-inner {
  max-width: 80rem; margin: 0 auto; padding: .5rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
}
.ecm-logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 900; font-size: 1.3rem; letter-spacing: -.03em;
  color: var(--ink); text-decoration: none; flex-shrink: 0;
}
/* 로고: 먹 쿠폰 티켓 속 철모 병아리 + 스텐실 ECM (assets/logo.svg) */
.ecm-logo-img { height: 28px; width: auto; display: block; }
@media (min-width: 768px) { .ecm-logo-img { height: 32px; } }
.ecm-menu { display: none; align-items: center; gap: .15rem; }
.ecm-menu-btn, .ecm-menu-link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .8rem; border-radius: .6rem;
  font-weight: 600; font-size: .92rem; color: var(--ink-2);
  background: transparent; border: 0; cursor: pointer; text-decoration: none;
  white-space: nowrap; font-family: inherit;
}
.ecm-menu-btn:hover, .ecm-menu-link:hover, .ecm-menu-btn.is-open, .ecm-menu-link.is-current { background: var(--sf); color: var(--ink); }
.ecm-menu-btn i { font-size: .65rem; transition: transform .15s; }
.ecm-menu-btn.is-open i { transform: rotate(180deg); }

.ecm-search { position: relative; display: flex; align-items: center; flex: 1 1 100%; order: 10; min-width: 0; }
.ecm-search > i { position: absolute; left: .85rem; color: var(--ink-3); font-size: .85rem; pointer-events: none; }
.ecm-search input {
  width: 100%; height: 38px; border-radius: 10px;
  border: 1px solid transparent; background: var(--sf);
  padding: 0 2.2rem 0 2.3rem; font-size: .875rem; color: var(--ink);
  -webkit-appearance: none; appearance: none; font-family: inherit;
}
.ecm-search input::-webkit-search-cancel-button { display: none; }
.ecm-search input::placeholder { color: #9A978C; }
.ecm-search input:focus { outline: none; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,22,15,.08); }
.ecm-search #clearSearchBtn { position: absolute; right: .75rem; color: var(--ink-3); background: none; border: 0; cursor: pointer; }
.ecm-search #clearSearchBtn.hidden { display: none; }

.ecm-report {
  display: none; align-items: center; gap: .35rem;
  background: var(--sf); color: var(--ink);
  border-radius: .6rem; padding: .5rem .9rem;
  font-weight: 700; font-size: .85rem; border: 0; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.ecm-report:hover { background: var(--line); }
.ecm-burger {
  margin-left: auto; order: 5;
  display: inline-flex; width: 38px; height: 38px; border-radius: .6rem;
  align-items: center; justify-content: center;
  border: 0; background: var(--sf); color: var(--ink); font-size: 1.05rem; cursor: pointer;
}
@media (min-width: 640px) {
  .ecm-header-inner { flex-wrap: nowrap; height: 60px; padding-top: 0; padding-bottom: 0; }
  .ecm-search { flex: 1 1 auto; order: 0; max-width: 420px; margin-left: auto; }
  .ecm-burger { margin-left: 0; order: 0; }
}
@media (min-width: 1024px) {
  .ecm-menu { display: flex; }
  .ecm-report { display: inline-flex; }
  .ecm-burger { display: none; }
}

/* ───────── 드롭다운(메가 메뉴) ─────────
   데스크톱: 헤더 아래로 펼쳐지는 패널. 왼쪽은 분류, 오른쪽은 그 분류의 목록.
   모바일:   같은 마크업을 오른쪽 서랍으로 보여준다. */
.ecm-mega-wrap { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; display: none; }
.ecm-mega-wrap.is-open { display: block; }
.ecm-drawer { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.ecm-drawer-head, .ecm-drawer-links, .ecm-mega-title, .ecm-mega-home { display: none; }
.ecm-mega { display: none; }
.ecm-mega.is-open { display: block; }
.ecm-mega-panel {
  background: #fff; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 14px 14px; box-shadow: 0 14px 30px rgba(0,0,0,.10);
  display: flex; min-height: 280px; max-height: 66vh; overflow: hidden;
  width: min(880px, 100%);
}
.ecm-mega-side {
  width: 200px; flex-shrink: 0; background: var(--sf); border-right: 1px solid var(--line);
  padding: .6rem; display: flex; flex-direction: column; gap: .15rem; overflow: auto;
}
.ecm-mega-side-item {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: .6rem .75rem; border-radius: .6rem; border: 0; background: transparent;
  font-weight: 700; font-size: .9rem; color: var(--ink-2); cursor: pointer; text-align: left; font-family: inherit;
}
.ecm-mega-side-item i { display: none; }
.ecm-mega-side-item:hover { background: #ECEBE5; }
.ecm-mega-side-item.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ecm-mega-body { flex: 1; padding: 1rem 1.25rem; overflow: auto; min-width: 0; }
.ecm-mega-sec { display: none; }
.ecm-mega-sec.is-active { display: block; }
.ecm-mega-sec h3 { display: none; }
.ecm-mega-sec h4 { font-size: .72rem; font-weight: 700; color: var(--ink-3); margin: .9rem 0 .25rem; letter-spacing: .05em; text-transform: uppercase; }
.ecm-mega-sec h4:first-of-type { margin-top: .25rem; }
.ecm-mega-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem 1.25rem; }
.ecm-mega-list a {
  display: flex; align-items: center; gap: .55rem; min-width: 0;
  padding: .5rem .6rem; border-radius: .55rem;
  color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600;
}
.ecm-mega-list .ecm-pill { font-size: .58rem; padding: .08rem .38rem; margin-left: .1rem; }
.ecm-mega-list a:hover { background: var(--sf); }
.ecm-mega-list .ecm-mega-icon { font-size: .8rem; width: 1.6rem; height: 1.6rem; border-radius: 7px; display: grid; place-items: center; text-align: center; flex-shrink: 0; }
.ecm-mega-list .ecm-mega-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecm-mega-list .ecm-mega-benefit { margin-left: auto; font-size: .72rem; color: var(--brown); font-weight: 700; white-space: nowrap; }
.ecm-mega-empty { color: var(--ink-3); font-size: .85rem; padding: .5rem; }

@media (max-width: 1023.98px) {
  .ecm-mega-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.35); }
  /* 머리말의 backdrop-filter 가 fixed 서랍의 기준을 머리말 상자로 바꿔 서랍이 머리말 높이만큼 잘리던 것: 열려 있을 때만 끈다 */
  body.ecm-lock .ecm-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
  .ecm-drawer {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(92vw, 400px);
    background: #fff; overflow: auto; padding: 1rem; margin: 0;
    display: flex; flex-direction: column; gap: 1rem;
    box-shadow: -10px 0 30px rgba(0,0,0,.15);
  }
  .ecm-drawer-head { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 1.05rem; }
  .ecm-drawer-close { width: 34px; height: 34px; border-radius: 999px; border: 0; background: var(--sf); cursor: pointer; font-size: 1rem; }
  .ecm-drawer-links { display: flex; flex-direction: column; gap: .25rem; padding-top: .5rem; }
  .ecm-drawer-links a { padding: .6rem .5rem; border-radius: .5rem; font-weight: 700; color: var(--ink); text-decoration: none; }
  .ecm-drawer-links a { display: flex; align-items: center; gap: .6rem; }
  .ecm-drawer-links a i { width: 1.1rem; text-align: center; color: var(--ink-3); }
  .ecm-drawer-links a:hover { background: var(--sf); }
  /* 서랍 안 섹션(게임 쿠폰·블로그)은 제목만 보이고, 누른 것 하나만 펼쳐진다 */
  .ecm-drawer { gap: .25rem; }
  .ecm-mega { display: block; border-bottom: 1px solid var(--line); }
  .ecm-mega-title {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: .95rem .25rem; margin: 0; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-weight: 900; font-size: 1.02rem; color: var(--ink); text-align: left;
  }
  .ecm-mega-title i { font-size: .8rem; color: var(--ink-3); transition: transform .15s; }
  .ecm-mega.is-expanded .ecm-mega-title i { transform: rotate(180deg); }
  .ecm-mega-panel { display: none; flex-direction: column; box-shadow: none; border: 0; border-radius: 0; max-height: none; min-height: 0; width: 100%; padding-bottom: .5rem; }
  .ecm-mega.is-expanded .ecm-mega-panel { display: flex; }
  .ecm-mega-home { display: block !important; margin: .1rem 0 .7rem; padding: .6rem .8rem; border-radius: 10px; background: var(--sf); color: var(--ink); font-weight: 800; font-size: .88rem; text-decoration: none; }
  /* 분류 버튼은 여러 줄로 쌓지 않고 옆으로 밀어 보는 한 줄로 */
  .ecm-mega-side { width: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--line); background: transparent; padding: .1rem 0 .6rem; gap: .35rem; }
  .ecm-mega-side::-webkit-scrollbar { display: none; }
  .ecm-mega-side-item { flex-shrink: 0; white-space: nowrap; }
  .ecm-mega-side-item { width: auto; padding: .4rem .7rem; font-size: .82rem; background: var(--sf); border-radius: 999px; box-shadow: none; }
  .ecm-mega-side-item.is-active { background: var(--ink); color: #fff; box-shadow: none; }
  .ecm-mega-side-item i { display: none; }
  .ecm-mega-body { padding: .5rem 0 .25rem; }
  .ecm-mega-sec h3 { display: none; }
  .ecm-mega-list { grid-template-columns: minmax(0, 1fr); }
}

/* ───────── 뱃지·버튼·링크 ───────── */
.ecm-pill {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 800;
  letter-spacing: .02em; padding: 2px 7px; border-radius: 6px; line-height: 1.3; flex-shrink: 0; white-space: nowrap;
}
/* 상태 뱃지: 색과 글자를 항상 같이 쓴다 (NEW / 오늘 마감·D-1 / D-n / 만료 / 만료일 미공개·상시) */
.ecm-pill.hot, .ecm-pill.due-soon { background: var(--hot-soft); color: #B42329; }
.ecm-pill.new { background: var(--new-soft); color: #0A7A3C; }
.ecm-pill.due { background: #FFF1E0; color: #8F2F0C; }
.ecm-pill.muted { background: var(--sf); color: var(--ink-2); font-weight: 700; }
.ecm-pill.expired { background: var(--sf); color: var(--ink-3); text-decoration: line-through; }
.ecm-btn-primary {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--y); color: var(--ink); border: 0; border-radius: .6rem;
  padding: .45rem .85rem; font-weight: 700; font-size: .78rem; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.ecm-btn-primary:hover { background: var(--y-deep); }

/* 게임 아이콘: 이모지 대신 이름 첫 글자 타일. --mh 는 이름으로 정한 색상(hue) */
.ecm-mono { background: hsl(var(--mh, 45) 72% 94%) !important; color: hsl(var(--mh, 45) 48% 30%) !important; border-color: transparent !important; font-weight: 800; font-style: normal; letter-spacing: -.03em; line-height: 1; }
.ecm-mono-doc { background: var(--sf) !important; color: var(--ink-3) !important; border-color: transparent !important; }
.ecm-link { color: var(--ink-2); text-decoration: none; }
.ecm-link:hover { color: var(--brown); text-decoration: underline; }
.ecm-link-strong { color: var(--brown); font-weight: 800; text-decoration: none; }
.ecm-link-strong:hover { text-decoration: underline; }
.ecm-count { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; background: var(--y-soft); color: var(--brown); padding: 1px 6px; border-radius: 6px; }
.ecm-toast {
  background: var(--ink); color: #fff;
}

/* 블로그 카드 — 이전 보라색 호버를 노랑으로 */
.post-card:hover { border-color: var(--ink-3) !important; }
.post-card:hover h2, .post-card:hover h3 { color: var(--brown); }

/* ───────── 예전 보라색 유틸리티를 노랑 테마로 덮어쓰기 ─────────
   블로그 글 15개 본문에 text-purple-700 같은 클래스가 수백 곳 박혀 있다.
   파일마다 고치면 새 글이 들어올 때마다 또 어긋나므로 여기서 한 번에 바꾼다. */
.text-purple-500, .text-purple-600, .text-purple-700, .text-purple-900,
.hover\:text-purple-700:hover, .hover\:text-purple-900:hover { color: var(--brown) !important; }
.bg-purple-50, .bg-purple-100 { background-color: var(--y-pale) !important; }
.bg-purple-500\/20, .bg-purple-500\/10 { background-color: var(--y-soft) !important; }
.border-purple-300, .border-purple-500\/30, .hover\:border-purple-300:hover { border-color: var(--y-deep) !important; }
.bg-purple-600, .bg-indigo-600 { background-color: var(--ink) !important; color: #fff !important; }
.from-purple-600, .via-indigo-600, .from-indigo-600 { --tw-gradient-from: var(--y-deep) !important; --tw-gradient-to: var(--y) !important; }
.bg-clip-text.text-transparent { color: var(--brown) !important; background: none !important; }

/* ───────── 페이지 이동 로딩 표시 ("Coupon on the way") ───────── */
.ecm-loader { position: fixed; top: 0; left: 0; right: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .15s; }
.ecm-loader.is-on { opacity: 1; }
.ecm-loader-bar {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--y-deep) 30%, #FFF6C2 50%, var(--y-deep) 70%, transparent 100%);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: ecmSlide .9s linear infinite;
}
@keyframes ecmSlide { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }
.ecm-loader-pill {
  margin: 12px auto 0; width: max-content; padding: .5rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--y); font-weight: 800; font-size: .9rem; letter-spacing: .01em;
  display: flex; align-items: center; gap: .5rem; box-shadow: 0 10px 28px rgba(0,0,0,.22);
  animation: ecmPop .25s ease-out;
}
@keyframes ecmPop { from { transform: translateY(-8px); opacity: 0; } }
.ecm-loader-ico { width: 24px; height: 24px; display: block; animation: ecmBob .6s ease-in-out infinite alternate; }
@keyframes ecmBob { from { transform: translateY(1px) rotate(-6deg); } to { transform: translateY(-2px) rotate(6deg); } }
.ecm-loader-text { display: inline-flex; }
.ecm-loader-text span { display: inline-block; animation: ecmWave 1.1s ease-in-out infinite; }
.ecm-loader-text span.sp { width: .35em; animation: none; }
@keyframes ecmWave {
  0%, 60%, 100% { transform: translateY(0); color: var(--y); }
  30% { transform: translateY(-4px); color: #FFF6C2; }
}
@media (prefers-reduced-motion: reduce) {
  .ecm-loader-text span, .ecm-loader-bar { animation: none; }
}

/* 블로그 본문: 14px(text-sm) 는 모바일에서 작다. 본문 문단·목록은 16px 로 */
main article p.text-sm, main article li, main article .text-sm:not(table):not(th):not(td) { font-size: 1rem; line-height: 1.8; }

/* 바닥글은 늘 첫 화면 아래라 화면에 다가올 때 배치한다 (한 번 그리면 실제 크기를 기억한다) */
body > footer { content-visibility: auto; contain-intrinsic-size: auto 240px; }

/* ───────── 블로그 글 목차 ───────── */
.ecm-toc-box { background: var(--sf); border: 1px solid transparent; border-radius: 12px; padding: .6rem .9rem; margin: 0 0 1.25rem; }
.ecm-toc-box summary { cursor: pointer; font-weight: 800; font-size: .9rem; list-style: none; display: flex; align-items: center; gap: .4rem; }
.ecm-toc-box summary::-webkit-details-marker { display: none; }
.ecm-toc-box summary::before { content: "☰"; color: var(--brown); font-size: .85rem; }
.ecm-toc-n { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; background: var(--y-soft); color: var(--brown); padding: 1px 6px; border-radius: 6px; }
.ecm-toc-box ol { list-style: none; margin: .5rem 0 0; padding: 0; border-top: 1px solid var(--line); padding-top: .5rem; }
.ecm-toc-box li { margin: 0; }
.ecm-toc-box li.lv-h3 a { padding-left: 1.1rem; font-size: .8rem; color: var(--ink-3); }
.ecm-toc-box a { display: block; padding: .3rem .4rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: .85rem; line-height: 1.45; border-left: 2px solid transparent; }
.ecm-toc-box a:hover { background: #fff; color: var(--ink); }
.ecm-toc-box a.is-current { border-left-color: var(--y-deep); color: var(--ink); font-weight: 700; background: #fff; }
/* 넓은 화면: 글은 목차가 없을 때와 똑같이 화면 한가운데(48rem) 두고, 목차는 왼쪽 여백에 띄운다.
   1280px 미만은 왼쪽 여백이 좁아 목차를 글 위 상자로 보여 준다. */
@media (min-width: 1280px) {
  main.has-toc { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 48rem) minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
  main.has-toc > * { grid-column: 2; }
  main.has-toc > .ecm-toc { grid-column: 1; grid-row: 1 / span 40; justify-self: end; width: min(220px, 100%); position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; margin: 0; }
  .ecm-toc-box { margin: 0; }
}

/* 블로그 드롭다운·목록 칩 */
.ecm-mega-list-1 { grid-template-columns: minmax(0, 1fr) !important; }
.ecm-mega-more { margin: .6rem 0 0; font-size: .8rem; }
.ecm-mega-more a { color: var(--brown); font-weight: 700; text-decoration: none; }
.ecm-mega-more a:hover { text-decoration: underline; }
.ecm-blog-chips { display: flex; gap: .4rem; overflow-x: auto; padding: 0 0 1.25rem; scrollbar-width: none; }
.ecm-blog-chips::-webkit-scrollbar { display: none; }
.ecm-blog-chips .ecm-chip { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: .85rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; font-family: inherit; }
.ecm-blog-chips .ecm-chip:hover { border-color: var(--ink-3); }
.ecm-blog-chips .ecm-chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
main section[data-cat][hidden] { display: none; }

/* 쿠폰 코드별 확인일·출처 (게임 페이지 코드 표, 홈 쿠폰 창). 보상 아래 작은 회색 줄 */
.ecm-src { display: block; margin-top: .25rem; font-size: .76rem; line-height: 1.55; color: var(--ink-3); font-weight: 500; }
.ecm-src-cond { display: block; color: var(--ink-2); }
.ecm-src a.ecm-src-link { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); overflow-wrap: anywhere; }
.ecm-src a.ecm-src-link:hover { color: var(--ink); text-decoration-color: currentColor; }

/* 직접 입력해 봤어요 (data/tested.json: 운영자가 게임에서 직접 넣어 본 코드). 게임 페이지 코드 표, 홈 쿠폰 창, 오늘의 쿠폰 */
.ecm-tested-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; margin-top: .3rem; }
.ecm-tested { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .18rem .55rem; border-radius: 10px; font-size: .74rem; font-weight: 700; line-height: 1.4; letter-spacing: 0; text-decoration: none; }
.ecm-tested.is-ok { background: var(--new-soft); color: #0A7A3C; }
.ecm-tested.is-fail { background: var(--sf); color: var(--ink-2); }
a.ecm-tested.is-ok, .ecm-page a.ecm-tested.is-ok { color: #0A7A3C; }
a.ecm-tested.is-fail, .ecm-page a.ecm-tested.is-fail { color: var(--ink-2); }
a.ecm-tested::after { content: none !important; }
a.ecm-tested .ecm-tested-shot { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ecm-tested-note { font-size: .75rem; color: var(--ink-3); line-height: 1.5; }

/* "이 코드 안 돼요" 신고 (scripts/reports.js REPORTS_ENABLED 가 true 일 때만 그려진다). 보상 아래 작은 글자 버튼 */
.ecm-flag { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .3rem; font-size: .75rem; font-weight: 500; }
.ecm-flag-btn { border: 0; background: none; padding: .2rem 0; font: inherit; color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ecm-flag-btn:hover { color: var(--ink); }
.ecm-flag-choice { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.ecm-flag-choice button { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: .25rem .6rem; font: inherit; cursor: pointer; }
.ecm-flag-choice button:hover { border-color: var(--ink-3); color: var(--ink); }
.ecm-flag-choice button:disabled { opacity: .5; cursor: default; }
.ecm-flag-done { color: #0A7A3C; font-weight: 600; }
.ecm-flag-err { flex-basis: 100%; color: var(--ink-2); }

/* 글쓴이 줄 */
.ecm-byline { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--ink-3); margin: -.25rem 0 1.25rem; }
.ecm-byline img { width: 22px; height: 22px; }
.ecm-byline b { color: var(--ink-2); font-weight: 700; }

/* 글 속 쿠폰 페이지 링크: 스크롤하다가도 눈에 걸리게 굵은 노란 밑줄로.
   다른 글로 가는 링크는 그대로 두고, ECM 쿠폰 페이지(/, /game/…)로 가는 것만.
   위의 보라→갈색 테마 규칙이 !important 라서 글자색도 !important 로 덮는다. */
article a[href="/"]:not([class*="ecm-"]),
article a[href^="/game/"]:not([class*="ecm-"]) {
  color: var(--ink) !important;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--y-deep);
  text-decoration-thickness: .22em;
  text-underline-offset: .18em;
  text-decoration-skip-ink: none;
  border-radius: 3px;
  transition: background .15s;
}
article a[href="/"]:not([class*="ecm-"])::after,
article a[href^="/game/"]:not([class*="ecm-"])::after { content: " →"; }
article a[href="/"]:not([class*="ecm-"]):hover,
article a[href^="/game/"]:not([class*="ecm-"]):hover { background: var(--y-pale); }


/* 게임 페이지 "친구에게 공유" */
.ecm-share-row { margin: .5rem 0 0; }
.ecm-share { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 600; font-size: .88rem; cursor: pointer; }
.ecm-share:hover { background: var(--sf); border-color: var(--ink-3); }
.ecm-share:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 내 게임에 담기 (게임 페이지) · 오늘의 쿠폰 링크 */
.ecm-fav.is-on { background: var(--sf); border-color: var(--ink); }
.ecm-fav.is-on i { color: #A87400; }
.ecm-fav-link { font-size: .82rem; color: var(--ink-3) !important; font-weight: 600 !important; text-decoration: none !important; white-space: nowrap; }
.ecm-fav-link::after { content: none !important; }
.ecm-fav-link:hover { color: var(--ink) !important; }
.ecm-today-cta { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; }
.ecm-today-cta i { color: var(--brown); }
.ecm-today-cta span { margin-left: auto; font-weight: 800; }
.ecm-today-cta:hover { background: var(--sf); }

/* 게임 페이지 쿠폰 특징 출처 */
.ecm-note-src { font-size: .8rem; color: var(--ink-3); }
.ecm-note-src a { color: var(--ink-2); }

/* 텔레그램 새 쿠폰 알림 버튼 */
.ecm-share.ecm-tg { text-decoration: none; }
.ecm-share-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ecm-tg-cta { margin: .6rem 0 0; font-size: .88rem; }
.ecm-tg-cta a { color: #0b6fa4; font-weight: 600; text-decoration: none; }
.ecm-tg-cta a:hover { text-decoration: underline; }

/* 카카오톡 채널 추가 버튼 */
.ecm-share.ecm-kc { text-decoration: none; }  /* 노랑은 코드 보기·복사에만 쓴다. 채널·공유 버튼은 중립 테두리 */
.ecm-tg-cta a[data-kc] { color: #3C1E1E; }

/* ───────── 2026-09-30 개편: 게임 찾기·코드 복사 흐름 ───────── */
/* 복사 버튼: 성공·실패를 버튼 글자로도 알려 준다 (토스트를 못 봐도 알 수 있게) */
.ecm-btn-primary.is-done { background: var(--new); color: #fff; }
.ecm-btn-primary.is-fail { background: var(--hot-soft); color: #B42329; }
.ecm-toast.is-fail { background: #B42329; }
/* 보조 버튼 줄(공유·알림): 작고 중립적으로 */
.ecm-share-row.is-compact { gap: .35rem; }
.ecm-share-row.is-compact .ecm-share { padding: .3rem .7rem; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.ecm-share-row.is-compact .ecm-share i { color: var(--ink-3); }
@media (pointer: coarse) { .ecm-share-row.is-compact .ecm-share { min-height: 36px; } }

/* 홈 화면 설치 안내(복사 뒤 한 번, 아래쪽 작게) · 푸시 알림 버튼 */
.ecm-install { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: min(92vw, 30rem); display: flex; align-items: center; gap: .7rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 16px; padding: .7rem .8rem; box-shadow: 0 10px 30px rgba(23,22,15,.18); }
.ecm-install img { border-radius: 9px; flex: none; }
.ecm-install p { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--ink-2); flex: 1; min-width: 0; }
.ecm-install b { color: var(--ink); }
.ecm-install .ecm-btn-primary { flex: none; min-height: 40px; padding: 0 1rem; font-size: .88rem; }
.ecm-install-x { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 1rem; }
[data-push-toggle][hidden] { display: none !important; }
[data-push-toggle].is-on { border-color: var(--ink) !important; color: var(--ink) !important; }
[data-push-toggle].is-on i { color: #A87400; }
.ecm-push-note { flex-basis: 100%; font-size: .82rem !important; color: var(--ink-2) !important; margin: .2rem 0 0 !important; }

/* WebP 를 감싼 <picture> 는 자리를 차지하지 않는다: 안의 <img> 가 원래 자리에서 그대로 꾸며진다 */
picture.ecm-pic { display: contents; }

/* 복사 버튼: 손가락으로 누르기 쉬운 크기(44px 이상). 페이지별 글자 크기·안쪽 여백 설정은 그대로 둔다 */
button.ecm-btn-primary[data-copy] { min-height: 44px; min-width: 72px; justify-content: center; }
